Newsletter - Version 7.2.3

Version Description

  • [COMPOSER] Added approx. indicators of the subsject visibile part in Apple and Android clients (experimental)
  • [COMPOSER] New mobile version view directly while composing (experimental)
  • [COMPOSER] New test email to test subscribers or to specific email address
  • [COMPOSER] Fixed missing background when creating a new message from a preset
  • [COMPOSER] Added media selector to the CTA block
  • [COMPOSER] Added reference to the tags on HTML and Text blocks
  • [COMPOSER] Move the snippet (preheader) field near the subject
  • [COMPOSER] Footer block with three link options: unsubscribe, manage and view online
  • [COMPOSER] Improve font coherence between blocks (by default)
  • [ANTISPAM] Improved the antispam checks on subscription
  • [GENERAL] Removed obsolete folders and code
  • [NEWSLETTERS] Refactored subject ideas selector
  • [SUBSCRIPTION] Inverted extra profile fields and lists on standard subscription form
  • [GENERAL] IP address extracted checking proxy variables
  • [GENERAL] Improved sending stats collection and display for the delivery engine (not related to click/open stats)
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 7.2.3
Comparing to
See all releases

Code changes from version 7.2.2 to 7.2.3

Files changed (60) hide show
  1. admin-dark.css → admin/admin-dark.css +0 -0
  2. admin.css → admin/admin.css +1 -0
  3. admin.js → admin/admin.js +19 -1
  4. emails/tnp-composer/_css/tnp-modal.css → admin/modal.css +86 -0
  5. {emails/tnp-composer/_scripts → admin}/modal.js +85 -0
  6. emails/tnp-composer/_css/tnp-toast.css → admin/toast.css +0 -0
  7. emails/tnp-composer/_scripts/tnp-toast.js → admin/toast.js +13 -14
  8. css/extensions.css +5 -3
  9. emails/blocks/cta/options.php +2 -1
  10. emails/blocks/footer/block.php +32 -12
  11. emails/blocks/footer/options.php +4 -3
  12. emails/blocks/header/block.php +55 -51
  13. emails/blocks/header/layout-default.php +12 -16
  14. emails/blocks/header/layout-titlemotto.php +34 -0
  15. emails/blocks/header/options.php +30 -24
  16. emails/blocks/heading/block.php +4 -10
  17. emails/blocks/hero/block-left.php +2 -8
  18. emails/blocks/hero/block-right.php +4 -10
  19. emails/blocks/hero/block.php +2 -2
  20. emails/blocks/hero/options.php +0 -2
  21. emails/blocks/html/options.php +4 -0
  22. emails/blocks/posts/block.php +32 -30
  23. emails/blocks/posts/layout-big-image.php +23 -25
  24. emails/blocks/posts/layout-full-post.php +106 -110
  25. emails/blocks/posts/layout-one-2.php +13 -14
  26. emails/blocks/posts/layout-one.php +16 -15
  27. emails/blocks/posts/layout-two.php +208 -204
  28. emails/blocks/separator/options.php +1 -1
  29. emails/blocks/text/options.php +4 -1
  30. emails/composer.php +14 -0
  31. emails/edit.php +2 -4
  32. emails/emails.php +115 -47
  33. emails/images/_rawhtml.png +0 -0
  34. emails/subjects.php +44 -48
  35. emails/tnp-composer/_css/animate.css +0 -3158
  36. emails/tnp-composer/_css/newsletter-builder-v2.css +174 -19
  37. emails/tnp-composer/_scripts/jquery-2.2.3.min.js +0 -4
  38. emails/tnp-composer/_scripts/jquery-ui-1.10.4.min.js +0 -7
  39. emails/tnp-composer/_scripts/newsletter-builder-v2.js +141 -27
  40. emails/tnp-composer/_scripts/newsletter-builder.js +1 -1
  41. emails/tnp-composer/css/backend.css +40 -0
  42. emails/tnp-composer/css/newsletter.css +13 -0
  43. emails/tnp-composer/index-v2.php +55 -41
  44. emails/tnp-composer/modal/test-newsletter.php +49 -0
  45. images/subject/android.png +0 -0
  46. images/subject/gmail.png +0 -0
  47. images/subject/iphone.png +0 -0
  48. includes/antispam.php +3 -0
  49. includes/composer.php +60 -17
  50. includes/controls.php +19 -10
  51. includes/fields.php +44 -2
  52. includes/logger.php +3 -2
  53. includes/mailer.php +2 -1
  54. includes/module.php +16 -6
  55. main/extensions.php +1 -2
  56. plugin.php +37 -33
  57. readme.txt +26 -10
  58. subscription/subscription.php +11 -9
  59. unsubscription/index.php +17 -25
  60. unsubscription/unsubscription.php +217 -217
admin-dark.css → admin/admin-dark.css RENAMED
File without changes
admin.css → admin/admin.css RENAMED
@@ -156,6 +156,7 @@
156
  font-size: 12px;
157
  color: #fff;
158
  font-family: soleil, sans-serif;
 
159
  }
160
 
161
  #tnp-header input {
156
  font-size: 12px;
157
  color: #fff;
158
  font-family: soleil, sans-serif;
159
+ min-width: 1200px;
160
  }
161
 
162
  #tnp-header input {
admin.js → admin/admin.js RENAMED
@@ -175,6 +175,25 @@ function tnp_fields_media_mini_select(el) {
175
  }).open();
176
  }
177
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  function tnp_fields_media_mini_remove(name) {
179
  event.preventDefault();
180
  event.stopPropagation();
@@ -185,7 +204,6 @@ function tnp_fields_media_mini_remove(name) {
185
  }
186
 
187
  function tnp_lists_toggle(e) {
188
- console.log(e);
189
  jQuery('#' + e.id + '-notes > div').hide();
190
  jQuery('#' + e.id + '-notes .list_' + e.value).show();
191
  }
175
  }).open();
176
  }
177
 
178
+ function tnp_fields_url_select(el) {
179
+ event.preventDefault();
180
+
181
+ let field_id = jQuery(el).data("field");
182
+
183
+ let tnp_uploader = wp.media({
184
+ title: "Select an image",
185
+ button: {
186
+ text: "Select"
187
+ },
188
+ multiple: false
189
+ }).on("select", function () {
190
+ let media = tnp_uploader.state().get("selection").first();
191
+ let $field = jQuery("#" + field_id);
192
+ $field.val(media.attributes.url);
193
+ $field.trigger("change");
194
+ }).open();
195
+ }
196
+
197
  function tnp_fields_media_mini_remove(name) {
198
  event.preventDefault();
199
  event.stopPropagation();
204
  }
205
 
206
  function tnp_lists_toggle(e) {
 
207
  jQuery('#' + e.id + '-notes > div').hide();
208
  jQuery('#' + e.id + '-notes .list_' + e.value).show();
209
  }
emails/tnp-composer/_css/tnp-modal.css → admin/modal.css RENAMED
@@ -101,3 +101,89 @@
101
  .tnp-modal .button-danger:hover {
102
  background-color: darkred;
103
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  .tnp-modal .button-danger:hover {
102
  background-color: darkred;
103
  }
104
+
105
+
106
+ /* TNP MODAL 2 */
107
+ .tnp-modal2 {
108
+ display: none; /* Hidden by default */
109
+ position: fixed; /* Stay in place */
110
+ z-index: 100000; /* Sit on top */
111
+ left: 0;
112
+ top: 0;
113
+ width: 100%; /* Full width */
114
+ height: 100%; /* Full height */
115
+ overflow: auto; /* Enable scroll if needed */
116
+ }
117
+
118
+ .tnp-modal2.open {
119
+ display: flex;
120
+ align-items: center;
121
+ justify-content: center;
122
+ align-items: center;
123
+ justify-content: center;
124
+ background-color: rgba(0, 0, 0, 0);
125
+ animation: modal-in .4s ease-out forwards;
126
+ }
127
+
128
+ .tnp-modal2__content {
129
+ position: relative;
130
+ display: flex;
131
+ flex-direction: column;
132
+ border-radius: 3px;
133
+ background-color: white;
134
+ width: 400px;
135
+ min-height: 100px;
136
+ max-height: 400px;
137
+ overflow-y: hidden;
138
+ animation: modal-fadein .4s ease-out forwards;
139
+ }
140
+
141
+ .tnp-modal2__header {
142
+ padding: 20px 50px;
143
+ background-color: #ECF0F1;
144
+ position: relative;
145
+ text-align: center;
146
+ }
147
+
148
+ .tnp-modal2__header h2{
149
+ margin: 0;
150
+ }
151
+
152
+ .tnp-modal2__body {
153
+ overflow-y: auto;
154
+ padding: 2rem;
155
+ flex: 1 1 auto;
156
+ }
157
+
158
+ .tnp-modal2__close {
159
+ position: absolute;
160
+ cursor: pointer;
161
+ right: 0;
162
+ top: 50%;
163
+ transform: translateY(-50%);
164
+ font-weight: bold;
165
+ padding: 10px;
166
+ font-size: 40px;
167
+ }
168
+
169
+ .tnp-modal2__close:before {
170
+ content: '×';
171
+ }
172
+
173
+ .tnp-modal2.on-close {
174
+ background-color: rgba(0, 0, 0, 0);
175
+ transition: background-color .4s ease-out;
176
+ }
177
+
178
+ .tnp-modal2.on-close .tnp-modal2__content {
179
+ animation: modal-fadeout .4s ease-in forwards;
180
+ }
181
+
182
+ .tnp-modal2__body .row {
183
+ display: flex;
184
+ }
185
+
186
+ .tnp-modal2__body .col {
187
+ flex: 1;
188
+ }
189
+
{emails/tnp-composer/_scripts → admin}/modal.js RENAMED
@@ -200,3 +200,88 @@ const TNPModal = function (options) {
200
  };
201
 
202
  window.TNPModal = TNPModal;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  };
201
 
202
  window.TNPModal = TNPModal;
203
+
204
+ const TNPModal2 = (function () {
205
+ 'use strict'
206
+
207
+ var modalClass = '.tnp-modal2';
208
+ var dataModalTriggerSelector = 'data-tnp-modal-target';
209
+ var dataCloseModalTriggerSelector = 'data-tnp-modal-close';
210
+
211
+ class TNPModal {
212
+
213
+ constructor() {
214
+
215
+ var self = this;
216
+ var triggers = document.querySelectorAll(`[${dataModalTriggerSelector}]`);
217
+
218
+ //Inizializzo i trigger di apertura delle modali
219
+ self._forEach(triggers, function (index, item) {
220
+
221
+ var modalTriggerSelector = item.getAttribute(dataModalTriggerSelector);
222
+
223
+ item.addEventListener('click', function (e) {
224
+ self.open(modalTriggerSelector);
225
+ });
226
+
227
+ });
228
+
229
+ //Inizializzo i trigger di chiusura delle modali
230
+ var closeModalTriggersEl = document.querySelectorAll(`[${dataCloseModalTriggerSelector}]`);
231
+ self._forEach(closeModalTriggersEl, function (index, closeTriggerEl) {
232
+ closeTriggerEl.addEventListener('click', function (e) {
233
+ self._closeModalElement(e.target.closest(modalClass));
234
+ });
235
+ });
236
+
237
+ }
238
+
239
+ open(modalSelector) {
240
+ var self = this;
241
+ var modalEl = document.querySelector(modalSelector);
242
+
243
+ const showModalEvent = new Event('show.tnp.modal');
244
+ modalEl.dispatchEvent(showModalEvent);
245
+
246
+ modalEl.classList.add('open');
247
+
248
+ modalEl.addEventListener('click', function (e) {
249
+ if (!e.target.closest('.tnp-modal2__content')) {
250
+ self._closeModalElement(modalEl);
251
+ }
252
+ });
253
+ }
254
+
255
+ close(modalSelector) {
256
+ var modalEl = document.querySelector(modalSelector);
257
+ this._closeModalElement(modalEl);
258
+ }
259
+
260
+ _closeModalElement(modal) {
261
+ const hideModalEvent = new Event('hide.tnp.modal');
262
+ modal.dispatchEvent(hideModalEvent);
263
+
264
+ modal.classList.add('on-close');
265
+
266
+ modal.addEventListener('animationend', function () {
267
+ modal.classList.remove('open');
268
+ modal.classList.remove('on-close');
269
+
270
+ const hiddenModalEvent = new Event('hidden.tnp.modal');
271
+ modal.dispatchEvent(hiddenModalEvent);
272
+ }, {once: true});
273
+ }
274
+
275
+ _forEach(array, callback, scope) {
276
+ for (var i = 0; i < array.length; i++) {
277
+ callback.call(scope, i, array[i]);
278
+ }
279
+ }
280
+ ;
281
+ }
282
+
283
+ return new TNPModal();
284
+ })();
285
+
286
+ window.TNPModal2 = TNPModal2;
287
+
emails/tnp-composer/_css/tnp-toast.css → admin/toast.css RENAMED
File without changes
emails/tnp-composer/_scripts/tnp-toast.js → admin/toast.js RENAMED
@@ -1,6 +1,5 @@
1
  const TnpToast = (function () { //Module pattern mi permette di rendere private le DEFAULT_OPTIONS e funzione di _render
2
  'use strict';
3
-
4
  const DEFAULT_OPTIONS = {
5
  duration: 2000,
6
  position: 'bottom right',
@@ -119,19 +118,19 @@ const TnpToast = (function () { //Module pattern mi permette di rendere private
119
  window.TnpToast = TnpToast;
120
 
121
  /*
122
- //ESEMPIO UTILIZZO API TnpToast
123
-
124
- const toastTop = new TnpToast({duration: 5000, position: 'bottom right', wrapperPadding: '70px 20px'});
125
-
126
- setTimeout(function () {
127
- toastTop.info('messaggio di info');
128
- }, 3000);
129
-
130
- setTimeout(function () {
131
- toastTop.error('messaggio di errore');
132
- }, 5000);
133
-
134
- */
135
 
136
 
137
 
1
  const TnpToast = (function () { //Module pattern mi permette di rendere private le DEFAULT_OPTIONS e funzione di _render
2
  'use strict';
 
3
  const DEFAULT_OPTIONS = {
4
  duration: 2000,
5
  position: 'bottom right',
118
  window.TnpToast = TnpToast;
119
 
120
  /*
121
+ //ESEMPIO UTILIZZO API TnpToast
122
+
123
+ const toastTop = new TnpToast({duration: 5000, position: 'bottom right', wrapperPadding: '70px 20px'});
124
+
125
+ setTimeout(function () {
126
+ toastTop.info('messaggio di info');
127
+ }, 3000);
128
+
129
+ setTimeout(function () {
130
+ toastTop.error('messaggio di errore');
131
+ }, 5000);
132
+
133
+ */
134
 
135
 
136
 
css/extensions.css CHANGED
@@ -3,15 +3,17 @@
3
  .tnp-extension-premium-box, .tnp-extension-free-box, .tnp-integration-box {
4
  width: 300px;
5
  height: 220px;
6
- background-color: #222B36;
 
7
  text-align: center;
8
- margin: 20px;
9
  float: left;
10
  position: relative;
11
  }
12
 
13
  .tnp-extension-premium-box:hover, .tnp-extension-free-box:hover, .tnp-integration-box:hover {
14
- background-color: #232C35;
 
15
  box-shadow: 1px 1px 15px #222B36;
16
  }
17
 
3
  .tnp-extension-premium-box, .tnp-extension-free-box, .tnp-integration-box {
4
  width: 300px;
5
  height: 220px;
6
+ /*background-color: #222B36;*/
7
+ background-color: #28313C;
8
  text-align: center;
9
+ margin: 20px 20px 0px 0px;
10
  float: left;
11
  position: relative;
12
  }
13
 
14
  .tnp-extension-premium-box:hover, .tnp-extension-free-box:hover, .tnp-integration-box:hover {
15
+ /*background-color: #232C35;*/
16
+ background-color: #2B343F;
17
  box-shadow: 1px 1px 15px #222B36;
18
  }
19
 
emails/blocks/cta/options.php CHANGED
@@ -27,7 +27,8 @@ unset($controls->data['width']);
27
  <?php $fields->button( 'button', 'Button layout', [
28
  'family_default' => true,
29
  'size_default' => true,
30
- 'weight_default' => true
 
31
  ] ) ?>
32
 
33
  <div class="tnp-field-row">
27
  <?php $fields->button( 'button', 'Button layout', [
28
  'family_default' => true,
29
  'size_default' => true,
30
+ 'weight_default' => true,
31
+ 'media' => true
32
  ] ) ?>
33
 
34
  <div class="tnp-field-row">
emails/blocks/footer/block.php CHANGED
@@ -7,9 +7,13 @@
7
 
8
  $default_options = array(
9
  'view' => 'View online',
10
- 'profile' => 'Modify your subscription',
 
 
 
 
11
  'font_family' => '',
12
- 'font_size' => 14,
13
  'font_color' => '',
14
  'font_weight' => '',
15
  'block_padding_left' => 15,
@@ -19,25 +23,41 @@ $default_options = array(
19
  'block_background' => '',
20
  'url' => 'profile'
21
  );
 
 
 
 
 
 
 
 
 
 
 
 
22
  $options = array_merge($default_options, $options);
23
 
24
- $text_style = TNP_Composer::get_style($options, '', $composer, 'text');
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  ?>
27
  <style>
28
  .text {
29
- font-family: <?php echo $text_style->font_family ?>;
30
- font-size: <?php echo round($text_style->font_size*0.9) ?>px;
31
- font-weight: <?php echo $text_style->font_weight ?>;
32
- color: <?php echo $text_style->font_color ?>;
33
  text-decoration: none;
34
  line-height: normal;
35
  }
36
  </style>
37
 
38
- <a inline-class="text" href="<?php if ($options['url'] == 'unsubscription') echo '{unsubscription_url}'; else echo '{profile_url}' ?>" target="_blank"><?php echo esc_html($options['profile']) ?></a>
39
-
40
- <span inline-class="text">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>
41
-
42
- <a inline-class="text" href="{email_url}" target="_blank"><?php echo esc_html($options['view']) ?></a>
43
 
7
 
8
  $default_options = array(
9
  'view' => 'View online',
10
+ 'view_enabled' => 1,
11
+ 'profile' => 'Manage your subscription',
12
+ 'profile_enabled' => 1,
13
+ 'unsubscribe' => 'Unsubscribe',
14
+ 'unsubscribe_enabled' => 1,
15
  'font_family' => '',
16
+ 'font_size' => '',
17
  'font_color' => '',
18
  'font_weight' => '',
19
  'block_padding_left' => 15,
23
  'block_background' => '',
24
  'url' => 'profile'
25
  );
26
+
27
+ // Migration code
28
+ if (!isset($options['profile_enabled']) && isset($options['url'])) {
29
+ if ($options['url'] === 'profile') {
30
+ $options['profile_enabled'] = 1;
31
+ $options['unsubscribe_enabled'] = 0;
32
+ } else {
33
+ $options['profile_enabled'] = 1;
34
+ $options['unsubscribe_enabled'] = 0;
35
+ }
36
+ }
37
+
38
  $options = array_merge($default_options, $options);
39
 
40
+ $text_style = TNP_Composer::get_text_style($options, '', $composer, ['scale'=>0.8]);
41
+
42
+ $links = [];
43
+ if ($options['unsubscribe_enabled']) {
44
+ $links[] = '<a inline-class="text" href="{unsubscription_url}" target="_blank">' . esc_html($options['unsubscribe']) . '</a>';
45
+ }
46
+ if ($options['profile_enabled']) {
47
+ $links[] = '<a inline-class="text" href="{profile_url}" target="_blank">' . esc_html($options['profile']) . '</a>';
48
+ }
49
+ if ($options['view_enabled']) {
50
+ $links[] = '<a inline-class="text" href="{email_url}" target="_blank">' . esc_html($options['view']) . '</a>';
51
+ }
52
 
53
  ?>
54
  <style>
55
  .text {
56
+ <?php $text_style->echo_css()?>
 
 
 
57
  text-decoration: none;
58
  line-height: normal;
59
  }
60
  </style>
61
 
62
+ <?php echo implode('<span inline-class="text">&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;</span>', $links) ?>
 
 
 
 
63
 
emails/blocks/footer/options.php CHANGED
@@ -3,10 +3,11 @@
3
  ?>
4
 
5
 
6
- <?php $fields->text('view', __('View online label','newsletter')) ?>
7
- <?php $fields->text('profile', __('Subscription details label','newsletter')) ?>
8
 
9
- <?php $fields->select('url', '', array('profile'=>__('Use profile link','newsletter'), 'unsubscription' => __('Use unsubscription link','newsletter'))) ?>
 
 
10
 
11
  <?php $fields->font( 'font', __( 'Text', 'newsletter' ), [
12
  'family_default' => true,
3
  ?>
4
 
5
 
6
+ <?php $fields->text_on_off('view', __('View online link','newsletter')) ?>
 
7
 
8
+ <?php $fields->text_on_off('profile', __('Subscriber profile link','newsletter')) ?>
9
+
10
+ <?php $fields->text_on_off('unsubscribe', __('Unsubscribe link','newsletter')) ?>
11
 
12
  <?php $fields->font( 'font', __( 'Text', 'newsletter' ), [
13
  'family_default' => true,
emails/blocks/header/block.php CHANGED
@@ -1,51 +1,55 @@
1
- <?php
2
- /*
3
- * Name: Header
4
- * Section: header
5
- * Description: Default header with company info
6
- */
7
-
8
- $default_options = array(
9
- 'font_family' => '',
10
- 'font_size' => '',
11
- 'font_color' => '',
12
- 'font_weight' => '',
13
- 'logo_height' => 100,
14
- 'block_padding_top' => 15,
15
- 'block_padding_bottom' => 15,
16
- 'block_padding_left' => 15,
17
- 'block_padding_right' => 15,
18
- 'block_background' => '',
19
- 'layout' => ''
20
- );
21
- $options = array_merge($default_options, $options);
22
-
23
- $text_font_family = empty( $options['font_family'] ) ? $global_text_font_family : $options['font_family'];
24
- $text_font_size = empty( $options['font_size'] ) ? $global_text_font_size : $options['font_size'];
25
- $text_font_color = empty( $options['font_color'] ) ? $global_text_font_color : $options['font_color'];
26
- $text_font_weight = empty( $options['font_weight'] ) ? $global_text_font_weight : $options['font_weight'];
27
-
28
- if (empty($info['header_logo']['id'])) {
29
- $media = false;
30
- } else {
31
- $media = tnp_get_media($info['header_logo']['id'], 'large');
32
- if ($media) {
33
- $media->alt = $info['header_title'];
34
- $media->link = home_url();
35
- $media->set_height($options['logo_height']);
36
- }
37
- }
38
-
39
- $empty = !$media && empty($info['header_sub']) && empty($info['header_title']);
40
-
41
- if ($empty) {
42
- echo '<p>Please, set your company info.</p>';
43
- } elseif ($options['layout'] === 'logo') {
44
- include __DIR__ . '/layout-logo.php';
45
- return;
46
- } else {
47
- include __DIR__ . '/layout-default.php';
48
- return;
49
- }
50
- ?>
51
-
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * Name: Header
5
+ * Section: header
6
+ * Description: Default header with company info
7
+ */
8
+
9
+ $default_options = array(
10
+ 'font_family' => '',
11
+ 'font_size' => '',
12
+ 'font_color' => '',
13
+ 'font_weight' => '',
14
+ 'logo_height' => 100,
15
+ 'block_padding_top' => 15,
16
+ 'block_padding_bottom' => 15,
17
+ 'block_padding_left' => 15,
18
+ 'block_padding_right' => 15,
19
+ 'block_background' => '',
20
+ 'layout' => ''
21
+ );
22
+ $options = array_merge($default_options, $options);
23
+
24
+ $text_font_family = empty($options['font_family']) ? $global_text_font_family : $options['font_family'];
25
+ $text_font_size = empty($options['font_size']) ? $global_text_font_size : $options['font_size'];
26
+ $text_font_color = empty($options['font_color']) ? $global_text_font_color : $options['font_color'];
27
+ $text_font_weight = empty($options['font_weight']) ? $global_text_font_weight : $options['font_weight'];
28
+
29
+ if (empty($info['header_logo']['id'])) {
30
+ $media = false;
31
+ } else {
32
+ $media = tnp_get_media($info['header_logo']['id'], 'large');
33
+ if ($media) {
34
+ $media->alt = $info['header_title'];
35
+ $media->link = home_url();
36
+ $media->set_height($options['logo_height']);
37
+ }
38
+ }
39
+
40
+ $empty = !$media && empty($info['header_sub']) && empty($info['header_title']);
41
+
42
+ if ($empty) {
43
+ echo '<p>Please, set your company info.</p>';
44
+ } elseif ($options['layout'] === 'logo') {
45
+ include __DIR__ . '/layout-logo.php';
46
+ return;
47
+ } elseif ($options['layout'] === 'titlemotto') {
48
+ include __DIR__ . '/layout-titlemotto.php';
49
+ return;
50
+ } else {
51
+ include __DIR__ . '/layout-default.php';
52
+ return;
53
+ }
54
+ ?>
55
+
emails/blocks/header/layout-default.php CHANGED
@@ -1,27 +1,22 @@
 
 
 
1
  <style>
2
  .text {
3
- font-family: <?php echo $text_font_family ?>;
4
- font-size: <?php echo $text_font_size ?>px;
5
- font-weight: <?php echo $text_font_weight ?>;
6
- color: <?php echo $text_font_color ?>;
7
  text-decoration: none;
8
  line-height: normal;
9
  padding: 10px;
10
  }
11
 
12
  .title {
13
- font-family: <?php echo $text_font_family ?>;
14
- font-size: <?php echo $text_font_size * 1.2 ?>px;
15
- font-weight: <?php echo $text_font_weight ?>;
16
- color: <?php echo $text_font_color ?>;
17
  text-decoration: none;
18
  line-height: normal;
19
  }
20
 
21
  .logo {
22
- font-family: <?php echo $text_font_family ?>;
23
- font-weight: <?php echo $text_font_weight ?>;
24
- color: <?php echo $text_font_color ?>;
25
  line-height: normal !important;
26
  }
27
  </style>
@@ -32,13 +27,14 @@
32
  <?php if ($media) { ?>
33
  <?php echo TNP_Composer::image($media) ?>
34
  <?php } else { ?>
35
- <a href="<?php echo home_url() ?>" target="_blank" inline-class="title">
36
- <?php echo esc_attr($info['header_title']) ?>
37
- </a>
38
  <?php } ?>
39
  </td>
40
- <td width="50%" align="center" inline-class="text">
41
- <?php echo esc_html($info['header_sub']) ?>
 
 
 
42
  </td>
43
  </tr>
44
  </table>
1
+ <?php
2
+ $text_style = TNP_Composer::get_text_style($options, '', $composer);
3
+ ?>
4
  <style>
5
  .text {
6
+ <?php $text_style->echo_css(0.9) ?>
 
 
 
7
  text-decoration: none;
8
  line-height: normal;
9
  padding: 10px;
10
  }
11
 
12
  .title {
13
+ <?php $text_style->echo_css(1.2) ?>
 
 
 
14
  text-decoration: none;
15
  line-height: normal;
16
  }
17
 
18
  .logo {
19
+ <?php $text_style->echo_css() ?>
 
 
20
  line-height: normal !important;
21
  }
22
  </style>
27
  <?php if ($media) { ?>
28
  <?php echo TNP_Composer::image($media) ?>
29
  <?php } else { ?>
30
+ [logo]
 
 
31
  <?php } ?>
32
  </td>
33
+ <td width="50%" align="center" style="padding: 10px">
34
+ <a href="<?php echo home_url() ?>" target="_blank" inline-class="title">
35
+ <?php echo esc_attr($info['header_title']) ?>
36
+ </a>
37
+ <div inline-class="text"><?php echo esc_attr($info['header_sub']) ?></div>
38
  </td>
39
  </tr>
40
  </table>
emails/blocks/header/layout-titlemotto.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $title_style = TNP_Composer::get_title_style($options, '-', $composer);
3
+ $text_style = TNP_Composer::get_text_style($options, '', $composer);
4
+ ?>
5
+ <style>
6
+ .text {
7
+ <?php $text_style->echo_css() ?>
8
+ text-decoration: none;
9
+ line-height: normal;
10
+ padding: 10px;
11
+ }
12
+
13
+ .title {
14
+ <?php $title_style->echo_css(0.9) ?>
15
+ text-decoration: none;
16
+ line-height: normal;
17
+ }
18
+
19
+ </style>
20
+
21
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin: 0; border-collapse: collapse;">
22
+ <tr>
23
+ <td align="center" width="100%">
24
+ <a href="<?php echo home_url() ?>" target="_blank" inline-class="title">
25
+ <?php echo esc_attr($info['header_title']) ?>
26
+ </a>
27
+ </td>
28
+ </tr>
29
+ <tr>
30
+ <td width="100%" align="center" inline-class="text">
31
+ <?php echo esc_html($info['header_sub']) ?>
32
+ </td>
33
+ </tr>
34
+ </table>
emails/blocks/header/options.php CHANGED
@@ -1,24 +1,30 @@
1
- <?php
2
-
3
- /* @var $options array contains all the options the current block we're ediging contains */
4
- /* @var $controls NewsletterControls */
5
- /* @var $fields NewsletterFields */
6
- ?>
7
-
8
- <p>
9
- <?php echo sprintf( __( 'Company data can be globally set on <a href="%s" target="_blank">company info panel</a>.', 'newsletter' ), '?page=newsletter_main_info' ); ?>
10
- </p>
11
-
12
- <?php
13
- $fields->select('layout', __('Layout', 'newsletter'), ['' => __('Default', 'newsletter'), 'logo' => __('Only the logo', 'newsletter')])
14
- ?>
15
-
16
- <?php $fields->font( 'font', __( 'Text', 'newsletter' ), [
17
- 'family_default' => true,
18
- 'size_default' => true,
19
- 'weight_default' => true
20
- ] ) ?>
21
-
22
- <?php $fields->number('logo_height', __('Height'))?>
23
-
24
- <?php $fields->block_commons() ?>
 
 
 
 
 
 
1
+ <?php
2
+ /* @var $options array contains all the options the current block we're ediging contains */
3
+ /* @var $controls NewsletterControls */
4
+ /* @var $fields NewsletterFields */
5
+ ?>
6
+
7
+ <p>
8
+ <?php echo sprintf(__('Company data can be globally set on <a href="%s" target="_blank">company info panel</a>.', 'newsletter'), '?page=newsletter_main_info'); ?><br>
9
+ Use an image block to have a single top banner.
10
+ </p>
11
+
12
+ <?php
13
+ $fields->select('layout', __('Layout', 'newsletter'), [
14
+ '' => __('Default', 'newsletter'),
15
+ 'logo' => __('Only the logo', 'newsletter'),
16
+ 'titlemotto' => 'Title and motto'
17
+ ])
18
+ ?>
19
+
20
+ <?php
21
+ $fields->font('font', __('Text', 'newsletter'), [
22
+ 'family_default' => true,
23
+ 'size_default' => true,
24
+ 'weight_default' => true
25
+ ])
26
+ ?>
27
+
28
+ <?php $fields->number('logo_height', __('Height')) ?>
29
+
30
+ <?php $fields->block_commons() ?>
emails/blocks/heading/block.php CHANGED
@@ -8,7 +8,6 @@
8
  $default_options = array(
9
  'text' => 'An Awesome Title',
10
  'align' => 'center',
11
- 'block_background' => '',
12
  'font_family' => '',
13
  'font_size' => '',
14
  'font_color' => '',
@@ -16,24 +15,19 @@ $default_options = array(
16
  'block_padding_left' => 15,
17
  'block_padding_right' => 15,
18
  'block_padding_bottom' => 15,
19
- 'block_padding_top' => 15
 
20
  );
21
  $options = array_merge($default_options, $options);
22
 
23
- $title_font_family = empty($options['font_family']) ? $global_title_font_family : $options['font_family'];
24
- $title_font_size = empty($options['font_size']) ? $global_title_font_size : $options['font_size'];
25
- $title_font_color = empty($options['font_color']) ? $global_title_font_color : $options['font_color'];
26
- $title_font_weight = empty($options['font_weight']) ? $global_title_font_weight : $options['font_weight'];
27
 
28
  ?>
29
 
30
  <style>
31
  .title {
 
32
  padding: 0;
33
- font-size: <?php echo $title_font_size ?>px;
34
- font-family: <?php echo $title_font_family ?>;
35
- font-weight: <?php echo $title_font_weight ?>;
36
- color: <?php echo $title_font_color ?>;
37
  line-height: normal !important;
38
  letter-spacing: normal;
39
  }
8
  $default_options = array(
9
  'text' => 'An Awesome Title',
10
  'align' => 'center',
 
11
  'font_family' => '',
12
  'font_size' => '',
13
  'font_color' => '',
15
  'block_padding_left' => 15,
16
  'block_padding_right' => 15,
17
  'block_padding_bottom' => 15,
18
+ 'block_padding_top' => 15,
19
+ 'block_background' => ''
20
  );
21
  $options = array_merge($default_options, $options);
22
 
23
+ $title_style = TNP_Composer::get_title_style($options, '', $composer);
 
 
 
24
 
25
  ?>
26
 
27
  <style>
28
  .title {
29
+ <?php $title_style->echo_css()?>
30
  padding: 0;
 
 
 
 
31
  line-height: normal !important;
32
  letter-spacing: normal;
33
  }
emails/blocks/hero/block-left.php CHANGED
@@ -1,20 +1,14 @@
1
  <style>
2
  /* Styles which will be removed and injected in the replacing the matching "inline-class" attribute */
3
  .title {
4
- font-family: <?php echo $title_style->font_family ?>;
5
- font-size: <?php echo $title_style->font_size ?>px;
6
- font-weight: <?php echo $title_style->font_weight ?>;
7
- color: <?php echo $title_style->font_color ?>;
8
  margin: 0;
9
  text-align: center;
10
  line-height: normal;
11
  padding: 10px 0;
12
  }
13
  .text {
14
- font-family: <?php echo $text_style->font_family ?>;
15
- font-size: <?php echo $text_style->font_size ?>px;
16
- font-weight: <?php echo $text_style->font_weight ?>;
17
- color: <?php echo $text_style->font_color ?>;
18
  padding: 10px 0;
19
  line-height: 1.5em;
20
  margin: 0;
1
  <style>
2
  /* Styles which will be removed and injected in the replacing the matching "inline-class" attribute */
3
  .title {
4
+ <?php $title_style->echo_css(0.8)?>
 
 
 
5
  margin: 0;
6
  text-align: center;
7
  line-height: normal;
8
  padding: 10px 0;
9
  }
10
  .text {
11
+ <?php $text_style->echo_css()?>
 
 
 
12
  padding: 10px 0;
13
  line-height: 1.5em;
14
  margin: 0;
emails/blocks/hero/block-right.php CHANGED
@@ -1,22 +1,16 @@
1
  <style>
2
  /* Styles which will be removed and injected in the replacing the matching "inline-class" attribute */
3
  .title {
4
- font-family: <?php echo $title_style->font_family ?>;
5
- font-size: <?php echo $title_style->font_size ?>px;
6
- font-weight: <?php echo $title_style->font_weight ?>;
7
- color: <?php echo $title_style->font_color ?>;
8
- line-height: normal;
9
  margin: 0;
10
  text-align: center;
11
  padding: 10px 0;
12
  }
13
  .text {
14
- font-family: <?php echo $text_style->font_family ?>;
15
- font-size: <?php echo $text_style->font_size ?>px;
16
- font-weight: <?php echo $text_style->font_weight ?>;
17
- color: <?php echo $text_style->font_color ?>;
18
  padding: 10px 0;
19
- line-height: 1.5em;
20
  text-align: center;
21
  margin: 0;
22
  }
1
  <style>
2
  /* Styles which will be removed and injected in the replacing the matching "inline-class" attribute */
3
  .title {
4
+ <?php $title_style->echo_css(0.8)?>
5
+ line-height: normal!important;
 
 
 
6
  margin: 0;
7
  text-align: center;
8
  padding: 10px 0;
9
  }
10
  .text {
11
+ <?php $text_style->echo_css()?>
 
 
 
12
  padding: 10px 0;
13
+ line-height: 1.5em!important;
14
  text-align: center;
15
  margin: 0;
16
  }
emails/blocks/hero/block.php CHANGED
@@ -63,8 +63,8 @@ if ($layout == 'full') {
63
  $options = array_merge(array('block_padding_left' => 15, 'block_padding_right' => 15), $options);
64
  }
65
 
66
- $title_style = TNP_Composer::get_style($options, 'title', $composer, 'title');
67
- $text_style = TNP_Composer::get_style($options, '', $composer, 'text');
68
 
69
  $layout = $options['layout'];
70
 
63
  $options = array_merge(array('block_padding_left' => 15, 'block_padding_right' => 15), $options);
64
  }
65
 
66
+ $title_style = TNP_Composer::get_title_style($options, 'title', $composer);
67
+ $text_style = TNP_Composer::get_text_style($options, '', $composer);
68
 
69
  $layout = $options['layout'];
70
 
emails/blocks/hero/options.php CHANGED
@@ -23,8 +23,6 @@ $fields->controls->data['schema'] = '';
23
 
24
  <?php $fields->media('image', __('Image', 'newsletter'), array('alt' => true)) ?>
25
 
26
-
27
-
28
  <?php $fields->textarea('text', __('Text', 'newsletter')) ?>
29
  <?php $fields->font( 'font', '', [ 'family_default' => true, 'size_default' => true, 'weight_default' => true ] ) ?>
30
 
23
 
24
  <?php $fields->media('image', __('Image', 'newsletter'), array('alt' => true)) ?>
25
 
 
 
26
  <?php $fields->textarea('text', __('Text', 'newsletter')) ?>
27
  <?php $fields->font( 'font', '', [ 'family_default' => true, 'size_default' => true, 'weight_default' => true ] ) ?>
28
 
emails/blocks/html/options.php CHANGED
@@ -30,6 +30,10 @@ $options = array_merge($default_options, $options);
30
  });
31
  </script>
32
 
 
 
 
 
33
  <table class="form-table">
34
  <tr>
35
  <td>
30
  });
31
  </script>
32
 
33
+ <p>
34
+ <a href="https://www.thenewsletterplugin.com/documentation/newsletters/newsletter-tags/"
35
+ target="_blank">You can use tags to inject subscriber fields</a>.
36
+ </p>
37
  <table class="form-table">
38
  <tr>
39
  <td>
emails/blocks/posts/block.php CHANGED
@@ -26,10 +26,10 @@ $defaults = array(
26
  'layout' => 'one',
27
  'language' => '',
28
  'button_label' => __('Read more...', 'newsletter'),
29
- 'button_background' => '',
30
- 'button_font_color' => '',
31
  'button_font_family' => '',
32
- 'button_font_size' => '',
33
  'button_font_weight' => '',
34
  'block_padding_left' => 15,
35
  'block_padding_right' => 15,
@@ -116,45 +116,47 @@ Newsletter::instance()->switch_language($current_language);
116
 
117
  remove_all_filters('excerpt_more');
118
 
119
- $image_placeholder_url = plugins_url( 'newsletter' ) . '/emails/blocks/posts/images/blank-240x160.png';
120
 
121
  $excerpt_length = $options['excerpt_length'];
122
 
123
- $show_image = ! empty( $options['show_image'] );
124
- $show_date = ! empty( $options['show_date'] );
125
- $show_author = ! empty( $options['show_author'] );
126
 
127
- $title_font_family = empty( $options['title_font_family'] ) ? $global_title_font_family : $options['title_font_family'];
128
- $title_font_size = empty( $options['title_font_size'] ) ? round($global_title_font_size*0.8) : $options['title_font_size'];
129
- $title_font_color = empty( $options['title_font_color'] ) ? $global_title_font_color : $options['title_font_color'];
130
- $title_font_weight = empty( $options['title_font_weight'] ) ? $global_title_font_weight : $options['title_font_weight'];
131
 
132
- $text_font_family = empty( $options['font_family'] ) ? $global_text_font_family : $options['font_family'];
133
- $text_font_size = empty( $options['font_size'] ) ? round($global_text_font_size*0.9) : $options['font_size'];
134
- $text_font_color = empty( $options['font_color'] ) ? $global_text_font_color : $options['font_color'];
135
- $text_font_weight = empty( $options['font_weight'] ) ? $global_text_font_weight : $options['font_weight'];
 
 
136
 
137
  $button_options = $options;
138
- $button_options['button_font_family'] = empty( $options['button_font_family'] ) ? $global_button_font_family : $options['button_font_family'];
139
- $button_options['button_font_size'] = empty( $options['button_font_size'] ) ? $global_button_font_size : $options['button_font_size'];
140
- $button_options['button_font_color'] = empty( $options['button_font_color'] ) ? $global_button_font_color : $options['button_font_color'];
141
- $button_options['button_font_weight'] = empty( $options['button_font_weight'] ) ? $global_button_font_weight : $options['button_font_weight'];
142
- $button_options['button_background'] = empty( $options['button_background'] ) ? $global_button_background_color : $options['button_background'];
143
 
144
  $show_read_more_button = (bool) $options['show_read_more_button'];
145
 
146
- Newsletter::instance()->switch_language( $options['language'] );
147
 
148
- if ( $options['layout'] == 'one' ) {
149
- include __DIR__ . '/layout-one.php';
150
- } else if ( $options['layout'] == 'one-2' ) {
151
- include __DIR__ . '/layout-one-2.php';
152
- } else if ( $options['layout'] == 'two' ) {
153
- include __DIR__ . '/layout-two.php';
154
- } else if ( $options['layout'] == 'full-post' ) {
155
- include __DIR__ . '/layout-full-post.php';
156
  } else {
157
- include __DIR__ . '/layout-big-image.php';
158
  }
159
 
160
 
26
  'layout' => 'one',
27
  'language' => '',
28
  'button_label' => __('Read more...', 'newsletter'),
29
+ 'button_background' => '',
30
+ 'button_font_color' => '',
31
  'button_font_family' => '',
32
+ 'button_font_size' => '',
33
  'button_font_weight' => '',
34
  'block_padding_left' => 15,
35
  'block_padding_right' => 15,
116
 
117
  remove_all_filters('excerpt_more');
118
 
119
+ $image_placeholder_url = plugins_url('newsletter') . '/emails/blocks/posts/images/blank-240x160.png';
120
 
121
  $excerpt_length = $options['excerpt_length'];
122
 
123
+ $show_image = !empty($options['show_image']);
124
+ $show_date = !empty($options['show_date']);
125
+ $show_author = !empty($options['show_author']);
126
 
127
+ $title_font_family = empty($options['title_font_family']) ? $global_title_font_family : $options['title_font_family'];
128
+ $title_font_size = empty($options['title_font_size']) ? round($global_title_font_size * 0.8) : $options['title_font_size'];
129
+ $title_font_color = empty($options['title_font_color']) ? $global_title_font_color : $options['title_font_color'];
130
+ $title_font_weight = empty($options['title_font_weight']) ? $global_title_font_weight : $options['title_font_weight'];
131
 
132
+ $text_font_family = empty($options['font_family']) ? $global_text_font_family : $options['font_family'];
133
+ $text_font_size = empty($options['font_size']) ? round($global_text_font_size * 0.9) : $options['font_size'];
134
+ $text_font_color = empty($options['font_color']) ? $global_text_font_color : $options['font_color'];
135
+ $text_font_weight = empty($options['font_weight']) ? $global_text_font_weight : $options['font_weight'];
136
+
137
+ $meta_style = TNP_Composer::get_style($options, '', $composer, 'text', ['scale' => 0.9]);
138
 
139
  $button_options = $options;
140
+ $button_options['button_font_family'] = empty($options['button_font_family']) ? $global_button_font_family : $options['button_font_family'];
141
+ $button_options['button_font_size'] = empty($options['button_font_size']) ? $global_button_font_size : $options['button_font_size'];
142
+ $button_options['button_font_color'] = empty($options['button_font_color']) ? $global_button_font_color : $options['button_font_color'];
143
+ $button_options['button_font_weight'] = empty($options['button_font_weight']) ? $global_button_font_weight : $options['button_font_weight'];
144
+ $button_options['button_background'] = empty($options['button_background']) ? $global_button_background_color : $options['button_background'];
145
 
146
  $show_read_more_button = (bool) $options['show_read_more_button'];
147
 
148
+ Newsletter::instance()->switch_language($options['language']);
149
 
150
+ if ($options['layout'] == 'one') {
151
+ include __DIR__ . '/layout-one.php';
152
+ } else if ($options['layout'] == 'one-2') {
153
+ include __DIR__ . '/layout-one-2.php';
154
+ } else if ($options['layout'] == 'two') {
155
+ include __DIR__ . '/layout-two.php';
156
+ } else if ($options['layout'] == 'full-post') {
157
+ include __DIR__ . '/layout-full-post.php';
158
  } else {
159
+ include __DIR__ . '/layout-big-image.php';
160
  }
161
 
162
 
emails/blocks/posts/layout-big-image.php CHANGED
@@ -1,34 +1,27 @@
1
  <?php
2
  $size = ['width' => 600, 'height' => 0];
 
 
 
3
  ?>
4
  <style>
5
  .title {
6
- font-family: <?php echo $title_font_family ?>;
7
- font-size: <?php echo $title_font_size ?>px;
8
- font-weight: <?php echo $title_font_weight ?>;
9
- color: <?php echo $title_font_color ?>;
10
- line-height: normal;
11
  padding: 0 0 5px 0;
12
  }
13
 
14
  .excerpt {
15
- font-family: <?php echo $text_font_family ?>;
16
- font-size: <?php echo $text_font_size ?>px;
17
- font-weight: <?php echo $text_font_weight ?>;
18
- color: <?php echo $text_font_color ?>;
19
- line-height: 1.5em;
20
  padding: 10px 0 15px 0;
21
  }
22
 
23
  .meta {
24
- font-family: <?php echo $text_font_family ?>;
25
- color: <?php echo $text_font_color ?>;
26
- font-size: <?php echo round($text_font_size * 0.8) ?>px;
27
- font-weight: normal;
28
  padding: 0 0 5px 0;
29
- }
30
- .button {
31
- padding-bottom: 20px;
32
  }
33
  </style>
34
 
@@ -44,6 +37,7 @@ $size = ['width' => 600, 'height' => 0];
44
  $media = tnp_composer_block_posts_get_media($post, $size);
45
 
46
  if ($media) {
 
47
  $media->link = $url;
48
  }
49
  }
@@ -77,15 +71,8 @@ $size = ['width' => 600, 'height' => 0];
77
  <tr>
78
  <td>
79
 
80
- <!-- ARTICLE -->
81
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
82
- <?php if ($meta) { ?>
83
- <tr>
84
- <td align="<?php echo $align_left ?>" inline-class="meta">
85
- <?php echo esc_html(implode(' - ', $meta)) ?>
86
- </td>
87
- </tr>
88
- <?php } ?>
89
 
90
  <tr>
91
  <td align="<?php echo $align_left ?>" inline-class="title" class="tnpc-row-edit tnpc-inline-editable"
@@ -98,6 +85,14 @@ $size = ['width' => 600, 'height' => 0];
98
  </td>
99
  </tr>
100
 
 
 
 
 
 
 
 
 
101
  <?php if ($excerpt_length) { ?>
102
  <tr>
103
  <td align="<?php echo $align_left ?>" inline-class="excerpt" class="tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $post->ID ?>" dir="<?php echo $dir ?>">
@@ -117,6 +112,9 @@ $size = ['width' => 600, 'height' => 0];
117
  </td>
118
  </tr>
119
  <?php } ?>
 
 
 
120
  </table>
121
 
122
  </td>
1
  <?php
2
  $size = ['width' => 600, 'height' => 0];
3
+ $content_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
+ $title_style = TNP_Composer::get_title_style($options, 'title', $composer);
5
+ $text_style = TNP_Composer::get_style($options, '', $composer, 'text');
6
  ?>
7
  <style>
8
  .title {
9
+ <?php echo $title_style->echo_css() ?>
10
+ line-height: normal!important;
 
 
 
11
  padding: 0 0 5px 0;
12
  }
13
 
14
  .excerpt {
15
+ <?php echo $text_style->echo_css() ?>
16
+ line-height: 1.5em!important;
 
 
 
17
  padding: 10px 0 15px 0;
18
  }
19
 
20
  .meta {
21
+ <?php echo $text_style->echo_css(0.9) ?>
22
+ line-height: normal!important;
 
 
23
  padding: 0 0 5px 0;
24
+ font-style: italic;
 
 
25
  }
26
  </style>
27
 
37
  $media = tnp_composer_block_posts_get_media($post, $size);
38
 
39
  if ($media) {
40
+ $media->set_width($content_width);
41
  $media->link = $url;
42
  }
43
  }
71
  <tr>
72
  <td>
73
 
 
74
  <table border="0" cellspacing="0" cellpadding="0" width="100%">
75
+
 
 
 
 
 
 
76
 
77
  <tr>
78
  <td align="<?php echo $align_left ?>" inline-class="title" class="tnpc-row-edit tnpc-inline-editable"
85
  </td>
86
  </tr>
87
 
88
+ <?php if ($meta) { ?>
89
+ <tr>
90
+ <td align="<?php echo $align_left ?>" inline-class="meta">
91
+ <?php echo esc_html(implode(' - ', $meta)) ?>
92
+ </td>
93
+ </tr>
94
+ <?php } ?>
95
+
96
  <?php if ($excerpt_length) { ?>
97
  <tr>
98
  <td align="<?php echo $align_left ?>" inline-class="excerpt" class="tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $post->ID ?>" dir="<?php echo $dir ?>">
112
  </td>
113
  </tr>
114
  <?php } ?>
115
+ <tr>
116
+ <td style="padding: 10px">&nbsp;</td>
117
+ </tr>
118
  </table>
119
 
120
  </td>
emails/blocks/posts/layout-full-post.php CHANGED
@@ -1,110 +1,106 @@
1
- <?php
2
- $size = ['width' => 600, 'height' => 0];
3
- ?>
4
-
5
- <style>
6
- .title {
7
- font-family: <?php echo $title_font_family ?>;
8
- font-size: <?php echo $title_font_size ?>px;
9
- font-weight: <?php echo $title_font_weight ?>;
10
- color: <?php echo $title_font_color ?>;
11
- line-height: normal;
12
- margin: 0;
13
- padding-bottom: 20px;
14
- }
15
-
16
- .paragraph {
17
- font-family: <?php echo $text_font_family ?>;
18
- font-size: <?php echo $text_font_size ?>px;
19
- font-weight: <?php echo $text_font_weight ?>;
20
- color: <?php echo $text_font_color ?>;
21
- line-height: 1.5em;
22
- text-align: left;
23
- }
24
-
25
- .meta {
26
- font-family: <?php echo $text_font_family ?>;
27
- font-size: <?php echo round($text_font_size * 0.9) ?>px;
28
- font-weight: <?php echo $text_font_weight ?>;
29
- color: <?php echo $text_font_color ?>;
30
- line-height: normal;
31
- padding-bottom: 10px;
32
- text-align: center;
33
- }
34
-
35
- .button {
36
- padding: 15px 0;
37
- }
38
-
39
- </style>
40
-
41
- <?php foreach ($posts as $post) { ?>
42
-
43
- <?php
44
- $url = tnp_post_permalink($post);
45
-
46
- $media = null;
47
- if ($show_image) {
48
- $media = tnp_composer_block_posts_get_media($post, $size);
49
- if ($media) {
50
- $media->link = $url;
51
- }
52
- }
53
-
54
- $meta = [];
55
-
56
- if ($show_date) {
57
- $meta[] = tnp_post_date($post);
58
- }
59
-
60
- if ($show_author) {
61
- $author_object = get_user_by('id', $post->post_author);
62
- if ($author_object) {
63
- $meta[] = $author_object->display_name;
64
- }
65
- }
66
-
67
- $button_options['button_url'] = $url;
68
- ?>
69
-
70
-
71
- <table border="0" cellpadding="0" align="center" cellspacing="0" width="100%" class="responsive">
72
- <tr>
73
- <td inline-class="title">
74
- <?php echo $post->post_title ?>
75
- </td>
76
- </tr>
77
-
78
- <?php if ($meta) { ?>
79
- <tr>
80
- <td inline-class="meta">
81
- <?php echo esc_html(implode(' - ', $meta)) ?>
82
- </td>
83
- </tr>
84
- <?php } ?>
85
-
86
- <?php if ($media) { ?>
87
- <tr>
88
- <td align="center">
89
- <?php echo TNP_Composer::image($media) ?>
90
- </td>
91
- </tr>
92
- <?php } ?>
93
-
94
- <tr>
95
- <td>
96
- <?php echo TNP_Composer::post_content($post) ?>
97
- </td>
98
- </tr>
99
-
100
- <?php if ($show_read_more_button) { ?>
101
- <tr>
102
- <td align="center" inline-class="button">
103
- <?php echo TNP_Composer::button($button_options) ?>
104
- </td>
105
- </tr>
106
- <?php } ?>
107
- </table>
108
- <br><br>
109
-
110
- <?php } ?>
1
+ <?php
2
+ $size = ['width' => 600, 'height' => 0];
3
+ $content_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
+ $title_style = TNP_Composer::get_title_style($options, 'title', $composer);
5
+ $text_style = TNP_Composer::get_text_style($options, '', $composer);
6
+ ?>
7
+
8
+ <style>
9
+ .title {
10
+ <?php $title_style->echo_css() ?>
11
+ line-height: normal;
12
+ margin: 0;
13
+ padding-bottom: 20px;
14
+ }
15
+
16
+ .paragraph {
17
+ <?php $text_style->echo_css() ?>
18
+ line-height: 1.5em!important;
19
+ text-align: left;
20
+ }
21
+
22
+ .meta {
23
+ <?php $text_style->echo_css(0.9) ?>
24
+ line-height: normal!important;
25
+ padding-bottom: 10px;
26
+ text-align: center;
27
+ font-style: italic;
28
+ }
29
+
30
+ .button {
31
+ padding: 15px 0;
32
+ }
33
+
34
+ </style>
35
+
36
+ <?php foreach ($posts as $post) { ?>
37
+
38
+ <?php
39
+ $url = tnp_post_permalink($post);
40
+
41
+ $media = null;
42
+ if ($show_image) {
43
+ $media = tnp_composer_block_posts_get_media($post, $size);
44
+ if ($media) {
45
+ $media->set_width($content_width);
46
+ $media->link = $url;
47
+ }
48
+ }
49
+
50
+ $meta = [];
51
+
52
+ if ($show_date) {
53
+ $meta[] = tnp_post_date($post);
54
+ }
55
+
56
+ if ($show_author) {
57
+ $author_object = get_user_by('id', $post->post_author);
58
+ if ($author_object) {
59
+ $meta[] = $author_object->display_name;
60
+ }
61
+ }
62
+
63
+ $button_options['button_url'] = $url;
64
+ ?>
65
+
66
+
67
+ <table border="0" cellpadding="0" align="center" cellspacing="0" width="100%" class="responsive">
68
+ <tr>
69
+ <td inline-class="title">
70
+ <?php echo $post->post_title ?>
71
+ </td>
72
+ </tr>
73
+
74
+ <?php if ($meta) { ?>
75
+ <tr>
76
+ <td inline-class="meta">
77
+ <?php echo esc_html(implode(' - ', $meta)) ?>
78
+ </td>
79
+ </tr>
80
+ <?php } ?>
81
+
82
+ <?php if ($media) { ?>
83
+ <tr>
84
+ <td align="center">
85
+ <?php echo TNP_Composer::image($media) ?>
86
+ </td>
87
+ </tr>
88
+ <?php } ?>
89
+
90
+ <tr>
91
+ <td>
92
+ <?php echo TNP_Composer::post_content($post) ?>
93
+ </td>
94
+ </tr>
95
+
96
+ <?php if ($show_read_more_button) { ?>
97
+ <tr>
98
+ <td align="center" inline-class="button">
99
+ <?php echo TNP_Composer::button($button_options) ?>
100
+ </td>
101
+ </tr>
102
+ <?php } ?>
103
+ </table>
104
+ <br><br>
105
+
106
+ <?php } ?>
 
 
 
 
emails/blocks/posts/layout-one-2.php CHANGED
@@ -2,34 +2,32 @@
2
  $size = ['width' => 600, 'height' => 0];
3
  $total_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
  $column_width = $total_width / 2 - 10;
 
 
 
5
  ?>
6
  <style>
7
  .title {
8
- font-family: <?php echo $title_font_family ?>;
9
- font-size: <?php echo $title_font_size ?>px;
10
- font-weight: <?php echo $title_font_weight ?>;
11
- color: <?php echo $title_font_color ?>;
12
  line-height: normal;
13
  padding: 0 0 10px 0;
14
  }
15
 
16
  .excerpt {
17
- font-family: <?php echo $text_font_family ?>;
18
- font-size: <?php echo $text_font_size ?>px;
19
- font-weight: <?php echo $text_font_weight ?>;
20
- color: <?php echo $text_font_color ?>;
21
  line-height: 1.5em;
22
  padding: 0 0 15px 0;
23
  text-decoration: none;
24
  }
25
 
26
  .meta {
27
- font-family: <?php echo $text_font_family ?>;
28
- color: <?php echo $text_font_color ?>;
29
- font-size: <?php echo round($text_font_size * 0.9) ?>px;
30
- font-weight: normal;
31
  padding: 0 0 5px 0;
32
  line-height: normal !important;
 
33
  }
34
  .button {
35
  padding: 15px 0;
@@ -66,6 +64,7 @@ $column_width = $total_width / 2 - 10;
66
  }
67
 
68
  $button_options['button_url'] = $url;
 
69
  ?>
70
 
71
  <tr>
@@ -85,8 +84,8 @@ $column_width = $total_width / 2 - 10;
85
  <?php if ($media) { ?>
86
  <table width="<?php echo $column_width ?>" cellpadding="0" cellspacing="0" border="0" align="left" style="margin: 0;" class="responsive">
87
  <tr>
88
- <td>
89
- <?php echo TNP_Composer::image($media) ?>
90
  </td>
91
  </tr>
92
  </table>
2
  $size = ['width' => 600, 'height' => 0];
3
  $total_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
  $column_width = $total_width / 2 - 10;
5
+
6
+ $title_style = TNP_Composer::get_style($options, 'title', $composer, 'title');
7
+ $text_style = TNP_Composer::get_style($options, '', $composer, 'text');
8
  ?>
9
  <style>
10
  .title {
11
+ <?php $title_style->echo_css() ?>
 
 
 
12
  line-height: normal;
13
  padding: 0 0 10px 0;
14
  }
15
 
16
  .excerpt {
17
+ <?php $text_style->echo_css() ?>
 
 
 
18
  line-height: 1.5em;
19
  padding: 0 0 15px 0;
20
  text-decoration: none;
21
  }
22
 
23
  .meta {
24
+ font-family: <?php echo $text_style->font_family ?>;
25
+ color: <?php echo $text_style->font_color ?>;
26
+ font-size: <?php echo round($text_style->font_size * 0.9) ?>px;
27
+ font-weight: <?php echo $text_style->font_weight ?>;
28
  padding: 0 0 5px 0;
29
  line-height: normal !important;
30
+ font-style: italic;
31
  }
32
  .button {
33
  padding: 15px 0;
64
  }
65
 
66
  $button_options['button_url'] = $url;
67
+ $button_options['button_align'] = 'left';
68
  ?>
69
 
70
  <tr>
84
  <?php if ($media) { ?>
85
  <table width="<?php echo $column_width ?>" cellpadding="0" cellspacing="0" border="0" align="left" style="margin: 0;" class="responsive">
86
  <tr>
87
+ <td class="pb-1">
88
+ <?php echo TNP_Composer::image($media, ['class' => 'fluid']) ?>
89
  </td>
90
  </tr>
91
  </table>
emails/blocks/posts/layout-one.php CHANGED
@@ -2,31 +2,29 @@
2
  $size = ['width' => 600, 'height' => 0];
3
  $total_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
  $column_width = $total_width / 2 - 10;
 
 
 
5
  ?>
6
  <style>
7
  .title {
8
- font-family: <?php echo $title_font_family ?>;
9
- font-size: <?php echo round($title_font_size * 0.9) ?>px;
10
- font-weight: <?php echo $title_font_weight ?>;
11
- color: <?php echo $title_font_color ?>;
12
  line-height: normal !important;
13
  padding: 0 0 5px 0;
14
  }
15
 
16
  .excerpt {
17
- font-family: <?php echo $text_font_family ?>;
18
- font-size: <?php echo $text_font_size ?>px;
19
- font-weight: <?php echo $text_font_weight ?>;
20
- color: <?php echo $text_font_color ?>;
21
- line-height: 1.5em;
22
  padding: 10px 0 15px 0;
23
  }
24
 
25
  .meta {
26
- font-family: <?php echo $text_font_family ?>;
27
- color: <?php echo $text_font_color ?>;
28
- font-size: <?php echo round($text_font_size * 0.9) ?>px;
29
- font-weight: normal;
 
30
  padding: 0 0 10px 0;
31
  line-height: normal !important;
32
  }
@@ -65,6 +63,7 @@ $column_width = $total_width / 2 - 10;
65
  }
66
 
67
  $button_options['button_url'] = $url;
 
68
  ?>
69
 
70
  <tr>
@@ -74,7 +73,7 @@ $column_width = $total_width / 2 - 10;
74
  <table width="<?php echo $column_width ?>" cellpadding="0" cellspacing="0" border="0" align="left" class="responsive">
75
  <tr>
76
  <td style="padding-bottom: 20px;">
77
- <?php echo TNP_Composer::image($media) ?>
78
  </td>
79
  </tr>
80
  </table>
@@ -92,13 +91,15 @@ $column_width = $total_width / 2 - 10;
92
  <?php } ?>
93
 
94
  <tr>
95
- <td align="<?php echo $align_left ?>" inline-class="title" class="tnpc-row-edit tnpc-inline-editable"
96
  data-type="title" data-id="<?php echo $post->ID ?>" dir="<?php echo $dir ?>">
 
97
  <?php
98
  echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $post->ID) ?
99
  TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $post->ID) :
100
  tnp_post_title($post)
101
  ?>
 
102
  </td>
103
  </tr>
104
 
2
  $size = ['width' => 600, 'height' => 0];
3
  $total_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
  $column_width = $total_width / 2 - 10;
5
+
6
+ $title_style = TNP_Composer::get_style($options, 'title', $composer, 'title', ['scale' => .8]);
7
+ $text_style = TNP_Composer::get_style($options, '', $composer, 'text');
8
  ?>
9
  <style>
10
  .title {
11
+ <?php $title_style->echo_css()?>
 
 
 
12
  line-height: normal !important;
13
  padding: 0 0 5px 0;
14
  }
15
 
16
  .excerpt {
17
+ <?php $text_style->echo_css()?>
18
+ line-height: 1.5em !important;
 
 
 
19
  padding: 10px 0 15px 0;
20
  }
21
 
22
  .meta {
23
+ font-family: <?php echo $text_style->font_family ?>;
24
+ color: <?php echo $text_style->font_color ?>;
25
+ font-size: <?php echo round($text_style->font_size * 0.9) ?>px;
26
+ font-weight: <?php echo $text_style->font_weight ?>;
27
+ font-style: italic;
28
  padding: 0 0 10px 0;
29
  line-height: normal !important;
30
  }
63
  }
64
 
65
  $button_options['button_url'] = $url;
66
+ $button_options['button_align'] = 'left';
67
  ?>
68
 
69
  <tr>
73
  <table width="<?php echo $column_width ?>" cellpadding="0" cellspacing="0" border="0" align="left" class="responsive">
74
  <tr>
75
  <td style="padding-bottom: 20px;">
76
+ <?php echo TNP_Composer::image($media, ['class' => 'fluid']) ?>
77
  </td>
78
  </tr>
79
  </table>
91
  <?php } ?>
92
 
93
  <tr>
94
+ <td align="<?php echo $align_left ?>" inline-class="title" class="title tnpc-row-edit tnpc-inline-editable"
95
  data-type="title" data-id="<?php echo $post->ID ?>" dir="<?php echo $dir ?>">
96
+ <span>
97
  <?php
98
  echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $post->ID) ?
99
  TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $post->ID) :
100
  tnp_post_title($post)
101
  ?>
102
+ </span>
103
  </td>
104
  </tr>
105
 
emails/blocks/posts/layout-two.php CHANGED
@@ -1,204 +1,208 @@
1
- <?php
2
- $size = array('width' => 240, 'height' => 160, "crop" => true);
3
- $total_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
- $column_width = $total_width / 2 - 20;
5
- ?>
6
- <style>
7
- .title {
8
- font-family: <?php echo $title_font_family ?>;
9
- font-size: <?php echo $title_font_size ?>px;
10
- font-weight: <?php echo $title_font_weight ?>;
11
- color: <?php echo $title_font_color ?>;
12
- line-height: 1.3em;
13
- padding: 15px 0 0 0;
14
- }
15
-
16
- .excerpt {
17
- font-family: <?php echo $text_font_family ?>;
18
- font-size: <?php echo $text_font_size ?>px;
19
- font-weight: <?php echo $text_font_weight ?>;
20
- color: <?php echo $text_font_color ?>;
21
- line-height: 1.4em;
22
- padding: 5px 0 0 0;
23
- }
24
-
25
- .meta {
26
- font-family: <?php echo $text_font_family ?>;
27
- color: <?php echo $text_font_color ?>;
28
- font-size: <?php echo round($text_font_size * 0.9) ?>px;
29
- font-weight: normal;
30
- padding: 10px 0 0 0;
31
- font-style: italic;
32
- }
33
- .button {
34
- padding: 15px 0;
35
- }
36
- .column-left {
37
- padding-right: 10px;
38
- padding-bottom: 20px;
39
- }
40
- .column-right {
41
- padding-left: 10px;
42
- padding-bottom: 20px;
43
- }
44
-
45
- </style>
46
-
47
- <table cellspacing="0" cellpadding="0" border="0" width="100%">
48
-
49
- <?php foreach (array_chunk($posts, 2) AS $row) { ?>
50
- <?php
51
- $media = null;
52
- if ($show_image) {
53
- $media = tnp_composer_block_posts_get_media($row[0], $size, $image_placeholder_url);
54
- $media->link = tnp_post_permalink($row[0]);
55
- $media->set_width($column_width);
56
- }
57
-
58
- $meta = [];
59
-
60
- if ($show_date) {
61
- $meta[] = tnp_post_date($row[0]);
62
- }
63
-
64
- if ($show_author) {
65
- $author_object = get_user_by('id', $row[0]->post_author);
66
- if ($author_object) {
67
- $meta[] = $author_object->display_name;
68
- }
69
- }
70
-
71
- $button_options['button_url'] = tnp_post_permalink($row[0]);
72
- ?>
73
- <tr>
74
- <td inline-class="column-left" width="50%" valign="top" class="responsive">
75
-
76
-
77
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
78
- <?php if ($media) { ?>
79
- <tr>
80
- <td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
81
- <?php echo TNP_Composer::image($media) ?>
82
- </td>
83
- </tr>
84
- <?php } ?>
85
- <tr>
86
- <td align="center" inline-class="title" class="tnpc-row-edit tnpc-inline-editable" data-type="title" data-id="<?php echo $row[0]->ID ?>">
87
- <?php
88
- echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $row[0]->ID) ?
89
- TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $row[0]->ID) :
90
- tnp_post_title($row[0])
91
- ?>
92
- </td>
93
- </tr>
94
- <?php if ($meta) { ?>
95
- <tr>
96
- <td inline-class="meta">
97
- <?php echo esc_html(implode(' - ', $meta)) ?>
98
- </td>
99
- </tr>
100
- <?php } ?>
101
-
102
-
103
- <?php if ($excerpt_length) { ?>
104
- <tr>
105
- <td align="center" inline-class="excerpt" class="tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $row[0]->ID ?>">
106
- <?php
107
- echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'text', $row[0]->ID) ?
108
- TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'text', $row[0]->ID) :
109
- tnp_post_excerpt($row[0], $excerpt_length)
110
- ?>
111
- </td>
112
- </tr>
113
- <?php } ?>
114
-
115
- <?php if ($show_read_more_button) { ?>
116
- <tr>
117
- <td align="center" inline-class="button">
118
- <?php echo TNP_Composer::button($button_options) ?>
119
- </td>
120
- </tr>
121
- <?php } ?>
122
- </table>
123
- </td>
124
-
125
- <td inline-class="column-right" width="50%" valign="top" class="responsive">
126
- <?php
127
- if (isset($row[1])) {
128
-
129
- $media = null;
130
- if ($show_image) {
131
- $media = tnp_composer_block_posts_get_media($row[1], $size, $image_placeholder_url);
132
- $media->link = tnp_post_permalink($row[1]);
133
- $media->set_width($column_width);
134
- }
135
-
136
- $meta = [];
137
-
138
- if ($show_date) {
139
- $meta[] = tnp_post_date($row[1]);
140
- }
141
-
142
- if ($show_author) {
143
- $author_object = get_user_by('id', $row[1]->post_author);
144
- if ($author_object) {
145
- $meta[] = $author_object->display_name;
146
- }
147
- }
148
-
149
- $button_options['button_url'] = tnp_post_permalink($row[1]);
150
- ?>
151
-
152
-
153
- <table cellpadding="0" cellspacing="0" border="0" width="100%">
154
- <?php if ($media) { ?>
155
- <tr>
156
- <td align="center" valign="middle" class="tnpc-row-edit" data-type="image">
157
- <?php echo TNP_Composer::image($media) ?>
158
- </td>
159
- </tr>
160
- <?php } ?>
161
- <tr>
162
- <td align="center" inline-class="title" class="tnpc-row-edit tnpc-inline-editable" data-type="title" data-id="<?php echo $row[1]->ID ?>">
163
- <?php
164
- echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $row[1]->ID) ?
165
- TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $row[1]->ID) :
166
- tnp_post_title($row[1])
167
- ?>
168
- </td>
169
- </tr>
170
- <?php if ($meta) { ?>
171
- <tr>
172
- <td inline-class="meta">
173
- <?php echo esc_html(implode(' - ', $meta)) ?>
174
- </td>
175
- </tr>
176
- <?php } ?>
177
-
178
- <tr>
179
- <td align="center" inline-class="excerpt" class="tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $row[1]->ID ?>">
180
- <?php
181
- echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'text', $row[1]->ID) ?
182
- TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'text', $row[1]->ID) :
183
- tnp_post_excerpt($row[1], $excerpt_length)
184
- ?>
185
- </td>
186
- </tr>
187
- <?php if ($show_read_more_button) { ?>
188
- <tr>
189
- <td align="center" inline-class="button">
190
- <?php echo TNP_Composer::button($button_options) ?>
191
- </td>
192
- </tr>
193
- <?php } ?>
194
- </table>
195
- <?php } ?>
196
-
197
-
198
- </td>
199
- </tr>
200
-
201
- <?php } ?>
202
-
203
- </table>
204
-
 
 
 
 
1
+ <?php
2
+ $size = array('width' => 600, 'height' => 400, "crop" => true);
3
+ $total_width = 600 - $options['block_padding_left'] - $options['block_padding_right'];
4
+ $column_width = $total_width / 2 - 20;
5
+
6
+ $title_style = TNP_Composer::get_style($options, 'title', $composer, 'title', ['scale' => .8]);
7
+ $text_style = TNP_Composer::get_style($options, '', $composer, 'text');
8
+ ?>
9
+ <style>
10
+ .title {
11
+ font-family: <?php echo $title_style->font_family ?>;
12
+ font-size: <?php echo $title_style->font_size ?>px;
13
+ font-weight: <?php echo $title_style->font_weight ?>;
14
+ color: <?php echo $title_style->font_color ?>;
15
+ line-height: 1.3em;
16
+ padding: 15px 0 0 0;
17
+ }
18
+
19
+ .excerpt {
20
+ font-family: <?php echo $text_style->font_family ?>;
21
+ font-size: <?php echo $text_style->font_size ?>px;
22
+ font-weight: <?php echo $text_style->font_weight ?>;
23
+ color: <?php echo $text_style->font_color ?>;
24
+ line-height: 1.4em;
25
+ padding: 5px 0 0 0;
26
+ }
27
+
28
+ .meta {
29
+ font-family: <?php echo $text_style->font_family ?>;
30
+ color: <?php echo $text_style->font_color ?>;
31
+ font-size: <?php echo round($text_style->font_size * 0.9) ?>px;
32
+ font-weight: <?php echo $text_style->font_weight ?>;
33
+ padding: 10px 0 0 0;
34
+ font-style: italic;
35
+ line-height: normal !important;
36
+ }
37
+ .button {
38
+ padding: 15px 0;
39
+ }
40
+ .column-left {
41
+ padding-right: 10px;
42
+ padding-bottom: 20px;
43
+ }
44
+ .column-right {
45
+ padding-left: 10px;
46
+ padding-bottom: 20px;
47
+ }
48
+
49
+ </style>
50
+
51
+ <table cellspacing="0" cellpadding="0" border="0" width="100%">
52
+
53
+ <?php foreach (array_chunk($posts, 2) AS $row) { ?>
54
+ <?php
55
+ $media = null;
56
+ if ($show_image) {
57
+ $media = tnp_composer_block_posts_get_media($row[0], $size, $image_placeholder_url);
58
+ $media->link = tnp_post_permalink($row[0]);
59
+ $media->set_width($column_width);
60
+ }
61
+
62
+ $meta = [];
63
+
64
+ if ($show_date) {
65
+ $meta[] = tnp_post_date($row[0]);
66
+ }
67
+
68
+ if ($show_author) {
69
+ $author_object = get_user_by('id', $row[0]->post_author);
70
+ if ($author_object) {
71
+ $meta[] = $author_object->display_name;
72
+ }
73
+ }
74
+
75
+ $button_options['button_url'] = tnp_post_permalink($row[0]);
76
+ ?>
77
+ <tr>
78
+ <td inline-class="column-left" width="50%" valign="top" class="responsive">
79
+
80
+
81
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
82
+ <?php if ($media) { ?>
83
+ <tr>
84
+ <td align="center" valign="middle">
85
+ <?php echo TNP_Composer::image($media, ['class' => 'fluid']) ?>
86
+ </td>
87
+ </tr>
88
+ <?php } ?>
89
+ <tr>
90
+ <td align="center" inline-class="title" class="title tnpc-row-edit tnpc-inline-editable" data-type="title" data-id="<?php echo $row[0]->ID ?>">
91
+ <?php
92
+ echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $row[0]->ID) ?
93
+ TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $row[0]->ID) :
94
+ tnp_post_title($row[0])
95
+ ?>
96
+ </td>
97
+ </tr>
98
+ <?php if ($meta) { ?>
99
+ <tr>
100
+ <td inline-class="meta" class="meta">
101
+ <?php echo esc_html(implode(' - ', $meta)) ?>
102
+ </td>
103
+ </tr>
104
+ <?php } ?>
105
+
106
+
107
+ <?php if ($excerpt_length) { ?>
108
+ <tr>
109
+ <td align="center" inline-class="excerpt" class="title tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $row[0]->ID ?>">
110
+ <?php
111
+ echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'text', $row[0]->ID) ?
112
+ TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'text', $row[0]->ID) :
113
+ tnp_post_excerpt($row[0], $excerpt_length)
114
+ ?>
115
+ </td>
116
+ </tr>
117
+ <?php } ?>
118
+
119
+ <?php if ($show_read_more_button) { ?>
120
+ <tr>
121
+ <td align="center" inline-class="button">
122
+ <?php echo TNP_Composer::button($button_options) ?>
123
+ </td>
124
+ </tr>
125
+ <?php } ?>
126
+ </table>
127
+ </td>
128
+
129
+ <td inline-class="column-right" width="50%" valign="top" class="responsive">
130
+ <?php
131
+ if (isset($row[1])) {
132
+
133
+ $media = null;
134
+ if ($show_image) {
135
+ $media = tnp_composer_block_posts_get_media($row[1], $size, $image_placeholder_url);
136
+ $media->link = tnp_post_permalink($row[1]);
137
+ $media->set_width($column_width);
138
+ }
139
+
140
+ $meta = [];
141
+
142
+ if ($show_date) {
143
+ $meta[] = tnp_post_date($row[1]);
144
+ }
145
+
146
+ if ($show_author) {
147
+ $author_object = get_user_by('id', $row[1]->post_author);
148
+ if ($author_object) {
149
+ $meta[] = $author_object->display_name;
150
+ }
151
+ }
152
+
153
+ $button_options['button_url'] = tnp_post_permalink($row[1]);
154
+ ?>
155
+
156
+
157
+ <table cellpadding="0" cellspacing="0" border="0" width="100%">
158
+ <?php if ($media) { ?>
159
+ <tr>
160
+ <td align="center" valign="middle">
161
+ <?php echo TNP_Composer::image($media, ['class' => 'fluid']) ?>
162
+ </td>
163
+ </tr>
164
+ <?php } ?>
165
+ <tr>
166
+ <td align="center" inline-class="title" class="tnpc-row-edit tnpc-inline-editable" data-type="title" data-id="<?php echo $row[1]->ID ?>">
167
+ <?php
168
+ echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'title', $row[1]->ID) ?
169
+ TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'title', $row[1]->ID) :
170
+ tnp_post_title($row[1])
171
+ ?>
172
+ </td>
173
+ </tr>
174
+ <?php if ($meta) { ?>
175
+ <tr>
176
+ <td inline-class="meta">
177
+ <?php echo esc_html(implode(' - ', $meta)) ?>
178
+ </td>
179
+ </tr>
180
+ <?php } ?>
181
+
182
+ <tr>
183
+ <td align="center" inline-class="excerpt" class="tnpc-row-edit tnpc-inline-editable" data-type="text" data-id="<?php echo $row[1]->ID ?>">
184
+ <?php
185
+ echo TNP_Composer::is_post_field_edited_inline($options['inline_edits'], 'text', $row[1]->ID) ?
186
+ TNP_Composer::get_edited_inline_post_field($options['inline_edits'], 'text', $row[1]->ID) :
187
+ tnp_post_excerpt($row[1], $excerpt_length)
188
+ ?>
189
+ </td>
190
+ </tr>
191
+ <?php if ($show_read_more_button) { ?>
192
+ <tr>
193
+ <td align="center" inline-class="button">
194
+ <?php echo TNP_Composer::button($button_options) ?>
195
+ </td>
196
+ </tr>
197
+ <?php } ?>
198
+ </table>
199
+ <?php } ?>
200
+
201
+
202
+ </td>
203
+ </tr>
204
+
205
+ <?php } ?>
206
+
207
+ </table>
208
+
emails/blocks/separator/options.php CHANGED
@@ -3,6 +3,6 @@
3
  ?>
4
 
5
  <?php $fields->color('color', __('Color', 'newsletter')) ?>
6
- <?php $fields->select('height', __('Height', 'newsletter'), array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5)) ?>
7
 
8
  <?php $fields->block_commons() ?>
3
  ?>
4
 
5
  <?php $fields->color('color', __('Color', 'newsletter')) ?>
6
+ <?php $fields->select('height', __('Height', 'newsletter'), array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9)) ?>
7
 
8
  <?php $fields->block_commons() ?>
emails/blocks/text/options.php CHANGED
@@ -5,7 +5,10 @@
5
  */
6
  /* @var $fields NewsletterFields */
7
  ?>
8
-
 
 
 
9
  <?php //$fields->font() ?>
10
  <?php $fields->wp_editor( 'html', 'Content', [
11
  'text_font_family' => $composer['text_font_family'],
5
  */
6
  /* @var $fields NewsletterFields */
7
  ?>
8
+ <p>
9
+ <a href="https://www.thenewsletterplugin.com/documentation/newsletters/newsletter-tags/"
10
+ target="_blank">You can use tags to inject subscriber fields</a>.
11
+ </p>
12
  <?php //$fields->font() ?>
13
  <?php $fields->wp_editor( 'html', 'Content', [
14
  'text_font_family' => $composer['text_font_family'],
emails/composer.php CHANGED
@@ -84,6 +84,20 @@ if ($controls->is_action()) {
84
  $module->send_test_email($module->get_email($email->id), $controls);
85
  }
86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
87
  if ($controls->is_action('preview')) {
88
  $redirect = $module->get_admin_page_url('edit');
89
  } else {
84
  $module->send_test_email($module->get_email($email->id), $controls);
85
  }
86
 
87
+ if ( $controls->is_action( 'send-test-to-email-address' ) ) {
88
+ $custom_email = sanitize_email( $_POST['test_address_email'] );
89
+ if ( ! empty( $custom_email ) ) {
90
+ try {
91
+ $message = $module->send_test_newsletter_to_email_address( $module->get_email( $email->id ), $custom_email );
92
+ $controls->messages .= $message;
93
+ } catch ( Exception $e ) {
94
+ $controls->errors = __( 'Newsletter should be saved before send a test', 'newsletter' );
95
+ }
96
+ } else {
97
+ $controls->errors = __( 'Empty email address', 'newsletter' );
98
+ }
99
+ }
100
+
101
  if ($controls->is_action('preview')) {
102
  $redirect = $module->get_admin_page_url('edit');
103
  } else {
emails/edit.php CHANGED
@@ -354,10 +354,8 @@ if ($email['status'] != 'sent') {
354
  </div>
355
 
356
  <?php $controls->text('subject', null, 'Subject'); ?>
357
- <a href="#" class="tnp-suggest-button" onclick="tnp_suggest_subject(); return false;"><?php _e('Get ideas', 'newsletter') ?></a>
358
- <!--
359
- <a href="#" class="tnp-suggest-button" onclick="tnp_emoji(); return false;"><?php _e('Insert emoji', 'newsletter') ?></a>
360
- -->
361
  </div>
362
 
363
  <div class="tnp-one-third">
354
  </div>
355
 
356
  <?php $controls->text('subject', null, 'Subject'); ?>
357
+ &nbsp;&nbsp;&nbsp;
358
+ <i class="far fa-lightbulb" data-tnp-modal-target="#subject-ideas-modal" style="color: #fff; font-size: 24px"></i>
 
 
359
  </div>
360
 
361
  <div class="tnp-one-third">
emails/emails.php CHANGED
@@ -35,15 +35,16 @@ class NewsletterEmails extends NewsletterModule {
35
  add_action('newsletter_action', array($this, 'hook_newsletter_action'), 13, 3);
36
 
37
  if (is_admin()) {
38
- add_action('wp_ajax_tnpc_render', array($this, 'tnpc_render_callback'));
39
- add_action('wp_ajax_tnpc_preview', array($this, 'tnpc_preview_callback'));
40
- add_action('wp_ajax_tnpc_css', array($this, 'tnpc_css_callback'));
41
- add_action('wp_ajax_tnpc_options', array($this, 'hook_wp_ajax_tnpc_options'));
42
- add_action('wp_ajax_tnpc_get_all_presets', array($this, 'ajax_get_all_presets'));
43
- add_action('wp_ajax_tnpc_get_preset', array($this, 'ajax_get_preset'));
44
- add_action('wp_ajax_tnpc_delete_preset', array($this, 'hook_wp_ajax_tnpc_delete_preset'));
45
- add_action('wp_ajax_tnpc_regenerate_email', array($this, 'hook_wp_ajax_tnpc_regenerate_email'));
46
-
 
47
  // Thank you to plugins which add the WP editor on other admin plugin pages...
48
  if (isset($_GET['page']) && $_GET['page'] == 'newsletter_emails_edit') {
49
  global $wp_actions;
@@ -86,9 +87,9 @@ class NewsletterEmails extends NewsletterModule {
86
  global $wpdb;
87
 
88
  // TODO: Uniform to use id everywhere
89
- if (!isset($_REQUEST['id'])) {
90
- $_REQUEST['id'] = $_REQUEST['b'];
91
- }
92
 
93
  $block = $this->get_block($_REQUEST['id']);
94
  if (!$block) {
@@ -112,13 +113,13 @@ class NewsletterEmails extends NewsletterModule {
112
 
113
  $controls->init();
114
  echo '<input type="hidden" name="action" value="tnpc_render">';
115
- echo '<input type="hidden" name="b" value="' . esc_attr($_REQUEST['id']) . '">';
116
  echo '<input type="hidden" name="context_type" value="' . esc_attr($context['type']) . '">';
117
  $inline_edits = '';
118
  if (isset($controls->data['inline_edits'])) {
119
  $inline_edits = $controls->data['inline_edits'];
120
  }
121
- echo '<input type="hidden" name="options[inline_edits]" value="' . $this->options_encode($inline_edits) . '">';
122
 
123
  ob_start();
124
  include $block['dir'] . '/options.php';
@@ -426,7 +427,7 @@ class NewsletterEmails extends NewsletterModule {
426
  $x = strpos($theme, '>', $x);
427
  $result = substr($theme, 0, $x + 1) . $result . '</body></html>';
428
  } else {
429
-
430
  }
431
 
432
  if (is_object($email)) {
@@ -508,7 +509,7 @@ class NewsletterEmails extends NewsletterModule {
508
 
509
  // This code filters the HTML to remove javascript and unsecure attributes and enable the
510
  // "display" rule for CSS which is needed in blocks to force specific "block" or "inline" or "table".
511
- add_filter('safe_style_css', [$this, 'hook_safe_style_css']);
512
  $options = wp_kses_post_deep($options);
513
  remove_filter('safe_style_css', [$this, 'hook_safe_style_css']);
514
 
@@ -639,7 +640,7 @@ class NewsletterEmails extends NewsletterModule {
639
  $this->dienow('Expired request');
640
  }
641
 
642
- $block_id = $_POST['b'];
643
  $wrapper = isset($_POST['full']);
644
  $options = $this->restore_options_from_request();
645
 
@@ -990,31 +991,29 @@ class NewsletterEmails extends NewsletterModule {
990
  * @return array | WP_Error
991
  */
992
  function build_block($dir) {
993
- $file = basename($dir);
994
- $block_id = sanitize_key($file);
995
  $full_file = $dir . '/block.php';
996
  if (!is_file($full_file)) {
997
  return new WP_Error('1', 'Missing block.php file in ' . $dir);
998
  }
 
 
 
999
 
1000
- if (!is_file($dir . '/icon.png')) {
1001
- $relative_dir = substr($dir, strlen(WP_CONTENT_DIR));
1002
- $data['icon'] = content_url($relative_dir . '/icon.png');
1003
- }
1004
-
1005
- $data = get_file_data($full_file, array('name' => 'Name', 'section' => 'Section', 'description' => 'Description', 'type' => 'Type'));
1006
- $defaults = array('section' => 'content', 'name' => $file, 'descritpion' => '', 'icon' => NEWSLETTER_URL . '/images/block-icon.png', 'content' => '');
1007
  $data = array_merge($defaults, $data);
1008
 
1009
  if (is_file($dir . '/icon.png')) {
1010
- $relative_dir = substr($dir, strlen(WP_CONTENT_DIR));
1011
  $data['icon'] = content_url($relative_dir . '/icon.png');
1012
  }
1013
 
1014
- $data['id'] = $block_id;
1015
 
1016
  // Absolute path of the block files
1017
  $data['dir'] = $dir;
 
1018
 
1019
  return $data;
1020
  }
@@ -1025,19 +1024,16 @@ class NewsletterEmails extends NewsletterModule {
1025
  * @return type
1026
  */
1027
  function scan_blocks_dir($dir) {
1028
-
1029
- if (!is_dir($dir)) {
1030
- return array();
1031
  }
 
1032
 
 
1033
  $handle = opendir($dir);
1034
- $list = array();
1035
- $relative_dir = substr($dir, strlen(WP_CONTENT_DIR));
1036
  while ($file = readdir($handle)) {
1037
 
1038
- if ($file == '.' || $file == '..')
1039
- continue;
1040
-
1041
  $data = $this->build_block($dir . '/' . $file);
1042
 
1043
  if (is_wp_error($data)) {
@@ -1070,11 +1066,10 @@ class NewsletterEmails extends NewsletterModule {
1070
 
1071
  $dirs = apply_filters('newsletter_blocks_dir', array());
1072
 
1073
- $this->logger->debug('Block dirs:');
1074
- $this->logger->debug($dirs);
1075
 
1076
  foreach ($dirs as $dir) {
1077
- $dir = str_replace('\\', '/', $dir);
1078
  $list = $this->scan_blocks_dir($dir);
1079
  $this->blocks = array_merge($list, $this->blocks);
1080
  }
@@ -1090,7 +1085,7 @@ class NewsletterEmails extends NewsletterModule {
1090
  if (!isset($this->blocks[$block['id']])) {
1091
  $this->blocks[$block['id']] = $block;
1092
  } else {
1093
- $this->logger->error('The block "' . $block['id'] . '" is already registered');
1094
  }
1095
  }
1096
 
@@ -1209,6 +1204,8 @@ class NewsletterEmails extends NewsletterModule {
1209
 
1210
  function get_composer_css() {
1211
  $css = file_get_contents(__DIR__ . '/tnp-composer/css/newsletter.css');
 
 
1212
  $blocks = $this->get_blocks();
1213
  foreach ($blocks as $block) {
1214
  if (!file_exists($block['dir'] . '/style.css')) {
@@ -1232,13 +1229,10 @@ class NewsletterEmails extends NewsletterModule {
1232
  $controls->errors = __('Newsletter should be saved before send a test', 'newsletter');
1233
  return;
1234
  }
 
1235
  $original_subject = $email->subject;
 
1236
 
1237
- if ($email->subject == '') {
1238
- $email->subject = '[TEST] Dummy subject, it was empty (remember to set it)';
1239
- } else {
1240
- $email->subject = $email->subject . ' (TEST)';
1241
- }
1242
  $users = NewsletterUsers::instance()->get_test_users();
1243
  if (count($users) == 0) {
1244
  $controls->errors = '' . __('There are no test subscribers to send to', 'newsletter') .
@@ -1270,11 +1264,85 @@ class NewsletterEmails extends NewsletterModule {
1270
  $email->subject = $original_subject;
1271
  }
1272
 
1273
- function restore_options_from_request() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1274
 
 
 
 
 
 
 
1275
  if (isset($_POST['options']) && is_array($_POST['options'])) {
1276
  // Get all block options
1277
- $options = stripslashes_deep($_POST['options']);
1278
 
1279
  // Deserialize inline edits when
1280
  // render is preformed on saving block options
35
  add_action('newsletter_action', array($this, 'hook_newsletter_action'), 13, 3);
36
 
37
  if (is_admin()) {
38
+ if (defined('DOING_AJAX') && DOING_AJAX) {
39
+ add_action('wp_ajax_tnpc_render', array($this, 'tnpc_render_callback'));
40
+ add_action('wp_ajax_tnpc_preview', array($this, 'tnpc_preview_callback'));
41
+ add_action('wp_ajax_tnpc_css', array($this, 'tnpc_css_callback'));
42
+ add_action('wp_ajax_tnpc_options', array($this, 'hook_wp_ajax_tnpc_options'));
43
+ add_action('wp_ajax_tnpc_get_all_presets', array($this, 'ajax_get_all_presets'));
44
+ add_action('wp_ajax_tnpc_get_preset', array($this, 'ajax_get_preset'));
45
+ add_action('wp_ajax_tnpc_delete_preset', array($this, 'hook_wp_ajax_tnpc_delete_preset'));
46
+ add_action('wp_ajax_tnpc_regenerate_email', array($this, 'hook_wp_ajax_tnpc_regenerate_email'));
47
+ }
48
  // Thank you to plugins which add the WP editor on other admin plugin pages...
49
  if (isset($_GET['page']) && $_GET['page'] == 'newsletter_emails_edit') {
50
  global $wp_actions;
87
  global $wpdb;
88
 
89
  // TODO: Uniform to use id everywhere
90
+ // if (!isset($_REQUEST['id'])) {
91
+ // $_REQUEST['id'] = $_REQUEST['b'];
92
+ // }
93
 
94
  $block = $this->get_block($_REQUEST['id']);
95
  if (!$block) {
113
 
114
  $controls->init();
115
  echo '<input type="hidden" name="action" value="tnpc_render">';
116
+ echo '<input type="hidden" name="id" value="' . esc_attr($_REQUEST['id']) . '">';
117
  echo '<input type="hidden" name="context_type" value="' . esc_attr($context['type']) . '">';
118
  $inline_edits = '';
119
  if (isset($controls->data['inline_edits'])) {
120
  $inline_edits = $controls->data['inline_edits'];
121
  }
122
+ echo '<input type="hidden" name="options[inline_edits]" value="', esc_attr($this->options_encode($inline_edits)), '">';
123
 
124
  ob_start();
125
  include $block['dir'] . '/options.php';
427
  $x = strpos($theme, '>', $x);
428
  $result = substr($theme, 0, $x + 1) . $result . '</body></html>';
429
  } else {
430
+
431
  }
432
 
433
  if (is_object($email)) {
509
 
510
  // This code filters the HTML to remove javascript and unsecure attributes and enable the
511
  // "display" rule for CSS which is needed in blocks to force specific "block" or "inline" or "table".
512
+ add_filter('safe_style_css', [$this, 'hook_safe_style_css'], 9999);
513
  $options = wp_kses_post_deep($options);
514
  remove_filter('safe_style_css', [$this, 'hook_safe_style_css']);
515
 
640
  $this->dienow('Expired request');
641
  }
642
 
643
+ $block_id = $_POST['id'];
644
  $wrapper = isset($_POST['full']);
645
  $options = $this->restore_options_from_request();
646
 
991
  * @return array | WP_Error
992
  */
993
  function build_block($dir) {
994
+ $dir = realpath($dir);
995
+ $dir = wp_normalize_path($dir);
996
  $full_file = $dir . '/block.php';
997
  if (!is_file($full_file)) {
998
  return new WP_Error('1', 'Missing block.php file in ' . $dir);
999
  }
1000
+
1001
+ $relative_dir = substr($dir, strlen(WP_CONTENT_DIR));
1002
+ $file = basename($dir);
1003
 
1004
+ $data = get_file_data($full_file, ['name' => 'Name', 'section' => 'Section', 'description' => 'Description', 'type' => 'Type']);
1005
+ $defaults = ['section' => 'content', 'name' => ucfirst($file), 'descritpion' => '', 'icon' => NEWSLETTER_URL . '/images/block-icon.png'];
 
 
 
 
 
1006
  $data = array_merge($defaults, $data);
1007
 
1008
  if (is_file($dir . '/icon.png')) {
 
1009
  $data['icon'] = content_url($relative_dir . '/icon.png');
1010
  }
1011
 
1012
+ $data['id'] = sanitize_key($file);
1013
 
1014
  // Absolute path of the block files
1015
  $data['dir'] = $dir;
1016
+ $data['url'] = content_url($relative_dir);
1017
 
1018
  return $data;
1019
  }
1024
  * @return type
1025
  */
1026
  function scan_blocks_dir($dir) {
1027
+ $dir = realpath($dir);
1028
+ if (!$dir) {
1029
+ return [];
1030
  }
1031
+ $dir = wp_normalize_path($dir);
1032
 
1033
+ $list = [];
1034
  $handle = opendir($dir);
 
 
1035
  while ($file = readdir($handle)) {
1036
 
 
 
 
1037
  $data = $this->build_block($dir . '/' . $file);
1038
 
1039
  if (is_wp_error($data)) {
1066
 
1067
  $dirs = apply_filters('newsletter_blocks_dir', array());
1068
 
1069
+ //$this->logger->debug('Block dirs:');
1070
+ //$this->logger->debug($dirs);
1071
 
1072
  foreach ($dirs as $dir) {
 
1073
  $list = $this->scan_blocks_dir($dir);
1074
  $this->blocks = array_merge($list, $this->blocks);
1075
  }
1085
  if (!isset($this->blocks[$block['id']])) {
1086
  $this->blocks[$block['id']] = $block;
1087
  } else {
1088
+ $this->logger->error('The block "' . $block['id'] . '" has already been registered');
1089
  }
1090
  }
1091
 
1204
 
1205
  function get_composer_css() {
1206
  $css = file_get_contents(__DIR__ . '/tnp-composer/css/newsletter.css');
1207
+ $css .= "\n\n";
1208
+ $css .= file_get_contents(__DIR__ . '/tnp-composer/css/backend.css');
1209
  $blocks = $this->get_blocks();
1210
  foreach ($blocks as $block) {
1211
  if (!file_exists($block['dir'] . '/style.css')) {
1229
  $controls->errors = __('Newsletter should be saved before send a test', 'newsletter');
1230
  return;
1231
  }
1232
+
1233
  $original_subject = $email->subject;
1234
+ $this->set_test_subject_to($email);
1235
 
 
 
 
 
 
1236
  $users = NewsletterUsers::instance()->get_test_users();
1237
  if (count($users) == 0) {
1238
  $controls->errors = '' . __('There are no test subscribers to send to', 'newsletter') .
1264
  $email->subject = $original_subject;
1265
  }
1266
 
1267
+ /**
1268
+ * Send an email to the test subscribers.
1269
+ *
1270
+ * @param TNP_Email $email Could be any object with the TNP_Email attributes
1271
+ * @param string $email_address
1272
+ *
1273
+ * @throws Exception
1274
+ */
1275
+ function send_test_newsletter_to_email_address( $email, $email_address ) {
1276
+
1277
+ if ( ! $email ) {
1278
+ throw new Exception( __( 'Newsletter should be saved before send a test', 'newsletter' ) );
1279
+ }
1280
+
1281
+ $this->set_test_subject_to( $email );
1282
+
1283
+ $dummy_subscriber = $this->make_dummy_subscriber();
1284
+ $dummy_subscriber->email = $email_address;
1285
+
1286
+ $result = Newsletter::instance()->send( $email, [ $dummy_subscriber ], true );
1287
+
1288
+ $email = '<a href="admin.php?page=newsletter_users_edit&id=' . $dummy_subscriber->id . '" target="_blank">' . $dummy_subscriber->email . '</a>';
1289
+
1290
+ if ( is_wp_error( $result ) ) {
1291
+ $error_message = 'Something went wrong. Check the error logs on status page.<br>';
1292
+ $error_message .= __( 'Test subscribers:', 'newsletter' );
1293
+ $error_message .= ' ' . $email;
1294
+ $error_message .= '<br>';
1295
+ $error_message .= '<strong>' . esc_html( $result->get_error_message() ) . '</strong><br>';
1296
+ $error_message .= '<a href="https://www.thenewsletterplugin.com/documentation/email-sending-issues" target="_blank"><strong>' . __( 'Read more about delivery issues', 'newsletter' ) . '</strong></a>.';
1297
+ throw new Exception( $error_message );
1298
+ }
1299
+
1300
+ $messages = __( 'Test subscribers:', 'newsletter' );
1301
+
1302
+ $messages .= ' ' . $email;
1303
+ $messages .= '.<br>';
1304
+ $messages .= '<a href="https://www.thenewsletterplugin.com/documentation/subscribers#test" target="_blank"><strong>' .
1305
+ __( 'Read more about test subscribers', 'newsletter' ) . '</strong></a>.<br>';
1306
+ $messages .= '<a href="https://www.thenewsletterplugin.com/documentation/email-sending-issues" target="_blank"><strong>' . __( 'Read more about delivery issues', 'newsletter' ) . '</strong></a>.';
1307
+
1308
+ return $messages;
1309
+ }
1310
+
1311
+ private function set_test_subject_to($email) {
1312
+ if ( $email->subject == '' ) {
1313
+ $email->subject = '[TEST] Dummy subject, it was empty (remember to set it)';
1314
+ } else {
1315
+ $email->subject = $email->subject . ' (TEST)';
1316
+ }
1317
+ }
1318
+
1319
+ private function make_dummy_subscriber() {
1320
+ $dummy_user = new TNP_User();
1321
+ $dummy_user->id = - 1;
1322
+ $dummy_user->email = 'john.doe@example.org';
1323
+ $dummy_user->name = 'John';
1324
+ $dummy_user->surname = 'Doe';
1325
+ $dummy_user->sex = 'n';
1326
+ $dummy_user->language = '';
1327
+ $dummy_user->ip = '';
1328
+
1329
+ for ( $i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i ++ ) {
1330
+ $profile_key = "profile_$i";
1331
+ $dummy_user->$profile_key = '';
1332
+ }
1333
+
1334
+ return $dummy_user;
1335
+ }
1336
 
1337
+ function restore_options_from_request() {
1338
+
1339
+ require_once NEWSLETTER_INCLUDES_DIR . '/controls.php';
1340
+ $controls = new NewsletterControls();
1341
+ $options = $controls->data;
1342
+
1343
  if (isset($_POST['options']) && is_array($_POST['options'])) {
1344
  // Get all block options
1345
+ //$options = stripslashes_deep($_POST['options']);
1346
 
1347
  // Deserialize inline edits when
1348
  // render is preformed on saving block options
emails/images/_rawhtml.png DELETED
Binary file
emails/subjects.php CHANGED
@@ -1,61 +1,57 @@
1
  <script>
2
- function tnp_suggest_subject() {
3
- jQuery("#tnp-edit-subjects").show();
4
- }
5
 
6
  jQuery(function () {
7
  jQuery("#tnp-edit-subjects-list a").click(function (e) {
8
  e.preventDefault();
9
  jQuery("#options-subject").val(this.innerText);
10
  jQuery("#options-title").val(this.innerText);
11
- jQuery("#tnp-edit-subjects").hide();
12
  });
13
 
14
- jQuery(".tnp-popup-close").click(function () {
15
- jQuery(this).parent().parent().hide();
16
-
17
- });
18
  });
19
  </script>
20
 
21
- <div id="tnp-edit-subjects" class="tnp-popup-overlay">
22
- <div class="tnp-popup">
23
- <a class="tnp-popup-close">&times;</a>
24
- <p class="tnp-subjects-header">
25
- Here are some subject examples you can start from to further engage your subscribers.
26
- </p>
27
- <div id="tnp-edit-subjects-list">
28
-
29
- <h3 class="tnp-subject-category"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 48 48" xml:space="preserve" width="18" height="18"><g class="nc-icon-wrapper"><path fill="#43A6DD" d="M10,5C9.668,5,9.358,5.165,9.172,5.439C8.986,5.714,8.948,6.063,9.071,6.371 c0.078,0.194,7.669,19.475,0.222,26.922c-0.286,0.286-0.372,0.716-0.217,1.09C9.23,34.757,9.596,35,10,35h28c0.553,0,1-0.447,1-1 C39,18.01,25.99,5,10,5z"></path> <path fill="#BADEFC" d="M46,43c0.552,0,1-0.448,1-1V30.544c-0.646,0.29-1.257,0.684-1.787,1.214c-2.343,2.343-6.142,2.343-8.485,0 c-2.343-2.343-6.142-2.343-8.485,0c-2.343,2.343-6.142,2.343-8.485,0s-6.142-2.343-8.485,0s-6.142,2.343-8.485,0 c-0.53-0.53-1.141-0.924-1.787-1.214V42c0,0.552,0.448,1,1,1H46z"></path></g></svg>Dangers</h3>
30
- <a href="#"><?php _e('How safe is your <em>[something]</em> from <em>[danger]</em>?', 'newsletter') ?></a><br>
31
- <a href="#"><?php _e('10 Warning Signs That <em>[something]</em>', 'newsletter') ?></a><br>
32
- <a href="#"><?php _e('10 Lies <em>[kind of people]</em> Likes to Tell', 'newsletter') ?></a><br>
33
-
34
- <h3 class="tnp-subject-category"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 48 48" xml:space="preserve" width="18" height="18"><g class="nc-icon-wrapper"><path fill="#43A6DD" d="M10,5C9.668,5,9.358,5.165,9.172,5.439C8.986,5.714,8.948,6.063,9.071,6.371 c0.078,0.194,7.669,19.475,0.222,26.922c-0.286,0.286-0.372,0.716-0.217,1.09C9.23,34.757,9.596,35,10,35h28c0.553,0,1-0.447,1-1 C39,18.01,25.99,5,10,5z"></path> <path fill="#BADEFC" d="M46,43c0.552,0,1-0.448,1-1V30.544c-0.646,0.29-1.257,0.684-1.787,1.214c-2.343,2.343-6.142,2.343-8.485,0 c-2.343-2.343-6.142-2.343-8.485,0c-2.343,2.343-6.142,2.343-8.485,0s-6.142-2.343-8.485,0s-6.142,2.343-8.485,0 c-0.53-0.53-1.141-0.924-1.787-1.214V42c0,0.552,0.448,1,1,1H46z"></path></g></svg>Dangers</h3>
35
- <a href="#"><?php _e('Last day to save 30%', 'newsletter') ?></a><br>
36
- <a href="#"><?php _e('Black Friday Sale is almost over', 'newsletter') ?></a><br>
37
- <a href="#"><?php _e('Black Friday 65% off ending soon!', 'newsletter') ?></a><br>
38
- <a href="#"><?php _e('Your Final 24 Hours | Last Call for Black Friday Deals', 'newsletter') ?></a><br>
39
- <a href="#"><?php _e('Black Friday Sale is Live', 'newsletter') ?></a><br>
40
- <a href="#"><?php _e('Black Friday Sale: few hours left!', 'newsletter') ?></a><br>
41
-
42
- <h3 class="tnp-subject-category"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 48 48" xml:space="preserve" width="18" height="18"><g class="nc-icon-wrapper"><path fill="#7C5839" d="M38.75586,31.34473C38.56543,31.12598,38.29004,31,38,31H10c-0.29004,0-0.56543,0.12598-0.75586,0.34473 c-0.18945,0.21924-0.27539,0.50977-0.23438,0.79688l2,14C11.08008,46.63428,11.50195,47,12,47h24 c0.49805,0,0.91992-0.36572,0.99023-0.8584l2-14C39.03125,31.85449,38.94531,31.56396,38.75586,31.34473z"></path> <path fill="#72C472" d="M34,6c-3.96655,0-7.38348,2.31537-9,5.66302V2c0-0.55225-0.44727-1-1-1s-1,0.44775-1,1v26 c0,0.55225,0.44727,1,1,1s1-0.44775,1-1v-8h1c5.52283,0,10-4.47717,10-10V6H34z"></path> <path fill="#A67C52" d="M42,33H6c-0.55273,0-1-0.44775-1-1v-4c0-0.55225,0.44727-1,1-1h36c0.55273,0,1,0.44775,1,1v4 C43,32.55225,42.55273,33,42,33z"></path></g></svg>Better life, problem management</h3>
43
- <a href="#"><?php _e('10 Ways to Simplify Your <em>[something]</em>', 'newsletter') ?></a><br>
44
- <a href="#"><?php _e('Get Rid of <em>[problem]</em> Once and Forever', 'newsletter') ?></a><br>
45
- <a href="#"><?php _e('How to End [problem]', 'newsletter') ?></a><br>
46
- <a href="#"><?php _e('Secrets of [famous people]', 'newsletter') ?></a><br>
47
-
48
- <h3 class="tnp-subject-category"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 48 48" xml:space="preserve" width="18" height="18"><g class="nc-icon-wrapper"><path fill="#444444" d="M8,27H2c-0.553,0-1-0.447-1-1s0.447-1,1-1h6c0.553,0,1,0.447,1,1S8.553,27,8,27z"></path> <path fill="#444444" d="M12.185,15.19c-0.256,0-0.513-0.098-0.708-0.293l-4.185-4.19c-0.39-0.392-0.39-1.024,0.001-1.415 c0.391-0.389,1.024-0.39,1.415,0.001l4.185,4.19c0.39,0.392,0.39,1.024-0.001,1.415C12.696,15.093,12.44,15.19,12.185,15.19z"></path> <path fill="#444444" d="M35.815,15.19c-0.256,0-0.512-0.098-0.707-0.292c-0.391-0.391-0.391-1.023-0.001-1.415l4.185-4.19 c0.391-0.391,1.024-0.39,1.415-0.001c0.391,0.391,0.391,1.023,0.001,1.415l-4.185,4.19C36.328,15.093,36.071,15.19,35.815,15.19z"></path> <path fill="#444444" d="M8,45c-0.256,0-0.513-0.098-0.708-0.293c-0.39-0.392-0.39-1.024,0.001-1.415l4.189-4.184 c0.391-0.389,1.024-0.39,1.415,0.001c0.39,0.392,0.39,1.024-0.001,1.415l-4.189,4.184C8.512,44.902,8.256,45,8,45z"></path> <path fill="#444444" d="M40,45c-0.256,0-0.512-0.098-0.707-0.292l-4.189-4.184c-0.391-0.391-0.391-1.023-0.001-1.415 c0.391-0.391,1.024-0.39,1.415-0.001l4.189,4.184c0.391,0.391,0.391,1.023,0.001,1.415C40.513,44.902,40.256,45,40,45z"></path> <path fill="#444444" d="M46,27h-6c-0.553,0-1-0.447-1-1s0.447-1,1-1h6c0.553,0,1,0.447,1,1S46.553,27,46,27z"></path> <path fill="#E86C60" d="M32.324,9.555c-0.164-0.108-0.355-0.166-0.552-0.166c-0.001,0-0.001,0-0.002,0L16.188,9.413 c-0.196,0-0.389,0.059-0.552,0.167C10.31,13.125,7,19.799,7,27c0,11.028,7.626,20,17,20s17-8.972,17-20 C41,19.777,37.676,13.093,32.324,9.555z"></path> <path fill="#444444" d="M34.707,1.293c-0.391-0.391-1.023-0.391-1.414,0l-3.694,3.694C28.051,3.744,26.1,3,24,3 s-4.051,0.744-5.599,1.987l-3.694-3.694c-0.391-0.391-1.023-0.391-1.414,0s-0.391,1.023,0,1.414l3.689,3.689 c-0.993,1.243-1.669,2.757-1.891,4.426c-0.021,0.156-0.004,0.316,0.049,0.466C15.425,12.096,20.198,15,24,15s8.575-2.904,8.86-3.712 c0.053-0.149,0.069-0.31,0.049-0.466c-0.223-1.669-0.898-3.183-1.891-4.426l3.689-3.689C35.098,2.316,35.098,1.684,34.707,1.293z"></path> <path fill="#444444" d="M24,47c0.338,0,0.667-0.037,1-0.06V14c0-0.553-0.447-1-1-1s-1,0.447-1,1v32.94 C23.333,46.963,23.662,47,24,47z"></path> <circle fill="#444444" cx="15" cy="23" r="3"></circle> <circle fill="#444444" cx="17.5" cy="34.5" r="2.5"></circle> <circle fill="#444444" cx="33" cy="23" r="3"></circle> <circle fill="#444444" cx="30.5" cy="34.5" r="2.5"></circle></g></svg>Mistakes</h3>
49
- <a href="#"><?php _e('Do You Make These 10 <em>[something]</em> Mistakes?', 'newsletter') ?></a><br>
50
- <a href="#"><?php _e('10 <em>[something]</em> Mistakes That Make You Look Dumb', 'newsletter') ?></a><br>
51
- <a href="#"><?php _e('Don\'t do These 10 Things When <em>[something]</em>', 'newsletter') ?></a><br>
52
-
53
- <h3 class="tnp-subject-category"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 48 48" xml:space="preserve" width="18" height="18"><g class="nc-icon-wrapper"><path fill="#5A7A84" d="M6,13c2.75684,0,5-2.24316,5-5S8.75684,3,6,3S1,5.24316,1,8S3.24316,13,6,13z"></path> <path fill="#5A7A84" d="M6,19c-2.75684,0-5,2.24316-5,5s2.24316,5,5,5s5-2.24316,5-5S8.75684,19,6,19z"></path> <path fill="#5A7A84" d="M6,35c-2.75684,0-5,2.24316-5,5s2.24316,5,5,5s5-2.24316,5-5S8.75684,35,6,35z"></path> <path fill="#76B5B5" d="M46,10H16c-0.55229,0-1-0.44771-1-1V7c0-0.55228,0.44771-1,1-1h30c0.55228,0,1,0.44772,1,1v2 C47,9.55229,46.55228,10,46,10z"></path> <path fill="#76B5B5" d="M34,26H16c-0.55229,0-1-0.44772-1-1v-2c0-0.55228,0.44771-1,1-1h18c0.55228,0,1,0.44772,1,1v2 C35,25.55228,34.55228,26,34,26z"></path> <path fill="#76B5B5" d="M46,42H16c-0.55229,0-1-0.44772-1-1v-2c0-0.55228,0.44771-1,1-1h30c0.55228,0,1,0.44772,1,1v2 C47,41.55228,46.55228,42,46,42z"></path></g></svg>Lists (classic)</h3>
54
- <a href="#"><?php _e('10 Ways to <em>[something]</em>', 'newsletter') ?></a><br>
55
- <a href="#"><?php _e('The Top 10 <em>[something]</em>', 'newsletter') ?></a><br>
56
- <a href="#"><?php _e('The 10 Rules for <em>[something]</em>', 'newsletter') ?></a><br>
57
- <a href="#"><?php _e('Get/Become <em>[something]</em>. 10 Ideas That Work', 'newsletter') ?></a><br>
58
-
59
- </div>
60
- </div>
 
 
 
61
  </div>
1
  <script>
 
 
 
2
 
3
  jQuery(function () {
4
  jQuery("#tnp-edit-subjects-list a").click(function (e) {
5
  e.preventDefault();
6
  jQuery("#options-subject").val(this.innerText);
7
  jQuery("#options-title").val(this.innerText);
8
+ TNPModal2.close('#subject-ideas-modal');
9
  });
10
 
 
 
 
 
11
  });
12
  </script>
13
 
14
+ <div class="tnp-modal2" id="subject-ideas-modal" aria-hidden="true">
15
+ <div class="tnp-modal2__content" role="dialog" style="width: 600px">
16
+ <header class="tnp-modal2__header">
17
+ <h2><?php _e("Subject ideas", 'newsletter') ?></h2>
18
+ <span class="tnp-modal2__close" data-tnp-modal-close aria-label="Close modal"></span>
19
+ </header>
20
+ <div class="tnp-modal2__body">
21
+
22
+ <div id="tnp-edit-subjects-list">
23
+ <h3 class="tnp-subject-category">Promotions</h3>
24
+ <a href="#"><?php _e('Last day to save 30%', 'newsletter') ?></a><br>
25
+ <a href="#"><?php _e('Black Friday Sale is almost over', 'newsletter') ?></a><br>
26
+ <a href="#"><?php _e('Black Friday 65% off ending soon!', 'newsletter') ?></a><br>
27
+ <a href="#"><?php _e('Your Final 24 Hours | Last Call for Black Friday Deals', 'newsletter') ?></a><br>
28
+ <a href="#"><?php _e('Black Friday Sale is Live', 'newsletter') ?></a><br>
29
+ <a href="#"><?php _e('Black Friday Sale: few hours left!', 'newsletter') ?></a><br>
30
+
31
+ <h3 class="tnp-subject-category">Dangers</h3>
32
+ <a href="#"><?php _e('How safe is your <em>[something]</em> from <em>[danger]</em>?', 'newsletter') ?></a><br>
33
+ <a href="#"><?php _e('10 Warning Signs That <em>[something]</em>', 'newsletter') ?></a><br>
34
+ <a href="#"><?php _e('10 Lies <em>[kind of people]</em> Likes to Tell', 'newsletter') ?></a><br>
35
+
36
+
37
+
38
+ <h3 class="tnp-subject-category">Better life, problem management</h3>
39
+ <a href="#"><?php _e('10 Ways to Simplify Your <em>[something]</em>', 'newsletter') ?></a><br>
40
+ <a href="#"><?php _e('Get Rid of <em>[problem]</em> Once and Forever', 'newsletter') ?></a><br>
41
+ <a href="#"><?php _e('How to End [problem]', 'newsletter') ?></a><br>
42
+ <a href="#"><?php _e('Secrets of [famous people]', 'newsletter') ?></a><br>
43
+
44
+ <h3 class="tnp-subject-category">Mistakes</h3>
45
+ <a href="#"><?php _e('Do You Make These 10 <em>[something]</em> Mistakes?', 'newsletter') ?></a><br>
46
+ <a href="#"><?php _e('10 <em>[something]</em> Mistakes That Make You Look Dumb', 'newsletter') ?></a><br>
47
+ <a href="#"><?php _e('Don\'t do These 10 Things When <em>[something]</em>', 'newsletter') ?></a><br>
48
+
49
+ <h3 class="tnp-subject-category">Lists</h3>
50
+ <a href="#"><?php _e('10 Ways to <em>[something]</em>', 'newsletter') ?></a><br>
51
+ <a href="#"><?php _e('The Top 10 <em>[something]</em>', 'newsletter') ?></a><br>
52
+ <a href="#"><?php _e('The 10 Rules for <em>[something]</em>', 'newsletter') ?></a><br>
53
+ <a href="#"><?php _e('Get/Become <em>[something]</em>. 10 Ideas That Work', 'newsletter') ?></a><br>
54
+ </div>
55
+ </div>
56
+ </div>
57
  </div>
emails/tnp-composer/_css/animate.css DELETED
@@ -1,3158 +0,0 @@
1
- @charset "UTF-8";
2
- /*!
3
- Animate.css - http://daneden.me/animate
4
- Licensed under the MIT license - http://opensource.org/licenses/MIT
5
-
6
- Copyright (c) 2014 Daniel Eden
7
- */
8
-
9
- .animated {
10
- -webkit-animation-duration: 1s;
11
- animation-duration: 1s;
12
- -webkit-animation-fill-mode: both;
13
- animation-fill-mode: both;
14
- }
15
-
16
- .animated.infinite {
17
- -webkit-animation-iteration-count: infinite;
18
- animation-iteration-count: infinite;
19
- }
20
-
21
- .animated.hinge {
22
- -webkit-animation-duration: 2s;
23
- animation-duration: 2s;
24
- }
25
-
26
- @-webkit-keyframes bounce {
27
- 0%, 20%, 53%, 80%, 100% {
28
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
29
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
30
- -webkit-transform: translate3d(0,0,0);
31
- transform: translate3d(0,0,0);
32
- }
33
-
34
- 40%, 43% {
35
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
36
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
37
- -webkit-transform: translate3d(0, -30px, 0);
38
- transform: translate3d(0, -30px, 0);
39
- }
40
-
41
- 70% {
42
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
43
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
44
- -webkit-transform: translate3d(0, -15px, 0);
45
- transform: translate3d(0, -15px, 0);
46
- }
47
-
48
- 90% {
49
- -webkit-transform: translate3d(0,-4px,0);
50
- transform: translate3d(0,-4px,0);
51
- }
52
- }
53
-
54
- @keyframes bounce {
55
- 0%, 20%, 53%, 80%, 100% {
56
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
57
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
58
- -webkit-transform: translate3d(0,0,0);
59
- transform: translate3d(0,0,0);
60
- }
61
-
62
- 40%, 43% {
63
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
64
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
65
- -webkit-transform: translate3d(0, -30px, 0);
66
- transform: translate3d(0, -30px, 0);
67
- }
68
-
69
- 70% {
70
- -webkit-transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
71
- transition-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
72
- -webkit-transform: translate3d(0, -15px, 0);
73
- transform: translate3d(0, -15px, 0);
74
- }
75
-
76
- 90% {
77
- -webkit-transform: translate3d(0,-4px,0);
78
- transform: translate3d(0,-4px,0);
79
- }
80
- }
81
-
82
- .bounce {
83
- -webkit-animation-name: bounce;
84
- animation-name: bounce;
85
- -webkit-transform-origin: center bottom;
86
- -ms-transform-origin: center bottom;
87
- transform-origin: center bottom;
88
- }
89
-
90
- @-webkit-keyframes flash {
91
- 0%, 50%, 100% {
92
- opacity: 1;
93
- }
94
-
95
- 25%, 75% {
96
- opacity: 0;
97
- }
98
- }
99
-
100
- @keyframes flash {
101
- 0%, 50%, 100% {
102
- opacity: 1;
103
- }
104
-
105
- 25%, 75% {
106
- opacity: 0;
107
- }
108
- }
109
-
110
- .flash {
111
- -webkit-animation-name: flash;
112
- animation-name: flash;
113
- }
114
-
115
- /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
116
-
117
- @-webkit-keyframes pulse {
118
- 0% {
119
- -webkit-transform: scale3d(1, 1, 1);
120
- transform: scale3d(1, 1, 1);
121
- }
122
-
123
- 50% {
124
- -webkit-transform: scale3d(1.05, 1.05, 1.05);
125
- transform: scale3d(1.05, 1.05, 1.05);
126
- }
127
-
128
- 100% {
129
- -webkit-transform: scale3d(1, 1, 1);
130
- transform: scale3d(1, 1, 1);
131
- }
132
- }
133
-
134
- @keyframes pulse {
135
- 0% {
136
- -webkit-transform: scale3d(1, 1, 1);
137
- transform: scale3d(1, 1, 1);
138
- }
139
-
140
- 50% {
141
- -webkit-transform: scale3d(1.05, 1.05, 1.05);
142
- transform: scale3d(1.05, 1.05, 1.05);
143
- }
144
-
145
- 100% {
146
- -webkit-transform: scale3d(1, 1, 1);
147
- transform: scale3d(1, 1, 1);
148
- }
149
- }
150
-
151
- .pulse {
152
- -webkit-animation-name: pulse;
153
- animation-name: pulse;
154
- }
155
-
156
- @-webkit-keyframes rubberBand {
157
- 0% {
158
- -webkit-transform: scale3d(1, 1, 1);
159
- transform: scale3d(1, 1, 1);
160
- }
161
-
162
- 30% {
163
- -webkit-transform: scale3d(1.25, 0.75, 1);
164
- transform: scale3d(1.25, 0.75, 1);
165
- }
166
-
167
- 40% {
168
- -webkit-transform: scale3d(0.75, 1.25, 1);
169
- transform: scale3d(0.75, 1.25, 1);
170
- }
171
-
172
- 50% {
173
- -webkit-transform: scale3d(1.15, 0.85, 1);
174
- transform: scale3d(1.15, 0.85, 1);
175
- }
176
-
177
- 65% {
178
- -webkit-transform: scale3d(.95, 1.05, 1);
179
- transform: scale3d(.95, 1.05, 1);
180
- }
181
-
182
- 75% {
183
- -webkit-transform: scale3d(1.05, .95, 1);
184
- transform: scale3d(1.05, .95, 1);
185
- }
186
-
187
- 100% {
188
- -webkit-transform: scale3d(1, 1, 1);
189
- transform: scale3d(1, 1, 1);
190
- }
191
- }
192
-
193
- @keyframes rubberBand {
194
- 0% {
195
- -webkit-transform: scale3d(1, 1, 1);
196
- transform: scale3d(1, 1, 1);
197
- }
198
-
199
- 30% {
200
- -webkit-transform: scale3d(1.25, 0.75, 1);
201
- transform: scale3d(1.25, 0.75, 1);
202
- }
203
-
204
- 40% {
205
- -webkit-transform: scale3d(0.75, 1.25, 1);
206
- transform: scale3d(0.75, 1.25, 1);
207
- }
208
-
209
- 50% {
210
- -webkit-transform: scale3d(1.15, 0.85, 1);
211
- transform: scale3d(1.15, 0.85, 1);
212
- }
213
-
214
- 65% {
215
- -webkit-transform: scale3d(.95, 1.05, 1);
216
- transform: scale3d(.95, 1.05, 1);
217
- }
218
-
219
- 75% {
220
- -webkit-transform: scale3d(1.05, .95, 1);
221
- transform: scale3d(1.05, .95, 1);
222
- }
223
-
224
- 100% {
225
- -webkit-transform: scale3d(1, 1, 1);
226
- transform: scale3d(1, 1, 1);
227
- }
228
- }
229
-
230
- .rubberBand {
231
- -webkit-animation-name: rubberBand;
232
- animation-name: rubberBand;
233
- }
234
-
235
- @-webkit-keyframes shake {
236
- 0%, 100% {
237
- -webkit-transform: translate3d(0, 0, 0);
238
- transform: translate3d(0, 0, 0);
239
- }
240
-
241
- 10%, 30%, 50%, 70%, 90% {
242
- -webkit-transform: translate3d(-10px, 0, 0);
243
- transform: translate3d(-10px, 0, 0);
244
- }
245
-
246
- 20%, 40%, 60%, 80% {
247
- -webkit-transform: translate3d(10px, 0, 0);
248
- transform: translate3d(10px, 0, 0);
249
- }
250
- }
251
-
252
- @keyframes shake {
253
- 0%, 100% {
254
- -webkit-transform: translate3d(0, 0, 0);
255
- transform: translate3d(0, 0, 0);
256
- }
257
-
258
- 10%, 30%, 50%, 70%, 90% {
259
- -webkit-transform: translate3d(-10px, 0, 0);
260
- transform: translate3d(-10px, 0, 0);
261
- }
262
-
263
- 20%, 40%, 60%, 80% {
264
- -webkit-transform: translate3d(10px, 0, 0);
265
- transform: translate3d(10px, 0, 0);
266
- }
267
- }
268
-
269
- .shake {
270
- -webkit-animation-name: shake;
271
- animation-name: shake;
272
- }
273
-
274
- @-webkit-keyframes swing {
275
- 20% {
276
- -webkit-transform: rotate3d(0, 0, 1, 15deg);
277
- transform: rotate3d(0, 0, 1, 15deg);
278
- }
279
-
280
- 40% {
281
- -webkit-transform: rotate3d(0, 0, 1, -10deg);
282
- transform: rotate3d(0, 0, 1, -10deg);
283
- }
284
-
285
- 60% {
286
- -webkit-transform: rotate3d(0, 0, 1, 5deg);
287
- transform: rotate3d(0, 0, 1, 5deg);
288
- }
289
-
290
- 80% {
291
- -webkit-transform: rotate3d(0, 0, 1, -5deg);
292
- transform: rotate3d(0, 0, 1, -5deg);
293
- }
294
-
295
- 100% {
296
- -webkit-transform: rotate3d(0, 0, 1, 0deg);
297
- transform: rotate3d(0, 0, 1, 0deg);
298
- }
299
- }
300
-
301
- @keyframes swing {
302
- 20% {
303
- -webkit-transform: rotate3d(0, 0, 1, 15deg);
304
- transform: rotate3d(0, 0, 1, 15deg);
305
- }
306
-
307
- 40% {
308
- -webkit-transform: rotate3d(0, 0, 1, -10deg);
309
- transform: rotate3d(0, 0, 1, -10deg);
310
- }
311
-
312
- 60% {
313
- -webkit-transform: rotate3d(0, 0, 1, 5deg);
314
- transform: rotate3d(0, 0, 1, 5deg);
315
- }
316
-
317
- 80% {
318
- -webkit-transform: rotate3d(0, 0, 1, -5deg);
319
- transform: rotate3d(0, 0, 1, -5deg);
320
- }
321
-
322
- 100% {
323
- -webkit-transform: rotate3d(0, 0, 1, 0deg);
324
- transform: rotate3d(0, 0, 1, 0deg);
325
- }
326
- }
327
-
328
- .swing {
329
- -webkit-transform-origin: top center;
330
- -ms-transform-origin: top center;
331
- transform-origin: top center;
332
- -webkit-animation-name: swing;
333
- animation-name: swing;
334
- }
335
-
336
- @-webkit-keyframes tada {
337
- 0% {
338
- -webkit-transform: scale3d(1, 1, 1);
339
- transform: scale3d(1, 1, 1);
340
- }
341
-
342
- 10%, 20% {
343
- -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
344
- transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
345
- }
346
-
347
- 30%, 50%, 70%, 90% {
348
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
349
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
350
- }
351
-
352
- 40%, 60%, 80% {
353
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
354
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
355
- }
356
-
357
- 100% {
358
- -webkit-transform: scale3d(1, 1, 1);
359
- transform: scale3d(1, 1, 1);
360
- }
361
- }
362
-
363
- @keyframes tada {
364
- 0% {
365
- -webkit-transform: scale3d(1, 1, 1);
366
- transform: scale3d(1, 1, 1);
367
- }
368
-
369
- 10%, 20% {
370
- -webkit-transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
371
- transform: scale3d(.9, .9, .9) rotate3d(0, 0, 1, -3deg);
372
- }
373
-
374
- 30%, 50%, 70%, 90% {
375
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
376
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, 3deg);
377
- }
378
-
379
- 40%, 60%, 80% {
380
- -webkit-transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
381
- transform: scale3d(1.1, 1.1, 1.1) rotate3d(0, 0, 1, -3deg);
382
- }
383
-
384
- 100% {
385
- -webkit-transform: scale3d(1, 1, 1);
386
- transform: scale3d(1, 1, 1);
387
- }
388
- }
389
-
390
- .tada {
391
- -webkit-animation-name: tada;
392
- animation-name: tada;
393
- }
394
-
395
- /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
396
-
397
- @-webkit-keyframes wobble {
398
- 0% {
399
- -webkit-transform: none;
400
- transform: none;
401
- }
402
-
403
- 15% {
404
- -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
405
- transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
406
- }
407
-
408
- 30% {
409
- -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
410
- transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
411
- }
412
-
413
- 45% {
414
- -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
415
- transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
416
- }
417
-
418
- 60% {
419
- -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
420
- transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
421
- }
422
-
423
- 75% {
424
- -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
425
- transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
426
- }
427
-
428
- 100% {
429
- -webkit-transform: none;
430
- transform: none;
431
- }
432
- }
433
-
434
- @keyframes wobble {
435
- 0% {
436
- -webkit-transform: none;
437
- transform: none;
438
- }
439
-
440
- 15% {
441
- -webkit-transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
442
- transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg);
443
- }
444
-
445
- 30% {
446
- -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
447
- transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg);
448
- }
449
-
450
- 45% {
451
- -webkit-transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
452
- transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg);
453
- }
454
-
455
- 60% {
456
- -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
457
- transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg);
458
- }
459
-
460
- 75% {
461
- -webkit-transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
462
- transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg);
463
- }
464
-
465
- 100% {
466
- -webkit-transform: none;
467
- transform: none;
468
- }
469
- }
470
-
471
- .wobble {
472
- -webkit-animation-name: wobble;
473
- animation-name: wobble;
474
- }
475
-
476
- @-webkit-keyframes bounceIn {
477
- 0%, 20%, 40%, 60%, 80%, 100% {
478
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
479
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
480
- }
481
-
482
- 0% {
483
- opacity: 0;
484
- -webkit-transform: scale3d(.3, .3, .3);
485
- transform: scale3d(.3, .3, .3);
486
- }
487
-
488
- 20% {
489
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
490
- transform: scale3d(1.1, 1.1, 1.1);
491
- }
492
-
493
- 40% {
494
- -webkit-transform: scale3d(.9, .9, .9);
495
- transform: scale3d(.9, .9, .9);
496
- }
497
-
498
- 60% {
499
- opacity: 1;
500
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
501
- transform: scale3d(1.03, 1.03, 1.03);
502
- }
503
-
504
- 80% {
505
- -webkit-transform: scale3d(.97, .97, .97);
506
- transform: scale3d(.97, .97, .97);
507
- }
508
-
509
- 100% {
510
- opacity: 1;
511
- -webkit-transform: scale3d(1, 1, 1);
512
- transform: scale3d(1, 1, 1);
513
- }
514
- }
515
-
516
- @keyframes bounceIn {
517
- 0%, 20%, 40%, 60%, 80%, 100% {
518
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
519
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
520
- }
521
-
522
- 0% {
523
- opacity: 0;
524
- -webkit-transform: scale3d(.3, .3, .3);
525
- transform: scale3d(.3, .3, .3);
526
- }
527
-
528
- 20% {
529
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
530
- transform: scale3d(1.1, 1.1, 1.1);
531
- }
532
-
533
- 40% {
534
- -webkit-transform: scale3d(.9, .9, .9);
535
- transform: scale3d(.9, .9, .9);
536
- }
537
-
538
- 60% {
539
- opacity: 1;
540
- -webkit-transform: scale3d(1.03, 1.03, 1.03);
541
- transform: scale3d(1.03, 1.03, 1.03);
542
- }
543
-
544
- 80% {
545
- -webkit-transform: scale3d(.97, .97, .97);
546
- transform: scale3d(.97, .97, .97);
547
- }
548
-
549
- 100% {
550
- opacity: 1;
551
- -webkit-transform: scale3d(1, 1, 1);
552
- transform: scale3d(1, 1, 1);
553
- }
554
- }
555
-
556
- .bounceIn {
557
- -webkit-animation-name: bounceIn;
558
- animation-name: bounceIn;
559
- -webkit-animation-duration: .75s;
560
- animation-duration: .75s;
561
- }
562
-
563
- @-webkit-keyframes bounceInDown {
564
- 0%, 60%, 75%, 90%, 100% {
565
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
566
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
567
- }
568
-
569
- 0% {
570
- opacity: 0;
571
- -webkit-transform: translate3d(0, -3000px, 0);
572
- transform: translate3d(0, -3000px, 0);
573
- }
574
-
575
- 60% {
576
- opacity: 1;
577
- -webkit-transform: translate3d(0, 25px, 0);
578
- transform: translate3d(0, 25px, 0);
579
- }
580
-
581
- 75% {
582
- -webkit-transform: translate3d(0, -10px, 0);
583
- transform: translate3d(0, -10px, 0);
584
- }
585
-
586
- 90% {
587
- -webkit-transform: translate3d(0, 5px, 0);
588
- transform: translate3d(0, 5px, 0);
589
- }
590
-
591
- 100% {
592
- -webkit-transform: none;
593
- transform: none;
594
- }
595
- }
596
-
597
- @keyframes bounceInDown {
598
- 0%, 60%, 75%, 90%, 100% {
599
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
600
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
601
- }
602
-
603
- 0% {
604
- opacity: 0;
605
- -webkit-transform: translate3d(0, -3000px, 0);
606
- transform: translate3d(0, -3000px, 0);
607
- }
608
-
609
- 60% {
610
- opacity: 1;
611
- -webkit-transform: translate3d(0, 25px, 0);
612
- transform: translate3d(0, 25px, 0);
613
- }
614
-
615
- 75% {
616
- -webkit-transform: translate3d(0, -10px, 0);
617
- transform: translate3d(0, -10px, 0);
618
- }
619
-
620
- 90% {
621
- -webkit-transform: translate3d(0, 5px, 0);
622
- transform: translate3d(0, 5px, 0);
623
- }
624
-
625
- 100% {
626
- -webkit-transform: none;
627
- transform: none;
628
- }
629
- }
630
-
631
- .bounceInDown {
632
- -webkit-animation-name: bounceInDown;
633
- animation-name: bounceInDown;
634
- }
635
-
636
- @-webkit-keyframes bounceInLeft {
637
- 0%, 60%, 75%, 90%, 100% {
638
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
639
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
640
- }
641
-
642
- 0% {
643
- opacity: 0;
644
- -webkit-transform: translate3d(-3000px, 0, 0);
645
- transform: translate3d(-3000px, 0, 0);
646
- }
647
-
648
- 60% {
649
- opacity: 1;
650
- -webkit-transform: translate3d(25px, 0, 0);
651
- transform: translate3d(25px, 0, 0);
652
- }
653
-
654
- 75% {
655
- -webkit-transform: translate3d(-10px, 0, 0);
656
- transform: translate3d(-10px, 0, 0);
657
- }
658
-
659
- 90% {
660
- -webkit-transform: translate3d(5px, 0, 0);
661
- transform: translate3d(5px, 0, 0);
662
- }
663
-
664
- 100% {
665
- -webkit-transform: none;
666
- transform: none;
667
- }
668
- }
669
-
670
- @keyframes bounceInLeft {
671
- 0%, 60%, 75%, 90%, 100% {
672
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
673
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
674
- }
675
-
676
- 0% {
677
- opacity: 0;
678
- -webkit-transform: translate3d(-3000px, 0, 0);
679
- transform: translate3d(-3000px, 0, 0);
680
- }
681
-
682
- 60% {
683
- opacity: 1;
684
- -webkit-transform: translate3d(25px, 0, 0);
685
- transform: translate3d(25px, 0, 0);
686
- }
687
-
688
- 75% {
689
- -webkit-transform: translate3d(-10px, 0, 0);
690
- transform: translate3d(-10px, 0, 0);
691
- }
692
-
693
- 90% {
694
- -webkit-transform: translate3d(5px, 0, 0);
695
- transform: translate3d(5px, 0, 0);
696
- }
697
-
698
- 100% {
699
- -webkit-transform: none;
700
- transform: none;
701
- }
702
- }
703
-
704
- .bounceInLeft {
705
- -webkit-animation-name: bounceInLeft;
706
- animation-name: bounceInLeft;
707
- }
708
-
709
- @-webkit-keyframes bounceInRight {
710
- 0%, 60%, 75%, 90%, 100% {
711
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
712
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
713
- }
714
-
715
- 0% {
716
- opacity: 0;
717
- -webkit-transform: translate3d(3000px, 0, 0);
718
- transform: translate3d(3000px, 0, 0);
719
- }
720
-
721
- 60% {
722
- opacity: 1;
723
- -webkit-transform: translate3d(-25px, 0, 0);
724
- transform: translate3d(-25px, 0, 0);
725
- }
726
-
727
- 75% {
728
- -webkit-transform: translate3d(10px, 0, 0);
729
- transform: translate3d(10px, 0, 0);
730
- }
731
-
732
- 90% {
733
- -webkit-transform: translate3d(-5px, 0, 0);
734
- transform: translate3d(-5px, 0, 0);
735
- }
736
-
737
- 100% {
738
- -webkit-transform: none;
739
- transform: none;
740
- }
741
- }
742
-
743
- @keyframes bounceInRight {
744
- 0%, 60%, 75%, 90%, 100% {
745
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
746
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
747
- }
748
-
749
- 0% {
750
- opacity: 0;
751
- -webkit-transform: translate3d(3000px, 0, 0);
752
- transform: translate3d(3000px, 0, 0);
753
- }
754
-
755
- 60% {
756
- opacity: 1;
757
- -webkit-transform: translate3d(-25px, 0, 0);
758
- transform: translate3d(-25px, 0, 0);
759
- }
760
-
761
- 75% {
762
- -webkit-transform: translate3d(10px, 0, 0);
763
- transform: translate3d(10px, 0, 0);
764
- }
765
-
766
- 90% {
767
- -webkit-transform: translate3d(-5px, 0, 0);
768
- transform: translate3d(-5px, 0, 0);
769
- }
770
-
771
- 100% {
772
- -webkit-transform: none;
773
- transform: none;
774
- }
775
- }
776
-
777
- .bounceInRight {
778
- -webkit-animation-name: bounceInRight;
779
- animation-name: bounceInRight;
780
- }
781
-
782
- @-webkit-keyframes bounceInUp {
783
- 0%, 60%, 75%, 90%, 100% {
784
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
785
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
786
- }
787
-
788
- 0% {
789
- opacity: 0;
790
- -webkit-transform: translate3d(0, 3000px, 0);
791
- transform: translate3d(0, 3000px, 0);
792
- }
793
-
794
- 60% {
795
- opacity: 1;
796
- -webkit-transform: translate3d(0, -20px, 0);
797
- transform: translate3d(0, -20px, 0);
798
- }
799
-
800
- 75% {
801
- -webkit-transform: translate3d(0, 10px, 0);
802
- transform: translate3d(0, 10px, 0);
803
- }
804
-
805
- 90% {
806
- -webkit-transform: translate3d(0, -5px, 0);
807
- transform: translate3d(0, -5px, 0);
808
- }
809
-
810
- 100% {
811
- -webkit-transform: translate3d(0, 0, 0);
812
- transform: translate3d(0, 0, 0);
813
- }
814
- }
815
-
816
- @keyframes bounceInUp {
817
- 0%, 60%, 75%, 90%, 100% {
818
- -webkit-transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
819
- transition-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
820
- }
821
-
822
- 0% {
823
- opacity: 0;
824
- -webkit-transform: translate3d(0, 3000px, 0);
825
- transform: translate3d(0, 3000px, 0);
826
- }
827
-
828
- 60% {
829
- opacity: 1;
830
- -webkit-transform: translate3d(0, -20px, 0);
831
- transform: translate3d(0, -20px, 0);
832
- }
833
-
834
- 75% {
835
- -webkit-transform: translate3d(0, 10px, 0);
836
- transform: translate3d(0, 10px, 0);
837
- }
838
-
839
- 90% {
840
- -webkit-transform: translate3d(0, -5px, 0);
841
- transform: translate3d(0, -5px, 0);
842
- }
843
-
844
- 100% {
845
- -webkit-transform: translate3d(0, 0, 0);
846
- transform: translate3d(0, 0, 0);
847
- }
848
- }
849
-
850
- .bounceInUp {
851
- -webkit-animation-name: bounceInUp;
852
- animation-name: bounceInUp;
853
- }
854
-
855
- @-webkit-keyframes bounceOut {
856
- 20% {
857
- -webkit-transform: scale3d(.9, .9, .9);
858
- transform: scale3d(.9, .9, .9);
859
- }
860
-
861
- 50%, 55% {
862
- opacity: 1;
863
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
864
- transform: scale3d(1.1, 1.1, 1.1);
865
- }
866
-
867
- 100% {
868
- opacity: 0;
869
- -webkit-transform: scale3d(.3, .3, .3);
870
- transform: scale3d(.3, .3, .3);
871
- }
872
- }
873
-
874
- @keyframes bounceOut {
875
- 20% {
876
- -webkit-transform: scale3d(.9, .9, .9);
877
- transform: scale3d(.9, .9, .9);
878
- }
879
-
880
- 50%, 55% {
881
- opacity: 1;
882
- -webkit-transform: scale3d(1.1, 1.1, 1.1);
883
- transform: scale3d(1.1, 1.1, 1.1);
884
- }
885
-
886
- 100% {
887
- opacity: 0;
888
- -webkit-transform: scale3d(.3, .3, .3);
889
- transform: scale3d(.3, .3, .3);
890
- }
891
- }
892
-
893
- .bounceOut {
894
- -webkit-animation-name: bounceOut;
895
- animation-name: bounceOut;
896
- -webkit-animation-duration: .75s;
897
- animation-duration: .75s;
898
- }
899
-
900
- @-webkit-keyframes bounceOutDown {
901
- 20% {
902
- -webkit-transform: translate3d(0, 10px, 0);
903
- transform: translate3d(0, 10px, 0);
904
- }
905
-
906
- 40%, 45% {
907
- opacity: 1;
908
- -webkit-transform: translate3d(0, -20px, 0);
909
- transform: translate3d(0, -20px, 0);
910
- }
911
-
912
- 100% {
913
- opacity: 0;
914
- -webkit-transform: translate3d(0, 2000px, 0);
915
- transform: translate3d(0, 2000px, 0);
916
- }
917
- }
918
-
919
- @keyframes bounceOutDown {
920
- 20% {
921
- -webkit-transform: translate3d(0, 10px, 0);
922
- transform: translate3d(0, 10px, 0);
923
- }
924
-
925
- 40%, 45% {
926
- opacity: 1;
927
- -webkit-transform: translate3d(0, -20px, 0);
928
- transform: translate3d(0, -20px, 0);
929
- }
930
-
931
- 100% {
932
- opacity: 0;
933
- -webkit-transform: translate3d(0, 2000px, 0);
934
- transform: translate3d(0, 2000px, 0);
935
- }
936
- }
937
-
938
- .bounceOutDown {
939
- -webkit-animation-name: bounceOutDown;
940
- animation-name: bounceOutDown;
941
- }
942
-
943
- @-webkit-keyframes bounceOutLeft {
944
- 20% {
945
- opacity: 1;
946
- -webkit-transform: translate3d(20px, 0, 0);
947
- transform: translate3d(20px, 0, 0);
948
- }
949
-
950
- 100% {
951
- opacity: 0;
952
- -webkit-transform: translate3d(-2000px, 0, 0);
953
- transform: translate3d(-2000px, 0, 0);
954
- }
955
- }
956
-
957
- @keyframes bounceOutLeft {
958
- 20% {
959
- opacity: 1;
960
- -webkit-transform: translate3d(20px, 0, 0);
961
- transform: translate3d(20px, 0, 0);
962
- }
963
-
964
- 100% {
965
- opacity: 0;
966
- -webkit-transform: translate3d(-2000px, 0, 0);
967
- transform: translate3d(-2000px, 0, 0);
968
- }
969
- }
970
-
971
- .bounceOutLeft {
972
- -webkit-animation-name: bounceOutLeft;
973
- animation-name: bounceOutLeft;
974
- }
975
-
976
- @-webkit-keyframes bounceOutRight {
977
- 20% {
978
- opacity: 1;
979
- -webkit-transform: translate3d(-20px, 0, 0);
980
- transform: translate3d(-20px, 0, 0);
981
- }
982
-
983
- 100% {
984
- opacity: 0;
985
- -webkit-transform: translate3d(2000px, 0, 0);
986
- transform: translate3d(2000px, 0, 0);
987
- }
988
- }
989
-
990
- @keyframes bounceOutRight {
991
- 20% {
992
- opacity: 1;
993
- -webkit-transform: translate3d(-20px, 0, 0);
994
- transform: translate3d(-20px, 0, 0);
995
- }
996
-
997
- 100% {
998
- opacity: 0;
999
- -webkit-transform: translate3d(2000px, 0, 0);
1000
- transform: translate3d(2000px, 0, 0);
1001
- }
1002
- }
1003
-
1004
- .bounceOutRight {
1005
- -webkit-animation-name: bounceOutRight;
1006
- animation-name: bounceOutRight;
1007
- }
1008
-
1009
- @-webkit-keyframes bounceOutUp {
1010
- 20% {
1011
- -webkit-transform: translate3d(0, -10px, 0);
1012
- transform: translate3d(0, -10px, 0);
1013
- }
1014
-
1015
- 40%, 45% {
1016
- opacity: 1;
1017
- -webkit-transform: translate3d(0, 20px, 0);
1018
- transform: translate3d(0, 20px, 0);
1019
- }
1020
-
1021
- 100% {
1022
- opacity: 0;
1023
- -webkit-transform: translate3d(0, -2000px, 0);
1024
- transform: translate3d(0, -2000px, 0);
1025
- }
1026
- }
1027
-
1028
- @keyframes bounceOutUp {
1029
- 20% {
1030
- -webkit-transform: translate3d(0, -10px, 0);
1031
- transform: translate3d(0, -10px, 0);
1032
- }
1033
-
1034
- 40%, 45% {
1035
- opacity: 1;
1036
- -webkit-transform: translate3d(0, 20px, 0);
1037
- transform: translate3d(0, 20px, 0);
1038
- }
1039
-
1040
- 100% {
1041
- opacity: 0;
1042
- -webkit-transform: translate3d(0, -2000px, 0);
1043
- transform: translate3d(0, -2000px, 0);
1044
- }
1045
- }
1046
-
1047
- .bounceOutUp {
1048
- -webkit-animation-name: bounceOutUp;
1049
- animation-name: bounceOutUp;
1050
- }
1051
-
1052
- @-webkit-keyframes fadeIn {
1053
- 0% {opacity: 0;}
1054
- 100% {opacity: 1;}
1055
- }
1056
-
1057
- @keyframes fadeIn {
1058
- 0% {opacity: 0;}
1059
- 100% {opacity: 1;}
1060
- }
1061
-
1062
- .fadeIn {
1063
- -webkit-animation-name: fadeIn;
1064
- animation-name: fadeIn;
1065
- }
1066
-
1067
- @-webkit-keyframes fadeInDown {
1068
- 0% {
1069
- opacity: 0;
1070
- -webkit-transform: translate3d(0, -100%, 0);
1071
- transform: translate3d(0, -100%, 0);
1072
- }
1073
-
1074
- 100% {
1075
- opacity: 1;
1076
- -webkit-transform: none;
1077
- transform: none;
1078
- }
1079
- }
1080
-
1081
- @keyframes fadeInDown {
1082
- 0% {
1083
- opacity: 0;
1084
- -webkit-transform: translate3d(0, -100%, 0);
1085
- transform: translate3d(0, -100%, 0);
1086
- }
1087
-
1088
- 100% {
1089
- opacity: 1;
1090
- -webkit-transform: none;
1091
- transform: none;
1092
- }
1093
- }
1094
-
1095
- .fadeInDown {
1096
- -webkit-animation-name: fadeInDown;
1097
- animation-name: fadeInDown;
1098
- }
1099
-
1100
- @-webkit-keyframes fadeInDownBig {
1101
- 0% {
1102
- opacity: 0;
1103
- -webkit-transform: translate3d(0, -2000px, 0);
1104
- transform: translate3d(0, -2000px, 0);
1105
- }
1106
-
1107
- 100% {
1108
- opacity: 1;
1109
- -webkit-transform: none;
1110
- transform: none;
1111
- }
1112
- }
1113
-
1114
- @keyframes fadeInDownBig {
1115
- 0% {
1116
- opacity: 0;
1117
- -webkit-transform: translate3d(0, -2000px, 0);
1118
- transform: translate3d(0, -2000px, 0);
1119
- }
1120
-
1121
- 100% {
1122
- opacity: 1;
1123
- -webkit-transform: none;
1124
- transform: none;
1125
- }
1126
- }
1127
-
1128
- .fadeInDownBig {
1129
- -webkit-animation-name: fadeInDownBig;
1130
- animation-name: fadeInDownBig;
1131
- }
1132
-
1133
- @-webkit-keyframes fadeInLeft {
1134
- 0% {
1135
- opacity: 0;
1136
- -webkit-transform: translate3d(-100%, 0, 0);
1137
- transform: translate3d(-100%, 0, 0);
1138
- }
1139
-
1140
- 100% {
1141
- opacity: 1;
1142
- -webkit-transform: none;
1143
- transform: none;
1144
- }
1145
- }
1146
-
1147
- @keyframes fadeInLeft {
1148
- 0% {
1149
- opacity: 0;
1150
- -webkit-transform: translate3d(-100%, 0, 0);
1151
- transform: translate3d(-100%, 0, 0);
1152
- }
1153
-
1154
- 100% {
1155
- opacity: 1;
1156
- -webkit-transform: none;
1157
- transform: none;
1158
- }
1159
- }
1160
-
1161
- .fadeInLeft {
1162
- -webkit-animation-name: fadeInLeft;
1163
- animation-name: fadeInLeft;
1164
- }
1165
-
1166
- @-webkit-keyframes fadeInLeftBig {
1167
- 0% {
1168
- opacity: 0;
1169
- -webkit-transform: translate3d(-2000px, 0, 0);
1170
- transform: translate3d(-2000px, 0, 0);
1171
- }
1172
-
1173
- 100% {
1174
- opacity: 1;
1175
- -webkit-transform: none;
1176
- transform: none;
1177
- }
1178
- }
1179
-
1180
- @keyframes fadeInLeftBig {
1181
- 0% {
1182
- opacity: 0;
1183
- -webkit-transform: translate3d(-2000px, 0, 0);
1184
- transform: translate3d(-2000px, 0, 0);
1185
- }
1186
-
1187
- 100% {
1188
- opacity: 1;
1189
- -webkit-transform: none;
1190
- transform: none;
1191
- }
1192
- }
1193
-
1194
- .fadeInLeftBig {
1195
- -webkit-animation-name: fadeInLeftBig;
1196
- animation-name: fadeInLeftBig;
1197
- }
1198
-
1199
- @-webkit-keyframes fadeInRight {
1200
- 0% {
1201
- opacity: 0;
1202
- -webkit-transform: translate3d(100%, 0, 0);
1203
- transform: translate3d(100%, 0, 0);
1204
- }
1205
-
1206
- 100% {
1207
- opacity: 1;
1208
- -webkit-transform: none;
1209
- transform: none;
1210
- }
1211
- }
1212
-
1213
- @keyframes fadeInRight {
1214
- 0% {
1215
- opacity: 0;
1216
- -webkit-transform: translate3d(100%, 0, 0);
1217
- transform: translate3d(100%, 0, 0);
1218
- }
1219
-
1220
- 100% {
1221
- opacity: 1;
1222
- -webkit-transform: none;
1223
- transform: none;
1224
- }
1225
- }
1226
-
1227
- .fadeInRight {
1228
- -webkit-animation-name: fadeInRight;
1229
- animation-name: fadeInRight;
1230
- }
1231
-
1232
- @-webkit-keyframes fadeInRightBig {
1233
- 0% {
1234
- opacity: 0;
1235
- -webkit-transform: translate3d(2000px, 0, 0);
1236
- transform: translate3d(2000px, 0, 0);
1237
- }
1238
-
1239
- 100% {
1240
- opacity: 1;
1241
- -webkit-transform: none;
1242
- transform: none;
1243
- }
1244
- }
1245
-
1246
- @keyframes fadeInRightBig {
1247
- 0% {
1248
- opacity: 0;
1249
- -webkit-transform: translate3d(2000px, 0, 0);
1250
- transform: translate3d(2000px, 0, 0);
1251
- }
1252
-
1253
- 100% {
1254
- opacity: 1;
1255
- -webkit-transform: none;
1256
- transform: none;
1257
- }
1258
- }
1259
-
1260
- .fadeInRightBig {
1261
- -webkit-animation-name: fadeInRightBig;
1262
- animation-name: fadeInRightBig;
1263
- }
1264
-
1265
- @-webkit-keyframes fadeInUp {
1266
- 0% {
1267
- opacity: 0;
1268
- -webkit-transform: translate3d(0, 100%, 0);
1269
- transform: translate3d(0, 100%, 0);
1270
- }
1271
-
1272
- 100% {
1273
- opacity: 1;
1274
- -webkit-transform: none;
1275
- transform: none;
1276
- }
1277
- }
1278
-
1279
- @keyframes fadeInUp {
1280
- 0% {
1281
- opacity: 0;
1282
- -webkit-transform: translate3d(0, 100%, 0);
1283
- transform: translate3d(0, 100%, 0);
1284
- }
1285
-
1286
- 100% {
1287
- opacity: 1;
1288
- -webkit-transform: none;
1289
- transform: none;
1290
- }
1291
- }
1292
-
1293
- .fadeInUp {
1294
- -webkit-animation-name: fadeInUp;
1295
- animation-name: fadeInUp;
1296
- }
1297
-
1298
- @-webkit-keyframes fadeInUpBig {
1299
- 0% {
1300
- opacity: 0;
1301
- -webkit-transform: translate3d(0, 2000px, 0);
1302
- transform: translate3d(0, 2000px, 0);
1303
- }
1304
-
1305
- 100% {
1306
- opacity: 1;
1307
- -webkit-transform: none;
1308
- transform: none;
1309
- }
1310
- }
1311
-
1312
- @keyframes fadeInUpBig {
1313
- 0% {
1314
- opacity: 0;
1315
- -webkit-transform: translate3d(0, 2000px, 0);
1316
- transform: translate3d(0, 2000px, 0);
1317
- }
1318
-
1319
- 100% {
1320
- opacity: 1;
1321
- -webkit-transform: none;
1322
- transform: none;
1323
- }
1324
- }
1325
-
1326
- .fadeInUpBig {
1327
- -webkit-animation-name: fadeInUpBig;
1328
- animation-name: fadeInUpBig;
1329
- }
1330
-
1331
- @-webkit-keyframes fadeOut {
1332
- 0% {opacity: 1;}
1333
- 100% {opacity: 0;}
1334
- }
1335
-
1336
- @keyframes fadeOut {
1337
- 0% {opacity: 1;}
1338
- 100% {opacity: 0;}
1339
- }
1340
-
1341
- .fadeOut {
1342
- -webkit-animation-name: fadeOut;
1343
- animation-name: fadeOut;
1344
- }
1345
-
1346
- @-webkit-keyframes fadeOutDown {
1347
- 0% {
1348
- opacity: 1;
1349
- }
1350
-
1351
- 100% {
1352
- opacity: 0;
1353
- -webkit-transform: translate3d(0, 100%, 0);
1354
- transform: translate3d(0, 100%, 0);
1355
- }
1356
- }
1357
-
1358
- @keyframes fadeOutDown {
1359
- 0% {
1360
- opacity: 1;
1361
- }
1362
-
1363
- 100% {
1364
- opacity: 0;
1365
- -webkit-transform: translate3d(0, 100%, 0);
1366
- transform: translate3d(0, 100%, 0);
1367
- }
1368
- }
1369
-
1370
- .fadeOutDown {
1371
- -webkit-animation-name: fadeOutDown;
1372
- animation-name: fadeOutDown;
1373
- }
1374
-
1375
- @-webkit-keyframes fadeOutDownBig {
1376
- 0% {
1377
- opacity: 1;
1378
- }
1379
-
1380
- 100% {
1381
- opacity: 0;
1382
- -webkit-transform: translate3d(0, 2000px, 0);
1383
- transform: translate3d(0, 2000px, 0);
1384
- }
1385
- }
1386
-
1387
- @keyframes fadeOutDownBig {
1388
- 0% {
1389
- opacity: 1;
1390
- }
1391
-
1392
- 100% {
1393
- opacity: 0;
1394
- -webkit-transform: translate3d(0, 2000px, 0);
1395
- transform: translate3d(0, 2000px, 0);
1396
- }
1397
- }
1398
-
1399
- .fadeOutDownBig {
1400
- -webkit-animation-name: fadeOutDownBig;
1401
- animation-name: fadeOutDownBig;
1402
- }
1403
-
1404
- @-webkit-keyframes fadeOutLeft {
1405
- 0% {
1406
- opacity: 1;
1407
- }
1408
-
1409
- 100% {
1410
- opacity: 0;
1411
- -webkit-transform: translate3d(-100%, 0, 0);
1412
- transform: translate3d(-100%, 0, 0);
1413
- }
1414
- }
1415
-
1416
- @keyframes fadeOutLeft {
1417
- 0% {
1418
- opacity: 1;
1419
- }
1420
-
1421
- 100% {
1422
- opacity: 0;
1423
- -webkit-transform: translate3d(-100%, 0, 0);
1424
- transform: translate3d(-100%, 0, 0);
1425
- }
1426
- }
1427
-
1428
- .fadeOutLeft {
1429
- -webkit-animation-name: fadeOutLeft;
1430
- animation-name: fadeOutLeft;
1431
- }
1432
-
1433
- @-webkit-keyframes fadeOutLeftBig {
1434
- 0% {
1435
- opacity: 1;
1436
- }
1437
-
1438
- 100% {
1439
- opacity: 0;
1440
- -webkit-transform: translate3d(-2000px, 0, 0);
1441
- transform: translate3d(-2000px, 0, 0);
1442
- }
1443
- }
1444
-
1445
- @keyframes fadeOutLeftBig {
1446
- 0% {
1447
- opacity: 1;
1448
- }
1449
-
1450
- 100% {
1451
- opacity: 0;
1452
- -webkit-transform: translate3d(-2000px, 0, 0);
1453
- transform: translate3d(-2000px, 0, 0);
1454
- }
1455
- }
1456
-
1457
- .fadeOutLeftBig {
1458
- -webkit-animation-name: fadeOutLeftBig;
1459
- animation-name: fadeOutLeftBig;
1460
- }
1461
-
1462
- @-webkit-keyframes fadeOutRight {
1463
- 0% {
1464
- opacity: 1;
1465
- }
1466
-
1467
- 100% {
1468
- opacity: 0;
1469
- -webkit-transform: translate3d(100%, 0, 0);
1470
- transform: translate3d(100%, 0, 0);
1471
- }
1472
- }
1473
-
1474
- @keyframes fadeOutRight {
1475
- 0% {
1476
- opacity: 1;
1477
- }
1478
-
1479
- 100% {
1480
- opacity: 0;
1481
- -webkit-transform: translate3d(100%, 0, 0);
1482
- transform: translate3d(100%, 0, 0);
1483
- }
1484
- }
1485
-
1486
- .fadeOutRight {
1487
- -webkit-animation-name: fadeOutRight;
1488
- animation-name: fadeOutRight;
1489
- }
1490
-
1491
- @-webkit-keyframes fadeOutRightBig {
1492
- 0% {
1493
- opacity: 1;
1494
- }
1495
-
1496
- 100% {
1497
- opacity: 0;
1498
- -webkit-transform: translate3d(2000px, 0, 0);
1499
- transform: translate3d(2000px, 0, 0);
1500
- }
1501
- }
1502
-
1503
- @keyframes fadeOutRightBig {
1504
- 0% {
1505
- opacity: 1;
1506
- }
1507
-
1508
- 100% {
1509
- opacity: 0;
1510
- -webkit-transform: translate3d(2000px, 0, 0);
1511
- transform: translate3d(2000px, 0, 0);
1512
- }
1513
- }
1514
-
1515
- .fadeOutRightBig {
1516
- -webkit-animation-name: fadeOutRightBig;
1517
- animation-name: fadeOutRightBig;
1518
- }
1519
-
1520
- @-webkit-keyframes fadeOutUp {
1521
- 0% {
1522
- opacity: 1;
1523
- }
1524
-
1525
- 100% {
1526
- opacity: 0;
1527
- -webkit-transform: translate3d(0, -100%, 0);
1528
- transform: translate3d(0, -100%, 0);
1529
- }
1530
- }
1531
-
1532
- @keyframes fadeOutUp {
1533
- 0% {
1534
- opacity: 1;
1535
- }
1536
-
1537
- 100% {
1538
- opacity: 0;
1539
- -webkit-transform: translate3d(0, -100%, 0);
1540
- transform: translate3d(0, -100%, 0);
1541
- }
1542
- }
1543
-
1544
- .fadeOutUp {
1545
- -webkit-animation-name: fadeOutUp;
1546
- animation-name: fadeOutUp;
1547
- }
1548
-
1549
- @-webkit-keyframes fadeOutUpBig {
1550
- 0% {
1551
- opacity: 1;
1552
- }
1553
-
1554
- 100% {
1555
- opacity: 0;
1556
- -webkit-transform: translate3d(0, -2000px, 0);
1557
- transform: translate3d(0, -2000px, 0);
1558
- }
1559
- }
1560
-
1561
- @keyframes fadeOutUpBig {
1562
- 0% {
1563
- opacity: 1;
1564
- }
1565
-
1566
- 100% {
1567
- opacity: 0;
1568
- -webkit-transform: translate3d(0, -2000px, 0);
1569
- transform: translate3d(0, -2000px, 0);
1570
- }
1571
- }
1572
-
1573
- .fadeOutUpBig {
1574
- -webkit-animation-name: fadeOutUpBig;
1575
- animation-name: fadeOutUpBig;
1576
- }
1577
-
1578
- @-webkit-keyframes flip {
1579
- 0% {
1580
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
1581
- transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
1582
- -webkit-animation-timing-function: ease-out;
1583
- animation-timing-function: ease-out;
1584
- }
1585
-
1586
- 40% {
1587
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
1588
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
1589
- -webkit-animation-timing-function: ease-out;
1590
- animation-timing-function: ease-out;
1591
- }
1592
-
1593
- 50% {
1594
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
1595
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
1596
- -webkit-animation-timing-function: ease-in;
1597
- animation-timing-function: ease-in;
1598
- }
1599
-
1600
- 80% {
1601
- -webkit-transform: perspective(400px) scale3d(.95, .95, .95);
1602
- transform: perspective(400px) scale3d(.95, .95, .95);
1603
- -webkit-animation-timing-function: ease-in;
1604
- animation-timing-function: ease-in;
1605
- }
1606
-
1607
- 100% {
1608
- -webkit-transform: perspective(400px);
1609
- transform: perspective(400px);
1610
- -webkit-animation-timing-function: ease-in;
1611
- animation-timing-function: ease-in;
1612
- }
1613
- }
1614
-
1615
- @keyframes flip {
1616
- 0% {
1617
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
1618
- transform: perspective(400px) rotate3d(0, 1, 0, -360deg);
1619
- -webkit-animation-timing-function: ease-out;
1620
- animation-timing-function: ease-out;
1621
- }
1622
-
1623
- 40% {
1624
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
1625
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -190deg);
1626
- -webkit-animation-timing-function: ease-out;
1627
- animation-timing-function: ease-out;
1628
- }
1629
-
1630
- 50% {
1631
- -webkit-transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
1632
- transform: perspective(400px) translate3d(0, 0, 150px) rotate3d(0, 1, 0, -170deg);
1633
- -webkit-animation-timing-function: ease-in;
1634
- animation-timing-function: ease-in;
1635
- }
1636
-
1637
- 80% {
1638
- -webkit-transform: perspective(400px) scale3d(.95, .95, .95);
1639
- transform: perspective(400px) scale3d(.95, .95, .95);
1640
- -webkit-animation-timing-function: ease-in;
1641
- animation-timing-function: ease-in;
1642
- }
1643
-
1644
- 100% {
1645
- -webkit-transform: perspective(400px);
1646
- transform: perspective(400px);
1647
- -webkit-animation-timing-function: ease-in;
1648
- animation-timing-function: ease-in;
1649
- }
1650
- }
1651
-
1652
- .animated.flip {
1653
- -webkit-backface-visibility: visible;
1654
- backface-visibility: visible;
1655
- -webkit-animation-name: flip;
1656
- animation-name: flip;
1657
- }
1658
-
1659
- @-webkit-keyframes flipInX {
1660
- 0% {
1661
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1662
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1663
- -webkit-transition-timing-function: ease-in;
1664
- transition-timing-function: ease-in;
1665
- opacity: 0;
1666
- }
1667
-
1668
- 40% {
1669
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1670
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1671
- -webkit-transition-timing-function: ease-in;
1672
- transition-timing-function: ease-in;
1673
- }
1674
-
1675
- 60% {
1676
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
1677
- transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
1678
- opacity: 1;
1679
- }
1680
-
1681
- 80% {
1682
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
1683
- transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
1684
- }
1685
-
1686
- 100% {
1687
- -webkit-transform: perspective(400px);
1688
- transform: perspective(400px);
1689
- }
1690
- }
1691
-
1692
- @keyframes flipInX {
1693
- 0% {
1694
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1695
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1696
- -webkit-transition-timing-function: ease-in;
1697
- transition-timing-function: ease-in;
1698
- opacity: 0;
1699
- }
1700
-
1701
- 40% {
1702
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1703
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1704
- -webkit-transition-timing-function: ease-in;
1705
- transition-timing-function: ease-in;
1706
- }
1707
-
1708
- 60% {
1709
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
1710
- transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
1711
- opacity: 1;
1712
- }
1713
-
1714
- 80% {
1715
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
1716
- transform: perspective(400px) rotate3d(1, 0, 0, -5deg);
1717
- }
1718
-
1719
- 100% {
1720
- -webkit-transform: perspective(400px);
1721
- transform: perspective(400px);
1722
- }
1723
- }
1724
-
1725
- .flipInX {
1726
- -webkit-backface-visibility: visible !important;
1727
- backface-visibility: visible !important;
1728
- -webkit-animation-name: flipInX;
1729
- animation-name: flipInX;
1730
- }
1731
-
1732
- @-webkit-keyframes flipInY {
1733
- 0% {
1734
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1735
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1736
- -webkit-transition-timing-function: ease-in;
1737
- transition-timing-function: ease-in;
1738
- opacity: 0;
1739
- }
1740
-
1741
- 40% {
1742
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
1743
- transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
1744
- -webkit-transition-timing-function: ease-in;
1745
- transition-timing-function: ease-in;
1746
- }
1747
-
1748
- 60% {
1749
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
1750
- transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
1751
- opacity: 1;
1752
- }
1753
-
1754
- 80% {
1755
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
1756
- transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
1757
- }
1758
-
1759
- 100% {
1760
- -webkit-transform: perspective(400px);
1761
- transform: perspective(400px);
1762
- }
1763
- }
1764
-
1765
- @keyframes flipInY {
1766
- 0% {
1767
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1768
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1769
- -webkit-transition-timing-function: ease-in;
1770
- transition-timing-function: ease-in;
1771
- opacity: 0;
1772
- }
1773
-
1774
- 40% {
1775
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
1776
- transform: perspective(400px) rotate3d(0, 1, 0, -20deg);
1777
- -webkit-transition-timing-function: ease-in;
1778
- transition-timing-function: ease-in;
1779
- }
1780
-
1781
- 60% {
1782
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
1783
- transform: perspective(400px) rotate3d(0, 1, 0, 10deg);
1784
- opacity: 1;
1785
- }
1786
-
1787
- 80% {
1788
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
1789
- transform: perspective(400px) rotate3d(0, 1, 0, -5deg);
1790
- }
1791
-
1792
- 100% {
1793
- -webkit-transform: perspective(400px);
1794
- transform: perspective(400px);
1795
- }
1796
- }
1797
-
1798
- .flipInY {
1799
- -webkit-backface-visibility: visible !important;
1800
- backface-visibility: visible !important;
1801
- -webkit-animation-name: flipInY;
1802
- animation-name: flipInY;
1803
- }
1804
-
1805
- @-webkit-keyframes flipOutX {
1806
- 0% {
1807
- -webkit-transform: perspective(400px);
1808
- transform: perspective(400px);
1809
- }
1810
-
1811
- 30% {
1812
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1813
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1814
- opacity: 1;
1815
- }
1816
-
1817
- 100% {
1818
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1819
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1820
- opacity: 0;
1821
- }
1822
- }
1823
-
1824
- @keyframes flipOutX {
1825
- 0% {
1826
- -webkit-transform: perspective(400px);
1827
- transform: perspective(400px);
1828
- }
1829
-
1830
- 30% {
1831
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1832
- transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
1833
- opacity: 1;
1834
- }
1835
-
1836
- 100% {
1837
- -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1838
- transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
1839
- opacity: 0;
1840
- }
1841
- }
1842
-
1843
- .flipOutX {
1844
- -webkit-animation-name: flipOutX;
1845
- animation-name: flipOutX;
1846
- -webkit-animation-duration: .75s;
1847
- animation-duration: .75s;
1848
- -webkit-backface-visibility: visible !important;
1849
- backface-visibility: visible !important;
1850
- }
1851
-
1852
- @-webkit-keyframes flipOutY {
1853
- 0% {
1854
- -webkit-transform: perspective(400px);
1855
- transform: perspective(400px);
1856
- }
1857
-
1858
- 30% {
1859
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
1860
- transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
1861
- opacity: 1;
1862
- }
1863
-
1864
- 100% {
1865
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1866
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1867
- opacity: 0;
1868
- }
1869
- }
1870
-
1871
- @keyframes flipOutY {
1872
- 0% {
1873
- -webkit-transform: perspective(400px);
1874
- transform: perspective(400px);
1875
- }
1876
-
1877
- 30% {
1878
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
1879
- transform: perspective(400px) rotate3d(0, 1, 0, -15deg);
1880
- opacity: 1;
1881
- }
1882
-
1883
- 100% {
1884
- -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1885
- transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
1886
- opacity: 0;
1887
- }
1888
- }
1889
-
1890
- .flipOutY {
1891
- -webkit-backface-visibility: visible !important;
1892
- backface-visibility: visible !important;
1893
- -webkit-animation-name: flipOutY;
1894
- animation-name: flipOutY;
1895
- -webkit-animation-duration: .75s;
1896
- animation-duration: .75s;
1897
- }
1898
-
1899
- @-webkit-keyframes lightSpeedIn {
1900
- 0% {
1901
- -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
1902
- transform: translate3d(100%, 0, 0) skewX(-30deg);
1903
- opacity: 0;
1904
- }
1905
-
1906
- 60% {
1907
- -webkit-transform: skewX(20deg);
1908
- transform: skewX(20deg);
1909
- opacity: 1;
1910
- }
1911
-
1912
- 80% {
1913
- -webkit-transform: skewX(-5deg);
1914
- transform: skewX(-5deg);
1915
- opacity: 1;
1916
- }
1917
-
1918
- 100% {
1919
- -webkit-transform: none;
1920
- transform: none;
1921
- opacity: 1;
1922
- }
1923
- }
1924
-
1925
- @keyframes lightSpeedIn {
1926
- 0% {
1927
- -webkit-transform: translate3d(100%, 0, 0) skewX(-30deg);
1928
- transform: translate3d(100%, 0, 0) skewX(-30deg);
1929
- opacity: 0;
1930
- }
1931
-
1932
- 60% {
1933
- -webkit-transform: skewX(20deg);
1934
- transform: skewX(20deg);
1935
- opacity: 1;
1936
- }
1937
-
1938
- 80% {
1939
- -webkit-transform: skewX(-5deg);
1940
- transform: skewX(-5deg);
1941
- opacity: 1;
1942
- }
1943
-
1944
- 100% {
1945
- -webkit-transform: none;
1946
- transform: none;
1947
- opacity: 1;
1948
- }
1949
- }
1950
-
1951
- .lightSpeedIn {
1952
- -webkit-animation-name: lightSpeedIn;
1953
- animation-name: lightSpeedIn;
1954
- -webkit-animation-timing-function: ease-out;
1955
- animation-timing-function: ease-out;
1956
- }
1957
-
1958
- @-webkit-keyframes lightSpeedOut {
1959
- 0% {
1960
- opacity: 1;
1961
- }
1962
-
1963
- 100% {
1964
- -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
1965
- transform: translate3d(100%, 0, 0) skewX(30deg);
1966
- opacity: 0;
1967
- }
1968
- }
1969
-
1970
- @keyframes lightSpeedOut {
1971
- 0% {
1972
- opacity: 1;
1973
- }
1974
-
1975
- 100% {
1976
- -webkit-transform: translate3d(100%, 0, 0) skewX(30deg);
1977
- transform: translate3d(100%, 0, 0) skewX(30deg);
1978
- opacity: 0;
1979
- }
1980
- }
1981
-
1982
- .lightSpeedOut {
1983
- -webkit-animation-name: lightSpeedOut;
1984
- animation-name: lightSpeedOut;
1985
- -webkit-animation-timing-function: ease-in;
1986
- animation-timing-function: ease-in;
1987
- }
1988
-
1989
- @-webkit-keyframes rotateIn {
1990
- 0% {
1991
- -webkit-transform-origin: center;
1992
- transform-origin: center;
1993
- -webkit-transform: rotate3d(0, 0, 1, -200deg);
1994
- transform: rotate3d(0, 0, 1, -200deg);
1995
- opacity: 0;
1996
- }
1997
-
1998
- 100% {
1999
- -webkit-transform-origin: center;
2000
- transform-origin: center;
2001
- -webkit-transform: none;
2002
- transform: none;
2003
- opacity: 1;
2004
- }
2005
- }
2006
-
2007
- @keyframes rotateIn {
2008
- 0% {
2009
- -webkit-transform-origin: center;
2010
- transform-origin: center;
2011
- -webkit-transform: rotate3d(0, 0, 1, -200deg);
2012
- transform: rotate3d(0, 0, 1, -200deg);
2013
- opacity: 0;
2014
- }
2015
-
2016
- 100% {
2017
- -webkit-transform-origin: center;
2018
- transform-origin: center;
2019
- -webkit-transform: none;
2020
- transform: none;
2021
- opacity: 1;
2022
- }
2023
- }
2024
-
2025
- .rotateIn {
2026
- -webkit-animation-name: rotateIn;
2027
- animation-name: rotateIn;
2028
- }
2029
-
2030
- @-webkit-keyframes rotateInDownLeft {
2031
- 0% {
2032
- -webkit-transform-origin: left bottom;
2033
- transform-origin: left bottom;
2034
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
2035
- transform: rotate3d(0, 0, 1, -45deg);
2036
- opacity: 0;
2037
- }
2038
-
2039
- 100% {
2040
- -webkit-transform-origin: left bottom;
2041
- transform-origin: left bottom;
2042
- -webkit-transform: none;
2043
- transform: none;
2044
- opacity: 1;
2045
- }
2046
- }
2047
-
2048
- @keyframes rotateInDownLeft {
2049
- 0% {
2050
- -webkit-transform-origin: left bottom;
2051
- transform-origin: left bottom;
2052
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
2053
- transform: rotate3d(0, 0, 1, -45deg);
2054
- opacity: 0;
2055
- }
2056
-
2057
- 100% {
2058
- -webkit-transform-origin: left bottom;
2059
- transform-origin: left bottom;
2060
- -webkit-transform: none;
2061
- transform: none;
2062
- opacity: 1;
2063
- }
2064
- }
2065
-
2066
- .rotateInDownLeft {
2067
- -webkit-animation-name: rotateInDownLeft;
2068
- animation-name: rotateInDownLeft;
2069
- }
2070
-
2071
- @-webkit-keyframes rotateInDownRight {
2072
- 0% {
2073
- -webkit-transform-origin: right bottom;
2074
- transform-origin: right bottom;
2075
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
2076
- transform: rotate3d(0, 0, 1, 45deg);
2077
- opacity: 0;
2078
- }
2079
-
2080
- 100% {
2081
- -webkit-transform-origin: right bottom;
2082
- transform-origin: right bottom;
2083
- -webkit-transform: none;
2084
- transform: none;
2085
- opacity: 1;
2086
- }
2087
- }
2088
-
2089
- @keyframes rotateInDownRight {
2090
- 0% {
2091
- -webkit-transform-origin: right bottom;
2092
- transform-origin: right bottom;
2093
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
2094
- transform: rotate3d(0, 0, 1, 45deg);
2095
- opacity: 0;
2096
- }
2097
-
2098
- 100% {
2099
- -webkit-transform-origin: right bottom;
2100
- transform-origin: right bottom;
2101
- -webkit-transform: none;
2102
- transform: none;
2103
- opacity: 1;
2104
- }
2105
- }
2106
-
2107
- .rotateInDownRight {
2108
- -webkit-animation-name: rotateInDownRight;
2109
- animation-name: rotateInDownRight;
2110
- }
2111
-
2112
- @-webkit-keyframes rotateInUpLeft {
2113
- 0% {
2114
- -webkit-transform-origin: left bottom;
2115
- transform-origin: left bottom;
2116
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
2117
- transform: rotate3d(0, 0, 1, 45deg);
2118
- opacity: 0;
2119
- }
2120
-
2121
- 100% {
2122
- -webkit-transform-origin: left bottom;
2123
- transform-origin: left bottom;
2124
- -webkit-transform: none;
2125
- transform: none;
2126
- opacity: 1;
2127
- }
2128
- }
2129
-
2130
- @keyframes rotateInUpLeft {
2131
- 0% {
2132
- -webkit-transform-origin: left bottom;
2133
- transform-origin: left bottom;
2134
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
2135
- transform: rotate3d(0, 0, 1, 45deg);
2136
- opacity: 0;
2137
- }
2138
-
2139
- 100% {
2140
- -webkit-transform-origin: left bottom;
2141
- transform-origin: left bottom;
2142
- -webkit-transform: none;
2143
- transform: none;
2144
- opacity: 1;
2145
- }
2146
- }
2147
-
2148
- .rotateInUpLeft {
2149
- -webkit-animation-name: rotateInUpLeft;
2150
- animation-name: rotateInUpLeft;
2151
- }
2152
-
2153
- @-webkit-keyframes rotateInUpRight {
2154
- 0% {
2155
- -webkit-transform-origin: right bottom;
2156
- transform-origin: right bottom;
2157
- -webkit-transform: rotate3d(0, 0, 1, -90deg);
2158
- transform: rotate3d(0, 0, 1, -90deg);
2159
- opacity: 0;
2160
- }
2161
-
2162
- 100% {
2163
- -webkit-transform-origin: right bottom;
2164
- transform-origin: right bottom;
2165
- -webkit-transform: none;
2166
- transform: none;
2167
- opacity: 1;
2168
- }
2169
- }
2170
-
2171
- @keyframes rotateInUpRight {
2172
- 0% {
2173
- -webkit-transform-origin: right bottom;
2174
- transform-origin: right bottom;
2175
- -webkit-transform: rotate3d(0, 0, 1, -90deg);
2176
- transform: rotate3d(0, 0, 1, -90deg);
2177
- opacity: 0;
2178
- }
2179
-
2180
- 100% {
2181
- -webkit-transform-origin: right bottom;
2182
- transform-origin: right bottom;
2183
- -webkit-transform: none;
2184
- transform: none;
2185
- opacity: 1;
2186
- }
2187
- }
2188
-
2189
- .rotateInUpRight {
2190
- -webkit-animation-name: rotateInUpRight;
2191
- animation-name: rotateInUpRight;
2192
- }
2193
-
2194
- @-webkit-keyframes rotateOut {
2195
- 0% {
2196
- -webkit-transform-origin: center;
2197
- transform-origin: center;
2198
- opacity: 1;
2199
- }
2200
-
2201
- 100% {
2202
- -webkit-transform-origin: center;
2203
- transform-origin: center;
2204
- -webkit-transform: rotate3d(0, 0, 1, 200deg);
2205
- transform: rotate3d(0, 0, 1, 200deg);
2206
- opacity: 0;
2207
- }
2208
- }
2209
-
2210
- @keyframes rotateOut {
2211
- 0% {
2212
- -webkit-transform-origin: center;
2213
- transform-origin: center;
2214
- opacity: 1;
2215
- }
2216
-
2217
- 100% {
2218
- -webkit-transform-origin: center;
2219
- transform-origin: center;
2220
- -webkit-transform: rotate3d(0, 0, 1, 200deg);
2221
- transform: rotate3d(0, 0, 1, 200deg);
2222
- opacity: 0;
2223
- }
2224
- }
2225
-
2226
- .rotateOut {
2227
- -webkit-animation-name: rotateOut;
2228
- animation-name: rotateOut;
2229
- }
2230
-
2231
- @-webkit-keyframes rotateOutDownLeft {
2232
- 0% {
2233
- -webkit-transform-origin: left bottom;
2234
- transform-origin: left bottom;
2235
- opacity: 1;
2236
- }
2237
-
2238
- 100% {
2239
- -webkit-transform-origin: left bottom;
2240
- transform-origin: left bottom;
2241
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
2242
- transform: rotate3d(0, 0, 1, 45deg);
2243
- opacity: 0;
2244
- }
2245
- }
2246
-
2247
- @keyframes rotateOutDownLeft {
2248
- 0% {
2249
- -webkit-transform-origin: left bottom;
2250
- transform-origin: left bottom;
2251
- opacity: 1;
2252
- }
2253
-
2254
- 100% {
2255
- -webkit-transform-origin: left bottom;
2256
- transform-origin: left bottom;
2257
- -webkit-transform: rotate3d(0, 0, 1, 45deg);
2258
- transform: rotate3d(0, 0, 1, 45deg);
2259
- opacity: 0;
2260
- }
2261
- }
2262
-
2263
- .rotateOutDownLeft {
2264
- -webkit-animation-name: rotateOutDownLeft;
2265
- animation-name: rotateOutDownLeft;
2266
- }
2267
-
2268
- @-webkit-keyframes rotateOutDownRight {
2269
- 0% {
2270
- -webkit-transform-origin: right bottom;
2271
- transform-origin: right bottom;
2272
- opacity: 1;
2273
- }
2274
-
2275
- 100% {
2276
- -webkit-transform-origin: right bottom;
2277
- transform-origin: right bottom;
2278
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
2279
- transform: rotate3d(0, 0, 1, -45deg);
2280
- opacity: 0;
2281
- }
2282
- }
2283
-
2284
- @keyframes rotateOutDownRight {
2285
- 0% {
2286
- -webkit-transform-origin: right bottom;
2287
- transform-origin: right bottom;
2288
- opacity: 1;
2289
- }
2290
-
2291
- 100% {
2292
- -webkit-transform-origin: right bottom;
2293
- transform-origin: right bottom;
2294
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
2295
- transform: rotate3d(0, 0, 1, -45deg);
2296
- opacity: 0;
2297
- }
2298
- }
2299
-
2300
- .rotateOutDownRight {
2301
- -webkit-animation-name: rotateOutDownRight;
2302
- animation-name: rotateOutDownRight;
2303
- }
2304
-
2305
- @-webkit-keyframes rotateOutUpLeft {
2306
- 0% {
2307
- -webkit-transform-origin: left bottom;
2308
- transform-origin: left bottom;
2309
- opacity: 1;
2310
- }
2311
-
2312
- 100% {
2313
- -webkit-transform-origin: left bottom;
2314
- transform-origin: left bottom;
2315
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
2316
- transform: rotate3d(0, 0, 1, -45deg);
2317
- opacity: 0;
2318
- }
2319
- }
2320
-
2321
- @keyframes rotateOutUpLeft {
2322
- 0% {
2323
- -webkit-transform-origin: left bottom;
2324
- transform-origin: left bottom;
2325
- opacity: 1;
2326
- }
2327
-
2328
- 100% {
2329
- -webkit-transform-origin: left bottom;
2330
- transform-origin: left bottom;
2331
- -webkit-transform: rotate3d(0, 0, 1, -45deg);
2332
- transform: rotate3d(0, 0, 1, -45deg);
2333
- opacity: 0;
2334
- }
2335
- }
2336
-
2337
- .rotateOutUpLeft {
2338
- -webkit-animation-name: rotateOutUpLeft;
2339
- animation-name: rotateOutUpLeft;
2340
- }
2341
-
2342
- @-webkit-keyframes rotateOutUpRight {
2343
- 0% {
2344
- -webkit-transform-origin: right bottom;
2345
- transform-origin: right bottom;
2346
- opacity: 1;
2347
- }
2348
-
2349
- 100% {
2350
- -webkit-transform-origin: right bottom;
2351
- transform-origin: right bottom;
2352
- -webkit-transform: rotate3d(0, 0, 1, 90deg);
2353
- transform: rotate3d(0, 0, 1, 90deg);
2354
- opacity: 0;
2355
- }
2356
- }
2357
-
2358
- @keyframes rotateOutUpRight {
2359
- 0% {
2360
- -webkit-transform-origin: right bottom;
2361
- transform-origin: right bottom;
2362
- opacity: 1;
2363
- }
2364
-
2365
- 100% {
2366
- -webkit-transform-origin: right bottom;
2367
- transform-origin: right bottom;
2368
- -webkit-transform: rotate3d(0, 0, 1, 90deg);
2369
- transform: rotate3d(0, 0, 1, 90deg);
2370
- opacity: 0;
2371
- }
2372
- }
2373
-
2374
- .rotateOutUpRight {
2375
- -webkit-animation-name: rotateOutUpRight;
2376
- animation-name: rotateOutUpRight;
2377
- }
2378
-
2379
- @-webkit-keyframes hinge {
2380
- 0% {
2381
- -webkit-transform-origin: top left;
2382
- transform-origin: top left;
2383
- -webkit-animation-timing-function: ease-in-out;
2384
- animation-timing-function: ease-in-out;
2385
- }
2386
-
2387
- 20%, 60% {
2388
- -webkit-transform: rotate3d(0, 0, 1, 80deg);
2389
- transform: rotate3d(0, 0, 1, 80deg);
2390
- -webkit-transform-origin: top left;
2391
- transform-origin: top left;
2392
- -webkit-animation-timing-function: ease-in-out;
2393
- animation-timing-function: ease-in-out;
2394
- }
2395
-
2396
- 40%, 80% {
2397
- -webkit-transform: rotate3d(0, 0, 1, 60deg);
2398
- transform: rotate3d(0, 0, 1, 60deg);
2399
- -webkit-transform-origin: top left;
2400
- transform-origin: top left;
2401
- -webkit-animation-timing-function: ease-in-out;
2402
- animation-timing-function: ease-in-out;
2403
- opacity: 1;
2404
- }
2405
-
2406
- 100% {
2407
- -webkit-transform: translate3d(0, 700px, 0);
2408
- transform: translate3d(0, 700px, 0);
2409
- opacity: 0;
2410
- }
2411
- }
2412
-
2413
- @keyframes hinge {
2414
- 0% {
2415
- -webkit-transform-origin: top left;
2416
- transform-origin: top left;
2417
- -webkit-animation-timing-function: ease-in-out;
2418
- animation-timing-function: ease-in-out;
2419
- }
2420
-
2421
- 20%, 60% {
2422
- -webkit-transform: rotate3d(0, 0, 1, 80deg);
2423
- transform: rotate3d(0, 0, 1, 80deg);
2424
- -webkit-transform-origin: top left;
2425
- transform-origin: top left;
2426
- -webkit-animation-timing-function: ease-in-out;
2427
- animation-timing-function: ease-in-out;
2428
- }
2429
-
2430
- 40%, 80% {
2431
- -webkit-transform: rotate3d(0, 0, 1, 60deg);
2432
- transform: rotate3d(0, 0, 1, 60deg);
2433
- -webkit-transform-origin: top left;
2434
- transform-origin: top left;
2435
- -webkit-animation-timing-function: ease-in-out;
2436
- animation-timing-function: ease-in-out;
2437
- opacity: 1;
2438
- }
2439
-
2440
- 100% {
2441
- -webkit-transform: translate3d(0, 700px, 0);
2442
- transform: translate3d(0, 700px, 0);
2443
- opacity: 0;
2444
- }
2445
- }
2446
-
2447
- .hinge {
2448
- -webkit-animation-name: hinge;
2449
- animation-name: hinge;
2450
- }
2451
-
2452
- /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
2453
-
2454
- @-webkit-keyframes rollIn {
2455
- 0% {
2456
- opacity: 0;
2457
- -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
2458
- transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
2459
- }
2460
-
2461
- 100% {
2462
- opacity: 1;
2463
- -webkit-transform: none;
2464
- transform: none;
2465
- }
2466
- }
2467
-
2468
- @keyframes rollIn {
2469
- 0% {
2470
- opacity: 0;
2471
- -webkit-transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
2472
- transform: translate3d(-100%, 0, 0) rotate3d(0, 0, 1, -120deg);
2473
- }
2474
-
2475
- 100% {
2476
- opacity: 1;
2477
- -webkit-transform: none;
2478
- transform: none;
2479
- }
2480
- }
2481
-
2482
- .rollIn {
2483
- -webkit-animation-name: rollIn;
2484
- animation-name: rollIn;
2485
- }
2486
-
2487
- /* originally authored by Nick Pettit - https://github.com/nickpettit/glide */
2488
-
2489
- @-webkit-keyframes rollOut {
2490
- 0% {
2491
- opacity: 1;
2492
- }
2493
-
2494
- 100% {
2495
- opacity: 0;
2496
- -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
2497
- transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
2498
- }
2499
- }
2500
-
2501
- @keyframes rollOut {
2502
- 0% {
2503
- opacity: 1;
2504
- }
2505
-
2506
- 100% {
2507
- opacity: 0;
2508
- -webkit-transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
2509
- transform: translate3d(100%, 0, 0) rotate3d(0, 0, 1, 120deg);
2510
- }
2511
- }
2512
-
2513
- .rollOut {
2514
- -webkit-animation-name: rollOut;
2515
- animation-name: rollOut;
2516
- }
2517
-
2518
- @-webkit-keyframes zoomIn {
2519
- 0% {
2520
- opacity: 0;
2521
- -webkit-transform: scale3d(.3, .3, .3);
2522
- transform: scale3d(.3, .3, .3);
2523
- }
2524
-
2525
- 50% {
2526
- opacity: 1;
2527
- }
2528
- }
2529
-
2530
- @keyframes zoomIn {
2531
- 0% {
2532
- opacity: 0;
2533
- -webkit-transform: scale3d(.3, .3, .3);
2534
- transform: scale3d(.3, .3, .3);
2535
- }
2536
-
2537
- 50% {
2538
- opacity: 1;
2539
- }
2540
- }
2541
-
2542
- .zoomIn {
2543
- -webkit-animation-name: zoomIn;
2544
- animation-name: zoomIn;
2545
- }
2546
-
2547
- @-webkit-keyframes zoomInDown {
2548
- 0% {
2549
- opacity: 0;
2550
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
2551
- transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
2552
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2553
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2554
- }
2555
-
2556
- 60% {
2557
- opacity: 1;
2558
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2559
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2560
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2561
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2562
- }
2563
- }
2564
-
2565
- @keyframes zoomInDown {
2566
- 0% {
2567
- opacity: 0;
2568
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
2569
- transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
2570
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2571
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2572
- }
2573
-
2574
- 60% {
2575
- opacity: 1;
2576
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2577
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2578
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2579
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2580
- }
2581
- }
2582
-
2583
- .zoomInDown {
2584
- -webkit-animation-name: zoomInDown;
2585
- animation-name: zoomInDown;
2586
- }
2587
-
2588
- @-webkit-keyframes zoomInLeft {
2589
- 0% {
2590
- opacity: 0;
2591
- -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
2592
- transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
2593
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2594
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2595
- }
2596
-
2597
- 60% {
2598
- opacity: 1;
2599
- -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
2600
- transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
2601
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2602
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2603
- }
2604
- }
2605
-
2606
- @keyframes zoomInLeft {
2607
- 0% {
2608
- opacity: 0;
2609
- -webkit-transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
2610
- transform: scale3d(.1, .1, .1) translate3d(-1000px, 0, 0);
2611
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2612
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2613
- }
2614
-
2615
- 60% {
2616
- opacity: 1;
2617
- -webkit-transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
2618
- transform: scale3d(.475, .475, .475) translate3d(10px, 0, 0);
2619
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2620
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2621
- }
2622
- }
2623
-
2624
- .zoomInLeft {
2625
- -webkit-animation-name: zoomInLeft;
2626
- animation-name: zoomInLeft;
2627
- }
2628
-
2629
- @-webkit-keyframes zoomInRight {
2630
- 0% {
2631
- opacity: 0;
2632
- -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
2633
- transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
2634
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2635
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2636
- }
2637
-
2638
- 60% {
2639
- opacity: 1;
2640
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
2641
- transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
2642
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2643
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2644
- }
2645
- }
2646
-
2647
- @keyframes zoomInRight {
2648
- 0% {
2649
- opacity: 0;
2650
- -webkit-transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
2651
- transform: scale3d(.1, .1, .1) translate3d(1000px, 0, 0);
2652
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2653
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2654
- }
2655
-
2656
- 60% {
2657
- opacity: 1;
2658
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
2659
- transform: scale3d(.475, .475, .475) translate3d(-10px, 0, 0);
2660
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2661
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2662
- }
2663
- }
2664
-
2665
- .zoomInRight {
2666
- -webkit-animation-name: zoomInRight;
2667
- animation-name: zoomInRight;
2668
- }
2669
-
2670
- @-webkit-keyframes zoomInUp {
2671
- 0% {
2672
- opacity: 0;
2673
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
2674
- transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
2675
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2676
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2677
- }
2678
-
2679
- 60% {
2680
- opacity: 1;
2681
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2682
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2683
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2684
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2685
- }
2686
- }
2687
-
2688
- @keyframes zoomInUp {
2689
- 0% {
2690
- opacity: 0;
2691
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
2692
- transform: scale3d(.1, .1, .1) translate3d(0, 1000px, 0);
2693
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2694
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2695
- }
2696
-
2697
- 60% {
2698
- opacity: 1;
2699
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2700
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2701
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2702
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2703
- }
2704
- }
2705
-
2706
- .zoomInUp {
2707
- -webkit-animation-name: zoomInUp;
2708
- animation-name: zoomInUp;
2709
- }
2710
-
2711
- @-webkit-keyframes zoomOut {
2712
- 0% {
2713
- opacity: 1;
2714
- }
2715
-
2716
- 50% {
2717
- opacity: 0;
2718
- -webkit-transform: scale3d(.3, .3, .3);
2719
- transform: scale3d(.3, .3, .3);
2720
- }
2721
-
2722
- 100% {
2723
- opacity: 0;
2724
- }
2725
- }
2726
-
2727
- @keyframes zoomOut {
2728
- 0% {
2729
- opacity: 1;
2730
- }
2731
-
2732
- 50% {
2733
- opacity: 0;
2734
- -webkit-transform: scale3d(.3, .3, .3);
2735
- transform: scale3d(.3, .3, .3);
2736
- }
2737
-
2738
- 100% {
2739
- opacity: 0;
2740
- }
2741
- }
2742
-
2743
- .zoomOut {
2744
- -webkit-animation-name: zoomOut;
2745
- animation-name: zoomOut;
2746
- }
2747
-
2748
- @-webkit-keyframes zoomOutDown {
2749
- 40% {
2750
- opacity: 1;
2751
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2752
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2753
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2754
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2755
- }
2756
-
2757
- 100% {
2758
- opacity: 0;
2759
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
2760
- transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
2761
- -webkit-transform-origin: center bottom;
2762
- transform-origin: center bottom;
2763
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2764
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2765
- }
2766
- }
2767
-
2768
- @keyframes zoomOutDown {
2769
- 40% {
2770
- opacity: 1;
2771
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2772
- transform: scale3d(.475, .475, .475) translate3d(0, -60px, 0);
2773
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2774
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2775
- }
2776
-
2777
- 100% {
2778
- opacity: 0;
2779
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
2780
- transform: scale3d(.1, .1, .1) translate3d(0, 2000px, 0);
2781
- -webkit-transform-origin: center bottom;
2782
- transform-origin: center bottom;
2783
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2784
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2785
- }
2786
- }
2787
-
2788
- .zoomOutDown {
2789
- -webkit-animation-name: zoomOutDown;
2790
- animation-name: zoomOutDown;
2791
- }
2792
-
2793
- @-webkit-keyframes zoomOutLeft {
2794
- 40% {
2795
- opacity: 1;
2796
- -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
2797
- transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
2798
- }
2799
-
2800
- 100% {
2801
- opacity: 0;
2802
- -webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
2803
- transform: scale(.1) translate3d(-2000px, 0, 0);
2804
- -webkit-transform-origin: left center;
2805
- transform-origin: left center;
2806
- }
2807
- }
2808
-
2809
- @keyframes zoomOutLeft {
2810
- 40% {
2811
- opacity: 1;
2812
- -webkit-transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
2813
- transform: scale3d(.475, .475, .475) translate3d(42px, 0, 0);
2814
- }
2815
-
2816
- 100% {
2817
- opacity: 0;
2818
- -webkit-transform: scale(.1) translate3d(-2000px, 0, 0);
2819
- transform: scale(.1) translate3d(-2000px, 0, 0);
2820
- -webkit-transform-origin: left center;
2821
- transform-origin: left center;
2822
- }
2823
- }
2824
-
2825
- .zoomOutLeft {
2826
- -webkit-animation-name: zoomOutLeft;
2827
- animation-name: zoomOutLeft;
2828
- }
2829
-
2830
- @-webkit-keyframes zoomOutRight {
2831
- 40% {
2832
- opacity: 1;
2833
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
2834
- transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
2835
- }
2836
-
2837
- 100% {
2838
- opacity: 0;
2839
- -webkit-transform: scale(.1) translate3d(2000px, 0, 0);
2840
- transform: scale(.1) translate3d(2000px, 0, 0);
2841
- -webkit-transform-origin: right center;
2842
- transform-origin: right center;
2843
- }
2844
- }
2845
-
2846
- @keyframes zoomOutRight {
2847
- 40% {
2848
- opacity: 1;
2849
- -webkit-transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
2850
- transform: scale3d(.475, .475, .475) translate3d(-42px, 0, 0);
2851
- }
2852
-
2853
- 100% {
2854
- opacity: 0;
2855
- -webkit-transform: scale(.1) translate3d(2000px, 0, 0);
2856
- transform: scale(.1) translate3d(2000px, 0, 0);
2857
- -webkit-transform-origin: right center;
2858
- transform-origin: right center;
2859
- }
2860
- }
2861
-
2862
- .zoomOutRight {
2863
- -webkit-animation-name: zoomOutRight;
2864
- animation-name: zoomOutRight;
2865
- }
2866
-
2867
- @-webkit-keyframes zoomOutUp {
2868
- 40% {
2869
- opacity: 1;
2870
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2871
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2872
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2873
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2874
- }
2875
-
2876
- 100% {
2877
- opacity: 0;
2878
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
2879
- transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
2880
- -webkit-transform-origin: center bottom;
2881
- transform-origin: center bottom;
2882
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2883
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2884
- }
2885
- }
2886
-
2887
- @keyframes zoomOutUp {
2888
- 40% {
2889
- opacity: 1;
2890
- -webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2891
- transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
2892
- -webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2893
- animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
2894
- }
2895
-
2896
- 100% {
2897
- opacity: 0;
2898
- -webkit-transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
2899
- transform: scale3d(.1, .1, .1) translate3d(0, -2000px, 0);
2900
- -webkit-transform-origin: center bottom;
2901
- transform-origin: center bottom;
2902
- -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2903
- animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
2904
- }
2905
- }
2906
-
2907
- .zoomOutUp {
2908
- -webkit-animation-name: zoomOutUp;
2909
- animation-name: zoomOutUp;
2910
- }
2911
-
2912
- @-webkit-keyframes slideInDown {
2913
- 0% {
2914
- -webkit-transform: translateY(-100%);
2915
- transform: translateY(-100%);
2916
- visibility: visible;
2917
- }
2918
-
2919
- 100% {
2920
- -webkit-transform: translateY(0);
2921
- transform: translateY(0);
2922
- }
2923
- }
2924
-
2925
- @keyframes slideInDown {
2926
- 0% {
2927
- -webkit-transform: translateY(-100%);
2928
- transform: translateY(-100%);
2929
- visibility: visible;
2930
- }
2931
-
2932
- 100% {
2933
- -webkit-transform: translateY(0);
2934
- transform: translateY(0);
2935
- }
2936
- }
2937
-
2938
- .slideInDown {
2939
- -webkit-animation-name: slideInDown;
2940
- animation-name: slideInDown;
2941
- }
2942
-
2943
- @-webkit-keyframes slideInLeft {
2944
- 0% {
2945
- -webkit-transform: translateX(-100%);
2946
- transform: translateX(-100%);
2947
- visibility: visible;
2948
- }
2949
-
2950
- 100% {
2951
- -webkit-transform: translateX(0);
2952
- transform: translateX(0);
2953
- }
2954
- }
2955
-
2956
- @keyframes slideInLeft {
2957
- 0% {
2958
- -webkit-transform: translateX(-100%);
2959
- transform: translateX(-100%);
2960
- visibility: visible;
2961
- }
2962
-
2963
- 100% {
2964
- -webkit-transform: translateX(0);
2965
- transform: translateX(0);
2966
- }
2967
- }
2968
-
2969
- .slideInLeft {
2970
- -webkit-animation-name: slideInLeft;
2971
- animation-name: slideInLeft;
2972
- }
2973
-
2974
- @-webkit-keyframes slideInRight {
2975
- 0% {
2976
- -webkit-transform: translateX(100%);
2977
- transform: translateX(100%);
2978
- visibility: visible;
2979
- }
2980
-
2981
- 100% {
2982
- -webkit-transform: translateX(0);
2983
- transform: translateX(0);
2984
- }
2985
- }
2986
-
2987
- @keyframes slideInRight {
2988
- 0% {
2989
- -webkit-transform: translateX(100%);
2990
- transform: translateX(100%);
2991
- visibility: visible;
2992
- }
2993
-
2994
- 100% {
2995
- -webkit-transform: translateX(0);
2996
- transform: translateX(0);
2997
- }
2998
- }
2999
-
3000
- .slideInRight {
3001
- -webkit-animation-name: slideInRight;
3002
- animation-name: slideInRight;
3003
- }
3004
-
3005
- @-webkit-keyframes slideInUp {
3006
- 0% {
3007
- -webkit-transform: translateY(100%);
3008
- transform: translateY(100%);
3009
- visibility: visible;
3010
- }
3011
-
3012
- 100% {
3013
- -webkit-transform: translateY(0);
3014
- transform: translateY(0);
3015
- }
3016
- }
3017
-
3018
- @keyframes slideInUp {
3019
- 0% {
3020
- -webkit-transform: translateY(100%);
3021
- transform: translateY(100%);
3022
- visibility: visible;
3023
- }
3024
-
3025
- 100% {
3026
- -webkit-transform: translateY(0);
3027
- transform: translateY(0);
3028
- }
3029
- }
3030
-
3031
- .slideInUp {
3032
- -webkit-animation-name: slideInUp;
3033
- animation-name: slideInUp;
3034
- }
3035
-
3036
- @-webkit-keyframes slideOutDown {
3037
- 0% {
3038
- -webkit-transform: translateY(0);
3039
- transform: translateY(0);
3040
- }
3041
-
3042
- 100% {
3043
- visibility: hidden;
3044
- -webkit-transform: translateY(100%);
3045
- transform: translateY(100%);
3046
- }
3047
- }
3048
-
3049
- @keyframes slideOutDown {
3050
- 0% {
3051
- -webkit-transform: translateY(0);
3052
- transform: translateY(0);
3053
- }
3054
-
3055
- 100% {
3056
- visibility: hidden;
3057
- -webkit-transform: translateY(100%);
3058
- transform: translateY(100%);
3059
- }
3060
- }
3061
-
3062
- .slideOutDown {
3063
- -webkit-animation-name: slideOutDown;
3064
- animation-name: slideOutDown;
3065
- }
3066
-
3067
- @-webkit-keyframes slideOutLeft {
3068
- 0% {
3069
- -webkit-transform: translateX(0);
3070
- transform: translateX(0);
3071
- }
3072
-
3073
- 100% {
3074
- visibility: hidden;
3075
- -webkit-transform: translateX(-100%);
3076
- transform: translateX(-100%);
3077
- }
3078
- }
3079
-
3080
- @keyframes slideOutLeft {
3081
- 0% {
3082
- -webkit-transform: translateX(0);
3083
- transform: translateX(0);
3084
- }
3085
-
3086
- 100% {
3087
- visibility: hidden;
3088
- -webkit-transform: translateX(-100%);
3089
- transform: translateX(-100%);
3090
- }
3091
- }
3092
-
3093
- .slideOutLeft {
3094
- -webkit-animation-name: slideOutLeft;
3095
- animation-name: slideOutLeft;
3096
- }
3097
-
3098
- @-webkit-keyframes slideOutRight {
3099
- 0% {
3100
- -webkit-transform: translateX(0);
3101
- transform: translateX(0);
3102
- }
3103
-
3104
- 100% {
3105
- visibility: hidden;
3106
- -webkit-transform: translateX(100%);
3107
- transform: translateX(100%);
3108
- }
3109
- }
3110
-
3111
- @keyframes slideOutRight {
3112
- 0% {
3113
- -webkit-transform: translateX(0);
3114
- transform: translateX(0);
3115
- }
3116
-
3117
- 100% {
3118
- visibility: hidden;
3119
- -webkit-transform: translateX(100%);
3120
- transform: translateX(100%);
3121
- }
3122
- }
3123
-
3124
- .slideOutRight {
3125
- -webkit-animation-name: slideOutRight;
3126
- animation-name: slideOutRight;
3127
- }
3128
-
3129
- @-webkit-keyframes slideOutUp {
3130
- 0% {
3131
- -webkit-transform: translateY(0);
3132
- transform: translateY(0);
3133
- }
3134
-
3135
- 100% {
3136
- visibility: hidden;
3137
- -webkit-transform: translateY(-100%);
3138
- transform: translateY(-100%);
3139
- }
3140
- }
3141
-
3142
- @keyframes slideOutUp {
3143
- 0% {
3144
- -webkit-transform: translateY(0);
3145
- transform: translateY(0);
3146
- }
3147
-
3148
- 100% {
3149
- visibility: hidden;
3150
- -webkit-transform: translateY(-100%);
3151
- transform: translateY(-100%);
3152
- }
3153
- }
3154
-
3155
- .slideOutUp {
3156
- -webkit-animation-name: slideOutUp;
3157
- animation-name: slideOutUp;
3158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
emails/tnp-composer/_css/newsletter-builder-v2.css CHANGED
@@ -15,7 +15,7 @@
15
  position: relative;
16
  overflow: hidden;
17
  box-sizing: border-box;
18
- max-width: 1280px;
19
  margin: 0 auto;
20
  }
21
 
@@ -23,7 +23,7 @@
23
  #newsletter-builder-area {
24
  display: flex;
25
  flex-flow: column;
26
-
27
  background-color: #fff;
28
  width: 800px;
29
  box-sizing: border-box;
@@ -38,20 +38,24 @@
38
  #newsletter-builder-sidebar {
39
  display: flex;
40
  flex-flow: column;
41
- width: 450px;
 
 
42
  background-color: #ECF0F1;
43
  margin-left: 20px;
44
  overflow-y: scroll;
45
  /* Needed for block options form */
46
  position: relative;
47
  border-radius: 3px;
 
48
  }
49
 
50
  #tnpc-subject-wrap {
51
  border-bottom: 1px solid #ccc;
52
  padding-bottom: 20px;
53
  padding-top: 20px;
54
- padding-left: 20px
 
55
  }
56
 
57
  #tnpc-subject-wrap th {
@@ -74,14 +78,77 @@
74
  vertical-align: middle;
75
  }
76
 
77
- #tnpc-subject {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  }
79
 
80
- #tnpc-subject input[type=text]{
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  width: 550px;
82
- font-size: 16px;
83
  margin-right: 15px;
84
  border: 1px solid #ddd;
 
 
 
 
 
 
 
85
  }
86
 
87
  #tnpc-subject i {
@@ -197,7 +264,7 @@
197
  /*float: left;*/
198
  /*width: 730px;*/
199
  /*background-color: rgba(153,153,153,1);*/
200
- min-height: 50px;
201
  padding-bottom: 75px;
202
  /*background-color: #ECF0F1;*/
203
  padding-top: 30px;
@@ -206,6 +273,30 @@
206
  /*max-height: 600px;*/
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  #newsletter-mobile-preview-area {
210
  margin-left: 30px;
211
  box-sizing: border-box;
@@ -679,11 +770,10 @@ iframe#tnpc-mobile-preview {
679
  background-color: #fff;
680
  padding: 15px;
681
  margin-top: 0;
682
- }
683
-
684
- #tnpc-block-options-form {
685
  color: #444;
686
  background-color: #ECF0F1 !important;
 
 
687
  }
688
 
689
 
@@ -729,9 +819,6 @@ iframe#tnpc-mobile-preview {
729
  padding-top: 0;
730
  }
731
 
732
-
733
-
734
-
735
  /* Style the tab */
736
  .tnpc-tabs {
737
  /*overflow: hidden;*/
@@ -767,6 +854,8 @@ iframe#tnpc-mobile-preview {
767
  display: none;
768
  padding: 6px 12px;
769
  border-top: none;
 
 
770
  }
771
 
772
  /* Style Reset, Save, Save & Preview footer */
@@ -1002,9 +1091,75 @@ iframe#tnpc-mobile-preview {
1002
  display: none;
1003
  }
1004
 
1005
- #newsletter-builder-area-center-frame-content p {
1006
- font-size: inherit;
1007
- font-weight: inherit;
1008
- font-family: inherit;
1009
- color: inherit;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1010
  }
15
  position: relative;
16
  overflow: hidden;
17
  box-sizing: border-box;
18
+ max-width: 1380px;
19
  margin: 0 auto;
20
  }
21
 
23
  #newsletter-builder-area {
24
  display: flex;
25
  flex-flow: column;
26
+ flex-shrink: 0;
27
  background-color: #fff;
28
  width: 800px;
29
  box-sizing: border-box;
38
  #newsletter-builder-sidebar {
39
  display: flex;
40
  flex-flow: column;
41
+ /* flex-grow: 1;*/
42
+ max-width: 510px;
43
+ min-width: 410px;
44
  background-color: #ECF0F1;
45
  margin-left: 20px;
46
  overflow-y: scroll;
47
  /* Needed for block options form */
48
  position: relative;
49
  border-radius: 3px;
50
+ overflow: hidden;
51
  }
52
 
53
  #tnpc-subject-wrap {
54
  border-bottom: 1px solid #ccc;
55
  padding-bottom: 20px;
56
  padding-top: 20px;
57
+ padding-left: 20px;
58
+ position:relative;
59
  }
60
 
61
  #tnpc-subject-wrap th {
78
  vertical-align: middle;
79
  }
80
 
81
+ #tnpc-subject-wrap th[dir=rtl] {
82
+ text-align: left;
83
+ }
84
+ #tnpc-subject-wrap td[dir=rtl] {
85
+ text-align: right;
86
+ }
87
+ #tnpc-subject-wrap td[dir=rtl] #options-title {
88
+ margin-right: 0;
89
+ }
90
+
91
+ #tnpc-subject-wrap .composer-actions {
92
+ position: absolute;
93
+ right: 10px;
94
+ bottom: 5px;
95
+ display: flex;
96
+ align-items: center;
97
+ }
98
+
99
+ #tnpc-subject-wrap .composer-view-mode {
100
+ display: flex;
101
+ }
102
+
103
+ #tnpc-subject-wrap .composer-view-mode .composer-view-mode__item {
104
+ display: block;
105
+ width: 30px;
106
+ height: 30px;
107
+ line-height: 30px;
108
+ box-sizing: content-box;
109
+ text-align: center;
110
+ margin-left: 3px;
111
+ border-radius: 3px;
112
+ border: solid 1px #3c434a;
113
+ background-color: #FFF;
114
+ color: #3c434a;
115
+ font-size: 12px;
116
+ cursor: pointer;
117
+ }
118
+
119
+ #tnpc-subject-wrap .composer-view-mode .composer-view-mode__item--active {
120
+ background-color: #2b2f3a;
121
+ border-color: #2b2f3a;
122
+ color: #FFF;
123
  }
124
 
125
+ #tnpc-subject-wrap .composer-view-mode .composer-view-mode__item:hover{
126
+ background-color: #3c434a;
127
+ border-color: #3c434a;
128
+ color: #FFF;
129
+ }
130
+
131
+ #test-newsletter-button {
132
+ background-color: #2b2f3a;
133
+ }
134
+
135
+ #test-newsletter-button:hover {
136
+ background-color: #3c434a;
137
+ }
138
+
139
+ #tnpc-subject #options-subject,
140
+ #options-preheader
141
+ {
142
  width: 550px;
 
143
  margin-right: 15px;
144
  border: 1px solid #ddd;
145
+ font-size: 14px;
146
+ font-family: monospace !important;
147
+ }
148
+
149
+ #options-preheader + .tnp-description
150
+ {
151
+ margin-top: 0;
152
  }
153
 
154
  #tnpc-subject i {
264
  /*float: left;*/
265
  /*width: 730px;*/
266
  /*background-color: rgba(153,153,153,1);*/
267
+ min-height: 300px!important;
268
  padding-bottom: 75px;
269
  /*background-color: #ECF0F1;*/
270
  padding-top: 30px;
273
  /*max-height: 600px;*/
274
  }
275
 
276
+ /* https://www.codegrepper.com/code-examples/css/how+ot+hide+scroll+bar+buy+allow+mouse+scrolling+css */
277
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile {
278
+ margin: 20px auto 0px auto;
279
+ width: 350px;
280
+ height: 500px;
281
+ -ms-overflow-style: none;
282
+ scrollbar-width: none;
283
+ border: 1px solid #ddd;
284
+ border-radius: 10px;
285
+ padding-top: 0;
286
+ padding-bottom: 0;
287
+ }
288
+
289
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile::-webkit-scrollbar {
290
+ display: none;
291
+ }
292
+
293
+ #newsletter-builder-area-center-frame-content p {
294
+ font-size: inherit;
295
+ font-weight: inherit;
296
+ font-family: inherit;
297
+ color: inherit;
298
+ }
299
+
300
  #newsletter-mobile-preview-area {
301
  margin-left: 30px;
302
  box-sizing: border-box;
770
  background-color: #fff;
771
  padding: 15px;
772
  margin-top: 0;
 
 
 
773
  color: #444;
774
  background-color: #ECF0F1 !important;
775
+ flex: 1 1 auto;
776
+ overflow-y: auto;
777
  }
778
 
779
 
819
  padding-top: 0;
820
  }
821
 
 
 
 
822
  /* Style the tab */
823
  .tnpc-tabs {
824
  /*overflow: hidden;*/
854
  display: none;
855
  padding: 6px 12px;
856
  border-top: none;
857
+ flex: 1 1 auto;
858
+ overflow-y: auto;
859
  }
860
 
861
  /* Style Reset, Save, Save & Preview footer */
1091
  display: none;
1092
  }
1093
 
1094
+ .separator {
1095
+ display: flex;
1096
+ align-items: center;
1097
+ text-align: center;
1098
+ padding: 1em 0;
1099
+ }
1100
+
1101
+ .separator::before,
1102
+ .separator::after {
1103
+ content: '';
1104
+ flex: 1;
1105
+ border-bottom: 1px solid #3c434a;
1106
+ }
1107
+
1108
+ .separator:not(:empty)::before {
1109
+ margin-right: 1em;
1110
+ }
1111
+
1112
+ .separator:not(:empty)::after {
1113
+ margin-left: 1em;
1114
+ }
1115
+
1116
+ #test-newsletter-modal .test-subscribers p {
1117
+ margin: 0;
1118
+ }
1119
+
1120
+ #test-newsletter-modal h4 {
1121
+ margin: 0 0 0.5rem 0;
1122
+ }
1123
+
1124
+ #test-newsletter-modal .separator {
1125
+ padding: 1.25rem 0;
1126
+ }
1127
+
1128
+
1129
+ .tnp-suggest-subject {
1130
+ cursor: pointer;
1131
+ }
1132
+
1133
+ /* Drag and drop placeholder */
1134
+ .placeholder {
1135
+ border: 1px dashed #bbb!important;
1136
+ background-color: #fafafa!important;
1137
+ height: 75px;
1138
+ margin: 0 auto;
1139
+ max-width: 600px;
1140
+ box-sizing: border-box!important;
1141
+ }
1142
+
1143
+ #draggable-helper {
1144
+ width: 600px;
1145
+ border: 1px dashed #ddd;
1146
+ opacity: 80%!important;
1147
+ background-color: #fff;
1148
+ text-align: center;
1149
+ text-transform: uppercase;
1150
+ font-size: 14px;
1151
+ color: #666 !important;
1152
+ padding: 20px;
1153
+ }
1154
+
1155
+ #sortable-helper {
1156
+ width: 700px;
1157
+ height: 75px;
1158
+ border: 3px dashed #ddd;
1159
+ opacity: .7;
1160
+ background-color: #fff;
1161
+ text-align: center;
1162
+ text-transform: uppercase;
1163
+ font-size: 14px; color: #aaa;
1164
+ padding: 20px;
1165
  }
emails/tnp-composer/_scripts/jquery-2.2.3.min.js DELETED
@@ -1,4 +0,0 @@
1
- /*! jQuery v2.2.3 | (c) jQuery Foundation | jquery.org/license */
2
- !function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;
3
- }catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(b,c,e){var f=!0,g="width"===c?b.offsetWidth:b.offsetHeight,h=Ca(b),i="border-box"===n.css(b,"boxSizing",!1,h);if(d.msFullscreenElement&&a.top!==a&&b.getClientRects().length&&(g=Math.round(100*b.getBoundingClientRect()[c])),0>=g||null==g){if(g=Fa(b,c,h),(0>g||null==g)&&(g=b.style[c]),Ba.test(g))return g;f=i&&(l.boxSizingReliable()||g===b.style[c]),g=parseFloat(g)||0}return g+Oa(b,c,e||(i?"border":"content"),f,h)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,
4
- e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b),d.isDefaultPrevented()&&c.preventDefault()}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var jb=a.location,kb=n.now(),lb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb={},tb={},ub="*/".concat("*"),vb=d.createElement("a");vb.href=jb.href;function wb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function xb(a,b,c,d){var e={},f=a===tb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function yb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function zb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Ab(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jb.href,type:"GET",isLocal:pb.test(jb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?yb(yb(a,n.ajaxSettings),b):yb(n.ajaxSettings,a)},ajaxPrefilter:wb(sb),ajaxTransport:wb(tb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=ob.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||jb.href)+"").replace(mb,"").replace(rb,jb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=vb.protocol+"//"+vb.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),xb(sb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!qb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(lb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=nb.test(f)?f.replace(nb,"$1_="+kb++):f+(lb.test(f)?"&":"?")+"_="+kb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+ub+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=xb(tb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=zb(m,x,d)),u=Ab(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Bb=/%20/g,Cb=/\[\]$/,Db=/\r?\n/g,Eb=/^(?:submit|button|image|reset|file)$/i,Fb=/^(?:input|select|textarea|keygen)/i;function Gb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Cb.test(a)?d(a,e):Gb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Gb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Gb(c,a[c],b,e);return d.join("&").replace(Bb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Fb.test(this.nodeName)&&!Eb.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Db,"\r\n")}}):{name:b.name,value:c.replace(Db,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Hb={0:200,1223:204},Ib=n.ajaxSettings.xhr();l.cors=!!Ib&&"withCredentials"in Ib,l.ajax=Ib=!!Ib,n.ajaxTransport(function(b){var c,d;return l.cors||Ib&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Hb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Jb=[],Kb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Jb.pop()||n.expando+"_"+kb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Kb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Kb,"$1"+e):b.jsonp!==!1&&(b.url+=(lb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Jb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Lb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Lb)return Lb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Mb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Mb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Mb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Nb=a.jQuery,Ob=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Ob),b&&a.jQuery===n&&(a.jQuery=Nb),n},b||(a.jQuery=a.$=n),n});
 
 
 
 
emails/tnp-composer/_scripts/jquery-ui-1.10.4.min.js DELETED
@@ -1,7 +0,0 @@
1
- /*! jQuery UI - v1.10.4 - 2014-03-02
2
- * http://jqueryui.com
3
- * Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
4
- * Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
5
-
6
- (function(e,t){function i(t,i){var s,a,o,r=t.nodeName.toLowerCase();return"area"===r?(s=t.parentNode,a=s.name,t.href&&a&&"map"===s.nodeName.toLowerCase()?(o=e("img[usemap=#"+a+"]")[0],!!o&&n(o)):!1):(/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||i:i)&&n(t)}function n(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var s=0,a=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,n){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),n&&n.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var n,s,a=e(this[0]);a.length&&a[0]!==document;){if(n=a.css("position"),("absolute"===n||"relative"===n||"fixed"===n)&&(s=parseInt(a.css("zIndex"),10),!isNaN(s)&&0!==s))return s;a=a.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++s)})},removeUniqueId:function(){return this.each(function(){a.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,n){return!!e.data(t,n[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var n=e.attr(t,"tabindex"),s=isNaN(n);return(s||n>=0)&&i(t,!s)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,n){function s(t,i,n,s){return e.each(a,function(){i-=parseFloat(e.css(t,"padding"+this))||0,n&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),s&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var a="Width"===n?["Left","Right"]:["Top","Bottom"],o=n.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+n]=function(i){return i===t?r["inner"+n].call(this):this.each(function(){e(this).css(o,s(this,i)+"px")})},e.fn["outer"+n]=function(t,i){return"number"!=typeof t?r["outer"+n].call(this,t):this.each(function(){e(this).css(o,s(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,n){var s,a=e.ui[t].prototype;for(s in n)a.plugins[s]=a.plugins[s]||[],a.plugins[s].push([i,n[s]])},call:function(e,t,i){var n,s=e.plugins[t];if(s&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(n=0;s.length>n;n++)e.options[s[n][0]]&&s[n][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var n=i&&"left"===i?"scrollLeft":"scrollTop",s=!1;return t[n]>0?!0:(t[n]=1,s=t[n]>0,t[n]=0,s)}})})(jQuery);(function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(o){}n(e)},t.widget=function(i,s,n){var o,a,r,h,l={},c=i.split(".")[0];i=i.split(".")[1],o=c+"-"+i,n||(n=s,s=t.Widget),t.expr[":"][o.toLowerCase()]=function(e){return!!t.data(e,o)},t[c]=t[c]||{},a=t[c][i],r=t[c][i]=function(t,i){return this._createWidget?(arguments.length&&this._createWidget(t,i),e):new r(t,i)},t.extend(r,a,{version:n.version,_proto:t.extend({},n),_childConstructors:[]}),h=new s,h.options=t.widget.extend({},h.options),t.each(n,function(i,n){return t.isFunction(n)?(l[i]=function(){var t=function(){return s.prototype[i].apply(this,arguments)},e=function(t){return s.prototype[i].apply(this,t)};return function(){var i,s=this._super,o=this._superApply;return this._super=t,this._superApply=e,i=n.apply(this,arguments),this._super=s,this._superApply=o,i}}(),e):(l[i]=n,e)}),r.prototype=t.widget.extend(h,{widgetEventPrefix:a?h.widgetEventPrefix||i:i},l,{constructor:r,namespace:c,widgetName:i,widgetFullName:o}),a?(t.each(a._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):s._childConstructors.push(r),t.widget.bridge(i,r)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;h>r;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(i[n]=t.isPlainObject(o)?t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):e):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;n.length-1>a;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),1===arguments.length)return o[i]===e?null:o[i];o[i]=s}else{if(1===arguments.length)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var o,a=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=o=t(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,o=this.widget()),t.each(n,function(n,r){function h(){return i||a.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):e}"string"!=typeof r&&(h.guid=r.guid=r.guid||h.guid||t.guid++);var l=n.match(/^(\w+)\s*(.*)$/),c=l[1]+a.eventNamespace,u=l[2];u?o.delegate(u,c,h):s.bind(c,h)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})})(jQuery);(function(t){var e=!1;t(document).mouseup(function(){e=!1}),t.widget("ui.mouse",{version:"1.10.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):undefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!e){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?t(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===t.data(i.target,this.widgetName+".preventClickEvent")&&t.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),e=!0,!0)):!0}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,l=Math.round,h=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),k=t.position.getScrollInfo(y),w=(e.collision||"flip").split(" "),D={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=h.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=h.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),D[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===w.length&&(w[1]=w[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),a=i(D.at,p,g),v.left+=a[0],v.top+=a[1],this.each(function(){var n,h,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),x=u+f+s(this,"marginRight")+k.width,C=d+_+s(this,"marginBottom")+k.height,M=t.extend({},v),T=i(D.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?M.left-=u:"center"===e.my[0]&&(M.left-=u/2),"bottom"===e.my[1]?M.top-=d:"center"===e.my[1]&&(M.top-=d/2),M.left+=T[0],M.top+=T[1],t.support.offsetFractions||(M.left=l(M.left),M.top=l(M.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[w[i]]&&t.ui.position[w[i]][s](M,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:x,collisionHeight:C,offset:[a[0]+T[0],a[1]+T[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(h=function(t){var i=m.left-M.left,s=i+p-u,n=m.top-M.top,a=n+g-d,l={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:M.left,top:M.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(l.horizontal="center"),d>g&&g>r(n+a)&&(l.vertical="middle"),l.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,l)}),c.offset(t.extend(M,{using:h}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-o-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-o-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-o-a,t.top+p+f+g>c&&(0>s||r(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,t.top+p+f+g>u&&(i>0||u>r(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(t){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(e),this.handle?(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||t.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1):!1},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return this.options.handle?!!t(e.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=e.pageX,h=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,l=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,a=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,a))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,a,o,r,l,h,c,u,d,p=t(this).data("ui-draggable"),g=p.options,f=g.snapTolerance,m=i.offset.left,_=m+p.helperProportions.width,v=i.offset.top,b=v+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,l=r+p.snapElements[u].width,h=p.snapElements[u].top,c=h+p.snapElements[u].height,r-f>_||m>l+f||h-f>b||v>c+f||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==g.snapMode&&(s=f>=Math.abs(h-b),n=f>=Math.abs(c-v),a=f>=Math.abs(r-_),o=f>=Math.abs(l-m),s&&(i.position.top=p._convertPositionTo("relative",{top:h-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l}).left-p.margins.left)),d=s||n||a||o,"outer"!==g.snapMode&&(s=f>=Math.abs(h-v),n=f>=Math.abs(c-b),a=f>=Math.abs(r-m),o=f>=Math.abs(l-_),s&&(i.position.top=p._convertPositionTo("relative",{top:h,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:l-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||a||o||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}t.widget("ui.droppable",{version:"1.10.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(s)?s:function(t){return t.is(s)},this.proportions=function(){return arguments.length?(e=arguments[0],undefined):e?e:e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},t.ui.ddmanager.droppables[i.scope]=t.ui.ddmanager.droppables[i.scope]||[],t.ui.ddmanager.droppables[i.scope].push(this),i.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];i.length>e;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");return e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element):!1):!1},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,i,s){if(!i.offset)return!1;var n,a,o=(t.positionAbs||t.position.absolute).left,r=(t.positionAbs||t.position.absolute).top,l=o+t.helperProportions.width,h=r+t.helperProportions.height,c=i.offset.left,u=i.offset.top,d=c+i.proportions().width,p=u+i.proportions().height;switch(s){case"fit":return o>=c&&d>=l&&r>=u&&p>=h;case"intersect":return o+t.helperProportions.width/2>c&&d>l-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&p>h-t.helperProportions.height/2;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,a=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,e(a,u,i.proportions().height)&&e(n,c,i.proportions().width);case"touch":return(r>=u&&p>=r||h>=u&&p>=h||u>r&&h>p)&&(o>=c&&d>=o||l>=c&&d>=l||c>o&&l>d);default:return!1}},t.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(e,i){var s,n,a=t.ui.ddmanager.droppables[e.options.scope]||[],o=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||e&&!a[s].accept.call(a[s].element[0],e.currentItem||e.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue t}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=t.ui.intersect(e,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),a.length&&(s=t.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}})(jQuery);(function(t){function e(t){return parseInt(t,10)||0}function i(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;e.length>i;i++)s=t.trim(e[i]),a="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,a;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,a),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(t(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=e(this.helper.css("left")),n=e(this.helper.css("top")),o.containment&&(s+=t(o.containment).scrollLeft()||0,n+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(e){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-a.left||0,d=e.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,a=s?0:c.sizeDiff.width,o={width:c.helper.width()-a,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(o,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),i(t.left)&&(this.position.left=t.left),i(t.top)&&(this.position.top=t.top),i(t.height)&&(this.size.height=t.height),i(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,s=this.size,n=this.axis;return i(t.height)?t.width=t.height*this.aspectRatio:i(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(s.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(s.height-t.height),t.left=e.left+(s.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,s=this.axis,n=i(t.width)&&e.maxWidth&&e.maxWidth<t.width,a=i(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=i(t.width)&&e.minWidth&&e.minWidth>t.width,r=i(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(s),u=/nw|ne|n/.test(s);return o&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),a&&(t.height=e.maxHeight),o&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),a&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,a=this.helper||this.element;for(t=0;this._proportionallyResizeElements.length>t;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;i.length>e;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(i=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=e(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:o,h=t.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,a,o=t(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,c=o._aspectRatio||e.shiftKey,u={top:0,left:0},d=o.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-u.left),c&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),c&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-u.left:o.offset.left-u.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-u.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=Math.abs(o.parentData.left)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,c&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,c&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,a=e.containerElement,o=t(e.helper),r=o.offset(),h=o.outerWidth()-e.sizeDiff.width,l=o.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(a.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(a[e]=i||null)}),e.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,a=e.originalPosition,o=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&d>i.maxWidth,g=i.maxHeight&&p>i.maxHeight,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(o)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.top=a.top-u):/^(sw)$/.test(o)?(e.size.width=d,e.size.height=p,e.position.left=a.left-c):(p-l>0?(e.size.height=p,e.position.top=a.top-u):(e.size.height=l,e.position.top=a.top+n.height-l),d-h>0?(e.size.width=d,e.position.left=a.left-c):(e.size.width=h,e.position.left=a.left+n.width-h))}})})(jQuery);(function(t){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");return n?(s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=e.pageX,l=e.pageY;return a>r&&(i=r,r=a,a=i),o>l&&(i=l,l=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:l-o}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),h=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?h=!(i.left>r||a>i.right||i.top>l||o>i.bottom):"fit"===n.tolerance&&(h=i.left>a&&r>i.right&&i.top>o&&l>i.bottom),h?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,o.widgetName+"-item")===o?(s=t(this),!1):undefined}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===o?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>o&&a>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>o&&a>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return n?this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){function i(){r.push(this)}var s,n,o,a,r=[],h=[],l=this._connectWith();if(l&&e)for(s=l.length-1;s>=0;s--)for(o=t(l[s]),n=o.length-1;n>=0;n--)a=t.data(o[n],this.widgetFullName),a&&a!==this&&!a.options.disabled&&h.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(h.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return t(r)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height))&&(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),a>Math.abs(u-c)&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[g].element,!0),this._trigger("change",s,this._uiHash()),this.containers[g]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",s,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){function i(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&n.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||n.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(n.push(function(t){this._trigger("remove",t,this._uiHash())}),n.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)e||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(s=0;n.length>s;s++)n[s].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(e){var t=0,i={},a={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",a.height=a.paddingTop=a.paddingBottom=a.borderTopWidth=a.borderBottomWidth="show",e.widget("ui.accordion",{version:"1.10.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e(),content:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),undefined):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t),undefined)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,a=this.headers.length,s=this.headers.index(t.target),n=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:n=this.headers[(s+1)%a];break;case i.LEFT:case i.UP:n=this.headers[(s-1+a)%a];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:n=this.headers[0];break;case i.END:n=this.headers[a-1]}n&&(e(t.target).attr("tabIndex",-1),e(n).attr("tabIndex",0),n.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,a=this.options,s=a.heightStyle,n=this.element.parent(),r=this.accordionId="ui-accordion-"+(this.element.attr("id")||++t);this.active=this._findActive(a.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(t){var i=e(this),a=i.attr("id"),s=i.next(),n=s.attr("id");a||(a=r+"-header-"+t,i.attr("id",a)),n||(n=r+"-panel-"+t,s.attr("id",n)),i.attr("aria-controls",n),s.attr("aria-labelledby",a)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(a.event),"fill"===s?(i=n.height(),this.element.siblings(":visible").each(function(){var t=e(this),a=t.css("position");"absolute"!==a&&"fixed"!==a&&(i-=t.outerHeight(!0))}),this.headers.each(function(){i-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(i=0,this.headers.next().each(function(){i=Math.max(i,e(this).css("height","").height())}).height(i))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,a=this.active,s=e(t.currentTarget),n=s[0]===a[0],r=n&&i.collapsible,o=r?e():s.next(),h=a.next(),d={oldHeader:a,oldPanel:h,newHeader:r?e():s,newPanel:o};t.preventDefault(),n&&!i.collapsible||this._trigger("beforeActivate",t,d)===!1||(i.active=r?!1:this.headers.index(s),this.active=n?e():s,this._toggle(d),a.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&a.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),n||(s.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),s.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,a=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=a,this.options.animate?this._animate(i,a,t):(a.hide(),i.show(),this._toggleComplete(t)),a.attr({"aria-hidden":"true"}),a.prev().attr("aria-selected","false"),i.length&&a.length?a.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true",tabIndex:0,"aria-expanded":"true"})},_animate:function(e,t,s){var n,r,o,h=this,d=0,c=e.length&&(!t.length||e.index()<t.index()),l=this.options.animate||{},u=c&&l.down||l,v=function(){h._toggleComplete(s)};return"number"==typeof u&&(o=u),"string"==typeof u&&(r=u),r=r||u.easing||l.easing,o=o||u.duration||l.duration,t.length?e.length?(n=e.show().outerHeight(),t.animate(i,{duration:o,easing:r,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(a,{duration:o,easing:r,complete:v,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?d+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(n-t.outerHeight()-d),d=0)}}),undefined):t.animate(i,o,r,v):e.animate(a,o,r,v)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}})})(jQuery);(function(e){e.widget("ui.autocomplete",{version:"1.10.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,undefined;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),undefined):(this._searchTimeout(e),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(e),this._change(e),undefined)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",t,{item:s})?t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):undefined},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({label:t.label||t.value,value:t.value||t.label},t)})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").append(e("<a>").text(i.label)).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[e](t),undefined):(this.search(null,t),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.text(t))}})})(jQuery);(function(e){var t,i="ui-button ui-widget ui-state-default ui-corner-all",n="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",s=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},a=function(t){var i=t.name,n=t.form,s=e([]);return i&&(i=i.replace(/'/g,"\\'"),s=n?e(n).find("[name='"+i+"']"):e("[name='"+i+"']",t.ownerDocument).filter(function(){return!this.form})),s};e.widget("ui.button",{version:"1.10.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,s),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var n=this,o=this.options,r="checkbox"===this.type||"radio"===this.type,h=r?"":"ui-state-active";null===o.label&&(o.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(i).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){o.disabled||this===t&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){o.disabled||e(this).removeClass(h)}).bind("click"+this.eventNamespace,function(e){o.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),r&&this.element.bind("change"+this.eventNamespace,function(){n.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return o.disabled?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(o.disabled)return!1;e(this).addClass("ui-state-active"),n.buttonElement.attr("aria-pressed","true");var t=n.element[0];a(t).not(t).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return o.disabled?!1:(e(this).addClass("ui-state-active"),t=this,n.document.one("mouseup",function(){t=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return o.disabled?!1:(e(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(t){return o.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",o.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(i+" ui-state-active "+n).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.element.prop("disabled",!!t),t&&this.buttonElement.removeClass("ui-state-focus"),undefined):(this._resetButton(),undefined)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?a(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var t=this.buttonElement.removeClass(n),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,a=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(a?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(a?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):o.push("ui-button-text-only"),t.addClass(o.join(" "))}}),e.widget("ui.buttonset",{version:"1.10.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(e,t){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){e.datepicker._isDisabledDatepicker(n.inline?t.parent()[0]:n.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))})}function s(t,i){e.extend(t,i);for(var a in i)null==i[a]&&(t[a]=i[a]);return t}e.extend(e.ui,{datepicker:{version:"1.10.4"}});var n,r="datepicker";e.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return s(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var a,s,n;a=t.nodeName.toLowerCase(),s="div"===a||"span"===a,t.id||(this.uuid+=1,t.id="dp"+this.uuid),n=this._newInst(e(t),s),n.settings=e.extend({},i||{}),"input"===a?this._connectDatepicker(t,n):s&&this._inlineDatepicker(t,n)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var a=e(t);i.append=e([]),i.trigger=e([]),a.hasClass(this.markerClassName)||(this._attachments(a,i),a.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,r,i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var a,s,n,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[o?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),a=this._get(i,"showOn"),("focus"===a||"both"===a)&&t.focus(this._showDatepicker),("button"===a||"both"===a)&&(s=this._get(i,"buttonText"),n=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):e("<button type='button'></button>").addClass(this._triggerClass).html(n?e("<img/>").attr({src:n,alt:s,title:s}):s)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,a,s,n=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,a=0,s=0;e.length>s;s++)e[s].length>i&&(i=e[s].length,a=s);return a},n.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),n.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-n.getDay())),e.input.attr("size",this._formatDate(e,n).length)}},_inlineDatepicker:function(t,i){var a=e(t);a.hasClass(this.markerClassName)||(a.addClass(this.markerClassName).append(i.dpDiv),e.data(t,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,a,n,o){var u,c,h,l,d,p=this._dialogInst;return p||(this.uuid+=1,u="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+u+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},e.data(this._dialogInput[0],r,p)),s(p.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(c=document.documentElement.clientWidth,h=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[c/2-100+l,h/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=a,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(t){var i,a=e(t),s=e.data(t,r);a.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,r),"input"===i?(s.append.remove(),s.trigger.remove(),a.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&a.removeClass(this.markerClassName).empty())},_enableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().removeClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,a,s=e(t),n=e.data(t,r);s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(a=s.children("."+this._inlineClass),a.children().addClass("ui-state-disabled"),a.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,a,n){var r,o,u,c,h=this._getInst(i);return 2===arguments.length&&"string"==typeof a?"defaults"===a?e.extend({},e.datepicker._defaults):h?"all"===a?e.extend({},h.settings):this._get(h,a):null:(r=a||{},"string"==typeof a&&(r={},r[a]=n),h&&(this._curInst===h&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),u=this._getMinMaxDate(h,"min"),c=this._getMinMaxDate(h,"max"),s(h.settings,r),null!==u&&r.dateFormat!==t&&r.minDate===t&&(h.settings.minDate=this._formatDate(h,u)),null!==c&&r.dateFormat!==t&&r.maxDate===t&&(h.settings.maxDate=this._formatDate(h,c)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(e(i),h),this._autoSize(h),this._setDate(h,o),this._updateAlternate(h),this._updateDatepicker(h)),t)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,a,s,n=e.datepicker._getInst(t.target),r=!0,o=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return s=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",n.dpDiv),s[0]&&e.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),i=e.datepicker._get(n,"onSelect"),i?(a=e.datepicker._formatDate(n),i.apply(n.input?n.input[0]:null,[a,n])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(n,"stepBigMonths"):-e.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(n,"stepBigMonths"):+e.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(i){var a,s,n=e.datepicker._getInst(i.target);return e.datepicker._get(n,"constrainInput")?(a=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">s||!a||a.indexOf(s)>-1):t},_doKeyUp:function(t){var i,a=e.datepicker._getInst(t.target);if(a.input.val()!==a.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,e.datepicker._getFormatConfig(a)),i&&(e.datepicker._setDateFromField(a),e.datepicker._updateAlternate(a),e.datepicker._updateDatepicker(a))}catch(s){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,a,n,r,o,u,c;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),a=e.datepicker._get(i,"beforeShow"),n=a?a.apply(t,[t,i]):{},n!==!1&&(s(i.settings,n),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),o={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),o=e.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(u=e.datepicker._get(i,"showAnim"),c=e.datepicker._get(i,"duration"),i.dpDiv.zIndex(e(t).zIndex()+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[u]?i.dpDiv.show(u,e.datepicker._get(i,"showOptions"),c):i.dpDiv[u||"show"](u?c:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,n=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t),t.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,a=this._getNumberOfMonths(t),s=a[1],r=17;t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),s>1&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",r*s+"em"),t.dpDiv[(1!==a[0]||1!==a[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,a){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,u=document.documentElement.clientWidth+(a?0:e(document).scrollLeft()),c=document.documentElement.clientHeight+(a?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?s-r:0,i.left-=a&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=a&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+s>u&&u>s?Math.abs(i.left+s-u):0),i.top-=Math.min(i.top,i.top+n>c&&c>n?Math.abs(n+o):0),i},_findPos:function(t){for(var i,a=this._getInst(t),s=this._get(a,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,a,s,n,o=this._curInst;!o||t&&o!==e.data(t,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),a=this._get(o,"duration"),s=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),a,s):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?a:null,s),i||s(),this._datepickerShowing=!1,n=this._get(o,"onClose"),n&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),a=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==a)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,a){var s=e(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,i+("M"===a?this._get(n,"showCurrentAtPos"):0),a),this._updateDatepicker(n))},_gotoToday:function(t){var i,a=e(t),s=this._getInst(a[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(i=new Date,s.selectedDay=i.getDate(),s.drawMonth=s.selectedMonth=i.getMonth(),s.drawYear=s.selectedYear=i.getFullYear()),this._notifyChange(s),this._adjustDate(a)},_selectMonthYear:function(t,i,a){var s=e(t),n=this._getInst(s[0]);n["selected"+("M"===a?"Month":"Year")]=n["draw"+("M"===a?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,i,a,s){var n,r=e(t);e(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(n=this._getInst(r[0]),n.selectedDay=n.currentDay=e("a",s).html(),n.selectedMonth=n.currentMonth=i,n.selectedYear=n.currentYear=a,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var a,s=e(t),n=this._getInst(s[0]);i=null!=i?i:this._formatDate(n),n.input&&n.input.val(i),this._updateAlternate(n),a=this._get(n,"onSelect"),a?a.apply(n.input?n.input[0]:null,[i,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,a,s,n=this._get(t,"altField");n&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),a=this._getDate(t),s=this.formatDate(i,a,this._getFormatConfig(t)),e(n).each(function(){e(this).val(s)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(i,a,s){if(null==i||null==a)throw"Invalid arguments";if(a="object"==typeof a?""+a:a+"",""===a)return null;var n,r,o,u,c=0,h=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof h?h:(new Date).getFullYear()%100+parseInt(h,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,p=(s?s.dayNames:null)||this._defaults.dayNames,g=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,m=(s?s.monthNames:null)||this._defaults.monthNames,f=-1,_=-1,v=-1,k=-1,y=!1,b=function(e){var t=i.length>n+1&&i.charAt(n+1)===e;return t&&n++,t},D=function(e){var t=b(e),i="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,s=RegExp("^\\d{1,"+i+"}"),n=a.substring(c).match(s);if(!n)throw"Missing number at position "+c;return c+=n[0].length,parseInt(n[0],10)},w=function(i,s,n){var r=-1,o=e.map(b(i)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,i){var s=i[1];return a.substr(c,s.length).toLowerCase()===s.toLowerCase()?(r=i[0],c+=s.length,!1):t}),-1!==r)return r+1;throw"Unknown name at position "+c},M=function(){if(a.charAt(c)!==i.charAt(n))throw"Unexpected literal at position "+c;c++};for(n=0;i.length>n;n++)if(y)"'"!==i.charAt(n)||b("'")?M():y=!1;else switch(i.charAt(n)){case"d":v=D("d");break;case"D":w("D",d,p);break;case"o":k=D("o");break;case"m":_=D("m");break;case"M":_=w("M",g,m);break;case"y":f=D("y");break;case"@":u=new Date(D("@")),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"!":u=new Date((D("!")-this._ticksTo1970)/1e4),f=u.getFullYear(),_=u.getMonth()+1,v=u.getDate();break;case"'":b("'")?M():y=!0;break;default:M()}if(a.length>c&&(o=a.substr(c),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===f?f=(new Date).getFullYear():100>f&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(l>=f?0:-100)),k>-1)for(_=1,v=k;;){if(r=this._getDaysInMonth(f,_-1),r>=v)break;_++,v-=r}if(u=this._daylightSavingAdjust(new Date(f,_-1,v)),u.getFullYear()!==f||u.getMonth()+1!==_||u.getDate()!==v)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var a,s=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,n=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,u=function(t){var i=e.length>a+1&&e.charAt(a+1)===t;return i&&a++,i},c=function(e,t,i){var a=""+t;if(u(e))for(;i>a.length;)a="0"+a;return a},h=function(e,t,i,a){return u(e)?a[t]:i[t]},l="",d=!1;if(t)for(a=0;e.length>a;a++)if(d)"'"!==e.charAt(a)||u("'")?l+=e.charAt(a):d=!1;else switch(e.charAt(a)){case"d":l+=c("d",t.getDate(),2);break;case"D":l+=h("D",t.getDay(),s,n);break;case"o":l+=c("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":l+=c("m",t.getMonth()+1,2);break;case"M":l+=h("M",t.getMonth(),r,o);break;case"y":l+=u("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":l+=t.getTime();break;case"!":l+=1e4*t.getTime()+this._ticksTo1970;break;case"'":u("'")?l+="'":d=!0;break;default:l+=e.charAt(a)}return l},_possibleChars:function(e){var t,i="",a=!1,s=function(i){var a=e.length>t+1&&e.charAt(t+1)===i;return a&&t++,a};for(t=0;e.length>t;t++)if(a)"'"!==e.charAt(t)||s("'")?i+=e.charAt(t):a=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":s("'")?i+="'":a=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,i){return e.settings[i]!==t?e.settings[i]:this._defaults[i]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),a=e.lastVal=e.input?e.input.val():null,s=this._getDefaultDate(e),n=s,r=this._getFormatConfig(e);try{n=this.parseDate(i,a,r)||s}catch(o){a=t?"":a}e.selectedDay=n.getDate(),e.drawMonth=e.selectedMonth=n.getMonth(),e.drawYear=e.selectedYear=n.getFullYear(),e.currentDay=a?n.getDate():0,e.currentMonth=a?n.getMonth():0,e.currentYear=a?n.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,a){var s=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},n=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(a){}for(var s=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,n=s.getFullYear(),r=s.getMonth(),o=s.getDate(),u=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,c=u.exec(i);c;){switch(c[2]||"d"){case"d":case"D":o+=parseInt(c[1],10);break;case"w":case"W":o+=7*parseInt(c[1],10);break;case"m":case"M":r+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(c[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(n,r))}c=u.exec(i)}return new Date(n,r,o)},r=null==i||""===i?a:"string"==typeof i?n(i):"number"==typeof i?isNaN(i)?a:s(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?a:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var a=!t,s=e.selectedMonth,n=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),s===e.selectedMonth&&n===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(a?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),a="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(a,-i,"M")},next:function(){e.datepicker._adjustDate(a,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(a)},selectDay:function(){return e.datepicker._selectDay(a,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(a,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(a,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,a,s,n,r,o,u,c,h,l,d,p,g,m,f,_,v,k,y,b,D,w,M,C,x,I,N,T,A,E,S,Y,F,P,O,j,K,R,H=new Date,W=this._daylightSavingAdjust(new Date(H.getFullYear(),H.getMonth(),H.getDate())),L=this._get(e,"isRTL"),U=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),z=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),G=this._get(e,"showCurrentAtPos"),J=this._get(e,"stepMonths"),Q=1!==q[0]||1!==q[1],V=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(e,"min"),X=this._getMinMaxDate(e,"max"),Z=e.drawMonth-G,et=e.drawYear;if(0>Z&&(Z+=12,et--),X)for(t=this._daylightSavingAdjust(new Date(X.getFullYear(),X.getMonth()-q[0]*q[1]+1,X.getDate())),t=$&&$>t?$:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=z?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-J,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"e":"w")+"'>"+i+"</span></a>",s=this._get(e,"nextText"),s=z?this.formatDate(s,this._daylightSavingAdjust(new Date(et,Z+J,1)),this._getFormatConfig(e)):s,n=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+s+"'><span class='ui-icon ui-icon-circle-triangle-"+(L?"w":"e")+"'>"+s+"</span></a>",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?V:W,r=z?this.formatDate(r,o,this._getFormatConfig(e)):r,u=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",c=U?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(L?u:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(L?"":u)+"</div>":"",h=parseInt(this._get(e,"firstDay"),10),h=isNaN(h)?0:h,l=this._get(e,"showWeek"),d=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),g=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),f=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),v=this._get(e,"selectOtherMonths"),k=this._getDefaultDate(e),y="",D=0;q[0]>D;D++){for(w="",this.maxRows=4,M=0;q[1]>M;M++){if(C=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),x=" ui-corner-all",I="",Q){if(I+="<div class='ui-datepicker-group",q[1]>1)switch(M){case 0:I+=" ui-datepicker-group-first",x=" ui-corner-"+(L?"right":"left");break;case q[1]-1:I+=" ui-datepicker-group-last",x=" ui-corner-"+(L?"left":"right");break;default:I+=" ui-datepicker-group-middle",x=""}I+="'>"}for(I+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===D?L?n:a:"")+(/all|right/.test(x)&&0===D?L?a:n:"")+this._generateMonthYearHeader(e,Z,et,$,X,D>0||M>0,g,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",N=l?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",b=0;7>b;b++)T=(b+h)%7,N+="<th"+((b+h+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[T]+"'>"+p[T]+"</span></th>";for(I+=N+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),E=(this._getFirstDayOfMonth(et,Z)-h+7)%7,S=Math.ceil((E+A)/7),Y=Q?this.maxRows>S?this.maxRows:S:S,this.maxRows=Y,F=this._daylightSavingAdjust(new Date(et,Z,1-E)),P=0;Y>P;P++){for(I+="<tr>",O=l?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(F)+"</td>":"",b=0;7>b;b++)j=f?f.apply(e.input?e.input[0]:null,[F]):[!0,""],K=F.getMonth()!==Z,R=K&&!v||!j[0]||$&&$>F||X&&F>X,O+="<td class='"+((b+h+6)%7>=5?" ui-datepicker-week-end":"")+(K?" ui-datepicker-other-month":"")+(F.getTime()===C.getTime()&&Z===e.selectedMonth&&e._keyEvent||k.getTime()===F.getTime()&&k.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(K&&!_?"":" "+j[1]+(F.getTime()===V.getTime()?" "+this._currentClass:"")+(F.getTime()===W.getTime()?" ui-datepicker-today":""))+"'"+(K&&!_||!j[2]?"":" title='"+j[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(K&&!_?"&#xa0;":R?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===W.getTime()?" ui-state-highlight":"")+(F.getTime()===V.getTime()?" ui-state-active":"")+(K?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);I+=O+"</tr>"}Z++,Z>11&&(Z=0,et++),I+="</tbody></table>"+(Q?"</div>"+(q[0]>0&&M===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=I}y+=w}return y+=c,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,i,a,s,n,r,o){var u,c,h,l,d,p,g,m,f=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),v=this._get(e,"showMonthAfterYear"),k="<div class='ui-datepicker-title'>",y="";if(n||!f)y+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(u=a&&a.getFullYear()===i,c=s&&s.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",h=0;12>h;h++)(!u||h>=a.getMonth())&&(!c||s.getMonth()>=h)&&(y+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"</option>");y+="</select>"}if(v||(k+=y+(!n&&f&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",n||!_)k+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(l=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);
7
- return isNaN(t)?d:t},g=p(l[0]),m=Math.max(g,p(l[1]||"")),g=a?Math.max(g,a.getFullYear()):g,m=s?Math.min(m,s.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=g;g++)e.yearshtml+="<option value='"+g+"'"+(g===i?" selected='selected'":"")+">"+g+"</option>";e.yearshtml+="</select>",k+=e.yearshtml,e.yearshtml=null}return k+=this._get(e,"yearSuffix"),v&&(k+=(!n&&f&&_?"":"&#xa0;")+y),k+="</div>"},_adjustInstDate:function(e,t,i){var a=e.drawYear+("Y"===i?t:0),s=e.drawMonth+("M"===i?t:0),n=Math.min(e.selectedDay,this._getDaysInMonth(a,s))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(a,s,n)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),s=i&&i>t?i:t;return a&&s>a?a:s},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,a){var s=this._getNumberOfMonths(e),n=this._daylightSavingAdjust(new Date(i,a+(0>t?t:s[0]*s[1]),1));return 0>t&&n.setDate(this._getDaysInMonth(n.getFullYear(),n.getMonth())),this._isInRange(e,n)},_isInRange:function(e,t){var i,a,s=this._getMinMaxDate(e,"min"),n=this._getMinMaxDate(e,"max"),r=null,o=null,u=this._get(e,"yearRange");return u&&(i=u.split(":"),a=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=a),i[1].match(/[+\-].*/)&&(o+=a)),(!s||t.getTime()>=s.getTime())&&(!n||t.getTime()<=n.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,a){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var s=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(a,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),s,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new i,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.10.4"})(jQuery);(function(e){var t={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};e.widget("ui.dialog",{version:"1.10.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,a=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._destroyOverlay(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(s){}this._hide(this.uiDialog,this.options.hide,function(){a._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!t&&this._trigger("focus",e),i},open:function(){var t=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var e=this.element.find("[autofocus]");e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),undefined;if(t.keyCode===e.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),a=i.filter(":first"),s=i.filter(":last");t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==a[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(s.focus(1),t.preventDefault()):(a.focus(1),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(e.each(i,function(i,a){var s,n;a=e.isFunction(a)?{click:a,text:i}:a,a=e.extend({type:"button"},a),s=a.click,a.click=function(){s.apply(t.element[0],arguments)},n={icons:a.icons,text:a.showText},delete a.icons,delete a.showText,e("<button></button>",a).button(n).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,a=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(a,s){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",a,t(s))},drag:function(e,a){i._trigger("drag",e,t(a))},stop:function(s,n){a.position=[n.position.left-i.document.scrollLeft(),n.position.top-i.document.scrollTop()],e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",s,t(n))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,a=this.options,s=a.resizable,n=this.uiDialog.css("position"),r="string"==typeof s?s:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:r,start:function(a,s){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",a,t(s))},resize:function(e,a){i._trigger("resize",e,t(a))},stop:function(s,n){a.height=e(this).height(),a.width=e(this).width(),e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",s,t(n))}}).css("position",n)},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(a){var s=this,n=!1,r={};e.each(a,function(e,a){s._setOption(e,a),e in t&&(n=!0),e in i&&(r[e]=a)}),n&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",r)},_setOption:function(e,t){var i,a,s=this.uiDialog;"dialogClass"===e&&s.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=s.is(":data(ui-draggable)"),i&&!t&&s.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(a=s.is(":data(ui-resizable)"),a&&!t&&s.resizable("destroy"),a&&"string"==typeof t&&s.resizable("option","handles",t),a||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,a=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),a.minWidth>a.width&&(a.width=a.minWidth),e=this.uiDialog.css({height:"auto",width:a.width}).outerHeight(),t=Math.max(0,a.minHeight-e),i="number"==typeof a.maxHeight?Math.max(0,a.maxHeight-e):"none","auto"===a.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,a.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=this,i=this.widgetFullName;e.ui.dialog.overlayInstances||this._delay(function(){e.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(a){t._allowInteraction(a)||(a.preventDefault(),e(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),e.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(e.ui.dialog.overlayInstances--,e.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),e.ui.dialog.overlayInstances=0,e.uiBackCompat!==!1&&e.widget("ui.dialog",e.ui.dialog,{_position:function(){var t,i=this.options.position,a=[],s=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(a=i.split?i.split(" "):[i[0],i[1]],1===a.length&&(a[1]=a[0]),e.each(["left","top"],function(e,t){+a[e]===a[e]&&(s[e]=a[e],a[e]=t)}),i={my:a[0]+(0>s[0]?s[0]:"+"+s[0])+" "+a[1]+(0>s[1]?s[1]:"+"+s[1]),at:a.join(" ")}),i=e.extend({},e.ui.dialog.prototype.options.position,i)):i=e.ui.dialog.prototype.options.position,t=this.uiDialog.is(":visible"),t||this.uiDialog.show(),this.uiDialog.position(i),t||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&t(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,l=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:l=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}l&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,l,h,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),l=a.offset(),h=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=h?{left:0,top:0}:{left:e.pageX-l.left-a.width()/2,top:e.pageY-l.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,l=this,h=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((l.values(s)-l._valueMin())/(l._valueMax()-l._valueMin())),u["horizontal"===l.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[h?"animate":"css"](u,r.animate),l.options.range===!0&&("horizontal"===l.orientation?(0===s&&l.range.stop(1,1)[h?"animate":"css"]({left:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&l.range.stop(1,1)[h?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&l.range[h?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[h?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[h?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[h?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[h?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}})})(jQuery);(function(t,e){function i(){return++n}function s(t){return t=t.cloneNode(!1),t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,c))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.4",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return a.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=h(),n=s._rgba=[];return i=i.toLowerCase(),f(l,function(t,a){var o,r=a.re.exec(i),l=r&&a.parse(r),h=a.space||"rgba";return l?(o=s[h](l),s[c[h].cache]=o[c[h].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,l=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],h=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=h.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),h.fn=t.extend(h.prototype,{parse:function(n,o,r,l){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,l],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof h?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=h(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=h(t),n=s._space(),a=c[n],o=0===this.alpha()?h("transparent"):this,r=o[a.cache]||a.to(o._rgba),l=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],h=s[a],c=u[n.type]||{};null!==h&&(null===o?l[a]=h:(c.mod&&(h-o>c.mod/2?o+=c.mod:o-h>c.mod/2&&(o-=c.mod)),l[a]=i((h-o)*e+o,n)))}),this[n](l)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=h(e)._rgba;return h(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),l=Math.min(s,n,a),h=r-l,c=r+l,u=.5*c;return e=l===r?0:s===r?60*(n-a)/h+360:n===r?60*(a-s)/h+120:60*(s-n)/h+240,i=0===h?0:.5>=u?h/c:h/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,l=n.to,c=n.from;h.fn[s]=function(s){if(l&&!this[o]&&(this[o]=l(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=h(c(d)),n[o]=d,n):h(d)},f(a,function(e,i){h.fn[e]||(h.fn[e]=function(n){var a,o=t.type(n),l="alpha"===e?this._hsla?"hsla":"rgba":s,h=this[l](),c=h[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),h[i.idx]=n,this[l](h)))})})}),h.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=h(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(l){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(l){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=h(e.elem,i),e.end=h(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var l=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",h=l.children?o.find("*").addBack():o;h=h.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),h=h.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),h=h.map(function(){var e=this,i=t.Deferred(),s=t.extend({},l,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,h.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),l.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.4",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,l=t(this),h=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(l,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",g=i.test(u),m={},v="show"===c;l.parent().is(".ui-effects-wrapper")?t.effects.save(l.parent(),h):t.effects.save(l,h),l.show(),a=t.effects.createWrapper(l).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,m[p]=v?o:0,g||(l.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:o+r),v&&(a.css(p,0),g||a.css(f,r+o)),a.animate(m,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&l.hide(),t.effects.restore(l,h),t.effects.removeWrapper(l),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"effect"),h="hide"===l,c="show"===l,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||h?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||h)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,g,m)),h&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m).animate(a,g,m),d=h?2*d:d/2;h&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,g,m)),o.queue(function(){h&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],l=t.effects.setMode(o,e.mode||"hide"),h="show"===l,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),h&&(n.css(d,0),n.css(p,a/2)),f[d]=h?a:0,f[p]=h?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){h||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(h,"pos"===c?-s:s),u[h]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var a,o,r,l,h,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(l=m.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=m.left+o*v,h=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?h*v:0),top:l+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:h*v),top:l+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),l="show"===r,h="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=l!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[h?0:1]),l&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=l?n[0]:c,v[f[1]]=l?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){h&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,l=o||"hide"===a,h=2*(e.times||5)+(l?1:0),c=e.duration/h,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;h>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,h+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?l:{height:l.height*r,width:l.width*r,outerHeight:l.outerHeight*r,outerWidth:l.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",l=e.origin,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=l||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:h),n.to={height:h.height*c.y,width:h.width*c.x,outerHeight:h.outerHeight*c.y,outerWidth:h.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],l=["position","top","bottom","left","right","overflow","opacity"],h=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=o.css("position"),_=f?r:l,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===g||"both"===g)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===g||"both"===g)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(h),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(n=t.effects.getBaseline(m,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===g||"both"===g)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),h=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,h),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,h)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",l=e.distance||20,h=e.times||3,c=2*h+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+l,g[d]=(p?"+=":"-=")+2*l,m[d]=(p?"-=":"+=")+2*l,n.animate(f,u,e.easing),s=1;h>s;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,l=e.direction||"left",h="up"===l||"down"===l?"top":"left",c="up"===l||"left"===l,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===h?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(h,c?isNaN(s)?"-"+s:-s:s),u[h]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,l=a?o.scrollLeft():0,h=n.offset(),c={top:h.top-r,left:h.left-l,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-l,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);
 
 
 
 
 
 
 
emails/tnp-composer/_scripts/newsletter-builder-v2.js CHANGED
@@ -57,7 +57,7 @@ jQuery.fn.perform_block_edit = function () {
57
  tnpc_add_global_options(data);
58
 
59
  builderAreaHelper.lock();
60
- jQuery("#tnpc-block-options-form").load(ajaxurl, data , function () {
61
  console.log('Block form options loaded');
62
  start_options = jQuery("#tnpc-block-options-form").serializeArray();
63
  tnpc_add_global_options(start_options);
@@ -134,7 +134,10 @@ jQuery(function () {
134
  }
135
 
136
  // subject management
137
- jQuery('#options-title').val(jQuery('#tnpc-form input[name="options[subject]"]').val());
 
 
 
138
 
139
  // ======================== //
140
  // == BACKGROUND COLOR == //
@@ -197,10 +200,11 @@ function init_builder_area() {
197
  ui.item.before(loading_row);
198
  ui.item.remove();
199
  var data = new Array(
200
- {"name": 'action', "value": 'tnpc_render'},
201
- {"name": 'b', "value": ui.item.data("id")},
202
- {"name": 'full', "value": 1},
203
- {"name": '_wpnonce', "value": tnp_nonce}
 
204
  );
205
 
206
  tnpc_add_global_options(data);
@@ -331,12 +335,13 @@ function tnpc_show_block_options() {
331
 
332
  const animationDuration = 500;
333
 
334
- jQuery("#tnpc-blocks").fadeOut(animationDuration);
335
- jQuery("#tnpc-global-styles").fadeOut(animationDuration);
336
- jQuery("#tnpc-mobile-tab").fadeOut(animationDuration);
337
- jQuery("#tnpc-test-tab").fadeOut(animationDuration);
338
 
339
  jQuery("#tnpc-block-options").fadeIn(animationDuration);
 
340
 
341
  }
342
 
@@ -346,8 +351,8 @@ function tnpc_hide_block_options() {
346
 
347
  jQuery("#tnpc-block-options").fadeOut(animationDuration);
348
 
349
- var $activeTab = jQuery(".tnpc-tabs .tablinks.active");
350
- jQuery('#' + $activeTab.data('tabId')).fadeIn(animationDuration);
351
 
352
  jQuery("#tnpc-block-options-form").html('');
353
 
@@ -372,8 +377,15 @@ function tnpc_mobile_preview() {
372
  function tnpc_save(form) {
373
 
374
  form.elements["options[message]"].value = tnpc_get_email_content_from_builder_area();
375
- if (document.getElementById("options-title")) {
376
- form.elements["options[subject]"].value = jQuery('#options-title').val();
 
 
 
 
 
 
 
377
  } else {
378
  form.elements["options[subject]"].value = "";
379
  }
@@ -540,7 +552,7 @@ function tnpc_load_preset(id, subject, isEditMode) {
540
  }
541
 
542
  if (subject && subject.length > 0) {
543
- jQuery('#options-title').val(tnpc_remove_double_quotes_escape_from(subject));
544
  }
545
  },
546
  });
@@ -561,7 +573,7 @@ function tnpc_load_preset(id, subject, isEditMode) {
561
 
562
  function tnpc_save_preset(form) {
563
 
564
- const presetName = tnpc_remove_double_quotes_from(document.querySelector('#options-title').value);
565
 
566
  const presetNameModal = new TNPModal({
567
  title: 'Choose a preset name',
@@ -570,7 +582,7 @@ function tnpc_save_preset(form) {
570
  clickConfirmOnPressEnter: true,
571
  onConfirm: function () {
572
  const inputEl = document.querySelector('#preset_name');
573
- document.querySelector('#options-title').value = inputEl.value;
574
  tnpc_save(form);
575
  form.submit();
576
  }
@@ -654,7 +666,7 @@ function tnpc_remove_double_quotes_from(str) {
654
 
655
  function tnpc_update_preset(form) {
656
 
657
- const presetName = tnpc_remove_double_quotes_from(document.querySelector('#options-title').value);
658
 
659
  const presetNameModal = new TNPModal({
660
  title: 'Choose a preset name',
@@ -663,7 +675,7 @@ function tnpc_update_preset(form) {
663
  clickConfirmOnPressEnter: true,
664
  onConfirm: function () {
665
  const inputEl = document.querySelector('#preset_name');
666
- document.querySelector('#options-title').value = inputEl.value;
667
  tnpc_save(form);
668
  form.submit();
669
  }
@@ -712,8 +724,8 @@ jQuery(document).ready(function () {
712
  // Close all created elements if clicked outside
713
  jQuery('#newsletter-builder-area-center-frame-content').on('click', function (e) {
714
  if (activeInlineElements.length > 0
715
- && !jQuery(e.target).hasClass(className)
716
- && jQuery(e.target).closest('.tnpc-inline-editable-container').length === 0) {
717
  removeAllActiveElements();
718
  }
719
  });
@@ -741,11 +753,13 @@ jQuery(document).ready(function () {
741
  var styleAttr = "style='font-family:" + fontFamily + ";font-size:" + fontSize + ";'";
742
 
743
  switch (type) {
744
- case 'text': {
 
745
  element = "<textarea name='" + newInputName + "' class='" + className + "-textarea' rows='5' " + styleAttr + ">" + value + "</textarea>";
746
  break;
747
  }
748
- case 'title': {
 
749
  element = "<textarea name='" + newInputName + "' class='" + className + "-textarea' rows='2'" + styleAttr + ">" + value + "</textarea>";
750
  break;
751
  }
@@ -791,15 +805,16 @@ jQuery(document).ready(function () {
791
  if (container.hasClass('tnpc-row-block')) {
792
  var data = {
793
  'action': 'tnpc_render',
 
794
  'b': container.data('id'),
795
  'full': 1,
796
  '_wpnonce': tnp_nonce,
797
  'options': {
798
  'inline_edits': [{
799
- 'type': type,
800
- 'post_id': postId,
801
- 'content': newContent
802
- }]
803
  },
804
  'encoded_options': blockContent.data('json')
805
  };
@@ -874,3 +889,102 @@ jQuery(document).ready(function () {
874
  });
875
 
876
  })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
  tnpc_add_global_options(data);
58
 
59
  builderAreaHelper.lock();
60
+ jQuery("#tnpc-block-options-form").load(ajaxurl, data, function () {
61
  console.log('Block form options loaded');
62
  start_options = jQuery("#tnpc-block-options-form").serializeArray();
63
  tnpc_add_global_options(start_options);
134
  }
135
 
136
  // subject management
137
+ jQuery('#options-subject').val(jQuery('#tnpc-form input[name="options[subject]"]').val());
138
+
139
+ // preheader management
140
+ jQuery('#options-preheader').val(jQuery('#tnpc-form input[name="options[options_preheader]"]').val());
141
 
142
  // ======================== //
143
  // == BACKGROUND COLOR == //
200
  ui.item.before(loading_row);
201
  ui.item.remove();
202
  var data = new Array(
203
+ {"name": 'action', "value": 'tnpc_render'},
204
+ {"name": 'id', "value": ui.item.data("id")},
205
+ {"name": 'b', "value": ui.item.data("id")},
206
+ {"name": 'full', "value": 1},
207
+ {"name": '_wpnonce', "value": tnp_nonce}
208
  );
209
 
210
  tnpc_add_global_options(data);
335
 
336
  const animationDuration = 500;
337
 
338
+ //jQuery("#tnpc-blocks").fadeOut(animationDuration);
339
+ //jQuery("#tnpc-global-styles").fadeOut(animationDuration);
340
+ //jQuery("#tnpc-mobile-tab").fadeOut(animationDuration);
341
+ //jQuery("#tnpc-test-tab").fadeOut(animationDuration);
342
 
343
  jQuery("#tnpc-block-options").fadeIn(animationDuration);
344
+ jQuery("#tnpc-block-options").css('display', 'flex');
345
 
346
  }
347
 
351
 
352
  jQuery("#tnpc-block-options").fadeOut(animationDuration);
353
 
354
+ //var $activeTab = jQuery(".tnpc-tabs .tablinks.active");
355
+ //jQuery('#' + $activeTab.data('tabId')).fadeIn(animationDuration);
356
 
357
  jQuery("#tnpc-block-options-form").html('');
358
 
377
  function tnpc_save(form) {
378
 
379
  form.elements["options[message]"].value = tnpc_get_email_content_from_builder_area();
380
+
381
+ // When the composer is not showing the subject field (for example in Automated)
382
+ if (document.getElementById("options-preheader")) {
383
+ form.elements["options[options_preheader]"].value = jQuery('#options-preheader').val();
384
+ } else {
385
+ form.elements["options[options_preheader]"].value = "";
386
+ }
387
+ if (document.getElementById("options-subject")) {
388
+ form.elements["options[subject]"].value = jQuery('#options-subject').val();
389
  } else {
390
  form.elements["options[subject]"].value = "";
391
  }
552
  }
553
 
554
  if (subject && subject.length > 0) {
555
+ jQuery('#options-subject').val(tnpc_remove_double_quotes_escape_from(subject));
556
  }
557
  },
558
  });
573
 
574
  function tnpc_save_preset(form) {
575
 
576
+ const presetName = tnpc_remove_double_quotes_from(document.querySelector('#options-subject').value);
577
 
578
  const presetNameModal = new TNPModal({
579
  title: 'Choose a preset name',
582
  clickConfirmOnPressEnter: true,
583
  onConfirm: function () {
584
  const inputEl = document.querySelector('#preset_name');
585
+ document.querySelector('#options-subject').value = inputEl.value;
586
  tnpc_save(form);
587
  form.submit();
588
  }
666
 
667
  function tnpc_update_preset(form) {
668
 
669
+ const presetName = tnpc_remove_double_quotes_from(document.querySelector('#options-subject').value);
670
 
671
  const presetNameModal = new TNPModal({
672
  title: 'Choose a preset name',
675
  clickConfirmOnPressEnter: true,
676
  onConfirm: function () {
677
  const inputEl = document.querySelector('#preset_name');
678
+ document.querySelector('#options-subject').value = inputEl.value;
679
  tnpc_save(form);
680
  form.submit();
681
  }
724
  // Close all created elements if clicked outside
725
  jQuery('#newsletter-builder-area-center-frame-content').on('click', function (e) {
726
  if (activeInlineElements.length > 0
727
+ && !jQuery(e.target).hasClass(className)
728
+ && jQuery(e.target).closest('.tnpc-inline-editable-container').length === 0) {
729
  removeAllActiveElements();
730
  }
731
  });
753
  var styleAttr = "style='font-family:" + fontFamily + ";font-size:" + fontSize + ";'";
754
 
755
  switch (type) {
756
+ case 'text':
757
+ {
758
  element = "<textarea name='" + newInputName + "' class='" + className + "-textarea' rows='5' " + styleAttr + ">" + value + "</textarea>";
759
  break;
760
  }
761
+ case 'title':
762
+ {
763
  element = "<textarea name='" + newInputName + "' class='" + className + "-textarea' rows='2'" + styleAttr + ">" + value + "</textarea>";
764
  break;
765
  }
805
  if (container.hasClass('tnpc-row-block')) {
806
  var data = {
807
  'action': 'tnpc_render',
808
+ 'id': container.data('id'),
809
  'b': container.data('id'),
810
  'full': 1,
811
  '_wpnonce': tnp_nonce,
812
  'options': {
813
  'inline_edits': [{
814
+ 'type': type,
815
+ 'post_id': postId,
816
+ 'content': newContent
817
+ }]
818
  },
819
  'encoded_options': blockContent.data('json')
820
  };
889
  });
890
 
891
  })();
892
+
893
+ // ========================================================= //
894
+ // ================= SEND A TEST ===================== //
895
+ // ========================================================= //
896
+
897
+ (function sendATestIIFE($) {
898
+
899
+ var testNewsletterWithEmailFormId = '#test-newsletter-form';
900
+ var testNewsletterWithEmailForm = document.querySelector(testNewsletterWithEmailFormId);
901
+ testNewsletterWithEmailForm.addEventListener('submit', function (e) {
902
+ e.preventDefault();
903
+ var testEmail = testNewsletterWithEmailForm.querySelector('input[name="email"]').value;
904
+
905
+ let form = document.getElementById("tnpc-form");
906
+ tnpc_save(form);
907
+
908
+ form.act.value = "send-test-to-email-address";
909
+ var input = document.createElement("input");
910
+ input.setAttribute("type", "hidden");
911
+ input.setAttribute("name", "test_address_email");
912
+ input.setAttribute("value", testEmail);
913
+ form.appendChild(input);
914
+
915
+ form.submit();
916
+ });
917
+
918
+ })(jQuery);
919
+
920
+ // ================================================================== //
921
+ // ================= SUBJECT LENGTH ICONS ===================== //
922
+ // ================================================================== //
923
+
924
+ (function subjectLengthIconsIIFE($) {
925
+ var $subjectContainer = $('#tnpc-subject');
926
+ var $subjectInput = $('#tnpc-subject input');
927
+ var subjectCharCounterEl = null;
928
+
929
+ $subjectInput.on('focusin', function (e) {
930
+ $subjectContainer.find('img').fadeTo(400, 1);
931
+ });
932
+
933
+ $subjectInput.on('keyup', function (e) {
934
+ setSubjectCharactersLenght(this.value.length);
935
+ });
936
+
937
+ $subjectInput.on('focusout', function (e) {
938
+ $subjectContainer.find('img').fadeTo(300, 0);
939
+ });
940
+
941
+ function setSubjectCharactersLenght(length = 0) {
942
+
943
+ if (length === 0 && subjectCharCounterEl !== null) {
944
+ subjectCharCounterEl.remove();
945
+ subjectCharCounterEl = null;
946
+ return;
947
+ }
948
+
949
+ if (!subjectCharCounterEl) {
950
+ subjectCharCounterEl = document.createElement("span");
951
+ subjectCharCounterEl.style.position = 'absolute';
952
+ subjectCharCounterEl.style.top = '-18px';
953
+ subjectCharCounterEl.style.right = $subjectContainer[0].getBoundingClientRect().width - $subjectInput[0].getBoundingClientRect().width + 'px';
954
+ subjectCharCounterEl.style.color = '#999';
955
+ subjectCharCounterEl.style.fontSize = '0.8rem';
956
+ $subjectContainer.find('div')[0].appendChild(subjectCharCounterEl);
957
+ }
958
+
959
+ const word = length === 1 ? 'character' : 'characters';
960
+ subjectCharCounterEl.innerHTML = `${length} ${word}`;
961
+ }
962
+
963
+ })(jQuery);
964
+
965
+ // ======================================================================= //
966
+ // ================= COMPOSER MODE VIEW SWITCH ===================== //
967
+ // ======================================================================= //
968
+
969
+ (function composerModeViewIIFE($) {
970
+ const activeClass = 'composer-view-mode__item--active';
971
+ var status = 'desktop';
972
+
973
+ $('.composer-view-mode__item[data-view-mode="' + status + '"]').addClass(activeClass);
974
+
975
+ $('.composer-view-mode__item').on('click', function () {
976
+ var $el = $(this);
977
+
978
+ if ($el.data('viewMode') === 'desktop') {
979
+ status = 'desktop';
980
+ $('.composer-view-mode__item[data-view-mode="desktop"]').addClass(activeClass);
981
+ $('.composer-view-mode__item[data-view-mode="mobile"]').removeClass(activeClass);
982
+ } else if ($el.data('viewMode') === 'mobile') {
983
+ status = 'mobile';
984
+ $('.composer-view-mode__item[data-view-mode="desktop"]').removeClass(activeClass);
985
+ $('.composer-view-mode__item[data-view-mode="mobile"]').addClass(activeClass);
986
+ }
987
+
988
+ tnp_view(status);
989
+ });
990
+ })(jQuery);
emails/tnp-composer/_scripts/newsletter-builder.js CHANGED
@@ -326,7 +326,7 @@ function openTab(evt, tabName) {
326
  }
327
 
328
  // Show the current tab, and add an "active" class to the button that opened the tab
329
- document.getElementById(tabName).style.display = "block";
330
  evt.currentTarget.className += " active";
331
  }
332
 
326
  }
327
 
328
  // Show the current tab, and add an "active" class to the button that opened the tab
329
+ document.getElementById(tabName).style.display = "flex";
330
  evt.currentTarget.className += " active";
331
  }
332
 
emails/tnp-composer/css/backend.css ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Contains some rules to simulate device layout on backend preview */
2
+
3
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile table[class="responsive"] {
4
+
5
+ width:100%!important;
6
+ float: none;
7
+ display: table;
8
+ padding-left: 0;
9
+ padding-right: 0;
10
+ }
11
+
12
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile td[class="responsive"]{
13
+ width:100%!important;
14
+ max-width: 100%!important;
15
+ display: block;
16
+ padding-left: 0 !important;
17
+ padding-right: 0 !important;
18
+ float: none;
19
+ }
20
+
21
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile img[class="responsive"]{
22
+ max-width: 100%!important;
23
+ }
24
+
25
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile img[class="fluid"]{
26
+ width: 100%;
27
+ max-width: 100%!important;
28
+ }
29
+
30
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile .pt-1 {
31
+ padding-top: 15px!important;
32
+ }
33
+
34
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile .pb-1 {
35
+ padding-bottom: 15px!important;
36
+ }
37
+
38
+ #newsletter-builder-area-center-frame-content.tnp-view-mobile .tnp-grid-column {
39
+ max-width: 100%!important;
40
+ }
emails/tnp-composer/css/newsletter.css CHANGED
@@ -12,6 +12,14 @@ img.aligncenter{display:block;margin:0 auto;}
12
 
13
  @media screen and (max-width: 525px) {
14
 
 
 
 
 
 
 
 
 
15
  /* ALLOWS FOR FLUID TABLES */
16
  table[class="wrapper"]{
17
  width:100% !important;
@@ -29,6 +37,11 @@ img.aligncenter{display:block;margin:0 auto;}
29
  max-width: 100%!important;
30
  }
31
 
 
 
 
 
 
32
  .block {
33
  display: block;
34
  }
12
 
13
  @media screen and (max-width: 525px) {
14
 
15
+ .pt-1 {
16
+ padding-top: 15px!important;
17
+ }
18
+
19
+ .pb-1 {
20
+ padding-bottom: 15px!important;
21
+ }
22
+
23
  /* ALLOWS FOR FLUID TABLES */
24
  table[class="wrapper"]{
25
  width:100% !important;
37
  max-width: 100%!important;
38
  }
39
 
40
+ img[class="fluid"] {
41
+ max-width: 100%!important;
42
+ width: 100%;
43
+ }
44
+
45
  .block {
46
  display: block;
47
  }
emails/tnp-composer/index-v2.php CHANGED
@@ -10,8 +10,9 @@ $list = NewsletterEmails::instance()->get_blocks();
10
 
11
  $blocks = array();
12
  foreach ($list as $key => $data) {
13
- if (!isset($blocks[$data['section']]))
14
  $blocks[$data['section']] = array();
 
15
  $blocks[$data['section']][$key]['name'] = $data['name'];
16
  $blocks[$data['section']][$key]['filename'] = $key;
17
  $blocks[$data['section']][$key]['icon'] = $data['icon'];
@@ -32,30 +33,16 @@ $rev_dir = is_rtl() ? 'ltr' : 'rlt';
32
  <script type="text/javascript">
33
  // collapse wp menu
34
  document.body.classList.add('folded');
35
- </script>
36
- <style>
37
- .placeholder {
38
- border: 3px dashed #ddd!important;
39
- background-color: #eee!important;
40
- height: 50px;
41
- margin: 0;
42
- width: 100%;
43
- box-sizing: border-box!important;
44
- }
45
- #newsletter-builder-area-center-frame-content {
46
- min-height: 300px!important;
47
- }
48
 
49
- #tnpc-subject-wrap th[dir=rtl] {
50
- text-align: left;
51
- }
52
- #tnpc-subject-wrap td[dir=rtl] {
53
- text-align: right;
54
- }
55
- #tnpc-subject-wrap td[dir=rtl] #options-title {
56
- margin-right: 0;
57
  }
58
- </style>
 
59
 
60
  <style>
61
  <?php echo NewsletterEmails::instance()->get_composer_css(); ?>
@@ -64,31 +51,58 @@ $rev_dir = is_rtl() ? 'ltr' : 'rlt';
64
 
65
  <div id="newsletter-builder-area" class="tnp-builder-column">
66
 
67
- <?php if ($tnpc_show_subject) { ?>
68
  <div id="tnpc-subject-wrap" dir="<?php echo $dir ?>">
69
  <table role="presentation" style="width: 100%">
70
  <tr>
71
- <th dir="<?php echo $dir ?>">From</th>
72
- <td dir="<?php echo $dir ?>"><?php echo esc_html($controls->data['sender_email']) ?></td>
73
  </tr>
74
  <tr>
75
- <th dir="<?php echo $dir ?>">Subject</th>
76
  <td dir="<?php echo $dir ?>">
77
  <div id="tnpc-subject">
78
- <?php $this->subject('title'); ?>
79
  </div>
80
  </td>
81
-
 
 
 
82
  </tr>
83
  </table>
84
 
85
  <div style="text-align: left; margin-left: 1em;">
86
- <a href="https://www.thenewsletterplugin.com/documentation/newsletters/newsletter-tags/" target="_blank">You can use tags to inject subscriber fields</a>. Even on subject.
 
 
 
87
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  </div>
89
- <?php } ?>
90
 
91
-
 
 
 
 
 
92
  <div id="newsletter-builder-area-center-frame-content" dir="<?php echo $dir ?>">
93
 
94
  <!-- Composer content -->
@@ -101,8 +115,10 @@ $rev_dir = is_rtl() ? 'ltr' : 'rlt';
101
  <div class="tnpc-tabs">
102
  <button class="tablinks" onclick="openTab(event, 'tnpc-blocks')" data-tab-id='tnpc-blocks' id="defaultOpen"><?php _e('Blocks', 'newsletter') ?></button>
103
  <button class="tablinks" onclick="openTab(event, 'tnpc-global-styles')" data-tab-id='tnpc-global-styles'><?php _e('Settings', 'newsletter') ?></button>
 
104
  <button class="tablinks" onclick="openTab(event, 'tnpc-mobile-tab')" data-tab-id='tnpc-mobile-tab'><i class="fas fa-mobile"></i> <?php _e('Mobile', 'newsletter') ?></button>
105
- <?php if ($show_test) { ?>
 
106
  <button class="tablinks" onclick="openTab(event, 'tnpc-test-tab')" data-tab-id='tnpc-test-tab'><i class="fas fa-paper-plane"></i> <?php _e('Test', 'newsletter') ?></button>
107
  <?php } ?>
108
 
@@ -111,7 +127,7 @@ $rev_dir = is_rtl() ? 'ltr' : 'rlt';
111
  <div id="tnpc-blocks" class="tabcontent">
112
  <?php foreach ($blocks as $k => $section) { ?>
113
  <div class="newsletter-sidebar-add-buttons" id="sidebar-add-<?php echo $k ?>">
114
- <h4><span><?php echo ucfirst($k) ?></span></h4>
115
  <?php foreach ($section AS $key => $block) { ?>
116
  <div class="newsletter-sidebar-buttons-content-tab" data-id="<?php echo $key ?>" data-name="<?php echo esc_attr($block['name']) ?>">
117
  <img src="<?php echo $block['icon'] ?>" title="<?php echo esc_attr($block['name']) ?>">
@@ -141,8 +157,6 @@ $rev_dir = is_rtl() ? 'ltr' : 'rlt';
141
  <?php $fields->font('options_composer_text_font', __('Text font', 'newsletter')) ?>
142
  <?php $fields->button_style('options_composer_button', __('Button style', 'newsletter')); ?>
143
 
144
- <?php $fields->textarea('options_preheader', __('Snippet', 'newsletter'), ['description' => 'Show by some email clients as excerpt', 'height' => '70']) ?>
145
-
146
  <button class="button-secondary" name="apply"><?php _e("Apply", 'newsletter') ?></button>
147
 
148
  </form>
@@ -189,8 +203,8 @@ $rev_dir = is_rtl() ? 'ltr' : 'rlt';
189
  <div style="display: none">
190
  <div id="newsletter-preloaded-export"></div>
191
  <!-- Block placeholder used by jQuery UI -->
192
- <div id="draggable-helper" style="width: 500px; border: 3px dashed #ddd; opacity: .7; background-color: #fff; text-align: center; text-transform: uppercase; font-size: 14px; color: #aaa; padding: 20px;"></div>
193
- <div id="sortable-helper" style="width: 700px; height: 75px;border: 3px dashed #ddd; opacity: .7; background-color: #fff; text-align: center; text-transform: uppercase; font-size: 14px; color: #aaa; padding: 20px;"></div>
194
  </div>
195
 
196
  <script type="text/javascript">
@@ -200,9 +214,9 @@ $rev_dir = is_rtl() ? 'ltr' : 'rlt';
200
  tnp_nonce = '<?php echo esc_js(wp_create_nonce('save')) ?>';
201
  tnp_preset_nonce = '<?php echo esc_js(wp_create_nonce('preset')) ?>';
202
  </script>
203
- <script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/modal.js?ver=<?php echo time() ?>"></script>
204
- <script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/tnp-toast.js?ver=<?php echo time() ?>"></script>
205
- <script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/newsletter-builder-v2.js?ver=<?php echo time() ?>"></script>
206
 
207
  <?php include NEWSLETTER_DIR . '/emails/subjects.php'; ?>
208
 
10
 
11
  $blocks = array();
12
  foreach ($list as $key => $data) {
13
+ if (!isset($blocks[$data['section']])) {
14
  $blocks[$data['section']] = array();
15
+ }
16
  $blocks[$data['section']][$key]['name'] = $data['name'];
17
  $blocks[$data['section']][$key]['filename'] = $key;
18
  $blocks[$data['section']][$key]['icon'] = $data['icon'];
33
  <script type="text/javascript">
34
  // collapse wp menu
35
  document.body.classList.add('folded');
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
+ function tnp_view(type) {
38
+ if (type === 'mobile') {
39
+ jQuery('#newsletter-builder-area-center-frame-content').addClass('tnp-view-mobile');
40
+ } else {
41
+ jQuery('#newsletter-builder-area-center-frame-content').removeClass('tnp-view-mobile');
42
+ }
 
 
43
  }
44
+ </script>
45
+
46
 
47
  <style>
48
  <?php echo NewsletterEmails::instance()->get_composer_css(); ?>
51
 
52
  <div id="newsletter-builder-area" class="tnp-builder-column">
53
 
54
+ <?php if ( $tnpc_show_subject ) { ?>
55
  <div id="tnpc-subject-wrap" dir="<?php echo $dir ?>">
56
  <table role="presentation" style="width: 100%">
57
  <tr>
58
+ <th dir="<?php echo $dir ?>"><?php _e('From', 'newsletter') ?></th>
59
+ <td dir="<?php echo $dir ?>"><?php echo esc_html( $controls->data['sender_email'] ) ?></td>
60
  </tr>
61
  <tr>
62
+ <th dir="<?php echo $dir ?>"><?php _e('Subject', 'newsletter') ?></th>
63
  <td dir="<?php echo $dir ?>">
64
  <div id="tnpc-subject">
65
+ <?php $this->subject( 'subject' ); ?>
66
  </div>
67
  </td>
68
+ </tr>
69
+ <tr>
70
+ <th dir="<?php echo $dir ?>"><span title="<?php esc_attr_e('Shown by some email clients as excerpt', 'newsletter')?>"><?php _e('Snippet', 'newsletter') ?></span></th>
71
+ <td dir="<?php echo $dir ?>"><?php $this->text('preheader') ?></td>
72
  </tr>
73
  </table>
74
 
75
  <div style="text-align: left; margin-left: 1em;">
76
+ <a href="https://www.thenewsletterplugin.com/documentation/newsletters/newsletter-tags/"
77
+ target="_blank">You can use tags to inject subscriber fields</a>. Even on subject.
78
+
79
+
80
  </div>
81
+
82
+ <div class="composer-actions">
83
+ <div id="test-newsletter-button"
84
+ class="button-primary"
85
+ data-tnp-modal-target="#test-newsletter-modal">
86
+ <i class="fas fa-paper-plane"></i> <?php _e( 'Test', 'newsletter' ) ?>
87
+ </div>
88
+ <div class="composer-view-mode">
89
+ <span class="composer-view-mode__item"
90
+ data-view-mode="desktop">
91
+ <i class="fas fa-desktop"></i>
92
+ </span>
93
+ <span class="composer-view-mode__item"
94
+ data-view-mode="mobile">
95
+ <i class="fas fa-mobile"></i>
96
+ <span>
97
+ </div>
98
  </div>
 
99
 
100
+ <?php include NEWSLETTER_DIR . '/emails/tnp-composer/modal/test-newsletter.php' ?>
101
+
102
+ </div>
103
+ <?php } ?>
104
+
105
+
106
  <div id="newsletter-builder-area-center-frame-content" dir="<?php echo $dir ?>">
107
 
108
  <!-- Composer content -->
115
  <div class="tnpc-tabs">
116
  <button class="tablinks" onclick="openTab(event, 'tnpc-blocks')" data-tab-id='tnpc-blocks' id="defaultOpen"><?php _e('Blocks', 'newsletter') ?></button>
117
  <button class="tablinks" onclick="openTab(event, 'tnpc-global-styles')" data-tab-id='tnpc-global-styles'><?php _e('Settings', 'newsletter') ?></button>
118
+ <!--
119
  <button class="tablinks" onclick="openTab(event, 'tnpc-mobile-tab')" data-tab-id='tnpc-mobile-tab'><i class="fas fa-mobile"></i> <?php _e('Mobile', 'newsletter') ?></button>
120
+ -->
121
+ <?php if (false && $show_test) { ?>
122
  <button class="tablinks" onclick="openTab(event, 'tnpc-test-tab')" data-tab-id='tnpc-test-tab'><i class="fas fa-paper-plane"></i> <?php _e('Test', 'newsletter') ?></button>
123
  <?php } ?>
124
 
127
  <div id="tnpc-blocks" class="tabcontent">
128
  <?php foreach ($blocks as $k => $section) { ?>
129
  <div class="newsletter-sidebar-add-buttons" id="sidebar-add-<?php echo $k ?>">
130
+ <!--<h4><span><?php echo ucfirst($k) ?></span></h4>-->
131
  <?php foreach ($section AS $key => $block) { ?>
132
  <div class="newsletter-sidebar-buttons-content-tab" data-id="<?php echo $key ?>" data-name="<?php echo esc_attr($block['name']) ?>">
133
  <img src="<?php echo $block['icon'] ?>" title="<?php echo esc_attr($block['name']) ?>">
157
  <?php $fields->font('options_composer_text_font', __('Text font', 'newsletter')) ?>
158
  <?php $fields->button_style('options_composer_button', __('Button style', 'newsletter')); ?>
159
 
 
 
160
  <button class="button-secondary" name="apply"><?php _e("Apply", 'newsletter') ?></button>
161
 
162
  </form>
203
  <div style="display: none">
204
  <div id="newsletter-preloaded-export"></div>
205
  <!-- Block placeholder used by jQuery UI -->
206
+ <div id="draggable-helper"></div>
207
+ <div id="sortable-helper"></div>
208
  </div>
209
 
210
  <script type="text/javascript">
214
  tnp_nonce = '<?php echo esc_js(wp_create_nonce('save')) ?>';
215
  tnp_preset_nonce = '<?php echo esc_js(wp_create_nonce('preset')) ?>';
216
  </script>
217
+ <?php
218
+ wp_enqueue_script('tnp-composer', NEWSLETTER_URL . '/emails/tnp-composer/_scripts/newsletter-builder-v2.js', ['tnp-modal', 'tnp-toast'], NEWSLETTER_VERSION);
219
+ ?>
220
 
221
  <?php include NEWSLETTER_DIR . '/emails/subjects.php'; ?>
222
 
emails/tnp-composer/modal/test-newsletter.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="tnp-modal2"
2
+ id="test-newsletter-modal"
3
+ aria-hidden="true">
4
+ <div class="tnp-modal2__content"
5
+ role="dialog"
6
+ style="width: 600px">
7
+ <header class="tnp-modal2__header">
8
+ <h2><?php _e( "Send a test", 'newsletter' ) ?></h2>
9
+ <span class="tnp-modal2__close"
10
+ data-tnp-modal-close
11
+ aria-label="Close modal"></span>
12
+ </header>
13
+ <div class="tnp-modal2__body">
14
+
15
+ <form id="test-newsletter-form">
16
+ <h4><?php _e( "Send a test to", 'newsletter' ) ?></h4>
17
+ <input name="email"
18
+ type="email"
19
+ placeholder="<?php _e( "Email", 'newsletter' ) ?>"
20
+ id="test-newsletter-email">
21
+ <button class="button-secondary"
22
+ type="submit">
23
+ <?php _e( "Send", 'newsletter' ) ?>
24
+ </button>
25
+ </form>
26
+
27
+ <div class="separator"><?php _e( "or", 'newsletter' ) ?></div>
28
+
29
+ <div class="test-subscribers">
30
+ <?php if ( ! empty( NewsletterUsers::instance()->get_test_users() ) ): ?>
31
+ <h4><?php _e( "Send a test to test subscribers", 'newsletter' ) ?></h4>
32
+ <ul>
33
+ <?php foreach ( NewsletterUsers::instance()->get_test_users() as $user ) { ?>
34
+ <li><?php echo $user->email ?></li>
35
+ <?php } ?>
36
+ </ul>
37
+ <button class="button-secondary"
38
+ onclick="tnpc_test()"><?php _e( "Send", 'newsletter' ) ?></button>
39
+ <?php endif; ?>
40
+ <p style="float: right">
41
+ <a href="https://www.thenewsletterplugin.com/documentation/subscribers#test"
42
+ target="_blank">
43
+ <?php _e( 'Read more about test subscribers', 'newsletter' ) ?></a>
44
+ </p>
45
+ </div>
46
+
47
+ </div>
48
+ </div>
49
+ </div>
images/subject/android.png CHANGED
Binary file
images/subject/gmail.png CHANGED
Binary file
images/subject/iphone.png CHANGED
Binary file
includes/antispam.php CHANGED
@@ -142,6 +142,9 @@ class NewsletterAntispam {
142
  if (stripos($text, 'www.') !== false) {
143
  return true;
144
  }
 
 
 
145
 
146
  return false;
147
  }
142
  if (stripos($text, 'www.') !== false) {
143
  return true;
144
  }
145
+ if (preg_match('|[^\s\.]+\.[^\s\.]+\.[^\s\.]{2,}|', $text)) {
146
+ return true;
147
+ }
148
 
149
  return false;
150
  }
includes/composer.php CHANGED
@@ -23,12 +23,21 @@ class TNP_Composer {
23
 
24
  static function register_block($dir) {
25
  // Checks
 
 
 
 
 
 
 
 
26
 
27
  if (!file_exists($dir . '/block.php')) {
28
  $error = new WP_Error('1', 'block.php missing on folder ' . $dir);
29
  NewsletterEmails::instance()->logger->error($error);
30
  return $error;
31
  }
 
32
  self::$block_dirs[] = $dir;
33
  return true;
34
  }
@@ -84,7 +93,7 @@ class TNP_Composer {
84
  /**
85
  * Sources:
86
  * - https://webdesign.tutsplus.com/tutorials/creating-a-future-proof-responsive-email-without-media-queries--cms-23919
87
- *
88
  * @param type $email
89
  * @return type
90
  */
@@ -234,6 +243,10 @@ class TNP_Composer {
234
  }
235
  }
236
 
 
 
 
 
237
  $email->editor = NewsletterEmails::EDITOR_COMPOSER;
238
 
239
  $email->message = self::get_html_open($email) . self::get_main_wrapper_open($email) .
@@ -254,9 +267,7 @@ class TNP_Composer {
254
  if (!empty($email)) {
255
 
256
  foreach ($email->options as $name => $value) {
257
- //if (strpos($name, 'composer_') === 0) {
258
  $controls->data['options_' . $name] = $value;
259
- //}
260
  }
261
 
262
  $controls->data['message'] = TNP_Composer::unwrap_email($email->message);
@@ -339,10 +350,12 @@ class TNP_Composer {
339
  */
340
  static function button($options, $prefix = 'button') {
341
 
 
 
 
342
  $defaults = [
343
  $prefix . '_url' => '#',
344
  $prefix . '_font_family' => 'Helvetica, Arial, sans-serif',
345
- $prefix . '_label' => 'Click Here',
346
  $prefix . '_font_color' => '#ffffff',
347
  $prefix . '_font_weight' => 'bold',
348
  $prefix . '_font_size' => 20,
@@ -382,7 +395,7 @@ class TNP_Composer {
382
 
383
  $default_attrs = [
384
  'style' => 'max-width: 100%; height: auto; display: inline-block',
385
- 'class' => null,
386
  'link-style' => 'text-decoration: none; display: inline-block',
387
  'link-class' => null,
388
  ];
@@ -391,12 +404,16 @@ class TNP_Composer {
391
 
392
  //Class and style attribute are mutually exclusive.
393
  //Class take priority to style because classes will transform to inline style inside block rendering operation
394
- if (!empty($attr['class'])) {
395
- $styling = ' inline-class="' . esc_attr($attr['class']) . '" ';
396
  } else {
397
  $styling = ' style="' . esc_attr($attr['style']) . '" ';
398
  }
399
 
 
 
 
 
400
  //Class and style attribute are mutually exclusive.
401
  //Class take priority to style because classes will transform to inline style inside block rendering operation
402
  if (!empty($attr['link-class'])) {
@@ -408,8 +425,10 @@ class TNP_Composer {
408
  $b = '';
409
  if ($media->link) {
410
  $b .= '<a href="' . esc_attr($media->link) . '" target="_blank" rel="noopener nofollow" style="display: inline-block; font-size: 0; text-decoration: none; line-height: normal!important">';
 
 
 
411
  }
412
-
413
  if ($media) {
414
  $b .= '<img src="' . esc_attr($media->url) . '" width="' . esc_attr($media->width) . '"';
415
  if ($media->height) {
@@ -418,12 +437,14 @@ class TNP_Composer {
418
  $b .= ' alt="' . esc_attr($media->alt) . '"'
419
  . ' border="0"'
420
  . ' style="display: inline-block; max-width: 100%!important; padding: 0; border: 0;"'
421
- . ' class="" '
422
  . '>';
423
  }
424
 
425
  if ($media->link) {
426
  $b .= '</a>';
 
 
427
  }
428
 
429
  return $b;
@@ -433,7 +454,7 @@ class TNP_Composer {
433
  * Returns a WP media ID for the specified post (or false if nothing can be found)
434
  * looking for the featured image or, if missing, taking the first media in the gallery and
435
  * if again missing, searching the first reference to a media in the post content.
436
- *
437
  * The media ID is not checked for real existance of the associated attachment.
438
  *
439
  * @param int $post_id
@@ -468,10 +489,10 @@ class TNP_Composer {
468
  }
469
 
470
  /**
471
- * Builds a TNP_Media object to be used in newsletters from a WP media/attachement ID. The returned
472
  * media has a size which best match the one requested (this is the standard WP behavior, plugins
473
  * could change it).
474
- *
475
  * @param int $media_id
476
  * @param array $size
477
  * @return \TNP_Media
@@ -576,13 +597,26 @@ class TNP_Composer {
576
  }
577
  return $e;
578
  }
579
-
580
- static function get_style($options, $prefix, $composer, $type = 'text') {
 
 
 
 
 
 
 
 
581
  $style = new TNP_Style();
582
- if (!empty($prefix)) $prefix .= '_';
583
-
 
 
 
 
 
584
  $style->font_family = empty($options[$prefix . 'font_family']) ? $composer[$type . '_font_family'] : $options[$prefix . 'font_family'];
585
- $style->font_size = empty($options[$prefix . 'font_size']) ? $composer[$type . '_font_size'] : $options[$prefix . 'font_size'];
586
  $style->font_color = empty($options[$prefix . 'font_color']) ? $composer[$type . '_font_color'] : $options[$prefix . 'font_color'];
587
  $style->font_weight = empty($options[$prefix . 'font_weight']) ? $composer[$type . '_font_weight'] : $options[$prefix . 'font_weight'];
588
  if ($type === 'button') {
@@ -594,11 +628,20 @@ class TNP_Composer {
594
  }
595
 
596
  class TNP_Style {
 
597
  var $font_family;
598
  var $font_size;
599
  var $font_weight;
600
  var $font_color;
601
  var $background;
 
 
 
 
 
 
 
 
602
  }
603
 
604
  /**
23
 
24
  static function register_block($dir) {
25
  // Checks
26
+ $dir = realpath($dir);
27
+ if (!$dir) {
28
+ $error = new WP_Error('1', 'Seems not a valid path: ' . $dir);
29
+ NewsletterEmails::instance()->logger->error($error);
30
+ return $error;
31
+ }
32
+
33
+ $dir = wp_normalize_path($dir);
34
 
35
  if (!file_exists($dir . '/block.php')) {
36
  $error = new WP_Error('1', 'block.php missing on folder ' . $dir);
37
  NewsletterEmails::instance()->logger->error($error);
38
  return $error;
39
  }
40
+
41
  self::$block_dirs[] = $dir;
42
  return true;
43
  }
93
  /**
94
  * Sources:
95
  * - https://webdesign.tutsplus.com/tutorials/creating-a-future-proof-responsive-email-without-media-queries--cms-23919
96
+ *
97
  * @param type $email
98
  * @return type
99
  */
243
  }
244
  }
245
 
246
+ //if (isset($controls->data['preheader'])) {
247
+ // $email->options['preheader'] = $controls->data['preheader'];
248
+ //}
249
+
250
  $email->editor = NewsletterEmails::EDITOR_COMPOSER;
251
 
252
  $email->message = self::get_html_open($email) . self::get_main_wrapper_open($email) .
267
  if (!empty($email)) {
268
 
269
  foreach ($email->options as $name => $value) {
 
270
  $controls->data['options_' . $name] = $value;
 
271
  }
272
 
273
  $controls->data['message'] = TNP_Composer::unwrap_email($email->message);
350
  */
351
  static function button($options, $prefix = 'button') {
352
 
353
+ if (empty($options[$prefix . '_label'])) {
354
+ return;
355
+ }
356
  $defaults = [
357
  $prefix . '_url' => '#',
358
  $prefix . '_font_family' => 'Helvetica, Arial, sans-serif',
 
359
  $prefix . '_font_color' => '#ffffff',
360
  $prefix . '_font_weight' => 'bold',
361
  $prefix . '_font_size' => 20,
395
 
396
  $default_attrs = [
397
  'style' => 'max-width: 100%; height: auto; display: inline-block',
398
+ 'class' => '',
399
  'link-style' => 'text-decoration: none; display: inline-block',
400
  'link-class' => null,
401
  ];
404
 
405
  //Class and style attribute are mutually exclusive.
406
  //Class take priority to style because classes will transform to inline style inside block rendering operation
407
+ if (!empty($attr['inline-class'])) {
408
+ $styling = ' inline-class="' . esc_attr($attr['inline-class']) . '" ';
409
  } else {
410
  $styling = ' style="' . esc_attr($attr['style']) . '" ';
411
  }
412
 
413
+ if (!empty($attr['class'])) {
414
+ $styling .= ' class="' . esc_attr($attr['class']) . '" ';
415
+ }
416
+
417
  //Class and style attribute are mutually exclusive.
418
  //Class take priority to style because classes will transform to inline style inside block rendering operation
419
  if (!empty($attr['link-class'])) {
425
  $b = '';
426
  if ($media->link) {
427
  $b .= '<a href="' . esc_attr($media->link) . '" target="_blank" rel="noopener nofollow" style="display: inline-block; font-size: 0; text-decoration: none; line-height: normal!important">';
428
+ } else {
429
+ // The span grants images are not upscaled when fluid (two columns posts block)
430
+ $b .= '<span style="display: inline-block; font-size: 0; text-decoration: none; line-height: normal!important">';
431
  }
 
432
  if ($media) {
433
  $b .= '<img src="' . esc_attr($media->url) . '" width="' . esc_attr($media->width) . '"';
434
  if ($media->height) {
437
  $b .= ' alt="' . esc_attr($media->alt) . '"'
438
  . ' border="0"'
439
  . ' style="display: inline-block; max-width: 100%!important; padding: 0; border: 0;"'
440
+ . ' class="' . esc_attr($attr['class']) . '" '
441
  . '>';
442
  }
443
 
444
  if ($media->link) {
445
  $b .= '</a>';
446
+ } else {
447
+ $b .= '</span>';
448
  }
449
 
450
  return $b;
454
  * Returns a WP media ID for the specified post (or false if nothing can be found)
455
  * looking for the featured image or, if missing, taking the first media in the gallery and
456
  * if again missing, searching the first reference to a media in the post content.
457
+ *
458
  * The media ID is not checked for real existance of the associated attachment.
459
  *
460
  * @param int $post_id
489
  }
490
 
491
  /**
492
+ * Builds a TNP_Media object to be used in newsletters from a WP media/attachement ID. The returned
493
  * media has a size which best match the one requested (this is the standard WP behavior, plugins
494
  * could change it).
495
+ *
496
  * @param int $media_id
497
  * @param array $size
498
  * @return \TNP_Media
597
  }
598
  return $e;
599
  }
600
+
601
+ static function get_text_style($options, $prefix, $composer, $attrs = []) {
602
+ return self::get_style($options, $prefix, $composer, 'text', $attrs);
603
+ }
604
+
605
+ static function get_title_style($options, $prefix, $composer, $attrs = []) {
606
+ return self::get_style($options, $prefix, $composer, 'title', $attrs);
607
+ }
608
+
609
+ static function get_style($options, $prefix, $composer, $type = 'text', $attrs = []) {
610
  $style = new TNP_Style();
611
+ $scale = 1.0;
612
+ if (!empty($attrs['scale'])) {
613
+ $scale = (float) $attrs['scale'];
614
+ }
615
+ if (!empty($prefix))
616
+ $prefix .= '_';
617
+
618
  $style->font_family = empty($options[$prefix . 'font_family']) ? $composer[$type . '_font_family'] : $options[$prefix . 'font_family'];
619
+ $style->font_size = empty($options[$prefix . 'font_size']) ? round($composer[$type . '_font_size'] * $scale) : $options[$prefix . 'font_size'];
620
  $style->font_color = empty($options[$prefix . 'font_color']) ? $composer[$type . '_font_color'] : $options[$prefix . 'font_color'];
621
  $style->font_weight = empty($options[$prefix . 'font_weight']) ? $composer[$type . '_font_weight'] : $options[$prefix . 'font_weight'];
622
  if ($type === 'button') {
628
  }
629
 
630
  class TNP_Style {
631
+
632
  var $font_family;
633
  var $font_size;
634
  var $font_weight;
635
  var $font_color;
636
  var $background;
637
+
638
+ function echo_css($scale = 1.0) {
639
+ echo 'font-size: ', round($this->font_size * $scale), 'px;';
640
+ echo 'font-family: ', $this->font_family, ';';
641
+ echo 'font-weight: ', $this->font_weight, ';';
642
+ echo 'color: ', $this->font_color, ';';
643
+ }
644
+
645
  }
646
 
647
  /**
includes/controls.php CHANGED
@@ -275,7 +275,7 @@ class NewsletterControls {
275
  );
276
 
277
  /**
278
- *
279
  * @param array $options
280
  */
281
  function __construct($options = null) {
@@ -314,6 +314,11 @@ class NewsletterControls {
314
  if (!isset($this->data[$name]))
315
  $this->data[$name] = [];
316
  }
 
 
 
 
 
317
  }
318
  }
319
  }
@@ -857,7 +862,7 @@ class NewsletterControls {
857
 
858
  /**
859
  * General button.
860
- *
861
  * @param type $action
862
  * @param type $label
863
  * @param type $attrs
@@ -1240,7 +1245,7 @@ class NewsletterControls {
1240
 
1241
  /** A list of all lists defined each one with a checkbox to select it. An array
1242
  * of ID of all checked lists is submitted.
1243
- *
1244
  * @param string $name
1245
  */
1246
  function lists($name = 'lists') {
@@ -2031,8 +2036,14 @@ tnp_controls_init();
2031
  * Adds the fields used by the composer (version 2) in the page form.
2032
  */
2033
  function composer_fields_v2($name = 'message') {
 
 
2034
  $this->hidden('subject');
2035
  $this->hidden('message');
 
 
 
 
2036
  }
2037
 
2038
  function composer_load_v2($show_subject = false, $show_test = true, $context_type = '') {
@@ -2042,22 +2053,20 @@ tnp_controls_init();
2042
 
2043
  echo "<link href='" . plugins_url('newsletter') . "/emails/tnp-composer/_css/newsletter-builder-v2.css?ver=" . NEWSLETTER_VERSION . "' rel='stylesheet' type='text/css'>";
2044
 
2045
- wp_enqueue_style('tnp-modal-style', plugins_url('newsletter') . '/emails/tnp-composer/_css/tnp-modal.css', array(), NEWSLETTER_VERSION);
2046
- wp_enqueue_style('tnp-toast-style', plugins_url('newsletter') . '/emails/tnp-composer/_css/tnp-toast.css', array(), NEWSLETTER_VERSION);
2047
  $controls = $this;
2048
  include NEWSLETTER_DIR . '/emails/tnp-composer/index-v2.php';
2049
  }
2050
 
2051
  function subject($name) {
2052
  $value = $this->get_value($name);
2053
- echo '<div style="position: relative"><input size="80" id="options-', esc_attr($name), '" style="font-size: 14px; font-family: monospace;" name="options[' . esc_attr($name) . ']" type="text" placeholder="" value="';
2054
  echo esc_attr($value);
2055
  echo '">';
2056
- echo '&nbsp;<i class="far fa-lightbulb" onclick="tnp_suggest_subject()"></i>';
2057
 
2058
- // echo '<img src="', NEWSLETTER_URL, '/images/subject/android.png" style="position: absolute; left: 330px; top: 22px; display: block">';
2059
- // echo '<img src="', NEWSLETTER_URL, '/images/subject/iphone.png" style="position: absolute; left: 380px; top: 22px; display: block">';
2060
- // echo '<img src="', NEWSLETTER_URL, '/images/subject/gmail.png" style="position: absolute; left: 400px; top: 22px; display: block">';
2061
  echo '</div>';
2062
  }
2063
 
275
  );
276
 
277
  /**
278
+ *
279
  * @param array $options
280
  */
281
  function __construct($options = null) {
314
  if (!isset($this->data[$name]))
315
  $this->data[$name] = [];
316
  }
317
+ if ($type === 'checkbox') {
318
+ if (!isset($this->data[$name])) {
319
+ $this->data[$name] = 0;
320
+ }
321
+ }
322
  }
323
  }
324
  }
862
 
863
  /**
864
  * General button.
865
+ *
866
  * @param type $action
867
  * @param type $label
868
  * @param type $attrs
1245
 
1246
  /** A list of all lists defined each one with a checkbox to select it. An array
1247
  * of ID of all checked lists is submitted.
1248
+ *
1249
  * @param string $name
1250
  */
1251
  function lists($name = 'lists') {
2036
  * Adds the fields used by the composer (version 2) in the page form.
2037
  */
2038
  function composer_fields_v2($name = 'message') {
2039
+
2040
+ // The composer, on saving, fills in those fields
2041
  $this->hidden('subject');
2042
  $this->hidden('message');
2043
+ $this->hidden('options_preheader');
2044
+
2045
+ //$preheader_value = $this->get_value('options_preheader');
2046
+ // echo '<input name="options[preheader]" id="options-preheader" type="hidden" value="', esc_attr($preheader_value), '">';
2047
  }
2048
 
2049
  function composer_load_v2($show_subject = false, $show_test = true, $context_type = '') {
2053
 
2054
  echo "<link href='" . plugins_url('newsletter') . "/emails/tnp-composer/_css/newsletter-builder-v2.css?ver=" . NEWSLETTER_VERSION . "' rel='stylesheet' type='text/css'>";
2055
 
 
 
2056
  $controls = $this;
2057
  include NEWSLETTER_DIR . '/emails/tnp-composer/index-v2.php';
2058
  }
2059
 
2060
  function subject($name) {
2061
  $value = $this->get_value($name);
2062
+ echo '<div style="position: relative"><input size="80" id="options-', esc_attr($name), '" name="options[' . esc_attr($name) . ']" type="text" placeholder="" value="';
2063
  echo esc_attr($value);
2064
  echo '">';
2065
+ echo '&nbsp;<i class="far fa-lightbulb tnp-suggest-subject" data-tnp-modal-target="#subject-ideas-modal"></i>';
2066
 
2067
+ echo '<img src="', NEWSLETTER_URL, '/images/subject/android.png" style="position: absolute; width: 16px; left: 330px; top: 25px; display: block; opacity: 0">';
2068
+ echo '<img src="', NEWSLETTER_URL, '/images/subject/iphone.png" style="position: absolute; width: 16px; left: 380px; top: 25px; display: block; opacity: 0">';
2069
+ //echo '<img src="', NEWSLETTER_URL, '/images/subject/gmail.png" style="position: absolute; width: 16px; left: 400px; top: 25px; display: block; opacity: 0">';
2070
  echo '</div>';
2071
  }
2072
 
includes/fields.php CHANGED
@@ -126,6 +126,41 @@ class NewsletterFields {
126
  $this->input($name, $label, $attrs);
127
  }
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  public function number($name, $label = '', $attrs = []) {
130
  $attrs = array_merge(['type' => 'number'], $attrs);
131
  $this->input($name, $label, $attrs);
@@ -322,7 +357,7 @@ class NewsletterFields {
322
  'family_default' => false,
323
  'size_default' => false,
324
  'weight_default' => false,
325
- ]);
326
 
327
  $this->_open('tnpf-button');
328
  $this->_label($label);
@@ -338,8 +373,12 @@ class NewsletterFields {
338
  if ($attrs['url']) {
339
  $value = $this->controls->get_value($name . '_url');
340
  echo '<div class="tnp-field-col-2">';
 
341
  echo '<input id="', $this->_id($name . '_url'), '" placeholder="', esc_attr($attrs['url_placeholder']), '" name="options[',
342
- $name_esc, '_url]" type="url" style="width: 100%" value="', esc_attr($value), '">';
 
 
 
343
  echo '</div>';
344
  }
345
  echo '<div style="clear: both"></div>';
@@ -375,6 +414,9 @@ class NewsletterFields {
375
  $this->_open('tnp-url');
376
  $this->_label($label);
377
  $this->controls->text_url($name);
 
 
 
378
  $this->_description($attrs);
379
  $this->_close();
380
  }
126
  $this->input($name, $label, $attrs);
127
  }
128
 
129
+ public function text_on_off($name, $label = '', $attrs = []) {
130
+ $attrs = $this->_merge_attrs($attrs, ['placeholder' => '', 'size' => 0, 'label_after' => '', 'type' => 'text']);
131
+ $this->_open();
132
+ $this->_label($label);
133
+ $value = $this->controls->get_value($name);
134
+
135
+ echo '<input type="hidden" name="tnp_fields[' . esc_attr($name . '_enabled') . ']" value="checkbox">';
136
+ echo '<input id="', $this->_id($name . '_enabled'), '" name="', $this->_name($name . '_enabled'), '" type="checkbox" value="1"';
137
+ if (!empty($this->controls->get_value($name . '_enabled'))) {
138
+ echo ' checked';
139
+ }
140
+ echo '>&nbsp;';
141
+
142
+ echo '<input id="', $this->_id($name), '" placeholder="', esc_attr($attrs['placeholder']), '" name="', $this->_name($name), '" type="text"';
143
+
144
+ echo ' style="width: 90%;"';
145
+
146
+ if (isset($attrs['min'])) {
147
+ echo ' min="' . (int) $attrs['min'] . '"';
148
+ }
149
+
150
+ if (isset($attrs['max'])) {
151
+ echo ' max="' . (int) $attrs['max'] . '"';
152
+ }
153
+
154
+ echo ' value="', esc_attr($value), '">';
155
+
156
+ if (!empty($attrs['label_after'])) {
157
+ echo $attrs['label_after'];
158
+ }
159
+
160
+ $this->_description($attrs);
161
+ $this->_close();
162
+ }
163
+
164
  public function number($name, $label = '', $attrs = []) {
165
  $attrs = array_merge(['type' => 'number'], $attrs);
166
  $this->input($name, $label, $attrs);
357
  'family_default' => false,
358
  'size_default' => false,
359
  'weight_default' => false,
360
+ ]);
361
 
362
  $this->_open('tnpf-button');
363
  $this->_label($label);
373
  if ($attrs['url']) {
374
  $value = $this->controls->get_value($name . '_url');
375
  echo '<div class="tnp-field-col-2">';
376
+ $width = isset($attrs['media']) ? '90%' : '100%';
377
  echo '<input id="', $this->_id($name . '_url'), '" placeholder="', esc_attr($attrs['url_placeholder']), '" name="options[',
378
+ $name_esc, '_url]" type="url" style="width: ', $width, '" value="', esc_attr($value), '">';
379
+ if (isset($attrs['media'])) {
380
+ echo '&nbsp;<i class="far fa-folder-open" data-field="', $this->_id($name . '_url'), '" onclick="tnp_fields_url_select(this)"></i>';
381
+ }
382
  echo '</div>';
383
  }
384
  echo '<div style="clear: both"></div>';
414
  $this->_open('tnp-url');
415
  $this->_label($label);
416
  $this->controls->text_url($name);
417
+ if (isset($attrs['media'])) {
418
+ echo '<i class="far fa-folder-open" onclick="tnp_fields_url_select(\'options_', $name, '\')"></i>';
419
+ }
420
  $this->_description($attrs);
421
  $this->_close();
422
  }
includes/logger.php CHANGED
@@ -25,7 +25,7 @@ class NewsletterLogger {
25
  else
26
  $this->level = (int) get_option('newsletter_log_level', self::ERROR);
27
 
28
- $secret = get_option('newsletter_logger_secret');
29
  if (strlen($secret) < 8) {
30
  $secret = NewsletterModule::get_token(8);
31
  update_option('newsletter_logger_secret', $secret);
@@ -73,8 +73,9 @@ class NewsletterLogger {
73
  /* @var $text WP_Error */
74
  $text = $text->get_error_message() . ' (' . $text->get_error_code() . ') - ' . print_r($text->get_error_data(), true);
75
  } else {
76
- if (is_array($text) || is_object($text))
77
  $text = print_r($text, true);
 
78
  }
79
 
80
  $memory_limit = size_format(wp_convert_hr_to_bytes(ini_get('memory_limit')));
25
  else
26
  $this->level = (int) get_option('newsletter_log_level', self::ERROR);
27
 
28
+ $secret = get_option('newsletter_logger_secret', '');
29
  if (strlen($secret) < 8) {
30
  $secret = NewsletterModule::get_token(8);
31
  update_option('newsletter_logger_secret', $secret);
73
  /* @var $text WP_Error */
74
  $text = $text->get_error_message() . ' (' . $text->get_error_code() . ') - ' . print_r($text->get_error_data(), true);
75
  } else {
76
+ if (is_array($text) || is_object($text)) {
77
  $text = print_r($text, true);
78
+ }
79
  }
80
 
81
  $memory_limit = size_format(wp_convert_hr_to_bytes(ini_get('memory_limit')));
includes/mailer.php CHANGED
@@ -3,7 +3,8 @@
3
  use TNP\Mailer\PHPMailerLoader;
4
 
5
  /**
6
- *
 
7
  */
8
  class NewsletterMailer {
9
 
3
  use TNP\Mailer\PHPMailerLoader;
4
 
5
  /**
6
+ * A basic class able to send one or more TNP_Mailer_Message objects using a
7
+ * delivery method (wp-mail(), SMTP, API, ...).
8
  */
9
  class NewsletterMailer {
10
 
includes/module.php CHANGED
@@ -21,6 +21,7 @@ class TNP_Media {
21
 
22
  /** Sets the width recalculating the height */
23
  public function set_width($width) {
 
24
  $this->height = floor(($width / $this->width) * $this->height);
25
  $this->width = $width;
26
  }
@@ -286,7 +287,7 @@ class TNP_Subscription {
286
  const EXISTING_MERGE = 0;
287
 
288
  /**
289
- * Subscriber data following the syntax of the TNP_User
290
  * @var TNP_Subscription_Data
291
  */
292
  var $data;
@@ -368,7 +369,7 @@ class NewsletterModule {
368
  * @var NewsletterLogger
369
  */
370
  var $logger;
371
-
372
  /**
373
  * @var NewsletterLogger
374
  */
@@ -418,8 +419,7 @@ class NewsletterModule {
418
  $this->components = $components;
419
 
420
  $this->logger = new NewsletterLogger($module);
421
-
422
-
423
  $this->options = $this->get_options();
424
  $this->store = NewsletterStore::singleton();
425
 
@@ -2303,11 +2303,21 @@ class NewsletterModule {
2303
  if (empty($ip)) {
2304
  return '';
2305
  }
2306
- return preg_replace('/[^0-9a-fA-F:., ]/', '', $ip);
2307
  }
2308
 
2309
  static function get_remote_ip() {
2310
- return self::sanitize_ip($_SERVER['REMOTE_ADDR']);
 
 
 
 
 
 
 
 
 
 
2311
  }
2312
 
2313
  static function get_signature($text) {
21
 
22
  /** Sets the width recalculating the height */
23
  public function set_width($width) {
24
+ if ($this->width < $width) return;
25
  $this->height = floor(($width / $this->width) * $this->height);
26
  $this->width = $width;
27
  }
287
  const EXISTING_MERGE = 0;
288
 
289
  /**
290
+ * Subscriber's data following the syntax of the TNP_User
291
  * @var TNP_Subscription_Data
292
  */
293
  var $data;
369
  * @var NewsletterLogger
370
  */
371
  var $logger;
372
+
373
  /**
374
  * @var NewsletterLogger
375
  */
419
  $this->components = $components;
420
 
421
  $this->logger = new NewsletterLogger($module);
422
+
 
423
  $this->options = $this->get_options();
424
  $this->store = NewsletterStore::singleton();
425
 
2303
  if (empty($ip)) {
2304
  return '';
2305
  }
2306
+ return preg_replace('/[^0-9a-fA-F:., ]/', '', trim($ip));
2307
  }
2308
 
2309
  static function get_remote_ip() {
2310
+ $ip = '';
2311
+ if (!empty($_SERVER['HTTP_X_REAL_IP'])) {
2312
+ $ip = $_SERVER['HTTP_X_REAL_IP'];
2313
+ } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
2314
+ // Sometimes this is a list of IPs representing the chain of proxies
2315
+ $ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR'], 1);
2316
+ $ip = $ip[0];
2317
+ } elseif (isset($_SERVER['REMOTE_ADDR'])) {
2318
+ $ip = $_SERVER['REMOTE_ADDR'];
2319
+ }
2320
+ return self::sanitize_ip($ip);
2321
  }
2322
 
2323
  static function get_signature($text) {
main/extensions.php CHANGED
@@ -12,9 +12,8 @@ if ($controls->is_action('activate')) {
12
  $controls->errors .= __('Error while activating:', 'newsletter') . " " . $result->get_error_message();
13
  } else {
14
  wp_clean_plugins_cache(false);
15
- delete_transient("tnp_extensions_json");
16
  $controls->js_redirect('admin.php?page=newsletter_extensions_index');
17
- wp_die();
18
  }
19
  }
20
 
12
  $controls->errors .= __('Error while activating:', 'newsletter') . " " . $result->get_error_message();
13
  } else {
14
  wp_clean_plugins_cache(false);
15
+ $this->clear_extensions_cache();
16
  $controls->js_redirect('admin.php?page=newsletter_extensions_index');
 
17
  }
18
  }
19
 
plugin.php CHANGED
@@ -4,13 +4,15 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
- Version: 7.2.2
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
11
  Text Domain: newsletter
12
  License: GPLv2 or later
13
-
 
 
14
  Copyright 2009-2021 The Newsletter Team (email: info@thenewsletterplugin.com, web: https://www.thenewsletterplugin.com)
15
 
16
  Newsletter is free software: you can redistribute it and/or modify
@@ -35,7 +37,7 @@ if (version_compare(phpversion(), '5.6', '<')) {
35
  return;
36
  }
37
 
38
- define('NEWSLETTER_VERSION', '7.2.2');
39
 
40
  global $newsletter, $wpdb;
41
 
@@ -64,13 +66,11 @@ if (!defined('NEWSLETTER_STATS_TABLE'))
64
  if (!defined('NEWSLETTER_SENT_TABLE'))
65
  define('NEWSLETTER_SENT_TABLE', $wpdb->prefix . 'newsletter_sent');
66
 
67
- // Do not use basename(dirname()) since on activation the plugin is sandboxed inside a function
68
  define('NEWSLETTER_SLUG', 'newsletter');
69
 
70
  define('NEWSLETTER_DIR', __DIR__);
71
  define('NEWSLETTER_INCLUDES_DIR', __DIR__ . '/includes');
72
 
73
- // Almost obsolete but the first two must be kept for compatibility with modules
74
  define('NEWSLETTER_URL', WP_PLUGIN_URL . '/newsletter');
75
 
76
  if (!defined('NEWSLETTER_LIST_MAX'))
@@ -113,7 +113,6 @@ class Newsletter extends NewsletterModule {
113
  var $theme_max_posts;
114
  var $theme_excluded_categories; // comma separated ids (eventually negative to exclude)
115
  var $theme_posts; // WP_Query object
116
- // Secret key to create a unique log file name (and may be other)
117
  var $action = '';
118
 
119
  /** @var Newsletter */
@@ -199,6 +198,15 @@ class Newsletter extends NewsletterModule {
199
  });
200
  }
201
  }
 
 
 
 
 
 
 
 
 
202
 
203
  function hook_init() {
204
  global $wpdb;
@@ -536,14 +544,22 @@ class Newsletter extends NewsletterModule {
536
  wp_enqueue_script('jquery-ui-tooltip');
537
  wp_enqueue_script('jquery-ui-draggable');
538
  wp_enqueue_media();
 
 
539
 
540
  wp_enqueue_style('tnp-select2', $newsletter_url . '/vendor/select2/css/select2.min.css', [], NEWSLETTER_VERSION);
541
- wp_enqueue_script('tnp-select2', $newsletter_url . '/vendor/select2/js/select2.min.js', [], NEWSLETTER_VERSION);
542
 
 
 
 
 
 
 
543
  wp_enqueue_style('tnp-admin-font', 'https://use.typekit.net/jlj2wjy.css');
544
  wp_enqueue_style('tnp-admin-fontawesome', $newsletter_url . '/vendor/fa/css/all.min.css', [], NEWSLETTER_VERSION);
545
  wp_enqueue_style('tnp-admin-jquery-ui', $newsletter_url . '/vendor/jquery-ui/jquery-ui.min.css', [], NEWSLETTER_VERSION);
546
- wp_enqueue_style('tnp-admin', $newsletter_url . '/admin.css', [], NEWSLETTER_VERSION);
547
  wp_enqueue_style('tnp-admin-dropdown', $newsletter_url . '/css/dropdown.css', [], NEWSLETTER_VERSION);
548
  wp_enqueue_style('tnp-admin-tabs', $newsletter_url . '/css/tabs.css', [], NEWSLETTER_VERSION);
549
  wp_enqueue_style('tnp-admin-controls', $newsletter_url . '/css/controls.css', [], NEWSLETTER_VERSION);
@@ -552,12 +568,10 @@ class Newsletter extends NewsletterModule {
552
  wp_enqueue_style('tnp-admin-extensions', $newsletter_url . '/css/extensions.css', [], NEWSLETTER_VERSION);
553
 
554
  if (NEWSLETTER_DARK) {
555
- wp_enqueue_style('tnp-admin-dark', $newsletter_url . '/admin-dark.css', ['tnp-admin'], NEWSLETTER_VERSION);
556
  wp_enqueue_style('tnp-admin-controls-dark', $newsletter_url . '/css/controls-dark.css', ['tnp-admin-controls'], NEWSLETTER_VERSION);
557
  }
558
 
559
- wp_enqueue_script('tnp-admin', $newsletter_url . '/admin.js', ['jquery'], NEWSLETTER_VERSION);
560
-
561
  $translations_array = array(
562
  'save_to_update_counter' => __('Save the newsletter to update the counter!', 'newsletter')
563
  );
@@ -839,10 +853,10 @@ class Newsletter extends NewsletterModule {
839
  $result = false;
840
  }
841
 
842
- //Se non sono in test e ho completato con successo delle spedizioni aggiorno i dati di diagnostica
843
- if (!$test && $count > 0) {
844
 
845
- NewsletterStatistics::instance()->reset_stats_time($email->id);
846
 
847
  $send_calls = get_option('newsletter_diagnostic_send_calls', []);
848
  $send_calls[] = array($start_time, $end_time, $count, $result);
@@ -852,6 +866,11 @@ class Newsletter extends NewsletterModule {
852
 
853
  update_option('newsletter_diagnostic_send_calls', $send_calls, false);
854
  }
 
 
 
 
 
855
 
856
  $this->logger->info(__METHOD__ . '> End run for email ' . $email->id);
857
 
@@ -875,7 +894,6 @@ class Newsletter extends NewsletterModule {
875
  $edited_email->options = $email->options;
876
  $edited_email->options['error_message'] = $message;
877
 
878
- //If id is present the save function update only the provided fields?!
879
  $this->save_email($edited_email);
880
  }
881
 
@@ -1028,12 +1046,14 @@ class Newsletter extends NewsletterModule {
1028
  * @return NewsletterMailer
1029
  */
1030
  function get_mailer() {
1031
- //die('get mailer');
1032
- if ($this->mailer)
1033
  return $this->mailer;
 
1034
 
1035
  do_action('newsletter_register_mailer');
 
1036
  if (!$this->mailer) {
 
1037
  $smtp = $this->get_options('smtp');
1038
  if (!empty($smtp['enabled'])) {
1039
  $this->mailer = new NewsletterDefaultSMTPMailer($smtp);
@@ -1108,15 +1128,6 @@ class Newsletter extends NewsletterModule {
1108
  return !is_wp_error($r);
1109
  }
1110
 
1111
- /**
1112
- * Returns the SMTP options filtered so extensions can change them.
1113
- */
1114
- function get_smtp_options() {
1115
- $smtp_options = $this->get_options('smtp');
1116
- $smtp_options = apply_filters('newsletter_smtp', $smtp_options);
1117
- return $smtp_options;
1118
- }
1119
-
1120
  function hook_deactivate() {
1121
  wp_clear_scheduled_hook('newsletter');
1122
  }
@@ -1303,14 +1314,7 @@ class Newsletter extends NewsletterModule {
1303
  delete_transient('tnp_extensions_json');
1304
  }
1305
 
1306
- function hook_plugins_loaded() {
1307
-
1308
- do_action('newsletter_loaded', NEWSLETTER_VERSION);
1309
 
1310
- if (function_exists('load_plugin_textdomain')) {
1311
- load_plugin_textdomain('newsletter', false, plugin_basename(dirname(__FILE__)) . '/languages');
1312
- }
1313
- }
1314
 
1315
  var $panels = array();
1316
 
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
+ Version: 7.2.3
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
11
  Text Domain: newsletter
12
  License: GPLv2 or later
13
+ Requires at least: 3.4.0
14
+ Requires PHP: 5.6
15
+
16
  Copyright 2009-2021 The Newsletter Team (email: info@thenewsletterplugin.com, web: https://www.thenewsletterplugin.com)
17
 
18
  Newsletter is free software: you can redistribute it and/or modify
37
  return;
38
  }
39
 
40
+ define('NEWSLETTER_VERSION', '7.2.3');
41
 
42
  global $newsletter, $wpdb;
43
 
66
  if (!defined('NEWSLETTER_SENT_TABLE'))
67
  define('NEWSLETTER_SENT_TABLE', $wpdb->prefix . 'newsletter_sent');
68
 
 
69
  define('NEWSLETTER_SLUG', 'newsletter');
70
 
71
  define('NEWSLETTER_DIR', __DIR__);
72
  define('NEWSLETTER_INCLUDES_DIR', __DIR__ . '/includes');
73
 
 
74
  define('NEWSLETTER_URL', WP_PLUGIN_URL . '/newsletter');
75
 
76
  if (!defined('NEWSLETTER_LIST_MAX'))
113
  var $theme_max_posts;
114
  var $theme_excluded_categories; // comma separated ids (eventually negative to exclude)
115
  var $theme_posts; // WP_Query object
 
116
  var $action = '';
117
 
118
  /** @var Newsletter */
198
  });
199
  }
200
  }
201
+
202
+ function hook_plugins_loaded() {
203
+
204
+ do_action('newsletter_loaded', NEWSLETTER_VERSION);
205
+
206
+ if (function_exists('load_plugin_textdomain')) {
207
+ load_plugin_textdomain('newsletter', false, plugin_basename(dirname(__FILE__)) . '/languages');
208
+ }
209
+ }
210
 
211
  function hook_init() {
212
  global $wpdb;
544
  wp_enqueue_script('jquery-ui-tooltip');
545
  wp_enqueue_script('jquery-ui-draggable');
546
  wp_enqueue_media();
547
+
548
+ wp_enqueue_script('tnp-admin', $newsletter_url . '/admin/admin.js', ['jquery'], NEWSLETTER_VERSION);
549
 
550
  wp_enqueue_style('tnp-select2', $newsletter_url . '/vendor/select2/css/select2.min.css', [], NEWSLETTER_VERSION);
551
+ wp_enqueue_script('tnp-select2', $newsletter_url . '/vendor/select2/js/select2.min.js', ['jquery'], NEWSLETTER_VERSION);
552
 
553
+ wp_enqueue_style('tnp-modal', $newsletter_url . '/admin/modal.css', [], NEWSLETTER_VERSION);
554
+ wp_enqueue_script('tnp-modal', $newsletter_url . '/admin/modal.js', ['jquery'], NEWSLETTER_VERSION, true);
555
+
556
+ wp_enqueue_style('tnp-toast', $newsletter_url . '/admin/toast.css', [], NEWSLETTER_VERSION);
557
+ wp_enqueue_script('tnp-toast', $newsletter_url . '/admin/toast.js', ['jquery'], NEWSLETTER_VERSION);
558
+
559
  wp_enqueue_style('tnp-admin-font', 'https://use.typekit.net/jlj2wjy.css');
560
  wp_enqueue_style('tnp-admin-fontawesome', $newsletter_url . '/vendor/fa/css/all.min.css', [], NEWSLETTER_VERSION);
561
  wp_enqueue_style('tnp-admin-jquery-ui', $newsletter_url . '/vendor/jquery-ui/jquery-ui.min.css', [], NEWSLETTER_VERSION);
562
+ wp_enqueue_style('tnp-admin', $newsletter_url . '/admin/admin.css', [], NEWSLETTER_VERSION);
563
  wp_enqueue_style('tnp-admin-dropdown', $newsletter_url . '/css/dropdown.css', [], NEWSLETTER_VERSION);
564
  wp_enqueue_style('tnp-admin-tabs', $newsletter_url . '/css/tabs.css', [], NEWSLETTER_VERSION);
565
  wp_enqueue_style('tnp-admin-controls', $newsletter_url . '/css/controls.css', [], NEWSLETTER_VERSION);
568
  wp_enqueue_style('tnp-admin-extensions', $newsletter_url . '/css/extensions.css', [], NEWSLETTER_VERSION);
569
 
570
  if (NEWSLETTER_DARK) {
571
+ wp_enqueue_style('tnp-admin-dark', $newsletter_url . '/admin/admin-dark.css', ['tnp-admin'], NEWSLETTER_VERSION);
572
  wp_enqueue_style('tnp-admin-controls-dark', $newsletter_url . '/css/controls-dark.css', ['tnp-admin-controls'], NEWSLETTER_VERSION);
573
  }
574
 
 
 
575
  $translations_array = array(
576
  'save_to_update_counter' => __('Save the newsletter to update the counter!', 'newsletter')
577
  );
853
  $result = false;
854
  }
855
 
856
+ // Stats only for newsletter with enough emails in a batch (we exclude the Autoresponder since it send one email per call)
857
+ if (!$test && !$supplied_users && $count > 5) {
858
 
859
+
860
 
861
  $send_calls = get_option('newsletter_diagnostic_send_calls', []);
862
  $send_calls[] = array($start_time, $end_time, $count, $result);
866
 
867
  update_option('newsletter_diagnostic_send_calls', $send_calls, false);
868
  }
869
+
870
+ // Cached general statistics are reset
871
+ if (!$test) {
872
+ NewsletterStatistics::instance()->reset_stats_time($email->id);
873
+ }
874
 
875
  $this->logger->info(__METHOD__ . '> End run for email ' . $email->id);
876
 
894
  $edited_email->options = $email->options;
895
  $edited_email->options['error_message'] = $message;
896
 
 
897
  $this->save_email($edited_email);
898
  }
899
 
1046
  * @return NewsletterMailer
1047
  */
1048
  function get_mailer() {
1049
+ if ($this->mailer) {
 
1050
  return $this->mailer;
1051
+ }
1052
 
1053
  do_action('newsletter_register_mailer');
1054
+
1055
  if (!$this->mailer) {
1056
+ // Compatibility
1057
  $smtp = $this->get_options('smtp');
1058
  if (!empty($smtp['enabled'])) {
1059
  $this->mailer = new NewsletterDefaultSMTPMailer($smtp);
1128
  return !is_wp_error($r);
1129
  }
1130
 
 
 
 
 
 
 
 
 
 
1131
  function hook_deactivate() {
1132
  wp_clear_scheduled_hook('newsletter');
1133
  }
1314
  delete_transient('tnp_extensions_json');
1315
  }
1316
 
 
 
 
1317
 
 
 
 
 
1318
 
1319
  var $panels = array();
1320
 
readme.txt CHANGED
@@ -1,9 +1,7 @@
1
  === Newsletter ===
2
  Tags: newsletter, email marketing, welcome email, signup forms, contact, lead generation, marketing automation
3
- Requires at least: 3.4.0
4
  Tested up to: 5.8
5
- Stable tag: 7.2.2
6
- Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -120,22 +118,40 @@ Thank you, The Newsletter Team
120
 
121
  == Changelog ==
122
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  = 7.2.2 =
124
 
125
  * [COMPOSER] Posts block excerpt removed when set to 0-length
126
- * Added special characters on test message
127
- * Added more specific error for action calls on System/Status panel
128
- * Check for the _wp_amp_action_xhr_converted parameter by AMP plugin
129
 
130
  = 7.2.1 =
131
 
132
- * Added more detailed admin logging
133
- * Fixed scheduled date sometimes reset to 1/1/1970
134
 
135
  = 7.2.0 =
136
 
137
- * Fixed activation email on profile change
138
- * Extended year selection on newsletter scheduling
139
  * [DELIVERY] Breaking change: old enqueue() and flush() methods have been removed
140
  * [GENERAL] Fixed alert message on some buttons
141
  * [SUBSCRIPTION] Fixed error message on multiple subscriptions (when not allowed)
1
  === Newsletter ===
2
  Tags: newsletter, email marketing, welcome email, signup forms, contact, lead generation, marketing automation
 
3
  Tested up to: 5.8
4
+ Stable tag: 7.2.3
 
5
  Contributors: satollo,webagile,michael-travan
6
  License: GPLv2 or later
7
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
118
 
119
  == Changelog ==
120
 
121
+ = 7.2.3 =
122
+
123
+ * [COMPOSER] Added approx. indicators of the subsject visibile part in Apple and Android clients (experimental)
124
+ * [COMPOSER] New mobile version view directly while composing (experimental)
125
+ * [COMPOSER] New test email to test subscribers or to specific email address
126
+ * [COMPOSER] Fixed missing background when creating a new message from a preset
127
+ * [COMPOSER] Added media selector to the CTA block
128
+ * [COMPOSER] Added reference to the tags on HTML and Text blocks
129
+ * [COMPOSER] Move the snippet (preheader) field near the subject
130
+ * [COMPOSER] Footer block with three link options: unsubscribe, manage and view online
131
+ * [COMPOSER] Improve font coherence between blocks (by default)
132
+ * [ANTISPAM] Improved the antispam checks on subscription
133
+ * [GENERAL] Removed obsolete folders and code
134
+ * [NEWSLETTERS] Refactored subject ideas selector
135
+ * [SUBSCRIPTION] Inverted extra profile fields and lists on standard subscription form
136
+ * [GENERAL] IP address extracted checking proxy variables
137
+ * [GENERAL] Improved sending stats collection and display for the delivery engine (not related to click/open stats)
138
+
139
  = 7.2.2 =
140
 
141
  * [COMPOSER] Posts block excerpt removed when set to 0-length
142
+ * [GENERAL]Added special characters on test message
143
+ * [GENERAL]Added more specific error for action calls on System/Status panel
144
+ * [SUBSCRIPTION] Check for the _wp_amp_action_xhr_converted parameter by AMP plugin
145
 
146
  = 7.2.1 =
147
 
148
+ * [GENERAL] Added more detailed admin logging
149
+ * [NEWSLETTERS] Fixed scheduled date sometimes reset to 1/1/1970
150
 
151
  = 7.2.0 =
152
 
153
+ * [PROFILE] Fixed activation email on profile change
154
+ * [NEWSLETTERS] Extended year selection on newsletter scheduling
155
  * [DELIVERY] Breaking change: old enqueue() and flush() methods have been removed
156
  * [GENERAL] Fixed alert message on some buttons
157
  * [SUBSCRIPTION] Fixed error message on multiple subscriptions (when not allowed)
subscription/subscription.php CHANGED
@@ -1635,6 +1635,16 @@ class NewsletterSubscription extends NewsletterModule {
1635
  if (isset($options_profile['sex_status']) && $options_profile['sex_status'] == 2) {
1636
  $buffer .= $this->shortcode_newsletter_field(['name' => 'gender']);
1637
  }
 
 
 
 
 
 
 
 
 
 
1638
 
1639
  $tmp = '';
1640
  $lists = $this->get_lists_for_subscription($language);
@@ -1650,15 +1660,7 @@ class NewsletterSubscription extends NewsletterModule {
1650
  $buffer .= $this->shortcode_newsletter_field(['name' => 'lists']);
1651
  }
1652
 
1653
- // Extra profile fields
1654
- for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {
1655
- // Not for subscription form
1656
- if ($options_profile['profile_' . $i . '_status'] != 2) {
1657
- continue;
1658
- }
1659
-
1660
- $buffer .= $this->shortcode_newsletter_field(['name' => 'profile', 'number' => $i]);
1661
- }
1662
 
1663
  // Deprecated
1664
  $extra = apply_filters('newsletter_subscription_extra', array());
1635
  if (isset($options_profile['sex_status']) && $options_profile['sex_status'] == 2) {
1636
  $buffer .= $this->shortcode_newsletter_field(['name' => 'gender']);
1637
  }
1638
+
1639
+ // Extra profile fields
1640
+ for ($i = 1; $i <= NEWSLETTER_PROFILE_MAX; $i++) {
1641
+ // Not for subscription form
1642
+ if ($options_profile['profile_' . $i . '_status'] != 2) {
1643
+ continue;
1644
+ }
1645
+
1646
+ $buffer .= $this->shortcode_newsletter_field(['name' => 'profile', 'number' => $i]);
1647
+ }
1648
 
1649
  $tmp = '';
1650
  $lists = $this->get_lists_for_subscription($language);
1660
  $buffer .= $this->shortcode_newsletter_field(['name' => 'lists']);
1661
  }
1662
 
1663
+
 
 
 
 
 
 
 
 
1664
 
1665
  // Deprecated
1666
  $extra = apply_filters('newsletter_subscription_extra', array());
unsubscription/index.php CHANGED
@@ -34,7 +34,7 @@ if (!$controls->is_action()) {
34
  <div id="tnp-heading">
35
 
36
  <h2><?php _e('Cancellation', 'newsletter') ?></h2>
37
- <?php $controls->panel_help('https://www.thenewsletterplugin.com/documentation/cancellation') ?>
38
 
39
  </div>
40
 
@@ -51,6 +51,7 @@ if (!$controls->is_action()) {
51
  <ul>
52
  <li><a href="#tabs-cancellation"><?php _e('Cancellation', 'newsletter') ?></a></li>
53
  <li><a href="#tabs-reactivation"><?php _e('Reactivation', 'newsletter') ?></a></li>
 
54
  </ul>
55
 
56
  <div id="tabs-cancellation">
@@ -59,8 +60,6 @@ if (!$controls->is_action()) {
59
  <th><?php _e('Cancellation message', 'newsletter') ?></th>
60
  <td>
61
  <?php $controls->wp_editor('unsubscribe_text', array('editor_height' => 250)); ?>
62
- <p class="description">
63
- </p>
64
  </td>
65
  </tr>
66
 
@@ -68,8 +67,6 @@ if (!$controls->is_action()) {
68
  <th><?php _e('Goodbye message', 'newsletter') ?></th>
69
  <td>
70
  <?php $controls->wp_editor('unsubscribed_text', array('editor_height' => 250)); ?>
71
- <p class="description">
72
- </p>
73
  </td>
74
  </tr>
75
 
@@ -77,9 +74,6 @@ if (!$controls->is_action()) {
77
  <th><?php _e('Goodbye email', 'newsletter') ?></th>
78
  <td>
79
  <?php $controls->email('unsubscribed', 'wordpress', $is_all_languages, array('editor_height' => 250)); ?>
80
- <p class="description">
81
-
82
- </p>
83
  </td>
84
  </tr>
85
 
@@ -87,15 +81,25 @@ if (!$controls->is_action()) {
87
  <th><?php _e('On error', 'newsletter') ?></th>
88
  <td>
89
  <?php $controls->wp_editor('error_text', array('editor_height' => 150)); ?>
90
- <p class="description">
 
 
 
91
 
 
 
 
 
 
 
 
92
  </p>
93
  </td>
94
  </tr>
95
  </table>
96
-
97
- <h3><?php _e('Advanced', 'newsletter')?></h3>
98
-
99
  <?php if ($is_all_languages) { ?>
100
  <table class="form-table">
101
  <tr>
@@ -127,19 +131,7 @@ if (!$controls->is_action()) {
127
 
128
  <?php } ?>
129
  </div>
130
-
131
- <div id="tabs-reactivation">
132
- <table class="form-table">
133
- <tr>
134
- <th><?php _e('Reactivated message', 'newsletter') ?></th>
135
- <td>
136
- <?php $controls->wp_editor('reactivated_text', array('editor_height' => 250)); ?>
137
- <p class="description">
138
- </p>
139
- </td>
140
- </tr>
141
- </table>
142
- </div>
143
  </div>
144
 
145
  <p>
34
  <div id="tnp-heading">
35
 
36
  <h2><?php _e('Cancellation', 'newsletter') ?></h2>
37
+ <?php $controls->page_help('https://www.thenewsletterplugin.com/documentation/cancellation') ?>
38
 
39
  </div>
40
 
51
  <ul>
52
  <li><a href="#tabs-cancellation"><?php _e('Cancellation', 'newsletter') ?></a></li>
53
  <li><a href="#tabs-reactivation"><?php _e('Reactivation', 'newsletter') ?></a></li>
54
+ <li><a href="#tabs-advanced"><?php _e('Advanced', 'newsletter') ?></a></li>
55
  </ul>
56
 
57
  <div id="tabs-cancellation">
60
  <th><?php _e('Cancellation message', 'newsletter') ?></th>
61
  <td>
62
  <?php $controls->wp_editor('unsubscribe_text', array('editor_height' => 250)); ?>
 
 
63
  </td>
64
  </tr>
65
 
67
  <th><?php _e('Goodbye message', 'newsletter') ?></th>
68
  <td>
69
  <?php $controls->wp_editor('unsubscribed_text', array('editor_height' => 250)); ?>
 
 
70
  </td>
71
  </tr>
72
 
74
  <th><?php _e('Goodbye email', 'newsletter') ?></th>
75
  <td>
76
  <?php $controls->email('unsubscribed', 'wordpress', $is_all_languages, array('editor_height' => 250)); ?>
 
 
 
77
  </td>
78
  </tr>
79
 
81
  <th><?php _e('On error', 'newsletter') ?></th>
82
  <td>
83
  <?php $controls->wp_editor('error_text', array('editor_height' => 150)); ?>
84
+ </td>
85
+ </tr>
86
+ </table>
87
+ </div>
88
 
89
+ <div id="tabs-reactivation">
90
+ <table class="form-table">
91
+ <tr>
92
+ <th><?php _e('Reactivated message', 'newsletter') ?></th>
93
+ <td>
94
+ <?php $controls->wp_editor('reactivated_text', array('editor_height' => 250)); ?>
95
+ <p class="description">
96
  </p>
97
  </td>
98
  </tr>
99
  </table>
100
+ </div>
101
+
102
+ <div id="tabs-advanced">
103
  <?php if ($is_all_languages) { ?>
104
  <table class="form-table">
105
  <tr>
131
 
132
  <?php } ?>
133
  </div>
134
+
 
 
 
 
 
 
 
 
 
 
 
 
135
  </div>
136
 
137
  <p>
unsubscription/unsubscription.php CHANGED
@@ -1,217 +1,217 @@
1
- <?php
2
-
3
- defined('ABSPATH') || exit;
4
-
5
- class NewsletterUnsubscription extends NewsletterModule {
6
-
7
- static $instance;
8
-
9
- /**
10
- * @return NewsletterUnsubscription
11
- */
12
- static function instance() {
13
- if (self::$instance == null) {
14
- self::$instance = new NewsletterUnsubscription();
15
- }
16
- return self::$instance;
17
- }
18
-
19
- function __construct() {
20
- parent::__construct('unsubscription', '1.0.3');
21
-
22
- add_filter('newsletter_replace', array($this, 'hook_newsletter_replace'), 10, 4);
23
- add_filter('newsletter_page_text', array($this, 'hook_newsletter_page_text'), 10, 3);
24
- add_filter('newsletter_message_headers', array($this, 'hook_add_unsubscribe_headers_to_email'), 10, 3);
25
-
26
- add_action('newsletter_action', array($this, 'hook_newsletter_action'), 11, 3);
27
- }
28
-
29
- function hook_newsletter_action($action, $user, $email) {
30
-
31
- if (in_array($action, ['u', 'uc', 'lu', 'reactivate'])) {
32
- if (!$user) {
33
- $this->dienow(__('Subscriber not found', 'newsletter'), 'Already deleted or using the wrong subscriber key in the URL', 404);
34
- }
35
- }
36
-
37
- switch ($action) {
38
- case 'u':
39
- $url = $this->build_message_url(null, 'unsubscribe', $user, $email);
40
- wp_redirect($url);
41
- die();
42
- break;
43
-
44
- case 'lu': //Left for backwards compatibility, could be removed after some time
45
- case 'uc':
46
- if (isset($_POST['List-Unsubscribe']) && 'One-Click' === $_POST['List-Unsubscribe']) {
47
- $this->unsubscribe($user, $email);
48
- } else if ($this->antibot_form_check()) {
49
- $this->unsubscribe($user, $email);
50
- $url = $this->build_message_url(null, 'unsubscribed', $user, $email);
51
- wp_redirect($url);
52
- } else {
53
- $this->request_to_antibot_form('Unsubscribe');
54
- }
55
- die();
56
- break;
57
-
58
- case 'reactivate':
59
- if ($this->antibot_form_check()) {
60
- $this->reactivate($user);
61
- $url = $this->build_message_url(null, 'reactivated', $user);
62
- wp_redirect($url);
63
- } else {
64
- $this->request_to_antibot_form('Reactivate');
65
- }
66
- die();
67
- break;
68
- }
69
- }
70
-
71
- /**
72
- * Unsubscribes the subscriber from the request. Die on subscriber extraction failure.
73
- *
74
- * @return TNP_User
75
- */
76
- function unsubscribe($user, $email = null) {
77
- global $wpdb;
78
-
79
- if ($user->status == TNP_User::STATUS_UNSUBSCRIBED) {
80
- return $user;
81
- }
82
-
83
- $this->refresh_user_token($user);
84
- $this->set_user_status($user, TNP_User::STATUS_UNSUBSCRIBED);
85
-
86
- $this->add_user_log($user, 'unsubscribe');
87
-
88
- do_action('newsletter_user_unsubscribed', $user);
89
-
90
- if ($email) {
91
- $wpdb->update(NEWSLETTER_USERS_TABLE, array('unsub_email_id' => (int) $email->id, 'unsub_time' => time()), array('id' => $user->id));
92
- }
93
-
94
- $this->send_unsubscribed_email($user);
95
-
96
- $this->notify_admin_on_unsubscription($user);
97
-
98
- return $user;
99
- }
100
-
101
- function send_unsubscribed_email($user, $force = false) {
102
- $options = $this->get_options('', $this->get_user_language($user));
103
- if (!$force && !empty($options['unsubscribed_disabled'])) {
104
- return true;
105
- }
106
-
107
- $message = do_shortcode( $options['unsubscribed_message'] );
108
- $subject = $options['unsubscribed_subject'];
109
-
110
- return NewsletterSubscription::instance()->mail($user, $subject, $message);
111
- }
112
-
113
- function notify_admin_on_unsubscription($user) {
114
-
115
- if (empty($this->options['notify_admin_on_unsubscription'])) {
116
- return;
117
- }
118
-
119
- $message = $this->generate_admin_notification_message($user);
120
- $email = trim(get_option('admin_email'));
121
- $subject = $this->generate_admin_notification_subject('New cancellation');
122
-
123
- Newsletter::instance()->mail($email, $subject, array('html' => $message));
124
- }
125
-
126
- /**
127
- * Reactivate the subscriber extracted from the request setting his status
128
- * to confirmed and logging. No email are sent. Dies on subscriber extraction failure.
129
- *
130
- * @return TNP_User
131
- */
132
- function reactivate($user = null) {
133
- // For compatibility, to be removed
134
- if (!$user) {
135
- $user = $this->get_user_from_request(true);
136
- }
137
- $this->set_user_status($user, TNP_User::STATUS_CONFIRMED);
138
- $this->add_user_log($user, 'reactivate');
139
- do_action('newsletter_user_reactivated', $user);
140
- }
141
-
142
- function hook_newsletter_replace($text, $user, $email, $html = true) {
143
-
144
- if ($user) {
145
- $text = $this->replace_url($text, 'unsubscription_confirm_url', $this->build_action_url('uc', $user, $email));
146
- $text = $this->replace_url($text, 'unsubscription_url', $this->build_action_url('u', $user, $email));
147
- $text = $this->replace_url($text, 'reactivate_url', $this->build_action_url('reactivate', $user, $email));
148
- } else {
149
- $text = $this->replace_url($text, 'unsubscription_confirm_url', $this->build_action_url('nul'));
150
- $text = $this->replace_url($text, 'unsubscription_url', $this->build_action_url('nul'));
151
- }
152
-
153
- return $text;
154
- }
155
-
156
- function hook_newsletter_page_text($text, $key, $user = null) {
157
-
158
- $options = $this->get_options('', $this->get_current_language($user));
159
- if ($key == 'unsubscribe') {
160
- if (!$user) {
161
- return 'Subscriber not found.';
162
- }
163
- return $options['unsubscribe_text'];
164
- }
165
- if ($key == 'unsubscribed') {
166
- if (!$user) {
167
- return $options['error_text'];
168
- }
169
- return $options['unsubscribed_text'];
170
- }
171
- if ($key == 'reactivated') {
172
- if (!$user) {
173
- return $options['error_text'];
174
- }
175
- return $options['reactivated_text'];
176
- }
177
- if ($key == 'unsubscription_error') {
178
- return $options['error_text'];
179
- }
180
- return $text;
181
- }
182
-
183
- function admin_menu() {
184
- $this->add_admin_page('index', 'Unsubscribe');
185
- }
186
-
187
- /**
188
- * @param array $headers
189
- * @param TNP_Email $email
190
- * @param TNP_User $user
191
- *
192
- * @return array
193
- */
194
- function hook_add_unsubscribe_headers_to_email($headers, $email, $user) {
195
-
196
- if (isset($this->options['disable_unsubscribe_headers']) && $this->options['disable_unsubscribe_headers'] == 1) {
197
- return $headers;
198
- }
199
-
200
- $list_unsubscribe_values = [];
201
- if (!empty($this->options['list_unsubscribe_mailto_header'])) {
202
- $unsubscribe_address = $this->options['list_unsubscribe_mailto_header'];
203
- $list_unsubscribe_values[] = "<mailto:$unsubscribe_address?subject=unsubscribe>";
204
- }
205
-
206
- $unsubscribe_action_url = $this->build_action_url('uc', $user, $email);
207
- $list_unsubscribe_values[] = "<$unsubscribe_action_url>";
208
-
209
- $headers['List-Unsubscribe'] = implode(', ', $list_unsubscribe_values);
210
- $headers['List-Unsubscribe-Post'] = 'List-Unsubscribe=One-Click';
211
-
212
- return $headers;
213
- }
214
-
215
- }
216
-
217
- NewsletterUnsubscription::instance();
1
+ <?php
2
+
3
+ defined('ABSPATH') || exit;
4
+
5
+ class NewsletterUnsubscription extends NewsletterModule {
6
+
7
+ static $instance;
8
+
9
+ /**
10
+ * @return NewsletterUnsubscription
11
+ */
12
+ static function instance() {
13
+ if (self::$instance == null) {
14
+ self::$instance = new NewsletterUnsubscription();
15
+ }
16
+ return self::$instance;
17
+ }
18
+
19
+ function __construct() {
20
+ parent::__construct('unsubscription', '1.0.3');
21
+
22
+ add_filter('newsletter_replace', array($this, 'hook_newsletter_replace'), 10, 4);
23
+ add_filter('newsletter_page_text', array($this, 'hook_newsletter_page_text'), 10, 3);
24
+ add_filter('newsletter_message_headers', array($this, 'hook_add_unsubscribe_headers_to_email'), 10, 3);
25
+
26
+ add_action('newsletter_action', array($this, 'hook_newsletter_action'), 11, 3);
27
+ }
28
+
29
+ function hook_newsletter_action($action, $user, $email) {
30
+
31
+ if (in_array($action, ['u', 'uc', 'lu', 'reactivate'])) {
32
+ if (!$user) {
33
+ $this->dienow(__('Subscriber not found', 'newsletter'), 'Already deleted or using the wrong subscriber key in the URL', 404);
34
+ }
35
+ }
36
+
37
+ switch ($action) {
38
+ case 'u':
39
+ $url = $this->build_message_url(null, 'unsubscribe', $user, $email);
40
+ wp_redirect($url);
41
+ die();
42
+ break;
43
+
44
+ case 'lu': //Left for backwards compatibility, could be removed after some time
45
+ case 'uc':
46
+ if (isset($_POST['List-Unsubscribe']) && 'One-Click' === $_POST['List-Unsubscribe']) {
47
+ $this->unsubscribe($user, $email);
48
+ } else if ($this->antibot_form_check()) {
49
+ $this->unsubscribe($user, $email);
50
+ $url = $this->build_message_url(null, 'unsubscribed', $user, $email);
51
+ wp_redirect($url);
52
+ } else {
53
+ $this->request_to_antibot_form('Unsubscribe');
54
+ }
55
+ die();
56
+ break;
57
+
58
+ case 'reactivate':
59
+ if ($this->antibot_form_check()) {
60
+ $this->reactivate($user);
61
+ $url = $this->build_message_url(null, 'reactivated', $user);
62
+ wp_redirect($url);
63
+ } else {
64
+ $this->request_to_antibot_form('Reactivate');
65
+ }
66
+ die();
67
+ break;
68
+ }
69
+ }
70
+
71
+ /**
72
+ * Unsubscribes the subscriber from the request. Die on subscriber extraction failure.
73
+ *
74
+ * @return TNP_User
75
+ */
76
+ function unsubscribe($user, $email = null) {
77
+ global $wpdb;
78
+
79
+ if ($user->status == TNP_User::STATUS_UNSUBSCRIBED) {
80
+ return $user;
81
+ }
82
+
83
+ $this->refresh_user_token($user);
84
+ $this->set_user_status($user, TNP_User::STATUS_UNSUBSCRIBED);
85
+
86
+ $this->add_user_log($user, 'unsubscribe');
87
+
88
+ do_action('newsletter_user_unsubscribed', $user);
89
+
90
+ if ($email) {
91
+ $wpdb->update(NEWSLETTER_USERS_TABLE, array('unsub_email_id' => (int) $email->id, 'unsub_time' => time()), array('id' => $user->id));
92
+ }
93
+
94
+ $this->send_unsubscribed_email($user);
95
+
96
+ $this->notify_admin_on_unsubscription($user);
97
+
98
+ return $user;
99
+ }
100
+
101
+ function send_unsubscribed_email($user, $force = false) {
102
+ $options = $this->get_options('', $this->get_user_language($user));
103
+ if (!$force && !empty($options['unsubscribed_disabled'])) {
104
+ return true;
105
+ }
106
+
107
+ $message = do_shortcode( $options['unsubscribed_message'] );
108
+ $subject = $options['unsubscribed_subject'];
109
+
110
+ return NewsletterSubscription::instance()->mail($user, $subject, $message);
111
+ }
112
+
113
+ function notify_admin_on_unsubscription($user) {
114
+
115
+ if (empty($this->options['notify_admin_on_unsubscription'])) {
116
+ return;
117
+ }
118
+
119
+ $message = $this->generate_admin_notification_message($user);
120
+ $email = trim(get_option('admin_email'));
121
+ $subject = $this->generate_admin_notification_subject('New cancellation');
122
+
123
+ Newsletter::instance()->mail($email, $subject, array('html' => $message));
124
+ }
125
+
126
+ /**
127
+ * Reactivate the subscriber extracted from the request setting his status
128
+ * to confirmed and logging. No email are sent. Dies on subscriber extraction failure.
129
+ *
130
+ * @return TNP_User
131
+ */
132
+ function reactivate($user = null) {
133
+ // For compatibility, to be removed
134
+ if (!$user) {
135
+ $user = $this->get_user_from_request(true);
136
+ }
137
+ $this->set_user_status($user, TNP_User::STATUS_CONFIRMED);
138
+ $this->add_user_log($user, 'reactivate');
139
+ do_action('newsletter_user_reactivated', $user);
140
+ }
141
+
142
+ function hook_newsletter_replace($text, $user, $email, $html = true) {
143
+
144
+ if ($user) {
145
+ $text = $this->replace_url($text, 'unsubscription_confirm_url', $this->build_action_url('uc', $user, $email));
146
+ $text = $this->replace_url($text, 'unsubscription_url', $this->build_action_url('u', $user, $email));
147
+ $text = $this->replace_url($text, 'reactivate_url', $this->build_action_url('reactivate', $user, $email));
148
+ } else {
149
+ $text = $this->replace_url($text, 'unsubscription_confirm_url', $this->build_action_url('nul'));
150
+ $text = $this->replace_url($text, 'unsubscription_url', $this->build_action_url('nul'));
151
+ }
152
+
153
+ return $text;
154
+ }
155
+
156
+ function hook_newsletter_page_text($text, $key, $user = null) {
157
+
158
+ $options = $this->get_options('', $this->get_current_language($user));
159
+ if ($key == 'unsubscribe') {
160
+ if (!$user) {
161
+ return 'Subscriber not found.';
162
+ }
163
+ return $options['unsubscribe_text'];
164
+ }
165
+ if ($key == 'unsubscribed') {
166
+ if (!$user) {
167
+ return $options['error_text'];
168
+ }
169
+ return $options['unsubscribed_text'];
170
+ }
171
+ if ($key == 'reactivated') {
172
+ if (!$user) {
173
+ return $options['error_text'];
174
+ }
175
+ return $options['reactivated_text'];
176
+ }
177
+ if ($key == 'unsubscription_error') {
178
+ return $options['error_text'];
179
+ }
180
+ return $text;
181
+ }
182
+
183
+ function admin_menu() {
184
+ $this->add_admin_page('index', 'Unsubscribe');
185
+ }
186
+
187
+ /**
188
+ * @param array $headers
189
+ * @param TNP_Email $email
190
+ * @param TNP_User $user
191
+ *
192
+ * @return array
193
+ */
194
+ function hook_add_unsubscribe_headers_to_email($headers, $email, $user) {
195
+
196
+ if (!empty($this->options['disable_unsubscribe_headers'])) {
197
+ return $headers;
198
+ }
199
+
200
+ $list_unsubscribe_values = [];
201
+ if (!empty($this->options['list_unsubscribe_mailto_header'])) {
202
+ $unsubscribe_address = $this->options['list_unsubscribe_mailto_header'];
203
+ $list_unsubscribe_values[] = "<mailto:$unsubscribe_address?subject=unsubscribe>";
204
+ }
205
+
206
+ $unsubscribe_action_url = $this->build_action_url('uc', $user, $email);
207
+ $list_unsubscribe_values[] = "<$unsubscribe_action_url>";
208
+
209
+ $headers['List-Unsubscribe'] = implode(', ', $list_unsubscribe_values);
210
+ $headers['List-Unsubscribe-Post'] = 'List-Unsubscribe=One-Click';
211
+
212
+ return $headers;
213
+ }
214
+
215
+ }
216
+
217
+ NewsletterUnsubscription::instance();