Smart Slider 3 - Version 3.2.13

Version Description

  • 14. February 2018. =
  • Feature: Widget areas in WordPress
  • Feature: Enhanced Media Library compatibility WordPress
  • Feature: Arrow alt tags
  • Feature: User related advanced shortcode options
  • Feature: Control hover displaying improved
  • Feature: Background color can get dynamic slide variable
  • Fix: ProPhoto theme compatibility
  • Fix: Layer position when a chained layer was moved to Content mode
  • Fix: Hidden video layers are not autoplaying anymore on iPhone
  • Fix: Elementor issue
  • Fix: Google font droid fix to Noto
  • Fix: CDNForJoomla fix
  • Fix: Scroll fix for mac
  • Fix: Safari font smoothing
  • Fix: Compatibility fix for JCH Optimize
  • Fix: Publishing on WooCommerce product pages
  • Deprecated: Remove spaces from parents
  • Deprecated: Hide siblings
Download this release

Release Info

Developer nextendweb
Plugin Icon 128x128 Smart Slider 3
Version 3.2.13
Comparing to
See all releases

Code changes from version 3.2.12 to 3.2.13

Files changed (65) hide show
  1. editor/shortcode.php +44 -10
  2. includes/integrations/Divi.php +5 -2
  3. includes/integrations/Elementor.php +9 -4
  4. includes/integrations/VisualComposer.php +1 -1
  5. includes/integrations/acf.php +13 -1
  6. includes/integrations/beaver-builder/BeaverBuilder.php +24 -18
  7. includes/integrations/beaver-builder/beaver-builder-module.php +2 -2
  8. includes/integrations/beaver-builder/includes/frontend.php +5 -1
  9. includes/integrations/unyson/smartslider/includes/option-types.php +24 -20
  10. includes/integrations/unyson/smartslider/shortcodes/smartslider/views/view.php +6 -2
  11. includes/shortcode.php +59 -7
  12. includes/smartslider3.php +33 -0
  13. includes/widget.php +75 -9
  14. library/media/dist/smartslider-backend.js +24 -3
  15. library/media/dist/smartslider-backend.min.js +7 -7
  16. library/media/dist/smartslider-frontend.js +6 -4
  17. library/media/dist/smartslider-frontend.min.js +2 -2
  18. library/media/less/clear.n2less +3 -0
  19. library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.js +4 -4
  20. library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.min.js +1 -1
  21. library/smartslider/backend/controllers/ajax/Slider.php +5 -2
  22. library/smartslider/backend/inline/embedslidermanager.phtml +9 -4
  23. library/smartslider/backend/inline/slidermanager.phtml +3 -2
  24. library/smartslider/backend/views/generator/_view.php +1 -1
  25. library/smartslider/backend/views/slider/_slider_edit.phtml +20 -1
  26. library/smartslider/backend/views/slider/group.phtml +20 -1
  27. library/smartslider/backend/views/sliders/embed.phtml +2 -0
  28. library/smartslider/frontend/controllers/prerender/Slider.php +4 -3
  29. library/smartslider/languages/de_DE.mo +0 -0
  30. library/smartslider/libraries/export.php +1 -1
  31. library/smartslider/libraries/import.php +4 -0
  32. library/smartslider/libraries/slider/abstract.php +11 -12
  33. library/smartslider/libraries/slider/features/fadeonload.php +1 -1
  34. library/smartslider/libraries/slider/features/features.php +0 -33
  35. library/smartslider/libraries/slider/features/layermode.php +0 -11
  36. library/smartslider/libraries/slider/features/responsive.php +0 -4
  37. library/smartslider/libraries/slider/features/slidebackground.php +14 -2
  38. library/smartslider/libraries/slider/manager.php +32 -12
  39. library/smartslider/libraries/slider/slides/slide.php +13 -10
  40. library/smartslider/models/Install.php +5 -0
  41. library/smartslider/models/Sliders.php +122 -2
  42. library/smartslider/models/forms/settings/default.xml +4 -0
  43. library/smartslider/models/forms/slider.xml +1 -2
  44. library/smartslider/models/forms/slidergroup.xml +1 -0
  45. library/smartslider/plugins/type/simple/simple/type.php +2 -2
  46. library/smartslider/plugins/widgetarrow/image/image.php +5 -3
  47. library/smartslider/plugins/widgetarrow/image/image/config.xml +3 -0
  48. library/smartslider/plugins/widgetbar/horizontal/horizontal.php +1 -1
  49. library/smartslider/plugins/widgetthumbnail/default/default.php +1 -1
  50. library/smartslider/smartslider3.php +1 -1
  51. library/wordpress/backend/inline/publish.phtml +10 -2
  52. library/wordpress/libraries/slider/slider.php +3 -3
  53. library/wordpress/plugins/generator/posts/postsbyids/generator.php +1 -1
  54. nextend/library/applications/system/models/forms/image/form.xml +1 -1
  55. nextend/library/libraries/assets/css/assets.php +6 -4
  56. nextend/library/libraries/assets/js/assets.php +5 -3
  57. nextend/library/libraries/form/tab.php +1 -1
  58. nextend/library/libraries/form/tabs/grouppedsidebar.php +0 -2
  59. nextend/library/libraries/form/tabs/tabbedsidebar.php +0 -2
  60. nextend/library/libraries/helpers/html.php +23 -0
  61. nextend/library/libraries/image/image.php +1 -1
  62. nextend/media/dist/nextend-backend.css +11 -1
  63. nextend/media/dist/nextend-backend.js +3 -1
  64. nextend/media/dist/nextend-backend.min.css +1 -1
  65. nextend/media/dist/nextend-backend.min.js +1 -3
editor/shortcode.php CHANGED
@@ -129,7 +129,15 @@ class N2SSShortcodeInsert {
129
 
130
  window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
131
  if (e.source == (iframe[0].contentWindow || iframe[0].contentDocument)) {
132
- callback(e[e.message ? "message" : "data"]);
 
 
 
 
 
 
 
 
133
  hide();
134
  }
135
  }, false);
@@ -138,16 +146,32 @@ class N2SSShortcodeInsert {
138
  if (intval(N2SmartSliderSettings::get('editor-icon', 1))) {
139
  ?>
140
  window.NextendSmartSliderWPTinyMCEModal = function (ed) {
141
- callback = function (id) {
142
- ed.execCommand('mceInsertContent', false, '<div>[smartslider3 slider=' + id + ']</div>');
 
 
 
 
 
 
 
 
143
  };
144
  show();
145
  };
146
 
147
  if (typeof QTags !== 'undefined') {
148
  QTags.addButton('smart-slider-3', 'Smart Slider', function () {
149
- callback = function (id) {
150
- QTags.insertContent('<div>[smartslider3 slider=' + id + ']</div>');
 
 
 
 
 
 
 
 
151
  };
152
  show();
153
  });
@@ -157,11 +181,21 @@ class N2SSShortcodeInsert {
157
  ?>
158
 
159
  window.NextendSmartSliderSelectModal = function ($input) {
160
- callback = function (id) {
161
- if (typeof $input === 'function') {
162
- $input = $input();
163
- }
164
- $input.val(id).trigger('input').trigger('change');
 
 
 
 
 
 
 
 
 
 
165
  };
166
  show();
167
  return false;
129
 
130
  window[eventMethod](eventMethod == "attachEvent" ? "onmessage" : "message", function (e) {
131
  if (e.source == (iframe[0].contentWindow || iframe[0].contentDocument)) {
132
+ var message = e[e.message ? "message" : "data"];
133
+ try{
134
+ message = JSON.parse(message);
135
+ if(message.action && message.action === 'ss3embed') {
136
+ callback(message);
137
+ }
138
+ } catch(ex) {
139
+
140
+ }
141
  hide();
142
  }
143
  }, false);
146
  if (intval(N2SmartSliderSettings::get('editor-icon', 1))) {
147
  ?>
148
  window.NextendSmartSliderWPTinyMCEModal = function (ed) {
149
+ callback = function (data) {
150
+ var shortcode = false;
151
+ if(data.mode === 'id'){
152
+ shortcode = '<div>[smartslider3 slider=' + data.id + ']</div>';
153
+ }else if(data.mode === 'alias'){
154
+ shortcode = '<div>[smartslider3 alias="' + data.alias + '"]</div>';
155
+ }
156
+ if(shortcode) {
157
+ ed.execCommand('mceInsertContent', false, shortcode);
158
+ }
159
  };
160
  show();
161
  };
162
 
163
  if (typeof QTags !== 'undefined') {
164
  QTags.addButton('smart-slider-3', 'Smart Slider', function () {
165
+ callback = function (data) {
166
+ var shortcode = false;
167
+ if(data.mode === 'id'){
168
+ shortcode = '<div>[smartslider3 slider=' + data.id + ']</div>';
169
+ }else if(data.mode === 'alias'){
170
+ shortcode = '<div>[smartslider3 alias="' + data.alias + '"]</div>';
171
+ }
172
+ if(shortcode) {
173
+ QTags.insertContent("\n" + shortcode);
174
+ }
175
  };
176
  show();
177
  });
181
  ?>
182
 
183
  window.NextendSmartSliderSelectModal = function ($input) {
184
+ callback = function (data) {
185
+
186
+ var idOrAlias = false;
187
+ if(data.mode === 'id'){
188
+ idOrAlias = data.id;
189
+ }else if(data.mode === 'alias'){
190
+ idOrAlias = data.alias;
191
+ }
192
+
193
+ if(idOrAlias) {
194
+ if (typeof $input === 'function') {
195
+ $input = $input();
196
+ }
197
+ $input.val(idOrAlias).trigger('input').trigger('change');
198
+ }
199
  };
200
  show();
201
  return false;
includes/integrations/Divi.php CHANGED
@@ -66,11 +66,14 @@ class Nextend_ET_Builder_Module_Smart_Slider extends ET_Builder_Module {
66
  }
67
 
68
  function shortcode_callback($atts, $content = null, $function_name) {
69
- $sliderId = $this->shortcode_atts['slider'];
70
  $module_class = '';
71
  $module_class = ET_Builder_Element::add_module_order_class($module_class, $function_name);
72
 
73
- return '<div class="et_pb_module et-waypoint ' . $module_class . ' et_pb_animation_off">' . do_shortcode('[smartslider3 slider=' . $sliderId . ']') . '</div>';
 
 
 
74
  }
75
  }
76
 
66
  }
67
 
68
  function shortcode_callback($atts, $content = null, $function_name) {
69
+ $sliderIdOrAlias = $this->shortcode_atts['slider'];
70
  $module_class = '';
71
  $module_class = ET_Builder_Element::add_module_order_class($module_class, $function_name);
72
 
73
+ if(!is_numeric($sliderIdOrAlias)){
74
+ return '<div class="et_pb_module et-waypoint ' . $module_class . ' et_pb_animation_off">' . do_shortcode('[smartslider3 alias="' . $sliderIdOrAlias . '"]') . '</div>';
75
+ }
76
+ return '<div class="et_pb_module et-waypoint ' . $module_class . ' et_pb_animation_off">' . do_shortcode('[smartslider3 slider=' . $sliderIdOrAlias . ']') . '</div>';
77
  }
78
  }
79
 
includes/integrations/Elementor.php CHANGED
@@ -58,10 +58,10 @@ class Nextend_Widget_SmartSlider extends \Elementor\Widget_Base {
58
  ]);
59
 
60
  $this->add_control('smartsliderid', [
61
- 'label' => 'Slider ID',
62
  'type' => 'smartsliderfield',
63
  'default' => '',
64
- 'title' => 'Slider ID',
65
  ]);
66
 
67
  $this->end_controls_section();
@@ -72,7 +72,12 @@ class Nextend_Widget_SmartSlider extends \Elementor\Widget_Base {
72
  if (\Elementor\Plugin::instance()->editor->is_edit_mode() || \Elementor\Plugin::instance()->preview->is_preview_mode()) {
73
  echo \N2SS3Shortcode::renderIframe($this->get_settings('smartsliderid'));
74
  } else {
75
- echo do_shortcode('[smartslider3 slider=' . $this->get_settings('smartsliderid') . ']');
 
 
 
 
 
76
  }
77
  }
78
 
@@ -81,7 +86,7 @@ class Nextend_Widget_SmartSlider extends \Elementor\Widget_Base {
81
  }
82
 
83
  protected function _content_template() {
84
- echo \N2SS3Shortcode::renderIframe('{{{ settings.smartsliderid }}}');
85
  }
86
 
87
  }
58
  ]);
59
 
60
  $this->add_control('smartsliderid', [
61
+ 'label' => 'Slider ID or Alias',
62
  'type' => 'smartsliderfield',
63
  'default' => '',
64
+ 'title' => 'Slider ID or Alias',
65
  ]);
66
 
67
  $this->end_controls_section();
72
  if (\Elementor\Plugin::instance()->editor->is_edit_mode() || \Elementor\Plugin::instance()->preview->is_preview_mode()) {
73
  echo \N2SS3Shortcode::renderIframe($this->get_settings('smartsliderid'));
74
  } else {
75
+ $sliderIDorAlias = $this->get_settings('smartsliderid');
76
+ if(is_numeric($sliderIDorAlias)) {
77
+ echo do_shortcode( '[smartslider3 slider=' . $sliderIDorAlias . ']' );
78
+ }else{
79
+ echo do_shortcode( '[smartslider3 alias="' . $sliderIDorAlias . '"]' );
80
+ }
81
  }
82
  }
83
 
86
  }
87
 
88
  protected function _content_template() {
89
+ echo \N2SS3Shortcode::renderIframe('{{{settings.smartsliderid}}}');
90
  }
91
 
92
  }
includes/integrations/VisualComposer.php CHANGED
@@ -27,7 +27,7 @@ class NextendSmartSlider3VisualComposer {
27
  "params" => array(
28
  array(
29
  'type' => 'smartslider',
30
- 'heading' => 'Slider ID',
31
  'param_name' => 'slider',
32
  'save_always' => true,
33
  'description' => 'Select a slider to add it to your post or page.',
27
  "params" => array(
28
  array(
29
  'type' => 'smartslider',
30
+ 'heading' => 'Slider ID or Alias',
31
  'param_name' => 'slider',
32
  'save_always' => true,
33
  'description' => 'Select a slider to add it to your post or page.',
includes/integrations/acf.php CHANGED
@@ -37,7 +37,10 @@ class acf_field_smart_slider_3 extends acf_field {
37
  return false;
38
  }
39
 
40
- return do_shortcode('[smartslider3 slider="' . $value . '"]');
 
 
 
41
  }
42
 
43
  public function format_value_for_api($value, $field) {
@@ -70,8 +73,14 @@ class acf_field_smart_slider_3 extends acf_field {
70
  if ($slider['type'] == 'group') {
71
 
72
  $subChoices = array();
 
 
 
73
  $subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
74
  foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
 
 
 
75
  $subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
76
  }
77
 
@@ -80,6 +89,9 @@ class acf_field_smart_slider_3 extends acf_field {
80
  'choices' => $subChoices
81
  );
82
  } else {
 
 
 
83
  $choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
84
  }
85
  }
37
  return false;
38
  }
39
 
40
+ if(!is_numeric($value)) {
41
+ return do_shortcode('[smartslider3 alias="' . $value . '"]');
42
+ }
43
+ return do_shortcode('[smartslider3 slider=' . $value . ']');
44
  }
45
 
46
  public function format_value_for_api($value, $field) {
73
  if ($slider['type'] == 'group') {
74
 
75
  $subChoices = array();
76
+ if(!empty($slider['alias'])){
77
+ $subChoices[$slider['alias']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #Alias: ' . $slider['alias'];
78
+ }
79
  $subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
80
  foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
81
+ if(!empty($_slider['alias'])){
82
+ $subChoices[$_slider['alias']] = $_slider['title'] . ' #Alias: ' . $_slider['alias'];
83
+ }
84
  $subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
85
  }
86
 
89
  'choices' => $subChoices
90
  );
91
  } else {
92
+ if(!empty($slider['alias'])){
93
+ $choices[$slider['alias']] = $slider['title'] . ' #Alias: ' . $slider['alias'];
94
+ }
95
  $choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
96
  }
97
  }
includes/integrations/beaver-builder/BeaverBuilder.php CHANGED
@@ -38,24 +38,30 @@ function n2_fl_smart_slider_field($name, $value, $field) {
38
 
39
  $choices = array();
40
  foreach ($slidersModel->getAll(0) AS $slider) {
41
- if ($slider['type'] == 'group') {
42
-
43
- $subChoices = array();
44
- $subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
45
- foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
46
- $subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
47
- }
48
-
49
- $choices[$slider['id']] = array(
50
- 'label' => $slider['title'] . ' #' . $slider['id'],
51
- 'choices' => $subChoices
52
- );
53
-
54
-
55
- } else {
56
- $choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
57
- }
58
-
 
 
 
 
 
 
59
  }
60
  ?>
61
  <select name="<?php echo $name; ?>">
38
 
39
  $choices = array();
40
  foreach ($slidersModel->getAll(0) AS $slider) {
41
+ if ($slider['type'] == 'group') {
42
+
43
+ $subChoices = array();
44
+ if(!empty($slider['alias'])){
45
+ $subChoices[$slider['alias']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #Alias: ' . $slider['alias'];
46
+ }
47
+ $subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
48
+ foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
49
+ if(!empty($_slider['alias'])){
50
+ $subChoices[$_slider['alias']] = $_slider['title'] . ' #Alias: ' . $_slider['alias'];
51
+ }
52
+ $subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
53
+ }
54
+
55
+ $choices[$slider['id']] = array(
56
+ 'label' => $slider['title'] . ' #' . $slider['id'],
57
+ 'choices' => $subChoices
58
+ );
59
+ } else {
60
+ if(!empty($slider['alias'])){
61
+ $choices[$slider['alias']] = $slider['title'] . ' #Alias: ' . $slider['alias'];
62
+ }
63
+ $choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
64
+ }
65
  }
66
  ?>
67
  <select name="<?php echo $name; ?>">
includes/integrations/beaver-builder/beaver-builder-module.php CHANGED
@@ -27,8 +27,8 @@ FLBuilder::register_module('FLSmartSliderModule', array(
27
  'fields' => array(
28
  'sliderid' => array(
29
  'type' => 'smart-slider',
30
- 'label' => 'Slider ID',
31
- 'default' => '0'
32
  ),
33
  )
34
  )
27
  'fields' => array(
28
  'sliderid' => array(
29
  'type' => 'smart-slider',
30
+ 'label' => 'Slider ID or Alias',
31
+ 'default' => ''
32
  ),
33
  )
34
  )
includes/integrations/beaver-builder/includes/frontend.php CHANGED
@@ -2,4 +2,8 @@
2
  if (!defined('ABSPATH')) {
3
  exit; // Exit if accessed directly
4
  }
5
- echo do_shortcode('[smartslider3 slider=' . $settings->sliderid . ']');
 
 
 
 
2
  if (!defined('ABSPATH')) {
3
  exit; // Exit if accessed directly
4
  }
5
+ if(is_numeric($settings->sliderid)) {
6
+ echo do_shortcode( '[smartslider3 slider=' . $settings->sliderid . ']' );
7
+ } else {
8
+ echo do_shortcode( '[smartslider3 alias="' . $settings->sliderid . '"]' );
9
+ }
includes/integrations/unyson/smartslider/includes/option-types.php CHANGED
@@ -20,26 +20,30 @@ class FW_Option_Type_SmartSliderChooser extends FW_Option_Type_Select {
20
 
21
  $choices = array();
22
  foreach ($slidersModel->getAll(0) AS $slider) {
23
- if ($slider['type'] == 'group') {
24
-
25
- $subChoices = array();
26
- $subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
27
- foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
28
- $subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
29
- }
30
-
31
- $choices[$slider['id']] = array(
32
- 'attr' => array(
33
- 'label' => $slider['title'] . ' #' . $slider['id']
34
- ),
35
- 'choices' => $subChoices
36
- );
37
-
38
-
39
- } else {
40
- $choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
41
- }
42
-
 
 
 
 
43
  }
44
 
45
  $option['choices'] = $choices;
20
 
21
  $choices = array();
22
  foreach ($slidersModel->getAll(0) AS $slider) {
23
+ if ($slider['type'] == 'group') {
24
+
25
+ $subChoices = array();
26
+ if(!empty($slider['alias'])){
27
+ $subChoices[$slider['alias']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #Alias: ' . $slider['alias'];
28
+ }
29
+ $subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
30
+ foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
31
+ if(!empty($_slider['alias'])){
32
+ $subChoices[$_slider['alias']] = $_slider['title'] . ' #Alias: ' . $_slider['alias'];
33
+ }
34
+ $subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
35
+ }
36
+
37
+ $choices[$slider['id']] = array(
38
+ 'label' => $slider['title'] . ' #' . $slider['id'],
39
+ 'choices' => $subChoices
40
+ );
41
+ } else {
42
+ if(!empty($slider['alias'])){
43
+ $choices[$slider['alias']] = $slider['title'] . ' #Alias: ' . $slider['alias'];
44
+ }
45
+ $choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
46
+ }
47
  }
48
 
49
  $option['choices'] = $choices;
includes/integrations/unyson/smartslider/shortcodes/smartslider/views/view.php CHANGED
@@ -5,5 +5,9 @@
5
  /**
6
  * @var array $atts
7
  */
8
- ?>
9
- <?php echo do_shortcode('[smartslider3 slider=' . $atts['id'] . ']'); ?>
 
 
 
 
5
  /**
6
  * @var array $atts
7
  */
8
+
9
+ if(is_numeric($atts['id'])) {
10
+ echo do_shortcode( '[smartslider3 slider=' . $atts['id'] . ']' );
11
+ } else {
12
+ echo do_shortcode( '[smartslider3 alias="' . $atts['id'] . '"]' );
13
+ }
includes/shortcode.php CHANGED
@@ -12,6 +12,11 @@ class N2SS3Shortcode {
12
  }
13
 
14
  public static function doShortcode($parameters) {
 
 
 
 
 
15
  if (self::$iframe) {
16
  if (isset($parameters['slider'])) {
17
  return self::renderIframe($parameters['slider']);
@@ -23,7 +28,7 @@ class N2SS3Shortcode {
23
  return self::render($parameters);
24
  }
25
 
26
- public static function renderIframe($sliderID) {
27
 
28
  $script = 'if(typeof window.n2SSIframeLoader != "function"){
29
  (function($){
@@ -108,7 +113,7 @@ class N2SS3Shortcode {
108
  'class' => "n2-ss-slider-frame",
109
  'style' => 'width:100%;display:block;border:0;',
110
  'frameborder' => 0,
111
- 'src' => site_url() . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe&sliderid=' . $sliderID . '&hash=' . md5($sliderID . NONCE_SALT)
112
  );
113
  $html = '';
114
 
@@ -140,6 +145,31 @@ class N2SS3Shortcode {
140
  }
141
 
142
  public static function render($parameters, $usage = 'WordPress Shortcode') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
  if (isset($parameters['slide'])) {
144
  $slideTo = intval($parameters['slide']);
145
  }
@@ -168,7 +198,7 @@ class N2SS3Shortcode {
168
  'slider' => 0
169
  ), $parameters);
170
 
171
- if (intval($parameters['slider']) > 0) {
172
  ob_start();
173
  N2Base::getApplication("smartslider")
174
  ->getApplicationType('frontend')
@@ -177,7 +207,7 @@ class N2SS3Shortcode {
177
  "action" => 'wordpress',
178
  "useRequest" => false
179
  ), array(
180
- intval($parameters['slider']),
181
  $usage
182
  ));
183
 
@@ -186,12 +216,34 @@ class N2SS3Shortcode {
186
 
187
  return '';
188
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
  }
190
 
191
- add_shortcode('smartslider3', 'N2SS3Shortcode::doShortcode');
192
 
193
  if (defined('DOING_AJAX') && DOING_AJAX) {
194
  if (isset($_POST['action']) && ($_POST['action'] == 'stpb_preview_builder_item' || $_POST['action'] == 'stpb_load_builder_templates' || $_POST['action'] == 'stpb_load_template')) {
195
- remove_shortcode('smartslider3');
196
  }
197
- }
 
 
 
 
 
 
12
  }
13
 
14
  public static function doShortcode($parameters) {
15
+
16
+ if(!empty($parameters['alias'])){
17
+ $parameters['slider'] = $parameters['alias'];
18
+ }
19
+
20
  if (self::$iframe) {
21
  if (isset($parameters['slider'])) {
22
  return self::renderIframe($parameters['slider']);
28
  return self::render($parameters);
29
  }
30
 
31
+ public static function renderIframe($sliderIDorAlias) {
32
 
33
  $script = 'if(typeof window.n2SSIframeLoader != "function"){
34
  (function($){
113
  'class' => "n2-ss-slider-frame",
114
  'style' => 'width:100%;display:block;border:0;',
115
  'frameborder' => 0,
116
+ 'src' => site_url() . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe&sliderid=' . $sliderIDorAlias . '&hash=' . md5( $sliderIDorAlias . NONCE_SALT)
117
  );
118
  $html = '';
119
 
145
  }
146
 
147
  public static function render($parameters, $usage = 'WordPress Shortcode') {
148
+ if (isset($parameters['logged_in'])) {
149
+ $logged_in = boolval($parameters['logged_in']);
150
+ if ( is_user_logged_in() !== $logged_in) {
151
+ return '';
152
+ }
153
+ }
154
+
155
+ if(isset($parameters['role']) || isset($parameters['cap'])){
156
+ $current_user = wp_get_current_user();
157
+
158
+ if(isset($parameters['role'])){
159
+ $current_user_roles = $current_user->roles;
160
+ if(!in_array($parameters['role'], $current_user_roles)){
161
+ return '';
162
+ }
163
+ }
164
+
165
+ if(isset($parameters['cap'])){
166
+ $current_user_caps = $current_user->allcaps;
167
+ if(!isset($current_user_caps[$parameters['cap']]) || !$current_user_caps[$parameters['cap']]){
168
+ return '';
169
+ }
170
+ }
171
+ }
172
+
173
  if (isset($parameters['slide'])) {
174
  $slideTo = intval($parameters['slide']);
175
  }
198
  'slider' => 0
199
  ), $parameters);
200
 
201
+ if ((is_numeric($parameters['slider']) && intval($parameters['slider']) > 0) || !is_numeric($parameters['slider'])) {
202
  ob_start();
203
  N2Base::getApplication("smartslider")
204
  ->getApplicationType('frontend')
207
  "action" => 'wordpress',
208
  "useRequest" => false
209
  ), array(
210
+ $parameters['slider'],
211
  $usage
212
  ));
213
 
216
 
217
  return '';
218
  }
219
+
220
+ public static function addShortCode(){
221
+ add_shortcode('smartslider3', 'N2SS3Shortcode::doShortcode');
222
+ }
223
+
224
+ public static function addNoopShortCode(){
225
+ add_shortcode('smartslider3', 'N2SS3Shortcode::doNoopShortcode');
226
+ }
227
+
228
+ public static function doNoopShortcode(){
229
+ return '';
230
+ }
231
+
232
+ public static function removeShortcode(){
233
+ remove_shortcode('smartslider3');
234
+ }
235
  }
236
 
237
+ N2SS3Shortcode::addShortCode();
238
 
239
  if (defined('DOING_AJAX') && DOING_AJAX) {
240
  if (isset($_POST['action']) && ($_POST['action'] == 'stpb_preview_builder_item' || $_POST['action'] == 'stpb_load_builder_templates' || $_POST['action'] == 'stpb_load_template')) {
241
+ N2SS3Shortcode::removeShortcode();
242
  }
243
+ }
244
+
245
+ add_action( 'woocommerce_shop_loop', 'N2SS3Shortcode::addNoopShortCode', -1 );
246
+ add_action( 'woocommerce_shop_loop', 'N2SS3Shortcode::addShortCode', 100000 );
247
+
248
+ add_action( 'woocommerce_single_product_summary', 'N2SS3Shortcode::addNoopShortCode', -1 );
249
+ add_action( 'woocommerce_single_product_summary', 'N2SS3Shortcode::addShortCode', 100000 );
includes/smartslider3.php CHANGED
@@ -15,6 +15,9 @@ class SmartSlider3 {
15
  add_action('nextend_loaded', 'SmartSlider3::registerApplication');
16
  }
17
 
 
 
 
18
  add_action('init', 'SmartSlider3::_init');
19
 
20
  add_action('init', 'SmartSlider3::preRender');
@@ -108,6 +111,36 @@ class SmartSlider3 {
108
  }
109
  }
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  public static function preRender() {
112
 
113
  if (isset($_GET['n2prerender']) && isset($_GET['n2app'])) {
15
  add_action('nextend_loaded', 'SmartSlider3::registerApplication');
16
  }
17
 
18
+ add_action('widgets_init', 'SmartSlider3::widgets_init', 11);
19
+ add_action('widgets_admin_page', 'SmartSlider3::widgets_admin_page');
20
+
21
  add_action('init', 'SmartSlider3::_init');
22
 
23
  add_action('init', 'SmartSlider3::preRender');
111
  }
112
  }
113
 
114
+ public static function widgets_init() {
115
+ N2Loader::import('libraries.settings.settings', 'smartslider');
116
+ $widgetAreas = intval(N2SmartSliderSettings::get('wordpress-widget-areas', 1));
117
+ if ($widgetAreas > 0) {
118
+ for ($i = 1; $i <= $widgetAreas; $i++) {
119
+
120
+ register_sidebar(array(
121
+ 'name' => 'Smart Slider Widget Area - #' . $i,
122
+ 'description' => '',
123
+ 'id' => 'smartslider_area_' . $i,
124
+ 'before_widget' => '',
125
+ 'after_widget' => '',
126
+ 'before_title' => '<div style="display:none;">',
127
+ 'after_title' => '</div>',
128
+ ));
129
+ }
130
+ }
131
+ }
132
+
133
+ public static function widgets_admin_page() {
134
+ add_action('dynamic_sidebar_before', 'SmartSlider3::dynamic_sidebar_before');
135
+ }
136
+
137
+ public static function dynamic_sidebar_before($index) {
138
+ if (substr($index, 0, strlen('smartslider_area_')) === 'smartslider_area_') {
139
+ echo '<div class="description">Display this widget area in your theme with: <pre>&lt;?php dynamic_sidebar(\'' . $index . '\'); ?&gt;</pre></div>';
140
+ }
141
+
142
+ }
143
+
144
  public static function preRender() {
145
 
146
  if (isset($_GET['n2prerender']) && isset($_GET['n2app'])) {
includes/widget.php CHANGED
@@ -78,6 +78,81 @@ class N2SS3Widget extends WP_Widget {
78
  N2SSShortcodeInsert::addForced();
79
 
80
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  <p>
82
  <label for="<?php echo $this->get_field_id('title'); ?>">
83
  Title:
@@ -86,15 +161,6 @@ class N2SS3Widget extends WP_Widget {
86
  value="<?php echo esc_attr($title); ?>"/>
87
  </label>
88
  </p>
89
-
90
- <p>
91
- <label for="<?php echo $this->get_field_id('smartslider2'); ?>">
92
- Smart Slider:<br>
93
- <input style="width:100px;vertical-align: top;" class="widefat" id="<?php echo $this->get_field_id('slider'); ?>" name="<?php echo $this->get_field_name('slider'); ?>" type="text" value="<?php echo esc_attr($instance['slider']); ?>">
94
-
95
- <a style="vertical-align: top;" href="#" onclick="<?php echo SmartSlider3::sliderSelectAction("jQuery(this).siblings('input')"); ?>return false;" class="button button-primary elementor-button elementor-button-smartslider fl-builder-button fl-builder-button-large" title="Select slider">Select slider</a>
96
- </label>
97
- </p>
98
  <?php
99
  }
100
 
78
  N2SSShortcodeInsert::addForced();
79
 
80
  ?>
81
+
82
+ <p>
83
+ <?php
84
+ N2base::getApplication('smartslider')
85
+ ->getApplicationType('backend');
86
+ N2Loader::import("models.Sliders", "smartslider");
87
+
88
+ $slidersModel = new N2SmartsliderSlidersModel();
89
+
90
+ $choices = array();
91
+ foreach ($slidersModel->getAll(0) AS $slider) {
92
+ if ($slider['type'] == 'group') {
93
+
94
+ $subChoices = array();
95
+ if(!empty($slider['alias'])){
96
+ $subChoices[$slider['alias']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #Alias: ' . $slider['alias'];
97
+ }
98
+ $subChoices[$slider['id']] = n2_('Whole group') . ' - ' . $slider['title'] . ' #' . $slider['id'];
99
+ foreach ($slidersModel->getAll($slider['id']) AS $_slider) {
100
+ if(!empty($_slider['alias'])){
101
+ $subChoices[$_slider['alias']] = $_slider['title'] . ' #Alias: ' . $_slider['alias'];
102
+ }
103
+ $subChoices[$_slider['id']] = $_slider['title'] . ' #' . $_slider['id'];
104
+ }
105
+
106
+ $choices[$slider['id']] = array(
107
+ 'label' => $slider['title'] . ' #' . $slider['id'],
108
+ 'choices' => $subChoices
109
+ );
110
+ } else {
111
+ if(!empty($slider['alias'])){
112
+ $choices[$slider['alias']] = $slider['title'] . ' #Alias: ' . $slider['alias'];
113
+ }
114
+ $choices[$slider['id']] = $slider['title'] . ' #' . $slider['id'];
115
+ }
116
+
117
+ }
118
+ $value = $instance['slider'];
119
+
120
+ $_title = '';
121
+ ?>
122
+ <select id="<?php echo $this->get_field_id('slider'); ?>" onchange="jQuery('#<?php echo $this->get_field_id('temp-title'); ?>').val(jQuery(this).find('option:selected').text()).trigger('change');" name="<?php echo $this->get_field_name('slider'); ?>" class="widefat">
123
+ <option value=""><?php n2_e('None'); ?></option>
124
+ <?php
125
+ foreach ($choices AS $id => $choice) {
126
+ if (is_array($choice)) {
127
+ ?>
128
+ <optgroup label="<?php echo $choice['label']; ?>">
129
+ <?php
130
+ foreach ($choice['choices'] AS $_id => $_choice) {
131
+ ?>
132
+ <option <?php if ($_id == $value){
133
+ $_title = $_choice; ?>selected <?php } ?>value="<?php echo $_id; ?>"><?php echo $_choice; ?></option>
134
+ <?php
135
+ }
136
+ ?>
137
+ </optgroup>
138
+ <?php
139
+ } else {
140
+ ?>
141
+ <option <?php if ($id == $value){
142
+ $_title = $choice; ?>selected <?php } ?>value="<?php echo $id; ?>"><?php echo $choice; ?></option>
143
+ <?php
144
+ }
145
+ }
146
+ ?>
147
+ </select>
148
+ <input id="<?php echo $this->get_field_id('temp-title'); ?>"
149
+ name="<?php echo $this->get_field_name('temp-title'); ?>" type="hidden"
150
+ value="<?php echo $_title; ?>"/>
151
+
152
+ <span style="display:block;line-height:2;padding:10px;"><?php n2_e('OR'); ?></span>
153
+
154
+ <a style="vertical-align: top;" href="#" onclick="<?php echo SmartSlider3::sliderSelectAction('jQuery(\'#' . $this->get_field_id('slider') . '\')'); ?>return false;" class="button button-primary elementor-button elementor-button-smartslider fl-builder-button fl-builder-button-large" title="Select slider">Select slider</a>
155
+ </p>
156
  <p>
157
  <label for="<?php echo $this->get_field_id('title'); ?>">
158
  Title:
161
  value="<?php echo esc_attr($title); ?>"/>
162
  </label>
163
  </p>
 
 
 
 
 
 
 
 
 
164
  <?php
165
  }
166
 
library/media/dist/smartslider-backend.js CHANGED
@@ -3707,6 +3707,8 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
3707
  this.registerField($('#slidebackgroundAlt'));
3708
  this.registerField($('#slidebackgroundTitle'));
3709
  this.registerField($('#slidebackgroundVideoMp4'));
 
 
3710
  this.registerField($('#linkslidelink_0'));
3711
  this.registerField($('#layergenerator-visible'));
3712
  this.registerField($('#layergroup-generator-visible'));
@@ -3968,7 +3970,7 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
3968
 
3969
 
3970
  content.append(NextendModal.prototype.createHeading(n2_('Choose the variable')));
3971
- var variableContainer = $('<div class="n2-variable-container" />').appendTo(content);
3972
 
3973
  //content.append(NextendModal.prototype.createHeading('Functions'));
3974
  var functionsContainer = $('<div class="n2-generator-functions-container n2-form-element-mixed" />')
@@ -4696,12 +4698,25 @@ N2Require('SlideSettings', ['SlideEditManager'], ['smartSlider'], function ($, s
4696
  };
4697
 
4698
  SlideSettings.prototype.updateBackgroundColor = function () {
4699
- var backgroundColor = this.fields.backgroundColor.val(),
4700
  gradient = this.fields.backgroundGradient.val();
 
 
 
 
 
 
4701
  if (gradient != 'off') {
4702
- var backgroundColorEnd = this.fields.backgroundColorEnd.val(),
4703
  $slideMask = this.$slideMask.css({background: '', filter: ''});
4704
 
 
 
 
 
 
 
 
4705
  switch (gradient) {
4706
  case 'horizontal':
4707
  $slideMask
@@ -7712,6 +7727,12 @@ N2Require('PlacementAbsolute', ['PlacementAbstract'], ['smartSlider'], function
7712
 
7713
  PlacementAbsolute.prototype.deActivated = function (newMode) {
7714
 
 
 
 
 
 
 
7715
  this.$layer
7716
  .removeAttr('data-align')
7717
  .removeAttr('data-valign')
3707
  this.registerField($('#slidebackgroundAlt'));
3708
  this.registerField($('#slidebackgroundTitle'));
3709
  this.registerField($('#slidebackgroundVideoMp4'));
3710
+ this.registerField($('#slidebackgroundColor'));
3711
+ this.registerField($('#slidebackgroundColorEnd'));
3712
  this.registerField($('#linkslidelink_0'));
3713
  this.registerField($('#layergenerator-visible'));
3714
  this.registerField($('#layergroup-generator-visible'));
3970
 
3971
 
3972
  content.append(NextendModal.prototype.createHeading(n2_('Choose the variable')));
3973
+ var variableContainer = $('<div class="n2-variable-container webkit-scroll-fix" />').appendTo(content);
3974
 
3975
  //content.append(NextendModal.prototype.createHeading('Functions'));
3976
  var functionsContainer = $('<div class="n2-generator-functions-container n2-form-element-mixed" />')
4698
  };
4699
 
4700
  SlideSettings.prototype.updateBackgroundColor = function () {
4701
+ var backgroundColor = smartSlider.generator.fill(this.fields.backgroundColor.val()),
4702
  gradient = this.fields.backgroundGradient.val();
4703
+ if(backgroundColor.length && backgroundColor.charAt(0) == '#'){
4704
+ backgroundColor = backgroundColor.substring(1);
4705
+ if(backgroundColor.length == 6){
4706
+ backgroundColor += 'ff';
4707
+ }
4708
+ }
4709
  if (gradient != 'off') {
4710
+ var backgroundColorEnd = smartSlider.generator.fill(this.fields.backgroundColorEnd.val()),
4711
  $slideMask = this.$slideMask.css({background: '', filter: ''});
4712
 
4713
+ if(backgroundColorEnd.length && backgroundColorEnd.charAt(0) == '#'){
4714
+ backgroundColorEnd = backgroundColorEnd.substring(1);
4715
+ if(backgroundColorEnd.length == 6){
4716
+ backgroundColorEnd += 'ff';
4717
+ }
4718
+ }
4719
+
4720
  switch (gradient) {
4721
  case 'horizontal':
4722
  $slideMask
7727
 
7728
  PlacementAbsolute.prototype.deActivated = function (newMode) {
7729
 
7730
+ var value = this.layer.getProperty('parentid');
7731
+ if (value && value != '') {
7732
+ this.$layer.removeAttr('data-parentid');
7733
+ this.unSubscribeParent();
7734
+ }
7735
+
7736
  this.$layer
7737
  .removeAttr('data-align')
7738
  .removeAttr('data-valign')
library/media/dist/smartslider-backend.min.js CHANGED
@@ -1,9 +1,9 @@
1
  N2Require("ContextMenu",[],[],function(t,e,i){function n(e,i){this.isActive=!1,this.$el=e.data("nextendcontextmenu",this),this.parameters=t.extend({selector:!1,onShow:function(){}},i),this.$menu=t('<div class="n2-context-menu"></div>').on("mousedown",function(){nextend.context.setMouseDownArea("context-menu")}).appendTo("body"),this.parameters.selector?this.$el.on("contextmenu",this.parameters.selector,t.proxy(this.onShowContextMenu,this)):this.$el.on("contextmenu",t.proxy(this.onShowContextMenu,this))}return n.prototype.onShowContextMenu=function(e){e.preventDefault(),this.clearItems(),this.parameters.onShow.call(this,e,this),this.hasItems&&(e.stopPropagation(),this.isActive=!0,this.$menu.css({left:e.pageX,top:e.pageY}),t("html").on("mouseleave.nextendcontextmenu, click.nextendcontextmenu",t.proxy(this.onHide,this))),this.$menu.toggleClass("n2-active",this.hasItems)},n.prototype.onHide=function(){t("html").off(".nextendcontextmenu"),this.$menu.removeClass("n2-active"),this.isActive=!1},n.prototype.clearItems=function(){this.isActive&&this.onHide(),this.hasItems=!1,this.$menu.html("")},n.prototype.addItem=function(e,i,n){this.hasItems=!0,this.$menu.append(t('<div><i class="n2-i '+i+'"></i><span>'+e+"</span></div>").on("click",n))},t.fn.nextendContextMenu=function(e){return this.each(function(){new n(t(this),e)})},n}),N2Require("Zoom",[],[],function(t,e,i){function n(e){this.key="n2-ss-editor-device-lock-mode",this.devices={unknownUnknown:t("<div />")},this.responsives=[e],e.setOrientation("portrait"),e.parameters.onResizeEnabled=0,e.parameters.forceFull=0,e._getDevice=e._getDeviceZoom,this.lock=t("#n2-ss-lock").on("click",t.proxy(this.switchLock,this));var i=e.parameters.sliderWidthToDevice.desktopPortrait;this.container=e.containerElement.closest(".n2-ss-container-device").addBack(),this.container.width(i),this.containerWidth=i,this.initZoom();var n=t("#n2-ss-devices .n2-tr"),r=e.parameters.deviceModes;this.devices.desktopPortrait=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-desktop"></i></div>').prependTo(n),r.desktopLandscape?this.devices.desktopLandscape=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-desktop-landscape"></i></div>').prependTo(n):this.devices.desktopLandscape=this.devices.desktopPortrait,r.tabletPortrait?this.devices.tabletPortrait=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-tablet"></i></div>').prependTo(n):this.devices.tabletPortrait=this.devices.desktopPortrait,r.tabletLandscape?this.devices.tabletLandscape=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-tablet-landscape"></i></div>').prependTo(n):this.devices.tabletLandscape=this.devices.desktopLandscape,r.mobilePortrait?this.devices.mobilePortrait=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-mobile"></i></div>').prependTo(n):this.devices.mobilePortrait=this.devices.tabletPortrait,r.mobileLandscape?this.devices.mobileLandscape=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-mobile-landscape"></i></div>').prependTo(n):this.devices.mobileLandscape=this.devices.tabletLandscape,this.deviceOptions=t("#n2-ss-devices .n2-panel-option"),this.deviceOptions.each(t.proxy(function(e,i){t(i).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"zoomDeviceClicked"),click:t.proxy(this.setDeviceMode,this)})},this)),e.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onDeviceOrientationChange,this))}var r=null;return nextend.ssBeforeResponsive=function(){r=new n(this),nextend.ssBeforeResponsive=function(){r.add(this)}},n.prototype.add=function(t){this.responsives.push(t),t.setOrientation("portrait"),t.parameters.onResizeEnabled=0,t.parameters.forceFull=0,t._getDevice=t._getDeviceZoom},n.prototype.onDeviceOrientationChange=function(e,i){t("#n2-admin").removeClass("n2-ss-mode-"+i.lastDevice+i.lastOrientation).addClass("n2-ss-mode-"+i.device+i.orientation),this.devices[i.lastDevice+i.lastOrientation].removeClass("n2-active"),this.devices[i.device+i.orientation].addClass("n2-active")},n.prototype.setDeviceMode=function(e){var i=t(e.currentTarget);if((e.ctrlKey||e.metaKey)&&nextend.smartSlider.canvasManager){var n=i.data("orientation");nextend.smartSlider.canvasManager.copyOrResetMode(i.data("device")+n[0].toUpperCase()+n.substr(1))}else for(var r=0;r<this.responsives.length;r++)this.responsives[r].setOrientation(i.data("orientation")),this.responsives[r].setMode(i.data("device"),this.responsives[r])},n.prototype.switchLock=function(e){e.preventDefault(),this.lock.toggleClass("n2-active"),this.lock.hasClass("n2-active")?(this.setZoomSyncMode(),this.zoomChange(e,this.zoom.slider("value"),"sync",!1),t.jStorage.set(this.key,"sync")):(this.setZoomFixMode(),t.jStorage.set(this.key,"fix"))},n.prototype.initZoom=function(){var e=t("#n2-ss-slider-zoom");e.length>0&&("undefined"!=typeof e[0].slide&&(e[0].slide=null),this.zoom=e.removeAttr("slide").prop("slide",!1).slider({range:"min",step:1,value:1,min:0,max:102}),this.responsives[0].sliderElement.on("SliderResize",t.proxy(this.sliderResize,this)),"fix"==t.jStorage.get(this.key,"sync")?this.setZoomFixMode():(this.setZoomSyncMode(),this.lock.addClass("n2-active")))},n.prototype.sliderResize=function(t,e){this.setZoom()},n.prototype.setZoomFixMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this)})},n.prototype.setZoomSyncMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this)})},n.prototype.zoomChangeFixMode=function(t,e){this.zoomChange(t,e.value,"fix",e)},n.prototype.zoomChangeSyncMode=function(t,e){this.zoomChange(t,e.value,"sync",e)},n.prototype.zoomChange=function(t,e,n,r){var s;if(t.originalEvent!==i){var o=1;50>e?o=nextend.smallestZoom/this.containerWidth+Math.max(e/50,0)*(1-nextend.smallestZoom/this.containerWidth):e>52&&(o=1+(e-52)/50),s=parseInt(o*this.containerWidth),this.container.width(s);for(var a=1;a<this.responsives.length;a++)this.responsives[a].containerElement.width(s);for(var a=0;a<this.responsives.length;a++)switch(n){case"sync":this.responsives[a].doResize(t);break;default:this.responsives[a].doResize(t,!0)}}else s=this.container.last().width(),this.container.width(s);r&&(r.handle.innerHTML=s+"px")},n.prototype.setZoom=function(){var t=this.responsives[0].containerElement.width()/this.containerWidth,e=50;1>t?e=(t-nextend.smallestZoom/this.containerWidth)/(1-nextend.smallestZoom/this.containerWidth)*50:t>1&&(e=50*(t-1)+52);this.zoom.slider("value");this.zoom.slider("value",e)},n}),N2Require("CreateSlider",[],[],function(t,e,i){function n(e,i,n){this.addToGroupModal=null,this.groupID=e,this.ajaxUrl=i,this.shouldSkipLicenseModal=n,t(".n2-ss-create-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showModal()},this)),this.notificationStack=new NextendNotificationCenterStackModal(t("body")),t(".n2-ss-add-sample-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showDemoSliders()},this)),"createslider"==window.location.hash.substring(1)&&this.showModal()}return n.prototype.showModal=function(){if(!this.createSliderModal){var e=this,i=this.ajaxUrl,n=[];n.push({key:"default",name:n2_("Default"),image:"$ss$/admin/images/sliderpresets/default.png"}),n.push({key:"fullwidth",name:n2_("Full width"),image:"$ss$/admin/images/sliderpresets/fullwidth.png"}),n.push({key:"thumbnailhorizontal",name:n2_("Thumbnail - horizontal"),image:"$ss$/admin/images/sliderpresets/thumbnailhorizontal.png"});var r=[550,520];this.createSliderModal=new NextendModal({zero:{size:r,title:n2_("Create Slider"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Create")+"</a>"],fn:{show:function(){var r=this.controls.find(".n2-button-green"),s=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),r.trigger("click")});s.append(this.createInput(n2_("Slider name"),"createslidertitle","width: 240px;")),s.append(this.createInputUnit(n2_("Width"),"createsliderwidth","px","width: 30px;")),s.append(this.createInputUnit(n2_("Height"),"createsliderheight","px","width: 30px;")),new N2Classes.FormElementAutocompleteSimple("createsliderwidth",["1920","1200","1000","800","600","400"]),new N2Classes.FormElementAutocompleteSimple("createsliderheight",["800","600","500","400","300","200"]);var o=t("#createslidertitle").val(n2_("Slider")).focus(),a=t("#createsliderwidth").val(1200),l=t("#createsliderheight").val(500);a.parent().addClass("n2-form-element-autocomplete ui-front"),l.parent().addClass("n2-form-element-autocomplete ui-front"),this.createHeading(n2_("Preset")).appendTo(this.content);var h=100,d=this.createImageRadio(n).css("height",h).appendTo(this.content),c=d.find("input");d.css("overflow","hidden"),this.createHeading(n2_("Import Sample Sliders")).appendTo(this.content),t('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample1.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample2.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample3.png")+"')\"></div>").on("click",t.proxy(function(){this.hide(),e.showDemoSliders()},this)).appendTo(this.content),r.on("click",t.proxy(function(){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(i,{nextendaction:"create"}),data:{groupID:e.groupID,sliderTitle:o.val(),sliderSizeWidth:a.val(),sliderSizeHeight:l.val(),preset:c.val()},dataType:"json"}).done(t.proxy(function(t){NextendAjaxHelper.startLoading()},this))},this))}}}})}this.createSliderModal.show()},n.prototype.showDemoSliders=function(){var e=this;t("body").css("overflow","hidden");var i=0,n=t('<iframe src="//smartslider3.com/demo-import/?pro='+i+"&version="+N2SS3VERSION+"&utm_campaign="+N2SS3C+"&utm_source=import-slider-frame&utm_medium=smartslider-"+N2PLATFORM+"-"+(i?"pro":"free")+'" frameborder="0"></iframe>').css({position:"fixed",zIndex:1e5,left:0,top:0,width:"100%",height:"100%"}).appendTo("body"),r=function(){t("body").css("overflow",""),n.remove(),window.removeEventListener("message",o,!1),e.notificationStack.popStack()},s=function(t){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(e.ajaxUrl,{nextendaction:"importDemo"}),data:{groupID:e.groupID,key:Base64.encode(t.replace(/^(http(s)?:)?\/\//,"//"))},dataType:"json"}).fail(function(){})},o=function(t){if("http://smartslider3.com"===t.origin||"https://smartslider3.com"===t.origin){var e=t.data;switch(e.key){case"importSlider":return void("function"==typeof nextend.joinCommunity?nextend.joinCommunity(function(){s(e.data.href)}):s(e.data.href));case"closeWindow":r()}}};this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return r(),!0},this)),window.addEventListener("message",o,!1)},n}),N2Require("ManageSliders",[],[],function(t,e,i){function n(i,n,r){this.preventSort=!1,this.groupID=i,this.ajaxUrl=n,this.sliders=[],this.sliderPanel=t("#n2-ss-slider-container"),this.orderBy="ordering"==this.sliderPanel.data("orderby"),this.slidersContainer=this.sliderPanel.find(".n2-ss-sliders-container");for(var s=this.slidersContainer.find(".n2-ss-box-slider"),o=0;o<s.length;o++)this.sliders.push(new e.Slider(this,s.eq(o)));this.changed(),this.initMenu(),this.initOrderable(),this.create=new e.CreateSlider(i,n,r),this.initBulk()}return n.prototype.changed=function(){t("html").attr("data-sliders",this.sliders.length)},n.prototype.initSliders=function(){for(var e=(this.sliders.length,this.slidersContainer.find(".n2-ss-box-slider")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slider");i.push(r)}this.sliders=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidersChanged")},n.prototype.initOrderable=function(){this.orderBy&&this.slidersContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",connectWith:".n2-ss-box-slider-group",items:".n2-ss-box-slider",start:function(t,e){e.item.show()},stop:t.proxy(this.saveOrder,this),placeholder:"n2-box-sortable-placeholder",distance:10})},n.prototype.saveOrder=function(e){if(this.preventSort)return this.slidersContainer.sortable("cancel"),void(this.preventSort=!1);for(var i=this.slidersContainer.find(".n2-ss-box-slider"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slider");n.push(a),r.push(a.getId())}for(var o=0;o<this.sliders.length;o++)s.push(this.sliders[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidersOrderChanged");var l={nextendcontroller:"sliders",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{groupID:this.groupID,sliderorder:r,isReversed:"DESC"==this.sliderPanel.data("orderbydirection")?1:0}}),this.sliders=n}},n.prototype.initMenu=function(){this.slider=null,this.menu=t("#n2-ss-slider-menu").detach().addClass("n2-inited"),this.menuActions={duplicate:this.menu.find(".n2-ss-duplicate").on("click",t.proxy(function(t){this.slider.duplicate(t)},this)),"delete":this.menu.find(".n2-ss-delete").on("click",t.proxy(function(t){this.slider["delete"](t)},this)),preview:this.menu.find(".n2-ss-preview").on("click",t.proxy(function(t){this.slider.preview(t)},this))},this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slider=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.hasClass("n2-active")&&this.menu.removeClass("n2-active").off("mouseleave"),this.menu.detach()},n.prototype.deleteSliders=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slider-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"delete"}),type:"POST",data:{sliders:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSliders(),this.leaveBulk()},this))},this))},n.prototype.duplicateSliders=function(e,i){for(var n=0;n<this.sliders.length;n++)this.sliders[n].selected&&this.sliders[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.exportSliders=function(e,i){window.location.href=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"exportAll"})+"&"+t.param({sliders:e,currentGroupID:this.groupID})},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this));t(".n2-bulk-actions").find("a").on("click",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"duplicate":this.bulkAction("duplicateSliders",!1);break;case"delete":this.bulkAction("deleteSliders",!1);break;case"export":this.bulkAction("exportSliders",!1);break;case"addToGroup":this.bulkAction("addToGroup",!0)}},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.sliders.length;e++)t(this.sliders[e])},n.prototype.bulkAction=function(t,e){var i=[],n=[];this.bulkSelect(function(t){!t.selected||e&&t.isGroup||(i.push(t),n.push(t.getId()))}),n.length?(this[t](n,i),this.leaveBulk()):e?nextend.notificationCenter.notice("Please select one or more sliders for the action!"):nextend.notificationCenter.notice("Please select one or more sliders or groups for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.orderBy&&this.slidersContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.orderBy&&this.slidersContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.sliders.length;e++)this.sliders[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n}),N2Require("Slider",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slider",this).addClass("n2-clickable"),this.isGroup=this.box.hasClass("n2-ss-box-slider-group"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slider",t.proxy(this.goToEdit,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("sliderid")},n.prototype.goToEdit=function(t,e){var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):window.location=i},n.prototype.preview=function(t){t.stopPropagation(),t.preventDefault(),window.open(NextendAjaxHelper.makeFallbackUrl(this.box.data("editurl"),{nextendcontroller:"preview",nextendaction:"index"}),"_blank")},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendcontroller:"slider",nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSliders(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSliders([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n}),N2Require("FormElementAnimationManager",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.managerIdentifier=n,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.show=function(e){e.preventDefault(),nextend[this.managerIdentifier].show(this.element.val(),t.proxy(this.save,this))},n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.save=function(t,e){this.val(e)},n.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},n.prototype.updateName=function(t){t=""==t?n2_("Disabled"):t.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(t)},n}),N2Require("FormElementBackground",["FormElement"],[],function(t,e,i){function n(i,n){this.value="",this.element=t("#"+i),this.$container=this.element.closest(".n2-form-tab"),this.panel=t("#"+i+"-panel"),this.setValue(n),this.options=this.panel.find(".n2-subform-image-option").on("click",t.proxy(this.selectOption,this)),this.active=this.getIndex(this.options.filter(".n2-active").get(0)),this.element.on("change",t.proxy(function(){this.insideChange(this.element.val())},this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.selectOption=function(e){var i=this.getIndex(e.currentTarget);if(i!=this.active){this.options.eq(i).addClass("n2-active"),this.options.eq(this.active).removeClass("n2-active"),this.active=i;var n=t(e.currentTarget).data("value");this.insideChange(n)}},n.prototype.setValue=function(t){this.$container.removeClass("n2-ss-background-type-"+this.value),this.value=t,this.$container.addClass("n2-ss-background-type-"+this.value)},n.prototype.insideChange=function(t){this.setValue(t),this.element.val(t),this.options.removeClass("n2-active"),this.options.filter('[data-value="'+t+'"]').addClass("n2-active"),this.triggerInsideChange()},n.prototype.getIndex=function(e){return t.inArray(e,this.options)},n}),N2Require("FormElementColumns",["FormElement"],[],function(t,e,i){function n(i){this.denominators={1:100,2:100,3:144,4:100,5:100,6:144},this.element=t("#"+i),e.FormElement.prototype.constructor.apply(this,arguments),this.$c=t("#"+i).parent(),this.$container=this.$c.find(".n2-ss-columns-element-container"),this.containerWidth=284,this.maxWidth=0,this.$container.sortable({axis:"x",tolerance:"pointer",items:".n2-ss-columns-element-column",helper:"clone",start:t.proxy(function(t,e){this.$container.addClass("n2-sortable-currently-sorted"),e.placeholder.css("width",e.item.width());var i=this.$container.find(".n2-ss-columns-element-column");e.item.data("index",i.index(e.item))},this),stop:t.proxy(function(t,e){var i=this.$container.find(".n2-ss-columns-element-column"),n=e.item.data("index"),r=i.index(e.item);n!=r&&(this.currentRow.moveCol(n,r),e.item.data("index",null)),this.makeResizable(),this.$container.removeClass("n2-sortable-currently-sorted")},this)}),this.$c.find(".n2-ss-columns-element-add-col").on({click:t.proxy(function(){this.currentRow.createCol()},this)})}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.getDenominator=function(t){return this.denominators[t]===i&&(this.denominators[t]=15*t),this.denominators[t]},n.prototype.setRow=function(t){this.currentRow=t,this.insideChange(t.getColumnsOrdered())},n.prototype.setValue=function(t){},n.prototype.insideChange=function(t){this.start(t)},n.prototype.activateColumn=function(t){var e=this.$container.find(".n2-ss-columns-element-column").index(t.currentTarget);this.currentRow.activateColumn(e,t)},n.prototype.start=function(e){this.percentages=[];for(var i=e.split("+"),n=0;n<i.length;n++)this.percentages.push(new Fraction(i[n]));this.refreshMaxWidth(),this.$container.empty();for(var n=0;n<this.percentages.length;n++)this.updateColumn(t('<div class="n2-ss-columns-element-column">').on("click",t.proxy(this.activateColumn,this)).appendTo(this.$container),this.percentages[n]);this.makeResizable()},n.prototype.refreshMaxWidth=function(){this.maxWidth=this.containerWidth-15*(this.percentages.length-1)},n.prototype.updateColumn=function(t,e){t.css("width",this.maxWidth*e.valueOf()+"px").html(Math.round(100*e.valueOf()*10)/10+"%")},n.prototype.makeResizable=function(){this.handles&&this.handles.remove(),this.$columns=this.$container.find(".n2-ss-columns-element-column"),t('<div class="n2-ss-columns-element-handle"><div class="n2-i n2-i-more"></div></div>').insertAfter(this.$columns.not(this.$columns.last())),this.handles=this.$container.find(".n2-ss-columns-element-handle").on("mousedown",t.proxy(this._resizeStart,this))},n.prototype._resizeStart=function(e){var i=this.handles.index(e.currentTarget),n=this.$container.offset().left+8;this.resizeContext={index:i,cLeft:n,$currentCol:this.$columns.eq(i),$nextCol:this.$columns.eq(i+1),startX:Math.max(0,Math.min(e.clientX-n,this.containerWidth))},this._resizeMove(e),t("html").off(".resizecol").on({"mousemove.resizecol":t.proxy(this._resizeMove,this),"mouseup.resizecol mouseleave.resizecol":t.proxy(this._resizeStop,this)})},n.prototype._resizeMove=function(e){e.preventDefault();var i=Math.max(0,Math.min(e.clientX-this.resizeContext.cLeft,this.containerWidth)),n=this.getDenominator(this.percentages.length),r=new Fraction(Math.round((i-this.resizeContext.startX)/(this.maxWidth/n)),n);r.compare(this.percentages[this.resizeContext.index].clone().mul(-1))<0&&(r=this.percentages[this.resizeContext.index].clone().mul(-1)),r.compare(this.percentages[this.resizeContext.index+1])>0&&(r=this.percentages[this.resizeContext.index+1].clone());var s=this.percentages[this.resizeContext.index].add(r),o=this.percentages[this.resizeContext.index+1].sub(r);this.updateColumn(this.resizeContext.$currentCol,s),this.updateColumn(this.resizeContext.$nextCol,o);var a=t.extend([],this.percentages);return a[this.resizeContext.index]=s,a[this.resizeContext.index+1]=o,this.onColumnWidthChange(a),[s,o]},n.prototype._resizeStop=function(e){var i=this._resizeMove(e);this.percentages[this.resizeContext.index]=i[0],this.percentages[this.resizeContext.index+1]=i[1],t("html").off(".resizecol"),delete this.resizeContext,this.currentRow.setRealColsWidth(this.percentages)},n.prototype.onColumnWidthChange=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].valueOf());this.currentRow.updateColumnWidth(e)},n}),function(t){"use strict";function e(t,e){return isNaN(t=parseInt(t,10))&&i(),t*e}function i(){throw"Invalid Param"}function n(t,e){return this instanceof n?(o(t,e),t=n.REDUCE?d(s.d,s.n):1,this.s=s.s,this.n=s.n/t,void(this.d=s.d/t)):new n(t,e)}var r=2e3,s={s:1,n:0,d:1},o=function(t,n){var r,o=0,a=1,l=1,h=0,d=0,c=0,p=1,u=1,y=0,g=1,f=1,v=1,m=1e7;if(void 0===t||null===t);else if(void 0!==n)o=t,a=n,l=o*a;else switch(typeof t){case"object":"d"in t&&"n"in t?(o=t.n,a=t.d,"s"in t&&(o*=t.s)):0 in t?(o=t[0],1 in t&&(a=t[1])):i(),l=o*a;break;case"number":if(0>t&&(l=t,t=-t),t%1===0)o=t;else if(t>0){for(t>=1&&(u=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)),t/=u);m>=g&&m>=v;){if(r=(y+f)/(g+v),t===r){m>=g+v?(o=y+f,a=g+v):v>g?(o=f,a=v):(o=y,a=g);break}t>r?(y+=f,g+=v):(f+=y,v+=g),g>m?(o=f,a=v):(o=y,a=g)}o*=u}else(isNaN(t)||isNaN(n))&&(a=o=NaN);break;case"string":if(g=t.match(/\d+|./g),"-"===g[y]?(l=-1,y++):"+"===g[y]&&y++,g.length===y+1?d=e(g[y++],l):"."===g[y+1]||"."===g[y]?("."!==g[y]&&(h=e(g[y++],l)),y++,(y+1===g.length||"("===g[y+1]&&")"===g[y+3]||"'"===g[y+1]&&"'"===g[y+3])&&(d=e(g[y],l),p=Math.pow(10,g[y].length),y++),("("===g[y]&&")"===g[y+2]||"'"===g[y]&&"'"===g[y+2])&&(c=e(g[y+1],l),u=Math.pow(10,g[y+1].length)-1,y+=3)):"/"===g[y+1]||":"===g[y+1]?(d=e(g[y],l),p=e(g[y+2],1),y+=3):"/"===g[y+3]&&" "===g[y+1]&&(h=e(g[y],l),d=e(g[y+2],l),p=e(g[y+4],1),y+=5),g.length<=y){a=p*u,l=o=c+a*h+u*d;break}default:i()}if(0===a)throw"DIV/0";s.s=0>l?-1:1,s.n=Math.abs(o),s.d=Math.abs(a)},a=function(t,e,i){for(var n=1;e>0;t=t*t%i,e>>=1)1&e&&(n=n*t%i);return n},l=function(t,e){for(;e%2===0;e/=2);for(;e%5===0;e/=5);if(1===e)return 0;for(var i=10%e,n=1;1!==i;n++)if(i=10*i%e,n>r)return 0;return n},h=function(t,e,i){for(var n=1,r=a(10,i,e),s=0;300>s;s++){if(n===r)return s;n=10*n%e,r=10*r%e}return 0},d=function(t,e){if(!t)return e;if(!e)return t;for(;;){if(t%=e,!t)return e;if(e%=t,!e)return t}};n.REDUCE=1,n.prototype={s:1,n:0,d:1,abs:function(){return new n(this.n,this.d)},neg:function(){return new n(-this.s*this.n,this.d)},add:function(t,e){return o(t,e),new n(this.s*this.n*s.d+s.s*this.d*s.n,this.d*s.d)},sub:function(t,e){return o(t,e),new n(this.s*this.n*s.d-s.s*this.d*s.n,this.d*s.d)},mul:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.n,this.d*s.d)},div:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.d,this.d*s.n)},clone:function(){return new n(this)},mod:function(t,e){return isNaN(this.n)||isNaN(this.d)?new n(NaN):void 0===t?new n(this.s*this.n%this.d,1):(o(t,e),0===s.n&&0===this.d&&n(0,0),new n(this.s*s.d*this.n%(s.n*this.d),s.d*this.d))},gcd:function(t,e){return o(t,e),new n(d(s.n,this.n),s.d*this.d/d(s.d,this.d))},lcm:function(t,e){return o(t,e),0===s.n&&0===this.n?new n:new n(s.n*this.n/d(s.n,this.n),d(s.d,this.d))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.floor(t*this.s*this.n/this.d),t)},round:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.round(t*this.s*this.n/this.d),t)},inverse:function(){return new n(this.s*this.d,this.n)},pow:function(t){return 0>t?new n(Math.pow(this.s*this.d,-t),Math.pow(this.n,-t)):new n(Math.pow(this.s*this.n,t),Math.pow(this.d,t))},equals:function(t,e){return o(t,e),this.s*this.n*s.d===s.s*s.n*this.d},compare:function(t,e){o(t,e);var i=this.s*this.n*s.d-s.s*s.n*this.d;return(i>0)-(0>i)},divisible:function(t,e){return o(t,e),!(!(s.n*this.d)||this.n*s.d%(s.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,i+=" ",n%=r),i+=n,i+="/",i+=r),i},toLatex:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,n%=r),i+="\\frac{",i+=n,i+="}{",i+=r,i+="}"),i},toContinued:function(){var t,e=this.n,i=this.d,n=[];do n.push(Math.floor(e/i)),t=e%i,e=i,i=t;while(1!==e);return n},toString:function(){var t,e=this.n,i=this.d;if(isNaN(e)||isNaN(i))return"NaN";n.REDUCE||(t=d(e,i),e/=t,i/=t);for(var r=String(e).split(""),s=0,o=[~this.s?"":"-","",""],a="",c=l(e,i),p=h(e,i,c),u=-1,y=1,g=15+c+p+r.length,f=0;g>f;f++,s*=10){if(f<r.length?s+=Number(r[f]):(y=2,u++),c>0)if(u===p)o[y]+=a+"(",a="";else if(u===c+p){o[y]+=a+")";break}s>=i?(o[y]+=a+(s/i|0),a="",s%=i):y>1?a+="0":o[y]&&(o[y]+="0")}return o[0]+=o[1]||"0",o[2]?o[0]+"."+o[2]:o[0]}},t.Fraction=n}(this),N2Require("FormElementSliderType",[],[],function(t,e,i){function n(e){this.element=t("#"+e),this.setAttribute(),this.element.on("nextendChange",t.proxy(this.setAttribute,this))}return n.prototype.setAttribute=function(){t("#n2-admin").attr("data-slider-type",this.element.val()),"block"==this.element.val()&&t(".n2-fm-shadow").trigger("click")},n}),N2Require("FormElementSliderWidgetArea",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i),this.area=t("#"+i+"_area"),this.areas=this.area.find(".n2-area"),this.areas.on("click",t.proxy(this.chooseArea,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.chooseArea=function(e){var i=parseInt(t(e.target).data("area"));this.element.val(i),this.setSelected(i),this.triggerOutsideChange()},n.prototype.insideChange=function(t){t=parseInt(t),this.element.val(t),this.setSelected(t),this.triggerInsideChange()},n.prototype.setSelected=function(t){this.areas.removeClass("n2-active"),this.areas.eq(t-1).addClass("n2-active")},n}),N2Require("FormElementWidgetPosition",[],[],function(t,e,i){function n(e){this.element=t("#"+e+"-mode"),this.container=this.element.closest(".n2-form-element-mixed"),this.tabs=this.container.find("> .n2-mixed-group"),this.element.on("nextendChange",t.proxy(this.onChange,this)),this.onChange()}return n.prototype.onChange=function(){var t=this.element.val();"advanced"==t?(this.tabs.eq(2).css("display",""),this.tabs.eq(1).css("display","none")):(this.tabs.eq(1).css("display",""),
2
  this.tabs.eq(2).css("display","none"))},n}),N2Require("SmartSliderGeneratorRecords",[],[],function(t,e,i){function n(e){this.ajaxUrl=e,t("#generatorrecord-viewer").on("click",t.proxy(this.showRecords,this))}return n.prototype.showRecords=function(e){e.preventDefault(),NextendAjaxHelper.ajax({type:"POST",url:this.ajaxUrl,data:t("#smartslider-form").serialize(),dataType:"json"}).done(function(t){var e=new NextendModal({zero:{size:[1300,700],title:"Records",content:t.data.html}},!0);e.content.css("overflow","auto")}).error(function(t){if(200==t.status){var e=new NextendModal({zero:{size:[1300,700],title:"Response",content:t.responseText}},!0);e.content.css("overflow","auto")}})},n}),N2Require("QuickSlides",[],[],function(t,e,i){function n(e){var i=t("#n2-quick-slides-edit");i.length<1||(this.ajaxUrl=e,i.on("click",t.proxy(this.openEdit,this)))}return n.prototype.openEdit=function(e){e.preventDefault();var i=t("#n2-ss-slides .n2-box-slide"),n=this;this.modal=new NextendModal({zero:{fit:!0,fitX:!1,overflow:"auto",size:[1200,700],title:n2_("Quick Edit - Slides"),back:!1,close:!0,content:'<form class="n2-form"><table></table></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Save")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button-green"),r=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}),s=r.find("table");i.each(t.proxy(function(e,i){var r=t(i),o=t("<tr />").appendTo(s),a=r.data("slideid");o.append(t("<td />").append('<img src="'+r.data("image")+'" style="width:100px;"/>')),o.append(t("<td />").append(n.createInput("Name","title-"+a,r.data("title"),"width: 240px;"))),o.append(t("<td />").append(n.createTextarea("Description","description-"+a,r.data("description"),"width: 330px;height:24px;")));var l=r.data("link").split("|*|");o.append(t("<td />").append(n.createLink("Link","link-"+a,l[0],"width: 180px;"))),o.append(t("<td />").append(n.createTarget("Target","target-"+a,l.length>1?l[1]:"_self",""))),new N2Classes.FormElementUrl("link-"+a,nextend.NextendElementUrlParams)},this)),e.on("click",t.proxy(function(e){var r={};i.each(t.proxy(function(e,i){var n=t(i),s=n.data("slideid"),o=t("#title-"+s).val(),a=t("#description-"+s).val(),l=t("#link-"+s).val()+"|*|"+t("#target-"+s).val();o==n.data("title")&&a==n.data("description")&&l==n.data("link")||(r[s]={name:o,description:a,link:l})},this)),jQuery.isEmptyObject(r)?this.hide(e):(this.hide(e),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(n.ajaxUrl),data:{changed:Base64.encode(JSON.stringify(r))},dataType:"json"}).done(t.proxy(function(e){var i=e.data;for(var n in i){var r=t('.n2-box-slide[data-slideid="'+n+'"]');r.find(".n2-box-placeholder a.n2-h4").html(i[n].title),r.attr("data-title",i[n].rawTitle),r.data("title",i[n].rawTitle),r.attr("data-description",i[n].rawDescription),r.data("description",i[n].rawDescription),r.attr("data-link",i[n].rawLink),r.data("link",i[n].rawLink)}},this)))},this))}}}}),this.modal.setCustomClass("n2-ss-quick-slides-edit-modal"),this.modal.show()},n.prototype.createInput=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTextarea=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+i+'" class="n2-h5" autocomplete="off" style="resize:y;'+r+'"></textarea></div></div></div></div>');return s.find("textarea").val(n),s},n.prototype.createLink=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="'+i+'_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTarget=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="'+i+'" autocomplete="off" style="'+r+'"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');return s.find("select").val(n),s},n}),N2Require("Slide",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slide",this).addClass("n2-clickable"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slide",t.proxy(this.goToEdit,this)),this.publishElement=this.box.find(".n2-slide-published").on("click",t.proxy(this.switchPublished,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("slideid")},n.prototype.setFirst=function(e){e.stopPropagation(),e.preventDefault(),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl,{nextendaction:"first"}),type:"POST",data:{id:this.getId()}}).done(t.proxy(function(){this.manager.unsetFirst(),this.box.addClass("n2-slide-state-first")},this))},n.prototype.unsetFirst=function(){this.box.removeClass("n2-slide-state-first")},n.prototype.switchPublished=function(t){t.stopPropagation(),t.preventDefault(),this.isPublished()?this.manager.unPublishSlides([this.getId()],[this]):this.manager.publishSlides([this.getId()],[this])},n.prototype.isPublished=function(){return this.box.hasClass("n2-slide-state-published")},n.prototype.published=function(){this.box.addClass("n2-slide-state-published")},n.prototype.unPublished=function(){this.box.removeClass("n2-slide-state-published")},n.prototype.goToEdit=function(t,e){if(this.manager.isBulkSelection)this.invertSelection(),t.preventDefault();else{var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):i==location.href?n2("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible"):window.location=i}},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSlides(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSlides([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n.prototype.publish=function(t){this.switchPublished(t)},n.prototype.unpublish=function(t){this.switchPublished(t)},n.prototype.generator=function(t){window.location=this.box.data("generator")},n.prototype.copy=function(e){this.manager.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"copy",targetSliderID:t})})},this))},n}),N2Require("SlidesManager",[],[],function(t,e,i){function n(i,n,r,s,o,a){this.quickPostModal=null,this.quickVideoModal=null,this.parameters=r,this.slides=[],this.ajaxUrl=i,this.contentAjaxUrl=n,this.slidesPanel=t("#n2-ss-slides-container"),this.slidesContainer=this.slidesPanel.find(".n2-ss-slides-container"),this.initMenu(),this.initSlidesOrderable();for(var l=this.slidesContainer.find(".n2-box-slide"),h=0;h<l.length;h++)this.slides.push(new e.Slide(this,l.eq(h)));if(t("html").attr("data-slides",this.slides.length),t(".n2-add-quick-image, .n2-box-slide-dummy").on("click",t.proxy(this.addQuickImage,this)),t(".n2-add-quick-video").on("click",t.proxy(this.addQuickVideo,this)),t(".n2-add-quick-post").on("click",t.proxy(this.addQuickPost,this)),this.initBulk(),!s){var d=[];this.slidesContainer.fileupload({url:o,pasteZone:!1,dataType:"json",paramName:"image",dropZone:t("undefined"==typeof nextend.smartSlider?document:".n2-ss-slides-outer-container"),add:t.proxy(function(t,e){e.formData={path:"/"+a},e.submit()},this),done:t.proxy(function(t,e){var i=e.result;i.data&&i.data.name?d.push({title:i.data.name,description:"",image:i.data.url}):NextendAjaxHelper.notification(i)},this),fail:t.proxy(function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},this),start:function(){NextendAjaxHelper.startLoading()},stop:t.proxy(function(){d.length?this._addQuickImages(d):setTimeout(function(){NextendAjaxHelper.stopLoading()},100),d=[]},this)});var c=null;this.slidesContainer.on("dragover",t.proxy(function(e){null!==c?(clearTimeout(c),c=null):this.slidesContainer.addClass("n2-drag-over"),c=setTimeout(t.proxy(function(){this.slidesContainer.removeClass("n2-drag-over"),c=null},this),400)},this))}}return n.prototype.changed=function(){},n.prototype.initSlidesOrderable=function(){this.slidesContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",items:".n2-box-slide",start:function(t,e){e.item.show()},stop:t.proxy(this.saveSlideOrder,this),placeholder:"n2-box-sortable-placeholder n2-box-sortable-placeholder-small",distance:10})},n.prototype.saveSlideOrder=function(e){for(var i=this.slidesContainer.find(".n2-box-slide"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slide");n.push(a),r.push(a.getId())}for(var o=0;o<this.slides.length;o++)s.push(this.slides[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidesOrderChanged");var l={nextendcontroller:"slides",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{slideorder:r}}),this.slides=n,this.changed()}},n.prototype.initSlides=function(){for(var e=(this.slides.length,this.slidesContainer.find(".n2-box-slide")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slide");i.push(r)}this.slides=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidesChanged"),t("html").attr("data-slides",this.slides.length)},n.prototype.unsetFirst=function(){for(var t=0;t<this.slides.length;t++)this.slides[t].unsetFirst();this.changed()},n.prototype.addQuickImage=function(e){e.preventDefault(),nextend.imageHelper.openMultipleLightbox(t.proxy(this._addQuickImages,this))},n.prototype.addBoxes=function(i){i.insertBefore(this.slidesContainer.find(".n2-clear")),i.addClass("n2-ss-box-just-added").each(t.proxy(function(i,n){new e.Slide(this,t(n))},this)),this.initSlides(),setTimeout(function(){i.removeClass("n2-ss-box-just-added")},200)},n.prototype._addQuickImages=function(e){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickImages"}),data:{images:Base64.encode(JSON.stringify(e))}}).done(t.proxy(function(e){this.addBoxes(t(e.data))},this))},n.prototype.addQuickVideo=function(e){e.preventDefault();var i=this;this.quickVideoModal||(this.quickVideoModal=new NextendModal({zero:{size:[500,350],title:n2_("Add video"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Add video")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),n=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createInput(n2_("Video url"),"n2-slide-video-url","width: 446px;")),this.content.find("#n2-slide-video-url").focus());this.content.append(this.createHeading(n2_("Examples"))),this.content.append(this.createTable([["YouTube","https://www.youtube.com/watch?v=lsq09izc1H4"],["Vimeo","https://vimeo.com/144598279"]],["",""])),e.on("click",t.proxy(t.proxy(function(e){e.preventDefault();var r=n.val(),s=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,o=r.match(s),a=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,l=r.match(a),h=r.match(/\.(mp4)/i);o?NextendAjaxHelper.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+encodeURI(o[2])+"&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM").done(t.proxy(function(t){if(t.items.length){var e=t.items[0].snippet,n=t.items[0].snippet.thumbnails,s=n.maxres||n.standard||n.high||n.medium||n["default"];i._addQuickVideo(this,{type:"youtube",title:e.title,description:e.description,image:s.url,video:r})}},this)).fail(function(t){nextend.notificationCenter.error(t.error.errors[0].message)}):l?NextendAjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+l[3]+".json").done(t.proxy(function(t){i._addQuickVideo(this,{type:"vimeo",title:t[0].title,description:t[0].description,video:l[3],image:t[0].thumbnail_large})},this)).fail(function(t){nextend.notificationCenter.error(t.responseText)}):h?nextend.notificationCenter.error("This video url is not supported!"):nextend.notificationCenter.error("This video url is not supported!")},this)))}}}})),this.quickVideoModal.show()},n.prototype._addQuickVideo=function(e,i){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickVideo"}),data:{video:Base64.encode(encodeURIComponent(JSON.stringify(i)))}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.addQuickPost=function(e){if(e.preventDefault(),!this.quickPostModal){var i=this,n={},r=t.proxy(function(t){return"undefined"==typeof n[t]&&(n[t]=NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),data:{keyword:t},dataType:"json"})),n[t]},this);this.quickPostModal=new NextendModal({zero:{size:[600,430],title:n2_("Add post"),back:!1,close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-ss-keyword","width:546px;"));var e=t("#n2-ss-keyword"),n=this.createHeading("").appendTo(this.content),s=this.createResult().appendTo(this.content),o="";e.on("keyup",t.proxy(function(){o=e.val(),r(o).done(t.proxy(function(r){if(e.val()==o){""==o?n.html(n2_("No search term specified. Showing recent items.")):n.html(n2_printf(n2_('Showing items match for "%s"'),o));for(var a=r.data,l=[],h=this,d=0;d<a.length;d++)l.push([a[d].title,a[d].info,t('<div class="n2-button n2-button-normal n2-button-xs n2-button-green n2-radius-s n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{post:a[d]},function(t){i._addQuickPost(h,t.data.post)})]);s.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(s))}},this))},this)).trigger("keyup").focus()}}}})}this.quickPostModal.show()},n.prototype._addQuickPost=function(e,i){i.image||(i.image=""),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickPost"}),data:{post:i}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this)),e.eq(2).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.select():t.deSelect()})},this)),e.eq(3).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.deSelect():t.select()})},this)),t(".n2-bulk-actions a").on("click",t.proxy(function(e){var i=t(e.currentTarget).data("action");i&&(e.preventDefault(),this.bulkAction(i))},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.slides.length;e++)t(this.slides[e])},n.prototype.bulkAction=function(t){var e=[],i=[];this.bulkSelect(function(t){t.selected&&(e.push(t),i.push(t.getId()))}),i.length?this[t](i,e):nextend.notificationCenter.notice("Please select one or more slides for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.slidesContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.slidesContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.slides.length;e++)this.slides[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n.prototype.deleteSlides=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slide-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"delete"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSlides(),this.leaveBulk()},this))},this))},n.prototype.duplicateSlides=function(e,i){for(var n=0;n<this.slides.length;n++)this.slides[n].selected&&this.slides[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.copySlides=function(e,i){this.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"copySlides",targetSliderID:t}),type:"POST",data:{slides:e}})},this))},n.prototype.publishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"publish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].published();this.changed()},this))},n.prototype.unPublishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"unpublish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].unPublished();this.changed()},this))},n.prototype.initMenu=function(){this.slide=null,this.menu=t("#n2-ss-slide-menu").detach().addClass("n2-inited"),this.menu.find("li").on("click",t.proxy(function(e){e.stopPropagation();var i=t(e.currentTarget).data("action");i&&"function"==typeof this.slide[i]&&this.slide[i](e)},this)),this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slide=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.detach()},n.prototype.showSliderSelector=function(e,i){var n=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"choose"});this.sliderSelectorModal=new NextendModal({zero:{size:[970,600],title:e,back:!1,close:!0,content:"",fn:{show:function(){var e=t('<iframe src="'+n+'" width="970" height="540" style="margin: 0 -20px 0 -20px;"></iframe>').appendTo(this.content),r=window.addEventListener?"addEventListener":"attachEvent";window[r]("attachEvent"==r?"onmessage":"message",t.proxy(function(t){if(t.source==(e[0].contentWindow||e[0].contentDocument)){var n=t[t.message?"message":"data"];i(n),this.hide()}},this),!1)},destroy:function(){this.destroy()}}}},!0)},n}),N2Require("SlideAdmin",[],[],function(t,e,i){function n(){this.layerAnimationManager=null,this.slideEditManager=null,this.frontend=null,this.generator=null,this.canvasManager=null,this.history=null,this.$currentSlideElement=null}return n.prototype.startEditor=function(t,i,n){return null===this.slideEditManager&&(this.slideEditManager=new e.SlideEditManager(t,i,n)),this.slideEditManager},window.nextend.pre="div#n2-ss-0 ",window.nextend.smartSlider=new n,n}),N2Require("SmartSliderBackgroundImageAdmin",["SmartSliderBackgroundImage"],[],function(t,e,i){function n(t,i,n){this.allowVisualLoad=!0,this.hash=i.data("hash"),e.SmartSliderBackgroundImage.prototype.constructor.call(this,t,i,n),this.loadAllowed=!0,this.listenImageManager()}return n.prototype=Object.create(e.SmartSliderBackgroundImage.prototype),n.prototype.constructor=n,n.prototype.startColorMode=function(){this.$background=t('<div class="n2-ss-background-image"/>').appendTo(this.$mask),this.loadDeferred.resolve()},n.prototype.setVisualLoad=function(t){this.allowVisualLoad=t},n.prototype.listenImageManager=function(){""!=this.hash&&t(window).on(this.hash,t.proxy(this.onImageManagerChanged,this))},n.prototype.notListenImageManager=function(){""!=this.hash&&t(window).off(this.hash,null,t.proxy(this.onImageManagerChanged,this))},n.prototype.onImageManagerChanged=function(t,e){this.tabletSrc=e.tablet.image,this.mobileSrc=e.mobile.image,this.updateBackgroundToDevice(this.manager.device)},n.prototype.setDesktopSrc=function(e){if(this.notListenImageManager(),this.desktopSrc=e,this.hash=md5(e),""!=e&&this.allowVisualLoad){var i=new Image;i.addEventListener("load",t.proxy(function(){t.when(nextend.imageManager.getVisual(e)).done(t.proxy(function(t){this.onImageManagerChanged(null,t.value),this.listenImageManager()},this))},this),!1),i.src=nextend.imageHelper.fixed(e)}else this.tabletSrc="",this.mobileSrc="",this.setSrc(nextend.imageHelper.fixed(e))},n.prototype.setSrc=function(t){e.SmartSliderBackgroundImage.prototype.setSrc.call(this,nextend.imageHelper.fixed(t))},n.prototype.startFixed=function(){},n.prototype.setMode=function(t){"default"==t&&(t=nextend.smartSlider.slideBackgroundMode),this.element.attr("data-mode",t),this.mode=t},n.prototype.setFocus=function(t,e){this.$background.css("background-position",t+"% "+e+"%")},n.prototype.setOpacity=function(t){this.opacity=t,this.$background.css("opacity",t)},n.prototype.setBlur=function(t){window.n2FilterProperty&&(t>0?this.$background.css({margin:"-"+2*t+"px",padding:2*t+"px"}).css(window.n2FilterProperty,"blur("+t+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),this.blur=t},n}),N2Require("SlideEditManager",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,n){this.readyDeferred=t.Deferred(),this.options=t.extend({slideAsFile:0,isUploadDisabled:!0,uploadUrl:"",uploadDir:"",isAddSample:!1},n),this.warnInternetExplorerUsers(),this.$slideContentElement=t("#"+i),this.slideStartValue=this.$slideContentElement.val(),window[e].visible(t.proxy(this.sliderStarted,this))}return r.prototype.startSampleSlides=function(){var e="https://smartslider3.com/slides/"+window.N2SS3VERSION+"/free/",i=this,r=window.addEventListener?"addEventListener":"attachEvent",s=t('<iframe src="'+e+'"></iframe>').prependTo(".n2-ss-sample-slides-container"),o=s[0];t("html, body").scrollTop(s.offset().top-t("#wpadminbar").height());var a=t(".n2-ss-sample-slide-settings"),l=t("#slidebackgroundImage"),h=t("#n2-ss-sample-slide-setting-background-image").on("click",function(){l.parent().find(".n2-form-element-button").trigger("click")}),d=function(){var e=l.val();""===e?(a.removeClass("n2-ss-has-image"),h.css("background-image","url(//nextenddev.no-ip.org/roland/wordpress1/wp-content/plugins/nextend-smart-slider3-pro/nextend/media/images/placeholder/image.png)"),t("#slidebackground-type").val("color").trigger("change")):(a.addClass("n2-ss-has-image"),t("#slidebackground-type").val("image").trigger("change"),h.css("background-image","url("+nextend.imageHelper.fixed(e)+")"))};h.find(".n2-i-close").on("click",function(t){t.stopPropagation(),l.parent().find(".n2-form-element-clear").trigger("click")}),l.on("nextendChange",d),d();var c=t("#slidebackgroundImageOpacity"),p=t("#n2-ss-sample-slide-setting-opacity-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:100,step:1,slide:function(t,e){c.data("field").insideChange(e.value)}}),u=function(t){p.slider("value",c.val())};c.on("nextendChange",u),u();var y=t("#slidebackgroundImageBlur"),g=t("#n2-ss-sample-slide-setting-blur-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:40,step:1,slide:function(t,e){y.data("field").insideChange(e.value)}}),f=function(t){g.slider("value",y.val())};y.on("nextendChange",f),f();var v=t("#slidebackgroundColor"),m=t("#n2-ss-sample-slide-setting-color").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=m.n2spectrum("get").toHexString8();m.val(t),v.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),b=function(t){var e=v.val();e!=m.val()&&m.n2spectrum("set",e)};v.on("nextendChange",b),b();var x=t("#slidebackgroundGradient"),C=function(){"off"==x.val()?a.removeClass("n2-ss-has-gradient"):a.addClass("n2-ss-has-gradient")};x.on("nextendChange",C),C();var S=t("#slidebackgroundColorEnd"),w=t("#n2-ss-sample-slide-setting-gradient").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=w.n2spectrum("get").toHexString8();S.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),k=function(t){w.n2spectrum("set",S.val())};S.on("outsideChange",k),k(),window[r]("attachEvent"==r?"onmessage":"message",function(t){if(t.source==(o.contentWindow||o.contentDocument)){var e=t[t.message?"message":"data"];if(e.key)switch(e.key){case"sampleSlide":var r=JSON.parse(e.data);i.settings.setData(r.data,!0),i.canvasManager.mainContainer.replaceLayers(r.layers),"content"!=i.canvasManager.currentEditorMode&&i.canvasManager.mainContent!=n&&i.canvasManager.updateEditorMode("content");break;case"ready":(o.contentWindow||o.contentDocument).postMessage({key:"ackReady"},"*"),i.options.isAddSample&&((o.contentWindow||o.contentDocument).postMessage({key:"create"},"*"),i.options.isAddSample=!1)}}},!1)},r.prototype.sliderStarted=function(){i.history=new e.History,i.frontend=window["n2-ss-0"],i.frontend.visible(function(){t("body").addClass("n2-ss-slider-visible");var e=t("#n2-ss-slide-canvas-container"),i=e.tinyscrollbar({axis:"x",wheel:!1,wheelLock:!1}).data("plugin_tinyscrollbar");"function"==typeof e.get(0).move&&(e.get(0).move=null),this.sliderElement.on("SliderResize",function(){i.update("relative")})}),i.$currentSlideElement=i.frontend.sliderElement.find(".n2-ss-currently-edited-slide");var n=i.$currentSlideElement.hasClass("n2-ss-static-slide");new e.Generator,this.settings=new e.SlideSettings(n),this.canvasManager=new e.CanvasManager(this,n,this.options),this.readyDeferred.resolve(),t("#smartslider-form").on({checkChanged:t.proxy(this.prepareFormForCheck,this),submit:t.proxy(this.onSlideSubmit,this)}),this.options.isAddSample&&this.startSampleSlides()},r.prototype.ready=function(t){this.readyDeferred.done(t)},r.prototype.prepareFormForCheck=function(){var t=JSON.stringify(this.canvasManager.getData()),e=JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));this.$slideContentElement.val(e==t?this.slideStartValue:Base64.encode(t))},r.prototype.onSlideSubmit=function(e){if(!nextend.isPreview)if(this.prepareForm(),e.preventDefault(),nextend.askToSave=!1,this.options.slideAsFile&&typeof window.FormData!==n&&"undefined"!=typeof window.File){var i=new FormData,r=t("#smartslider-form").serializeArray();t.each(r,function(t,e){if("slide[slide]"==e.name)try{i.append("slide",new Blob([e.value]),"slide.txt")}catch(n){try{i.append("slide",new Blob([e.value]))}catch(n){try{i.append("slide",new File([e.value],"slide.txt"))}catch(n){nextend.notificationCenter.notice('Your browser does not support File api, please disable "Send slide as file" option in the global settings.')}}}else i.append(e.name,e.value)}),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(window.location.href),type:"POST",data:i,contentType:!1,processData:!1}).done(t.proxy(this.afterSave,this))}else NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.location.href),data:t("#smartslider-form").serialize(),dataType:"json"}).done(t.proxy(this.afterSave,this))},r.prototype.afterSave=function(){nextend.askToSave=!0,t("#smartslider-form").trigger("saved"),t(".n2-ss-edit-slide-top-details .n2-h1").html(t("#slidetitle").val())},r.prototype.prepareForm=function(){i.ruler&&t("#slideguides").val(Base64.encode(JSON.stringify(i.ruler.toArray()))),this.$slideContentElement.val(Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.canvasManager.getData()))))},r.prototype.warnInternetExplorerUsers=function(){var t=this.isInternetExplorer();t&&10>t&&alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser)},r.prototype.isInternetExplorer=function(){var t=navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):!1},r.prototype.getLayout=function(){for(var e=t("#smartslider-form").serializeArray(),i={},n=0;n<e.length;n++){var r=e[n].name.match(/slide\[(.*?)\]/);r&&(i[r[1]]=e[n].value)}return delete i.generator,delete i.published,delete i.publishdates,delete i["record-start"],delete i["record-slides"],delete i.slide,i.slide=this.canvasManager.getData(),i},r.prototype.loadLayout=function(e,i,n){var r=e.slide;if(delete e.slide,n?this.canvasManager.importLayers(r,!0):this.canvasManager.importLayers(r,!1),i)for(var s in e)t("#slide"+s).val(e[s]).trigger("change");e.slide=r},r.prototype.getSelf=function(){return this},r.prototype.copySlide=function(){var e={data:this.settings.getBackgroundData(),layers:this.canvasManager.getData()};t.jStorage.set("copiedSlide",JSON.stringify(e))},r.prototype.pasteSlide=function(){var e=t.jStorage.get("copiedSlide");e&&(e=JSON.parse(e),this.settings.setData(e.data),this.canvasManager.mainContainer.replaceLayers(e.layers))},r.prototype.hasCopiedSlide=function(){var e=t.jStorage.get("copiedSlide");return!!e},r}),N2Require("Generator",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(){this._refreshTimeout=null,this.modal=!1,this.group=0,i.generator=this;var e=i.$currentSlideElement.data("variables");if(e){this.variables=e;for(var n in this.variables)!isNaN(parseFloat(n))&&isFinite(n)&&(this.group=Math.max(this.group,parseInt(n)+1));this.fill=this.generatorFill,this.group>0&&(this.registerField=this.generatorRegisterField,
3
- this.button=t('<a href="#" class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-blue n2-h5 n2-uc" style="position:absolute;right: -2px;top: -18px;">Variable</a>').on("click",t.proxy(function(t){t.preventDefault(),this.showModal()},this)),this.registerField(t("#slidetitle")),this.registerField(t("#slidedescription")),this.registerField(t("#slidethumbnail")),this.registerField(t("#slidebackgroundImage")),this.registerField(t("#slidebackgroundAlt")),this.registerField(t("#slidebackgroundTitle")),this.registerField(t("#slidebackgroundVideoMp4")),this.registerField(t("#linkslidelink_0")),this.registerField(t("#layergenerator-visible")),this.registerField(t("#layergroup-generator-visible")),t("body").addClass("n2-ss-dynamic-slide")),this.initSlideDataRefresh()}else this.variables=null}return r.prototype.isDynamicSlide=function(){return this.group>0},r.prototype.splitTokens=function(t){for(var e=[],i="",n=0,r=0;r<t.length;r++){var s=t[r];","===s&&0===n?(e.push(i),i=""):(i+=s,"("===s?n++:")"===s&&n--)}return i.length&&e.push(i),e},r.prototype.fill=function(t){return t},r.prototype.generatorFill=function(e){return e.replace(/{((([a-z]+)\(([^}]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g,t.proxy(this.parseFunction,this))},r.prototype.parseFunction=function(t,e,i,n,r,s){if("undefined"==typeof s){for(var o=this.splitTokens(r),a=0;a<o.length;a++)o[a]=this.parseVariable(o[a]);return"function"==typeof this[n]?this[n].apply(this,o):t}return this.parseVariable(s)},r.prototype.parseVariable=function(t){var e=t.match(/^("|')(.*)("|')$/);if(e)return e[2];var i=t.match(/((([a-z]+)\(([^}]+)\)))/);if(i)return this.parseFunction.apply(this,i);var n=t.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);if(n){var r=n[3];if("undefined"==typeof r)r=0;else{var s=parseInt(r);isNaN(s)||(r=Math.max(r,1)-1)}return"undefined"!=typeof this.variables[r]&&"undefined"!=typeof this.variables[r][n[1]]?this.variables[r][n[1]]:""}return t},r.prototype.fallback=function(t,e){return""==t?e:t},r.prototype.cleanhtml=function(t){return this.stripTags(t,"<p><a><b><br /><br/><i>")},r.prototype.stripTags=function(t,e){e=(((e||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var i=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,n=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return t.replace(n,"").replace(i,function(t,i){return e.indexOf("<"+i.toLowerCase()+">")>-1?t:""})},r.prototype.removehtml=function(e){return t("<div>"+e+"</div>").text()},r.prototype.splitbychars=function(t,e,i){return t.substr(e,i)},r.prototype.splitbywords=function(t,e,i){var n=t,r=n.length,s=Math.max(0,0==e?0:n.indexOf(" ",e)),o=Math.max(0,i>r?r:n.indexOf(" ",i));return 0==o&&r>=i&&(o=r),n.substr(s,o)},r.prototype.findimage=function(t,e){var i=t,n=/(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[2]?r.push(s[2]):"undefined"!=typeof s[6]&&r.push(s[6]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.findlink=function(t,e){var i=t,n=/href=["\']?([^"\'>]+)["\']?/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[1]&&r.push(s[1]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.removevarlink=function(t){var e=String(t),i=/<a href=\"(.*?)\">(.*?)<\/a>/g;return e.replace(i,"")},r.prototype.registerField=function(t){},r.prototype.generatorRegisterField=function(e){var i=e.parent();i.on({mouseenter:t.proxy(function(){this.activeField=e,this.button.prependTo(i)},this)})},r.prototype.getModal=function(){var e=this;if(!this.modal){var i={key:"",group:1,filter:"no",split:"no",splitStart:0,splitLength:300,findImage:0,findImageIndex:1,findLink:0,findLinkIndex:1,removeVarLink:0},n=function(){var t=i.key+"/"+i.group;return i.findImage&&(t="findimage("+t+","+Math.max(1,i.findImageIndex)+")"),i.findLink&&(t="findlink("+t+","+Math.max(1,i.findLinkIndex)+")"),i.removeVarLink&&(t="removevarlink("+t+")"),"no"!=i.filter&&(t=i.filter+"("+t+")"),"no"!=i.split&&i.splitStart>=0&&i.splitLength>0&&(t=i.split+"("+t+","+i.splitStart+","+i.splitLength+")"),"{"+t+"}"},r=t('<div class="n2-generator-result-container" />'),s=function(){r.html(t("<div/>").text(e.fill(n())).html())},o=e.group,a=null,l=null,h=t('<div class="n2-generator-insert-variable"/>'),d=NextendModal.prototype.createHeading(n2_("Choose the group")).appendTo(h),c=t('<div class="n2-group-container" />').appendTo(h);h.append(NextendModal.prototype.createHeading(n2_("Choose the variable")));var p=t('<div class="n2-variable-container" />').appendTo(h),u=t('<div class="n2-generator-functions-container n2-form-element-mixed" />').appendTo(t('<div class="n2-form" />').appendTo(h));h.append(NextendModal.prototype.createHeading(n2_("Result"))),r.appendTo(h),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Filter")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="filter" id="n2-generator-function-filter"><option selected="selected" value="no">'+n2_("No")+'</option><option value="cleanhtml">'+n2_("Clean HTML")+'</option><option value="removehtml">'+n2_("Remove HTML")+"</option></select></div></div></div>").appendTo(u);var y=u.find("#n2-generator-function-filter");y.on("change",t.proxy(function(){i.filter=y.val(),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Split by chars")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="split" id="n2-generator-function-split"><option selected="selected" value="no">'+n2_("No")+'</option><option value="splitbychars">'+n2_("Strict")+'</option><option value="splitbywords">'+n2_("Respect words")+'</option></select></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Start")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="0" id="n2-generator-function-split-start"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Length")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="300" id="n2-generator-function-split-length"></div></div></div>').appendTo(u);var g=u.find("#n2-generator-function-split");g.on("change",t.proxy(function(){i.split=g.val(),s()},this));var f=u.find("#n2-generator-function-split-start");f.on("change",t.proxy(function(){i.splitStart=parseInt(f.val()),s()},this));var v=u.find("#n2-generator-function-split-length");v.on("change",t.proxy(function(){i.splitLength=parseInt(v.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find image")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findimage"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findimage-index"></div></div></div>').appendTo(u);var m=u.find("#n2-generator-function-findimage");m.on("nextendChange",t.proxy(function(){i.findImage=parseInt(m.val()),s()},this));var b=u.find("#n2-generator-function-findimage-index");b.on("change",t.proxy(function(){i.findImageIndex=parseInt(b.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find link")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findlink"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findlink-index"></div></div></div>').appendTo(u);var x=u.find("#n2-generator-function-findlink");x.on("nextendChange",t.proxy(function(){i.findLink=parseInt(x.val()),s()},this));var C=u.find("#n2-generator-function-findlink-index");C.on("change",t.proxy(function(){i.findLinkIndex=parseInt(C.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Remove links")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-removevarlink"></div></div></div>').appendTo(u);var S=u.find("#n2-generator-function-removevarlink");S.on("nextendChange",t.proxy(function(){i.removeVarLink=parseInt(S.val()),s()},this));var w=u.find("#n2-generator-function-removevarlink-index");w.on("change",t.proxy(function(){i.removeVarLinkIndex=parseInt(w.val()),s()},this));for(var k in this.variables[0])t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+k+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),a.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.key=e,s()},this,k)).appendTo(p);a=p.find("a"),a.eq(0).trigger("click"),1==o&&(d.css("display","none"),c.css("display","none"));for(var P=0;o>P;P++)t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+(P+1)+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),l.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.group=e+1,s()},this,P)).appendTo(c);l=c.find("a"),l.eq(0).trigger("click");var M=!1;this.modal=new NextendModal({zero:{size:[1e3,o>1?560:490],title:n2_("Insert variable"),back:!1,close:!0,content:h,controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green">'+n2_("Insert")+"</a>"],fn:{show:function(){M||(new N2Classes.FormElementOnoff("n2-generator-function-findimage"),new N2Classes.FormElementOnoff("n2-generator-function-findlink"),new N2Classes.FormElementOnoff("n2-generator-function-removevarlink"),M=!0),this.controls.find(".n2-button").on("click",t.proxy(function(t){t.preventDefault(),e.insert(n()),this.hide(t)},this))}}}},!1),this.modal.setCustomClass("n2-ss-generator-modal")}return this.modal},r.prototype.showModal=function(){this.getModal().show()},r.prototype.insert=function(t){this.activeField.val(t).trigger("change")},r.prototype.initSlideDataRefresh=function(){var e=t("#slidetitle").on("nextendChange",t.proxy(function(){this.variables.slide.name=e.val(),this.refresh()},this)),i=t("#slidedescription").on("nextendChange",t.proxy(function(){this.variables.slide.description=i.val(),this.refresh()},this))},r.prototype.refresh=function(){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),this._refreshTimeout=setTimeout(t.proxy(this._refresh,this),100)},r.prototype._refresh=function(){for(var t=i.canvasManager.mainContainer.container.getAllLayers(),e=0;e<t.length;e++)"layer"==t[e].type&&t[e].item.reRender()},r}),N2Require("History",[],[],function(t,e,i){"use strict";function n(){this.historyStates=50,this.enabled=0!=this.historyStates,this.historyAddAllowed=!0,this.isBatched=!1,this.currentBatch=this,this.index=-1,this.stackedOff=[],this.tasks=[],this.preventUndoRedo=!1,this.undoBTN=t("#n2-ss-undo").on({click:t.proxy(this.undo,this),mousedown:function(t){nextend.context.setMouseDownArea("undo",t)}}),this.redoBTN=t("#n2-ss-redo").on({click:t.proxy(this.redo,this),mousedown:function(t){nextend.context.setMouseDownArea("redo",t)}}),this.updateUI()}function r(t){this.parent=t,this.tasks=[]}function s(t){switch(t){case"skipForwardUndos":this.undo=function(){return!1}}}function o(t,e,i,n){this.that=t,this.undoAction=e,this.redoAction=i,this.context=n||[]}function a(){o.prototype.constructor.apply(this,arguments)}return n.prototype.updateUI=function(){0==this.index||0==this.tasks.length?this.undoBTN.removeClass("n2-active"):this.undoBTN.addClass("n2-active"),-1==this.index||this.index>=this.tasks.length?this.redoBTN.removeClass("n2-active"):this.redoBTN.addClass("n2-active")},n.prototype.throttleUndoRedo=function(){return this.preventUndoRedo?!0:(this.preventUndoRedo=!0,setTimeout(t.proxy(function(){this.preventUndoRedo=!1},this),100),!1)},n.prototype.isEnabled=function(){return this.enabled&&this.historyAddAllowed},n.prototype.startBatch=function(){if(this.isEnabled()){var t=new r(this.currentBatch);return this.currentBatch._add(t),this.currentBatch=t,t}return!1},n.prototype.endBatch=function(){this.isEnabled()&&(this.currentBatch.parent==i,this.currentBatch=this.currentBatch.parent)},n.prototype.addControl=function(t){return this.currentBatch._add(new s(t))},n.prototype.addSimple=function(t,e,i,n){return this.isEnabled()?this.currentBatch._add(new o(t,e,i,n)):!1},n.prototype.addValue=function(t,e,i){if(this.isEnabled()){if(this.isBatched||this.currentBatch!=this)for(var n=this.getCurrentBatchStack(),r=0;r<n.length;r++)if(n[r].isEqual(t,e,i))return n.push(n.splice(r,1)[0]),n[n.length-1];return this.currentBatch._add(new a(t,e,e,i))}return!1},n.prototype.getCurrentBatchStack=function(){return this.currentBatch!=this?this.currentBatch.tasks:this.tasks[this.tasks.length-1]},n.prototype._add=function(e){return-1!=this.index&&this.tasks.splice(this.index,this.tasks.length),this.index=-1,this.isBatched?this.tasks[this.tasks.length-1].push(e):(this.tasks.push([e]),this.isBatched=!0,setTimeout(t.proxy(function(){this.isBatched=!1},this),100)),this.tasks.length>this.historyStates&&this.tasks.unshift(),this.updateUI(),e},n.prototype.off=function(){this.historyAddAllowed=!1,this.stackedOff.push(1)},n.prototype.on=function(){this.stackedOff.pop(),0==this.stackedOff.length&&(this.historyAddAllowed=!0)},n.prototype.undo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1==this.index?this.index=this.tasks.length-1:this.index--,this.index>=0)for(var e=this.tasks[this.index],i=e.length-1;i>=0&&e[i].undo();i--);else this.index=0;return this.on(),this.updateUI(),!0},n.prototype.redo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1!=this.index&&this.index<this.tasks.length){var e=this.tasks[this.index];this.index++;for(var i=0;i<e.length&&e[i].redo();i++);}return this.on(),this.updateUI(),!0},r.prototype._add=function(t){return this.tasks.push(t),t},r.prototype.invertUndo=function(){return this.undo=function(){for(var t=this.tasks.length-1;t>=0&&this.tasks[t].undo();t--);return!0},this},r.prototype.undo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].undo();t++);return!0},r.prototype.redo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].redo();t++);return!0},r.prototype.isEqual=function(){return!1},s.prototype.undo=function(){return!0},s.prototype.redo=function(){return!0},s.prototype.isEqual=function(){return!1},o.prototype.undo=function(){return this.undoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.redo=function(){return this.redoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.isEqual=function(){return!1},a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype.setValues=function(t,e){this.undoValue=t,this.redoValue=e},a.prototype.undo=function(){return this.context.unshift(this.undoValue),this.undoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.redo=function(){return this.context.unshift(this.redoValue),this.redoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.isEqual=function(t,e,i){if(t==this.that&&e==this.undoAction){for(var n=0;n<i.length;n++)if(i[n]!=this.context[n])return!1;return this.setValues=function(t,e){this.redoValue=e},!0}return!1},n}),N2Require("InlineField",[],[],function(t,e,i){function n(){this.$input=t('<input type="text" name="name" />').on({mouseup:function(t){t.stopPropagation()},keyup:t.proxy(function(t){27==t.keyCode&&this.cancel()},this),blur:t.proxy(this.save,this)}),this.$form=t('<form class="n2-inline-form"></form>').append(this.$input).on("submit",t.proxy(this.save,this))}return n.prototype.injectNode=function(t,e){this.$input.val(e),t.append(this.$form),this.$input.focus()},n.prototype.save=function(t){t.preventDefault(),this.$input.trigger("valueChanged",[this.$input.val()]),this.$input.off("blur"),this.destroy()},n.prototype.cancel=function(){this.$input.trigger("cancel"),this.destroy()},n.prototype.destroy=function(){this.$input.off("blur"),this.$form.remove()},n}),N2Require("SlideSettings",["SlideEditManager"],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isStatic=e;var n=t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]'),r={};if(n.each(t.proxy(function(e,i){var n=t(i),s=n.attr("name").match(/slide\[(.*)\]/)[1];r[s]=n.on("nextendChange",t.proxy(this.onChange,this,s))},this)),this.fields=r,this.slideBackground=i.$currentSlideElement.data("slideBackground"),!e){this.$slideMask=this.slideBackground.$mask;var s=t("#slidethumbnail");if(""==s.val()){var o=t("#item_imageimage"),a=t.proxy(function(t){""!=t&&"$system$/images/placeholder/image.png"!=t&&(s.val(t).trigger("change"),this.fields.backgroundImage.off(".slidethumbnail"),o.off(".slidethumbnail"))},this);this.fields.backgroundImage.on("nextendChange.slidethumbnail",t.proxy(function(){a(this.fields.backgroundImage.val())},this)),o.on("nextendChange.slidethumbnail",t.proxy(function(){a(o.val())},this))}}this.createHistory()}r.prototype.createHistory=function(){this.values={},t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]').not("#slideslide").each(t.proxy(function(e,n){var r=t(n),s=r.data("field"),o=r.attr("id");this.values[o]=r.val(),r.on("nextendChange",t.proxy(function(){var t=r.val(),e=i.history.addValue(this,this.historyUpdateSlideValue,[s]);e&&e.setValues(this.values[o],t),this.values[o]=t},this))},this))},r.prototype.getSelf=function(){return this},r.prototype.historyUpdateSlideValue=function(t,e){e.insideChange(t)},r.prototype.getAllData=function(){var t={};for(var e in this.fields)t[e]=this.fields[e].val();return t};var s=["thumbnail","background-type","backgroundColor","backgroundGradient","backgroundColorEnd","backgroundImage","backgroundImageOpacity","backgroundImageBlur","backgroundFocusX","backgroundFocusY","backgroundMode"];return r.prototype.getBackgroundData=function(){for(var t={},e=0;e<s.length;e++)t[s[e]]=this.fields[s[e]].val();return t},r.prototype.setData=function(t,e){e&&this.slideBackground.setVisualLoad(!1);for(var i in t)this.fields[i].val(t[i]).trigger("change");e&&this.slideBackground.setVisualLoad(!1)},r.prototype.onChange=function(t,e){"function"==typeof this["sync_"+t]&&this["sync_"+t].call(this)},r.prototype.sync_backgroundColor=r.prototype.sync_backgroundGradient=r.prototype.sync_backgroundColorEnd=function(){this.updateBackgroundColor()},r.prototype.updateBackgroundColor=function(){var t=this.fields.backgroundColor.val(),e=this.fields.backgroundGradient.val();if("off"!=e){var i=this.fields.backgroundColorEnd.val(),n=this.$slideMask.css({background:"",filter:""});switch(e){case"horizontal":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)");break;case"vertical":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=0)");break;case"diagonal1":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)");break;case"diagonal2":n.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(i)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+i.substr(0,6)+"',GradientType=1)")}}else"00"==t.substr(6,8)?this.$slideMask.css("background",""):this.$slideMask.css("background","#"+t.substr(0,6)).css("background",N2Color.hex2rgbaCSS(t));this.slideBackground.element.find(".n2-ss-slide-bg-video-color-overlay").css("background",this.$slideMask.css("background"))},r.prototype.sync_backgroundImage=function(){this["sync_background-type"]()},r.prototype["sync_background-type"]=function(){var t=this.fields["background-type"].val();"color"==t?this.slideBackground.setDesktopSrc(""):this.slideBackground.setDesktopSrc(i.generator.fill(this.fields.backgroundImage.val()))},r.prototype.sync_backgroundMode=function(){this.slideBackground.setMode(this.fields.backgroundMode.val())},r.prototype.sync_backgroundFocusY=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundFocusX=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundImageOpacity=function(){this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val()/100)},r.prototype.sync_backgroundImageBlur=function(){this.slideBackground.setBlur(this.fields.backgroundImageBlur.val())},r}),N2Require("LayerContainer",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e,i,n,r){this.component=t,this.$ul=e.data("container",this),this.allowedPlacementMode=i,this.childrenSelector=n,this.allowedChildren=r,this.layerContainerElement=t.layer}return r.prototype.setLayerContainerElement=function(t){this.layerContainerElement=t},r.prototype.startWithExistingNodes=function(){for(var t=this.layerContainerElement.find(this.childrenSelector),e=0;e<t.length;e++)this._loadNode(t.eq(e),!1);this.component.onChildCountChange()},r.prototype.isChildAllowed=function(e){return-1!==t.inArray(e,this.allowedChildren)},r.prototype._loadNode=function(t,i){var r=t.data("type");if(this.isChildAllowed(r)){var s=t.data("lastplacement"),o={};if(s!==n&&s!=this.allowedPlacementMode)switch(s){case"absolute":o=e.PlacementAbsolute.cleanLayer(t);break;case"normal":o=e.PlacementNormal.cleanLayer(t)}var a;switch(r){case"layer":a=new e.Layer(this.component.canvasManager,this.component);var l=a.itemEditor.getItemClass(t.find(".n2-ss-item").data("item"));l&&e[l].needSize&&o.desktopportraitheight!==n&&t.data("desktopportraitheight",o.desktopportraitheight);break;case"content":a=new e.Content(this.component.canvasManager,this.component);break;case"row":a=new e.Row(this.component.canvasManager,this.component);break;case"col":a=new e.Col(this.component.canvasManager,this.component);break;case"group":}if(a)return a.load(t),i&&a.sync(),a}else console.error(r+" is not allowed in "+this.component.label);return!1},r.prototype.getLayerCount=function(){return this.layerContainerElement.find(this.childrenSelector).length},r.prototype.getLayerIndex=function(t){return this.layerContainerElement.find(this.childrenSelector).index(t)},r.prototype.getSortedLayers=function(){var e=[];return this.layerContainerElement.find(this.childrenSelector).each(function(i,r){var s=t(r).data("layerObject");s!==n&&e.push(s)}),e},r.prototype.append=function(t){t.appendTo(this.layerContainerElement);var e=this._loadNode(t,!0);return this.component.onChildCountChange(),e},r.prototype.insertAt=function(t,e){var i=this.getSortedLayers();e>=i.length?t.appendTo(this.layerContainerElement):t.insertBefore(i[e].layer);var n=this._loadNode(t,!0);return this.component.onChildCountChange(),n},r.prototype.insert=function(t){t.getRootElement().appendTo(this.layerContainerElement)},r.prototype.insertLayerAt=function(e,i){var n=this.getSortedLayers(),r=t.inArray(e,n);"-1"!=r&&i>r&&i++,i>=n.length?e.getRootElement().appendTo(this.layerContainerElement):e.getRootElement().insertBefore(n[i].getRootElement()),this.syncLayerRow(e)},r.prototype.syncLayerRow=function(t){var e,i="absolute"==this.allowedPlacementMode;e=i?t.getRootElement().prevAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"):t.getRootElement().nextAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"),e!==n?t.layerRow.insertBefore(e.layerRow):this.$ul.append(t.layerRow),t.animations&&t.animations.syncRow(e,i)},r.prototype.getChildLayersRecursive=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)t?i.push(e[n].layer[0]):i.push(e[n]),e[n].container&&i.push.apply(i,e[n].container.getChildLayersRecursive(t));return i},r.prototype.moveLayerToGroup=function(t,e){this.moveLayersToGroup([t],[e])},r.prototype.moveLayersToGroup=function(e,i){i=i||[];for(var n=[],r=0;r<e.length;r++){var s=e[r],o=s.group,a=s.getIndex();"undefined"!=typeof i[r]?this.insertLayerAt(s,i[r]):this.insert(s),s.changeGroup(a,this.component),this!=o&&-1==t.inArray(o,n)&&n.push(o)}for(var r=0;r<n.length;r++)n[r].update()},r.prototype.activateFirst=function(){var t=this.getSortedLayers();t.length>0&&t[t.length-1].activate()},r.prototype.resetModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].resetMode(t),e[i].container!=n&&e[i].container.resetModes(t)},r.prototype.copyModes=function(t,e){for(var i=this.getSortedLayers(),r=0;r<i.length;r++)i[r].copyMode(t,e),i[r].container!=n&&i[r].container.copyModes(t,e)},r.prototype.changeEditorModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].changeEditorMode(t),e[i].container!=n&&e[i].container.changeEditorModes(t)},r.prototype.renderModeProperties=function(){for(var t=this.getSortedLayers(),e=0;e<t.length;e++)t[e].renderModeProperties(),t[e].container!=n&&t[e].container.renderModeProperties()},r.prototype.getAllLayers=function(t){t=t||[];for(var e=this.getSortedLayers(),i=0;i<e.length;i++)t.push(e[i]),e[i].container!=n&&e[i].container.getAllLayers(t);return t},r.prototype.getData=function(e){e=t.extend({layersIncluded:!0,itemsIncluded:!0},e);var i=[],n=this.getSortedLayers();if("absolute"==this.allowedPlacementMode)for(var r=n.length-1;r>=0;r--)i.push(n[r].getData(e));else for(var r=0;r<n.length;r++)i.push(n[r].getData(e));return i},r.prototype.getHTML=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)i.push(e[n].getHTML(t));return i},r.prototype.getDroppables=function(t){for(var e=[],i=this.getSortedLayers(),n=0;n<i.length;n++)if(i[n]!=t){var r=i[n].getDroppable();"object"==typeof r&&e.push(r),"hidden"!=r&&i[n].container&&e.push.apply(e,i[n].container.getDroppables(t))}return e},r.prototype.getLLDroppables=function(t){var e=[],i=this.component.getLLDroppable(t);i&&e.push(i);for(var n=this.getSortedLayers(),r=0;r<n.length;r++)n[r].container&&n[r]!=t&&e.push.apply(e,n[r].container.getLLDroppables(t));return e},r}),N2Require("LayerDataStorage",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.isDeviceProp={},this.propertyScope={},this.property={},this.deviceProperty={desktopPortrait:{},desktopLandscape:{},tabletPortrait:{},tabletLandscape:{},mobilePortrait:{},mobileLandscape:{}}}return r.prototype.getMode=function(){return this.canvasManager.getMode()},r.prototype.getRawProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e];return i[t]!==n?i[t]:n}return this.property[t]},r.prototype.getProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e],n=this.deviceProperty.desktopPortrait;if("undefined"!=typeof i[t])return i[t];if("undefined"!=typeof n[t])return n[t]}return this.property[t]},r.prototype.historyStore=function(t,e,i){if(!this.isDeleteStarted){var n=this.getMode();this.isDeviceProp[e]&&i!=n?(this.deviceProperty[i][e]=t,this.render(e)):(this.store(e,t,!0,"history"),this.$.trigger("propertyChanged",[e,this.getProperty(e)]))}},r.prototype.store=function(t,e,n,r){var s,o,a=this.getMode();this.isDeviceProp[t]?(s=this.deviceProperty[a][t],o=this.getProperty(t)):o=s=this.property[t];var l=i.history.addValue(this,this.historyStore,[t,a]);l&&l.setValues(s,e),this.property[t]=e,this.isDeviceProp[t]&&(this.deviceProperty[a][t]=e),n&&this.render(t,o,r)},r.prototype.render=function(t,e,i){this.propertyScope[t]["_sync"+t](e,i)},r.prototype.isDimensionPropertyAccepted=function(t){return!(!(t+"").match(/[0-9]+%/)&&"auto"!=t)},r.prototype.changeEditorMode=function(t){var e=parseInt(this.property[t]);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.renderModeProperties(!1)},r.prototype.renderModeProperties=function(){for(var t in this.property)this.property[t]=this.getProperty(t),this.$.trigger("propertyChanged",[t,this.property[t]])},r.prototype.historyResetMode=function(e,i){this.deviceProperty[i]=t.extend({},e),i==this.canvasManager.getMode()&&this.renderModeProperties(!0)},r.prototype.resetMode=function(e){if("desktopPortrait"!=e){var n,r=i.history.addValue(this,this.historyResetMode,[e]);r&&r.setValues(t.extend({},this.deviceProperty[e]),{});for(var s in this.deviceProperty[e])this.deviceProperty[e][s]=n;e==this.canvasManager.getMode()&&this.renderModeProperties(!0)}},r.prototype.copyMode=function(e,n){if(e!=n){var r=this.deviceProperty[n];this.deviceProperty[n]=t.extend({},this.deviceProperty[n],this.deviceProperty[e]);var s=i.history.addValue(this,this.historyResetMode,[n]);s&&s.setValues(r,this.deviceProperty[n])}},r.prototype._getDefault=function(t,e){return this.originalProperties[t]!==n?this.originalProperties[t]:e},r.prototype.createProperty=function(t,e,i,r){this.isDeviceProp[t]=!1,this.propertyScope[t]=r||this,i?(this.property[t]=i.data(t.toLowerCase()),this.property[t]===n&&(this.property[t]=this._getDefault(t,e))):this.property[t]=this._getDefault(t,e)},r.prototype.createDeviceProperty=function(t,e,i,r){if(this.isDeviceProp[t]=!0,this.propertyScope[t]=r||this,i){for(var s in this.deviceProperty)this.deviceProperty[s][t]=i.data(s.toLowerCase()+t.toLowerCase()),""===this.deviceProperty[s][t]&&(this.deviceProperty[s][t]=n);for(var s in this.deviceProperty)if(this.deviceProperty[s][t]===n||""===this.deviceProperty[s][t]){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o);
4
- }for(var s in e)this.deviceProperty[s][t]!==n&&""!==this.deviceProperty[s][t]||(this.deviceProperty[s][t]=e[s])}else{for(var s in e)this.deviceProperty[s][t]=e[s];for(var s in this.deviceProperty){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}}this.property[t]=this.deviceProperty.desktopPortrait[t]},r.prototype.removeProperty=function(t){if(delete this.property[t],this.layer.removeData(t.toLowerCase()).removeAttr("data-"+t.toLowerCase()),this.isDeviceProp[t])for(var e in this.deviceProperty)delete this.deviceProperty[e][t],this.layer.removeData(e.toLowerCase()+t.toLowerCase()).removeAttr("data-"+e.toLowerCase()+t.toLowerCase());delete this.isDeviceProp[t],delete this.propertyScope[t]},r.prototype.removeProperties=function(t){for(var e=0;e<t.length;e++)this.removeProperty(t[e])},r.prototype.getPropertiesData=function(t){for(var e={},i=0;i<t.length;i++){var r=t[i];if(this.property[r]!==n&&(e[r]=this.property[r]),this.isDeviceProp[r])for(var s in this.deviceProperty)this.deviceProperty[s][r]!==n&&(e[s.toLowerCase()+r]=this.deviceProperty[s][r])}return e},r.prototype.setProperty=function(t,e,i){this.propertyScope[t]!==n&&("function"==typeof this.propertyScope[t]["setProperty"+t]?this.propertyScope[t]["setProperty"+t](t,e,i):this._setProperty(t,e,i))},r.prototype._setProperty=function(t,e,i){this.store(t,e,!0,i),"manager"!=i&&this.$.trigger("propertyChanged",[t,this.getProperty(t)])},r}),N2Require("CanvasManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(n,r,s){this.mode="desktopPortrait",this.slideEditManager=n,this.isStatic=r,this.ready=t.Deferred(),this.shouldPreventActivationBubble=!1,this.$=t(this),i.canvasManager=this,this.$highlight=t('<div class="n2-ss-layer-highlight n2-ss-layer-highlight-n" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-e" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-s" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-w" />'),this.initSelectMode(),this.layerWindow=new e.LayerWindow(this),this.layerOptions=new e.ComponentSettings(this),this.ui=new e.CanvasUserInterface(this),this.mainContainer=new e.MainContainer(this),this.itemEditor=new e.ItemManager(this,s),this.mainContainer.lateInit(),this._initDeviceModeChange(),this.canvasSettings=new e.CanvasSettings(this),this.layerOptions.startFeatures(),this.hotkeys(),this.addContextMenu(),this.mainContainer.refreshHasLayers();var o=t("#n2-ss-editor-mode .n2-radio-option"),a=t.proxy(function(t){switch(this.updateEditorMode(t),t){case"content":o.eq(0).addClass("n2-active"),o.eq(1).removeClass("n2-active");break;case"canvas":o.eq(0).removeClass("n2-active"),o.eq(1).addClass("n2-active")}},this);if(this.mainContent&&this.mainContent.container.getLayerCount())a("content");else{var l=this.mainContainer.container.getSortedLayers();if(this.mainContent&&l.length>1||!this.mainContent&&l.length>0)a("canvas");else{var h=t.jStorage.get("editormode");h||(h="content",t.jStorage.set("editormode",h)),a(h)}}o.on("click",t.proxy(function(e){o.removeClass("n2-active");var i=t(e.currentTarget),n=i.data("mode");i.addClass("n2-active"),n!=this.currentEditorMode&&(this.updateEditorMode(n),t.jStorage.set("editormode",n))},this)),this.isMultiDrag=!1}var s={16:0,38:0,40:0,37:0,39:0},o={97:"left",98:"center",99:"right",100:"left",101:"center",102:"right",103:"left",104:"center",105:"right"},a={97:"bottom",98:"bottom",99:"bottom",100:"middle",101:"middle",102:"middle",103:"top",104:"top",105:"top"},l={OFF:0,ON:1,GROUP:2};return r.prototype.updateEditorMode=function(e){this.currentEditorMode=e,t("body").attr("data-editormode",this.currentEditorMode)},r.prototype.getMode=function(){return this.mode},r.prototype.getResponsiveRatio=function(t){return"h"==t?i.frontend.responsive.lastRatios.slideW:"v"==t?i.frontend.responsive.lastRatios.slideH:0},r.prototype.setMainContent=function(t){this.mainContent=t},r.prototype.isGroup=function(t){return!1},r.prototype.isRow=function(t){return t instanceof e.Row},r.prototype.isCol=function(t){return t instanceof e.Col},r.prototype.isLayer=function(t){return t instanceof e.Layer},r.prototype.isContent=function(t){return t instanceof e.Content},r.prototype._initDeviceModeChange=function(){var e=t("#layerresettodesktop").on("click",t.proxy(this.__onResetToDesktopClick,this));this.resetToDesktopTRElement=e.closest("tr"),this.resetToDesktopGlobalElement=t("#n2-ss-layer-reset-to-desktop").on("click",t.proxy(function(){"block"==this.resetToDesktopTRElement.css("display")&&e.trigger("click")},this));var n=t("#n2-ss-layer-show-on"),r={},s=i.frontend.responsive.parameters.deviceModes;for(var o in s)s[o]&&(r[o]=t('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-'+o+'"></i></div>').on("click",t.proxy(function(t){this.layerOptions.currentForm[t].data("field").onoff.trigger("click")},this,o)).appendTo(n));n.children().first().addClass("n2-first"),n.children().last().addClass("n2-last"),this.globalShowOnDeviceCB=function(t){"undefined"!=typeof r[t]&&r[t].toggleClass("n2-active",1==this.layerOptions.currentForm[t].val())},this.layerOptions.forms.global.desktopPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopPortrait")),this.layerOptions.forms.global.desktopLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopLandscape")),this.layerOptions.forms.global.tabletPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletPortrait")),this.layerOptions.forms.global.tabletLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletLandscape")),this.layerOptions.forms.global.mobilePortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobilePortrait")),this.layerOptions.forms.global.mobileLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobileLandscape")),t("#layershow").data("field").setAvailableDevices(s),t("#layergroup-show").data("field").setAvailableDevices(s),this.__onChangeDeviceOrientation(),i.frontend.sliderElement.on("SliderDeviceOrientation",t.proxy(function(){this.__onChangeDeviceOrientation()},this)),this.ready.resolve()},r.prototype.refreshMode=function(){this.__onChangeDeviceOrientation(),i.frontend.responsive.reTriggerSliderDeviceOrientation()},r.prototype.__onChangeDeviceOrientation=function(){this.mode=i.frontend.responsive.getNormalizedModeString(),this.resetToDesktopTRElement.css("display","desktopPortrait"==this.mode?"none":""),this.resetToDesktopGlobalElement.css("display","desktopPortrait"==this.mode?"none":""),this.mainContainer.container.changeEditorModes(this.mode)},r.prototype.__onResetToDesktopClick=function(){if(this.mainContainer.getSelectedLayer()){var t=this.getMode();this.mainContainer.getSelectedLayer().resetMode(t)}},r.prototype.copyOrResetMode=function(t){var e=this.getMode();"desktopPortrait"==e?"desktopPortrait"!=t&&this.mainContainer.container.resetModes(t):t==e?this.mainContainer.container.resetModes(t):this.mainContainer.container.copyModes(e,t)},r.prototype.getSnap=function(){return this.canvasSettings.get("n2-ss-snap-to-enabled")?t(this.isStatic?".n2-ss-static-slide .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide":".n2-ss-slide.n2-ss-slide-active .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide"):!1},r.prototype.getHTML=function(){for(var e=t("<div></div>"),i=this.mainContainer.container.getAllLayers(),n=0;n<i.length;n++)e.append(i[n].getHTML(!0));return e.html()},r.prototype.getData=function(){return this.mainContainer.container.getData()},r.prototype.importLayers=function(e,i){var n=(this.mainContainer,t.extend(!0,[],e));i&&this.mainContainer.deleteLayers(),this._idTranslation={};for(var r=this.dataToLayers(n),s=0;s<r.length;s++)this.mainContainer.container.append(r[s]);if(this.refreshMode(),!this.mainContainer.getSelectedLayer()){var n=this.mainContainer.container.getSortedLayers();n.length>0&&n[0].activate()}},r.prototype.loadComponentWithNode=function(t,e,i,n){var r=t.container.append(e);return n&&this.refreshMode(),r},r.prototype.insertComponentWithNode=function(t,e,i,n,r){var s=t.container.insertAt(e,i);return r&&this.refreshMode(),s},r.prototype.fixActiveLayer=function(){var t=this.mainContainer.getSelectedLayer();(0==t||t.isDeleted)&&this.resetActiveLayer()},r.prototype.resetActiveLayer=function(){var t=this.mainContainer.container.getSortedLayers();t.length?t[t.length-1].activate():this.changeActiveLayer(null)},r.prototype.changeActiveLayer=function(e,i){var n=this.mainContainer.getSelectedLayer();n&&!n.isDeleted&&(n.$.off("propertyChanged.editor").off(".active"),n.deActivate()),this.mainContainer.activeLayer=e,i||this.exitSelectMode(),e&&(this.layerOptions.changeActiveComponent(e,e.type,e.placement.getType(),e.property),e.$.on({"propertyChanged.editor":t.proxy(this.layerOptions.onUpdateField,this.layerOptions),"placementChanged.active":t.proxy(function(t,i,n){this.layerOptions.changeActiveComponentPlacement(i,e.property)},this)})),this.$.trigger("activeLayerChanged")},r.prototype.highlight=function(t){this.$highlight.appendTo(t.layer)},r.prototype.deHighlight=function(t){this.$highlight.detach()},r.prototype["delete"]=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("delete")},r.prototype.duplicate=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("duplicate",[this.selectMode!=l.ON,!1])},r.prototype.copy=function(e){var i;if(e==n)if(1==this.selectMode)i=this.selectedLayers;else{var r=this.mainContainer.getSelectedLayer();r&&(i=this.isCol(r)||this.isContent(r)?r.container.getSortedLayers():[r])}else i=this.isCol(e)||this.isContent(e)?e.container.getSortedLayers():[e];var s=this.mainContainer.getLayerData(i);s.length&&t.jStorage.set("ss3layersclipboard",JSON.stringify(s))},r.prototype.paste=function(e){var i=t.jStorage.get("ss3layersclipboard");if(i){var r=JSON.parse(i);if(r.length){var s;s=e!==n&&e?this.isCol(e)||this.isContent(e)?e:e.group:this.mainContainer.getActiveGroup(),this.mainContainer.addLayers(r,s)}}},r.prototype.hasLayersOnClipboard=function(){return!!t.jStorage.get("ss3layersclipboard")},r.prototype.addContextMenu=function(){t("#n2-ss-0 .n2-ss-currently-edited-slide").nextendContextMenu({onShow:t.proxy(function(e,i){var n=t(e.target),r=n.closest(".n2-ss-layer"),s=r.data("layerObject");s||(s=this.mainContainer.getSelectedLayer()),s&&(this.isCol(s)||this.isContent(s)?i.addItem("Copy child layers","n2-i-copy",t.proxy(function(){this.copy(s)},this)):i.addItem("Copy layer","n2-i-copy",t.proxy(function(){this.selectMode==l.ON?this.copy():this.copy(s)},this))),this.hasLayersOnClipboard()&&i.addItem("Paste layer(s)","n2-i-paste",t.proxy(function(){this.paste(s)},this)),i.addItem("Copy slide","n2-i-copy",t.proxy(function(){this.slideEditManager.copySlide()},this)),this.slideEditManager.hasCopiedSlide()&&i.addItem("Paste slide","n2-i-paste",t.proxy(function(){this.slideEditManager.pasteSlide()},this))},this)})},r.prototype.initSelectMode=function(){this.selectMode=l.OFF,this.selectedLayers=[],t(".n2-ss-layer-list-top-bar .n2-button").on("mousedown",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"delete":this["delete"]();break;case"duplicate":this.duplicate();break;case"group":this.createGroupFromSelected();break;case"cancel":this.exitSelectMode()}},this))},r.prototype.startSelection=function(t){t?(this.selectMode==l.ON&&this.exitSelectMode(),this.changeSelectMode(l.GROUP)):this.changeSelectMode(l.ON)},r.prototype.changeSelectMode=function(e){var i=this.selectMode;i!=e&&(i==l.ON?t("#n2-admin").removeClass("n2-ss-select-layer-mode-on"):i==l.GROUP&&t("#n2-admin").removeClass("n2-ss-select-layer-mode-group"),this.selectMode=e,i==l.GROUP&&e==l.ON&&this.selectedLayers[0].activate(null,null,!0),e==l.OFF?t("#n2-admin").removeClass("n2-ss-select-layer-mode"):(t("#n2-admin").addClass("n2-ss-select-layer-mode"),e==l.ON?t("#n2-admin").addClass("n2-ss-select-layer-mode-on"):e==l.GROUP&&t("#n2-admin").addClass("n2-ss-select-layer-mode-group")),this.selectMode==l.OFF?t("body").off(".n2-ss-selection"):t("body").on("mousedown.n2-ss-selection",t.proxy(function(t){3!=event.which&&"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.exitSelectMode()},this)))},r.prototype.endSelection=function(t){t&&this.selectMode==l.GROUP&&this.exitSelectMode()},r.prototype.selectLayer=function(t,e){if("layer"!=t.type)return!0;if(this.selectMode!=l.ON){var i=this.mainContainer.getSelectedLayer();if("layer"!=i.type)return t.activate(null),!0;this.startSelection(!1),e&&this.selectedLayers.push(i)}return this._selectLayer(t),!0},r.prototype._selectLayer=function(e){var i=t.inArray(e,this.selectedLayers);if(-1!=i){if(this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.exitSelectMode(),!1;var n=this.selectedLayers[i];if(this.selectedLayers.splice(i,1),e.layerRow.removeClass("n2-selected"),e.layer.removeClass("n2-ss-layer-selected"),this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.selectedLayers[0].activate(),this.exitSelectMode(),!1;n===this.mainContainer.getSelectedLayer()&&this.selectedLayers[0].activate(!1,null,!0)}else{for(var r=this.selectedLayers.length,s=0;s<this.selectedLayers.length;s++)if(e.layer.add(this.selectedLayers[s].layer).index(this.selectedLayers[s].layer)>0){r=s;break}this.selectedLayers.splice(r,0,e)}for(var s=0;s<this.selectedLayers.length;s++)this.selectedLayers[s].layerRow.addClass("n2-selected"),this.selectedLayers[s].layer.addClass("n2-ss-layer-selected")},r.prototype.addSelection=function(t,e){e||this.changeSelectMode(l.ON);for(var i=0;i<t.length;i++)this._selectLayer(t[i],!1)},r.prototype.exitSelectMode=function(){if(this.selectMode){for(var e=0;e<this.selectedLayers.length;e++)this.selectedLayers[e]!=this.mainContainer.getSelectedLayer()&&this.selectedLayers[e].layerRow.removeClass("n2-active"),this.selectedLayers[e].layerRow.removeClass("n2-selected"),this.selectedLayers[e].layer.removeClass("n2-ss-layer-selected");t("#n2-admin").removeClass("n2-ss-select-layer-mode"),this.selectedLayers=[],this.changeSelectMode(l.OFF)}},r.prototype.doActionOnActiveLayer=function(e,i){if(this.selectMode==l.ON)for(var n=t.extend([],this.selectedLayers),r=0;r<n.length;r++)n[r][e].apply(n[r],i);else{var s=this.mainContainer.getSelectedLayer();s&&s[e].apply(s,i)}},r.prototype.canvasDragStart=function(t,e){if(this.selectMode&&"canvas"==this.currentEditorMode&&"absolute"==e.mode){for(var i=!1,n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n],s=r.layer;if(s[0]!=e.layer.layer[0]){var o=s.css("display");"none"==o&&s.css("display",""),r._originalPosition=s.position(),"none"==o&&s.css("display","none")}else i=!0}i||this.exitSelectMode(),this.isMultiDrag=!0}},r.prototype.canvasDragMove=function(t,e){if(this.isMultiDrag===!0)for(var i={left:e.position.left+e.canvasOffset.left-e.originalOffset.left,top:e.position.top+e.canvasOffset.top-e.originalOffset.top},n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n];if(!this.isGroup(r)){var s=r.layer;s[0]!=e.layer.layer[0]&&(s.css({left:r._originalPosition.left+i.left,top:r._originalPosition.top+i.top,bottom:"auto",right:"auto"}),r.placement.doAction("triggerLayerResized"))}}},r.prototype.canvasDragStop=function(t,e){if(this.isMultiDrag===!0){for(var i=0;i<this.selectedLayers.length;i++){var n=this.selectedLayers[i];if(!this.isGroup(n)){var r=n.layer;if(r[0]!=e.layer.layer[0]){var s=r.css("display");"none"==s&&r.css("display","block");var o=parseInt(n.layer.css("left")),a=parseInt(n.layer.css("top"));n.placement.current.setPosition(o,a),n.placement.doAction("triggerLayerResized"),"none"==s&&r.css("display","none")}}}return this.isMultiDrag=!1,!0}return!1},r.prototype.historyDeleteGroup=function(t){t.getSelf()["delete"]()},r.prototype.historyCreateGroup=function(t){var i=new e.Group(this,this.mainContainer,{},null);i.create(),t.setSelf(i)},r.prototype.createGroupFromSelected=function(){var t;switch(this.selectMode){case l.ON:t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers(this.selectedLayers),this.exitSelectMode(),t.activate();break;case l.OFF:var n=this.mainContainer.getSelectedLayer();n.group instanceof e.Group?n.group.activate():(t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers([n]),t.activate());break;case l.GROUP:}},r.prototype.createRow=function(t){var i=new e.Row(this,t,{});return i.create(),i.hightlightStructure(),{layer:i}},r.prototype.createCol=function(t){var e=t,i=null;if(this.isCol(e))i=e.group.createCol();else if(this.isRow(e))i=e.createCol();else{if(!this.isCol(e.group))return this.createRow(t);i=e.group.group.createCol()}return i.activate(null),{layer:i}},r.prototype.preventActivationBubbling=function(){return this.shouldPreventActivationBubble?!1:(this.shouldPreventActivationBubble=!0,!0)},r.prototype.allowActivation=function(){this.shouldPreventActivationBubble=!1},r.prototype.hotkeys=function(){t(window).on({keydown:t.proxy(function(e){if(!("TEXTAREA"==e.target.tagName||"INPUT"==e.target.tagName||i.layerAnimationManager&&i.layerAnimationManager.timelineControl&&i.layerAnimationManager.timelineControl.isActivated())){var n=this.mainContainer.getSelectedLayer(),r=e.keyCode;if(r>=49&&57>=r){var l=e.originalEvent.location||e.originalEvent.keyLocation||0;3==l&&(r+=48)}if(n)if(46==r||8==r)this["delete"](),e.preventDefault();else if(35==r)this.duplicate(),e.preventDefault();else if(16==r)s[r]=1;else if(38==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(40==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(37==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(39==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(r>=97&&105>=r){var d=o[r],c=a[r],p=!1;this.layerOptions.forms.placement.absolute.align.val()==d&&this.layerOptions.forms.placement.absolute.valign.val()==c&&(p=!0),this.layerOptions.layerFeatures.horizontalAlign(d,p),this.layerOptions.layerFeatures.verticalAlign(c,p)}else if(65==r){e.preventDefault();var u=this.mainContainer.getSelectedLayer();u&&"absolute"==u.placement.getType()&&u.placement.current.fit()}(e.ctrlKey||e.metaKey)&&(90==r?e.shiftKey?i.history.redo()&&e.preventDefault():i.history.undo()&&e.preventDefault():71==r?(this.createGroupFromSelected(),e.preventDefault()):68==r?(e.preventDefault(),this.slideEditManager.copySlide()):70==r?(e.preventDefault(),this.slideEditManager.pasteSlide()):67==r?this.copy():86==r&&this.paste())}},this),keyup:t.proxy(function(t){"undefined"!=typeof s[t.keyCode]&&s[t.keyCode]&&(clearInterval(s[t.keyCode]),s[t.keyCode]=0)},this)})},r.prototype.getSelf=function(){return this},r}),N2Require("CanvasUserInterface",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.isShown=!t.jStorage.get("ssLayersShown",!1),this.tlHeight=t.jStorage.get("ssLayersHeight")||200,this.$container=t("#n2-ss-layers"),this.fixScroll(),this.switchLayerList(),this.topBar=t(".n2-ss-layer-list-top-bar").on("mousedown",t.proxy(this.resizeStart,this)),this.topBar.find(".n2-ss-layer-list-opener").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),t(".n2-ss-slide-show-layers").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),this.onResize(),t(window).on("resize",t.proxy(this.onResize,this))}return r.prototype.onResize=function(){var t=this.$container.height();this.paneLeft.height(t-48),this.paneRight.height(t-48)},r.prototype.onActivateLayer=function(t){var e=this.paneLeft.scrollTop(),i=0,n=t;do i+=n.layerRow.get(0).offsetTop,n=n.group;while(n!==this.canvasManager.mainContainer);(e>i||i>e+this.paneLeft.height()-40)&&(this.paneLeft.scrollTop(i),this.paneRight.scrollTop(i))},r.prototype.fixScroll=function(){this.paneLeft=t(".n2-ss-layers-sidebar-rows"),this.paneRight=t(".n2-ss-timeline-content-layers-container");var e=t.proxy(function(t){var e=this.paneLeft.scrollTop();t.originalEvent.deltaY>0?e+=40:e-=40,e=40*Math.round(e/40),this.paneLeft.scrollTop(e),this.paneRight.scrollTop(e),t.preventDefault()},this);this.paneLeft.on("mousewheel",e),this.paneLeft.on("scroll",t.proxy(function(t){var e=this.paneLeft.scrollTop();this.paneRight.scrollTop(e),t.preventDefault()},this)),this.paneRight.on("mousewheel",e)},r.prototype.resizeStart=function(e){this.isShown&&(e.target==this.topBar[0]||t(e.target).hasClass("n2-h2"))&&(e.preventDefault(),this.startY=e.clientY,this.height=this.$container.height(),t("body").on({"mousemove.n2-ss-tl-resize":t.proxy(this.resizeMove,this),"mouseup.n2-ss-tl-resize":t.proxy(this.resizeStop,this),"mouseleave.n2-ss-tl-resize":t.proxy(this.resizeStop,this)}))},r.prototype.resizeMove=function(t){t.preventDefault(),this.setTLHeight(this._calculateDesiredHeight(t))},r.prototype.resizeStop=function(e){e.preventDefault(),t("body").off(".n2-ss-tl-resize");var i=this._calculateDesiredHeight(e);this.setTLHeight(i),this.tlHeight=i,t.jStorage.set("ssLayersHeight",i),t("#n2-admin").triggerHandler("resize")},r.prototype._calculateDesiredHeight=function(t){var e=this.startY-t.clientY+this.height-48;return this.__calculateDesiredHeight(e)},r.prototype.__calculateDesiredHeight=function(t){return 40*Math.round(Math.min(Math.max(40,t),(window.innerHeight||document.documentElement.clientHeight)/2)/40)+48},r.prototype.switchLayerList=function(){this.isShown=!this.isShown,this.$container.toggleClass("n2-active",this.isShown),this.isShown?this.setTLHeight(this.tlHeight):this.setTLHeight(48),t.jStorage.set("ssLayersShown",this.isShown)},r.prototype.setTLHeight=function(t){t=Math.max(48,t),this.$container.height(t),t=this.$container.height(),this.paneLeft.height(t-48),this.paneRight.height(t-48),nextend.triggerResize()},r.prototype.activateAdd=function(t,e){this.$add.css({left:t,top:e}).appendTo(this.$container)},r}),N2Require("LayerFeatures",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e){this.fields=t,this.canvasManager=e,this.initParentLinker(),this.initAlign(),this.initEvents()}var s={left:0,center:1,right:2,top:0,middle:1,bottom:2};return r.prototype.initParentLinker=function(){var e=this.fields.parentid.data("field");t("#n2-ss-layer-parent-linker").on({click:function(t){e.click(t)}})},r.prototype.initAlign=function(){this.layerDefault={align:null,valign:null};var e=t("#n2-ss-layer-horizontal-align .n2-radio-option"),i=t("#n2-ss-layer-vertical-align .n2-radio-option");e.add(i).on("click",t.proxy(function(n){if(n.ctrlKey||n.metaKey){var r=t(n.currentTarget),s=r.hasClass("n2-sub-active"),o=r.data("align");switch(o){case"left":case"center":case"right":e.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-horizontal-align",null),this.layerDefault.align=null):(t.jStorage.set("ss-item-horizontal-align",o),this.layerDefault.align=o,r.addClass("n2-sub-active"));break;case"top":case"middle":case"bottom":i.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-vertical-align",null),this.layerDefault.valign=null):(t.jStorage.set("ss-item-vertical-align",o),this.layerDefault.valign=o,r.addClass("n2-sub-active"))}}else if(this.canvasManager.mainContainer.getSelectedLayer()){var o=t(n.currentTarget).data("align");switch(o){case"left":case"center":case"right":this.horizontalAlign(o,!0);break;case"top":case"middle":case"bottom":this.verticalAlign(o,!0)}}},this)),this.fields.align.on("nextendChange",t.proxy(function(){switch(e.removeClass("n2-active"),this.fields.align.val()){case"left":e.eq(0).addClass("n2-active");break;case"center":e.eq(1).addClass("n2-active");break;case"right":e.eq(2).addClass("n2-active")}},this)),this.fields.valign.on("nextendChange",t.proxy(function(){switch(i.removeClass("n2-active"),this.fields.valign.val()){case"top":i.eq(0).addClass("n2-active");break;case"middle":i.eq(1).addClass("n2-active");break;case"bottom":i.eq(2).addClass("n2-active")}},this));var n=t.jStorage.get("ss-item-horizontal-align",null),r=t.jStorage.get("ss-item-vertical-align",null);null!=n&&(e.eq(s[n]).addClass("n2-sub-active"),this.layerDefault.align=n),null!=r&&(i.eq(s[r]).addClass("n2-sub-active"),this.layerDefault.valign=r)},r.prototype.horizontalAlign=function(t,e){this.fields.align.val()!=t?this.fields.align.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.left.val(0).trigger("change")},r.prototype.verticalAlign=function(t,e){this.fields.valign.val()!=t?this.fields.valign.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.top.val(0).trigger("change")},r.prototype.initEvents=function(){var e=t("#n2-tab-events"),i=e.find(".n2-h3"),n=i.html(),r=t('<div class="n2-editor-header n2-h2 n2-uc"><span>'+n+"</span></div>");i.replaceWith(r)},r}),N2Require("LayerWindow",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isMinimized=!1,this.detachedPosition={left:t.jStorage.get("ssPanelLeft")||200,top:t.jStorage.get("ssPanelTop")||100,height:t.jStorage.get("ssPanelHeight")||400},this.hasBreadcrumb=!1,this.lastHeight=this.detachedPosition.height,this.admin=t("#n2-admin"),this.sidebar=t("#n2-ss-layer-window").on("mousedown",t.proxy(nextend.context.setMouseDownArea,nextend.context,"sidebarClicked")),this.title=this.sidebar.find(".n2-ss-layer-window-title-inner"),this.sidebarTD=this.sidebar.parent(),this.canvasManager=e,i.layerWindow=this,this.viewPanes={layerEdit:t("#n2-tabbed-slide-editor-settings > .n2-tabs").addClass("n2-scrollable")};for(var n in this.viewPanes)this.viewPanes[n].on("DOMMouseScroll mousewheel",function(e){var i=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(i=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(i=e.originalEvent.deltaY<0),e.originalEvent.detail&&(i=e.originalEvent.detail<0));var n=function(){return e.stopPropagation(),e.preventDefault(),e.returnValue=!1,!1};return!i&&this.scrollHeight<=t(this).innerHeight()+this.scrollTop+1?n():i&&0>=this.scrollTop-1?n():void 0});this.panelHeading=t("#n2-tabbed-slide-editor-settings").find(".n2-sidebar-tab-switcher .n2-td");var r=this.sidebar.find(".n2-ss-layer-window-title-nav-left");t('<a href="#"><i class="n2-i n2-i-minimize n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.toggleMinimize()},this)).appendTo(r);var s=this.sidebar.find(".n2-ss-layer-window-title-nav-right");t('<a href="#"><i class="n2-i n2-i-closewindow n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.hide()},this)).appendTo(s),nextend.tooltip.add(s),this.$breadcrumb=t('<div class="n2-ss-layer-window-breadcrumb"></div>').insertAfter("#n2-tabbed-slide-editor-settings > .n2-sidebar-tab-switcher");var o=t("#n2-ss-add-sidebar");t(".n2-ss-add-layer-button").on("click",function(e){e.preventDefault(),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(0).trigger("click"),o.toggleClass("n2-active")}),t(".n2-ss-core-item").on("click",function(t){o.removeClass("n2-active")});var a=t("#wpadminbar, .navbar-fixed-top").height()+t(".n2-top-bar").height();this.$verticalBarInner=t(".n2-ss-add-sidebar-inner").each(function(){var e=t(this);e.fixTo(e.parent(),{top:a})}),this.$resizeInnerContainer=t("#n2-ss-layers-switcher_0, #n2-ss-layers-switcher_1"),this.extraHeightToRemove=60,this.$resizeInnerContainer.length||(this.extraHeightToRemove=0,this.$resizeInnerContainer=this.$verticalBarInner),this.$resizeInnerContainer.css("overflow","auto"),this.detach(),t("#n2-admin").on("resize",t.proxy(this.resizeVerticalBar,this)),t(window).on("resize",t.proxy(this.onResize,this)),t(".n2-ss-slide-duplicate-layer").on("click",t.proxy(function(t){t.preventDefault(),this.duplicate()},this.canvasManager)),t(".n2-ss-slide-delete-layer").on("click",t.proxy(function(t){t.preventDefault(),this["delete"]()},this.canvasManager)),t("body").on("mousedown",t.proxy(function(t){"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.hide()},this));var l=t('<div id="n2-ss-devicespecific-settings"></div>'),h=nextend.smartSlider.frontend.responsive.parameters.deviceModes;for(var n in h)if(h[n]){var d=n.replace(/([A-Z])/g," $1").split(" "),c=d[0],p=d[1].toLowerCase();l.append('<i class="n2-i n2-it n2-i-mini-'+c+"-"+p+'" data-device="'+c+'" data-orientation="'+p+'"></i>')}var u={mouseenter:t.proxy(function(t){l.appendTo(t.currentTarget)},this),mouseleave:t.proxy(function(t){l.detach()},this)};this.sidebar.find("[data-devicespecific] label").prepend('<span class="n2-i n2-i-mini-desktop-portrait"></span>'),this.sidebar.find("[data-devicespecific] label").on(u),l.find(".n2-i").on({click:t.proxy(function(e){e.preventDefault();var i=t(e.currentTarget);t("#n2-ss-devices").find('[data-device="'+i.data("device")+'"][data-orientation="'+i.data("orientation")+'"]').trigger("click")},this)})}return r.prototype.toggleMinimize=function(){this.isMinimized=!this.isMinimized,this.sidebar.toggleClass("n2-ss-layer-window-minized",this.isMinimized),this.isMinimized||this.onResize()},r.prototype.show=function(e,i){this.setTitle(e),t("body").addClass("n2-ss-layer-edit-visible")},r.prototype._show=function(){t("body").addClass("n2-ss-layer-edit-visible")},r.prototype.hide=function(){t("body").removeClass("n2-ss-layer-edit-visible")},r.prototype.isVisible=function(){return t("body").hasClass("n2-ss-layer-edit-visible")},r.prototype.hideWithDeferred=function(e){t("body").hasClass("n2-ss-layer-edit-visible")&&(this.hide(),e.done(t.proxy(this._show,this)))},r.prototype.setTitle=function(t){this.title.html(t.getName()),this.updateGroupTitle(t)},r.prototype.updateGroupTitle=function(e){var i;for(this.$breadcrumb.html(""),i=0;5>i&&(t('<span class="n2-window-title-structure-nav"><span>'+e.label+'</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},e),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},e),click:t.proxy(function(t){this.canvasManager.deHighlight(this),this.activate(t)},e)}).prependTo(this.$breadcrumb),e.group&&e.group!==this.canvasManager.mainContainer);i++)e=e.group;this.hasBreadcrumb=i>0,this.$breadcrumb.toggleClass("n2-has-breadcrumb",this.hasBreadcrumb),this.onResize()},r.prototype.getLayerEditExcludedHeight=function(){return 85+(this.hasBreadcrumb?23:0)},r.prototype.resizeVerticalBar=function(){this.$resizeInnerContainer.height((window.innerHeight||document.documentElement.clientHeight)-(t("#n2-ss-layers").is(":visible")&&t("#n2-ss-layers").hasClass("n2-active")?t("#n2-ss-layers").height():0)-t("#wpadminbar, .navbar-fixed-top").height()-t(".n2-top-bar").height()-this.extraHeightToRemove)},r.prototype.onResize=function(){this.sidebar.css("display","block"),this.resizeVerticalBar();var t=window.innerHeight||document.documentElement.clientHeight,e=this.sidebar.height()-this.getLayerEditExcludedHeight();this.viewPanes.layerEdit.height(e);var i={},n=window.innerWidth||document.documentElement.clientWidth,r=this.sidebar[0].getBoundingClientRect();r.left<0?i.left=0:r.left+r.width>n&&(i.left=Math.max(0,n-r.width)),r.height>t-r.top&&(i.top=t-r.top-r.height+r.top,i.top<0&&(this.lastHeight=i.height=r.height+i.top,i.top=0)),this.sidebar.css(i),this.sidebar.css("display","")},r.prototype.detach=function(){this.sidebar.css(this.detachedPosition),this.sidebar.appendTo(this.admin),this.admin.addClass("n2-sidebar-hidden"),t(window).off(".n2-ss-panel"),this.sidebar.removeClass("n2-sidebar-fixed"),this.sidebar.draggable({distance:5,handle:".n2-ss-layer-window-title",containment:"window",stop:t.proxy(function(e,i){
5
- this.sidebar.css("height",this.lastHeight);var n=this.sidebar[0].getBoundingClientRect();this.detachedPosition.left=n.left,this.detachedPosition.top=n.top,t.jStorage.set("ssPanelLeft",n.left),t.jStorage.set("ssPanelTop",n.top)},this),scroll:!1}).resizable({distance:5,handles:"s",stop:t.proxy(function(e,i){this.lastHeight=this.detachedPosition.height=this.sidebar.height(),t.jStorage.set("ssPanelHeight",this.detachedPosition.height)},this),create:t.proxy(function(e,i){t(e.target).find(".ui-resizable-handle").addClass("n2-ss-layer-window-resizer")},this)}),this.onResize(),nextend.triggerResize()},r.prototype.switchTab=function(t){this.panelHeading.filter('[data-tab="'+t+'"]').trigger("click")},r}),N2Require("PositionDisplay",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.currentSource="",t(window).ready(t.proxy(this.ready,this))}return r.prototype.ready=function(){this.$body=t("body"),this.$el=t('<div class="n2 n2-ss-position-display"/>').appendTo("body")},r.prototype.show=function(t){""==this.currentSource&&(this.currentSource=t,this.$el.addClass("n2-active"),this.$body.addClass("n2-position-display-active"))},r.prototype.update=function(t,e,i){this.currentSource==e&&this.$el.html(i).css({left:t.pageX+10,top:t.pageY+10})},r.prototype.hide=function(t){this.currentSource!=t&&t!==n||(this.$body.removeClass("n2-position-display-active"),this.$el.removeClass("n2-active"),this.currentSource="")},i.positionDisplay=new r,r}),N2Require("Ruler",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.showGuides=1,this.guides=[],this.container=t('<div class="n2-ruler-container" />').appendTo("#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container"),this.scale=10,this.vertical=t('<div class="n2-ruler n2-ruler-vertical unselectable"></div>').appendTo(".n2-ss-slider-real-container"),this.horizontal=t('<div class="n2-ruler n2-ruler-horizontal unselectable"></div>').appendTo(this.container),this.verticalSpans=t(),this.horizontalSpans=t(),this.onResize(),nextend.smartSlider.frontend.sliderElement.on("SliderResize",t.proxy(this.onSliderResize,this)),t(window).on("resize",t.proxy(this.onResize,this)),this.horizontal.on("mousedown",t.proxy(function(t){this.showGuides&&new o(this,this.horizontal,t)},this)),this.vertical.on("mousedown",t.proxy(function(t){this.showGuides&&new a(this,this.vertical,t)},this));try{e=t.extend({vertical:[],horizontal:[]},JSON.parse(Base64.decode(e)));for(var i=0;i<e.horizontal.length;i++){var n=new o(this,this.horizontal);n.setPosition(e.horizontal[i])}for(var i=0;i<e.vertical.length;i++){var n=new a(this,this.vertical);n.setPosition(e.vertical[i])}}catch(r){}nextend.ruler=this,this.measureToolVertical(),this.measureToolHorizontal()}function s(e,i,n){this.ruler=e,this.container=i,this.position=0,this.guide=t('<div class="n2-ruler-guide n2-ruler-user-guide"><div class="n2-ruler-guide-border"></div><div class="n2-ruler-guide-handle"></div></div>').appendTo(i).on("mousedown",t.proxy(function(t){t.preventDefault(),t.stopPropagation(),nextend.smartSlider.canvasManager.canvasSettings.settings["n2-ss-lock-guides"]||this["delete"]()},this)),this.ruler.addGuide(this),n&&this.create(n)}function o(){s.prototype.constructor.apply(this,arguments)}function a(){s.prototype.constructor.apply(this,arguments)}return r.prototype.addGuide=function(t){this.guides.push(t)},r.prototype.removeGuide=function(e){this.guides.splice(t.inArray(e,this.guides),1)},r.prototype.clearGuides=function(){for(var t=this.guides.length-1;t>=0;t--)this.guides[t]["delete"]()},r.prototype.onSliderResize=function(t,e){this.onResize()},r.prototype.onResize=function(){var e=nextend.smartSlider.frontend.responsive.responsiveDimensions,i=Math.max(e.slider.width,t("#n2-ss-slide-canvas-container").outerWidth(!0)-40),n=Math.max(e.slider.height,t("#n2-ss-slide-canvas-container").outerHeight(!0));this.container.css({width:i+40,height:n+40});for(var r=this.horizontalSpans.length-3;r<i/this.scale;r++){var s=t("<span />").appendTo(this.horizontal);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.horizontalSpans=this.horizontalSpans.add(s)}for(var r=this.verticalSpans.length-3;r<n/this.scale;r++){var s=t("<span />").appendTo(this.vertical);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.verticalSpans=this.verticalSpans.add(s)}},r.prototype.toArray=function(){for(var t={horizontal:[],vertical:[]},e=0;e<this.guides.length;e++)this.guides[e]instanceof o?t.horizontal.push(this.guides[e].position):this.guides[e]instanceof a&&t.vertical.push(this.guides[e].position);return t},r.prototype.measureToolVertical=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.vertical),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.vertical.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.vertical.offset().top);r(),this.vertical.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageY){var l=n.pageY-a;e.css("top",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageY}},this))}},this),mouseleave:t.proxy(function(){this.vertical.off(".n2-ruler-measure-tool"),s()},this)})},r.prototype.measureToolHorizontal=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.horizontal),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.horizontal.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.horizontal.offset().left);r(),this.horizontal.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageX){var l=Math.max(n.pageX-a,40);e.css("left",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageX}},this))}},this),mouseleave:t.proxy(function(){this.horizontal.off(".n2-ruler-measure-tool"),s()},this)})},s.prototype._position=function(t,e){return Math.max(0,t)},s.prototype.setPosition=function(t){this.position=t,this.refresh()},s.prototype.refresh=function(){this.positionRender(this.position)},s.prototype["delete"]=function(){this.ruler.removeGuide(this),this.guide.remove()},o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.prototype.create=function(t){var e=Math.round(this.container.offset().left)+40;this.position=this._position(t.pageX-e,t),this.positionRender(this.position)},o.prototype.rawPositionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},o.prototype.positionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.create=function(t){var e=Math.round(this.container.offset().top)+40;this.position=this._position(t.pageY-e,t),this.positionRender(this.position)},a.prototype.rawPositionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},a.prototype.positionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},r}),N2Require("CanvasSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.settings={};var i=t("#n2-ss-slide-canvas-settings").on("mouseleave",t.proxy(function(){i.removeClass("n2-active")},this));i.find("> a").on("click",function(t){t.preventDefault(),i.toggleClass("n2-active")}),this.$settingsPanel=i.find(".n2-ss-settings-panel-inner"),this.snapTo(),this.roundTo(),this.colorScheme(),this.canvasManager.slideEditManager.options.isAddSample||this.ruler()}return r.prototype._addSettings=function(e,i,n,r){this.settings[e]=parseInt(t.jStorage.get(e,n));var s=t('<a href="">'+i+'<span class="n2-setting-tick"><i class="n2-i n2-it n2-i-tick2"></i></span></a>').on("click",t.proxy(function(i){i.preventDefault(),this.settings[e]=1==this.settings[e]?0:1,t.jStorage.set(e,this.settings[e]),s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!1)},this)).appendTo(this.$settingsPanel);s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!0)},r.prototype._addAction=function(e,i){t('<a href="" class="n2-panel-action">'+e+"</a>").on("click",t.proxy(function(t){t.preventDefault(),i()},this)).appendTo(this.$settingsPanel)},r.prototype.get=function(t){return this.settings[t]},r.prototype.snapTo=function(){this._addSettings("n2-ss-snap-to-enabled",n2_("Smart Snap"),1,t.proxy(function(t){for(var e=this.mainContainer.container.getSortedLayers(),i=0;i<e.length;i++)e[i].placement.doAction("snap")},this.canvasManager))},r.prototype.roundTo=function(){this._addSettings("n2-ss-round-to-enabled",n2_("Round to 5px"),1,function(t){1==t?nextend.roundTo=5:nextend.roundTo=1})},r.prototype.colorScheme=function(){var e=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-theme-dark",n2_("Dark Mode"),0,function(t){e.toggleClass("n2-ss-theme-dark",1==t)})},r.prototype.ruler=function(){i.ruler=new e.Ruler(t("#slideguides").val());var n=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-ruler-enabled",n2_("Ruler"),1,t.proxy(function(t){n.toggleClass("n2-ss-has-ruler",1==t),nextend.triggerResize()},this)),this._addSettings("n2-ss-show-guides",n2_("Show Guides"),1,t.proxy(function(t){nextend.ruler.showGuides=t,n.toggleClass("n2-ss-show-guides",1==t)},this)),this._addSettings("n2-ss-lock-guides",n2_("Lock Guides"),0,t.proxy(function(t){n.toggleClass("n2-ss-lock-guides",1==t)},this)),this._addAction("Clear Guides",t.proxy(function(){nextend.ruler.clearGuides()},this))},r}),N2Require("PlacementAbsolute",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="absolute",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments),this.doThrottledTheResize=this.doTheResize,this._triggerLayerResizedThrottled=NextendThrottle(this._triggerLayerResized,30),this.parentIsVisible=!0,this.children=[]}var s=function(){var t=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){var i,n=(new Date).getTime();return i=Math.max(0,16-(n-t)),t=n+i,setTimeout(function(){e(n+i)},i)}}(),o={raf:!1,ratios:null,isThrottled:!1,layers:[]},a=function(){o.raf===!1&&(o.raf=!0,s(function(){for(var t=0;t<o.layers.length;t++)o.layers[t].isDeleted||o.layers[t].doTheResize(o.ratios,!0,o.isThrottled);o={raf:!1,ratios:null,isThrottled:!1,layers:[]}}))};return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer,this.$layerRow=this.layer.layerRow},r.prototype.preActivation=function(t){if("normal"==t.type){var e=this.layer.getProperty("height");e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);n.length>0?this.activatedAfterParentReady(e):setTimeout(t.proxy(function(){this.activatedAfterParentReady(e)},this),300)}else this._activated(e)},r.prototype.activatedAfterParentReady=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);if(n.length>0){var r=n.data("layerObject");r?r.readyDeferred.done(t.proxy(this._activated,this,e)):n.on("layerStarted",t.proxy(function(i,n){n.readyDeferred.done(t.proxy(this._activated,this,e))},this))}else this.$layer.data("parentid",""),this._activated(e)}else this._activated(e)},r.prototype._activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.$layer.css("zIndex",""),this.___makeLayerAlign(),this.___makeLayerResizeable()},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""});for(var i=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[a+s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){this.$layer.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""}),this.alignMarker.remove(),this.$layer.nextendResizable("destroy"),this.$layer.off(".n2-ss-absolute"),this.$layer.triggerHandler("LayerUnavailable");var e=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],i=this.layer.getPropertiesData(e);return this.layer.removeProperties(e),this.chainParent.remove(),i},r.prototype.loadProperties=function(e){this.layer.createProperty("parentid",null,this.layer.layer,this),this.layer.createProperty("responsiveposition",1,this.layer.layer,this),this.layer.createProperty("responsivesize",1,this.layer.layer,this),this.layer.createDeviceProperty("parentalign",{desktopPortrait:"center"},this.layer.layer,this),this.layer.createDeviceProperty("parentvalign",{desktopPortrait:"middle"},this.layer.layer,this),this.layer.createDeviceProperty("align",{desktopPortrait:e.align||"center"},this.layer.layer,this),this.layer.createDeviceProperty("valign",{desktopPortrait:e.valign||"middle"},this.layer.layer,this),this.layer.createDeviceProperty("left",{desktopPortrait:e.left||0},this.layer.layer,this),this.layer.createDeviceProperty("top",{desktopPortrait:e.top||0},this.layer.layer,this),this.layer.createDeviceProperty("width",{desktopPortrait:e.width||"auto"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:e.height||"auto"},this.layer.layer,this);var i=this.layer.layer;this.subscribeParentCallbacks={},this.layer.getProperty("parentid")&&this.subscribeParent(),i.attr({"data-align":this.layer.getProperty("align"),"data-valign":this.layer.getProperty("valign")});var n=null;this.chainParent=t('<div class="n2-ss-layer-chain-parent n2-button n2-button-icon n2-button-xs n2-radius-s n2-button-blue"><i class="n2-i n2-i-layerunlink"></i></div>').on({click:t.proxy(this.unlink,this),mouseenter:t.proxy(function(){n=t("#"+this.layer.getProperty("parentid")).addClass("n2-highlight")},this),mouseleave:t.proxy(function(){n&&(n.removeClass("n2-highlight"),n=null)},this)}).appendTo(this.$layer)},r.prototype.triggerLayerResized=function(t,e){t?this._triggerLayerResized(t,e):this._triggerLayerResizedThrottled(!0,e)},r.prototype._triggerLayerResized=function(t,e){this.layer.isDeleted||this.$layer.triggerHandler("LayerResized",[e||{slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t||!1])},r.prototype.___makeLayerAlign=function(){this.alignMarker=t('<div class="n2-ss-layer-cc" />').appendTo(this.$layer)},r.prototype.___makeLayerResizeable=function(){this._resizableJustClick=!1,this.$layer.nextendResizable({handles:"n, e, s, w, ne, se, sw, nw",_containment:this.canvasManager.mainContainer.layer,start:t.proxy(this.____makeLayerResizeableStart,this),resize:t.proxy(this.____makeLayerResizeableResize,this),stop:t.proxy(this.____makeLayerResizeableStop,this),create:t.proxy(function(){this.$layer.find(".ui-resizable-handle, .n2-ss-layer-cc").on({mousedown:t.proxy(function(t){this._resizableJustClick=[t.clientX,t.clientY]},this),mouseup:t.proxy(function(e){if(this._resizableJustClick&&Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0]-e.clientX,2)+Math.pow(this._resizableJustClick[1]-e.clientY,2)))<1){var i=t(e.currentTarget),n=this.canvasManager.layerOptions.layerFeatures;i.hasClass("ui-resizable-nw")?(n.horizontalAlign("left",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-w")?(n.horizontalAlign("left",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-sw")?(n.horizontalAlign("left",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-n")?(n.horizontalAlign("center",!1),n.verticalAlign("top",!1)):i.hasClass("n2-ss-layer-cc")?(n.horizontalAlign("center",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-s")?(n.horizontalAlign("center",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-ne")?(n.horizontalAlign("right",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-e")?(n.horizontalAlign("right",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-se")&&(n.horizontalAlign("right",!1),n.verticalAlign("bottom",!1))}this._resizableJustClick=!1},this)})},this),smartguides:t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),tolerance:5}).on({"mousedown.n2-ss-absolute":t.proxy(function(t){!this.layer.status!=e.ComponentAbstract.STATUS.LOCKED&&(i.positionDisplay.show("Canvas"),i.positionDisplay.update(t,"Canvas","W: "+parseInt(this.$layer.width())+"px<br />H: "+parseInt(this.$layer.height())+"px")),document.activeElement&&document.activeElement.blur()},this),"mouseup.n2-ss-absolute":t.proxy(function(t){i.positionDisplay.hide("Canvas")},this)})},r.prototype.____makeLayerResizeableStart=function(e,n){this.preventActivation=!0,this.resizableDeferred=t.Deferred(),this.canvasManager.layerWindow.hideWithDeferred(this.resizableDeferred),t("body").addClass("n2-ss-resize-layer"),this._resizableJustClick&&(this._resizableJustClick=!1),this.____makeLayerResizeableResize(e,n),i.positionDisplay.show("Canvas")},r.prototype.____makeLayerResizeableResize=function(t,e){i.positionDisplay.update(t,"Canvas","W: "+e.size.width+"px<br />H: "+e.size.height+"px"),this.triggerLayerResized()},r.prototype.____makeLayerResizeableStop=function(e,n){t("body").removeClass("n2-ss-resize-layer"),this.resizableDeferred.resolve();var r=!1;if("n"==n.axis||"s"==n.axis||n.originalSize.width==n.size.width){var s=this.layer.getProperty("width");this.layer.isDimensionPropertyAccepted(s)&&(r=!0,this._syncwidth())}var o=!1;if("e"==n.axis||"w"==n.axis||n.originalSize.height==n.size.height){var s=this.layer.getProperty("height");this.layer.isDimensionPropertyAccepted(s)&&(o=!0,this._syncheight())}var a=this.canvasManager.getResponsiveRatio("h"),l=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsivesize"))||(a=l=1);var h=null;r||(h=Math.round(n.size.width*(1/a)));var d=null;o||(d=Math.round(n.size.height*(1/l))),this._setPosition(null,null,n.position.left,n.position.top,h,d,!0),this.triggerLayerResized(),this.$layer.triggerHandler("LayerUnParent"),i.positionDisplay.hide("Canvas"),setTimeout(t.proxy(function(){this.preventActivation=!1},this),80)},r.prototype._setPosition=function(t,e,n,r,s,o,a){var l=this.layer.getMode();null===t&&(t=this.layer.getProperty("align")),null===e&&(e=this.layer.getProperty("valign")),null===n?n=this.layer.getProperty("left"):a&&(n=this.calculatePositionLeft(t,n)),null===r?r=this.layer.getProperty("top"):a&&(r=this.calculatePositionTop(e,r)),null===s&&(s=this.layer.getProperty("width")),null===o&&(o=this.layer.getProperty("height"));var h=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStorePosition",l]);h&&h.setValues({align:this.layer.getRawProperty("align"),valign:this.layer.getRawProperty("valign"),left:this.layer.getRawProperty("left"),top:this.layer.getRawProperty("top"),width:this.layer.getRawProperty("width"),height:this.layer.getRawProperty("height")},{align:t,valign:e,left:n,top:r,width:s,height:o}),i.history.off(),this.layer.store("width",s,!0,"layer"),this.layer.$.trigger("propertyChanged",["width",s]),this.layer.store("height",o,!0,"layer"),this.layer.$.trigger("propertyChanged",["height",o]),this.layer.store("align",t,!0,"layer"),this.layer.$.trigger("propertyChanged",["align",t]),this.layer.store("valign",e,!0,"layer"),this.layer.$.trigger("propertyChanged",["valign",e]),this.layer.store("left",n,!0,"layer"),this.layer.$.trigger("propertyChanged",["left",n]),this.layer.store("top",r,!0,"layer"),this.layer.$.trigger("propertyChanged",["top",r]),i.history.on()},r.prototype.historyStorePosition=function(t,e){this.layer.historyStore(t.align,"align",e),this.layer.historyStore(t.valign,"valign",e),this.layer.historyStore(t.width,"width",e),this.layer.historyStore(t.height,"height",e),this.layer.historyStore(t.left,"left",e),this.layer.historyStore(t.top,"top",e),this.triggerLayerResized()},r.prototype.calculatePositionLeft=function(t,e){var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={left:0,leftMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentalign")){case"right":r.left=s.left+n.width();break;case"center":r.left=s.left+n.width()/2;break;default:r.left=s.left}}else switch(n=this.$layer.parent(),t){case"center":r.left+=n.width()/2;break;case"right":r.left+=n.width()}var e;switch(t){case"left":e=-Math.round((r.left-e)*(1/i));break;case"center":e=-Math.round((r.left-e-this.$layer.width()/2)*(1/i));break;case"right":e=-Math.round((r.left-e-this.$layer.width())*(1/i))}return e},r.prototype.calculatePositionTop=function(t,e){var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={top:0,topMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentvalign")){case"bottom":r.top=s.top+n.height();break;case"middle":r.top=s.top+n.height()/2;break;default:r.top=s.top}}else switch(n=this.$layer.parent(),t){case"middle":r.top+=n.height()/2;break;case"bottom":r.top+=n.height()}var e;switch(t){case"top":e=-Math.round((r.top-e)*(1/i));break;case"middle":e=-Math.round((r.top-e-this.$layer.height()/2)*(1/i));break;case"bottom":e=-Math.round((r.top-e-this.$layer.height())*(1/i))}return e},r.prototype.moveX=function(t){this._setPosition(null,null,this.layer.getProperty("left")+t,null,null,null,!1)},r.prototype.moveY=function(t){this._setPosition(null,null,null,this.layer.getProperty("top")+t,null,null,!1)},r.prototype.setPositionLeft=function(t){t=this.calculatePositionLeft(this.layer.getProperty("align"),t),this.layer.store("left",t,!0),this.layer.$.trigger("propertyChanged",["left",t])},r.prototype.setPositionTop=function(t){t=this.calculatePositionTop(this.layer.getProperty("valign"),t),this.layer.store("top",t,!0),this.layer.$.trigger("propertyChanged",["top",t])},r.prototype.setPosition=function(t,e){this.setPositionLeft(t),this.setPositionTop(e)},r.prototype.setDeviceBasedAlign=function(){var t=this.layer.getMode();"undefined"==typeof this.layer.deviceProperty[t].align&&this.layer.setProperty("align",this.layer.getProperty("align"),"layer"),"undefined"==typeof this.layer.deviceProperty[t].valign&&this.layer.setProperty("valign",this.layer.getProperty("valign"),"layer")},r.prototype.setPropertyresponsiveposition=r.prototype.setPropertyresponsivesize=function(t,e,i){this.layer._setProperty(t,parseInt(e),i)},r.prototype.setPropertywidth=r.prototype.setPropertyheight=function(e,i,n){var r=i;this.layer.isDimensionPropertyAccepted(i)||(r=~~i,r!=i&&this.layer.$.trigger("propertyChanged",[e,r])),setTimeout(t.proxy(function(){this.onResize(!1)},this),50),this.layer._setProperty(e,r,n)},r.prototype.setPropertyleft=r.prototype.setPropertytop=function(t,e,i){var n=~~e;n!=e&&this.layer.$.trigger("propertyChanged",[t,n]),this.layer._setProperty(t,n,i)},r.prototype.render=function(t){this["_sync"+t]()},r.prototype.renderWithModifier=function(t,e,i){try{"width"!=t&&"height"!=t||!this.layer.isDimensionPropertyAccepted(e)?this["_sync"+t](Math.round(e*i)):this["_sync"+t](e)}catch(n){console.error("_sync"+t)}},r.prototype.onResize=function(t){this.resize({slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t)},r.prototype.resize=function(t,e){this.parent&&!e||this.addToResizeCollection(this,t,!1)},r.prototype.addToResizeCollection=function(t,e,i){o.ratios=e,o.isThrottled=i;for(var n=0;n<o.layers.length;n++)if(o.layers[n]==this){o.layers.splice(n,1);break}o.layers.push(t),a(),this.triggerLayerResized(i,e)},r.prototype._syncresponsiveposition=function(){this.onResize(!1)},r.prototype._syncwidth=function(){var t=this.layer.getProperty("width");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}t+="px"}this.$layer.css("width",t)},r.prototype._syncheight=function(){var t=this.layer.getProperty("height");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}t+="px"}this.$layer.css("height",t)},r.prototype._syncparentalign=function(){var t=this.layer.getProperty("parentalign");this.$layer.data("parentalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncparentvalign=function(){var t=this.layer.getProperty("parentvalign");this.$layer.data("parentvalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncleft=function(){var t=this.layer.getProperty("left");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("align"),r=this.layer.getProperty("parentalign"),s=0;switch(r){case"right":s=i.left+this.parent.width();break;case"center":s=i.left+this.parent.width()/2;break;default:s=i.left}switch(n){case"right":this.$layer.css({left:"auto",right:this.$layer.parent().width()-s-t+"px"});break;case"center":this.$layer.css({left:s+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:s+t+"px",right:"auto"})}}else switch(this.layer.getProperty("align")){case"right":this.$layer.css({left:"auto",right:-t+"px"});break;case"center":this.$layer.css({left:this.$layer.parent().width()/2+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:t+"px",right:"auto"})}this.triggerLayerResized()},r.prototype._synctop=function(){var t=this.layer.getProperty("top");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("valign"),r=this.layer.getProperty("parentvalign"),s=0;switch(r){case"bottom":s=i.top+this.parent.height();break;case"middle":s=i.top+this.parent.height()/2;break;default:s=i.top}switch(n){case"bottom":this.$layer.css({top:"auto",bottom:this.$layer.parent().height()-s-t+"px"});break;case"middle":this.$layer.css({top:s+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:s+t+"px",bottom:"auto"})}}else switch(this.layer.getProperty("valign")){case"bottom":this.$layer.css({top:"auto",bottom:-t+"px"});break;case"middle":this.$layer.css({top:this.$layer.parent().height()/2+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:t+"px",bottom:"auto"})}this.triggerLayerResized()},r.prototype._syncresponsivesize=function(){this.onResize(!1)},r.prototype.historyStoreDoubleProp=function(t,e,i,n){var r=this.layer.getMode();e==r?(this.layer._setProperty(i,t.value,"history"),this.layer._setProperty(n,t.value2,"history")):(this.layer.deviceProperty[e][i]=t.value,this.layer.deviceProperty[e][n]=t.value2,this.layer.$.trigger("propertyChanged",[i,this.layer.getProperty(i)]),this.layer.$.trigger("propertyChanged",[n,this.layer.getProperty(n)]),this.layer.render(i,null,"history"),this.layer.render(n,null,"history"))},r.prototype.setPropertyalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("left");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"align","left"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("left")})},r.prototype.setPropertyvalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("top");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"valign","top"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("top")})},r.prototype._syncalign=function(t,e){var i=this.layer.getProperty("align");this.$layer.attr("data-align",i),"history"!=e&&i!=t&&this.setPositionLeft(this.$layer.position().left)},r.prototype._syncvalign=function(t,e){var i=this.layer.getProperty("valign");this.$layer.attr("data-valign",i),"history"!=e&&i!=t&&this.setPositionTop(this.$layer.position().top)},r.prototype.fit=function(){var t=this.$layer.get(0);this.$layer.position();if(t.scrollWidth>0&&t.scrollHeight>0){var e=!1;if(this.layer.item&&(e=this.layer.item.fitLayer()),!e){this.layer.setProperty("width","auto","layer"),this.layer.setProperty("height","auto","layer");var i=this.$layer.width();Math.abs(this.canvasManager.mainContainer.layer.width()-this.$layer.position().left-i)<2&&this.layer.setProperty("width",i,"layer")}}},r.prototype.hide=function(t){this.layer.store(t?t:this.layer.getMode(),0,!0)},r.prototype.show=function(t){this.layer.store(t?t:this.layer.getMode(),1,!0)},r.prototype.changeStatus=function(t,i){t==e.ComponentAbstract.STATUS.LOCKED&&this.layer.nextendResizable("enable"),i==e.ComponentAbstract.STATUS.LOCKED&&this.$layer.nextendResizable("disable")},r.prototype.getParent=function(){return t("#"+this.layer.getProperty("parentid")).data("layerObject")},r.prototype.subscribeParent=function(){var e=this,i=t("#"+this.layer.property.parentid);this.parent&&!i.is(this.parent)&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1),this.parent||(this.subscribeParentCallbacks={LayerResized:function(){e.resizeParent.apply(e,arguments)},LayerParent:function(){e.$layer.addClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerParent")},LayerUnParent:function(){e.$layer.removeClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerUnParent")},LayerDeleted:function(t){e.layer.setProperty("parentid","","layer")},LayerUnavailable:function(t){e.layer.setProperty("parentid","","layer"),e.layer.setProperty("left",0,"layer"),e.layer.setProperty("top",0,"layer")},LayerShowChange:function(t,i,n){e.layer.getMode()==i&&(e.parentIsVisible=n)},"n2-ss-activate":function(){e.$layerRow.addClass("n2-parent-active")},"n2-ss-deactivate":function(){e.$layerRow.removeClass("n2-parent-active")},LayerGetDataWithChildren:function(t,i,n){e.layer.getDataWithChildren(i,n)}},this.parent=i.on(this.subscribeParentCallbacks),this.parent.data("layerObject").placement.current.addChild(this),this.$layer.addClass("n2-ss-layer-has-parent"))},r.prototype.unSubscribeParent=function(t){if(this.$layerRow.removeClass("n2-parent-active"),this.$layer.removeClass("n2-ss-layer-has-parent"),this.parent&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1,this.subscribeParentCallbacks={},"delete"!=t)){var e=this.$layer.position();this._setPosition(null,null,e.left,e.top,null,null,!0)}},r.prototype.addChild=function(t){this.children.push(t)},r.prototype.removeChild=function(e){this.children.splice(t.inArray(e,this.children),1)},r.prototype.unlink=function(t){t&&t.preventDefault(),this.layer.setProperty("parentid","","layer")},r.prototype.parentPicked=function(t,e,i,n,r){this.layer.setProperty("parentid","","layer"),this.layer.setProperty("align",n,"layer"),
6
- this.layer.setProperty("valign",r,"layer"),this.layer.setProperty("parentalign",e,"layer"),this.layer.setProperty("parentvalign",i,"layer"),this.layer.setProperty("parentid",t.requestID(),"layer");var s;for(var o in this.layer.deviceProperty)"desktopPortrait"!=o&&(this.layer.deviceProperty[o].left=s,this.layer.deviceProperty[o].top=s,this.layer.deviceProperty[o].valign=s,this.layer.deviceProperty[o].align=s)},r.prototype._syncparentid=function(){var e=this.layer.getProperty("parentid");if(e&&""!=e)if(0==t("#"+e).length)this.layer.setProperty("parentid","","layer");else{this.$layer.attr("data-parentid",e).addClass("n2-ss-layer-has-parent"),this.subscribeParent();var i=this.$layer.position();this._setPosition(null,null,i.left,i.top,null,null,!0)}else this.$layer.removeAttr("data-parentid"),this.unSubscribeParent()},r.prototype.snap=function(){this.$layer.nextendResizable("option","smartguides",t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this))},r.prototype._renderModeProperties=function(t){this.$layer.attr("data-align",this.layer.property.align),this.$layer.attr("data-valign",this.layer.property.valign),t&&this.onResize(!0)},r.prototype.doLinearResize=function(t){this.doThrottledTheResize(t,!0)},r.prototype.doTheResize=function(t,e,i){this.render("width"),this.render("height"),this.render("left"),this.render("top"),e||this.triggerLayerResized(i,t)},r.prototype.resizeParent=function(t,e,i){this.addToResizeCollection(this,e,i)},r.prototype.updatePosition=function(){var t=this.parent;if("center"==this.layer.getProperty("align")){var e=0;e=t?t.position().left+t.width()/2:this.$layer.parent().width()/2;var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("left",e-this.$layer.width()/2+this.layer.getProperty("left")*i)}if("middle"==this.layer.getProperty("valign")){var n=0;n=t?t.position().top+t.height()/2:this.$layer.parent().height()/2;var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("top",n-this.$layer.height()/2+this.layer.getProperty("top")*i)}this.triggerLayerResized()},r.prototype.getIndex=function(){var t=parseInt(this.$layer.css("zIndex"));return isNaN(t)&&(t=0),t},r.prototype.renderIndex=function(t){},r.prototype.sync=function(){this._syncalign(null,"history"),this._syncvalign(null,"history"),this._syncwidth(),this._syncheight(),this._synctop(),this._syncleft(),this._syncparentid()},r.prototype["delete"]=function(){var t=this.layer.getProperty("parentid");t&&this.unSubscribeParent("delete")},r.prototype.isParentOrChild=function(){return this.parent||this.children.length>0},r}),N2Require("PlacementContent",["PlacementAbstract"],[],function(t,e,i){"use strict";function n(t,i,n){this.type="content",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.PlacementAbstract.prototype),n.prototype.constructor=n,n}),N2Require("PlacementDefault",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="default",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.activated=function(t){this.startUISizing()},r.prototype.deActivated=function(t){this.$layer.nextendNormalSizing("destroy")},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this)})},r}),N2Require("PlacementNormal",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="normal",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.preActivation=function(t){if("absolute"==t.type&&this.layer.item&&this.layer.item.needSize){var e=this.layer.getProperty("height");e.match&&e.match(/[0-9]+%$/)?this.transferredProperties.height=Math.max(100,parseInt(this.$layer.parent().height()*parseInt(e)/100)):e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncmargin,this)),this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncheight,this)),this.startUISpacing(),this.startUISizing(),this.$layer.on({mousedown:t.proxy(function(t){t.stopPropagation()})})},r.prototype.loadProperties=function(t){this.layer.createDeviceProperty("margin",{desktopPortrait:"0|*|0|*|0|*|0|*|px+"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:t.height||0},this.layer.layer,this),this.layer.createDeviceProperty("maxwidth",{desktopPortrait:0},this.layer.layer,this),this.layer.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},this.layer.layer,this)},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeClass("n2-ss-has-maxwidth").removeAttr("data-cssselfalign").css({position:"",margin:"",height:"",maxWidth:""});for(var i=["margin","height","maxwidth","selfalign"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){this.layer.$.off(".placementnormal"),this.$layer.nextendSpacing("destroy"),this.$layer.nextendNormalSizing("destroy"),this.layer.layer.removeClass("n2-ss-has-maxwidth"),this.layer.layer.removeAttr("data-cssselfalign");var e=["margin","height","maxwidth","selfalign"],i=this.layer.getPropertiesData(e);return this.layer.removeProperties(e),this.layer.layer.css({position:"",margin:"",height:"",maxWidth:""}),i},r.prototype._renderModeProperties=function(t){this._syncmargin(),this._syncheight(),this._syncmaxwidth(),this._syncselfalign()},r.prototype._syncmargin=function(){var t=this.layer.getProperty("margin").split("|*|"),e=t.pop(),i=this.layer.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var t=t.join(e+" ")+e;this.layer.layer.css("margin",t),this.layer.update(),this.$layer.nextendSpacing("option","current",t)},r.prototype.startUISpacing=function(){this.$layer.nextendSpacing({mode:"margin",sync:{n:"margin-top",e:"margin-right",s:"margin-bottom",w:"margin-left"},handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Margin "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.layer.getProperty("margin").split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.$layer.css("fontSize"))-this.layer.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.layer.setProperty("margin",r.join("|*|")),t("#layernormal-margin").data("field").insideChange(r.join("|*|"))},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({height:e,syncWidth:!0,start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this),resizeHeight:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Height: "+e.value+"px")},this),stopHeight:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing");var n=1;parseInt(this.$layer.css("fontSize"))!=this.layer.baseSize&&(n=this.canvasManager.getResponsiveRatio("h"));var r=Math.round(r/n);this.layer.setProperty("height",e.value)},this)})},r.prototype._syncheight=function(){var t=parseInt(this.layer.getProperty("height"));if(t>0){var e="px",i=this.layer.baseSize;i>0&&(e="em",t=parseInt(t)/i),this.layer.layer.css("height",t+e)}else this.layer.layer.css("height","");this.layer.update()},r.prototype._syncmaxwidth=function(){var t=parseInt(this.layer.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.layer.update()},r.prototype._syncselfalign=function(){this.layer.layer.attr("data-cssselfalign",this.layer.getProperty("selfalign"))},r.prototype.sync=function(){this._syncmargin(),this._syncheight(),this._syncmaxwidth()},r}),N2Require("Placement",[],[],function(t,e,i){"use strict";function n(t){this.layer=t,this.canvasManager=t.canvasManager,this.modes={},this.current=null,this.isTransferHandled=!1,this.updatePositionThrottled=NextendDeBounce(this.updatePosition,200)}return n.prototype.allow=function(t){switch(t){case"absolute":this.modes.absolute=new e.PlacementAbsolute(this,this.layer,this.canvasManager);break;case"normal":this.modes.normal=new e.PlacementNormal(this,this.layer,this.canvasManager);break;case"group":this.modes.absolute=new e.PlacementGroup(this,this.layer,this.canvasManager);break;case"content":this.modes.absolute=new e.PlacementContent(this,this.layer,this.canvasManager);break;case"default":this.modes["default"]=new e.PlacementDefault(this,this.layer,this.canvasManager)}},n.prototype.start=function(){for(var t in this.modes)this.modes[t].start()},n.prototype.setMode=function(t,e){var i=!1;if(e=e||{},"undefined"==typeof this.modes[t])throw new Exception("Layer placement("+t+") not allowed for the container",this.layer);if(this.current!=this.modes[t]){var n;this.current&&(this.modes[t].preActivation(this.current),n=this.current.type,i=this.current.deActivated(this.modes[t])),this.current=this.modes[t],this.layer.layer.attr("data-pm",this.current.type),this.current.activated(e),this.layer.$.triggerHandler("placementChanged",[this.current.type,n])}return i},n.prototype.doAction=function(t){try{return this.current[t].apply(this.current,Array.prototype.slice.call(arguments,1))}catch(e){}},n.prototype.getType=function(){return this.current.type},n.prototype.onResize=function(t){"function"==typeof this.current.onResize&&this.current.onResize(t)},n.prototype.updatePosition=function(){this.current.updatePosition()},n.prototype.getIndex=function(){return this.current.getIndex()},n.prototype.renderIndex=function(t){return this.current.renderIndex(t)},n.prototype.doLinearResize=function(t){this.current.doLinearResize(t)},n.prototype.sync=function(){this.current.sync()},n.prototype.renderModeProperties=function(t){var e=this.layer.getProperty("fontsize");this.layer.adjustFontSize(this.layer.getProperty("adaptivefont"),e,!1),this.current._renderModeProperties(t)},n.prototype["delete"]=function(){this.current["delete"]()},n}),N2Require("PlacementAbstract",["Placement"],[],function(t,e,i){"use strict";function n(t,e,i){this.placement=t,this.layer=e,this.canvasManager=i}return n.prototype.start=function(){},n.prototype.preActivation=function(t){},n.prototype.activated=function(){},n.prototype.deActivated=function(t){return!1},n.prototype.updatePosition=function(){this.layer.group.update()},n.prototype._renderModeProperties=function(t){},n.prototype._hide=function(){},n.prototype._show=function(){},n.prototype.snap=function(){return!1},n.prototype.getIndex=function(){return this.layer.layer.index()},n.prototype.renderIndex=function(t){},n.prototype.doLinearResize=function(t){},n.prototype.sync=function(){},n.prototype["delete"]=function(){},n.prototype.triggerLayerResized=function(t,e){},n.prototype.changeStatus=function(t,e){},n}),N2Require("Item",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,r){this.type===n&&(this.type=e.data("item")),this.needSize=this.constructor.needSize,this.self=this,this.$item=e,this.layer=i,this.itemEditor=r,this.fonts=[],this.styles=[],this.needFill=[],this.values=this.$item.data("itemvalues"),"object"!=typeof this.values&&(this.values=t.parseJSON(this.values)),this.pre="div#"+nextend.smartSlider.frontend.sliderElement.attr("id")+" ",this.defaultValues=r.getItemForm(this.type).values,this.added(),this.$item.data("item",this),this.$item.appendTo(this.layer.getContent()),this.layer.item=this,0===this.$item.children().length&&this.layer.readyDeferred.done(t.proxy(this.reRender,this)),t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item),this.$item.find("a").on("click",function(t){t.preventDefault()}),t(window).trigger("ItemCreated")}return r.needSize=!1,r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!=this&&(this.self=this.self.getSelf()),this.self},r.prototype.changeValue=function(e,i){this==this.itemEditor.activeItem?t("#item_"+this.type+e).data("field").insideChange(i):this.values[e]=i},r.prototype.activate=function(t,e,i){this.itemEditor.setActiveItem(this,e,i)&&(nextend.basicCSS.activate("ss3item"+this.type,this.values,{font:this.fonts,style:this.styles}),this.itemEditor.lastValues[this.type]=this.values)},r.prototype.deActivate=function(){nextend.basicCSS.deActivate()},r.prototype.render=function(e,i){this.layer.layer.triggerHandler("itemRender"),this.$item.html(""),this.parseAll(e),this._render(e),this.itemEditor.lastValues[this.type]=this.values=i,t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item);var n=this.getName(e);n=n===!1||""==n||"Layer"==n?this.type:n.replace(/[<>]/gi,""),this.layer.rename(n,!1),this.layer.update(),this.$item.find("a").on("click",function(t){t.preventDefault()})},r.prototype._render=function(t){},r.prototype.reRender=function(e){this.values=t.extend({},this.getDefault(),this.values,e),this.render(t.extend({},this.values),this.values)},r.prototype["delete"]=function(){this.$item.trigger("mouseleave"),this.$item.remove(),this.itemEditor.activeItem==this&&(this.itemEditor.activeItem=null)},r.prototype.getHTML=function(e){var i="";return i=e?"["+this.type+' values="'+Base64.encode(JSON.stringify(this.values))+'"]':t('<div class="n2-ss-item n2-ss-item-'+this.type+'"></div>').attr("data-item",this.type).attr("data-itemvalues",JSON.stringify(this.values))},r.prototype.getData=function(){return{type:this.type,values:this.values}},r.prototype.getDefault=function(){return{}},r.prototype.added=function(){},r.prototype.addedFont=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.fonts.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.fontManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.addedStyle=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.styles.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.styleManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.parseAll=function(t){for(var e=0;e<this.fonts.length;e++)t[this.fonts[e].name+"class"]=nextend.fontManager.getClass(t[this.fonts[e].name],this.fonts[e].mode)+" ";for(var e=0;e<this.styles.length;e++)t[this.styles[e].name+"class"]=nextend.styleManager.getClass(t[this.styles[e].name],this.styles[e].mode)+" ";for(var e=0;e<this.needFill.length;e++)"undefined"!=typeof t[this.needFill[e]]&&(t[this.needFill[e]]=nextend.smartSlider.generator.fill(t[this.needFill[e]]+""))},r.prototype.getName=function(t){return"Layer"},r.prototype.resizeLayerToImage=function(e){var n=this.layer;t("<img/>").attr("src",e).on("load",function(){var t=i.frontend.dimensions.slide,e=this.width,r=this.height,s=t.width,o=t.height;e>0&&r>0&&(e>s&&(r=r*s/e,e=s),r>o&&(e=e*o/r,r=o),nextend.smartSlider.history.off(),n.setProperty("width",e),n.setProperty("height",r),nextend.smartSlider.history.on())})},r.prototype.fitLayer=function(t){return!1},r}),N2Require("ItemManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,n){this.suppressChange=!1,this.activeItemOriginalData=null,this.canvasManager=e,this.lastValues={},this.startItems(),this.forms={},this.activeForm=!1,n.isUploadDisabled||i.frontend.sliderElement.fileupload({url:n.uploadUrl,pasteZone:!1,dropZone:i.frontend.sliderElement,dataType:"json",paramName:"image",add:function(t,e){e.formData={path:"/"+n.uploadDir},e.submit()},done:t.proxy(function(t,e){var i=e.result;if(i.data&&i.data.name){var n=this.createLayerItem(!1,{item:"image"});n.reRender({image:i.data.url}),n.activate(null,null,!0)}else NextendAjaxHelper.notification(i)},this),fail:function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},start:function(){NextendAjaxHelper.startLoading()},stop:function(){setTimeout(function(){NextendAjaxHelper.stopLoading()},100)}})}return r.prototype.setActiveItem=function(e,i,n){if(e!=this.activeItem||n){this.activeItemOriginalData=null;var r=e.type;this.activeForm&&this.activeForm.form.css("display","none"),this.activeItem&&this.activeItem.deActivate(),this.activeForm=this.getItemForm(r);var s=t.extend({},this.activeForm.values,e.values);this.activeItem=e,this.suppressChange=!0;for(var o in s){var a=t("#item_"+r+o).data("field");a&&a.insideChange(s[o])}return this.suppressChange=!1,this.activeForm.form.css("display","block"),this.focusFirst(i),!0}return!1},r.prototype.focusFirst=function(t){var e=this.activeForm.fields.eq(0).data("field");nextend.smartSlider.generator.isDynamicSlide()&&e.connectedField&&e.connectedField instanceof N2Classes.FormElementImage||this.activeForm.fields.eq(0).data("field").focus("undefined"!=typeof t&&t)},r.prototype.startItems=function(){t(".n2-ss-core-item").nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,distance:5,$layer:function(){return this.element.clone()},onCreate:t.proxy(function(t,e,n,r){switch(n.layer.type){case"content":case"col":i.history.startBatch();var s=this.createLayerItem(n.layer,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),n.layer.container.insertLayerAt(s.layer,r),s.layer.changeGroup(!1,n.layer),i.history.endBatch();break;case"row":var o=n.layer.createCol();n.layer.moveCol(o.getIndex(),r),i.history.startBatch();var s=this.createLayerItem(o,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),o.container.insertLayerAt(s.layer,0),s.layer.changeGroup(!1,o),i.history.endBatch();break;default:var a=nextend.smartSlider.$currentSlideElement.offset(),s=this.createLayerItem(this.canvasManager.mainContainer,e.$layer.data(),"click");s.layer.placement.current.setPosition(t.pageX-a.left-20,t.pageY-a.top-20)}},this),start:function(){t("#n2-ss-add-sidebar").removeClass("n2-active")}}).on("click",t.proxy(function(e){this.createLayerItem(this.canvasManager.mainContainer.getActiveGroup(),t(e.currentTarget).data(),"click")},this)),t("[data-itemshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger(e)},this)}),t("[data-structureshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t(".n2-ss-add-layer-button").trigger("click"),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(1).trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-type="'+t(e.currentTarget).data("structureshortcut")+'"]').trigger(e)},this)})},r.prototype.createLayerItem=function(n,r,s,o){n=n||this.canvasManager.mainContainer.getActiveGroup();var a=r.item;if("structure"==a){var l=new e.Row(this.canvasManager,n,{});return l.create(r.type),l.hightlightStructure(),{layer:l}}var h=this.getItemForm(a),d=t("<div></div>").attr("data-item",a).data("itemvalues",t.extend(!0,{},h.values,this.getLastValues(a))).addClass("n2-ss-item n2-ss-item-"+a),l=this._createLayer(d,n,t.extend(t(".n2-ss-core-item-"+a).data("layerproperties"),o));return s&&"click"==s?setTimeout(function(){l.layer.trigger("mousedown",["create"]).trigger("mouseup",["create"]).trigger("click",["create"])},500):l.activate(),i.layerWindow.switchTab("item"),i.history.addSimple(this,this.historyDelete,this.historyCreate,[n,l,r]),l.item},r.prototype.getLastValues=function(t){return this.lastValues[t]!==n?this.lastValues[t]:{}},r.prototype.getItemClass=function(t){var i="Item"+t.capitalize();return"undefined"==typeof e[i]?"Item":i},r.prototype._createLayer=function(t,i,n){var r=this.canvasManager.layerOptions.layerFeatures.layerDefault;for(var s in r)null!==r[s]&&(n[s]=r[s]);var o=new e.Layer(this.canvasManager,i,n);return o.create(function(e){return e._createLayer().append(t)}),o},r.prototype.getItemForm=function(e){if(this.forms[e]===n){var i=t("#smartslider-slide-toolbox-item-type-"+e),r={form:i,values:i.data("itemvalues"),fields:i.find('[name^="item_'+e+'"]'),fieldNameRegexp:new RegExp("item_"+e+"\\[(.*?)\\]","")};r.fields.on({nextendChange:t.proxy(this.updateCurrentItem,this),keydown:t.proxy(this.updateCurrentItemDeBounced,this)}),this.forms[e]=r}return this.forms[e]},r.prototype.updateCurrentItem=function(e){if(!this.suppressChange){null===this.activeItemOriginalData&&(this.activeItemOriginalData=t.extend({},this.activeItem.values));var n={},r={};if(this.activeForm.fields.each(t.proxy(function(e,i){var i=t(i),s=i.attr("name").match(this.activeForm.fieldNameRegexp)[1];r[s]=n[s]=i.val()},this)),e&&"nextendChange"==e.type){var s=i.history.addValue(this,this.historyUpdateCurrentItem,[this.activeItem]);s&&s.setValues(this.activeItemOriginalData,t.extend({},r)),this.activeItemOriginalData=null}this.activeItem.render(t.extend({},this.activeItem.getDefault(),n),r)}},r.prototype.historyUpdateCurrentItem=function(e,i){var n=i.getSelf();n.reRender(t.extend(!0,{},e)),n.values=e,this.activeItem==n&&n.activate(null,null,!0)},r.prototype.updateCurrentItemDeBounced=NextendDeBounce(function(t){this.updateCurrentItem(t)},100),r.prototype.historyDelete=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreate=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.historyCreateStructure=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.getSelf=function(){return this},r}),N2Require("PluginActivatable",[],[],function(t,e,i){"use strict";function n(){this.isActive=!1,this.preventActivation=!1}return n.prototype.activate=function(t,e,i){return this.preventActivation?!1:(document.activeElement&&document.activeElement.blur(),t&&(t.ctrlKey||t.metaKey)&&this.canvasManager.mainContainer.getSelectedLayer()?!this.select():t&&3==t.which&&this.canvasManager.selectMode?!1:(i||this.canvasManager.exitSelectMode(),t&&this.positionSidebar(),this.canvasManager.mainContainer.getSelectedLayer()!==this&&(this.layerRow.addClass("n2-active"),this.layer.addClass("n2-active"),this.layer.triggerHandler("n2-ss-activate"),this.canvasManager.changeActiveLayer(this,i),nextend.activeLayer=this.layer,this.canvasManager.ui.onActivateLayer(this)),this.isActive=!0,!0))},n.prototype.deActivate=function(){this.isActive=!1,this.layer===i&&console.error(),this.layer.removeClass("n2-active"),this.layerRow.removeClass("n2-active"),this.layer.triggerHandler("n2-ss-deactivate")},n}),N2Require("PluginEditableName",[],[],function(t,e,i){"use strict";function n(){}var r=300,s=null;return n.prototype.addProperties=function(t){this.createProperty("name",this.label,t),this.createProperty("nameSynced",1,t)},n.prototype.makeNameEditable=function(){this.layerTitleSpan.on({mouseup:t.proxy(function(e){s?(clearTimeout(s),s=null,this.editName()):(this.activate(e),s=setTimeout(t.proxy(function(){s=null},this),r))},this)})},n.prototype.editName=function(){var i=new e.InlineField;i.$input.on({valueChanged:t.proxy(function(t,e){this.rename(e,!0),this.layerTitleSpan.css("display","inline")},this),cancel:t.proxy(function(){this.layerTitleSpan.css("display","inline")},this)}),this.layerTitleSpan.css("display","none"),i.injectNode(this.layerTitle,this.property.name)},n.prototype.rename=function(t,e){if(this.property.nameSynced||e){if(e&&(this.property.nameSynced=0),""==t){if(e)return this.property.nameSynced=1,this.item.reRender(),!1;t="Layer #"+(this.group.getLayerCount()+1)}t=t.substr(0,35),this.property.name!=t&&(this.property.name=t,this.layerTitleSpan.html(t),this.$.trigger("layerRenamed",t))}},n}),N2Require("PluginShowOn",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){}return r.prototype.addProperties=function(t){this.showsOnCurrent=!0,this.createProperty("generatorvisible","",t),this.createProperty("desktopPortrait",1,t),this.createProperty("desktopLandscape",1,t),this.createProperty("tabletPortrait",1,t),this.createProperty("tabletLandscape",1,t),this.createProperty("mobilePortrait",1,t),this.createProperty("mobileLandscape",1,t)},r.prototype._hide=function(){this.layer.css("display","none"),this.showsOnCurrent=!1,this.update()},r.prototype._show=function(){parseInt(this.property[this.canvasManager.getMode()])&&(this.layer.css("display",""),this.showsOnCurrent=!0),this.update()},r.prototype._syncdesktopPortrait=function(){var t=this.getProperty("desktopPortrait");this.__syncShowOnDevice("desktopPortrait",t)},r.prototype._syncdesktopLandscape=function(){var t=this.getProperty("desktopLandscape");this.__syncShowOnDevice("desktopLandscape",t)},r.prototype._synctabletPortrait=function(){var t=this.getProperty("tabletPortrait");this.__syncShowOnDevice("tabletPortrait",t)},r.prototype._synctabletLandscape=function(){var t=this.getProperty("tabletLandscape");this.__syncShowOnDevice("tabletLandscape",t)},r.prototype._syncmobilePortrait=function(){var t=this.getProperty("mobilePortrait");this.__syncShowOnDevice("mobilePortrait",t)},r.prototype._syncmobileLandscape=function(){var t=this.getProperty("mobileLandscape");this.__syncShowOnDevice("mobileLandscape",t)},r.prototype.__syncShowOnDevice=function(t,e){if(this.getMode()==t){var e=parseInt(e);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.placement.doAction("triggerLayerResized")}},r}),N2Require("Col",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.label="Col",this.type="col",this.innerContainer="> .n2-ss-layer-col",e.ContentAbstract.prototype.constructor.call(this,t,i,n),this.placement.allow("default")}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>').attr("data-type",this.type)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createProperty("colwidth","1",t),this.createProperty("link","#|*|_self",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("borderwidth","1|*|1|*|1|*|1",t),this.createProperty("borderstyle","none",t),this.createProperty("bordercolor","ffffffff",t),this.createDeviceProperty("order",{desktopPortrait:0},t)},r.prototype.create=function(){e.ContentAbstract.prototype.create.call(this),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady();var i=t.data("rowcolumns")+"";if(i!=n&&"resolved"==this.group.readyDeferred.state()){for(var r=i.split("+"),s=0;s<r.length;s++)r[s]=new Fraction(r[s]);this.group.setColsWidth(r)}},r.prototype.createRow=function(){this.$content=this.layer.find(".n2-ss-layer-content:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content);var i=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));this._createLayerListRow([t('<div class="n2-actions"></div>').append(n).append(i)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype._start=function(t){e.ContentAbstract.prototype._start.call(this,t),t&&this.highlight(2e3)},r.prototype.getRealOrder=function(){var t=this.getProperty("order");return 0==t?10:t},r.prototype._syncorder=function(){var t=this.getProperty("order");0==t?this.layer.css("order",""):this.layer.css("order",t),this.group.refreshUI()},r.prototype._synccolwidth=function(){this.layer.css("width",100*new Fraction(this.getProperty("colwidth")).valueOf()+"%"),this.group.refreshUI()},r.prototype._synclink=function(){},r.prototype._syncborderradius=function(){this.$content.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncborderwidth=r.prototype._syncbordercolor=r.prototype._syncborderstyle=function(){this._syncborder()},r.prototype._syncborder=function(){var t=this.getProperty("borderstyle");if("none"!=t){this.$content.css("border-color",N2Color.hex2rgbaCSS(this.getProperty("bordercolor"))),this.$content.css("border-style",this.getProperty("borderstyle"));var e=this.getProperty("borderwidth").split("|*|"),i="px";this.$content.css("border-width",e.join(i+" ")+i)}else this.$content.css("border","");this.update()},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$content.css("box-shadow",""):this.$content.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype["delete"]=function(){this.group.container.getLayerCount()>1?this._delete():this.group["delete"]()},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t);return i.attr("data-rowcolumns",this.group.getColumns()),i},r.prototype.renderModeProperties=function(t){this._syncorder(),e.ContentAbstract.prototype.renderModeProperties.call(this,t)},r.prototype.update=function(){this.group._syncwrapafter(),e.ComponentAbstract.prototype.update.call(this)},r});var dependencies=["LayerDataStorage","PluginEditableName"];N2Require("ComponentAbstract",dependencies,["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,o){this.wraps={},this.counter=s++,
7
- window.layers[this.counter]=this,this.self=this,this.originalProperties=o||{},e.LayerDataStorage.prototype.constructor.call(this),this.readyDeferred=t.Deferred(),this.readyDeferred.done(t.proxy(this.onReady,this)),this.isDeleteStarted=!1,this.isDeleted=!1,this._lastClasses=!1,this.$=t(this),this.proxyRefreshBaseSize=t.proxy(this.refreshBaseSize,this),this.status=r.STATUS.UNDEFINED,this.canvasManager=i,this.group=n,e.PluginActivatable.prototype.constructor.call(this),this.placement=new e.Placement(this),this.readyDeferred.done(t.proxy(this.addUILabels,this))}var s=0;window.layers=[],r.STATUS={UNDEFINED:0,NORMAL:1,LOCKED:2,HIDDEN:3},r.STATUS_INV={0:"UNDEFINED",1:"NORMAL",2:"LOCKED",3:"HIDDEN"};for(var o in e.PluginActivatable.prototype)r.prototype[o]=e.PluginActivatable.prototype[o];for(var o in e.LayerDataStorage.prototype)r.prototype[o]=e.LayerDataStorage.prototype[o];for(var o in e.PluginEditableName.prototype)r.prototype[o]=e.PluginEditableName.prototype[o];for(var o in e.PluginShowOn.prototype)r.prototype[o]=e.PluginShowOn.prototype[o];return r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer),nextend.tooltip.addElement(t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-up n2-ss-layer-ui-label-action"><i class="n2-i n2-i-uplevel"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(t){this.up(t)},this)}).appendTo(this.uiLabel),"Select parent"),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-duplicate"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this.duplicate()},this)}).appendTo(this.uiLabel),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-trash"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this["delete"]()},this)}).appendTo(this.uiLabel)},r.prototype.getUILabel=function(){return this.label},r.prototype.up=function(t){t.stopImmediatePropagation(),this.group.activate(t)},r.prototype.addProperties=function(t){this.createProperty("id",null,t,this),this.createProperty("class","",t),this.createProperty("crop","visible",t),this.createProperty("rotation",0,t),this.createProperty("parallax",0,t),this.createProperty("adaptivefont",0,t),this.createDeviceProperty("fontsize",{desktopPortrait:100},t),e.PluginShowOn.prototype.addProperties.call(this,t),e.PluginEditableName.prototype.addProperties.call(this,t)},r.prototype.getRootElement=function(){return this.layer},r.prototype.create=function(t,e){e=e||!1,e||this.addProperties(!1),"function"==typeof t?this.layer=t.call(null,this):this.layer=this._createLayer(),this.layer.addClass("n2-ss-layer-under-creation"),e&&this.addProperties(this.layer),this.layer.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.group.container.insert(this),this.group.onChildCountChange(),this.$.triggerHandler("create"),this._start(!0)},r.prototype.load=function(t){this.addProperties(t),this.layer=t.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.$.triggerHandler("load"),this._start(!1);var e=t.data("status");null!==e&&"undefined"!=typeof e?this.changeStatus(e):this.changeStatus(r.STATUS.NORMAL)},r.prototype._start=function(e){this.createRow();var i=this.layer.find("> .n2-ss-layer-mask");i.length&&(this.wraps.mask=i),this._synccrop(),this._syncrotation(),this.placement.start(),this.placement.setMode(this.group.container.allowedPlacementMode,this.originalProperties),this.setGroup(this.group),this.canvasManager.$.triggerHandler("layerCreated",this),e&&(this.refreshBaseSize(),this.$.triggerHandler("created")),setTimeout(t.proxy(function(){this.isDeleted||(this.placement.onResize(!0),this.layer.css("visibility",""),this.layer.removeClass("n2-ss-layer-under-creation"))},this),300)},r.prototype._onReady=function(){this.originalProperties={},this.readyDeferred.resolve(),this.layer.on({mouseover:t.proxy(this.markOver,this),mouseout:t.proxy(this.markOut,this)})},r.prototype.isReady=function(){return"resolved"==this.readyDeferred.state()},r.prototype.getName=function(){return this.property.name},r.prototype.setGroup=function(t){this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=t,this.placement.setMode(t.container.allowedPlacementMode),t.container.syncLayerRow(this),this.isReady()&&this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize)},r.prototype.changeGroup=function(t,e){var i=this.group;i.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=e;var n=this.placement.setMode(e.container.allowedPlacementMode);e.container.syncLayerRow(this),this.refreshBaseSize(),e.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),this.userGroupChange(i,t,n,e,this.getIndex()),i.update()},r.prototype.userGroupChange=function(t,e,n,r,s){if(t==r)this.userIndexChange(e,s);else{var o=i.history.addValue(this,this.historyUserGroupChange,[]);o&&o.setValues({historyGroup:t,index:e,placementData:n},{historyGroup:r,index:s})}},r.prototype.historyUserGroupChange=function(t){var e=this.group,i=t.historyGroup.getSelf(),n=t.index;i.container.insertLayerAt(this,n),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=i,t.placementData&&this.layer.data(t.placementData),this.placement.setMode(i.container.allowedPlacementMode),i.container.syncLayerRow(this),this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),i.onChildCountChange(),t.placementData&&this.placement.sync(),e.update()},r.prototype.userIndexChange=function(t,e){var n=i.history.addValue(this,this.historyUserIndexChange);n&&n.setValues(t,e),this.group.container.insertLayerAt(this,e)},r.prototype.historyUserIndexChange=function(t){this.group.container.insertLayerAt(this,t)},r.prototype._createLayerListRow=function(e){return this.layerRow=t('<li class="n2-ss-layerlist-row"></li>').data("layer",this).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerRowClicked")}).appendTo(this.group.container.$ul),this.layerTitleSpan=t('<span class="n2-ucf">'+this.property.name+"</span>"),this.makeNameEditable(),this.layerTitle=t('<div class="n2-ss-layer-title"></div>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},this),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},this)}).append(this.layerTitleSpan).append(e).appendTo(this.layerRow).on({mouseup:t.proxy(function(t){nextend.shouldPreventMouseUp||"DIV"!==t.target.tagName||this.activate(t)},this)}),nextend.tooltip.add(this.layerRow),this.layerRow.nextendLayerListItem({UIManager:this.canvasManager.mainContainer.layerListUIManager,layer:this,$item:this.layerRow}),this.layerRow},r.prototype.select=function(t){return this.canvasManager.selectLayer(this,!0)},r.prototype.update=function(){this.readyDeferred.done(t.proxy(this.placement.updatePositionThrottled,this.placement))},r.prototype.updateThrottled=function(){this.placement.updatePositionThrottled()},r.prototype.positionSidebar=function(){this.canvasManager.layerWindow.show(this,this.layer)},r.prototype.showEditor=function(){this.canvasManager.layerWindow._show()},r.prototype.highlight=function(e){e=e||2e3,this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),this.layer.addClass("n2-highlight"),this.isHighlighted=setTimeout(t.proxy(function(){this.layer.removeClass("n2-highlight")},this),e)},r.prototype.setPropertydesktopPortrait=r.prototype.setPropertydesktopLandscape=r.prototype.setPropertytabletPortrait=r.prototype.setPropertytabletLandscape=r.prototype.setPropertymobilePortrait=r.prototype.setPropertymobileLandscape=function(t,e,i){this._setProperty(t,parseInt(e),i)},r.prototype.getHTML=function(t){var i=this._createLayer();for(var r in this.property)"width"!=r&&"height"!=r&&"left"!=r&&"top"!=r&&i.attr("data-"+r.toLowerCase(),this.property[r]);for(var r in this.deviceProperty)for(var s in this.deviceProperty[r])i.attr("data-"+r.toLowerCase()+s,this.deviceProperty[r][s]);for(var r in this.deviceProperty.desktop)i.css(r,this.deviceProperty.desktop[r]+"px");if(this.container!=n){var o=i;this.innerContainer!=n&&(o=i.find(this.innerContainer)),o.append(this.container.getHTML(t))}var a=this.getProperty("id");return a&&""!=a&&i.attr("id",a),this.status>e.ComponentAbstract.STATUS.NORMAL&&i.attr("data-status",this.status),i},r.prototype.duplicate=function(e){var n=this.getHTML(!1);if("absolute"==this.placement.getType()){var r=n.attr("id");r&&(r=t.fn.uid(),n.attr("id",r),n.attr("data-id",r)),n.attr("data-parentid")?(n.data("desktopportraittop",0),n.data("desktopportraitleft",0)):(n.data("desktopportraittop",n.data("desktopportraittop")+40),n.data("desktopportraitleft",n.data("desktopportraitleft")+40)),n.attr("data-parentid","")}var s=this.canvasManager.insertComponentWithNode(this.group,n,this.getIndex()+1,!1,!0);return this.layerRow.trigger("mouseleave"),e&&s.activate(),i.history.addSimple(this,this.historyDeleteDuplicated,this.historyDuplicate,[s,s.container?s.container.getAllLayers():!1]),s},r.prototype.historyDeleteDuplicated=function(t){t.getSelf()["delete"]()},r.prototype.historyDuplicate=function(t,e){var i=this.duplicate(!1,!1);if(t.setSelf(i),e)for(var n=i.container.getAllLayers(),r=0;r<n.length;r++)e[r].setSelf(n[r])},r.prototype.historyDelete=function(){this["delete"]()},r.prototype.historyRestore=function(t,e,i,n){var r=this.canvasManager.insertComponentWithNode(this.group.getSelf(),t.clone(),i,!1,!0);if(this.setSelf(r),n)for(var s=r.container.getAllLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype["delete"]=function(){i.positionDisplay.hide(),nextend.tooltip.onLeave(),this._delete()},r.prototype._delete=function(){if(this.isDeleteStarted=!0,this.canvasManager.mainContainer.getSelectedLayer()==this&&this.canvasManager.layerWindow.hide(),this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),i.history.startBatch(),i.history.addSimple(this,this.historyRestore,this.historyDelete,[this.getHTML(!1),this.group,this.getIndex(),this.container?this.container.getAllLayers():!1]),this.deActivate(),this.container!=n){i.history.off();for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._delete();i.history.on()}i.history.endBatch(),this.item!=n&&this.item["delete"](),this.placement["delete"](),this.layer.trigger("mouseup"),this.isDeleted=!0,this.canvasManager.mainContainer.layerDeleted(this),this.layer.triggerHandler("LayerDeleted"),this.getRootElement().remove(),this.layerRow.remove(),this.group.update(),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.$.trigger("layerDeleted"),this.markTimer&&clearTimeout(this.markTimer),delete this.layer,delete this.itemEditor,this.group.onChildCountChange()},r.prototype.getData=function(i){var n={type:this.type,lastplacement:this.placement.getType()};this.status>e.ComponentAbstract.STATUS.NORMAL&&(n.status=this.status);var r=t.extend({},this.property);for(var s in this.deviceProperty)for(var o in this.deviceProperty[s]){delete r[o];var a=this.deviceProperty[s][o];if("undefined"!=typeof a){switch(o){case"width":case"height":this.isDimensionPropertyAccepted(a)||(a=parseFloat(a));break;case"fontsize":case"left":case"top":case"gutter":case"wrap":a=parseFloat(a)}n[s.toLowerCase()+o]=a}}for(var l in r)n[l.toLowerCase()]=r[l];return n},r.prototype.onChildCountChange=function(){},r.prototype.getDataWithChildren=function(e,i){return-1==t.inArray(this,i)&&(i.push(this),e.push(this.getData({layersIncluded:!0,itemsIncluded:!0})),this.layer.triggerHandler("LayerGetDataWithChildren",[e,i])),e},r.prototype.markOver=function(t){this.layer.addClass("n2-ss-mouse-over"),t.stopPropagation(),this.group.markEnter(),this.markTimer&&clearTimeout(this.markTimer),this.layer.addClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible")},r.prototype.markOut=function(e){this.layer.removeClass("n2-ss-mouse-over"),e&&e.stopPropagation(),this.group.markLeave(),this.markTimer&&clearTimeout(this.markTimer),this.isActive||this.uiLabel.addClass("invisible"),this.markTimer=setTimeout(t.proxy(function(){this.layer.removeClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible"),this.markTimer=null},this),10)},r.prototype.markEnter=function(t){this.layer.addClass("n2-ss-mouse-hover"),this.group.markEnter()},r.prototype.markLeave=function(t){this.layer.removeClass("n2-ss-mouse-hover"),this.group.markLeave()},r.prototype.formSetname=function(t,e){},r.prototype.formSetnameSynced=function(t,e){},r.prototype.formSetdesktopPortrait=function(t,e){t.currentForm.desktopPortrait.data("field").insideChange(e)},r.prototype.formSetdesktopLandscape=function(t,e){t.currentForm.desktopLandscape.data("field").insideChange(e)},r.prototype.formSettabletPortrait=function(t,e){t.currentForm.tabletPortrait.data("field").insideChange(e)},r.prototype.formSettabletLandscape=function(t,e){t.currentForm.tabletLandscape.data("field").insideChange(e)},r.prototype.formSetmobilePortrait=function(t,e){t.currentForm.mobilePortrait.data("field").insideChange(e)},r.prototype.formSetmobileLandscape=function(t,e){t.currentForm.mobileLandscape.data("field").insideChange(e)},r.prototype.sync=function(){if(this._syncid(),this.container)for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e].sync();this.placement.sync()},r.prototype._syncid=function(){var t=this.getProperty("id");t&&""!=t?this.layer.attr("id",t):this.layer.removeAttr("id")},r.prototype.requestID=function(){var e=this.getProperty("id");return e||(e=t.fn.uid(),this.setProperty("id",e,"layer")),e},r.prototype._syncfontsize=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype._syncadaptivefont=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype.adjustFontSize=function(t,e,i){e=parseInt(e),parseInt(t)?this.layer.css("font-size",16*e/100+"px"):100!=e?this.layer.css("font-size",e+"%"):this.layer.css("font-size",""),this.refreshBaseSize(),i&&this.update()},r.prototype.refreshBaseSize=function(){var t=this.getFontSize();this.isAdaptiveFont()?this.baseSize=16*t/100:this.baseSize=this.group.baseSize*t/100,this.$.triggerHandler("baseSizeUpdated")},r.prototype.getFontSize=function(){return parseInt(this.getProperty("fontsize"))},r.prototype.isAdaptiveFont=function(){return parseInt(this.getProperty("adaptivefont"))},r.prototype._synccrop=function(){var t=this.getProperty("crop");"auto"==t&&(t="hidden"),"mask"==t?(t="hidden",this.addWrap("mask","<div class='n2-ss-layer-mask'></div>")):(this.removeWrap("mask"),this.layer.data("animatableselector",null)),this.layer.css("overflow",t)},r.prototype._syncrotation=function(){var t=parseFloat(this.getProperty("rotation"));if(t/360!=0){var e=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(e[0],{rotationZ:t})}else this.removeWrap("rotation")},r.prototype.addWrap=function(e,i){if(this.wraps[e]===n){var r=t(i);switch(this.wraps[e]=r,e){case"mask":r.appendTo(this.layer),this.wraps.rotation!==n?r.append(this.wraps.rotation):r.append(this.getContents()),this.layer.data("animatableselector",".n2-ss-layer-mask:first");break;case"rotation":this.wraps.mask!==n?r.appendTo(this.wraps.mask):r.appendTo(this.layer),r.append(this.getContents())}}return this.wraps[e]},r.prototype.removeWrap=function(t){if(this.wraps[t]!==n){switch(t){case"mask":this.wraps.rotation!==n?this.layer.append(this.wraps.rotation):this.layer.append(this.getContents());break;case"rotation":this.wraps.mask!==n?this.wraps.mask.append(this.getContents()):this.layer.append(this.getContents())}this.wraps[t].remove(),delete this.wraps[t]}},r.prototype.getContents=function(){return!1},r.prototype._syncclass=function(){this._lastClasses!==!1&&this.layer.removeClass(this._lastClasses);var t=this.getProperty("class");t&&""!=t?(this.layer.addClass(t),this._lastClasses=t):this._lastClasses=!1},r.prototype._syncparallax=function(){},r.prototype._syncgeneratorvisible=function(){},r.prototype._syncmouseenter=r.prototype._syncclick=r.prototype._syncmouseleave=r.prototype._syncplay=r.prototype._syncpause=r.prototype._syncstop=function(){},r.prototype.renderModeProperties=function(t){e.LayerDataStorage.prototype.renderModeProperties.call(this),this.placement.renderModeProperties(t)},r.prototype.getIndex=function(){return this.group.container.getLayerIndex(this.layer)},r.prototype.toString=function(){return this.type+" #"+this.counter},r.prototype.setSelf=function(t){t===n&&console.error(t),this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r.prototype.historyStoreOnPlacement=function(){var t=Array.prototype.slice.call(arguments);t.splice(1,1),this.placement.current[arguments[1]].apply(this.placement.current,t)},r.prototype.getDroppable=function(){return!1},r.prototype.onCanvasUpdate=function(t,e,i){if(this.group==e)t!=i&&this.userIndexChange(t,i);else{var n;if(this.canvasManager.isCol(this.group))for(n=this;n&&(!n.placement||"absolute"!==n.placement.getType());)n=n.group;this.changeGroup(t,e),e.onChildCountChange();for(var r=this;r&&(!r.placement||"absolute"!==r.placement.getType());)r=r.group;n&&n!=r&&n.placement.updatePosition(),r&&r.placement.updatePosition()}},r.prototype.setStatusNormal=function(){this.changeStatus(r.STATUS.NORMAL)},r.prototype.changeStatus=function(t){var e=this.status;switch(t==this.status&&(t=r.STATUS.NORMAL),this.status){case r.STATUS.HIDDEN:this.getRootElement().removeAttr("data-visibility"),this.layerRow.removeClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.removeClass("n2-ss-layer-locked"),this.layerRow.removeClass("n2-ss-layer-status-locked")}switch(this.status=t,this.status){case r.STATUS.HIDDEN:this.getRootElement().attr("data-visibility","hidden"),this.layerRow.addClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.addClass("n2-ss-layer-locked"),this.layerRow.addClass("n2-ss-layer-status-locked")}this.placement.current.changeStatus(e,this.status)},r.prototype.moveX=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveX(t)},r.prototype.moveY=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveY(t)},r}),N2Require("Content",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Content"),this.type="content",this.innerContainer="> .n2-ss-layer-content",this._defaults=t.extend({verticalalign:"center"},this._defaults),e.ContentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("content"),i.setMainContent(this)}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},t)},r.prototype.getRootElement=function(){return this.$outerSection},r.prototype.getBackgroundElement=function(){return this.$outerSection},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer n2-ss-content-empty"><div class="n2-ss-section-main-content n2-ss-layer-content"></div></div>').attr("data-type",this.type)},r.prototype.createRow=function(){this.$outerSection=this.layer.parent(),this.$outerSection.hasClass("n2-ss-section-outer")||(this.$outerSection=t('<div class="n2-ss-section-outer"></div>').insertAfter(this.layer).append(this.layer)),this.$outerSection.data("layerObject",this),this.$content=this.layer.find(".n2-ss-layer-content:first");var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this));this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content),t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(n)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.create=function(){this.originalProperties.adaptivefont=1,e.ContentAbstract.prototype.create.call(this),this._syncselfalign(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncselfalign(),this._onReady()},r.prototype._onReady=function(){e.ContentAbstract.prototype._onReady.call(this),this.startUISizing()},r.prototype.startUISizing=function(){this.layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.setProperty("maxwidth",e.value)},this)})},r.prototype["delete"]=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.remove=function(){this._delete()},r.prototype.update=function(){nextend.smartSlider.frontend.responsive.doVerticalResize()},r.prototype.onChildCountChange=function(){var t=this.container.getSortedLayers();this.layer.toggleClass("n2-ss-content-empty",0==t.length)},r.prototype.renderModeProperties=function(t){e.ContentAbstract.prototype.renderModeProperties.call(this,t),this._syncselfalign()},r.prototype._syncselfalign=function(){this.layer.attr("data-cssselfalign",this.getProperty("selfalign"))},r.prototype.duplicate=function(t){console.error("Content can not be duplicated!")},r}),N2Require("ContentAbstract",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this._defaults=t.extend({verticalalign:"flex-start"},this._defaults),this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),e.ComponentAbstract.prototype.constructor.call(this,i,n,r)}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("verticalalign",this._defaults.verticalalign,t),this.createDeviceProperty("maxwidth",{desktopPortrait:0},t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t)},r.prototype.getBackgroundElement=function(){return this.$content},r.prototype.getPaddingElement=function(){return this.$content},r.prototype.create=function(){e.ComponentAbstract.prototype.create.call(this),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled(),this.container.startWithExistingNodes()},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="layer"]').trigger("click")},this)}),this.getPaddingElement().nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layercol-padding").data("field").insideChange(r.join("|*|"))},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.getPaddingElement().css("padding",r),this.update(),this.getPaddingElement().nextendSpacing("option","current",r)},r.prototype._syncmaxwidth=function(){var t=parseInt(this.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.update()},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype.getVerticalAlign=function(){return this.getProperty("verticalalign")},r.prototype._syncverticalalign=function(){this.$content.attr("data-verticalalign",this.getVerticalAlign())},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=nextend.smartSlider.generator.fill(this.getProperty("bgimage"));if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.getBackgroundElement().css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.getBackgroundElement().css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.getBackgroundElement().css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.getBackgroundElement().css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.getBackgroundElement().css("background",t)}}else this.getBackgroundElement().css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.layersIncluded&&(i.layers=this.container.getData(t)),i},r.prototype.onChildCountChange=function(){this.layer.toggleClass("n2-ss-content-empty",0==this.container.getLayerCount()),this.update()},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign()},r.prototype.getDroppable=function(){return this.layer.is(":visible")&&this.status!=N2Classes.ComponentAbstract.STATUS.HIDDEN&&this.status!=N2Classes.ComponentAbstract.STATUS.LOCKED?{$container:this.$content,layer:this,placement:"normal",axis:"y"}:"hidden"},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$content},r}),N2Require("Layer",["ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Layer"),this.type="layer",this.parent=!1,this.itemEditor=i.itemEditor,e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal"),this.$.on("load create",t.proxy(this.startItem,this))}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.create=function(){e.ComponentAbstract.prototype.create.apply(this,arguments),this.initUI(),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._onReady()},r.prototype.startItem=function(){var t=this.layer.find(".n2-ss-item");new(e[this.itemEditor.getItemClass(t.data("item"))])(t,this,this.itemEditor),this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.item.needSize&&this.layer.addClass("n2-ss-layer-needsize")},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){nextend.context.isPreventDblClick||(e.stopPropagation(),
8
- t('[data-tab="item"]').trigger("click"),this.item.itemEditor.focusFirst("dblclick"))},this)})},r.prototype.getContent=function(){var t=this.layer,e=t.data("animatableselector");return e&&(t=t.find(e)),t},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"></div>').attr("data-type",this.type)},r.prototype.createRow=function(){var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-layer-row")},r.prototype.activate=function(t,i,n){e.PluginActivatable.prototype.activate.call(this,t,i,n),this.item?this.item.activate(null,i):console.error("The layer do not have item on it!")},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t),n=this.item.getHTML(t);return i.attr("style",i.attr("style")+this.getStyleText()).append(n),i},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.item=this.item.getData()),i},r.prototype.getStyleText=function(){var t="",e=this.property.crop;return"auto"!=e&&"mask"!=e||(e="hidden"),t+="overflow:"+e+";"},r.prototype.getContents=function(){return this.item.$item},r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t,this.item.setSelf(t.item)},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r}),N2Require("MainContainer",["LayerContainer"],["smartSlider"],function(t,e,i,n){"use strict";function r(n){this.baseSize=16,this.activeLayer=null,this.$=n.$,this.isActiveGroupBlurred=!0,this.isMainGroup=!0,this.canvasManager=n,this.layer=i.$currentSlideElement.find(".n2-ss-layers-container").addBack().last(),this.layer.nextendCanvas({mainContainer:this,tolerance:5,smartguides:t.proxy(function(t){return t.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),display:{hidden:!0,show:t.proxy(function(){i.positionDisplay.show("Canvas")},this),update:t.proxy(function(t,e){i.positionDisplay.update(t,"Canvas","L: "+parseInt(0|e.left)+"px<br />T: "+parseInt(0|e.top)+"px")},this),hide:t.proxy(function(){i.positionDisplay.hide("Canvas")},this)},start:t.proxy(function(t,e){this.canvasManager.canvasDragStart(t,e)},this),drag:t.proxy(function(t,e){this.canvasManager.canvasDragMove(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this),stop:t.proxy(function(t,e){this.canvasManager.canvasDragStop(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this)}),this.canvasUIManager=this.layer.data("uiNextendCanvas"),this.layer.nextendLayerList({mainContainer:this,$fixed:t("#n2-ss-layers"),$scrolled:t("#n2-ss-layer-list")}),this.layerListUIManager=this.layer.data("uiNextendLayerList"),this.layer.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />'),this.container=new e.LayerContainer(this,t("#n2-ss-layer-list").find("ul"),"absolute","> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group",["content","row","layer","group"]),this.layerRow=this.container.$ul,this.$.on("layerCreated",t.proxy(function(){this.refreshHasLayers()},this))}return r.prototype.lateInit=function(){this.container.startWithExistingNodes(),this.layer.parent().on("click",t.proxy(function(){this.canvasManager.shouldPreventActivationBubble?this.blurActiveGroup():this.unBlurActiveGroup(),this.canvasManager.allowActivation()},this)),i.frontend.sliderElement.on("SliderResize",t.proxy(this.onResize,this))},r.prototype.onResize=function(t,e){for(var i=this.getEverySortedLayers(),n=0;n<i.length;n++)i[n].placement.doLinearResize(e)},r.prototype.getEverySortedLayers=function(){for(var t=this.container.getChildLayersRecursive(!1),e={},i=t.length-1;i>=0;i--)"undefined"!=typeof t[i].property.parentid&&t[i].property.parentid&&("undefined"==typeof e[t[i].property.parentid]&&(e[t[i].property.parentid]=[]),e[t[i].property.parentid].push(t[i]),t.splice(i,1));for(var i=0;i<t.length;i++)"undefined"!=typeof t[i].property.id&&t[i].property.id&&"undefined"!=typeof e[t[i].property.id]&&(e[t[i].property.id].unshift(0),e[t[i].property.id].unshift(i+1),t.splice.apply(t,e[t[i].property.id]),delete e[t[i].property.id]);return t},r.prototype.deleteLayers=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.blurActiveGroup=function(){this.isActiveGroupBlurred=!0},r.prototype.unBlurActiveGroup=function(){this.isActiveGroupBlurred=!1},r.prototype.getActiveGroup=function(){if(this.isActiveGroupBlurred){var t=this,e=this.activeLayer;switch(this.canvasManager.isGroup(e)||this.canvasManager.isCol(e)||this.canvasManager.isContent(e)?t=e:this.canvasManager.isRow(e)?t=e.container.getSortedLayers()[0]:e&&(t=e.group),this.canvasManager.currentEditorMode){case"content":t==this&&(t=this.canvasManager.mainContent);break;case"canvas":t==this.canvasManager.mainContent&&(t=this)}return t}switch(this.canvasManager.currentEditorMode){case"content":return this.canvasManager.mainContent}return this},r.prototype.getSelectedLayer=function(){return null==this.activeLayer?!1:this.activeLayer},r.prototype.getLayerData=function(t){if(t===n)return[];for(var e=[],i=[],r=0;r<t.length;r++)t[r].getDataWithChildren(e,i);return e},r.prototype.layerDeleted=function(t){for(var e=this.canvasManager.selectedLayers.length;e--;)t==this.canvasManager.selectedLayers[e]&&this.canvasManager.selectedLayers.splice(e,1);this._afterLayerDeletedDeBounced(t),this.refreshHasLayers()},r.prototype._afterLayerDeletedDeBounced=NextendDeBounce(function(t){this.activeLayer&&!this.activeLayer.isDeleted||this.canvasManager.resetActiveLayer()},50),r.prototype.refreshHasLayers=function(){t("body").toggleClass("n2-ss-has-layers",this.container.getLayerCount()>0),nextend.triggerResize()},r.prototype.getName=function(){return"Slide"},r.prototype.update=function(){},r.prototype.onChildCountChange=function(){},r.prototype.markEnter=function(t){},r.prototype.markLeave=function(t){},r.prototype.getSelf=function(){return this},r.prototype.createLayerAnimations=function(t,e){for(var i=[],n=this.container.getSortedLayers(),r=0;r<n.length;r++)i.push.apply(i,n[r].createLayerAnimations(t,e));return i},r.prototype.getDroppables=function(e){var i,n=this.canvasManager.currentEditorMode,r=[];if("canvas"==n){r.push(this.getDroppable()),i=this.container.getSortedLayers();var s=t.inArray(this.canvasManager.mainContent,i);s>-1&&i.splice(s,1)}else"content"==n&&(i=[this.canvasManager.mainContent]);for(var o=0;o<i.length;o++)if(i[o]!=e){var a=i[o].getDroppable();"object"==typeof a&&r.push(a),"hidden"!=a&&i[o].container&&r.push.apply(r,i[o].container.getDroppables(e))}return r},r.prototype.getLLDroppables=function(t){return this.container.getLLDroppables(t)},r.prototype.getDroppable=function(){return{$container:this.layer,layer:this,placement:"absolute"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":case"group":case"content":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.replaceLayers=function(e){this._idTranslation={};var n=this.dataToLayers(t.extend(!0,[],e).reverse()),r=[];this.deleteLayers(),this.canvasManager.mainContent.remove();for(var s=0;s<n.length;s++)r.push(this.container.append(n[s]));return this.canvasManager.refreshMode(),this.container.layerContainerElement.n2imagesLoaded().always(t.proxy(this.canvasManager.refreshMode,this.canvasManager)),this.getSelectedLayer()||r.length>0&&r[0].activate(),i.history.isEnabled()&&i.history.addSimple(this,this.historyDeleteAll,this.historyReplaceLayers,[e,r,this.container.getAllLayers()]),r},r.prototype.historyDeleteAll=function(t,e){for(var i=0;i<e.length;i++)e[i].getSelf()["delete"]();this.canvasManager.mainContent.getSelf().remove()},r.prototype.historyReplaceLayers=function(t,e,i){this.replaceLayers(t);for(var n=this.container.getAllLayers(),r=0;r<i.length;r++)i[r].setSelf(n[r])},r.prototype.addLayers=function(e,n){this._idTranslation={};for(var r=this.dataToLayers(t.extend(!0,[],e)),s=[],o=0;o<r.length;o++)s.push(n.container.append(r[o]));return this.canvasManager.refreshMode(),i.history.addSimple(this,this.historyDeleteLayers,this.historyAddLayers,[e,s,n]),s},r.prototype.historyDeleteLayers=function(t,e,i){for(var n=0;n<e.length;n++)e[n].getSelf()["delete"]()},r.prototype.historyAddLayers=function(t,e,i){for(var n=this.addLayers(t,i.getSelf()),r=0;r<e.length;r++)e[r].setSelf(n[r])},r.prototype.dataToLayers=function(t,e){for(var i=[],n=0;n<t.length;n++)switch(t[n].type){case"group":console.error("Group data to layer not implemented!");break;case"row":i.push(this.buildRowNode(t[n],e));break;case"col":i.push(this.buildColNode(t[n],e));break;case"content":i.push(this.buildContentNode(t[n],e));break;case"layer":default:i.push(this.buildLayerNode(t[n],e))}return i},r.prototype._buildNodePrepareID=function(e,i){if(i.id){var n=t.fn.uid(),r=!1;"object"==typeof this._idTranslation[i.id]&&(r=this._idTranslation[i.id]),this._idTranslation[i.id]=n,i.id=n,e.attr("id",n),r&&r.resolve(i.id,n)}if(i.parentid)switch(typeof this._idTranslation[i.parentid]){case"string":i.parentid=this._idTranslation[i.parentid];break;case"undefined":this._idTranslation[i.parentid]=t.Deferred();case"object":this._idTranslation[i.parentid].done(t.proxy(function(t,e,i){t.data("parentid",i)},this,e));break;default:i.parentid=""}},r.prototype.buildContentNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='content'/>"),s=t("<div class='n2-ss-section-main-content n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildRowNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='row'/>"),s=t("<div class='n2-ss-layer-row' />").appendTo(r);this._buildNodePrepareID(r,e);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.cols,s),r},r.prototype.buildColNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='col'/>"),s=t("<div class='n2-ss-layer-col n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildLayerNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='layer'></div>").attr("style",e.style),s=1;e.zIndex&&(s=e.zIndex),this._buildNodePrepareID(r,e),e.items!==n&&(e.item=e.items[0],delete e.items),t('<div class="n2-ss-item n2-ss-item-'+e.item.type+'"></div>').data("item",e.item.type).data("itemvalues",e.item.values).appendTo(r),delete e.style,delete e.item;for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),r},r}),N2Require("Row",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Row"),this.type="row",this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),this.innerContainer="> .n2-ss-layer-row",this.columnsField=t("#layerrow-columns").data("field"),this.refreshUI=NextendDeBounce(this.refreshUI,100),e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal")}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("fullwidth",1,t),this.createProperty("stretch",0,t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t),this.createDeviceProperty("gutter",{desktopPortrait:20},t),this.createDeviceProperty("wrapafter",{desktopPortrait:0,mobilePortrait:1,mobileLandscape:1},t)},r.prototype.historyDeleteSelf=function(){this["delete"]()},r.prototype.historyCreateSelf=function(t,i,n){var r=new e.Row(this.canvasManager,t.getSelf(),{});r.create(i),this.setSelf(r);for(var s=r.container.getSortedLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype.create=function(n){var r,s=function(e){return t("<div class='n2-ss-layer' />").append(t("<div class='n2-ss-layer-row' />").append(e)).attr("data-type","row")},o=function(e){return t("<div class='n2-ss-layer' data-type='col'/>").append(t("<div class='n2-ss-layer-col n2-ss-layer-content' />").append(e))};switch(n){case"2col":r=function(t){return s([o(),o()])};break;case"2col-60-40":r=function(t){return s([o().data("colwidth","6/10"),o().data("colwidth","4/10")])};break;case"2col-40-60":r=function(t){return s([o().data("colwidth","4/10"),o().data("colwidth","6/10")])};break;case"2col-80-20":r=function(t){return s([o().data("colwidth","8/10"),o().data("colwidth","2/10")])};break;case"2col-20-80":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","8/10")])};break;case"3col":r=function(t){return s([o(),o(),o()])};break;case"3col-20-60-20":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","6/10"),o().data("colwidth","2/10")])};break;case"4col":r=function(t){return s([o(),o(),o(),o()])};break;case"special":r=function(t){var e=s([o(),o()]);return s([o().data("colwidth","1/5"),o(e).data("colwidth","4/5")])};break;default:r=function(t){return s([o()])}}"absolute"==this.group.container.allowedPlacementMode&&(this.originalProperties=t.extend({width:"100%",align:"center",valign:"top",top:20},this.originalProperties)),e.ComponentAbstract.prototype.create.call(this,r,!0),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this.renderModeProperties(),this.container.renderModeProperties(),i.history.addSimple(this,this.historyDeleteSelf,this.historyCreateSelf,[this.group,n,this.container.getSortedLayers()]),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.initUI=function(){this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="row"]').trigger("click")},this)}),this.$row.nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.____makeLayerResizeableStop,this)}),this.$row.nextendColumns({columns:"1",gutter:this.getGutter(),start:t.proxy(function(t,e){i.positionDisplay.show("Columns")},this),colwidth:t.proxy(function(t,e){this.updateColumnWidth(e.currentPercent),i.positionDisplay.update(t,"Columns",Math.round(100*e.currentPercent[e.index])+"% &mdash; "+Math.round(100*e.currentPercent[e.index+1])+"%")},this),stop:t.proxy(function(t,e){i.positionDisplay.hide("Columns"),this.setRealColsWidth(e.currentFractions)},this)}),this.$row.sortable({distance:10,tolerance:"pointer",forceHelperSize:!0,forcePlaceholderSize:!0,items:"> .n2-ss-layer",handle:" > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self",start:t.proxy(function(t,e){var i=this.getColumns().split("+");e.placeholder.css({width:100*new Fraction(i[e.item.data("layerObject").getIndex()]).valueOf()+"%",height:e.helper.height(),visibility:"visible",marginRight:this.getGutter()+"px",marginTop:this.getGutter()+"px"}),e.helper.hasClass("n2-ss-last-in-row")&&e.placeholder.addClass("n2-ss-last-in-row"),e.placeholder.css("order",e.helper.css("order")),e.placeholder.attr("data-r",e.helper.attr("data-r"))},this),stop:t.proxy(function(t,e){var i=e.item.data("layerObject"),n=e.item.prevAll(".n2-ss-layer, .n2-ss-layer-group").first().data("layerObject");this.$row.sortable("cancel");var r=i.getIndex(),s=0;n&&(s=n.getIndex(),r>s&&s++),r!=s&&this.moveCol(r,s)},this)})},r.prototype.____makeLayerResizeableStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layerrow-padding").data("field").insideChange(r.join("|*|"))},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-row"></div></div>').attr("data-type",this.type)},r.prototype.historyDeleteCol=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreateCol=function(t,e){var i=t.getSelf().createCol();e.setSelf(i)},r.prototype.createCol=function(){var t=new e.Col(this.canvasManager,this,{});return i.history.addSimple(this,this.historyDeleteCol,this.historyCreateCol,[this,t]),t.create(),this.isReady()&&this.placement.updatePosition(),t},r.prototype.createRow=function(){this.$row=this.layer.find(".n2-ss-layer-row:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"default","> .n2-ss-layer",["col"]),this.container.setLayerContainerElement(this.$row);var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-row-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-row"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.activate=function(){e.PluginActivatable.prototype.activate.apply(this,arguments),this.columnsField.setRow(this)},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getColumns=function(){for(var t=this.container.getSortedLayers(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype.getColumnsOrdered=function(){for(var t=this.getOrderedColumns(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype._synccolumns=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._synccolwidth();this.update()},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.$row.css("padding",r),this.$row.nextendSpacing("option","current",r),this.update()},r.prototype.getGutter=function(){return this.getProperty("gutter")},r.prototype._syncgutter=function(){var t=this.getGutter()+"px",e=this.container.getSortedLayers();if(e.length>0)for(var i=e.length-1;i>=0;i--)e[i].layer.css("marginRight",t).css("marginTop",t);this.$row.nextendColumns("option","gutter",this.getGutter()),this.update()},r.prototype._syncwrapafter=function(){if(!this.isDeleted&&!this.isDeleteStarted){for(var e=parseInt(this.getProperty("wrapafter")),i=this.getOrderedColumns(),n=!1,r=i.length-1;r>=0;r--)i[r].showsOnCurrent||i.splice(r,1);var s=i.length;if(e>0&&s>e&&(n=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",n),n)for(var r=0;s>r;r++){var o=parseInt(r/e);if(i[r].layer.attr("data-r",o),(r+1)%e==0||r==s-1){var a=i[r].getProperty("order");0==a&&(a=10),t('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[r].layer.addClass("n2-ss-last-in-row"))}else i[r].layer.removeClass("n2-ss-last-in-row")}else{for(var r=0;s>r;r++)i[r].layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i.length>0?i[s-1].layer.addClass("n2-ss-last-in-row"):console.error("The row does not have col.")}this.update()}},r.prototype.getOrderedColumns=function(){return this.container.getSortedLayers().sort(function(t,e){return t.getRealOrder()-e.getRealOrder()})},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype._syncfullwidth=function(){this.layer.toggleClass("n2-ss-autowidth",0==this.getProperty("fullwidth"))},r.prototype._syncstretch=function(){this.layer.toggleClass("n2-ss-stretch-layer",1==this.getProperty("stretch"))},r.prototype._syncborderradius=function(){this.$row.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$row.css("box-shadow",""):this.$row.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=nextend.smartSlider.generator.fill(this.getProperty("bgimage"));if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.$row.css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.$row.css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.$row.css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.$row.css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.$row.css("background",t)}}else this.$row.css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.cols=this.container.getData(t)),i},r.prototype.moveCol=function(t,e){if("desktopPortrait"==this.getMode()){this._moveCol(t,e);var n=i.history.addValue(this,this.historyMoveCol,[]);n&&n.setValues({oldIndex:e,newIndex:t},{oldIndex:t,newIndex:e})}else{var r=this.getOrderedColumns(),s=r[t];r.splice(t,1),r.splice(e,0,s);for(var o=0;o<r.length;o++)r[o].setProperty("order",o+1);this.refreshUI()}},r.prototype._moveCol=function(t,e){var i=this.container.getSortedLayers();e>t&&e++,this.container.insertLayerAt(i[t],e),this.refreshUI()},r.prototype.historyMoveCol=function(t){this._moveCol(t.oldIndex,t.newIndex)},r.prototype.setColsWidth=function(t){for(var e=this.container.getSortedLayers(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.setRealColsWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.updateColumnWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<e.length;i++)e[i].layer.css("width",100*t[i]+"%");this.update()},r.prototype.activateColumn=function(t,e){this.container.getSortedLayers()[t].activate(e)},r.prototype.onChildCountChange=function(){if(!this.isDeleted&&!this.isDeleteStarted){var t=this.container.getSortedLayers(),e=t.length;if(e){for(var i=this.getColumns().split("+"),n=0,r=0;r<i.length;r++)n=new Fraction(i[r]).add(n);if(1!=n.valueOf())for(var r=0;e>r;r++)t[r].setProperty("colwidth","1/"+e);else for(var r=0;e>r;r++)t[r]._synccolwidth();this.refreshUI()}this._syncgutter(),this._syncwrapafter()}},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncpadding(),this._syncinneralign(),this._syncwrapafter(),this._syncgutter(),this.isActive&&this.columnsField.setRow(this)},r.prototype.hightlightStructure=function(e){e=e||4e3,this.isStructureHighlighted&&(clearTimeout(this.isStructureHighlighted),this.isStructureHighlighted=!1),this.layer.addClass("n2-highlight-structure"),this.isStructureHighlighted=setTimeout(t.proxy(function(){this.isDeleted||this.layer.removeClass("n2-highlight-structure")},this),e)},r.prototype.refreshUI=function(){this.isDeleteStarted||(this.isActive&&this.columnsField.setRow(this),this._syncwrapafter(),this.$row.nextendColumns("option","columns",this.getColumnsOrdered()))},r.prototype.getDroppable=function(){return this.layer.is(":visible")&&this.status!=N2Classes.ComponentAbstract.STATUS.HIDDEN&&this.status!=N2Classes.ComponentAbstract.STATUS.LOCKED?{$container:this.$row,layer:this,placement:"normal",axis:"x"}:"hidden"},r.prototype.getLLDroppable=function(t){switch(t.type){case"col":if(t.group==this)return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$row},r}),N2Require("ComponentSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.componentType="undefined",this.placementType="undefined",t("html").attr("data-component",""),t("html").attr("data-placement",""),this.currentForm={},this.forms={undefined:null,placement:{absolute:{},normal:{},"default":{}},component:{content:{},layer:{},row:{},col:{},group:{}},global:{id:t("#layerid"),desktopPortrait:t("#layershow-desktop-portrait"),desktopLandscape:t("#layershow-desktop-landscape"),tabletPortrait:t("#layershow-tablet-portrait"),tabletLandscape:t("#layershow-tablet-landscape"),mobilePortrait:t("#layershow-mobile-portrait"),mobileLandscape:t("#layershow-mobile-landscape"),"class":t("#layerclass"),generatorvisible:t("#layergenerator-visible"),crop:t("#layercrop"),rotation:t("#layerrotation"),parallax:t("#layerparallax"),fontsize:t("#layerfont-size"),adaptivefont:t("#layeradaptive-font"),mouseenter:t("#layeronmouseenter"),click:t("#layeronclick"),mouseleave:t("#layeronmouseleave"),play:t("#layeronplay"),pause:t("#layeronpause"),stop:t("#layeronstop")}},this.canvasManager=e;var n=i.frontend.responsive;n.enabled("desktop","Landscape")||this.forms.global.desktopLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Portrait")||this.forms.global.tabletPortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Landscape")||this.forms.global.tabletLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Portrait")||this.forms.global.mobilePortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Landscape")||this.forms.global.mobileLandscape.closest(".n2-mixed-group").css("display","none"),this.forms.placement.absolute={parentid:t("#layerparentid"),parentalign:t("#layerparentalign"),parentvalign:t("#layerparentvalign"),left:t("#layerleft"),top:t("#layertop"),responsiveposition:t("#layerresponsive-position"),width:t("#layerwidth"),height:t("#layerheight"),responsivesize:t("#layerresponsive-size"),align:t("#layeralign"),valign:t("#layervalign")},this.forms.placement.normal={margin:t("#layernormal-margin"),height:t("#layernormal-height"),maxwidth:t("#layernormal-maxwidth"),selfalign:t("#layernormal-selfalign")},this.forms.component.content={maxwidth:t("#layercontent-maxwidth"),selfalign:t("#layercontent-selfalign"),padding:t("#layercontent-padding"),inneralign:t("#layercontent-inneralign"),verticalalign:t("#layercontent-verticalalign"),bgcolor:t("#layercontent-background-color"),bgimage:t("#layercontent-background-image"),bgimagex:t("#layercontent-background-focus-x"),bgimagey:t("#layercontent-background-focus-y"),bgimageparallax:t("#layercontent-background-parallax"),bgcolorgradient:t("#layercontent-background-gradient"),
9
- bgcolorgradientend:t("#layercontent-background-color-end"),opened:t("#layercontent-opened")},i.generator.registerField(this.forms.component.content.bgimage),this.forms.component.row={padding:t("#layerrow-padding"),gutter:t("#layerrow-gutter"),fullwidth:t("#layerrow-fullwidth"),stretch:t("#layerrow-stretch"),wrapafter:t("#layerrow-wrap-after"),inneralign:t("#layerrow-inneralign"),bgimage:t("#layerrow-background-image"),bgimagex:t("#layerrow-background-focus-x"),bgimagey:t("#layerrow-background-focus-y"),bgimageparallax:t("#layerrow-background-parallax"),bgcolor:t("#layerrow-background-color"),bgcolorgradient:t("#layerrow-background-gradient"),bgcolorgradientend:t("#layerrow-background-color-end"),borderradius:t("#layerrow-border-radius"),boxshadow:t("#layerrow-boxshadow"),opened:t("#layerrow-opened")},i.generator.registerField(this.forms.component.row.bgimage),this.forms.component.col={maxwidth:t("#layercol-maxwidth"),padding:t("#layercol-padding"),inneralign:t("#layercol-inneralign"),verticalalign:t("#layercol-verticalalign"),bgcolor:t("#layercol-background-color"),link:t("#layercol-link"),bgimage:t("#layercol-background-image"),bgimagex:t("#layercol-background-focus-x"),bgimagey:t("#layercol-background-focus-y"),bgimageparallax:t("#layercol-background-parallax"),bgcolorgradient:t("#layercol-background-gradient"),bgcolorgradientend:t("#layercol-background-color-end"),borderradius:t("#layercol-border-radius"),boxshadow:t("#layercol-boxshadow"),borderwidth:t("#layercol-border-width"),borderstyle:t("#layercol-border-style"),bordercolor:t("#layercol-border-color"),opened:t("#layercol-opened"),colwidth:t("#layercol-colwidth"),order:t("#layercol-order")},i.generator.registerField(t("#col-linklayercol-link_0")),i.generator.registerField(this.forms.component.col.bgimage)}return r.prototype.changeActiveComponent=function(e,i,n,r){if(this.currentLayer=e,this.componentType!=i){switch(t("html").attr("data-component",i),i){case"content":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["content","animations","position"]);break;case"layer":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["item","style","animations","position"]);break;case"group":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["group","animations"]);break;case"row":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["row","animations","position"]);break;case"col":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["column","animations","position"])}this.componentType=i}this.changeActiveComponentPlacement(n),this.syncFields(r)},r.prototype.changeActiveComponentPlacement=function(e,i){this.placementType!=e&&(t("html").attr("data-placement",e),this.placementType=e),this.syncFields(i)},r.prototype.syncFields=function(e){if("object"==typeof e){this.currentForm=t.extend({},this.forms.global,this.forms.component[this.componentType],this.forms.placement[this.placementType]);for(var i in e)typeof e[i]!==n?this.updateField(i,e[i]):console.error("Value is undefined for: "+i);for(var r in this.currentForm)this.currentForm[r].off(".layeroptions").on("outsideChange.layeroptions",t.proxy(this.activeComponentPropertyChanged,this,r))}},r.prototype.onUpdateField=function(t,e,i){t.target==this.currentLayer&&this.updateField(e,i)},r.prototype.updateField=function(t,e){if("function"==typeof this.currentLayer["formSet"+t])this.currentLayer["formSet"+t](this,e);else if(this.currentForm[t]!==n){var i=this.currentForm[t].data("field");i!==n&&i.insideChange(e)}else console.error("field not available: "+t+":"+e,this.currentForm)},r.prototype.activeComponentPropertyChanged=function(t,e){if(this.currentLayer&&!this.currentLayer.isDeleted){var i=this.currentForm[t].val();this.currentLayer.setProperty(t,i,"manager")}else{var n=this.currentForm[t].data("field");"undefined"!=typeof n&&null!==n&&n.insideChange("")}},r.prototype.startFeatures=function(){this.layerFeatures=new e.LayerFeatures(this.forms.placement.absolute,this.canvasManager);var i=t("#n2-ss-layer-adaptive-font").on("click",t.proxy(function(){this.currentForm.adaptivefont.data("field").onoff.trigger("click")},this));this.forms.global.adaptivefont.on("nextendChange",t.proxy(function(){1==this.currentForm.adaptivefont.val()?i.addClass("n2-active"):i.removeClass("n2-active")},this)),new N2Classes.FormElementNumber("n2-ss-layer-font-size",-Number.MAX_VALUE,Number.MAX_VALUE),new N2Classes.FormElementAutocompleteSlider("n2-ss-layer-font-size",{min:50,max:300,step:5});var n=t("#n2-ss-layer-font-size").on("outsideChange",t.proxy(function(){var t=parseInt(n.val());this.currentForm.fontsize.val(t).trigger("change")},this));this.forms.global.fontsize.on("nextendChange",t.proxy(function(){n.data("field").insideChange(this.forms.global.fontsize.val())},this))},r}),N2Require("BgAnimationManager",[],[],function(t,e,i){function n(){this.type="backgroundanimation",NextendVisualManagerMultipleSelection.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(NextendVisualManagerMultipleSelection.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this,arguments),this.type="backgroundanimation",this.labels={visual:"Background animation",visuals:"Background animations"}},n.prototype.initController=function(){return new e.BgAnimationEditor},n.prototype.createVisual=function(t,e){return new NextendVisualWithSetRowMultipleSelection(t,e,this)},n}),N2Require("BgAnimationEditor",[],[],function(t,e,i){function n(){this.parameters={shiftedBackgroundAnimation:0},NextendVisualEditorController.prototype.constructor.call(this,!1),this.bgAnimationElement=t(".n2-bg-animation"),this.slides=t(".n2-bg-animation-slide"),this.bgImages=t(".n2-bg-animation-slide-bg"),NextendTween.set(this.bgImages,{rotationZ:1e-4}),this.directionTab=new N2Classes.FormElementRadio("n2-background-animation-preview-tabs",["0","1"]),this.directionTab.element.on("nextendChange.n2-editor",t.proxy(this.directionTabChanged,this)),nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d||nextend.notificationCenter.error("Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ")}return n.prototype=Object.create(NextendVisualEditorController.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualEditorController.prototype.loadDefaults.call(this),this.type="backgroundanimation",this.current=0,this.animationProperties=!1,this.direction=0},n.prototype.get=function(){return null},n.prototype.load=function(t,e,i,n){this.lightbox.addClass("n2-editor-loaded")},n.prototype.setTabs=function(t){},n.prototype.directionTabChanged=function(){this.direction=parseInt(this.directionTab.element.val())},n.prototype.start=function(){this.animationProperties&&(this.timeline?this.timeline.play():this.next())},n.prototype.pause=function(){this.timeline&&this.timeline.pause()},n.prototype.next=function(){this.timeline=new NextendTimeline({paused:!0,onComplete:t.proxy(this.ended,this)});var e=this.bgImages.eq(this.current),i=this.bgImages.eq(1-this.current);nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d?(this.currentAnimation=new N2Classes["SmartSliderBackgroundAnimation"+this.animationProperties.type](this,e,i,this.animationProperties,1,this.direction),this.slides.eq(this.current).css("zIndex",2),this.slides.eq(1-this.current).css("zIndex",3),this.timeline.to(this.slides.eq(this.current),.5,{opacity:0},this.currentAnimation.getExtraDelay()),this.timeline.to(this.slides.eq(1-this.current),.5,{opacity:1},this.currentAnimation.getExtraDelay()),this.currentAnimation.postSetup()):(this.timeline.to(this.slides.eq(this.current),1.5,{opacity:0},0),this.timeline.to(this.slides.eq(1-this.current),1.5,{opacity:1},0)),this.current=1-this.current,this.timeline.play()},n.prototype.ended=function(){this.currentAnimation&&this.currentAnimation.ended(),this.next()},n.prototype.setAnimationProperties=function(t){var e=this.animationProperties;this.animationProperties=t,e||this.next()},n});
1
  N2Require("ContextMenu",[],[],function(t,e,i){function n(e,i){this.isActive=!1,this.$el=e.data("nextendcontextmenu",this),this.parameters=t.extend({selector:!1,onShow:function(){}},i),this.$menu=t('<div class="n2-context-menu"></div>').on("mousedown",function(){nextend.context.setMouseDownArea("context-menu")}).appendTo("body"),this.parameters.selector?this.$el.on("contextmenu",this.parameters.selector,t.proxy(this.onShowContextMenu,this)):this.$el.on("contextmenu",t.proxy(this.onShowContextMenu,this))}return n.prototype.onShowContextMenu=function(e){e.preventDefault(),this.clearItems(),this.parameters.onShow.call(this,e,this),this.hasItems&&(e.stopPropagation(),this.isActive=!0,this.$menu.css({left:e.pageX,top:e.pageY}),t("html").on("mouseleave.nextendcontextmenu, click.nextendcontextmenu",t.proxy(this.onHide,this))),this.$menu.toggleClass("n2-active",this.hasItems)},n.prototype.onHide=function(){t("html").off(".nextendcontextmenu"),this.$menu.removeClass("n2-active"),this.isActive=!1},n.prototype.clearItems=function(){this.isActive&&this.onHide(),this.hasItems=!1,this.$menu.html("")},n.prototype.addItem=function(e,i,n){this.hasItems=!0,this.$menu.append(t('<div><i class="n2-i '+i+'"></i><span>'+e+"</span></div>").on("click",n))},t.fn.nextendContextMenu=function(e){return this.each(function(){new n(t(this),e)})},n}),N2Require("Zoom",[],[],function(t,e,i){function n(e){this.key="n2-ss-editor-device-lock-mode",this.devices={unknownUnknown:t("<div />")},this.responsives=[e],e.setOrientation("portrait"),e.parameters.onResizeEnabled=0,e.parameters.forceFull=0,e._getDevice=e._getDeviceZoom,this.lock=t("#n2-ss-lock").on("click",t.proxy(this.switchLock,this));var i=e.parameters.sliderWidthToDevice.desktopPortrait;this.container=e.containerElement.closest(".n2-ss-container-device").addBack(),this.container.width(i),this.containerWidth=i,this.initZoom();var n=t("#n2-ss-devices .n2-tr"),r=e.parameters.deviceModes;this.devices.desktopPortrait=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-desktop"></i></div>').prependTo(n),r.desktopLandscape?this.devices.desktopLandscape=t('<div class="n2-td n2-panel-option" data-device="desktop" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-desktop-landscape"></i></div>').prependTo(n):this.devices.desktopLandscape=this.devices.desktopPortrait,r.tabletPortrait?this.devices.tabletPortrait=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-tablet"></i></div>').prependTo(n):this.devices.tabletPortrait=this.devices.desktopPortrait,r.tabletLandscape?this.devices.tabletLandscape=t('<div class="n2-td n2-panel-option" data-device="tablet" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-tablet-landscape"></i></div>').prependTo(n):this.devices.tabletLandscape=this.devices.desktopLandscape,r.mobilePortrait?this.devices.mobilePortrait=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="portrait"><i class="n2-i n2-it n2-i-v-mobile"></i></div>').prependTo(n):this.devices.mobilePortrait=this.devices.tabletPortrait,r.mobileLandscape?this.devices.mobileLandscape=t('<div class="n2-td n2-panel-option" data-device="mobile" data-orientation="landscape"><i class="n2-i n2-it n2-i-v-mobile-landscape"></i></div>').prependTo(n):this.devices.mobileLandscape=this.devices.tabletLandscape,this.deviceOptions=t("#n2-ss-devices .n2-panel-option"),this.deviceOptions.each(t.proxy(function(e,i){t(i).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"zoomDeviceClicked"),click:t.proxy(this.setDeviceMode,this)})},this)),e.sliderElement.on("SliderDeviceOrientation",t.proxy(this.onDeviceOrientationChange,this))}var r=null;return nextend.ssBeforeResponsive=function(){r=new n(this),nextend.ssBeforeResponsive=function(){r.add(this)}},n.prototype.add=function(t){this.responsives.push(t),t.setOrientation("portrait"),t.parameters.onResizeEnabled=0,t.parameters.forceFull=0,t._getDevice=t._getDeviceZoom},n.prototype.onDeviceOrientationChange=function(e,i){t("#n2-admin").removeClass("n2-ss-mode-"+i.lastDevice+i.lastOrientation).addClass("n2-ss-mode-"+i.device+i.orientation),this.devices[i.lastDevice+i.lastOrientation].removeClass("n2-active"),this.devices[i.device+i.orientation].addClass("n2-active")},n.prototype.setDeviceMode=function(e){var i=t(e.currentTarget);if((e.ctrlKey||e.metaKey)&&nextend.smartSlider.canvasManager){var n=i.data("orientation");nextend.smartSlider.canvasManager.copyOrResetMode(i.data("device")+n[0].toUpperCase()+n.substr(1))}else for(var r=0;r<this.responsives.length;r++)this.responsives[r].setOrientation(i.data("orientation")),this.responsives[r].setMode(i.data("device"),this.responsives[r])},n.prototype.switchLock=function(e){e.preventDefault(),this.lock.toggleClass("n2-active"),this.lock.hasClass("n2-active")?(this.setZoomSyncMode(),this.zoomChange(e,this.zoom.slider("value"),"sync",!1),t.jStorage.set(this.key,"sync")):(this.setZoomFixMode(),t.jStorage.set(this.key,"fix"))},n.prototype.initZoom=function(){var e=t("#n2-ss-slider-zoom");e.length>0&&("undefined"!=typeof e[0].slide&&(e[0].slide=null),this.zoom=e.removeAttr("slide").prop("slide",!1).slider({range:"min",step:1,value:1,min:0,max:102}),this.responsives[0].sliderElement.on("SliderResize",t.proxy(this.sliderResize,this)),"fix"==t.jStorage.get(this.key,"sync")?this.setZoomFixMode():(this.setZoomSyncMode(),this.lock.addClass("n2-active")))},n.prototype.sliderResize=function(t,e){this.setZoom()},n.prototype.setZoomFixMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeFixMode,this)})},n.prototype.setZoomSyncMode=function(){this.zoom.off(".n2-ss-zoom").on({"slide.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this),"slidechange.n2-ss-zoom":t.proxy(this.zoomChangeSyncMode,this)})},n.prototype.zoomChangeFixMode=function(t,e){this.zoomChange(t,e.value,"fix",e)},n.prototype.zoomChangeSyncMode=function(t,e){this.zoomChange(t,e.value,"sync",e)},n.prototype.zoomChange=function(t,e,n,r){var s;if(t.originalEvent!==i){var o=1;50>e?o=nextend.smallestZoom/this.containerWidth+Math.max(e/50,0)*(1-nextend.smallestZoom/this.containerWidth):e>52&&(o=1+(e-52)/50),s=parseInt(o*this.containerWidth),this.container.width(s);for(var a=1;a<this.responsives.length;a++)this.responsives[a].containerElement.width(s);for(var a=0;a<this.responsives.length;a++)switch(n){case"sync":this.responsives[a].doResize(t);break;default:this.responsives[a].doResize(t,!0)}}else s=this.container.last().width(),this.container.width(s);r&&(r.handle.innerHTML=s+"px")},n.prototype.setZoom=function(){var t=this.responsives[0].containerElement.width()/this.containerWidth,e=50;1>t?e=(t-nextend.smallestZoom/this.containerWidth)/(1-nextend.smallestZoom/this.containerWidth)*50:t>1&&(e=50*(t-1)+52);this.zoom.slider("value");this.zoom.slider("value",e)},n}),N2Require("CreateSlider",[],[],function(t,e,i){function n(e,i,n){this.addToGroupModal=null,this.groupID=e,this.ajaxUrl=i,this.shouldSkipLicenseModal=n,t(".n2-ss-create-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showModal()},this)),this.notificationStack=new NextendNotificationCenterStackModal(t("body")),t(".n2-ss-add-sample-slider").click(t.proxy(function(t){t.preventDefault(),t.stopImmediatePropagation(),this.showDemoSliders()},this)),"createslider"==window.location.hash.substring(1)&&this.showModal()}return n.prototype.showModal=function(){if(!this.createSliderModal){var e=this,i=this.ajaxUrl,n=[];n.push({key:"default",name:n2_("Default"),image:"$ss$/admin/images/sliderpresets/default.png"}),n.push({key:"fullwidth",name:n2_("Full width"),image:"$ss$/admin/images/sliderpresets/fullwidth.png"}),n.push({key:"thumbnailhorizontal",name:n2_("Thumbnail - horizontal"),image:"$ss$/admin/images/sliderpresets/thumbnailhorizontal.png"});var r=[550,520];this.createSliderModal=new NextendModal({zero:{size:r,title:n2_("Create Slider"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Create")+"</a>"],fn:{show:function(){var r=this.controls.find(".n2-button-green"),s=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),r.trigger("click")});s.append(this.createInput(n2_("Slider name"),"createslidertitle","width: 240px;")),s.append(this.createInputUnit(n2_("Width"),"createsliderwidth","px","width: 30px;")),s.append(this.createInputUnit(n2_("Height"),"createsliderheight","px","width: 30px;")),new N2Classes.FormElementAutocompleteSimple("createsliderwidth",["1920","1200","1000","800","600","400"]),new N2Classes.FormElementAutocompleteSimple("createsliderheight",["800","600","500","400","300","200"]);var o=t("#createslidertitle").val(n2_("Slider")).focus(),a=t("#createsliderwidth").val(1200),l=t("#createsliderheight").val(500);a.parent().addClass("n2-form-element-autocomplete ui-front"),l.parent().addClass("n2-form-element-autocomplete ui-front"),this.createHeading(n2_("Preset")).appendTo(this.content);var h=100,d=this.createImageRadio(n).css("height",h).appendTo(this.content),c=d.find("input");d.css("overflow","hidden"),this.createHeading(n2_("Import Sample Sliders")).appendTo(this.content),t('<div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample1.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample2.png")+'\')"></div><div class="n2-ss-create-slider-free-sample" style="background-image: url(\''+nextend.imageHelper.fixed("$ss$/admin/images/free/sample3.png")+"')\"></div>").on("click",t.proxy(function(){this.hide(),e.showDemoSliders()},this)).appendTo(this.content),r.on("click",t.proxy(function(){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(i,{nextendaction:"create"}),data:{groupID:e.groupID,sliderTitle:o.val(),sliderSizeWidth:a.val(),sliderSizeHeight:l.val(),preset:c.val()},dataType:"json"}).done(t.proxy(function(t){NextendAjaxHelper.startLoading()},this))},this))}}}})}this.createSliderModal.show()},n.prototype.showDemoSliders=function(){var e=this;t("body").css("overflow","hidden");var i=0,n=t('<iframe src="//smartslider3.com/demo-import/?pro='+i+"&version="+N2SS3VERSION+"&utm_campaign="+N2SS3C+"&utm_source=import-slider-frame&utm_medium=smartslider-"+N2PLATFORM+"-"+(i?"pro":"free")+'" frameborder="0"></iframe>').css({position:"fixed",zIndex:1e5,left:0,top:0,width:"100%",height:"100%"}).appendTo("body"),r=function(){t("body").css("overflow",""),n.remove(),window.removeEventListener("message",o,!1),e.notificationStack.popStack()},s=function(t){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(e.ajaxUrl,{nextendaction:"importDemo"}),data:{groupID:e.groupID,key:Base64.encode(t.replace(/^(http(s)?:)?\/\//,"//"))},dataType:"json"}).fail(function(){})},o=function(t){if("http://smartslider3.com"===t.origin||"https://smartslider3.com"===t.origin){var e=t.data;switch(e.key){case"importSlider":return void("function"==typeof nextend.joinCommunity?nextend.joinCommunity(function(){s(e.data.href)}):s(e.data.href));case"closeWindow":r()}}};this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return r(),!0},this)),window.addEventListener("message",o,!1)},n}),N2Require("ManageSliders",[],[],function(t,e,i){function n(i,n,r){this.preventSort=!1,this.groupID=i,this.ajaxUrl=n,this.sliders=[],this.sliderPanel=t("#n2-ss-slider-container"),this.orderBy="ordering"==this.sliderPanel.data("orderby"),this.slidersContainer=this.sliderPanel.find(".n2-ss-sliders-container");for(var s=this.slidersContainer.find(".n2-ss-box-slider"),o=0;o<s.length;o++)this.sliders.push(new e.Slider(this,s.eq(o)));this.changed(),this.initMenu(),this.initOrderable(),this.create=new e.CreateSlider(i,n,r),this.initBulk()}return n.prototype.changed=function(){t("html").attr("data-sliders",this.sliders.length)},n.prototype.initSliders=function(){for(var e=(this.sliders.length,this.slidersContainer.find(".n2-ss-box-slider")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slider");i.push(r)}this.sliders=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidersChanged")},n.prototype.initOrderable=function(){this.orderBy&&this.slidersContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",connectWith:".n2-ss-box-slider-group",items:".n2-ss-box-slider",start:function(t,e){e.item.show()},stop:t.proxy(this.saveOrder,this),placeholder:"n2-box-sortable-placeholder",distance:10})},n.prototype.saveOrder=function(e){if(this.preventSort)return this.slidersContainer.sortable("cancel"),void(this.preventSort=!1);for(var i=this.slidersContainer.find(".n2-ss-box-slider"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slider");n.push(a),r.push(a.getId())}for(var o=0;o<this.sliders.length;o++)s.push(this.sliders[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidersOrderChanged");var l={nextendcontroller:"sliders",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{groupID:this.groupID,sliderorder:r,isReversed:"DESC"==this.sliderPanel.data("orderbydirection")?1:0}}),this.sliders=n}},n.prototype.initMenu=function(){this.slider=null,this.menu=t("#n2-ss-slider-menu").detach().addClass("n2-inited"),this.menuActions={duplicate:this.menu.find(".n2-ss-duplicate").on("click",t.proxy(function(t){this.slider.duplicate(t)},this)),"delete":this.menu.find(".n2-ss-delete").on("click",t.proxy(function(t){this.slider["delete"](t)},this)),preview:this.menu.find(".n2-ss-preview").on("click",t.proxy(function(t){this.slider.preview(t)},this))},this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slider=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.hasClass("n2-active")&&this.menu.removeClass("n2-active").off("mouseleave"),this.menu.detach()},n.prototype.deleteSliders=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slider-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"delete"}),type:"POST",data:{sliders:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSliders(),this.leaveBulk()},this))},this))},n.prototype.duplicateSliders=function(e,i){for(var n=0;n<this.sliders.length;n++)this.sliders[n].selected&&this.sliders[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.exportSliders=function(e,i){window.location.href=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"exportAll"})+"&"+t.param({sliders:e,currentGroupID:this.groupID})},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this));t(".n2-bulk-actions").find("a").on("click",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"duplicate":this.bulkAction("duplicateSliders",!1);break;case"delete":this.bulkAction("deleteSliders",!1);break;case"export":this.bulkAction("exportSliders",!1);break;case"addToGroup":this.bulkAction("addToGroup",!0)}},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.sliders.length;e++)t(this.sliders[e])},n.prototype.bulkAction=function(t,e){var i=[],n=[];this.bulkSelect(function(t){!t.selected||e&&t.isGroup||(i.push(t),n.push(t.getId()))}),n.length?(this[t](n,i),this.leaveBulk()):e?nextend.notificationCenter.notice("Please select one or more sliders for the action!"):nextend.notificationCenter.notice("Please select one or more sliders or groups for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.orderBy&&this.slidersContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.orderBy&&this.slidersContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.sliders.length;e++)this.sliders[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n}),N2Require("Slider",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slider",this).addClass("n2-clickable"),this.isGroup=this.box.hasClass("n2-ss-box-slider-group"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slider",t.proxy(this.goToEdit,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("sliderid")},n.prototype.goToEdit=function(t,e){var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):window.location=i},n.prototype.preview=function(t){t.stopPropagation(),t.preventDefault(),window.open(NextendAjaxHelper.makeFallbackUrl(this.box.data("editurl"),{nextendcontroller:"preview",nextendaction:"index"}),"_blank")},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendcontroller:"slider",nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSliders(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSliders([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n}),N2Require("FormElementAnimationManager",["FormElement"],[],function(t,e,i){function n(i,n){this.element=t("#"+i),this.managerIdentifier=n,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.show=function(e){e.preventDefault(),nextend[this.managerIdentifier].show(this.element.val(),t.proxy(this.save,this))},n.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},n.prototype.save=function(t,e){this.val(e)},n.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},n.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},n.prototype.updateName=function(t){t=""==t?n2_("Disabled"):t.split("||").length>1?n2_("Multiple animations"):n2_("Single animation"),this.name.val(t)},n}),N2Require("FormElementBackground",["FormElement"],[],function(t,e,i){function n(i,n){this.value="",this.element=t("#"+i),this.$container=this.element.closest(".n2-form-tab"),this.panel=t("#"+i+"-panel"),this.setValue(n),this.options=this.panel.find(".n2-subform-image-option").on("click",t.proxy(this.selectOption,this)),this.active=this.getIndex(this.options.filter(".n2-active").get(0)),this.element.on("change",t.proxy(function(){this.insideChange(this.element.val())},this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.selectOption=function(e){var i=this.getIndex(e.currentTarget);if(i!=this.active){this.options.eq(i).addClass("n2-active"),this.options.eq(this.active).removeClass("n2-active"),this.active=i;var n=t(e.currentTarget).data("value");this.insideChange(n)}},n.prototype.setValue=function(t){this.$container.removeClass("n2-ss-background-type-"+this.value),this.value=t,this.$container.addClass("n2-ss-background-type-"+this.value)},n.prototype.insideChange=function(t){this.setValue(t),this.element.val(t),this.options.removeClass("n2-active"),this.options.filter('[data-value="'+t+'"]').addClass("n2-active"),this.triggerInsideChange()},n.prototype.getIndex=function(e){return t.inArray(e,this.options)},n}),N2Require("FormElementColumns",["FormElement"],[],function(t,e,i){function n(i){this.denominators={1:100,2:100,3:144,4:100,5:100,6:144},this.element=t("#"+i),e.FormElement.prototype.constructor.apply(this,arguments),this.$c=t("#"+i).parent(),this.$container=this.$c.find(".n2-ss-columns-element-container"),this.containerWidth=284,this.maxWidth=0,this.$container.sortable({axis:"x",tolerance:"pointer",items:".n2-ss-columns-element-column",helper:"clone",start:t.proxy(function(t,e){this.$container.addClass("n2-sortable-currently-sorted"),e.placeholder.css("width",e.item.width());var i=this.$container.find(".n2-ss-columns-element-column");e.item.data("index",i.index(e.item))},this),stop:t.proxy(function(t,e){var i=this.$container.find(".n2-ss-columns-element-column"),n=e.item.data("index"),r=i.index(e.item);n!=r&&(this.currentRow.moveCol(n,r),e.item.data("index",null)),this.makeResizable(),this.$container.removeClass("n2-sortable-currently-sorted")},this)}),this.$c.find(".n2-ss-columns-element-add-col").on({click:t.proxy(function(){this.currentRow.createCol()},this)})}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.getDenominator=function(t){return this.denominators[t]===i&&(this.denominators[t]=15*t),this.denominators[t]},n.prototype.setRow=function(t){this.currentRow=t,this.insideChange(t.getColumnsOrdered())},n.prototype.setValue=function(t){},n.prototype.insideChange=function(t){this.start(t)},n.prototype.activateColumn=function(t){var e=this.$container.find(".n2-ss-columns-element-column").index(t.currentTarget);this.currentRow.activateColumn(e,t)},n.prototype.start=function(e){this.percentages=[];for(var i=e.split("+"),n=0;n<i.length;n++)this.percentages.push(new Fraction(i[n]));this.refreshMaxWidth(),this.$container.empty();for(var n=0;n<this.percentages.length;n++)this.updateColumn(t('<div class="n2-ss-columns-element-column">').on("click",t.proxy(this.activateColumn,this)).appendTo(this.$container),this.percentages[n]);this.makeResizable()},n.prototype.refreshMaxWidth=function(){this.maxWidth=this.containerWidth-15*(this.percentages.length-1)},n.prototype.updateColumn=function(t,e){t.css("width",this.maxWidth*e.valueOf()+"px").html(Math.round(100*e.valueOf()*10)/10+"%")},n.prototype.makeResizable=function(){this.handles&&this.handles.remove(),this.$columns=this.$container.find(".n2-ss-columns-element-column"),t('<div class="n2-ss-columns-element-handle"><div class="n2-i n2-i-more"></div></div>').insertAfter(this.$columns.not(this.$columns.last())),this.handles=this.$container.find(".n2-ss-columns-element-handle").on("mousedown",t.proxy(this._resizeStart,this))},n.prototype._resizeStart=function(e){var i=this.handles.index(e.currentTarget),n=this.$container.offset().left+8;this.resizeContext={index:i,cLeft:n,$currentCol:this.$columns.eq(i),$nextCol:this.$columns.eq(i+1),startX:Math.max(0,Math.min(e.clientX-n,this.containerWidth))},this._resizeMove(e),t("html").off(".resizecol").on({"mousemove.resizecol":t.proxy(this._resizeMove,this),"mouseup.resizecol mouseleave.resizecol":t.proxy(this._resizeStop,this)})},n.prototype._resizeMove=function(e){e.preventDefault();var i=Math.max(0,Math.min(e.clientX-this.resizeContext.cLeft,this.containerWidth)),n=this.getDenominator(this.percentages.length),r=new Fraction(Math.round((i-this.resizeContext.startX)/(this.maxWidth/n)),n);r.compare(this.percentages[this.resizeContext.index].clone().mul(-1))<0&&(r=this.percentages[this.resizeContext.index].clone().mul(-1)),r.compare(this.percentages[this.resizeContext.index+1])>0&&(r=this.percentages[this.resizeContext.index+1].clone());var s=this.percentages[this.resizeContext.index].add(r),o=this.percentages[this.resizeContext.index+1].sub(r);this.updateColumn(this.resizeContext.$currentCol,s),this.updateColumn(this.resizeContext.$nextCol,o);var a=t.extend([],this.percentages);return a[this.resizeContext.index]=s,a[this.resizeContext.index+1]=o,this.onColumnWidthChange(a),[s,o]},n.prototype._resizeStop=function(e){var i=this._resizeMove(e);this.percentages[this.resizeContext.index]=i[0],this.percentages[this.resizeContext.index+1]=i[1],t("html").off(".resizecol"),delete this.resizeContext,this.currentRow.setRealColsWidth(this.percentages)},n.prototype.onColumnWidthChange=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].valueOf());this.currentRow.updateColumnWidth(e)},n}),function(t){"use strict";function e(t,e){return isNaN(t=parseInt(t,10))&&i(),t*e}function i(){throw"Invalid Param"}function n(t,e){return this instanceof n?(o(t,e),t=n.REDUCE?d(s.d,s.n):1,this.s=s.s,this.n=s.n/t,void(this.d=s.d/t)):new n(t,e)}var r=2e3,s={s:1,n:0,d:1},o=function(t,n){var r,o=0,a=1,l=1,h=0,d=0,c=0,p=1,u=1,y=0,g=1,f=1,v=1,m=1e7;if(void 0===t||null===t);else if(void 0!==n)o=t,a=n,l=o*a;else switch(typeof t){case"object":"d"in t&&"n"in t?(o=t.n,a=t.d,"s"in t&&(o*=t.s)):0 in t?(o=t[0],1 in t&&(a=t[1])):i(),l=o*a;break;case"number":if(0>t&&(l=t,t=-t),t%1===0)o=t;else if(t>0){for(t>=1&&(u=Math.pow(10,Math.floor(1+Math.log(t)/Math.LN10)),t/=u);m>=g&&m>=v;){if(r=(y+f)/(g+v),t===r){m>=g+v?(o=y+f,a=g+v):v>g?(o=f,a=v):(o=y,a=g);break}t>r?(y+=f,g+=v):(f+=y,v+=g),g>m?(o=f,a=v):(o=y,a=g)}o*=u}else(isNaN(t)||isNaN(n))&&(a=o=NaN);break;case"string":if(g=t.match(/\d+|./g),"-"===g[y]?(l=-1,y++):"+"===g[y]&&y++,g.length===y+1?d=e(g[y++],l):"."===g[y+1]||"."===g[y]?("."!==g[y]&&(h=e(g[y++],l)),y++,(y+1===g.length||"("===g[y+1]&&")"===g[y+3]||"'"===g[y+1]&&"'"===g[y+3])&&(d=e(g[y],l),p=Math.pow(10,g[y].length),y++),("("===g[y]&&")"===g[y+2]||"'"===g[y]&&"'"===g[y+2])&&(c=e(g[y+1],l),u=Math.pow(10,g[y+1].length)-1,y+=3)):"/"===g[y+1]||":"===g[y+1]?(d=e(g[y],l),p=e(g[y+2],1),y+=3):"/"===g[y+3]&&" "===g[y+1]&&(h=e(g[y],l),d=e(g[y+2],l),p=e(g[y+4],1),y+=5),g.length<=y){a=p*u,l=o=c+a*h+u*d;break}default:i()}if(0===a)throw"DIV/0";s.s=0>l?-1:1,s.n=Math.abs(o),s.d=Math.abs(a)},a=function(t,e,i){for(var n=1;e>0;t=t*t%i,e>>=1)1&e&&(n=n*t%i);return n},l=function(t,e){for(;e%2===0;e/=2);for(;e%5===0;e/=5);if(1===e)return 0;for(var i=10%e,n=1;1!==i;n++)if(i=10*i%e,n>r)return 0;return n},h=function(t,e,i){for(var n=1,r=a(10,i,e),s=0;300>s;s++){if(n===r)return s;n=10*n%e,r=10*r%e}return 0},d=function(t,e){if(!t)return e;if(!e)return t;for(;;){if(t%=e,!t)return e;if(e%=t,!e)return t}};n.REDUCE=1,n.prototype={s:1,n:0,d:1,abs:function(){return new n(this.n,this.d)},neg:function(){return new n(-this.s*this.n,this.d)},add:function(t,e){return o(t,e),new n(this.s*this.n*s.d+s.s*this.d*s.n,this.d*s.d)},sub:function(t,e){return o(t,e),new n(this.s*this.n*s.d-s.s*this.d*s.n,this.d*s.d)},mul:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.n,this.d*s.d)},div:function(t,e){return o(t,e),new n(this.s*s.s*this.n*s.d,this.d*s.n)},clone:function(){return new n(this)},mod:function(t,e){return isNaN(this.n)||isNaN(this.d)?new n(NaN):void 0===t?new n(this.s*this.n%this.d,1):(o(t,e),0===s.n&&0===this.d&&n(0,0),new n(this.s*s.d*this.n%(s.n*this.d),s.d*this.d))},gcd:function(t,e){return o(t,e),new n(d(s.n,this.n),s.d*this.d/d(s.d,this.d))},lcm:function(t,e){return o(t,e),0===s.n&&0===this.n?new n:new n(s.n*this.n/d(s.n,this.n),d(s.d,this.d))},ceil:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.ceil(t*this.s*this.n/this.d),t)},floor:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.floor(t*this.s*this.n/this.d),t)},round:function(t){return t=Math.pow(10,t||0),isNaN(this.n)||isNaN(this.d)?new n(NaN):new n(Math.round(t*this.s*this.n/this.d),t)},inverse:function(){return new n(this.s*this.d,this.n)},pow:function(t){return 0>t?new n(Math.pow(this.s*this.d,-t),Math.pow(this.n,-t)):new n(Math.pow(this.s*this.n,t),Math.pow(this.d,t))},equals:function(t,e){return o(t,e),this.s*this.n*s.d===s.s*s.n*this.d},compare:function(t,e){o(t,e);var i=this.s*this.n*s.d-s.s*s.n*this.d;return(i>0)-(0>i)},divisible:function(t,e){return o(t,e),!(!(s.n*this.d)||this.n*s.d%(s.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,i+=" ",n%=r),i+=n,i+="/",i+=r),i},toLatex:function(t){var e,i="",n=this.n,r=this.d;return this.s<0&&(i+="-"),1===r?i+=n:(t&&(e=Math.floor(n/r))>0&&(i+=e,n%=r),i+="\\frac{",i+=n,i+="}{",i+=r,i+="}"),i},toContinued:function(){var t,e=this.n,i=this.d,n=[];do n.push(Math.floor(e/i)),t=e%i,e=i,i=t;while(1!==e);return n},toString:function(){var t,e=this.n,i=this.d;if(isNaN(e)||isNaN(i))return"NaN";n.REDUCE||(t=d(e,i),e/=t,i/=t);for(var r=String(e).split(""),s=0,o=[~this.s?"":"-","",""],a="",c=l(e,i),p=h(e,i,c),u=-1,y=1,g=15+c+p+r.length,f=0;g>f;f++,s*=10){if(f<r.length?s+=Number(r[f]):(y=2,u++),c>0)if(u===p)o[y]+=a+"(",a="";else if(u===c+p){o[y]+=a+")";break}s>=i?(o[y]+=a+(s/i|0),a="",s%=i):y>1?a+="0":o[y]&&(o[y]+="0")}return o[0]+=o[1]||"0",o[2]?o[0]+"."+o[2]:o[0]}},t.Fraction=n}(this),N2Require("FormElementSliderType",[],[],function(t,e,i){function n(e){this.element=t("#"+e),this.setAttribute(),this.element.on("nextendChange",t.proxy(this.setAttribute,this))}return n.prototype.setAttribute=function(){t("#n2-admin").attr("data-slider-type",this.element.val()),"block"==this.element.val()&&t(".n2-fm-shadow").trigger("click")},n}),N2Require("FormElementSliderWidgetArea",["FormElement"],[],function(t,e,i){function n(i){this.element=t("#"+i),this.area=t("#"+i+"_area"),this.areas=this.area.find(".n2-area"),this.areas.on("click",t.proxy(this.chooseArea,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.FormElement.prototype),n.prototype.constructor=n,n.prototype.chooseArea=function(e){var i=parseInt(t(e.target).data("area"));this.element.val(i),this.setSelected(i),this.triggerOutsideChange()},n.prototype.insideChange=function(t){t=parseInt(t),this.element.val(t),this.setSelected(t),this.triggerInsideChange()},n.prototype.setSelected=function(t){this.areas.removeClass("n2-active"),this.areas.eq(t-1).addClass("n2-active")},n}),N2Require("FormElementWidgetPosition",[],[],function(t,e,i){function n(e){this.element=t("#"+e+"-mode"),this.container=this.element.closest(".n2-form-element-mixed"),this.tabs=this.container.find("> .n2-mixed-group"),this.element.on("nextendChange",t.proxy(this.onChange,this)),this.onChange()}return n.prototype.onChange=function(){var t=this.element.val();"advanced"==t?(this.tabs.eq(2).css("display",""),this.tabs.eq(1).css("display","none")):(this.tabs.eq(1).css("display",""),
2
  this.tabs.eq(2).css("display","none"))},n}),N2Require("SmartSliderGeneratorRecords",[],[],function(t,e,i){function n(e){this.ajaxUrl=e,t("#generatorrecord-viewer").on("click",t.proxy(this.showRecords,this))}return n.prototype.showRecords=function(e){e.preventDefault(),NextendAjaxHelper.ajax({type:"POST",url:this.ajaxUrl,data:t("#smartslider-form").serialize(),dataType:"json"}).done(function(t){var e=new NextendModal({zero:{size:[1300,700],title:"Records",content:t.data.html}},!0);e.content.css("overflow","auto")}).error(function(t){if(200==t.status){var e=new NextendModal({zero:{size:[1300,700],title:"Response",content:t.responseText}},!0);e.content.css("overflow","auto")}})},n}),N2Require("QuickSlides",[],[],function(t,e,i){function n(e){var i=t("#n2-quick-slides-edit");i.length<1||(this.ajaxUrl=e,i.on("click",t.proxy(this.openEdit,this)))}return n.prototype.openEdit=function(e){e.preventDefault();var i=t("#n2-ss-slides .n2-box-slide"),n=this;this.modal=new NextendModal({zero:{fit:!0,fitX:!1,overflow:"auto",size:[1200,700],title:n2_("Quick Edit - Slides"),back:!1,close:!0,content:'<form class="n2-form"><table></table></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Save")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button-green"),r=this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}),s=r.find("table");i.each(t.proxy(function(e,i){var r=t(i),o=t("<tr />").appendTo(s),a=r.data("slideid");o.append(t("<td />").append('<img src="'+r.data("image")+'" style="width:100px;"/>')),o.append(t("<td />").append(n.createInput("Name","title-"+a,r.data("title"),"width: 240px;"))),o.append(t("<td />").append(n.createTextarea("Description","description-"+a,r.data("description"),"width: 330px;height:24px;")));var l=r.data("link").split("|*|");o.append(t("<td />").append(n.createLink("Link","link-"+a,l[0],"width: 180px;"))),o.append(t("<td />").append(n.createTarget("Target","target-"+a,l.length>1?l[1]:"_self",""))),new N2Classes.FormElementUrl("link-"+a,nextend.NextendElementUrlParams)},this)),e.on("click",t.proxy(function(e){var r={};i.each(t.proxy(function(e,i){var n=t(i),s=n.data("slideid"),o=t("#title-"+s).val(),a=t("#description-"+s).val(),l=t("#link-"+s).val()+"|*|"+t("#target-"+s).val();o==n.data("title")&&a==n.data("description")&&l==n.data("link")||(r[s]={name:o,description:a,link:l})},this)),jQuery.isEmptyObject(r)?this.hide(e):(this.hide(e),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(n.ajaxUrl),data:{changed:Base64.encode(JSON.stringify(r))},dataType:"json"}).done(t.proxy(function(e){var i=e.data;for(var n in i){var r=t('.n2-box-slide[data-slideid="'+n+'"]');r.find(".n2-box-placeholder a.n2-h4").html(i[n].title),r.attr("data-title",i[n].rawTitle),r.data("title",i[n].rawTitle),r.attr("data-description",i[n].rawDescription),r.data("description",i[n].rawDescription),r.attr("data-link",i[n].rawLink),r.data("link",i[n].rawLink)}},this)))},this))}}}}),this.modal.setCustomClass("n2-ss-quick-slides-edit-modal"),this.modal.show()},n.prototype.createInput=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTextarea=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+i+'" class="n2-h5" autocomplete="off" style="resize:y;'+r+'"></textarea></div></div></div></div>');return s.find("textarea").val(n),s},n.prototype.createLink=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+i+'" class="n2-h5" autocomplete="off" style="'+r+'"><a href="#" class="n2-form-element-clear"><i class="n2-i n2-it n2-i-empty n2-i-grey-opacity"></i></a><a id="'+i+'_button" class="n2-form-element-button n2-h5 n2-uc" href="#">Link</a></div></div></div></div>');return s.find("input").val(n),s},n.prototype.createTarget=function(e,i,n){var r="";4==arguments.length&&(r=arguments[3]);var s=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+i+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select id="'+i+'" autocomplete="off" style="'+r+'"><option value="_self">Self</option><option value="_blank">Blank</option></select</div></div></div></div>');return s.find("select").val(n),s},n}),N2Require("Slide",[],[],function(t,e,i){function n(e,i){this.selected=!1,this.manager=e,this.box=i.data("slide",this).addClass("n2-clickable"),this.box.on("mouseenter",t.proxy(function(){this.manager.showMenu(this)},this)).on("mouseleave",t.proxy(function(){this.manager.hideMenu()},this)).on("click.n2-slide",t.proxy(this.goToEdit,this)),this.publishElement=this.box.find(".n2-slide-published").on("click",t.proxy(this.switchPublished,this)),this.box.find(".n2-ss-box-select").on("click",t.proxy(function(t){t.stopPropagation(),t.preventDefault(),this.invertSelection()},this))}return n.prototype.getId=function(){return this.box.data("slideid")},n.prototype.setFirst=function(e){e.stopPropagation(),e.preventDefault(),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.manager.ajaxUrl,{nextendaction:"first"}),type:"POST",data:{id:this.getId()}}).done(t.proxy(function(){this.manager.unsetFirst(),this.box.addClass("n2-slide-state-first")},this))},n.prototype.unsetFirst=function(){this.box.removeClass("n2-slide-state-first")},n.prototype.switchPublished=function(t){t.stopPropagation(),t.preventDefault(),this.isPublished()?this.manager.unPublishSlides([this.getId()],[this]):this.manager.publishSlides([this.getId()],[this])},n.prototype.isPublished=function(){return this.box.hasClass("n2-slide-state-published")},n.prototype.published=function(){this.box.addClass("n2-slide-state-published")},n.prototype.unPublished=function(){this.box.removeClass("n2-slide-state-published")},n.prototype.goToEdit=function(t,e){if(this.manager.isBulkSelection)this.invertSelection(),t.preventDefault();else{var i=this.box.data("editurl");"undefined"!=typeof e&&e?window.open(i,"_blank"):i==location.href?n2("#n2-admin").toggleClass("n2-ss-slides-outer-container-visible"):window.location=i}},n.prototype.duplicate=function(e){e.stopPropagation(),e.preventDefault();var i=t.Deferred();return NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"duplicate"})}).done(t.proxy(function(e){var r=t(e.data).insertAfter(this.box),s=new n(this.manager,r);this.manager.initSlides(),i.resolve(s)},this)),i},n.prototype["delete"]=function(t){t.stopPropagation(),t.preventDefault(),this.manager.deleteSlides([this.getId()],[this])},n.prototype.deleted=function(){this.box.remove()},n.prototype.invertSelection=function(t){t&&t.preventDefault(),this.selected?this.deSelect():this.select()},n.prototype.select=function(){this.selected||(this.selected=!0,this.box.addClass("n2-selected"),this.manager.addSelection(this))},n.prototype.deSelect=function(){this.selected&&(this.selected=!1,this.box.removeClass("n2-selected"),this.manager.removeSelection(this))},n.prototype.publish=function(t){this.switchPublished(t)},n.prototype.unpublish=function(t){this.switchPublished(t)},n.prototype.generator=function(t){window.location=this.box.data("generator")},n.prototype.copy=function(e){this.manager.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.box.data("editurl"),{nextendaction:"copy",targetSliderID:t})})},this))},n}),N2Require("SlidesManager",[],[],function(t,e,i){function n(i,n,r,s,o,a){this.quickPostModal=null,this.quickVideoModal=null,this.parameters=r,this.slides=[],this.ajaxUrl=i,this.contentAjaxUrl=n,this.slidesPanel=t("#n2-ss-slides-container"),this.slidesContainer=this.slidesPanel.find(".n2-ss-slides-container"),this.initMenu(),this.initSlidesOrderable();for(var l=this.slidesContainer.find(".n2-box-slide"),h=0;h<l.length;h++)this.slides.push(new e.Slide(this,l.eq(h)));if(t("html").attr("data-slides",this.slides.length),t(".n2-add-quick-image, .n2-box-slide-dummy").on("click",t.proxy(this.addQuickImage,this)),t(".n2-add-quick-video").on("click",t.proxy(this.addQuickVideo,this)),t(".n2-add-quick-post").on("click",t.proxy(this.addQuickPost,this)),this.initBulk(),!s){var d=[];this.slidesContainer.fileupload({url:o,pasteZone:!1,dataType:"json",paramName:"image",dropZone:t("undefined"==typeof nextend.smartSlider?document:".n2-ss-slides-outer-container"),add:t.proxy(function(t,e){e.formData={path:"/"+a},e.submit()},this),done:t.proxy(function(t,e){var i=e.result;i.data&&i.data.name?d.push({title:i.data.name,description:"",image:i.data.url}):NextendAjaxHelper.notification(i)},this),fail:t.proxy(function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},this),start:function(){NextendAjaxHelper.startLoading()},stop:t.proxy(function(){d.length?this._addQuickImages(d):setTimeout(function(){NextendAjaxHelper.stopLoading()},100),d=[]},this)});var c=null;this.slidesContainer.on("dragover",t.proxy(function(e){null!==c?(clearTimeout(c),c=null):this.slidesContainer.addClass("n2-drag-over"),c=setTimeout(t.proxy(function(){this.slidesContainer.removeClass("n2-drag-over"),c=null},this),400)},this))}}return n.prototype.changed=function(){},n.prototype.initSlidesOrderable=function(){this.slidesContainer.sortable({helper:"clone",forcePlaceholderSize:!1,tolerance:"pointer",items:".n2-box-slide",start:function(t,e){e.item.show()},stop:t.proxy(this.saveSlideOrder,this),placeholder:"n2-box-sortable-placeholder n2-box-sortable-placeholder-small",distance:10})},n.prototype.saveSlideOrder=function(e){for(var i=this.slidesContainer.find(".n2-box-slide"),n=[],r=[],s=[],o=0;o<i.length;o++){var a=i.eq(o).data("slide");n.push(a),r.push(a.getId())}for(var o=0;o<this.slides.length;o++)s.push(this.slides[o].getId());if(JSON.stringify(s)!=JSON.stringify(r)){t(window).triggerHandler("SmartSliderSidebarSlidesOrderChanged");var l={nextendcontroller:"slides",nextendaction:"order"};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,l),data:{slideorder:r}}),this.slides=n,this.changed()}},n.prototype.initSlides=function(){for(var e=(this.slides.length,this.slidesContainer.find(".n2-box-slide")),i=[],n=0;n<e.length;n++){var r=e.eq(n).data("slide");i.push(r)}this.slides=i,this.changed(),t(window).triggerHandler("SmartSliderSidebarSlidesChanged"),t("html").attr("data-slides",this.slides.length)},n.prototype.unsetFirst=function(){for(var t=0;t<this.slides.length;t++)this.slides[t].unsetFirst();this.changed()},n.prototype.addQuickImage=function(e){e.preventDefault(),nextend.imageHelper.openMultipleLightbox(t.proxy(this._addQuickImages,this))},n.prototype.addBoxes=function(i){i.insertBefore(this.slidesContainer.find(".n2-clear")),i.addClass("n2-ss-box-just-added").each(t.proxy(function(i,n){new e.Slide(this,t(n))},this)),this.initSlides(),setTimeout(function(){i.removeClass("n2-ss-box-just-added")},200)},n.prototype._addQuickImages=function(e){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickImages"}),data:{images:Base64.encode(JSON.stringify(e))}}).done(t.proxy(function(e){this.addBoxes(t(e.data))},this))},n.prototype.addQuickVideo=function(e){e.preventDefault();var i=this;this.quickVideoModal||(this.quickVideoModal=new NextendModal({zero:{size:[500,350],title:n2_("Add video"),back:!1,close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Add video")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),n=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createInput(n2_("Video url"),"n2-slide-video-url","width: 446px;")),this.content.find("#n2-slide-video-url").focus());this.content.append(this.createHeading(n2_("Examples"))),this.content.append(this.createTable([["YouTube","https://www.youtube.com/watch?v=lsq09izc1H4"],["Vimeo","https://vimeo.com/144598279"]],["",""])),e.on("click",t.proxy(t.proxy(function(e){e.preventDefault();var r=n.val(),s=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,o=r.match(s),a=/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)/,l=r.match(a),h=r.match(/\.(mp4)/i);o?NextendAjaxHelper.getJSON("https://www.googleapis.com/youtube/v3/videos?id="+encodeURI(o[2])+"&part=snippet&key=AIzaSyC3AolfvPAPlJs-2FgyPJdEEKS6nbPHdSM").done(t.proxy(function(t){if(t.items.length){var e=t.items[0].snippet,n=t.items[0].snippet.thumbnails,s=n.maxres||n.standard||n.high||n.medium||n["default"];i._addQuickVideo(this,{type:"youtube",title:e.title,description:e.description,image:s.url,video:r})}},this)).fail(function(t){nextend.notificationCenter.error(t.error.errors[0].message)}):l?NextendAjaxHelper.getJSON("https://vimeo.com/api/v2/video/"+l[3]+".json").done(t.proxy(function(t){i._addQuickVideo(this,{type:"vimeo",title:t[0].title,description:t[0].description,video:l[3],image:t[0].thumbnail_large})},this)).fail(function(t){nextend.notificationCenter.error(t.responseText)}):h?nextend.notificationCenter.error("This video url is not supported!"):nextend.notificationCenter.error("This video url is not supported!")},this)))}}}})),this.quickVideoModal.show()},n.prototype._addQuickVideo=function(e,i){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickVideo"}),data:{video:Base64.encode(encodeURIComponent(JSON.stringify(i)))}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.addQuickPost=function(e){if(e.preventDefault(),!this.quickPostModal){var i=this,n={},r=t.proxy(function(t){return"undefined"==typeof n[t]&&(n[t]=NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.contentAjaxUrl),data:{keyword:t},dataType:"json"})),n[t]},this);this.quickPostModal=new NextendModal({zero:{size:[600,430],title:n2_("Add post"),back:!1,close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-ss-keyword","width:546px;"));var e=t("#n2-ss-keyword"),n=this.createHeading("").appendTo(this.content),s=this.createResult().appendTo(this.content),o="";e.on("keyup",t.proxy(function(){o=e.val(),r(o).done(t.proxy(function(r){if(e.val()==o){""==o?n.html(n2_("No search term specified. Showing recent items.")):n.html(n2_printf(n2_('Showing items match for "%s"'),o));for(var a=r.data,l=[],h=this,d=0;d<a.length;d++)l.push([a[d].title,a[d].info,t('<div class="n2-button n2-button-normal n2-button-xs n2-button-green n2-radius-s n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{post:a[d]},function(t){i._addQuickPost(h,t.data.post)})]);s.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(s))}},this))},this)).trigger("keyup").focus()}}}})}this.quickPostModal.show()},n.prototype._addQuickPost=function(e,i){i.image||(i.image=""),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"quickPost"}),data:{post:i}}).done(t.proxy(function(e){this.addBoxes(t(e.data)),this.initSlides()},this)),e.hide()},n.prototype.initBulk=function(){this.selection=[],this.isBulkSelection=!1;var e=t(".n2-bulk-select").find("a");e.eq(0).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.select()})},this)),e.eq(1).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.deSelect()})},this)),e.eq(2).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.select():t.deSelect()})},this)),e.eq(3).on("click",t.proxy(function(t){t.preventDefault(),this.bulkSelect(function(t){t.box.hasClass("n2-slide-state-published")?t.deSelect():t.select()})},this)),t(".n2-bulk-actions a").on("click",t.proxy(function(e){var i=t(e.currentTarget).data("action");i&&(e.preventDefault(),this.bulkAction(i))},this))},n.prototype.addSelection=function(t){0==this.selection.length&&this.enterBulk(),this.selection.push(t)},n.prototype.removeSelection=function(e){this.selection.splice(t.inArray(e,this.selection),1),0==this.selection.length&&this.leaveBulk()},n.prototype.bulkSelect=function(t){for(var e=0;e<this.slides.length;e++)t(this.slides[e])},n.prototype.bulkAction=function(t){var e=[],i=[];this.bulkSelect(function(t){t.selected&&(e.push(t),i.push(t.getId()))}),i.length?this[t](i,e):nextend.notificationCenter.notice("Please select one or more slides for the action!")},n.prototype.enterBulk=function(){this.isBulkSelection||(this.isBulkSelection=!0,this.slidesContainer.sortable("option","disabled",!0),t("#n2-admin").addClass("n2-ss-has-box-selection"))},n.prototype.leaveBulk=function(){if(this.isBulkSelection){this.slidesContainer.sortable("option","disabled",!1),t("#n2-admin").removeClass("n2-ss-has-box-selection");for(var e=0;e<this.slides.length;e++)this.slides[e].deSelect();this.selection=[],this.isBulkSelection=!1}},n.prototype.deleteSlides=function(e,i){this.hideMenu();var n=i[0].box.find(".n2-box-placeholder-title a").text();i.length>1&&(n+=" and "+(i.length-1)+" more"),NextendDeleteModal("slide-delete",n,t.proxy(function(){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"delete"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].deleted();this.initSlides(),this.leaveBulk()},this))},this))},n.prototype.duplicateSlides=function(e,i){for(var n=0;n<this.slides.length;n++)this.slides[n].selected&&this.slides[n].duplicate(t.Event("click",{currentTarget:null}))},n.prototype.copySlides=function(e,i){this.showSliderSelector(n2_("Copy slide to ..."),t.proxy(function(t){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"copySlides",targetSliderID:t}),type:"POST",data:{slides:e}})},this))},n.prototype.publishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"publish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].published();this.changed()},this))},n.prototype.unPublishSlides=function(e,i){NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"unpublish"}),type:"POST",data:{slides:e}}).done(t.proxy(function(){for(var t=0;t<i.length;t++)i[t].unPublished();this.changed()},this))},n.prototype.initMenu=function(){this.slide=null,this.menu=t("#n2-ss-slide-menu").detach().addClass("n2-inited"),this.menu.find("li").on("click",t.proxy(function(e){e.stopPropagation();var i=t(e.currentTarget).data("action");i&&"function"==typeof this.slide[i]&&this.slide[i](e)},this)),this.menu.find(".n2-button").on("click",t.proxy(function(e){e.preventDefault(),e.stopPropagation(),this.menu.hasClass("n2-active")?this.menu.removeClass("n2-active").off("mouseleave"):this.menu.addClass("n2-active").on("mouseleave",function(){t(this).removeClass("n2-active")})},this))},n.prototype.showMenu=function(t){this.slide=t,this.menu.appendTo(t.box)},n.prototype.hideMenu=function(){this.menu.detach()},n.prototype.showSliderSelector=function(e,i){var n=NextendAjaxHelper.makeFallbackUrl(this.ajaxUrl,{nextendcontroller:"sliders",nextendaction:"choose"});this.sliderSelectorModal=new NextendModal({zero:{size:[970,600],title:e,back:!1,close:!0,content:"",fn:{show:function(){var e=t('<iframe src="'+n+'" width="970" height="540" style="margin: 0 -20px 0 -20px;"></iframe>').appendTo(this.content),r=window.addEventListener?"addEventListener":"attachEvent";window[r]("attachEvent"==r?"onmessage":"message",t.proxy(function(t){if(t.source==(e[0].contentWindow||e[0].contentDocument)){var n=t[t.message?"message":"data"];i(n),this.hide()}},this),!1)},destroy:function(){this.destroy()}}}},!0)},n}),N2Require("SlideAdmin",[],[],function(t,e,i){function n(){this.layerAnimationManager=null,this.slideEditManager=null,this.frontend=null,this.generator=null,this.canvasManager=null,this.history=null,this.$currentSlideElement=null}return n.prototype.startEditor=function(t,i,n){return null===this.slideEditManager&&(this.slideEditManager=new e.SlideEditManager(t,i,n)),this.slideEditManager},window.nextend.pre="div#n2-ss-0 ",window.nextend.smartSlider=new n,n}),N2Require("SmartSliderBackgroundImageAdmin",["SmartSliderBackgroundImage"],[],function(t,e,i){function n(t,i,n){this.allowVisualLoad=!0,this.hash=i.data("hash"),e.SmartSliderBackgroundImage.prototype.constructor.call(this,t,i,n),this.loadAllowed=!0,this.listenImageManager()}return n.prototype=Object.create(e.SmartSliderBackgroundImage.prototype),n.prototype.constructor=n,n.prototype.startColorMode=function(){this.$background=t('<div class="n2-ss-background-image"/>').appendTo(this.$mask),this.loadDeferred.resolve()},n.prototype.setVisualLoad=function(t){this.allowVisualLoad=t},n.prototype.listenImageManager=function(){""!=this.hash&&t(window).on(this.hash,t.proxy(this.onImageManagerChanged,this))},n.prototype.notListenImageManager=function(){""!=this.hash&&t(window).off(this.hash,null,t.proxy(this.onImageManagerChanged,this))},n.prototype.onImageManagerChanged=function(t,e){this.tabletSrc=e.tablet.image,this.mobileSrc=e.mobile.image,this.updateBackgroundToDevice(this.manager.device)},n.prototype.setDesktopSrc=function(e){if(this.notListenImageManager(),this.desktopSrc=e,this.hash=md5(e),""!=e&&this.allowVisualLoad){var i=new Image;i.addEventListener("load",t.proxy(function(){t.when(nextend.imageManager.getVisual(e)).done(t.proxy(function(t){this.onImageManagerChanged(null,t.value),this.listenImageManager()},this))},this),!1),i.src=nextend.imageHelper.fixed(e)}else this.tabletSrc="",this.mobileSrc="",this.setSrc(nextend.imageHelper.fixed(e))},n.prototype.setSrc=function(t){e.SmartSliderBackgroundImage.prototype.setSrc.call(this,nextend.imageHelper.fixed(t))},n.prototype.startFixed=function(){},n.prototype.setMode=function(t){"default"==t&&(t=nextend.smartSlider.slideBackgroundMode),this.element.attr("data-mode",t),this.mode=t},n.prototype.setFocus=function(t,e){this.$background.css("background-position",t+"% "+e+"%")},n.prototype.setOpacity=function(t){this.opacity=t,this.$background.css("opacity",t)},n.prototype.setBlur=function(t){window.n2FilterProperty&&(t>0?this.$background.css({margin:"-"+2*t+"px",padding:2*t+"px"}).css(window.n2FilterProperty,"blur("+t+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),this.blur=t},n}),N2Require("SlideEditManager",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,n){this.readyDeferred=t.Deferred(),this.options=t.extend({slideAsFile:0,isUploadDisabled:!0,uploadUrl:"",uploadDir:"",isAddSample:!1},n),this.warnInternetExplorerUsers(),this.$slideContentElement=t("#"+i),this.slideStartValue=this.$slideContentElement.val(),window[e].visible(t.proxy(this.sliderStarted,this))}return r.prototype.startSampleSlides=function(){var e="https://smartslider3.com/slides/"+window.N2SS3VERSION+"/free/",i=this,r=window.addEventListener?"addEventListener":"attachEvent",s=t('<iframe src="'+e+'"></iframe>').prependTo(".n2-ss-sample-slides-container"),o=s[0];t("html, body").scrollTop(s.offset().top-t("#wpadminbar").height());var a=t(".n2-ss-sample-slide-settings"),l=t("#slidebackgroundImage"),h=t("#n2-ss-sample-slide-setting-background-image").on("click",function(){l.parent().find(".n2-form-element-button").trigger("click")}),d=function(){var e=l.val();""===e?(a.removeClass("n2-ss-has-image"),h.css("background-image","url(//nextenddev.no-ip.org/roland/wordpress1/wp-content/plugins/nextend-smart-slider3-pro/nextend/media/images/placeholder/image.png)"),t("#slidebackground-type").val("color").trigger("change")):(a.addClass("n2-ss-has-image"),t("#slidebackground-type").val("image").trigger("change"),h.css("background-image","url("+nextend.imageHelper.fixed(e)+")"))};h.find(".n2-i-close").on("click",function(t){t.stopPropagation(),l.parent().find(".n2-form-element-clear").trigger("click")}),l.on("nextendChange",d),d();var c=t("#slidebackgroundImageOpacity"),p=t("#n2-ss-sample-slide-setting-opacity-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:100,step:1,slide:function(t,e){c.data("field").insideChange(e.value)}}),u=function(t){p.slider("value",c.val())};c.on("nextendChange",u),u();var y=t("#slidebackgroundImageBlur"),g=t("#n2-ss-sample-slide-setting-blur-slider").removeAttr("slide").prop("slide",!1).slider({min:0,max:40,step:1,slide:function(t,e){y.data("field").insideChange(e.value)}}),f=function(t){g.slider("value",y.val())};y.on("nextendChange",f),f();var v=t("#slidebackgroundColor"),m=t("#n2-ss-sample-slide-setting-color").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=m.n2spectrum("get").toHexString8();m.val(t),v.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),b=function(t){var e=v.val();e!=m.val()&&m.n2spectrum("set",e)};v.on("nextendChange",b),b();var x=t("#slidebackgroundGradient"),C=function(){"off"==x.val()?a.removeClass("n2-ss-has-gradient"):a.addClass("n2-ss-has-gradient")};x.on("nextendChange",C),C();var S=t("#slidebackgroundColorEnd"),w=t("#n2-ss-sample-slide-setting-gradient").n2spectrum({showAlpha:1,preferredFormat:"hex8",showInput:!1,showButtons:!1,move:function(){var t=w.n2spectrum("get").toHexString8();S.data("field").insideChange(t)},showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}),k=function(t){w.n2spectrum("set",S.val())};S.on("outsideChange",k),k(),window[r]("attachEvent"==r?"onmessage":"message",function(t){if(t.source==(o.contentWindow||o.contentDocument)){var e=t[t.message?"message":"data"];if(e.key)switch(e.key){case"sampleSlide":var r=JSON.parse(e.data);i.settings.setData(r.data,!0),i.canvasManager.mainContainer.replaceLayers(r.layers),"content"!=i.canvasManager.currentEditorMode&&i.canvasManager.mainContent!=n&&i.canvasManager.updateEditorMode("content");break;case"ready":(o.contentWindow||o.contentDocument).postMessage({key:"ackReady"},"*"),i.options.isAddSample&&((o.contentWindow||o.contentDocument).postMessage({key:"create"},"*"),i.options.isAddSample=!1)}}},!1)},r.prototype.sliderStarted=function(){i.history=new e.History,i.frontend=window["n2-ss-0"],i.frontend.visible(function(){t("body").addClass("n2-ss-slider-visible");var e=t("#n2-ss-slide-canvas-container"),i=e.tinyscrollbar({axis:"x",wheel:!1,wheelLock:!1}).data("plugin_tinyscrollbar");"function"==typeof e.get(0).move&&(e.get(0).move=null),this.sliderElement.on("SliderResize",function(){i.update("relative")})}),i.$currentSlideElement=i.frontend.sliderElement.find(".n2-ss-currently-edited-slide");var n=i.$currentSlideElement.hasClass("n2-ss-static-slide");new e.Generator,this.settings=new e.SlideSettings(n),this.canvasManager=new e.CanvasManager(this,n,this.options),this.readyDeferred.resolve(),t("#smartslider-form").on({checkChanged:t.proxy(this.prepareFormForCheck,this),submit:t.proxy(this.onSlideSubmit,this)}),this.options.isAddSample&&this.startSampleSlides()},r.prototype.ready=function(t){this.readyDeferred.done(t)},r.prototype.prepareFormForCheck=function(){var t=JSON.stringify(this.canvasManager.getData()),e=JSON.stringify(JSON.parse(Base64.decode(this.slideStartValue)));this.$slideContentElement.val(e==t?this.slideStartValue:Base64.encode(t))},r.prototype.onSlideSubmit=function(e){if(!nextend.isPreview)if(this.prepareForm(),e.preventDefault(),nextend.askToSave=!1,this.options.slideAsFile&&typeof window.FormData!==n&&"undefined"!=typeof window.File){var i=new FormData,r=t("#smartslider-form").serializeArray();t.each(r,function(t,e){if("slide[slide]"==e.name)try{i.append("slide",new Blob([e.value]),"slide.txt")}catch(n){try{i.append("slide",new Blob([e.value]))}catch(n){try{i.append("slide",new File([e.value],"slide.txt"))}catch(n){nextend.notificationCenter.notice('Your browser does not support File api, please disable "Send slide as file" option in the global settings.')}}}else i.append(e.name,e.value)}),NextendAjaxHelper.ajax({url:NextendAjaxHelper.makeAjaxUrl(window.location.href),type:"POST",data:i,contentType:!1,processData:!1}).done(t.proxy(this.afterSave,this))}else NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.location.href),data:t("#smartslider-form").serialize(),dataType:"json"}).done(t.proxy(this.afterSave,this))},r.prototype.afterSave=function(){nextend.askToSave=!0,t("#smartslider-form").trigger("saved"),t(".n2-ss-edit-slide-top-details .n2-h1").html(t("#slidetitle").val())},r.prototype.prepareForm=function(){i.ruler&&t("#slideguides").val(Base64.encode(JSON.stringify(i.ruler.toArray()))),this.$slideContentElement.val(Base64.encode(nextend.UnicodeToHTMLEntity(JSON.stringify(this.canvasManager.getData()))))},r.prototype.warnInternetExplorerUsers=function(){var t=this.isInternetExplorer();t&&10>t&&alert(window.ss2lang.The_editor_was_tested_under_Internet_Explorer_10_Firefox_and_Chrome_Please_use_one_of_the_tested_browser)},r.prototype.isInternetExplorer=function(){var t=navigator.userAgent.toLowerCase();return-1!=t.indexOf("msie")?parseInt(t.split("msie")[1]):!1},r.prototype.getLayout=function(){for(var e=t("#smartslider-form").serializeArray(),i={},n=0;n<e.length;n++){var r=e[n].name.match(/slide\[(.*?)\]/);r&&(i[r[1]]=e[n].value)}return delete i.generator,delete i.published,delete i.publishdates,delete i["record-start"],delete i["record-slides"],delete i.slide,i.slide=this.canvasManager.getData(),i},r.prototype.loadLayout=function(e,i,n){var r=e.slide;if(delete e.slide,n?this.canvasManager.importLayers(r,!0):this.canvasManager.importLayers(r,!1),i)for(var s in e)t("#slide"+s).val(e[s]).trigger("change");e.slide=r},r.prototype.getSelf=function(){return this},r.prototype.copySlide=function(){var e={data:this.settings.getBackgroundData(),layers:this.canvasManager.getData()};t.jStorage.set("copiedSlide",JSON.stringify(e))},r.prototype.pasteSlide=function(){var e=t.jStorage.get("copiedSlide");e&&(e=JSON.parse(e),this.settings.setData(e.data),this.canvasManager.mainContainer.replaceLayers(e.layers))},r.prototype.hasCopiedSlide=function(){var e=t.jStorage.get("copiedSlide");return!!e},r}),N2Require("Generator",["SlideAdmin"],["smartSlider"],function(t,e,i,n){"use strict";function r(){this._refreshTimeout=null,this.modal=!1,this.group=0,i.generator=this;var e=i.$currentSlideElement.data("variables");if(e){this.variables=e;for(var n in this.variables)!isNaN(parseFloat(n))&&isFinite(n)&&(this.group=Math.max(this.group,parseInt(n)+1));this.fill=this.generatorFill,this.group>0&&(this.registerField=this.generatorRegisterField,
3
+ this.button=t('<a href="#" class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-blue n2-h5 n2-uc" style="position:absolute;right: -2px;top: -18px;">Variable</a>').on("click",t.proxy(function(t){t.preventDefault(),this.showModal()},this)),this.registerField(t("#slidetitle")),this.registerField(t("#slidedescription")),this.registerField(t("#slidethumbnail")),this.registerField(t("#slidebackgroundImage")),this.registerField(t("#slidebackgroundAlt")),this.registerField(t("#slidebackgroundTitle")),this.registerField(t("#slidebackgroundVideoMp4")),this.registerField(t("#slidebackgroundColor")),this.registerField(t("#slidebackgroundColorEnd")),this.registerField(t("#linkslidelink_0")),this.registerField(t("#layergenerator-visible")),this.registerField(t("#layergroup-generator-visible")),t("body").addClass("n2-ss-dynamic-slide")),this.initSlideDataRefresh()}else this.variables=null}return r.prototype.isDynamicSlide=function(){return this.group>0},r.prototype.splitTokens=function(t){for(var e=[],i="",n=0,r=0;r<t.length;r++){var s=t[r];","===s&&0===n?(e.push(i),i=""):(i+=s,"("===s?n++:")"===s&&n--)}return i.length&&e.push(i),e},r.prototype.fill=function(t){return t},r.prototype.generatorFill=function(e){return e.replace(/{((([a-z]+)\(([^}]+)\))|([a-zA-Z0-9][a-zA-Z0-9_\/]*))}/g,t.proxy(this.parseFunction,this))},r.prototype.parseFunction=function(t,e,i,n,r,s){if("undefined"==typeof s){for(var o=this.splitTokens(r),a=0;a<o.length;a++)o[a]=this.parseVariable(o[a]);return"function"==typeof this[n]?this[n].apply(this,o):t}return this.parseVariable(s)},r.prototype.parseVariable=function(t){var e=t.match(/^("|')(.*)("|')$/);if(e)return e[2];var i=t.match(/((([a-z]+)\(([^}]+)\)))/);if(i)return this.parseFunction.apply(this,i);var n=t.match(/([a-zA-Z][0-9a-zA-Z_]*)(\/([0-9a-z]+))?/);if(n){var r=n[3];if("undefined"==typeof r)r=0;else{var s=parseInt(r);isNaN(s)||(r=Math.max(r,1)-1)}return"undefined"!=typeof this.variables[r]&&"undefined"!=typeof this.variables[r][n[1]]?this.variables[r][n[1]]:""}return t},r.prototype.fallback=function(t,e){return""==t?e:t},r.prototype.cleanhtml=function(t){return this.stripTags(t,"<p><a><b><br /><br/><i>")},r.prototype.stripTags=function(t,e){e=(((e||"")+"").toLowerCase().match(/<[a-z][a-z0-9]*>/g)||[]).join("");var i=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,n=/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;return t.replace(n,"").replace(i,function(t,i){return e.indexOf("<"+i.toLowerCase()+">")>-1?t:""})},r.prototype.removehtml=function(e){return t("<div>"+e+"</div>").text()},r.prototype.splitbychars=function(t,e,i){return t.substr(e,i)},r.prototype.splitbywords=function(t,e,i){var n=t,r=n.length,s=Math.max(0,0==e?0:n.indexOf(" ",e)),o=Math.max(0,i>r?r:n.indexOf(" ",i));return 0==o&&r>=i&&(o=r),n.substr(s,o)},r.prototype.findimage=function(t,e){var i=t,n=/(<img.*?src=[\'"](.*?)[\'"][^>]*>)|(background(-image)??\s*?:.*?url\((["|\']?)?(.+?)(["|\']?)?\))/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[2]?r.push(s[2]):"undefined"!=typeof s[6]&&r.push(s[6]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.findlink=function(t,e){var i=t,n=/href=["\']?([^"\'>]+)["\']?/gi,r=[],s=null;for(e="undefined"!=typeof e?parseInt(e)-1:0;s=n.exec(i);)"undefined"!=typeof s[1]&&r.push(s[1]);return r.length?r.length>e?r[e]:r[r.length-1]:""},r.prototype.removevarlink=function(t){var e=String(t),i=/<a href=\"(.*?)\">(.*?)<\/a>/g;return e.replace(i,"")},r.prototype.registerField=function(t){},r.prototype.generatorRegisterField=function(e){var i=e.parent();i.on({mouseenter:t.proxy(function(){this.activeField=e,this.button.prependTo(i)},this)})},r.prototype.getModal=function(){var e=this;if(!this.modal){var i={key:"",group:1,filter:"no",split:"no",splitStart:0,splitLength:300,findImage:0,findImageIndex:1,findLink:0,findLinkIndex:1,removeVarLink:0},n=function(){var t=i.key+"/"+i.group;return i.findImage&&(t="findimage("+t+","+Math.max(1,i.findImageIndex)+")"),i.findLink&&(t="findlink("+t+","+Math.max(1,i.findLinkIndex)+")"),i.removeVarLink&&(t="removevarlink("+t+")"),"no"!=i.filter&&(t=i.filter+"("+t+")"),"no"!=i.split&&i.splitStart>=0&&i.splitLength>0&&(t=i.split+"("+t+","+i.splitStart+","+i.splitLength+")"),"{"+t+"}"},r=t('<div class="n2-generator-result-container" />'),s=function(){r.html(t("<div/>").text(e.fill(n())).html())},o=e.group,a=null,l=null,h=t('<div class="n2-generator-insert-variable"/>'),d=NextendModal.prototype.createHeading(n2_("Choose the group")).appendTo(h),c=t('<div class="n2-group-container" />').appendTo(h);h.append(NextendModal.prototype.createHeading(n2_("Choose the variable")));var p=t('<div class="n2-variable-container webkit-scroll-fix" />').appendTo(h),u=t('<div class="n2-generator-functions-container n2-form-element-mixed" />').appendTo(t('<div class="n2-form" />').appendTo(h));h.append(NextendModal.prototype.createHeading(n2_("Result"))),r.appendTo(h),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Filter")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="filter" id="n2-generator-function-filter"><option selected="selected" value="no">'+n2_("No")+'</option><option value="cleanhtml">'+n2_("Clean HTML")+'</option><option value="removehtml">'+n2_("Remove HTML")+"</option></select></div></div></div>").appendTo(u);var y=u.find("#n2-generator-function-filter");y.on("change",t.proxy(function(){i.filter=y.val(),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Split by chars")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list"><select autocomplete="off" name="split" id="n2-generator-function-split"><option selected="selected" value="no">'+n2_("No")+'</option><option value="splitbychars">'+n2_("Strict")+'</option><option value="splitbywords">'+n2_("Respect words")+'</option></select></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Start")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="0" id="n2-generator-function-split-start"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Length")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="300" id="n2-generator-function-split-length"></div></div></div>').appendTo(u);var g=u.find("#n2-generator-function-split");g.on("change",t.proxy(function(){i.split=g.val(),s()},this));var f=u.find("#n2-generator-function-split-start");f.on("change",t.proxy(function(){i.splitStart=parseInt(f.val()),s()},this));var v=u.find("#n2-generator-function-split-length");v.on("change",t.proxy(function(){i.splitLength=parseInt(v.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find image")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findimage"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findimage-index"></div></div></div>').appendTo(u);var m=u.find("#n2-generator-function-findimage");m.on("nextendChange",t.proxy(function(){i.findImage=parseInt(m.val()),s()},this));var b=u.find("#n2-generator-function-findimage-index");b.on("change",t.proxy(function(){i.findImageIndex=parseInt(b.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Find link")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-findlink"></div><div class="n2-form-element-text n2-text-has-unit n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+n2_("Index")+'</div><input type="text" autocomplete="off" style="width: 22px;" class="n2-h5" value="1" id="n2-generator-function-findlink-index"></div></div></div>').appendTo(u);var x=u.find("#n2-generator-function-findlink");x.on("nextendChange",t.proxy(function(){i.findLink=parseInt(x.val()),s()},this));var C=u.find("#n2-generator-function-findlink-index");C.on("change",t.proxy(function(){i.findLinkIndex=parseInt(C.val()),s()},this)),t('<div class="n2-mixed-group"><div class="n2-mixed-label"><label>'+n2_("Remove links")+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-onoff"><div class="n2-onoff-slider"><div class="n2-onoff-no"><i class="n2-i n2-i-close"></i></div><div class="n2-onoff-round"></div><div class="n2-onoff-yes"><i class="n2-i n2-i-tick"></i></div></div><input type="hidden" autocomplete="off" value="0" id="n2-generator-function-removevarlink"></div></div></div>').appendTo(u);var S=u.find("#n2-generator-function-removevarlink");S.on("nextendChange",t.proxy(function(){i.removeVarLink=parseInt(S.val()),s()},this));var w=u.find("#n2-generator-function-removevarlink-index");w.on("change",t.proxy(function(){i.removeVarLinkIndex=parseInt(w.val()),s()},this));for(var k in this.variables[0])t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+k+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),a.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.key=e,s()},this,k)).appendTo(p);a=p.find("a"),a.eq(0).trigger("click"),1==o&&(d.css("display","none"),c.css("display","none"));for(var P=0;o>P;P++)t('<a href="#" class="n2-button n2-button-normal n2-button-s n2-button-grey n2-radius-s">'+(P+1)+"</a>").on("click",t.proxy(function(e,n){n.preventDefault(),l.removeClass("n2-active"),t(n.currentTarget).addClass("n2-active"),i.group=e+1,s()},this,P)).appendTo(c);l=c.find("a"),l.eq(0).trigger("click");var M=!1;this.modal=new NextendModal({zero:{size:[1e3,o>1?560:490],title:n2_("Insert variable"),back:!1,close:!0,content:h,controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green">'+n2_("Insert")+"</a>"],fn:{show:function(){M||(new N2Classes.FormElementOnoff("n2-generator-function-findimage"),new N2Classes.FormElementOnoff("n2-generator-function-findlink"),new N2Classes.FormElementOnoff("n2-generator-function-removevarlink"),M=!0),this.controls.find(".n2-button").on("click",t.proxy(function(t){t.preventDefault(),e.insert(n()),this.hide(t)},this))}}}},!1),this.modal.setCustomClass("n2-ss-generator-modal")}return this.modal},r.prototype.showModal=function(){this.getModal().show()},r.prototype.insert=function(t){this.activeField.val(t).trigger("change")},r.prototype.initSlideDataRefresh=function(){var e=t("#slidetitle").on("nextendChange",t.proxy(function(){this.variables.slide.name=e.val(),this.refresh()},this)),i=t("#slidedescription").on("nextendChange",t.proxy(function(){this.variables.slide.description=i.val(),this.refresh()},this))},r.prototype.refresh=function(){this._refreshTimeout&&(clearTimeout(this._refreshTimeout),this._refreshTimeout=null),this._refreshTimeout=setTimeout(t.proxy(this._refresh,this),100)},r.prototype._refresh=function(){for(var t=i.canvasManager.mainContainer.container.getAllLayers(),e=0;e<t.length;e++)"layer"==t[e].type&&t[e].item.reRender()},r}),N2Require("History",[],[],function(t,e,i){"use strict";function n(){this.historyStates=50,this.enabled=0!=this.historyStates,this.historyAddAllowed=!0,this.isBatched=!1,this.currentBatch=this,this.index=-1,this.stackedOff=[],this.tasks=[],this.preventUndoRedo=!1,this.undoBTN=t("#n2-ss-undo").on({click:t.proxy(this.undo,this),mousedown:function(t){nextend.context.setMouseDownArea("undo",t)}}),this.redoBTN=t("#n2-ss-redo").on({click:t.proxy(this.redo,this),mousedown:function(t){nextend.context.setMouseDownArea("redo",t)}}),this.updateUI()}function r(t){this.parent=t,this.tasks=[]}function s(t){switch(t){case"skipForwardUndos":this.undo=function(){return!1}}}function o(t,e,i,n){this.that=t,this.undoAction=e,this.redoAction=i,this.context=n||[]}function a(){o.prototype.constructor.apply(this,arguments)}return n.prototype.updateUI=function(){0==this.index||0==this.tasks.length?this.undoBTN.removeClass("n2-active"):this.undoBTN.addClass("n2-active"),-1==this.index||this.index>=this.tasks.length?this.redoBTN.removeClass("n2-active"):this.redoBTN.addClass("n2-active")},n.prototype.throttleUndoRedo=function(){return this.preventUndoRedo?!0:(this.preventUndoRedo=!0,setTimeout(t.proxy(function(){this.preventUndoRedo=!1},this),100),!1)},n.prototype.isEnabled=function(){return this.enabled&&this.historyAddAllowed},n.prototype.startBatch=function(){if(this.isEnabled()){var t=new r(this.currentBatch);return this.currentBatch._add(t),this.currentBatch=t,t}return!1},n.prototype.endBatch=function(){this.isEnabled()&&(this.currentBatch.parent==i,this.currentBatch=this.currentBatch.parent)},n.prototype.addControl=function(t){return this.currentBatch._add(new s(t))},n.prototype.addSimple=function(t,e,i,n){return this.isEnabled()?this.currentBatch._add(new o(t,e,i,n)):!1},n.prototype.addValue=function(t,e,i){if(this.isEnabled()){if(this.isBatched||this.currentBatch!=this)for(var n=this.getCurrentBatchStack(),r=0;r<n.length;r++)if(n[r].isEqual(t,e,i))return n.push(n.splice(r,1)[0]),n[n.length-1];return this.currentBatch._add(new a(t,e,e,i))}return!1},n.prototype.getCurrentBatchStack=function(){return this.currentBatch!=this?this.currentBatch.tasks:this.tasks[this.tasks.length-1]},n.prototype._add=function(e){return-1!=this.index&&this.tasks.splice(this.index,this.tasks.length),this.index=-1,this.isBatched?this.tasks[this.tasks.length-1].push(e):(this.tasks.push([e]),this.isBatched=!0,setTimeout(t.proxy(function(){this.isBatched=!1},this),100)),this.tasks.length>this.historyStates&&this.tasks.unshift(),this.updateUI(),e},n.prototype.off=function(){this.historyAddAllowed=!1,this.stackedOff.push(1)},n.prototype.on=function(){this.stackedOff.pop(),0==this.stackedOff.length&&(this.historyAddAllowed=!0)},n.prototype.undo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1==this.index?this.index=this.tasks.length-1:this.index--,this.index>=0)for(var e=this.tasks[this.index],i=e.length-1;i>=0&&e[i].undo();i--);else this.index=0;return this.on(),this.updateUI(),!0},n.prototype.redo=function(t){if(t&&t.preventDefault(),this.throttleUndoRedo())return!1;if(this.off(),-1!=this.index&&this.index<this.tasks.length){var e=this.tasks[this.index];this.index++;for(var i=0;i<e.length&&e[i].redo();i++);}return this.on(),this.updateUI(),!0},r.prototype._add=function(t){return this.tasks.push(t),t},r.prototype.invertUndo=function(){return this.undo=function(){for(var t=this.tasks.length-1;t>=0&&this.tasks[t].undo();t--);return!0},this},r.prototype.undo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].undo();t++);return!0},r.prototype.redo=function(){for(var t=0;t<this.tasks.length&&this.tasks[t].redo();t++);return!0},r.prototype.isEqual=function(){return!1},s.prototype.undo=function(){return!0},s.prototype.redo=function(){return!0},s.prototype.isEqual=function(){return!1},o.prototype.undo=function(){return this.undoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.redo=function(){return this.redoAction.apply(this.that.getSelf(),this.context),!0},o.prototype.isEqual=function(){return!1},a.prototype=Object.create(o.prototype),a.prototype.constructor=a,a.prototype.setValues=function(t,e){this.undoValue=t,this.redoValue=e},a.prototype.undo=function(){return this.context.unshift(this.undoValue),this.undoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.redo=function(){return this.context.unshift(this.redoValue),this.redoAction.apply(this.that.getSelf(),this.context),this.context.shift(),!0},a.prototype.isEqual=function(t,e,i){if(t==this.that&&e==this.undoAction){for(var n=0;n<i.length;n++)if(i[n]!=this.context[n])return!1;return this.setValues=function(t,e){this.redoValue=e},!0}return!1},n}),N2Require("InlineField",[],[],function(t,e,i){function n(){this.$input=t('<input type="text" name="name" />').on({mouseup:function(t){t.stopPropagation()},keyup:t.proxy(function(t){27==t.keyCode&&this.cancel()},this),blur:t.proxy(this.save,this)}),this.$form=t('<form class="n2-inline-form"></form>').append(this.$input).on("submit",t.proxy(this.save,this))}return n.prototype.injectNode=function(t,e){this.$input.val(e),t.append(this.$form),this.$input.focus()},n.prototype.save=function(t){t.preventDefault(),this.$input.trigger("valueChanged",[this.$input.val()]),this.$input.off("blur"),this.destroy()},n.prototype.cancel=function(){this.$input.trigger("cancel"),this.destroy()},n.prototype.destroy=function(){this.$input.off("blur"),this.$form.remove()},n}),N2Require("SlideSettings",["SlideEditManager"],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isStatic=e;var n=t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]'),r={};if(n.each(t.proxy(function(e,i){var n=t(i),s=n.attr("name").match(/slide\[(.*)\]/)[1];r[s]=n.on("nextendChange",t.proxy(this.onChange,this,s))},this)),this.fields=r,this.slideBackground=i.$currentSlideElement.data("slideBackground"),!e){this.$slideMask=this.slideBackground.$mask;var s=t("#slidethumbnail");if(""==s.val()){var o=t("#item_imageimage"),a=t.proxy(function(t){""!=t&&"$system$/images/placeholder/image.png"!=t&&(s.val(t).trigger("change"),this.fields.backgroundImage.off(".slidethumbnail"),o.off(".slidethumbnail"))},this);this.fields.backgroundImage.on("nextendChange.slidethumbnail",t.proxy(function(){a(this.fields.backgroundImage.val())},this)),o.on("nextendChange.slidethumbnail",t.proxy(function(){a(o.val())},this))}}this.createHistory()}r.prototype.createHistory=function(){this.values={},t("#smartslider-form").find('input[id][name^="slide"], textarea[id][name^="slide"]').not("#slideslide").each(t.proxy(function(e,n){var r=t(n),s=r.data("field"),o=r.attr("id");this.values[o]=r.val(),r.on("nextendChange",t.proxy(function(){var t=r.val(),e=i.history.addValue(this,this.historyUpdateSlideValue,[s]);e&&e.setValues(this.values[o],t),this.values[o]=t},this))},this))},r.prototype.getSelf=function(){return this},r.prototype.historyUpdateSlideValue=function(t,e){e.insideChange(t)},r.prototype.getAllData=function(){var t={};for(var e in this.fields)t[e]=this.fields[e].val();return t};var s=["thumbnail","background-type","backgroundColor","backgroundGradient","backgroundColorEnd","backgroundImage","backgroundImageOpacity","backgroundImageBlur","backgroundFocusX","backgroundFocusY","backgroundMode"];return r.prototype.getBackgroundData=function(){for(var t={},e=0;e<s.length;e++)t[s[e]]=this.fields[s[e]].val();return t},r.prototype.setData=function(t,e){e&&this.slideBackground.setVisualLoad(!1);for(var i in t)this.fields[i].val(t[i]).trigger("change");e&&this.slideBackground.setVisualLoad(!1)},r.prototype.onChange=function(t,e){"function"==typeof this["sync_"+t]&&this["sync_"+t].call(this)},r.prototype.sync_backgroundColor=r.prototype.sync_backgroundGradient=r.prototype.sync_backgroundColorEnd=function(){this.updateBackgroundColor()},r.prototype.updateBackgroundColor=function(){var t=i.generator.fill(this.fields.backgroundColor.val()),e=this.fields.backgroundGradient.val();if(t.length&&"#"==t.charAt(0)&&(t=t.substring(1),6==t.length&&(t+="ff")),"off"!=e){var n=i.generator.fill(this.fields.backgroundColorEnd.val()),r=this.$slideMask.css({background:"",filter:""});switch(n.length&&"#"==n.charAt(0)&&(n=n.substring(1),6==n.length&&(n+="ff")),e){case"horizontal":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=1)");break;case"vertical":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=0)");break;case"diagonal1":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=1)");break;case"diagonal2":r.css("background","#"+t.substr(0,6)).css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(t)+" 0%,"+N2Color.hex2rgbaCSS(n)+" 100%)").css("background","filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#"+t.substr(0,6)+"', endColorstr='#"+n.substr(0,6)+"',GradientType=1)")}}else"00"==t.substr(6,8)?this.$slideMask.css("background",""):this.$slideMask.css("background","#"+t.substr(0,6)).css("background",N2Color.hex2rgbaCSS(t));this.slideBackground.element.find(".n2-ss-slide-bg-video-color-overlay").css("background",this.$slideMask.css("background"))},r.prototype.sync_backgroundImage=function(){this["sync_background-type"]()},r.prototype["sync_background-type"]=function(){var t=this.fields["background-type"].val();"color"==t?this.slideBackground.setDesktopSrc(""):this.slideBackground.setDesktopSrc(i.generator.fill(this.fields.backgroundImage.val()))},r.prototype.sync_backgroundMode=function(){this.slideBackground.setMode(this.fields.backgroundMode.val())},r.prototype.sync_backgroundFocusY=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundFocusX=function(){this.slideBackground.setFocus(this.fields.backgroundFocusX.val(),this.fields.backgroundFocusY.val())},r.prototype.sync_backgroundImageOpacity=function(){this.slideBackground.setOpacity(this.fields.backgroundImageOpacity.val()/100)},r.prototype.sync_backgroundImageBlur=function(){this.slideBackground.setBlur(this.fields.backgroundImageBlur.val())},r}),N2Require("LayerContainer",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e,i,n,r){this.component=t,this.$ul=e.data("container",this),this.allowedPlacementMode=i,this.childrenSelector=n,this.allowedChildren=r,this.layerContainerElement=t.layer}return r.prototype.setLayerContainerElement=function(t){this.layerContainerElement=t},r.prototype.startWithExistingNodes=function(){for(var t=this.layerContainerElement.find(this.childrenSelector),e=0;e<t.length;e++)this._loadNode(t.eq(e),!1);this.component.onChildCountChange()},r.prototype.isChildAllowed=function(e){return-1!==t.inArray(e,this.allowedChildren)},r.prototype._loadNode=function(t,i){var r=t.data("type");if(this.isChildAllowed(r)){var s=t.data("lastplacement"),o={};if(s!==n&&s!=this.allowedPlacementMode)switch(s){case"absolute":o=e.PlacementAbsolute.cleanLayer(t);break;case"normal":o=e.PlacementNormal.cleanLayer(t)}var a;switch(r){case"layer":a=new e.Layer(this.component.canvasManager,this.component);var l=a.itemEditor.getItemClass(t.find(".n2-ss-item").data("item"));l&&e[l].needSize&&o.desktopportraitheight!==n&&t.data("desktopportraitheight",o.desktopportraitheight);break;case"content":a=new e.Content(this.component.canvasManager,this.component);break;case"row":a=new e.Row(this.component.canvasManager,this.component);break;case"col":a=new e.Col(this.component.canvasManager,this.component);break;case"group":}if(a)return a.load(t),i&&a.sync(),a}else console.error(r+" is not allowed in "+this.component.label);return!1},r.prototype.getLayerCount=function(){return this.layerContainerElement.find(this.childrenSelector).length},r.prototype.getLayerIndex=function(t){return this.layerContainerElement.find(this.childrenSelector).index(t)},r.prototype.getSortedLayers=function(){var e=[];return this.layerContainerElement.find(this.childrenSelector).each(function(i,r){var s=t(r).data("layerObject");s!==n&&e.push(s)}),e},r.prototype.append=function(t){t.appendTo(this.layerContainerElement);var e=this._loadNode(t,!0);return this.component.onChildCountChange(),e},r.prototype.insertAt=function(t,e){var i=this.getSortedLayers();e>=i.length?t.appendTo(this.layerContainerElement):t.insertBefore(i[e].layer);var n=this._loadNode(t,!0);return this.component.onChildCountChange(),n},r.prototype.insert=function(t){t.getRootElement().appendTo(this.layerContainerElement)},r.prototype.insertLayerAt=function(e,i){var n=this.getSortedLayers(),r=t.inArray(e,n);"-1"!=r&&i>r&&i++,i>=n.length?e.getRootElement().appendTo(this.layerContainerElement):e.getRootElement().insertBefore(n[i].getRootElement()),this.syncLayerRow(e)},r.prototype.syncLayerRow=function(t){var e,i="absolute"==this.allowedPlacementMode;e=i?t.getRootElement().prevAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"):t.getRootElement().nextAll(".n2-ss-layer, .n2-ss-layer-group, .n2-ss-section-outer").first().data("layerObject"),e!==n?t.layerRow.insertBefore(e.layerRow):this.$ul.append(t.layerRow),t.animations&&t.animations.syncRow(e,i)},r.prototype.getChildLayersRecursive=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)t?i.push(e[n].layer[0]):i.push(e[n]),e[n].container&&i.push.apply(i,e[n].container.getChildLayersRecursive(t));return i},r.prototype.moveLayerToGroup=function(t,e){this.moveLayersToGroup([t],[e])},r.prototype.moveLayersToGroup=function(e,i){i=i||[];for(var n=[],r=0;r<e.length;r++){var s=e[r],o=s.group,a=s.getIndex();"undefined"!=typeof i[r]?this.insertLayerAt(s,i[r]):this.insert(s),s.changeGroup(a,this.component),this!=o&&-1==t.inArray(o,n)&&n.push(o)}for(var r=0;r<n.length;r++)n[r].update()},r.prototype.activateFirst=function(){var t=this.getSortedLayers();t.length>0&&t[t.length-1].activate()},r.prototype.resetModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].resetMode(t),e[i].container!=n&&e[i].container.resetModes(t)},r.prototype.copyModes=function(t,e){for(var i=this.getSortedLayers(),r=0;r<i.length;r++)i[r].copyMode(t,e),i[r].container!=n&&i[r].container.copyModes(t,e)},r.prototype.changeEditorModes=function(t){for(var e=this.getSortedLayers(),i=0;i<e.length;i++)e[i].changeEditorMode(t),e[i].container!=n&&e[i].container.changeEditorModes(t)},r.prototype.renderModeProperties=function(){for(var t=this.getSortedLayers(),e=0;e<t.length;e++)t[e].renderModeProperties(),t[e].container!=n&&t[e].container.renderModeProperties()},r.prototype.getAllLayers=function(t){t=t||[];for(var e=this.getSortedLayers(),i=0;i<e.length;i++)t.push(e[i]),e[i].container!=n&&e[i].container.getAllLayers(t);return t},r.prototype.getData=function(e){e=t.extend({layersIncluded:!0,itemsIncluded:!0},e);var i=[],n=this.getSortedLayers();if("absolute"==this.allowedPlacementMode)for(var r=n.length-1;r>=0;r--)i.push(n[r].getData(e));else for(var r=0;r<n.length;r++)i.push(n[r].getData(e));return i},r.prototype.getHTML=function(t){for(var e=this.getSortedLayers(),i=[],n=0;n<e.length;n++)i.push(e[n].getHTML(t));return i},r.prototype.getDroppables=function(t){for(var e=[],i=this.getSortedLayers(),n=0;n<i.length;n++)if(i[n]!=t){var r=i[n].getDroppable();"object"==typeof r&&e.push(r),"hidden"!=r&&i[n].container&&e.push.apply(e,i[n].container.getDroppables(t))}return e},r.prototype.getLLDroppables=function(t){var e=[],i=this.component.getLLDroppable(t);i&&e.push(i);for(var n=this.getSortedLayers(),r=0;r<n.length;r++)n[r].container&&n[r]!=t&&e.push.apply(e,n[r].container.getLLDroppables(t));return e},r}),N2Require("LayerDataStorage",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.isDeviceProp={},this.propertyScope={},this.property={},this.deviceProperty={desktopPortrait:{},desktopLandscape:{},tabletPortrait:{},tabletLandscape:{},mobilePortrait:{},mobileLandscape:{}}}return r.prototype.getMode=function(){return this.canvasManager.getMode()},r.prototype.getRawProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e];return i[t]!==n?i[t]:n}return this.property[t]},r.prototype.getProperty=function(t){if(this.isDeviceProp[t]){var e=this.getMode(),i=this.deviceProperty[e],n=this.deviceProperty.desktopPortrait;if("undefined"!=typeof i[t])return i[t];if("undefined"!=typeof n[t])return n[t]}return this.property[t]},r.prototype.historyStore=function(t,e,i){if(!this.isDeleteStarted){var n=this.getMode();this.isDeviceProp[e]&&i!=n?(this.deviceProperty[i][e]=t,this.render(e)):(this.store(e,t,!0,"history"),this.$.trigger("propertyChanged",[e,this.getProperty(e)]))}},r.prototype.store=function(t,e,n,r){var s,o,a=this.getMode();this.isDeviceProp[t]?(s=this.deviceProperty[a][t],o=this.getProperty(t)):o=s=this.property[t];var l=i.history.addValue(this,this.historyStore,[t,a]);l&&l.setValues(s,e),this.property[t]=e,this.isDeviceProp[t]&&(this.deviceProperty[a][t]=e),n&&this.render(t,o,r)},r.prototype.render=function(t,e,i){this.propertyScope[t]["_sync"+t](e,i)},r.prototype.isDimensionPropertyAccepted=function(t){return!(!(t+"").match(/[0-9]+%/)&&"auto"!=t)},r.prototype.changeEditorMode=function(t){var e=parseInt(this.property[t]);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.renderModeProperties(!1)},r.prototype.renderModeProperties=function(){for(var t in this.property)this.property[t]=this.getProperty(t),this.$.trigger("propertyChanged",[t,this.property[t]])},r.prototype.historyResetMode=function(e,i){this.deviceProperty[i]=t.extend({},e),i==this.canvasManager.getMode()&&this.renderModeProperties(!0)},r.prototype.resetMode=function(e){if("desktopPortrait"!=e){var n,r=i.history.addValue(this,this.historyResetMode,[e]);r&&r.setValues(t.extend({},this.deviceProperty[e]),{});for(var s in this.deviceProperty[e])this.deviceProperty[e][s]=n;e==this.canvasManager.getMode()&&this.renderModeProperties(!0)}},r.prototype.copyMode=function(e,n){if(e!=n){var r=this.deviceProperty[n];this.deviceProperty[n]=t.extend({},this.deviceProperty[n],this.deviceProperty[e]);var s=i.history.addValue(this,this.historyResetMode,[n]);s&&s.setValues(r,this.deviceProperty[n])}},r.prototype._getDefault=function(t,e){return this.originalProperties[t]!==n?this.originalProperties[t]:e},r.prototype.createProperty=function(t,e,i,r){this.isDeviceProp[t]=!1,this.propertyScope[t]=r||this,i?(this.property[t]=i.data(t.toLowerCase()),this.property[t]===n&&(this.property[t]=this._getDefault(t,e))):this.property[t]=this._getDefault(t,e)},r.prototype.createDeviceProperty=function(t,e,i,r){if(this.isDeviceProp[t]=!0,this.propertyScope[t]=r||this,i){for(var s in this.deviceProperty)this.deviceProperty[s][t]=i.data(s.toLowerCase()+t.toLowerCase()),
4
+ ""===this.deviceProperty[s][t]&&(this.deviceProperty[s][t]=n);for(var s in this.deviceProperty)if(this.deviceProperty[s][t]===n||""===this.deviceProperty[s][t]){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}for(var s in e)this.deviceProperty[s][t]!==n&&""!==this.deviceProperty[s][t]||(this.deviceProperty[s][t]=e[s])}else{for(var s in e)this.deviceProperty[s][t]=e[s];for(var s in this.deviceProperty){var o=this._getDefault(s.toLowerCase()+t.toLowerCase());o!==n&&(this.deviceProperty[s][t]=o)}}this.property[t]=this.deviceProperty.desktopPortrait[t]},r.prototype.removeProperty=function(t){if(delete this.property[t],this.layer.removeData(t.toLowerCase()).removeAttr("data-"+t.toLowerCase()),this.isDeviceProp[t])for(var e in this.deviceProperty)delete this.deviceProperty[e][t],this.layer.removeData(e.toLowerCase()+t.toLowerCase()).removeAttr("data-"+e.toLowerCase()+t.toLowerCase());delete this.isDeviceProp[t],delete this.propertyScope[t]},r.prototype.removeProperties=function(t){for(var e=0;e<t.length;e++)this.removeProperty(t[e])},r.prototype.getPropertiesData=function(t){for(var e={},i=0;i<t.length;i++){var r=t[i];if(this.property[r]!==n&&(e[r]=this.property[r]),this.isDeviceProp[r])for(var s in this.deviceProperty)this.deviceProperty[s][r]!==n&&(e[s.toLowerCase()+r]=this.deviceProperty[s][r])}return e},r.prototype.setProperty=function(t,e,i){this.propertyScope[t]!==n&&("function"==typeof this.propertyScope[t]["setProperty"+t]?this.propertyScope[t]["setProperty"+t](t,e,i):this._setProperty(t,e,i))},r.prototype._setProperty=function(t,e,i){this.store(t,e,!0,i),"manager"!=i&&this.$.trigger("propertyChanged",[t,this.getProperty(t)])},r}),N2Require("CanvasManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(n,r,s){this.mode="desktopPortrait",this.slideEditManager=n,this.isStatic=r,this.ready=t.Deferred(),this.shouldPreventActivationBubble=!1,this.$=t(this),i.canvasManager=this,this.$highlight=t('<div class="n2-ss-layer-highlight n2-ss-layer-highlight-n" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-e" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-s" /><div class="n2-ss-layer-highlight n2-ss-layer-highlight-w" />'),this.initSelectMode(),this.layerWindow=new e.LayerWindow(this),this.layerOptions=new e.ComponentSettings(this),this.ui=new e.CanvasUserInterface(this),this.mainContainer=new e.MainContainer(this),this.itemEditor=new e.ItemManager(this,s),this.mainContainer.lateInit(),this._initDeviceModeChange(),this.canvasSettings=new e.CanvasSettings(this),this.layerOptions.startFeatures(),this.hotkeys(),this.addContextMenu(),this.mainContainer.refreshHasLayers();var o=t("#n2-ss-editor-mode .n2-radio-option"),a=t.proxy(function(t){switch(this.updateEditorMode(t),t){case"content":o.eq(0).addClass("n2-active"),o.eq(1).removeClass("n2-active");break;case"canvas":o.eq(0).removeClass("n2-active"),o.eq(1).addClass("n2-active")}},this);if(this.mainContent&&this.mainContent.container.getLayerCount())a("content");else{var l=this.mainContainer.container.getSortedLayers();if(this.mainContent&&l.length>1||!this.mainContent&&l.length>0)a("canvas");else{var h=t.jStorage.get("editormode");h||(h="content",t.jStorage.set("editormode",h)),a(h)}}o.on("click",t.proxy(function(e){o.removeClass("n2-active");var i=t(e.currentTarget),n=i.data("mode");i.addClass("n2-active"),n!=this.currentEditorMode&&(this.updateEditorMode(n),t.jStorage.set("editormode",n))},this)),this.isMultiDrag=!1}var s={16:0,38:0,40:0,37:0,39:0},o={97:"left",98:"center",99:"right",100:"left",101:"center",102:"right",103:"left",104:"center",105:"right"},a={97:"bottom",98:"bottom",99:"bottom",100:"middle",101:"middle",102:"middle",103:"top",104:"top",105:"top"},l={OFF:0,ON:1,GROUP:2};return r.prototype.updateEditorMode=function(e){this.currentEditorMode=e,t("body").attr("data-editormode",this.currentEditorMode)},r.prototype.getMode=function(){return this.mode},r.prototype.getResponsiveRatio=function(t){return"h"==t?i.frontend.responsive.lastRatios.slideW:"v"==t?i.frontend.responsive.lastRatios.slideH:0},r.prototype.setMainContent=function(t){this.mainContent=t},r.prototype.isGroup=function(t){return!1},r.prototype.isRow=function(t){return t instanceof e.Row},r.prototype.isCol=function(t){return t instanceof e.Col},r.prototype.isLayer=function(t){return t instanceof e.Layer},r.prototype.isContent=function(t){return t instanceof e.Content},r.prototype._initDeviceModeChange=function(){var e=t("#layerresettodesktop").on("click",t.proxy(this.__onResetToDesktopClick,this));this.resetToDesktopTRElement=e.closest("tr"),this.resetToDesktopGlobalElement=t("#n2-ss-layer-reset-to-desktop").on("click",t.proxy(function(){"block"==this.resetToDesktopTRElement.css("display")&&e.trigger("click")},this));var n=t("#n2-ss-layer-show-on"),r={},s=i.frontend.responsive.parameters.deviceModes;for(var o in s)s[o]&&(r[o]=t('<div class="n2-radio-option"><i class="n2-i n2-it n2-i-'+o+'"></i></div>').on("click",t.proxy(function(t){this.layerOptions.currentForm[t].data("field").onoff.trigger("click")},this,o)).appendTo(n));n.children().first().addClass("n2-first"),n.children().last().addClass("n2-last"),this.globalShowOnDeviceCB=function(t){"undefined"!=typeof r[t]&&r[t].toggleClass("n2-active",1==this.layerOptions.currentForm[t].val())},this.layerOptions.forms.global.desktopPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopPortrait")),this.layerOptions.forms.global.desktopLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"desktopLandscape")),this.layerOptions.forms.global.tabletPortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletPortrait")),this.layerOptions.forms.global.tabletLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"tabletLandscape")),this.layerOptions.forms.global.mobilePortrait.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobilePortrait")),this.layerOptions.forms.global.mobileLandscape.on("nextendChange",t.proxy(this.globalShowOnDeviceCB,this,"mobileLandscape")),t("#layershow").data("field").setAvailableDevices(s),t("#layergroup-show").data("field").setAvailableDevices(s),this.__onChangeDeviceOrientation(),i.frontend.sliderElement.on("SliderDeviceOrientation",t.proxy(function(){this.__onChangeDeviceOrientation()},this)),this.ready.resolve()},r.prototype.refreshMode=function(){this.__onChangeDeviceOrientation(),i.frontend.responsive.reTriggerSliderDeviceOrientation()},r.prototype.__onChangeDeviceOrientation=function(){this.mode=i.frontend.responsive.getNormalizedModeString(),this.resetToDesktopTRElement.css("display","desktopPortrait"==this.mode?"none":""),this.resetToDesktopGlobalElement.css("display","desktopPortrait"==this.mode?"none":""),this.mainContainer.container.changeEditorModes(this.mode)},r.prototype.__onResetToDesktopClick=function(){if(this.mainContainer.getSelectedLayer()){var t=this.getMode();this.mainContainer.getSelectedLayer().resetMode(t)}},r.prototype.copyOrResetMode=function(t){var e=this.getMode();"desktopPortrait"==e?"desktopPortrait"!=t&&this.mainContainer.container.resetModes(t):t==e?this.mainContainer.container.resetModes(t):this.mainContainer.container.copyModes(e,t)},r.prototype.getSnap=function(){return this.canvasSettings.get("n2-ss-snap-to-enabled")?t(this.isStatic?".n2-ss-static-slide .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide":".n2-ss-slide.n2-ss-slide-active .n2-ss-layer.ui-resizable:not(.n2-ss-layer-locked):not(.n2-ss-layer-parent):not(.n2-ss-layer-selected):visible, .n2-ruler-user-guide"):!1},r.prototype.getHTML=function(){for(var e=t("<div></div>"),i=this.mainContainer.container.getAllLayers(),n=0;n<i.length;n++)e.append(i[n].getHTML(!0));return e.html()},r.prototype.getData=function(){return this.mainContainer.container.getData()},r.prototype.importLayers=function(e,i){var n=(this.mainContainer,t.extend(!0,[],e));i&&this.mainContainer.deleteLayers(),this._idTranslation={};for(var r=this.dataToLayers(n),s=0;s<r.length;s++)this.mainContainer.container.append(r[s]);if(this.refreshMode(),!this.mainContainer.getSelectedLayer()){var n=this.mainContainer.container.getSortedLayers();n.length>0&&n[0].activate()}},r.prototype.loadComponentWithNode=function(t,e,i,n){var r=t.container.append(e);return n&&this.refreshMode(),r},r.prototype.insertComponentWithNode=function(t,e,i,n,r){var s=t.container.insertAt(e,i);return r&&this.refreshMode(),s},r.prototype.fixActiveLayer=function(){var t=this.mainContainer.getSelectedLayer();(0==t||t.isDeleted)&&this.resetActiveLayer()},r.prototype.resetActiveLayer=function(){var t=this.mainContainer.container.getSortedLayers();t.length?t[t.length-1].activate():this.changeActiveLayer(null)},r.prototype.changeActiveLayer=function(e,i){var n=this.mainContainer.getSelectedLayer();n&&!n.isDeleted&&(n.$.off("propertyChanged.editor").off(".active"),n.deActivate()),this.mainContainer.activeLayer=e,i||this.exitSelectMode(),e&&(this.layerOptions.changeActiveComponent(e,e.type,e.placement.getType(),e.property),e.$.on({"propertyChanged.editor":t.proxy(this.layerOptions.onUpdateField,this.layerOptions),"placementChanged.active":t.proxy(function(t,i,n){this.layerOptions.changeActiveComponentPlacement(i,e.property)},this)})),this.$.trigger("activeLayerChanged")},r.prototype.highlight=function(t){this.$highlight.appendTo(t.layer)},r.prototype.deHighlight=function(t){this.$highlight.detach()},r.prototype["delete"]=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("delete")},r.prototype.duplicate=function(){this.mainContainer.getSelectedLayer()&&this.doActionOnActiveLayer("duplicate",[this.selectMode!=l.ON,!1])},r.prototype.copy=function(e){var i;if(e==n)if(1==this.selectMode)i=this.selectedLayers;else{var r=this.mainContainer.getSelectedLayer();r&&(i=this.isCol(r)||this.isContent(r)?r.container.getSortedLayers():[r])}else i=this.isCol(e)||this.isContent(e)?e.container.getSortedLayers():[e];var s=this.mainContainer.getLayerData(i);s.length&&t.jStorage.set("ss3layersclipboard",JSON.stringify(s))},r.prototype.paste=function(e){var i=t.jStorage.get("ss3layersclipboard");if(i){var r=JSON.parse(i);if(r.length){var s;s=e!==n&&e?this.isCol(e)||this.isContent(e)?e:e.group:this.mainContainer.getActiveGroup(),this.mainContainer.addLayers(r,s)}}},r.prototype.hasLayersOnClipboard=function(){return!!t.jStorage.get("ss3layersclipboard")},r.prototype.addContextMenu=function(){t("#n2-ss-0 .n2-ss-currently-edited-slide").nextendContextMenu({onShow:t.proxy(function(e,i){var n=t(e.target),r=n.closest(".n2-ss-layer"),s=r.data("layerObject");s||(s=this.mainContainer.getSelectedLayer()),s&&(this.isCol(s)||this.isContent(s)?i.addItem("Copy child layers","n2-i-copy",t.proxy(function(){this.copy(s)},this)):i.addItem("Copy layer","n2-i-copy",t.proxy(function(){this.selectMode==l.ON?this.copy():this.copy(s)},this))),this.hasLayersOnClipboard()&&i.addItem("Paste layer(s)","n2-i-paste",t.proxy(function(){this.paste(s)},this)),i.addItem("Copy slide","n2-i-copy",t.proxy(function(){this.slideEditManager.copySlide()},this)),this.slideEditManager.hasCopiedSlide()&&i.addItem("Paste slide","n2-i-paste",t.proxy(function(){this.slideEditManager.pasteSlide()},this))},this)})},r.prototype.initSelectMode=function(){this.selectMode=l.OFF,this.selectedLayers=[],t(".n2-ss-layer-list-top-bar .n2-button").on("mousedown",t.proxy(function(e){switch(e.preventDefault(),t(e.currentTarget).data("action")){case"delete":this["delete"]();break;case"duplicate":this.duplicate();break;case"group":this.createGroupFromSelected();break;case"cancel":this.exitSelectMode()}},this))},r.prototype.startSelection=function(t){t?(this.selectMode==l.ON&&this.exitSelectMode(),this.changeSelectMode(l.GROUP)):this.changeSelectMode(l.ON)},r.prototype.changeSelectMode=function(e){var i=this.selectMode;i!=e&&(i==l.ON?t("#n2-admin").removeClass("n2-ss-select-layer-mode-on"):i==l.GROUP&&t("#n2-admin").removeClass("n2-ss-select-layer-mode-group"),this.selectMode=e,i==l.GROUP&&e==l.ON&&this.selectedLayers[0].activate(null,null,!0),e==l.OFF?t("#n2-admin").removeClass("n2-ss-select-layer-mode"):(t("#n2-admin").addClass("n2-ss-select-layer-mode"),e==l.ON?t("#n2-admin").addClass("n2-ss-select-layer-mode-on"):e==l.GROUP&&t("#n2-admin").addClass("n2-ss-select-layer-mode-group")),this.selectMode==l.OFF?t("body").off(".n2-ss-selection"):t("body").on("mousedown.n2-ss-selection",t.proxy(function(t){3!=event.which&&"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.exitSelectMode()},this)))},r.prototype.endSelection=function(t){t&&this.selectMode==l.GROUP&&this.exitSelectMode()},r.prototype.selectLayer=function(t,e){if("layer"!=t.type)return!0;if(this.selectMode!=l.ON){var i=this.mainContainer.getSelectedLayer();if("layer"!=i.type)return t.activate(null),!0;this.startSelection(!1),e&&this.selectedLayers.push(i)}return this._selectLayer(t),!0},r.prototype._selectLayer=function(e){var i=t.inArray(e,this.selectedLayers);if(-1!=i){if(this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.exitSelectMode(),!1;var n=this.selectedLayers[i];if(this.selectedLayers.splice(i,1),e.layerRow.removeClass("n2-selected"),e.layer.removeClass("n2-ss-layer-selected"),this.selectMode==l.ON&&this.selectedLayers.length<=1)return this.selectedLayers[0].activate(),this.exitSelectMode(),!1;n===this.mainContainer.getSelectedLayer()&&this.selectedLayers[0].activate(!1,null,!0)}else{for(var r=this.selectedLayers.length,s=0;s<this.selectedLayers.length;s++)if(e.layer.add(this.selectedLayers[s].layer).index(this.selectedLayers[s].layer)>0){r=s;break}this.selectedLayers.splice(r,0,e)}for(var s=0;s<this.selectedLayers.length;s++)this.selectedLayers[s].layerRow.addClass("n2-selected"),this.selectedLayers[s].layer.addClass("n2-ss-layer-selected")},r.prototype.addSelection=function(t,e){e||this.changeSelectMode(l.ON);for(var i=0;i<t.length;i++)this._selectLayer(t[i],!1)},r.prototype.exitSelectMode=function(){if(this.selectMode){for(var e=0;e<this.selectedLayers.length;e++)this.selectedLayers[e]!=this.mainContainer.getSelectedLayer()&&this.selectedLayers[e].layerRow.removeClass("n2-active"),this.selectedLayers[e].layerRow.removeClass("n2-selected"),this.selectedLayers[e].layer.removeClass("n2-ss-layer-selected");t("#n2-admin").removeClass("n2-ss-select-layer-mode"),this.selectedLayers=[],this.changeSelectMode(l.OFF)}},r.prototype.doActionOnActiveLayer=function(e,i){if(this.selectMode==l.ON)for(var n=t.extend([],this.selectedLayers),r=0;r<n.length;r++)n[r][e].apply(n[r],i);else{var s=this.mainContainer.getSelectedLayer();s&&s[e].apply(s,i)}},r.prototype.canvasDragStart=function(t,e){if(this.selectMode&&"canvas"==this.currentEditorMode&&"absolute"==e.mode){for(var i=!1,n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n],s=r.layer;if(s[0]!=e.layer.layer[0]){var o=s.css("display");"none"==o&&s.css("display",""),r._originalPosition=s.position(),"none"==o&&s.css("display","none")}else i=!0}i||this.exitSelectMode(),this.isMultiDrag=!0}},r.prototype.canvasDragMove=function(t,e){if(this.isMultiDrag===!0)for(var i={left:e.position.left+e.canvasOffset.left-e.originalOffset.left,top:e.position.top+e.canvasOffset.top-e.originalOffset.top},n=0;n<this.selectedLayers.length;n++){var r=this.selectedLayers[n];if(!this.isGroup(r)){var s=r.layer;s[0]!=e.layer.layer[0]&&(s.css({left:r._originalPosition.left+i.left,top:r._originalPosition.top+i.top,bottom:"auto",right:"auto"}),r.placement.doAction("triggerLayerResized"))}}},r.prototype.canvasDragStop=function(t,e){if(this.isMultiDrag===!0){for(var i=0;i<this.selectedLayers.length;i++){var n=this.selectedLayers[i];if(!this.isGroup(n)){var r=n.layer;if(r[0]!=e.layer.layer[0]){var s=r.css("display");"none"==s&&r.css("display","block");var o=parseInt(n.layer.css("left")),a=parseInt(n.layer.css("top"));n.placement.current.setPosition(o,a),n.placement.doAction("triggerLayerResized"),"none"==s&&r.css("display","none")}}}return this.isMultiDrag=!1,!0}return!1},r.prototype.historyDeleteGroup=function(t){t.getSelf()["delete"]()},r.prototype.historyCreateGroup=function(t){var i=new e.Group(this,this.mainContainer,{},null);i.create(),t.setSelf(i)},r.prototype.createGroupFromSelected=function(){var t;switch(this.selectMode){case l.ON:t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers(this.selectedLayers),this.exitSelectMode(),t.activate();break;case l.OFF:var n=this.mainContainer.getSelectedLayer();n.group instanceof e.Group?n.group.activate():(t=new e.Group(this,this.mainContainer,{},null),t.create(),i.history.addSimple(this,this.historyDeleteGroup,this.historyCreateGroup,[t]),t.addLayers([n]),t.activate());break;case l.GROUP:}},r.prototype.createRow=function(t){var i=new e.Row(this,t,{});return i.create(),i.hightlightStructure(),{layer:i}},r.prototype.createCol=function(t){var e=t,i=null;if(this.isCol(e))i=e.group.createCol();else if(this.isRow(e))i=e.createCol();else{if(!this.isCol(e.group))return this.createRow(t);i=e.group.group.createCol()}return i.activate(null),{layer:i}},r.prototype.preventActivationBubbling=function(){return this.shouldPreventActivationBubble?!1:(this.shouldPreventActivationBubble=!0,!0)},r.prototype.allowActivation=function(){this.shouldPreventActivationBubble=!1},r.prototype.hotkeys=function(){t(window).on({keydown:t.proxy(function(e){if(!("TEXTAREA"==e.target.tagName||"INPUT"==e.target.tagName||i.layerAnimationManager&&i.layerAnimationManager.timelineControl&&i.layerAnimationManager.timelineControl.isActivated())){var n=this.mainContainer.getSelectedLayer(),r=e.keyCode;if(r>=49&&57>=r){var l=e.originalEvent.location||e.originalEvent.keyLocation||0;3==l&&(r+=48)}if(n)if(46==r||8==r)this["delete"](),e.preventDefault();else if(35==r)this.duplicate(),e.preventDefault();else if(16==r)s[r]=1;else if(38==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(40==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveY",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(37==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[-1*(s[16]?10:1)])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(39==r){if(!s[r]){var h=t.proxy(function(){this.doActionOnActiveLayer("moveX",[s[16]?10:1])},this);h(),s[r]=setInterval(h,100)}e.preventDefault()}else if(r>=97&&105>=r){var d=o[r],c=a[r],p=!1;this.layerOptions.forms.placement.absolute.align.val()==d&&this.layerOptions.forms.placement.absolute.valign.val()==c&&(p=!0),this.layerOptions.layerFeatures.horizontalAlign(d,p),this.layerOptions.layerFeatures.verticalAlign(c,p)}else if(65==r){e.preventDefault();var u=this.mainContainer.getSelectedLayer();u&&"absolute"==u.placement.getType()&&u.placement.current.fit()}(e.ctrlKey||e.metaKey)&&(90==r?e.shiftKey?i.history.redo()&&e.preventDefault():i.history.undo()&&e.preventDefault():71==r?(this.createGroupFromSelected(),e.preventDefault()):68==r?(e.preventDefault(),this.slideEditManager.copySlide()):70==r?(e.preventDefault(),this.slideEditManager.pasteSlide()):67==r?this.copy():86==r&&this.paste())}},this),keyup:t.proxy(function(t){"undefined"!=typeof s[t.keyCode]&&s[t.keyCode]&&(clearInterval(s[t.keyCode]),s[t.keyCode]=0)},this)})},r.prototype.getSelf=function(){return this},r}),N2Require("CanvasUserInterface",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.isShown=!t.jStorage.get("ssLayersShown",!1),this.tlHeight=t.jStorage.get("ssLayersHeight")||200,this.$container=t("#n2-ss-layers"),this.fixScroll(),this.switchLayerList(),this.topBar=t(".n2-ss-layer-list-top-bar").on("mousedown",t.proxy(this.resizeStart,this)),this.topBar.find(".n2-ss-layer-list-opener").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),t(".n2-ss-slide-show-layers").on("click",t.proxy(function(t){t.preventDefault(),this.switchLayerList()},this)),this.onResize(),t(window).on("resize",t.proxy(this.onResize,this))}return r.prototype.onResize=function(){var t=this.$container.height();this.paneLeft.height(t-48),this.paneRight.height(t-48)},r.prototype.onActivateLayer=function(t){var e=this.paneLeft.scrollTop(),i=0,n=t;do i+=n.layerRow.get(0).offsetTop,n=n.group;while(n!==this.canvasManager.mainContainer);(e>i||i>e+this.paneLeft.height()-40)&&(this.paneLeft.scrollTop(i),this.paneRight.scrollTop(i))},r.prototype.fixScroll=function(){this.paneLeft=t(".n2-ss-layers-sidebar-rows"),this.paneRight=t(".n2-ss-timeline-content-layers-container");var e=t.proxy(function(t){var e=this.paneLeft.scrollTop();t.originalEvent.deltaY>0?e+=40:e-=40,e=40*Math.round(e/40),this.paneLeft.scrollTop(e),this.paneRight.scrollTop(e),t.preventDefault()},this);this.paneLeft.on("mousewheel",e),this.paneLeft.on("scroll",t.proxy(function(t){var e=this.paneLeft.scrollTop();this.paneRight.scrollTop(e),t.preventDefault()},this)),this.paneRight.on("mousewheel",e)},r.prototype.resizeStart=function(e){this.isShown&&(e.target==this.topBar[0]||t(e.target).hasClass("n2-h2"))&&(e.preventDefault(),this.startY=e.clientY,this.height=this.$container.height(),t("body").on({"mousemove.n2-ss-tl-resize":t.proxy(this.resizeMove,this),"mouseup.n2-ss-tl-resize":t.proxy(this.resizeStop,this),"mouseleave.n2-ss-tl-resize":t.proxy(this.resizeStop,this)}))},r.prototype.resizeMove=function(t){t.preventDefault(),this.setTLHeight(this._calculateDesiredHeight(t))},r.prototype.resizeStop=function(e){e.preventDefault(),t("body").off(".n2-ss-tl-resize");var i=this._calculateDesiredHeight(e);this.setTLHeight(i),this.tlHeight=i,t.jStorage.set("ssLayersHeight",i),t("#n2-admin").triggerHandler("resize")},r.prototype._calculateDesiredHeight=function(t){var e=this.startY-t.clientY+this.height-48;return this.__calculateDesiredHeight(e)},r.prototype.__calculateDesiredHeight=function(t){return 40*Math.round(Math.min(Math.max(40,t),(window.innerHeight||document.documentElement.clientHeight)/2)/40)+48},r.prototype.switchLayerList=function(){this.isShown=!this.isShown,this.$container.toggleClass("n2-active",this.isShown),this.isShown?this.setTLHeight(this.tlHeight):this.setTLHeight(48),t.jStorage.set("ssLayersShown",this.isShown)},r.prototype.setTLHeight=function(t){t=Math.max(48,t),this.$container.height(t),t=this.$container.height(),this.paneLeft.height(t-48),this.paneRight.height(t-48),nextend.triggerResize()},r.prototype.activateAdd=function(t,e){this.$add.css({left:t,top:e}).appendTo(this.$container)},r}),N2Require("LayerFeatures",[],["smartSlider"],function(t,e,i,n){"use strict";function r(t,e){this.fields=t,this.canvasManager=e,this.initParentLinker(),this.initAlign(),this.initEvents()}var s={left:0,center:1,right:2,top:0,middle:1,bottom:2};return r.prototype.initParentLinker=function(){var e=this.fields.parentid.data("field");t("#n2-ss-layer-parent-linker").on({click:function(t){e.click(t)}})},r.prototype.initAlign=function(){this.layerDefault={align:null,valign:null};var e=t("#n2-ss-layer-horizontal-align .n2-radio-option"),i=t("#n2-ss-layer-vertical-align .n2-radio-option");e.add(i).on("click",t.proxy(function(n){if(n.ctrlKey||n.metaKey){var r=t(n.currentTarget),s=r.hasClass("n2-sub-active"),o=r.data("align");switch(o){case"left":case"center":case"right":e.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-horizontal-align",null),this.layerDefault.align=null):(t.jStorage.set("ss-item-horizontal-align",o),this.layerDefault.align=o,r.addClass("n2-sub-active"));break;case"top":case"middle":case"bottom":i.removeClass("n2-sub-active"),s?(t.jStorage.set("ss-item-vertical-align",null),this.layerDefault.valign=null):(t.jStorage.set("ss-item-vertical-align",o),this.layerDefault.valign=o,r.addClass("n2-sub-active"))}}else if(this.canvasManager.mainContainer.getSelectedLayer()){var o=t(n.currentTarget).data("align");switch(o){case"left":case"center":case"right":this.horizontalAlign(o,!0);break;case"top":case"middle":case"bottom":this.verticalAlign(o,!0)}}},this)),this.fields.align.on("nextendChange",t.proxy(function(){switch(e.removeClass("n2-active"),this.fields.align.val()){case"left":e.eq(0).addClass("n2-active");break;case"center":e.eq(1).addClass("n2-active");break;case"right":e.eq(2).addClass("n2-active")}},this)),this.fields.valign.on("nextendChange",t.proxy(function(){switch(i.removeClass("n2-active"),this.fields.valign.val()){case"top":i.eq(0).addClass("n2-active");break;case"middle":i.eq(1).addClass("n2-active");break;case"bottom":i.eq(2).addClass("n2-active")}},this));var n=t.jStorage.get("ss-item-horizontal-align",null),r=t.jStorage.get("ss-item-vertical-align",null);null!=n&&(e.eq(s[n]).addClass("n2-sub-active"),this.layerDefault.align=n),null!=r&&(i.eq(s[r]).addClass("n2-sub-active"),this.layerDefault.valign=r)},r.prototype.horizontalAlign=function(t,e){this.fields.align.val()!=t?this.fields.align.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.left.val(0).trigger("change")},r.prototype.verticalAlign=function(t,e){this.fields.valign.val()!=t?this.fields.valign.data("field").options.eq(s[t]).trigger("click"):e&&this.fields.top.val(0).trigger("change")},r.prototype.initEvents=function(){var e=t("#n2-tab-events"),i=e.find(".n2-h3"),n=i.html(),r=t('<div class="n2-editor-header n2-h2 n2-uc"><span>'+n+"</span></div>");i.replaceWith(r)},r}),N2Require("LayerWindow",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.isMinimized=!1,this.detachedPosition={left:t.jStorage.get("ssPanelLeft")||200,top:t.jStorage.get("ssPanelTop")||100,height:t.jStorage.get("ssPanelHeight")||400},this.hasBreadcrumb=!1,this.lastHeight=this.detachedPosition.height,this.admin=t("#n2-admin"),this.sidebar=t("#n2-ss-layer-window").on("mousedown",t.proxy(nextend.context.setMouseDownArea,nextend.context,"sidebarClicked")),this.title=this.sidebar.find(".n2-ss-layer-window-title-inner"),this.sidebarTD=this.sidebar.parent(),this.canvasManager=e,i.layerWindow=this,this.viewPanes={layerEdit:t("#n2-tabbed-slide-editor-settings > .n2-tabs").addClass("n2-scrollable")};for(var n in this.viewPanes)this.viewPanes[n].on("DOMMouseScroll mousewheel",function(e){var i=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(i=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(i=e.originalEvent.deltaY<0),e.originalEvent.detail&&(i=e.originalEvent.detail<0));var n=function(){return e.stopPropagation(),e.preventDefault(),e.returnValue=!1,!1};return!i&&this.scrollHeight<=t(this).innerHeight()+this.scrollTop+1?n():i&&0>=this.scrollTop-1?n():void 0});this.panelHeading=t("#n2-tabbed-slide-editor-settings").find(".n2-sidebar-tab-switcher .n2-td");var r=this.sidebar.find(".n2-ss-layer-window-title-nav-left");t('<a href="#"><i class="n2-i n2-i-minimize n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.toggleMinimize()},this)).appendTo(r);var s=this.sidebar.find(".n2-ss-layer-window-title-nav-right");t('<a href="#"><i class="n2-i n2-i-closewindow n2-i-grey-opacity"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.hide()},this)).appendTo(s),nextend.tooltip.add(s),this.$breadcrumb=t('<div class="n2-ss-layer-window-breadcrumb"></div>').insertAfter("#n2-tabbed-slide-editor-settings > .n2-sidebar-tab-switcher");var o=t("#n2-ss-add-sidebar");t(".n2-ss-add-layer-button").on("click",function(e){e.preventDefault(),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(0).trigger("click"),o.toggleClass("n2-active")}),t(".n2-ss-core-item").on("click",function(t){o.removeClass("n2-active")});var a=t("#wpadminbar, .navbar-fixed-top").height()+t(".n2-top-bar").height();this.$verticalBarInner=t(".n2-ss-add-sidebar-inner").each(function(){var e=t(this);e.fixTo(e.parent(),{top:a})}),this.$resizeInnerContainer=t("#n2-ss-layers-switcher_0, #n2-ss-layers-switcher_1"),this.extraHeightToRemove=60,this.$resizeInnerContainer.length||(this.extraHeightToRemove=0,this.$resizeInnerContainer=this.$verticalBarInner),this.$resizeInnerContainer.css("overflow","auto"),this.detach(),t("#n2-admin").on("resize",t.proxy(this.resizeVerticalBar,this)),t(window).on("resize",t.proxy(this.onResize,this)),t(".n2-ss-slide-duplicate-layer").on("click",t.proxy(function(t){t.preventDefault(),this.duplicate()},this.canvasManager)),t(".n2-ss-slide-delete-layer").on("click",t.proxy(function(t){t.preventDefault(),this["delete"]()},this.canvasManager)),t("body").on("mousedown",t.proxy(function(t){"main"==nextend.context.getCurrentWindow()&&nextend.context.mouseDownArea===!1&&this.hide()},this));var l=t('<div id="n2-ss-devicespecific-settings"></div>'),h=nextend.smartSlider.frontend.responsive.parameters.deviceModes;for(var n in h)if(h[n]){var d=n.replace(/([A-Z])/g," $1").split(" "),c=d[0],p=d[1].toLowerCase();l.append('<i class="n2-i n2-it n2-i-mini-'+c+"-"+p+'" data-device="'+c+'" data-orientation="'+p+'"></i>')}var u={mouseenter:t.proxy(function(t){l.appendTo(t.currentTarget)},this),mouseleave:t.proxy(function(t){l.detach()},this)};this.sidebar.find("[data-devicespecific] label").prepend('<span class="n2-i n2-i-mini-desktop-portrait"></span>'),this.sidebar.find("[data-devicespecific] label").on(u),l.find(".n2-i").on({click:t.proxy(function(e){e.preventDefault();var i=t(e.currentTarget);t("#n2-ss-devices").find('[data-device="'+i.data("device")+'"][data-orientation="'+i.data("orientation")+'"]').trigger("click")},this)})}return r.prototype.toggleMinimize=function(){this.isMinimized=!this.isMinimized,this.sidebar.toggleClass("n2-ss-layer-window-minized",this.isMinimized),this.isMinimized||this.onResize()},r.prototype.show=function(e,i){this.setTitle(e),t("body").addClass("n2-ss-layer-edit-visible")},r.prototype._show=function(){t("body").addClass("n2-ss-layer-edit-visible")},r.prototype.hide=function(){t("body").removeClass("n2-ss-layer-edit-visible")},r.prototype.isVisible=function(){return t("body").hasClass("n2-ss-layer-edit-visible")},r.prototype.hideWithDeferred=function(e){t("body").hasClass("n2-ss-layer-edit-visible")&&(this.hide(),e.done(t.proxy(this._show,this)))},r.prototype.setTitle=function(t){this.title.html(t.getName()),this.updateGroupTitle(t)},r.prototype.updateGroupTitle=function(e){var i;for(this.$breadcrumb.html(""),i=0;5>i&&(t('<span class="n2-window-title-structure-nav"><span>'+e.label+'</span><span class="n2-i n2-it n2-i-mini-arrow-thin"></span></span>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},e),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},e),click:t.proxy(function(t){this.canvasManager.deHighlight(this),this.activate(t)},e)}).prependTo(this.$breadcrumb),e.group&&e.group!==this.canvasManager.mainContainer);i++)e=e.group;this.hasBreadcrumb=i>0,this.$breadcrumb.toggleClass("n2-has-breadcrumb",this.hasBreadcrumb),this.onResize()},r.prototype.getLayerEditExcludedHeight=function(){return 85+(this.hasBreadcrumb?23:0)},r.prototype.resizeVerticalBar=function(){this.$resizeInnerContainer.height((window.innerHeight||document.documentElement.clientHeight)-(t("#n2-ss-layers").is(":visible")&&t("#n2-ss-layers").hasClass("n2-active")?t("#n2-ss-layers").height():0)-t("#wpadminbar, .navbar-fixed-top").height()-t(".n2-top-bar").height()-this.extraHeightToRemove)},r.prototype.onResize=function(){this.sidebar.css("display","block"),this.resizeVerticalBar();var t=window.innerHeight||document.documentElement.clientHeight,e=this.sidebar.height()-this.getLayerEditExcludedHeight();this.viewPanes.layerEdit.height(e);var i={},n=window.innerWidth||document.documentElement.clientWidth,r=this.sidebar[0].getBoundingClientRect();r.left<0?i.left=0:r.left+r.width>n&&(i.left=Math.max(0,n-r.width)),r.height>t-r.top&&(i.top=t-r.top-r.height+r.top,i.top<0&&(this.lastHeight=i.height=r.height+i.top,i.top=0)),this.sidebar.css(i),this.sidebar.css("display","")},r.prototype.detach=function(){this.sidebar.css(this.detachedPosition),this.sidebar.appendTo(this.admin),
5
+ this.admin.addClass("n2-sidebar-hidden"),t(window).off(".n2-ss-panel"),this.sidebar.removeClass("n2-sidebar-fixed"),this.sidebar.draggable({distance:5,handle:".n2-ss-layer-window-title",containment:"window",stop:t.proxy(function(e,i){this.sidebar.css("height",this.lastHeight);var n=this.sidebar[0].getBoundingClientRect();this.detachedPosition.left=n.left,this.detachedPosition.top=n.top,t.jStorage.set("ssPanelLeft",n.left),t.jStorage.set("ssPanelTop",n.top)},this),scroll:!1}).resizable({distance:5,handles:"s",stop:t.proxy(function(e,i){this.lastHeight=this.detachedPosition.height=this.sidebar.height(),t.jStorage.set("ssPanelHeight",this.detachedPosition.height)},this),create:t.proxy(function(e,i){t(e.target).find(".ui-resizable-handle").addClass("n2-ss-layer-window-resizer")},this)}),this.onResize(),nextend.triggerResize()},r.prototype.switchTab=function(t){this.panelHeading.filter('[data-tab="'+t+'"]').trigger("click")},r}),N2Require("PositionDisplay",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){this.currentSource="",t(window).ready(t.proxy(this.ready,this))}return r.prototype.ready=function(){this.$body=t("body"),this.$el=t('<div class="n2 n2-ss-position-display"/>').appendTo("body")},r.prototype.show=function(t){""==this.currentSource&&(this.currentSource=t,this.$el.addClass("n2-active"),this.$body.addClass("n2-position-display-active"))},r.prototype.update=function(t,e,i){this.currentSource==e&&this.$el.html(i).css({left:t.pageX+10,top:t.pageY+10})},r.prototype.hide=function(t){this.currentSource!=t&&t!==n||(this.$body.removeClass("n2-position-display-active"),this.$el.removeClass("n2-active"),this.currentSource="")},i.positionDisplay=new r,r}),N2Require("Ruler",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.showGuides=1,this.guides=[],this.container=t('<div class="n2-ruler-container" />').appendTo("#n2-ss-slide-canvas-container-inner .n2-ss-slider-outer-container"),this.scale=10,this.vertical=t('<div class="n2-ruler n2-ruler-vertical unselectable"></div>').appendTo(".n2-ss-slider-real-container"),this.horizontal=t('<div class="n2-ruler n2-ruler-horizontal unselectable"></div>').appendTo(this.container),this.verticalSpans=t(),this.horizontalSpans=t(),this.onResize(),nextend.smartSlider.frontend.sliderElement.on("SliderResize",t.proxy(this.onSliderResize,this)),t(window).on("resize",t.proxy(this.onResize,this)),this.horizontal.on("mousedown",t.proxy(function(t){this.showGuides&&new o(this,this.horizontal,t)},this)),this.vertical.on("mousedown",t.proxy(function(t){this.showGuides&&new a(this,this.vertical,t)},this));try{e=t.extend({vertical:[],horizontal:[]},JSON.parse(Base64.decode(e)));for(var i=0;i<e.horizontal.length;i++){var n=new o(this,this.horizontal);n.setPosition(e.horizontal[i])}for(var i=0;i<e.vertical.length;i++){var n=new a(this,this.vertical);n.setPosition(e.vertical[i])}}catch(r){}nextend.ruler=this,this.measureToolVertical(),this.measureToolHorizontal()}function s(e,i,n){this.ruler=e,this.container=i,this.position=0,this.guide=t('<div class="n2-ruler-guide n2-ruler-user-guide"><div class="n2-ruler-guide-border"></div><div class="n2-ruler-guide-handle"></div></div>').appendTo(i).on("mousedown",t.proxy(function(t){t.preventDefault(),t.stopPropagation(),nextend.smartSlider.canvasManager.canvasSettings.settings["n2-ss-lock-guides"]||this["delete"]()},this)),this.ruler.addGuide(this),n&&this.create(n)}function o(){s.prototype.constructor.apply(this,arguments)}function a(){s.prototype.constructor.apply(this,arguments)}return r.prototype.addGuide=function(t){this.guides.push(t)},r.prototype.removeGuide=function(e){this.guides.splice(t.inArray(e,this.guides),1)},r.prototype.clearGuides=function(){for(var t=this.guides.length-1;t>=0;t--)this.guides[t]["delete"]()},r.prototype.onSliderResize=function(t,e){this.onResize()},r.prototype.onResize=function(){var e=nextend.smartSlider.frontend.responsive.responsiveDimensions,i=Math.max(e.slider.width,t("#n2-ss-slide-canvas-container").outerWidth(!0)-40),n=Math.max(e.slider.height,t("#n2-ss-slide-canvas-container").outerHeight(!0));this.container.css({width:i+40,height:n+40});for(var r=this.horizontalSpans.length-3;r<i/this.scale;r++){var s=t("<span />").appendTo(this.horizontal);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.horizontalSpans=this.horizontalSpans.add(s)}for(var r=this.verticalSpans.length-3;r<n/this.scale;r++){var s=t("<span />").appendTo(this.vertical);r%10==0?s.addClass("n2-ss-ruler-mark-large").append("<span>"+r/10*100+"</span>"):r%2==0&&s.addClass("n2-ss-ruler-mark-medium"),this.verticalSpans=this.verticalSpans.add(s)}},r.prototype.toArray=function(){for(var t={horizontal:[],vertical:[]},e=0;e<this.guides.length;e++)this.guides[e]instanceof o?t.horizontal.push(this.guides[e].position):this.guides[e]instanceof a&&t.vertical.push(this.guides[e].position);return t},r.prototype.measureToolVertical=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.vertical),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.vertical.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.vertical.offset().top);r(),this.vertical.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageY){var l=n.pageY-a;e.css("top",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageY}},this))}},this),mouseleave:t.proxy(function(){this.vertical.off(".n2-ruler-measure-tool"),s()},this)})},r.prototype.measureToolHorizontal=function(){var e=t('<div class="n2-ruler-guide" style="z-index:1;"><div class="n2-ruler-guide-border" style="border-color: #f00;"></div></div>').css("display","none").appendTo(this.horizontal),n=!1,r=t.proxy(function(){n||(n=!0,e.css("display",""),i.positionDisplay.show("Guide"))},this),s=t.proxy(function(){n&&(n=!1,e.css("display","none"),i.positionDisplay.hide("Guide"))},this);this.horizontal.on({mouseenter:t.proxy(function(n){if(this.showGuides){var o=0,a=Math.round(this.horizontal.offset().left);r(),this.horizontal.on("mousemove.n2-ruler-measure-tool",t.proxy(function(n){if(t(n.target).hasClass("n2-ruler-guide-border")&&t(n.target).parent()[0]!=e[0])s();else if(r(),o!=n.pageX){var l=Math.max(n.pageX-a,40);e.css("left",l),i.positionDisplay.update(n,"Guide",l-40+"px"),o=n.pageX}},this))}},this),mouseleave:t.proxy(function(){this.horizontal.off(".n2-ruler-measure-tool"),s()},this)})},s.prototype._position=function(t,e){return Math.max(0,t)},s.prototype.setPosition=function(t){this.position=t,this.refresh()},s.prototype.refresh=function(){this.positionRender(this.position)},s.prototype["delete"]=function(){this.ruler.removeGuide(this),this.guide.remove()},o.prototype=Object.create(s.prototype),o.prototype.constructor=o,o.prototype.create=function(t){var e=Math.round(this.container.offset().left)+40;this.position=this._position(t.pageX-e,t),this.positionRender(this.position)},o.prototype.rawPositionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},o.prototype.positionRender=function(t){this.guide.css("left",Math.max(0,t)+40)},a.prototype=Object.create(s.prototype),a.prototype.constructor=a,a.prototype.create=function(t){var e=Math.round(this.container.offset().top)+40;this.position=this._position(t.pageY-e,t),this.positionRender(this.position)},a.prototype.rawPositionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},a.prototype.positionRender=function(t){this.guide.css("top",Math.max(0,t)+40)},r}),N2Require("CanvasSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.canvasManager=e,this.settings={};var i=t("#n2-ss-slide-canvas-settings").on("mouseleave",t.proxy(function(){i.removeClass("n2-active")},this));i.find("> a").on("click",function(t){t.preventDefault(),i.toggleClass("n2-active")}),this.$settingsPanel=i.find(".n2-ss-settings-panel-inner"),this.snapTo(),this.roundTo(),this.colorScheme(),this.canvasManager.slideEditManager.options.isAddSample||this.ruler()}return r.prototype._addSettings=function(e,i,n,r){this.settings[e]=parseInt(t.jStorage.get(e,n));var s=t('<a href="">'+i+'<span class="n2-setting-tick"><i class="n2-i n2-it n2-i-tick2"></i></span></a>').on("click",t.proxy(function(i){i.preventDefault(),this.settings[e]=1==this.settings[e]?0:1,t.jStorage.set(e,this.settings[e]),s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!1)},this)).appendTo(this.$settingsPanel);s.toggleClass("n2-setting-enabled",1==this.settings[e]),r(this.settings[e],!0)},r.prototype._addAction=function(e,i){t('<a href="" class="n2-panel-action">'+e+"</a>").on("click",t.proxy(function(t){t.preventDefault(),i()},this)).appendTo(this.$settingsPanel)},r.prototype.get=function(t){return this.settings[t]},r.prototype.snapTo=function(){this._addSettings("n2-ss-snap-to-enabled",n2_("Smart Snap"),1,t.proxy(function(t){for(var e=this.mainContainer.container.getSortedLayers(),i=0;i<e.length;i++)e[i].placement.doAction("snap")},this.canvasManager))},r.prototype.roundTo=function(){this._addSettings("n2-ss-round-to-enabled",n2_("Round to 5px"),1,function(t){1==t?nextend.roundTo=5:nextend.roundTo=1})},r.prototype.colorScheme=function(){var e=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-theme-dark",n2_("Dark Mode"),0,function(t){e.toggleClass("n2-ss-theme-dark",1==t)})},r.prototype.ruler=function(){i.ruler=new e.Ruler(t("#slideguides").val());var n=t("#n2-ss-slide-canvas-container");this._addSettings("n2-ss-ruler-enabled",n2_("Ruler"),1,t.proxy(function(t){n.toggleClass("n2-ss-has-ruler",1==t),nextend.triggerResize()},this)),this._addSettings("n2-ss-show-guides",n2_("Show Guides"),1,t.proxy(function(t){nextend.ruler.showGuides=t,n.toggleClass("n2-ss-show-guides",1==t)},this)),this._addSettings("n2-ss-lock-guides",n2_("Lock Guides"),0,t.proxy(function(t){n.toggleClass("n2-ss-lock-guides",1==t)},this)),this._addAction("Clear Guides",t.proxy(function(){nextend.ruler.clearGuides()},this))},r}),N2Require("PlacementAbsolute",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="absolute",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments),this.doThrottledTheResize=this.doTheResize,this._triggerLayerResizedThrottled=NextendThrottle(this._triggerLayerResized,30),this.parentIsVisible=!0,this.children=[]}var s=function(){var t=0;return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){var i,n=(new Date).getTime();return i=Math.max(0,16-(n-t)),t=n+i,setTimeout(function(){e(n+i)},i)}}(),o={raf:!1,ratios:null,isThrottled:!1,layers:[]},a=function(){o.raf===!1&&(o.raf=!0,s(function(){for(var t=0;t<o.layers.length;t++)o.layers[t].isDeleted||o.layers[t].doTheResize(o.ratios,!0,o.isThrottled);o={raf:!1,ratios:null,isThrottled:!1,layers:[]}}))};return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer,this.$layerRow=this.layer.layerRow},r.prototype.preActivation=function(t){if("normal"==t.type){var e=this.layer.getProperty("height");e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);n.length>0?this.activatedAfterParentReady(e):setTimeout(t.proxy(function(){this.activatedAfterParentReady(e)},this),300)}else this._activated(e)},r.prototype.activatedAfterParentReady=function(e){var i=this.$layer.data("parentid");if(i){var n=t("#"+i);if(n.length>0){var r=n.data("layerObject");r?r.readyDeferred.done(t.proxy(this._activated,this,e)):n.on("layerStarted",t.proxy(function(i,n){n.readyDeferred.done(t.proxy(this._activated,this,e))},this))}else this.$layer.data("parentid",""),this._activated(e)}else this._activated(e)},r.prototype._activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.$layer.css("zIndex",""),this.___makeLayerAlign(),this.___makeLayerResizeable()},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""});for(var i=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[a+s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){var e=this.layer.getProperty("parentid");e&&""!=e&&(this.$layer.removeAttr("data-parentid"),this.unSubscribeParent()),this.$layer.removeAttr("data-align").removeAttr("data-valign").css({left:"",top:"",right:"",bottom:"",width:"",height:"","text-align":""}),this.alignMarker.remove(),this.$layer.nextendResizable("destroy"),this.$layer.off(".n2-ss-absolute"),this.$layer.triggerHandler("LayerUnavailable");var i=["parentid","responsiveposition","responsivesize","parentalign","parentvalign","align","valign","left","top","width","height"],n=this.layer.getPropertiesData(i);return this.layer.removeProperties(i),this.chainParent.remove(),n},r.prototype.loadProperties=function(e){this.layer.createProperty("parentid",null,this.layer.layer,this),this.layer.createProperty("responsiveposition",1,this.layer.layer,this),this.layer.createProperty("responsivesize",1,this.layer.layer,this),this.layer.createDeviceProperty("parentalign",{desktopPortrait:"center"},this.layer.layer,this),this.layer.createDeviceProperty("parentvalign",{desktopPortrait:"middle"},this.layer.layer,this),this.layer.createDeviceProperty("align",{desktopPortrait:e.align||"center"},this.layer.layer,this),this.layer.createDeviceProperty("valign",{desktopPortrait:e.valign||"middle"},this.layer.layer,this),this.layer.createDeviceProperty("left",{desktopPortrait:e.left||0},this.layer.layer,this),this.layer.createDeviceProperty("top",{desktopPortrait:e.top||0},this.layer.layer,this),this.layer.createDeviceProperty("width",{desktopPortrait:e.width||"auto"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:e.height||"auto"},this.layer.layer,this);var i=this.layer.layer;this.subscribeParentCallbacks={},this.layer.getProperty("parentid")&&this.subscribeParent(),i.attr({"data-align":this.layer.getProperty("align"),"data-valign":this.layer.getProperty("valign")});var n=null;this.chainParent=t('<div class="n2-ss-layer-chain-parent n2-button n2-button-icon n2-button-xs n2-radius-s n2-button-blue"><i class="n2-i n2-i-layerunlink"></i></div>').on({click:t.proxy(this.unlink,this),mouseenter:t.proxy(function(){n=t("#"+this.layer.getProperty("parentid")).addClass("n2-highlight")},this),mouseleave:t.proxy(function(){n&&(n.removeClass("n2-highlight"),n=null)},this)}).appendTo(this.$layer)},r.prototype.triggerLayerResized=function(t,e){t?this._triggerLayerResized(t,e):this._triggerLayerResizedThrottled(!0,e)},r.prototype._triggerLayerResized=function(t,e){this.layer.isDeleted||this.$layer.triggerHandler("LayerResized",[e||{slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t||!1])},r.prototype.___makeLayerAlign=function(){this.alignMarker=t('<div class="n2-ss-layer-cc" />').appendTo(this.$layer)},r.prototype.___makeLayerResizeable=function(){this._resizableJustClick=!1,this.$layer.nextendResizable({handles:"n, e, s, w, ne, se, sw, nw",_containment:this.canvasManager.mainContainer.layer,start:t.proxy(this.____makeLayerResizeableStart,this),resize:t.proxy(this.____makeLayerResizeableResize,this),stop:t.proxy(this.____makeLayerResizeableStop,this),create:t.proxy(function(){this.$layer.find(".ui-resizable-handle, .n2-ss-layer-cc").on({mousedown:t.proxy(function(t){this._resizableJustClick=[t.clientX,t.clientY]},this),mouseup:t.proxy(function(e){if(this._resizableJustClick&&Math.abs(Math.sqrt(Math.pow(this._resizableJustClick[0]-e.clientX,2)+Math.pow(this._resizableJustClick[1]-e.clientY,2)))<1){var i=t(e.currentTarget),n=this.canvasManager.layerOptions.layerFeatures;i.hasClass("ui-resizable-nw")?(n.horizontalAlign("left",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-w")?(n.horizontalAlign("left",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-sw")?(n.horizontalAlign("left",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-n")?(n.horizontalAlign("center",!1),n.verticalAlign("top",!1)):i.hasClass("n2-ss-layer-cc")?(n.horizontalAlign("center",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-s")?(n.horizontalAlign("center",!1),n.verticalAlign("bottom",!1)):i.hasClass("ui-resizable-ne")?(n.horizontalAlign("right",!1),n.verticalAlign("top",!1)):i.hasClass("ui-resizable-e")?(n.horizontalAlign("right",!1),n.verticalAlign("middle",!1)):i.hasClass("ui-resizable-se")&&(n.horizontalAlign("right",!1),n.verticalAlign("bottom",!1))}this._resizableJustClick=!1},this)})},this),smartguides:t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),tolerance:5}).on({"mousedown.n2-ss-absolute":t.proxy(function(t){!this.layer.status!=e.ComponentAbstract.STATUS.LOCKED&&(i.positionDisplay.show("Canvas"),i.positionDisplay.update(t,"Canvas","W: "+parseInt(this.$layer.width())+"px<br />H: "+parseInt(this.$layer.height())+"px")),document.activeElement&&document.activeElement.blur()},this),"mouseup.n2-ss-absolute":t.proxy(function(t){i.positionDisplay.hide("Canvas")},this)})},r.prototype.____makeLayerResizeableStart=function(e,n){this.preventActivation=!0,this.resizableDeferred=t.Deferred(),this.canvasManager.layerWindow.hideWithDeferred(this.resizableDeferred),t("body").addClass("n2-ss-resize-layer"),this._resizableJustClick&&(this._resizableJustClick=!1),this.____makeLayerResizeableResize(e,n),i.positionDisplay.show("Canvas")},r.prototype.____makeLayerResizeableResize=function(t,e){i.positionDisplay.update(t,"Canvas","W: "+e.size.width+"px<br />H: "+e.size.height+"px"),this.triggerLayerResized()},r.prototype.____makeLayerResizeableStop=function(e,n){t("body").removeClass("n2-ss-resize-layer"),this.resizableDeferred.resolve();var r=!1;if("n"==n.axis||"s"==n.axis||n.originalSize.width==n.size.width){var s=this.layer.getProperty("width");this.layer.isDimensionPropertyAccepted(s)&&(r=!0,this._syncwidth())}var o=!1;if("e"==n.axis||"w"==n.axis||n.originalSize.height==n.size.height){var s=this.layer.getProperty("height");this.layer.isDimensionPropertyAccepted(s)&&(o=!0,this._syncheight())}var a=this.canvasManager.getResponsiveRatio("h"),l=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsivesize"))||(a=l=1);var h=null;r||(h=Math.round(n.size.width*(1/a)));var d=null;o||(d=Math.round(n.size.height*(1/l))),this._setPosition(null,null,n.position.left,n.position.top,h,d,!0),this.triggerLayerResized(),this.$layer.triggerHandler("LayerUnParent"),i.positionDisplay.hide("Canvas"),setTimeout(t.proxy(function(){this.preventActivation=!1},this),80)},r.prototype._setPosition=function(t,e,n,r,s,o,a){var l=this.layer.getMode();null===t&&(t=this.layer.getProperty("align")),null===e&&(e=this.layer.getProperty("valign")),null===n?n=this.layer.getProperty("left"):a&&(n=this.calculatePositionLeft(t,n)),null===r?r=this.layer.getProperty("top"):a&&(r=this.calculatePositionTop(e,r)),null===s&&(s=this.layer.getProperty("width")),null===o&&(o=this.layer.getProperty("height"));var h=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStorePosition",l]);h&&h.setValues({align:this.layer.getRawProperty("align"),valign:this.layer.getRawProperty("valign"),left:this.layer.getRawProperty("left"),top:this.layer.getRawProperty("top"),width:this.layer.getRawProperty("width"),height:this.layer.getRawProperty("height")},{align:t,valign:e,left:n,top:r,width:s,height:o}),i.history.off(),this.layer.store("width",s,!0,"layer"),this.layer.$.trigger("propertyChanged",["width",s]),this.layer.store("height",o,!0,"layer"),this.layer.$.trigger("propertyChanged",["height",o]),this.layer.store("align",t,!0,"layer"),this.layer.$.trigger("propertyChanged",["align",t]),this.layer.store("valign",e,!0,"layer"),this.layer.$.trigger("propertyChanged",["valign",e]),this.layer.store("left",n,!0,"layer"),this.layer.$.trigger("propertyChanged",["left",n]),this.layer.store("top",r,!0,"layer"),this.layer.$.trigger("propertyChanged",["top",r]),i.history.on()},r.prototype.historyStorePosition=function(t,e){this.layer.historyStore(t.align,"align",e),this.layer.historyStore(t.valign,"valign",e),this.layer.historyStore(t.width,"width",e),this.layer.historyStore(t.height,"height",e),this.layer.historyStore(t.left,"left",e),this.layer.historyStore(t.top,"top",e),this.triggerLayerResized()},r.prototype.calculatePositionLeft=function(t,e){var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={left:0,leftMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentalign")){case"right":r.left=s.left+n.width();break;case"center":r.left=s.left+n.width()/2;break;default:r.left=s.left}}else switch(n=this.$layer.parent(),t){case"center":r.left+=n.width()/2;break;case"right":r.left+=n.width()}var e;switch(t){case"left":e=-Math.round((r.left-e)*(1/i));break;case"center":e=-Math.round((r.left-e-this.$layer.width()/2)*(1/i));break;case"right":e=-Math.round((r.left-e-this.$layer.width())*(1/i))}return e},r.prototype.calculatePositionTop=function(t,e){var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1);var n=this.parent,r={top:0,topMultiplier:1};if(n&&n.is(":visible")){var s=n.position();switch(this.layer.getProperty("parentvalign")){case"bottom":r.top=s.top+n.height();break;case"middle":r.top=s.top+n.height()/2;break;default:r.top=s.top}}else switch(n=this.$layer.parent(),t){case"middle":r.top+=n.height()/2;break;case"bottom":r.top+=n.height()}var e;switch(t){case"top":e=-Math.round((r.top-e)*(1/i));break;case"middle":e=-Math.round((r.top-e-this.$layer.height()/2)*(1/i));break;case"bottom":e=-Math.round((r.top-e-this.$layer.height())*(1/i))}return e},r.prototype.moveX=function(t){this._setPosition(null,null,this.layer.getProperty("left")+t,null,null,null,!1)},r.prototype.moveY=function(t){this._setPosition(null,null,null,this.layer.getProperty("top")+t,null,null,!1)},r.prototype.setPositionLeft=function(t){t=this.calculatePositionLeft(this.layer.getProperty("align"),t),this.layer.store("left",t,!0),this.layer.$.trigger("propertyChanged",["left",t])},r.prototype.setPositionTop=function(t){t=this.calculatePositionTop(this.layer.getProperty("valign"),t),this.layer.store("top",t,!0),this.layer.$.trigger("propertyChanged",["top",t])},r.prototype.setPosition=function(t,e){this.setPositionLeft(t),this.setPositionTop(e)},r.prototype.setDeviceBasedAlign=function(){var t=this.layer.getMode();"undefined"==typeof this.layer.deviceProperty[t].align&&this.layer.setProperty("align",this.layer.getProperty("align"),"layer"),"undefined"==typeof this.layer.deviceProperty[t].valign&&this.layer.setProperty("valign",this.layer.getProperty("valign"),"layer")},r.prototype.setPropertyresponsiveposition=r.prototype.setPropertyresponsivesize=function(t,e,i){this.layer._setProperty(t,parseInt(e),i)},r.prototype.setPropertywidth=r.prototype.setPropertyheight=function(e,i,n){var r=i;this.layer.isDimensionPropertyAccepted(i)||(r=~~i,r!=i&&this.layer.$.trigger("propertyChanged",[e,r])),setTimeout(t.proxy(function(){this.onResize(!1)},this),50),this.layer._setProperty(e,r,n)},r.prototype.setPropertyleft=r.prototype.setPropertytop=function(t,e,i){var n=~~e;n!=e&&this.layer.$.trigger("propertyChanged",[t,n]),this.layer._setProperty(t,n,i)},r.prototype.render=function(t){this["_sync"+t]()},r.prototype.renderWithModifier=function(t,e,i){try{"width"!=t&&"height"!=t||!this.layer.isDimensionPropertyAccepted(e)?this["_sync"+t](Math.round(e*i)):this["_sync"+t](e)}catch(n){console.error("_sync"+t)}},r.prototype.onResize=function(t){this.resize({slideW:this.canvasManager.getResponsiveRatio("h"),slideH:this.canvasManager.getResponsiveRatio("v")},t)},r.prototype.resize=function(t,e){this.parent&&!e||this.addToResizeCollection(this,t,!1)},r.prototype.addToResizeCollection=function(t,e,i){o.ratios=e,o.isThrottled=i;for(var n=0;n<o.layers.length;n++)if(o.layers[n]==this){o.layers.splice(n,1);break}o.layers.push(t),a(),this.triggerLayerResized(i,e)},r.prototype._syncresponsiveposition=function(){this.onResize(!1)},r.prototype._syncwidth=function(){var t=this.layer.getProperty("width");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}t+="px"}this.$layer.css("width",t)},r.prototype._syncheight=function(){var t=this.layer.getProperty("height");if(!this.layer.isDimensionPropertyAccepted(t)){if(parseInt(this.layer.getProperty("responsivesize"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}t+="px"}this.$layer.css("height",t)},r.prototype._syncparentalign=function(){var t=this.layer.getProperty("parentalign");this.$layer.data("parentalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncparentvalign=function(){var t=this.layer.getProperty("parentvalign");this.$layer.data("parentvalign",t);var e=this.getParent();e&&e.placement.current.onResize(!1)},r.prototype._syncleft=function(){var t=this.layer.getProperty("left");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("h");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("align"),r=this.layer.getProperty("parentalign"),s=0;switch(r){case"right":s=i.left+this.parent.width();break;case"center":s=i.left+this.parent.width()/2;break;default:s=i.left}switch(n){case"right":this.$layer.css({left:"auto",right:this.$layer.parent().width()-s-t+"px"});break;case"center":this.$layer.css({left:s+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:s+t+"px",right:"auto"})}}else switch(this.layer.getProperty("align")){case"right":this.$layer.css({left:"auto",right:-t+"px"});break;case"center":this.$layer.css({left:this.$layer.parent().width()/2+t-this.$layer.width()/2+"px",right:"auto"});break;default:this.$layer.css({left:t+"px",right:"auto"})}this.triggerLayerResized()},r.prototype._synctop=function(){var t=this.layer.getProperty("top");if(parseInt(this.layer.getProperty("responsiveposition"))){var e=this.canvasManager.getResponsiveRatio("v");t*=e}if(this.parent&&this.parentIsVisible){var i=this.parent.position(),n=this.layer.getProperty("valign"),r=this.layer.getProperty("parentvalign"),s=0;switch(r){case"bottom":s=i.top+this.parent.height();break;case"middle":s=i.top+this.parent.height()/2;break;default:s=i.top}switch(n){case"bottom":this.$layer.css({top:"auto",bottom:this.$layer.parent().height()-s-t+"px"});break;case"middle":this.$layer.css({top:s+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:s+t+"px",bottom:"auto"})}}else switch(this.layer.getProperty("valign")){case"bottom":this.$layer.css({top:"auto",bottom:-t+"px"});break;case"middle":this.$layer.css({top:this.$layer.parent().height()/2+t-this.$layer.height()/2+"px",bottom:"auto"});break;default:this.$layer.css({top:t+"px",bottom:"auto"})}this.triggerLayerResized()},r.prototype._syncresponsivesize=function(){this.onResize(!1)},r.prototype.historyStoreDoubleProp=function(t,e,i,n){var r=this.layer.getMode();e==r?(this.layer._setProperty(i,t.value,"history"),this.layer._setProperty(n,t.value2,"history")):(this.layer.deviceProperty[e][i]=t.value,this.layer.deviceProperty[e][n]=t.value2,this.layer.$.trigger("propertyChanged",[i,this.layer.getProperty(i)]),this.layer.$.trigger("propertyChanged",[n,this.layer.getProperty(n)]),this.layer.render(i,null,"history"),this.layer.render(n,null,"history"))},r.prototype.setPropertyalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("left");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"align","left"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("left")})},r.prototype.setPropertyvalign=function(t,e,n){var r=this.layer.getProperty(t),s=this.layer.getRawProperty("top");i.history.off(),this.layer._setProperty(t,e,n),i.history.on();var o=i.history.addValue(this.layer,this.layer.historyStoreOnPlacement,["historyStoreDoubleProp",this.layer.getMode(),"valign","top"]);o&&o.setValues({value:r,value2:s},{value:e,value2:this.layer.getRawProperty("top")})},r.prototype._syncalign=function(t,e){var i=this.layer.getProperty("align");this.$layer.attr("data-align",i),"history"!=e&&i!=t&&this.setPositionLeft(this.$layer.position().left)},r.prototype._syncvalign=function(t,e){var i=this.layer.getProperty("valign");this.$layer.attr("data-valign",i),"history"!=e&&i!=t&&this.setPositionTop(this.$layer.position().top)},r.prototype.fit=function(){var t=this.$layer.get(0);this.$layer.position();if(t.scrollWidth>0&&t.scrollHeight>0){var e=!1;if(this.layer.item&&(e=this.layer.item.fitLayer()),!e){this.layer.setProperty("width","auto","layer"),this.layer.setProperty("height","auto","layer");var i=this.$layer.width();Math.abs(this.canvasManager.mainContainer.layer.width()-this.$layer.position().left-i)<2&&this.layer.setProperty("width",i,"layer")}}},r.prototype.hide=function(t){this.layer.store(t?t:this.layer.getMode(),0,!0)},r.prototype.show=function(t){this.layer.store(t?t:this.layer.getMode(),1,!0)},r.prototype.changeStatus=function(t,i){t==e.ComponentAbstract.STATUS.LOCKED&&this.layer.nextendResizable("enable"),i==e.ComponentAbstract.STATUS.LOCKED&&this.$layer.nextendResizable("disable")},r.prototype.getParent=function(){return t("#"+this.layer.getProperty("parentid")).data("layerObject")},r.prototype.subscribeParent=function(){var e=this,i=t("#"+this.layer.property.parentid);this.parent&&!i.is(this.parent)&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1),this.parent||(this.subscribeParentCallbacks={LayerResized:function(){e.resizeParent.apply(e,arguments)},LayerParent:function(){e.$layer.addClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerParent")},LayerUnParent:function(){e.$layer.removeClass("n2-ss-layer-parent"),e.$layer.triggerHandler("LayerUnParent")},LayerDeleted:function(t){e.layer.setProperty("parentid","","layer")},LayerUnavailable:function(t){e.layer.setProperty("parentid","","layer"),e.layer.setProperty("left",0,"layer"),e.layer.setProperty("top",0,"layer")},LayerShowChange:function(t,i,n){e.layer.getMode()==i&&(e.parentIsVisible=n)},"n2-ss-activate":function(){e.$layerRow.addClass("n2-parent-active")},"n2-ss-deactivate":function(){e.$layerRow.removeClass("n2-parent-active")},LayerGetDataWithChildren:function(t,i,n){e.layer.getDataWithChildren(i,n)}},this.parent=i.on(this.subscribeParentCallbacks),this.parent.data("layerObject").placement.current.addChild(this),this.$layer.addClass("n2-ss-layer-has-parent"))},r.prototype.unSubscribeParent=function(t){if(this.$layerRow.removeClass("n2-parent-active"),this.$layer.removeClass("n2-ss-layer-has-parent"),this.parent&&(this.parent.off(this.subscribeParentCallbacks),this.parent=!1,this.subscribeParentCallbacks={},"delete"!=t)){var e=this.$layer.position();this._setPosition(null,null,e.left,e.top,null,null,!0)}},r.prototype.addChild=function(t){
6
+ this.children.push(t)},r.prototype.removeChild=function(e){this.children.splice(t.inArray(e,this.children),1)},r.prototype.unlink=function(t){t&&t.preventDefault(),this.layer.setProperty("parentid","","layer")},r.prototype.parentPicked=function(t,e,i,n,r){this.layer.setProperty("parentid","","layer"),this.layer.setProperty("align",n,"layer"),this.layer.setProperty("valign",r,"layer"),this.layer.setProperty("parentalign",e,"layer"),this.layer.setProperty("parentvalign",i,"layer"),this.layer.setProperty("parentid",t.requestID(),"layer");var s;for(var o in this.layer.deviceProperty)"desktopPortrait"!=o&&(this.layer.deviceProperty[o].left=s,this.layer.deviceProperty[o].top=s,this.layer.deviceProperty[o].valign=s,this.layer.deviceProperty[o].align=s)},r.prototype._syncparentid=function(){var e=this.layer.getProperty("parentid");if(e&&""!=e)if(0==t("#"+e).length)this.layer.setProperty("parentid","","layer");else{this.$layer.attr("data-parentid",e).addClass("n2-ss-layer-has-parent"),this.subscribeParent();var i=this.$layer.position();this._setPosition(null,null,i.left,i.top,null,null,!0)}else this.$layer.removeAttr("data-parentid"),this.unSubscribeParent()},r.prototype.snap=function(){this.$layer.nextendResizable("option","smartguides",t.proxy(function(){return this.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this))},r.prototype._renderModeProperties=function(t){this.$layer.attr("data-align",this.layer.property.align),this.$layer.attr("data-valign",this.layer.property.valign),t&&this.onResize(!0)},r.prototype.doLinearResize=function(t){this.doThrottledTheResize(t,!0)},r.prototype.doTheResize=function(t,e,i){this.render("width"),this.render("height"),this.render("left"),this.render("top"),e||this.triggerLayerResized(i,t)},r.prototype.resizeParent=function(t,e,i){this.addToResizeCollection(this,e,i)},r.prototype.updatePosition=function(){var t=this.parent;if("center"==this.layer.getProperty("align")){var e=0;e=t?t.position().left+t.width()/2:this.$layer.parent().width()/2;var i=this.canvasManager.getResponsiveRatio("h");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("left",e-this.$layer.width()/2+this.layer.getProperty("left")*i)}if("middle"==this.layer.getProperty("valign")){var n=0;n=t?t.position().top+t.height()/2:this.$layer.parent().height()/2;var i=this.canvasManager.getResponsiveRatio("v");parseInt(this.layer.getProperty("responsiveposition"))||(i=1),this.$layer.css("top",n-this.$layer.height()/2+this.layer.getProperty("top")*i)}this.triggerLayerResized()},r.prototype.getIndex=function(){var t=parseInt(this.$layer.css("zIndex"));return isNaN(t)&&(t=0),t},r.prototype.renderIndex=function(t){},r.prototype.sync=function(){this._syncalign(null,"history"),this._syncvalign(null,"history"),this._syncwidth(),this._syncheight(),this._synctop(),this._syncleft(),this._syncparentid()},r.prototype["delete"]=function(){var t=this.layer.getProperty("parentid");t&&this.unSubscribeParent("delete")},r.prototype.isParentOrChild=function(){return this.parent||this.children.length>0},r}),N2Require("PlacementContent",["PlacementAbstract"],[],function(t,e,i){"use strict";function n(t,i,n){this.type="content",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(e.PlacementAbstract.prototype),n.prototype.constructor=n,n}),N2Require("PlacementDefault",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="default",e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.activated=function(t){this.startUISizing()},r.prototype.deActivated=function(t){this.$layer.nextendNormalSizing("destroy")},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this)})},r}),N2Require("PlacementNormal",["PlacementAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.type="normal",this.transferredProperties={},e.PlacementAbstract.prototype.constructor.apply(this,arguments)}return r.prototype=Object.create(e.PlacementAbstract.prototype),r.prototype.constructor=r,r.prototype.start=function(){this.$layer=this.layer.layer},r.prototype.preActivation=function(t){if("absolute"==t.type&&this.layer.item&&this.layer.item.needSize){var e=this.layer.getProperty("height");e.match&&e.match(/[0-9]+%$/)?this.transferredProperties.height=Math.max(100,parseInt(this.$layer.parent().height()*parseInt(e)/100)):e>0&&(this.transferredProperties.height=e)}},r.prototype.activated=function(e){this.loadProperties(t.extend(e,this.transferredProperties)),this.transferredProperties={},this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncmargin,this)),this.layer.$.on("baseSizeUpdated.placementnormal",t.proxy(this._syncheight,this)),this.startUISpacing(),this.startUISizing(),this.$layer.on({mousedown:t.proxy(function(t){t.stopPropagation()})})},r.prototype.loadProperties=function(t){this.layer.createDeviceProperty("margin",{desktopPortrait:"0|*|0|*|0|*|0|*|px+"},this.layer.layer,this),this.layer.createDeviceProperty("height",{desktopPortrait:t.height||0},this.layer.layer,this),this.layer.createDeviceProperty("maxwidth",{desktopPortrait:0},this.layer.layer,this),this.layer.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},this.layer.layer,this)},r.cleanLayer=function(t){var e=["desktopPortrait","desktopLandscape","tabletPortrait","tabletLandscape","mobilePortrait","mobileLandscape"];t.removeClass("n2-ss-has-maxwidth").removeAttr("data-cssselfalign").css({position:"",margin:"",height:"",maxWidth:""});for(var i=["margin","height","maxwidth","selfalign"],n={},r=0;r<i.length;r++){var s=i[r].toLowerCase();n[s]=t.data(s),t.removeAttr(s),t.removeData(s);for(var o=0;o<e.length;o++){var a=e[o].toLowerCase();n[s]=t.data(a+s),t.removeAttr(a+s),t.removeData(a+s)}}return n},r.prototype.deActivated=function(t){this.layer.$.off(".placementnormal"),this.$layer.nextendSpacing("destroy"),this.$layer.nextendNormalSizing("destroy"),this.layer.layer.removeClass("n2-ss-has-maxwidth"),this.layer.layer.removeAttr("data-cssselfalign");var e=["margin","height","maxwidth","selfalign"],i=this.layer.getPropertiesData(e);return this.layer.removeProperties(e),this.layer.layer.css({position:"",margin:"",height:"",maxWidth:""}),i},r.prototype._renderModeProperties=function(t){this._syncmargin(),this._syncheight(),this._syncmaxwidth(),this._syncselfalign()},r.prototype._syncmargin=function(){var t=this.layer.getProperty("margin").split("|*|"),e=t.pop(),i=this.layer.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var t=t.join(e+" ")+e;this.layer.layer.css("margin",t),this.layer.update(),this.$layer.nextendSpacing("option","current",t)},r.prototype.startUISpacing=function(){this.$layer.nextendSpacing({mode:"margin",sync:{n:"margin-top",e:"margin-right",s:"margin-bottom",w:"margin-left"},handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Margin "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.layer.getProperty("margin").split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.$layer.css("fontSize"))-this.layer.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.layer.setProperty("margin",r.join("|*|")),t("#layernormal-margin").data("field").insideChange(r.join("|*|"))},r.prototype.startUISizing=function(){var e=!1;this.layer.item&&this.layer.item.needSize&&(e=!0),this.$layer.nextendNormalSizing({height:e,syncWidth:!0,start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.layer.setProperty("maxwidth",e.value)},this),resizeHeight:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Height: "+e.value+"px")},this),stopHeight:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing");var n=1;parseInt(this.$layer.css("fontSize"))!=this.layer.baseSize&&(n=this.canvasManager.getResponsiveRatio("h"));var r=Math.round(r/n);this.layer.setProperty("height",e.value)},this)})},r.prototype._syncheight=function(){var t=parseInt(this.layer.getProperty("height"));if(t>0){var e="px",i=this.layer.baseSize;i>0&&(e="em",t=parseInt(t)/i),this.layer.layer.css("height",t+e)}else this.layer.layer.css("height","");this.layer.update()},r.prototype._syncmaxwidth=function(){var t=parseInt(this.layer.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.layer.update()},r.prototype._syncselfalign=function(){this.layer.layer.attr("data-cssselfalign",this.layer.getProperty("selfalign"))},r.prototype.sync=function(){this._syncmargin(),this._syncheight(),this._syncmaxwidth()},r}),N2Require("Placement",[],[],function(t,e,i){"use strict";function n(t){this.layer=t,this.canvasManager=t.canvasManager,this.modes={},this.current=null,this.isTransferHandled=!1,this.updatePositionThrottled=NextendDeBounce(this.updatePosition,200)}return n.prototype.allow=function(t){switch(t){case"absolute":this.modes.absolute=new e.PlacementAbsolute(this,this.layer,this.canvasManager);break;case"normal":this.modes.normal=new e.PlacementNormal(this,this.layer,this.canvasManager);break;case"group":this.modes.absolute=new e.PlacementGroup(this,this.layer,this.canvasManager);break;case"content":this.modes.absolute=new e.PlacementContent(this,this.layer,this.canvasManager);break;case"default":this.modes["default"]=new e.PlacementDefault(this,this.layer,this.canvasManager)}},n.prototype.start=function(){for(var t in this.modes)this.modes[t].start()},n.prototype.setMode=function(t,e){var i=!1;if(e=e||{},"undefined"==typeof this.modes[t])throw new Exception("Layer placement("+t+") not allowed for the container",this.layer);if(this.current!=this.modes[t]){var n;this.current&&(this.modes[t].preActivation(this.current),n=this.current.type,i=this.current.deActivated(this.modes[t])),this.current=this.modes[t],this.layer.layer.attr("data-pm",this.current.type),this.current.activated(e),this.layer.$.triggerHandler("placementChanged",[this.current.type,n])}return i},n.prototype.doAction=function(t){try{return this.current[t].apply(this.current,Array.prototype.slice.call(arguments,1))}catch(e){}},n.prototype.getType=function(){return this.current.type},n.prototype.onResize=function(t){"function"==typeof this.current.onResize&&this.current.onResize(t)},n.prototype.updatePosition=function(){this.current.updatePosition()},n.prototype.getIndex=function(){return this.current.getIndex()},n.prototype.renderIndex=function(t){return this.current.renderIndex(t)},n.prototype.doLinearResize=function(t){this.current.doLinearResize(t)},n.prototype.sync=function(){this.current.sync()},n.prototype.renderModeProperties=function(t){var e=this.layer.getProperty("fontsize");this.layer.adjustFontSize(this.layer.getProperty("adaptivefont"),e,!1),this.current._renderModeProperties(t)},n.prototype["delete"]=function(){this.current["delete"]()},n}),N2Require("PlacementAbstract",["Placement"],[],function(t,e,i){"use strict";function n(t,e,i){this.placement=t,this.layer=e,this.canvasManager=i}return n.prototype.start=function(){},n.prototype.preActivation=function(t){},n.prototype.activated=function(){},n.prototype.deActivated=function(t){return!1},n.prototype.updatePosition=function(){this.layer.group.update()},n.prototype._renderModeProperties=function(t){},n.prototype._hide=function(){},n.prototype._show=function(){},n.prototype.snap=function(){return!1},n.prototype.getIndex=function(){return this.layer.layer.index()},n.prototype.renderIndex=function(t){},n.prototype.doLinearResize=function(t){},n.prototype.sync=function(){},n.prototype["delete"]=function(){},n.prototype.triggerLayerResized=function(t,e){},n.prototype.changeStatus=function(t,e){},n}),N2Require("Item",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,i,r){this.type===n&&(this.type=e.data("item")),this.needSize=this.constructor.needSize,this.self=this,this.$item=e,this.layer=i,this.itemEditor=r,this.fonts=[],this.styles=[],this.needFill=[],this.values=this.$item.data("itemvalues"),"object"!=typeof this.values&&(this.values=t.parseJSON(this.values)),this.pre="div#"+nextend.smartSlider.frontend.sliderElement.attr("id")+" ",this.defaultValues=r.getItemForm(this.type).values,this.added(),this.$item.data("item",this),this.$item.appendTo(this.layer.getContent()),this.layer.item=this,0===this.$item.children().length&&this.layer.readyDeferred.done(t.proxy(this.reRender,this)),t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item),this.$item.find("a").on("click",function(t){t.preventDefault()}),t(window).trigger("ItemCreated")}return r.needSize=!1,r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!=this&&(this.self=this.self.getSelf()),this.self},r.prototype.changeValue=function(e,i){this==this.itemEditor.activeItem?t("#item_"+this.type+e).data("field").insideChange(i):this.values[e]=i},r.prototype.activate=function(t,e,i){this.itemEditor.setActiveItem(this,e,i)&&(nextend.basicCSS.activate("ss3item"+this.type,this.values,{font:this.fonts,style:this.styles}),this.itemEditor.lastValues[this.type]=this.values)},r.prototype.deActivate=function(){nextend.basicCSS.deActivate()},r.prototype.render=function(e,i){this.layer.layer.triggerHandler("itemRender"),this.$item.html(""),this.parseAll(e),this._render(e),this.itemEditor.lastValues[this.type]=this.values=i,t("<div/>").addClass("ui-helper ui-item-overlay").css("zIndex",89).appendTo(this.$item);var n=this.getName(e);n=n===!1||""==n||"Layer"==n?this.type:n.replace(/[<>]/gi,""),this.layer.rename(n,!1),this.layer.update(),this.$item.find("a").on("click",function(t){t.preventDefault()})},r.prototype._render=function(t){},r.prototype.reRender=function(e){this.values=t.extend({},this.getDefault(),this.values,e),this.render(t.extend({},this.values),this.values)},r.prototype["delete"]=function(){this.$item.trigger("mouseleave"),this.$item.remove(),this.itemEditor.activeItem==this&&(this.itemEditor.activeItem=null)},r.prototype.getHTML=function(e){var i="";return i=e?"["+this.type+' values="'+Base64.encode(JSON.stringify(this.values))+'"]':t('<div class="n2-ss-item n2-ss-item-'+this.type+'"></div>').attr("data-item",this.type).attr("data-itemvalues",JSON.stringify(this.values))},r.prototype.getData=function(){return{type:this.type,values:this.values}},r.prototype.getDefault=function(){return{}},r.prototype.added=function(){},r.prototype.addedFont=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.fonts.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.fontManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.addedStyle=function(e,i){var n=t("#item_"+this.type+i);n.length&&(this.styles.push({mode:e,name:i,field:n.data("field"),def:this.defaultValues[i]}),t.when(nextend.styleManager.addVisualUsage(e,this.values[i],this.pre)).done(t.proxy(function(t){t||this.changeValue(i,"")},this)))},r.prototype.parseAll=function(t){for(var e=0;e<this.fonts.length;e++)t[this.fonts[e].name+"class"]=nextend.fontManager.getClass(t[this.fonts[e].name],this.fonts[e].mode)+" ";for(var e=0;e<this.styles.length;e++)t[this.styles[e].name+"class"]=nextend.styleManager.getClass(t[this.styles[e].name],this.styles[e].mode)+" ";for(var e=0;e<this.needFill.length;e++)"undefined"!=typeof t[this.needFill[e]]&&(t[this.needFill[e]]=nextend.smartSlider.generator.fill(t[this.needFill[e]]+""))},r.prototype.getName=function(t){return"Layer"},r.prototype.resizeLayerToImage=function(e){var n=this.layer;t("<img/>").attr("src",e).on("load",function(){var t=i.frontend.dimensions.slide,e=this.width,r=this.height,s=t.width,o=t.height;e>0&&r>0&&(e>s&&(r=r*s/e,e=s),r>o&&(e=e*o/r,r=o),nextend.smartSlider.history.off(),n.setProperty("width",e),n.setProperty("height",r),nextend.smartSlider.history.on())})},r.prototype.fitLayer=function(t){return!1},r}),N2Require("ItemManager",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e,n){this.suppressChange=!1,this.activeItemOriginalData=null,this.canvasManager=e,this.lastValues={},this.startItems(),this.forms={},this.activeForm=!1,n.isUploadDisabled||i.frontend.sliderElement.fileupload({url:n.uploadUrl,pasteZone:!1,dropZone:i.frontend.sliderElement,dataType:"json",paramName:"image",add:function(t,e){e.formData={path:"/"+n.uploadDir},e.submit()},done:t.proxy(function(t,e){var i=e.result;if(i.data&&i.data.name){var n=this.createLayerItem(!1,{item:"image"});n.reRender({image:i.data.url}),n.activate(null,null,!0)}else NextendAjaxHelper.notification(i)},this),fail:function(t,e){NextendAjaxHelper.notification(e.jqXHR.responseJSON)},start:function(){NextendAjaxHelper.startLoading()},stop:function(){setTimeout(function(){NextendAjaxHelper.stopLoading()},100)}})}return r.prototype.setActiveItem=function(e,i,n){if(e!=this.activeItem||n){this.activeItemOriginalData=null;var r=e.type;this.activeForm&&this.activeForm.form.css("display","none"),this.activeItem&&this.activeItem.deActivate(),this.activeForm=this.getItemForm(r);var s=t.extend({},this.activeForm.values,e.values);this.activeItem=e,this.suppressChange=!0;for(var o in s){var a=t("#item_"+r+o).data("field");a&&a.insideChange(s[o])}return this.suppressChange=!1,this.activeForm.form.css("display","block"),this.focusFirst(i),!0}return!1},r.prototype.focusFirst=function(t){var e=this.activeForm.fields.eq(0).data("field");nextend.smartSlider.generator.isDynamicSlide()&&e.connectedField&&e.connectedField instanceof N2Classes.FormElementImage||this.activeForm.fields.eq(0).data("field").focus("undefined"!=typeof t&&t)},r.prototype.startItems=function(){t(".n2-ss-core-item").nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,distance:5,$layer:function(){return this.element.clone()},onCreate:t.proxy(function(t,e,n,r){switch(n.layer.type){case"content":case"col":i.history.startBatch();var s=this.createLayerItem(n.layer,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),n.layer.container.insertLayerAt(s.layer,r),s.layer.changeGroup(!1,n.layer),i.history.endBatch();break;case"row":var o=n.layer.createCol();n.layer.moveCol(o.getIndex(),r),i.history.startBatch();var s=this.createLayerItem(o,e.$layer.data(),"click");i.history.addControl("skipForwardUndos"),o.container.insertLayerAt(s.layer,0),s.layer.changeGroup(!1,o),i.history.endBatch();break;default:var a=nextend.smartSlider.$currentSlideElement.offset(),s=this.createLayerItem(this.canvasManager.mainContainer,e.$layer.data(),"click");s.layer.placement.current.setPosition(t.pageX-a.left-20,t.pageY-a.top-20)}},this),start:function(){t("#n2-ss-add-sidebar").removeClass("n2-active")}}).on("click",t.proxy(function(e){this.createLayerItem(this.canvasManager.mainContainer.getActiveGroup(),t(e.currentTarget).data(),"click")},this)),t("[data-itemshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-item="'+t(e.currentTarget).data("itemshortcut")+'"]').trigger(e)},this)}),t("[data-structureshortcut]").on({click:t.proxy(function(e){e.preventDefault(),t(".n2-ss-add-layer-button").trigger("click"),t("#n2-ss-layers-switcher > .n2-labels .n2-td").eq(1).trigger("click")},this),mousedown:t.proxy(function(e){t('.n2-ss-core-item[data-type="'+t(e.currentTarget).data("structureshortcut")+'"]').trigger(e)},this)})},r.prototype.createLayerItem=function(n,r,s,o){n=n||this.canvasManager.mainContainer.getActiveGroup();var a=r.item;if("structure"==a){var l=new e.Row(this.canvasManager,n,{});return l.create(r.type),l.hightlightStructure(),{layer:l}}var h=this.getItemForm(a),d=t("<div></div>").attr("data-item",a).data("itemvalues",t.extend(!0,{},h.values,this.getLastValues(a))).addClass("n2-ss-item n2-ss-item-"+a),l=this._createLayer(d,n,t.extend(t(".n2-ss-core-item-"+a).data("layerproperties"),o));return s&&"click"==s?setTimeout(function(){l.layer.trigger("mousedown",["create"]).trigger("mouseup",["create"]).trigger("click",["create"])},500):l.activate(),i.layerWindow.switchTab("item"),i.history.addSimple(this,this.historyDelete,this.historyCreate,[n,l,r]),l.item},r.prototype.getLastValues=function(t){return this.lastValues[t]!==n?this.lastValues[t]:{}},r.prototype.getItemClass=function(t){var i="Item"+t.capitalize();return"undefined"==typeof e[i]?"Item":i},r.prototype._createLayer=function(t,i,n){var r=this.canvasManager.layerOptions.layerFeatures.layerDefault;for(var s in r)null!==r[s]&&(n[s]=r[s]);var o=new e.Layer(this.canvasManager,i,n);return o.create(function(e){return e._createLayer().append(t)}),o},r.prototype.getItemForm=function(e){if(this.forms[e]===n){var i=t("#smartslider-slide-toolbox-item-type-"+e),r={form:i,values:i.data("itemvalues"),fields:i.find('[name^="item_'+e+'"]'),fieldNameRegexp:new RegExp("item_"+e+"\\[(.*?)\\]","")};r.fields.on({nextendChange:t.proxy(this.updateCurrentItem,this),keydown:t.proxy(this.updateCurrentItemDeBounced,this)}),this.forms[e]=r}return this.forms[e]},r.prototype.updateCurrentItem=function(e){if(!this.suppressChange){null===this.activeItemOriginalData&&(this.activeItemOriginalData=t.extend({},this.activeItem.values));var n={},r={};if(this.activeForm.fields.each(t.proxy(function(e,i){var i=t(i),s=i.attr("name").match(this.activeForm.fieldNameRegexp)[1];r[s]=n[s]=i.val()},this)),e&&"nextendChange"==e.type){var s=i.history.addValue(this,this.historyUpdateCurrentItem,[this.activeItem]);s&&s.setValues(this.activeItemOriginalData,t.extend({},r)),this.activeItemOriginalData=null}this.activeItem.render(t.extend({},this.activeItem.getDefault(),n),r)}},r.prototype.historyUpdateCurrentItem=function(e,i){var n=i.getSelf();n.reRender(t.extend(!0,{},e)),n.values=e,this.activeItem==n&&n.activate(null,null,!0)},r.prototype.updateCurrentItemDeBounced=NextendDeBounce(function(t){this.updateCurrentItem(t)},100),r.prototype.historyDelete=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreate=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.historyCreateStructure=function(t,e,i){var n=this.createLayerItem(t.getSelf(),i);e.setSelf(n.layer)},r.prototype.getSelf=function(){return this},r}),N2Require("PluginActivatable",[],[],function(t,e,i){"use strict";function n(){this.isActive=!1,this.preventActivation=!1}return n.prototype.activate=function(t,e,i){return this.preventActivation?!1:(document.activeElement&&document.activeElement.blur(),t&&(t.ctrlKey||t.metaKey)&&this.canvasManager.mainContainer.getSelectedLayer()?!this.select():t&&3==t.which&&this.canvasManager.selectMode?!1:(i||this.canvasManager.exitSelectMode(),t&&this.positionSidebar(),this.canvasManager.mainContainer.getSelectedLayer()!==this&&(this.layerRow.addClass("n2-active"),this.layer.addClass("n2-active"),this.layer.triggerHandler("n2-ss-activate"),this.canvasManager.changeActiveLayer(this,i),nextend.activeLayer=this.layer,this.canvasManager.ui.onActivateLayer(this)),this.isActive=!0,!0))},n.prototype.deActivate=function(){this.isActive=!1,this.layer===i&&console.error(),this.layer.removeClass("n2-active"),this.layerRow.removeClass("n2-active"),this.layer.triggerHandler("n2-ss-deactivate")},n}),N2Require("PluginEditableName",[],[],function(t,e,i){"use strict";function n(){}var r=300,s=null;return n.prototype.addProperties=function(t){this.createProperty("name",this.label,t),this.createProperty("nameSynced",1,t)},n.prototype.makeNameEditable=function(){this.layerTitleSpan.on({mouseup:t.proxy(function(e){s?(clearTimeout(s),s=null,this.editName()):(this.activate(e),s=setTimeout(t.proxy(function(){s=null},this),r))},this)})},n.prototype.editName=function(){var i=new e.InlineField;i.$input.on({valueChanged:t.proxy(function(t,e){this.rename(e,!0),this.layerTitleSpan.css("display","inline")},this),cancel:t.proxy(function(){this.layerTitleSpan.css("display","inline")},this)}),this.layerTitleSpan.css("display","none"),i.injectNode(this.layerTitle,this.property.name)},n.prototype.rename=function(t,e){if(this.property.nameSynced||e){if(e&&(this.property.nameSynced=0),""==t){if(e)return this.property.nameSynced=1,this.item.reRender(),!1;t="Layer #"+(this.group.getLayerCount()+1)}t=t.substr(0,35),this.property.name!=t&&(this.property.name=t,this.layerTitleSpan.html(t),this.$.trigger("layerRenamed",t))}},n}),N2Require("PluginShowOn",[],["smartSlider"],function(t,e,i,n){"use strict";function r(){}return r.prototype.addProperties=function(t){this.showsOnCurrent=!0,this.createProperty("generatorvisible","",t),this.createProperty("desktopPortrait",1,t),this.createProperty("desktopLandscape",1,t),this.createProperty("tabletPortrait",1,t),this.createProperty("tabletLandscape",1,t),this.createProperty("mobilePortrait",1,t),this.createProperty("mobileLandscape",1,t)},r.prototype._hide=function(){this.layer.css("display","none"),this.showsOnCurrent=!1,this.update()},r.prototype._show=function(){parseInt(this.property[this.canvasManager.getMode()])&&(this.layer.css("display",""),this.showsOnCurrent=!0),this.update()},r.prototype._syncdesktopPortrait=function(){var t=this.getProperty("desktopPortrait");this.__syncShowOnDevice("desktopPortrait",t)},r.prototype._syncdesktopLandscape=function(){var t=this.getProperty("desktopLandscape");this.__syncShowOnDevice("desktopLandscape",t)},r.prototype._synctabletPortrait=function(){var t=this.getProperty("tabletPortrait");this.__syncShowOnDevice("tabletPortrait",t)},r.prototype._synctabletLandscape=function(){var t=this.getProperty("tabletLandscape");this.__syncShowOnDevice("tabletLandscape",t)},r.prototype._syncmobilePortrait=function(){var t=this.getProperty("mobilePortrait");this.__syncShowOnDevice("mobilePortrait",t)},r.prototype._syncmobileLandscape=function(){var t=this.getProperty("mobileLandscape");this.__syncShowOnDevice("mobileLandscape",t)},r.prototype.__syncShowOnDevice=function(t,e){if(this.getMode()==t){var e=parseInt(e);e?this._show():this._hide(),this.layer.triggerHandler("LayerShowChange",[t,e]),this.placement.doAction("triggerLayerResized")}},r}),N2Require("Col",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(t,i,n){this.label="Col",this.type="col",this.innerContainer="> .n2-ss-layer-col",e.ContentAbstract.prototype.constructor.call(this,t,i,n),this.placement.allow("default")}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-content n2-ss-layer-col"></div></div>').attr("data-type",this.type)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createProperty("colwidth","1",t),this.createProperty("link","#|*|_self",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("borderwidth","1|*|1|*|1|*|1",t),this.createProperty("borderstyle","none",t),this.createProperty("bordercolor","ffffffff",t),this.createDeviceProperty("order",{desktopPortrait:0},t)},r.prototype.create=function(){e.ContentAbstract.prototype.create.call(this),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncorder(),this._syncborder(),this._syncborderradius(),this._syncboxshadow(),this._onReady();var i=t.data("rowcolumns")+"";if(i!=n&&"resolved"==this.group.readyDeferred.state()){for(var r=i.split("+"),s=0;s<r.length;s++)r[s]=new Fraction(r[s]);this.group.setColsWidth(r)}},r.prototype.createRow=function(){this.$content=this.layer.find(".n2-ss-layer-content:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content);var i=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));this._createLayerListRow([t('<div class="n2-actions"></div>').append(n).append(i)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype._start=function(t){e.ContentAbstract.prototype._start.call(this,t),t&&this.highlight(2e3)},r.prototype.getRealOrder=function(){var t=this.getProperty("order");return 0==t?10:t},r.prototype._syncorder=function(){var t=this.getProperty("order");0==t?this.layer.css("order",""):this.layer.css("order",t),this.group.refreshUI()},r.prototype._synccolwidth=function(){this.layer.css("width",100*new Fraction(this.getProperty("colwidth")).valueOf()+"%"),this.group.refreshUI()},r.prototype._synclink=function(){},r.prototype._syncborderradius=function(){this.$content.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncborderwidth=r.prototype._syncbordercolor=r.prototype._syncborderstyle=function(){this._syncborder()},r.prototype._syncborder=function(){var t=this.getProperty("borderstyle");if("none"!=t){this.$content.css("border-color",N2Color.hex2rgbaCSS(this.getProperty("bordercolor"))),this.$content.css("border-style",this.getProperty("borderstyle"));var e=this.getProperty("borderwidth").split("|*|"),i="px";this.$content.css("border-width",e.join(i+" ")+i)}else this.$content.css("border","");this.update()},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$content.css("box-shadow",""):this.$content.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype["delete"]=function(){this.group.container.getLayerCount()>1?this._delete():this.group["delete"]()},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t);return i.attr("data-rowcolumns",this.group.getColumns()),i},r.prototype.renderModeProperties=function(t){this._syncorder(),e.ContentAbstract.prototype.renderModeProperties.call(this,t);
7
+ },r.prototype.update=function(){this.group._syncwrapafter(),e.ComponentAbstract.prototype.update.call(this)},r});var dependencies=["LayerDataStorage","PluginEditableName"];N2Require("ComponentAbstract",dependencies,["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,o){this.wraps={},this.counter=s++,window.layers[this.counter]=this,this.self=this,this.originalProperties=o||{},e.LayerDataStorage.prototype.constructor.call(this),this.readyDeferred=t.Deferred(),this.readyDeferred.done(t.proxy(this.onReady,this)),this.isDeleteStarted=!1,this.isDeleted=!1,this._lastClasses=!1,this.$=t(this),this.proxyRefreshBaseSize=t.proxy(this.refreshBaseSize,this),this.status=r.STATUS.UNDEFINED,this.canvasManager=i,this.group=n,e.PluginActivatable.prototype.constructor.call(this),this.placement=new e.Placement(this),this.readyDeferred.done(t.proxy(this.addUILabels,this))}var s=0;window.layers=[],r.STATUS={UNDEFINED:0,NORMAL:1,LOCKED:2,HIDDEN:3},r.STATUS_INV={0:"UNDEFINED",1:"NORMAL",2:"LOCKED",3:"HIDDEN"};for(var o in e.PluginActivatable.prototype)r.prototype[o]=e.PluginActivatable.prototype[o];for(var o in e.LayerDataStorage.prototype)r.prototype[o]=e.LayerDataStorage.prototype[o];for(var o in e.PluginEditableName.prototype)r.prototype[o]=e.PluginEditableName.prototype[o];for(var o in e.PluginShowOn.prototype)r.prototype[o]=e.PluginShowOn.prototype[o];return r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer),nextend.tooltip.addElement(t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-up n2-ss-layer-ui-label-action"><i class="n2-i n2-i-uplevel"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(t){this.up(t)},this)}).appendTo(this.uiLabel),"Select parent"),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-duplicate"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this.duplicate()},this)}).appendTo(this.uiLabel),t('<div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-action"><i class="n2-i n2-i-mini-trash"/></div>').on({mousedown:function(t){t.stopPropagation()},click:t.proxy(function(){this["delete"]()},this)}).appendTo(this.uiLabel)},r.prototype.getUILabel=function(){return this.label},r.prototype.up=function(t){t.stopImmediatePropagation(),this.group.activate(t)},r.prototype.addProperties=function(t){this.createProperty("id",null,t,this),this.createProperty("class","",t),this.createProperty("crop","visible",t),this.createProperty("rotation",0,t),this.createProperty("parallax",0,t),this.createProperty("adaptivefont",0,t),this.createDeviceProperty("fontsize",{desktopPortrait:100},t),e.PluginShowOn.prototype.addProperties.call(this,t),e.PluginEditableName.prototype.addProperties.call(this,t)},r.prototype.getRootElement=function(){return this.layer},r.prototype.create=function(t,e){e=e||!1,e||this.addProperties(!1),"function"==typeof t?this.layer=t.call(null,this):this.layer=this._createLayer(),this.layer.addClass("n2-ss-layer-under-creation"),e&&this.addProperties(this.layer),this.layer.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.group.container.insert(this),this.group.onChildCountChange(),this.$.triggerHandler("create"),this._start(!0)},r.prototype.load=function(t){this.addProperties(t),this.layer=t.data("layerObject",this),this.layer.triggerHandler("layerStarted",[this]),this.$.triggerHandler("load"),this._start(!1);var e=t.data("status");null!==e&&"undefined"!=typeof e?this.changeStatus(e):this.changeStatus(r.STATUS.NORMAL)},r.prototype._start=function(e){this.createRow();var i=this.layer.find("> .n2-ss-layer-mask");i.length&&(this.wraps.mask=i),this._synccrop(),this._syncrotation(),this.placement.start(),this.placement.setMode(this.group.container.allowedPlacementMode,this.originalProperties),this.setGroup(this.group),this.canvasManager.$.triggerHandler("layerCreated",this),e&&(this.refreshBaseSize(),this.$.triggerHandler("created")),setTimeout(t.proxy(function(){this.isDeleted||(this.placement.onResize(!0),this.layer.css("visibility",""),this.layer.removeClass("n2-ss-layer-under-creation"))},this),300)},r.prototype._onReady=function(){this.originalProperties={},this.readyDeferred.resolve(),this.layer.on({mouseover:t.proxy(this.markOver,this),mouseout:t.proxy(this.markOut,this)})},r.prototype.isReady=function(){return"resolved"==this.readyDeferred.state()},r.prototype.getName=function(){return this.property.name},r.prototype.setGroup=function(t){this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=t,this.placement.setMode(t.container.allowedPlacementMode),t.container.syncLayerRow(this),this.isReady()&&this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize)},r.prototype.changeGroup=function(t,e){var i=this.group;i.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=e;var n=this.placement.setMode(e.container.allowedPlacementMode);e.container.syncLayerRow(this),this.refreshBaseSize(),e.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),this.userGroupChange(i,t,n,e,this.getIndex()),i.update()},r.prototype.userGroupChange=function(t,e,n,r,s){if(t==r)this.userIndexChange(e,s);else{var o=i.history.addValue(this,this.historyUserGroupChange,[]);o&&o.setValues({historyGroup:t,index:e,placementData:n},{historyGroup:r,index:s})}},r.prototype.historyUserGroupChange=function(t){var e=this.group,i=t.historyGroup.getSelf(),n=t.index;i.container.insertLayerAt(this,n),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.group=i,t.placementData&&this.layer.data(t.placementData),this.placement.setMode(i.container.allowedPlacementMode),i.container.syncLayerRow(this),this.refreshBaseSize(),this.group.$.on("baseSizeUpdated",this.proxyRefreshBaseSize),i.onChildCountChange(),t.placementData&&this.placement.sync(),e.update()},r.prototype.userIndexChange=function(t,e){var n=i.history.addValue(this,this.historyUserIndexChange);n&&n.setValues(t,e),this.group.container.insertLayerAt(this,e)},r.prototype.historyUserIndexChange=function(t){this.group.container.insertLayerAt(this,t)},r.prototype._createLayerListRow=function(e){return this.layerRow=t('<li class="n2-ss-layerlist-row"></li>').data("layer",this).on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerRowClicked")}).appendTo(this.group.container.$ul),this.layerTitleSpan=t('<span class="n2-ucf">'+this.property.name+"</span>"),this.makeNameEditable(),this.layerTitle=t('<div class="n2-ss-layer-title"></div>').on({mouseenter:t.proxy(function(){this.canvasManager.highlight(this)},this),mouseleave:t.proxy(function(){this.canvasManager.deHighlight(this)},this)}).append(this.layerTitleSpan).append(e).appendTo(this.layerRow).on({mouseup:t.proxy(function(t){nextend.shouldPreventMouseUp||"DIV"!==t.target.tagName||this.activate(t)},this)}),nextend.tooltip.add(this.layerRow),this.layerRow.nextendLayerListItem({UIManager:this.canvasManager.mainContainer.layerListUIManager,layer:this,$item:this.layerRow}),this.layerRow},r.prototype.select=function(t){return this.canvasManager.selectLayer(this,!0)},r.prototype.update=function(){this.readyDeferred.done(t.proxy(this.placement.updatePositionThrottled,this.placement))},r.prototype.updateThrottled=function(){this.placement.updatePositionThrottled()},r.prototype.positionSidebar=function(){this.canvasManager.layerWindow.show(this,this.layer)},r.prototype.showEditor=function(){this.canvasManager.layerWindow._show()},r.prototype.highlight=function(e){e=e||2e3,this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),this.layer.addClass("n2-highlight"),this.isHighlighted=setTimeout(t.proxy(function(){this.layer.removeClass("n2-highlight")},this),e)},r.prototype.setPropertydesktopPortrait=r.prototype.setPropertydesktopLandscape=r.prototype.setPropertytabletPortrait=r.prototype.setPropertytabletLandscape=r.prototype.setPropertymobilePortrait=r.prototype.setPropertymobileLandscape=function(t,e,i){this._setProperty(t,parseInt(e),i)},r.prototype.getHTML=function(t){var i=this._createLayer();for(var r in this.property)"width"!=r&&"height"!=r&&"left"!=r&&"top"!=r&&i.attr("data-"+r.toLowerCase(),this.property[r]);for(var r in this.deviceProperty)for(var s in this.deviceProperty[r])i.attr("data-"+r.toLowerCase()+s,this.deviceProperty[r][s]);for(var r in this.deviceProperty.desktop)i.css(r,this.deviceProperty.desktop[r]+"px");if(this.container!=n){var o=i;this.innerContainer!=n&&(o=i.find(this.innerContainer)),o.append(this.container.getHTML(t))}var a=this.getProperty("id");return a&&""!=a&&i.attr("id",a),this.status>e.ComponentAbstract.STATUS.NORMAL&&i.attr("data-status",this.status),i},r.prototype.duplicate=function(e){var n=this.getHTML(!1);if("absolute"==this.placement.getType()){var r=n.attr("id");r&&(r=t.fn.uid(),n.attr("id",r),n.attr("data-id",r)),n.attr("data-parentid")?(n.data("desktopportraittop",0),n.data("desktopportraitleft",0)):(n.data("desktopportraittop",n.data("desktopportraittop")+40),n.data("desktopportraitleft",n.data("desktopportraitleft")+40)),n.attr("data-parentid","")}var s=this.canvasManager.insertComponentWithNode(this.group,n,this.getIndex()+1,!1,!0);return this.layerRow.trigger("mouseleave"),e&&s.activate(),i.history.addSimple(this,this.historyDeleteDuplicated,this.historyDuplicate,[s,s.container?s.container.getAllLayers():!1]),s},r.prototype.historyDeleteDuplicated=function(t){t.getSelf()["delete"]()},r.prototype.historyDuplicate=function(t,e){var i=this.duplicate(!1,!1);if(t.setSelf(i),e)for(var n=i.container.getAllLayers(),r=0;r<n.length;r++)e[r].setSelf(n[r])},r.prototype.historyDelete=function(){this["delete"]()},r.prototype.historyRestore=function(t,e,i,n){var r=this.canvasManager.insertComponentWithNode(this.group.getSelf(),t.clone(),i,!1,!0);if(this.setSelf(r),n)for(var s=r.container.getAllLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype["delete"]=function(){i.positionDisplay.hide(),nextend.tooltip.onLeave(),this._delete()},r.prototype._delete=function(){if(this.isDeleteStarted=!0,this.canvasManager.mainContainer.getSelectedLayer()==this&&this.canvasManager.layerWindow.hide(),this.isHighlighted&&(clearTimeout(this.isHighlighted),this.isHighlighted=!1),i.history.startBatch(),i.history.addSimple(this,this.historyRestore,this.historyDelete,[this.getHTML(!1),this.group,this.getIndex(),this.container?this.container.getAllLayers():!1]),this.deActivate(),this.container!=n){i.history.off();for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._delete();i.history.on()}i.history.endBatch(),this.item!=n&&this.item["delete"](),this.placement["delete"](),this.layer.trigger("mouseup"),this.isDeleted=!0,this.canvasManager.mainContainer.layerDeleted(this),this.layer.triggerHandler("LayerDeleted"),this.getRootElement().remove(),this.layerRow.remove(),this.group.update(),this.group.$.off("baseSizeUpdated",this.proxyRefreshBaseSize),this.$.trigger("layerDeleted"),this.markTimer&&clearTimeout(this.markTimer),delete this.layer,delete this.itemEditor,this.group.onChildCountChange()},r.prototype.getData=function(i){var n={type:this.type,lastplacement:this.placement.getType()};this.status>e.ComponentAbstract.STATUS.NORMAL&&(n.status=this.status);var r=t.extend({},this.property);for(var s in this.deviceProperty)for(var o in this.deviceProperty[s]){delete r[o];var a=this.deviceProperty[s][o];if("undefined"!=typeof a){switch(o){case"width":case"height":this.isDimensionPropertyAccepted(a)||(a=parseFloat(a));break;case"fontsize":case"left":case"top":case"gutter":case"wrap":a=parseFloat(a)}n[s.toLowerCase()+o]=a}}for(var l in r)n[l.toLowerCase()]=r[l];return n},r.prototype.onChildCountChange=function(){},r.prototype.getDataWithChildren=function(e,i){return-1==t.inArray(this,i)&&(i.push(this),e.push(this.getData({layersIncluded:!0,itemsIncluded:!0})),this.layer.triggerHandler("LayerGetDataWithChildren",[e,i])),e},r.prototype.markOver=function(t){this.layer.addClass("n2-ss-mouse-over"),t.stopPropagation(),this.group.markEnter(),this.markTimer&&clearTimeout(this.markTimer),this.layer.addClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible")},r.prototype.markOut=function(e){this.layer.removeClass("n2-ss-mouse-over"),e&&e.stopPropagation(),this.group.markLeave(),this.markTimer&&clearTimeout(this.markTimer),this.isActive||this.uiLabel.addClass("invisible"),this.markTimer=setTimeout(t.proxy(function(){this.layer.removeClass("n2-ss-mouse-over-delayed"),this.uiLabel.removeClass("invisible"),this.markTimer=null},this),10)},r.prototype.markEnter=function(t){this.layer.addClass("n2-ss-mouse-hover"),this.group.markEnter()},r.prototype.markLeave=function(t){this.layer.removeClass("n2-ss-mouse-hover"),this.group.markLeave()},r.prototype.formSetname=function(t,e){},r.prototype.formSetnameSynced=function(t,e){},r.prototype.formSetdesktopPortrait=function(t,e){t.currentForm.desktopPortrait.data("field").insideChange(e)},r.prototype.formSetdesktopLandscape=function(t,e){t.currentForm.desktopLandscape.data("field").insideChange(e)},r.prototype.formSettabletPortrait=function(t,e){t.currentForm.tabletPortrait.data("field").insideChange(e)},r.prototype.formSettabletLandscape=function(t,e){t.currentForm.tabletLandscape.data("field").insideChange(e)},r.prototype.formSetmobilePortrait=function(t,e){t.currentForm.mobilePortrait.data("field").insideChange(e)},r.prototype.formSetmobileLandscape=function(t,e){t.currentForm.mobileLandscape.data("field").insideChange(e)},r.prototype.sync=function(){if(this._syncid(),this.container)for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e].sync();this.placement.sync()},r.prototype._syncid=function(){var t=this.getProperty("id");t&&""!=t?this.layer.attr("id",t):this.layer.removeAttr("id")},r.prototype.requestID=function(){var e=this.getProperty("id");return e||(e=t.fn.uid(),this.setProperty("id",e,"layer")),e},r.prototype._syncfontsize=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype._syncadaptivefont=function(){this.adjustFontSize(this.getProperty("adaptivefont"),this.getProperty("fontsize"),!0)},r.prototype.adjustFontSize=function(t,e,i){e=parseInt(e),parseInt(t)?this.layer.css("font-size",16*e/100+"px"):100!=e?this.layer.css("font-size",e+"%"):this.layer.css("font-size",""),this.refreshBaseSize(),i&&this.update()},r.prototype.refreshBaseSize=function(){var t=this.getFontSize();this.isAdaptiveFont()?this.baseSize=16*t/100:this.baseSize=this.group.baseSize*t/100,this.$.triggerHandler("baseSizeUpdated")},r.prototype.getFontSize=function(){return parseInt(this.getProperty("fontsize"))},r.prototype.isAdaptiveFont=function(){return parseInt(this.getProperty("adaptivefont"))},r.prototype._synccrop=function(){var t=this.getProperty("crop");"auto"==t&&(t="hidden"),"mask"==t?(t="hidden",this.addWrap("mask","<div class='n2-ss-layer-mask'></div>")):(this.removeWrap("mask"),this.layer.data("animatableselector",null)),this.layer.css("overflow",t)},r.prototype._syncrotation=function(){var t=parseFloat(this.getProperty("rotation"));if(t/360!=0){var e=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(e[0],{rotationZ:t})}else this.removeWrap("rotation")},r.prototype.addWrap=function(e,i){if(this.wraps[e]===n){var r=t(i);switch(this.wraps[e]=r,e){case"mask":r.appendTo(this.layer),this.wraps.rotation!==n?r.append(this.wraps.rotation):r.append(this.getContents()),this.layer.data("animatableselector",".n2-ss-layer-mask:first");break;case"rotation":this.wraps.mask!==n?r.appendTo(this.wraps.mask):r.appendTo(this.layer),r.append(this.getContents())}}return this.wraps[e]},r.prototype.removeWrap=function(t){if(this.wraps[t]!==n){switch(t){case"mask":this.wraps.rotation!==n?this.layer.append(this.wraps.rotation):this.layer.append(this.getContents());break;case"rotation":this.wraps.mask!==n?this.wraps.mask.append(this.getContents()):this.layer.append(this.getContents())}this.wraps[t].remove(),delete this.wraps[t]}},r.prototype.getContents=function(){return!1},r.prototype._syncclass=function(){this._lastClasses!==!1&&this.layer.removeClass(this._lastClasses);var t=this.getProperty("class");t&&""!=t?(this.layer.addClass(t),this._lastClasses=t):this._lastClasses=!1},r.prototype._syncparallax=function(){},r.prototype._syncgeneratorvisible=function(){},r.prototype._syncmouseenter=r.prototype._syncclick=r.prototype._syncmouseleave=r.prototype._syncplay=r.prototype._syncpause=r.prototype._syncstop=function(){},r.prototype.renderModeProperties=function(t){e.LayerDataStorage.prototype.renderModeProperties.call(this),this.placement.renderModeProperties(t)},r.prototype.getIndex=function(){return this.group.container.getLayerIndex(this.layer)},r.prototype.toString=function(){return this.type+" #"+this.counter},r.prototype.setSelf=function(t){t===n&&console.error(t),this.self!=this&&this.self.setSelf(t),this.self=t},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r.prototype.historyStoreOnPlacement=function(){var t=Array.prototype.slice.call(arguments);t.splice(1,1),this.placement.current[arguments[1]].apply(this.placement.current,t)},r.prototype.getDroppable=function(){return!1},r.prototype.onCanvasUpdate=function(t,e,i){if(this.group==e)t!=i&&this.userIndexChange(t,i);else{var n;if(this.canvasManager.isCol(this.group))for(n=this;n&&(!n.placement||"absolute"!==n.placement.getType());)n=n.group;this.changeGroup(t,e),e.onChildCountChange();for(var r=this;r&&(!r.placement||"absolute"!==r.placement.getType());)r=r.group;n&&n!=r&&n.placement.updatePosition(),r&&r.placement.updatePosition()}},r.prototype.setStatusNormal=function(){this.changeStatus(r.STATUS.NORMAL)},r.prototype.changeStatus=function(t){var e=this.status;switch(t==this.status&&(t=r.STATUS.NORMAL),this.status){case r.STATUS.HIDDEN:this.getRootElement().removeAttr("data-visibility"),this.layerRow.removeClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.removeClass("n2-ss-layer-locked"),this.layerRow.removeClass("n2-ss-layer-status-locked")}switch(this.status=t,this.status){case r.STATUS.HIDDEN:this.getRootElement().attr("data-visibility","hidden"),this.layerRow.addClass("n2-ss-layer-status-hidden");break;case r.STATUS.LOCKED:this.layer.addClass("n2-ss-layer-locked"),this.layerRow.addClass("n2-ss-layer-status-locked")}this.placement.current.changeStatus(e,this.status)},r.prototype.moveX=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveX(t)},r.prototype.moveY=function(t){"absolute"==this.placement.getType()&&this.placement.current.moveY(t)},r}),N2Require("Content",["ContentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Content"),this.type="content",this.innerContainer="> .n2-ss-layer-content",this._defaults=t.extend({verticalalign:"center"},this._defaults),e.ContentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("content"),i.setMainContent(this)}return r.prototype=Object.create(e.ContentAbstract.prototype),r.prototype.constructor=r,r.prototype.addUILabels=function(){this.markTimer=null,this.uiLabel=t('<div class="n2-ss-layer-ui-label-container"><div class="n2-ss-layer-ui-label n2-ss-layer-ui-label-self">'+this.getUILabel()+"</div></div>").appendTo(this.layer)},r.prototype.addProperties=function(t){e.ContentAbstract.prototype.addProperties.call(this,t),this.createDeviceProperty("selfalign",{desktopPortrait:"inherit"},t)},r.prototype.getRootElement=function(){return this.$outerSection},r.prototype.getBackgroundElement=function(){return this.$outerSection},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer n2-ss-content-empty"><div class="n2-ss-section-main-content n2-ss-layer-content"></div></div>').attr("data-type",this.type)},r.prototype.createRow=function(){this.$outerSection=this.layer.parent(),this.$outerSection.hasClass("n2-ss-section-outer")||(this.$outerSection=t('<div class="n2-ss-section-outer"></div>').insertAfter(this.layer).append(this.layer)),this.$outerSection.data("layerObject",this),this.$content=this.layer.find(".n2-ss-layer-content:first");var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this));this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"normal","> .n2-ss-layer",["row","layer"]),this.container.setLayerContainerElement(this.$content),t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(n)]).addClass("n2-ss-layer-content-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-col"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.create=function(){this.originalProperties.adaptivefont=1,e.ContentAbstract.prototype.create.call(this),this._syncselfalign(),this._onReady()},r.prototype.load=function(t){e.ContentAbstract.prototype.load.call(this,t),this._syncselfalign(),this._onReady()},r.prototype._onReady=function(){e.ContentAbstract.prototype._onReady.call(this),this.startUISizing()},r.prototype.startUISizing=function(){this.layer.nextendNormalSizing({start:t.proxy(function(t,e){i.positionDisplay.show("NormalSizing"),"maxwidth"==e&&this.layer.addClass("n2-ss-has-maxwidth")},this),resizeMaxWidth:t.proxy(function(t,e){i.positionDisplay.update(t,"NormalSizing","Max-width: "+(0==e.value?"none":e.value+"px"))},this),stopMaxWidth:t.proxy(function(t,e){i.positionDisplay.hide("NormalSizing"),this.setProperty("maxwidth",e.value)},this)})},r.prototype["delete"]=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.remove=function(){this._delete()},r.prototype.update=function(){nextend.smartSlider.frontend.responsive.doVerticalResize()},r.prototype.onChildCountChange=function(){var t=this.container.getSortedLayers();this.layer.toggleClass("n2-ss-content-empty",0==t.length)},r.prototype.renderModeProperties=function(t){e.ContentAbstract.prototype.renderModeProperties.call(this,t),this._syncselfalign()},r.prototype._syncselfalign=function(){this.layer.attr("data-cssselfalign",this.getProperty("selfalign"))},r.prototype.duplicate=function(t){console.error("Content can not be duplicated!")},r}),N2Require("ContentAbstract",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this._defaults=t.extend({verticalalign:"flex-start"},this._defaults),this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),e.ComponentAbstract.prototype.constructor.call(this,i,n,r)}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("verticalalign",this._defaults.verticalalign,t),this.createDeviceProperty("maxwidth",{desktopPortrait:0},t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t)},r.prototype.getBackgroundElement=function(){return this.$content},r.prototype.getPaddingElement=function(){return this.$content},r.prototype.create=function(){e.ComponentAbstract.prototype.create.call(this),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._syncverticalalign(),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign(),this._syncbgThrottled(),this.container.startWithExistingNodes()},r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="layer"]').trigger("click")},this)}),this.getPaddingElement().nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.onSpacingStop,this)})},r.prototype.onSpacingStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layercol-padding").data("field").insideChange(r.join("|*|"))},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.getPaddingElement().css("padding",r),this.update(),this.getPaddingElement().nextendSpacing("option","current",r)},r.prototype._syncmaxwidth=function(){var t=parseInt(this.getProperty("maxwidth"));0>=t||isNaN(t)?this.layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.css("maxWidth",t+"px").addClass("n2-ss-has-maxwidth"),this.update()},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype.getVerticalAlign=function(){return this.getProperty("verticalalign")},r.prototype._syncverticalalign=function(){this.$content.attr("data-verticalalign",this.getVerticalAlign())},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=nextend.smartSlider.generator.fill(this.getProperty("bgimage"));if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.getBackgroundElement().css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.getBackgroundElement().css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.getBackgroundElement().css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.getBackgroundElement().css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.getBackgroundElement().css("background",t)}}else this.getBackgroundElement().css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.layersIncluded&&(i.layers=this.container.getData(t)),i},r.prototype.onChildCountChange=function(){this.layer.toggleClass("n2-ss-content-empty",0==this.container.getLayerCount()),this.update()},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncmaxwidth(),this._syncpadding(),this._syncinneralign()},r.prototype.getDroppable=function(){return this.layer.is(":visible")&&this.status!=N2Classes.ComponentAbstract.STATUS.HIDDEN&&this.status!=N2Classes.ComponentAbstract.STATUS.LOCKED?{$container:this.$content,layer:this,placement:"normal",axis:"y"}:"hidden"},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$content},r}),N2Require("Layer",["ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Layer"),this.type="layer",this.parent=!1,this.itemEditor=i.itemEditor,e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal"),this.$.on("load create",t.proxy(this.startItem,this))}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.create=function(){e.ComponentAbstract.prototype.create.apply(this,arguments),this.initUI(),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this._onReady()},r.prototype.startItem=function(){var t=this.layer.find(".n2-ss-item");new(e[this.itemEditor.getItemClass(t.data("item"))])(t,this,this.itemEditor),this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.item.needSize&&this.layer.addClass("n2-ss-layer-needsize");
8
+ },r.prototype.initUI=function(){this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){nextend.context.isPreventDblClick||(e.stopPropagation(),t('[data-tab="item"]').trigger("click"),this.item.itemEditor.focusFirst("dblclick"))},this)})},r.prototype.getContent=function(){var t=this.layer,e=t.data("animatableselector");return e&&(t=t.find(e)),t},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"></div>').attr("data-type",this.type)},r.prototype.createRow=function(){var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-layer-row")},r.prototype.activate=function(t,i,n){e.PluginActivatable.prototype.activate.call(this,t,i,n),this.item?this.item.activate(null,i):console.error("The layer do not have item on it!")},r.prototype.getHTML=function(t){var i=e.ComponentAbstract.prototype.getHTML.call(this,t),n=this.item.getHTML(t);return i.attr("style",i.attr("style")+this.getStyleText()).append(n),i},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.item=this.item.getData()),i},r.prototype.getStyleText=function(){var t="",e=this.property.crop;return"auto"!=e&&"mask"!=e||(e="hidden"),t+="overflow:"+e+";"},r.prototype.getContents=function(){return this.item.$item},r.prototype.setSelf=function(t){this.self!=this&&this.self.setSelf(t),this.self=t,this.item.setSelf(t.item)},r.prototype.getSelf=function(){return this.self!==this&&(this.self=this.self.getSelf()),this.self},r}),N2Require("MainContainer",["LayerContainer"],["smartSlider"],function(t,e,i,n){"use strict";function r(n){this.baseSize=16,this.activeLayer=null,this.$=n.$,this.isActiveGroupBlurred=!0,this.isMainGroup=!0,this.canvasManager=n,this.layer=i.$currentSlideElement.find(".n2-ss-layers-container").addBack().last(),this.layer.nextendCanvas({mainContainer:this,tolerance:5,smartguides:t.proxy(function(t){return t.$layer.triggerHandler("LayerParent"),this.canvasManager.getSnap()},this),display:{hidden:!0,show:t.proxy(function(){i.positionDisplay.show("Canvas")},this),update:t.proxy(function(t,e){i.positionDisplay.update(t,"Canvas","L: "+parseInt(0|e.left)+"px<br />T: "+parseInt(0|e.top)+"px")},this),hide:t.proxy(function(){i.positionDisplay.hide("Canvas")},this)},start:t.proxy(function(t,e){this.canvasManager.canvasDragStart(t,e)},this),drag:t.proxy(function(t,e){this.canvasManager.canvasDragMove(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this),stop:t.proxy(function(t,e){this.canvasManager.canvasDragStop(t,e),e.layer&&e.layer.placement.current.triggerLayerResized()},this)}),this.canvasUIManager=this.layer.data("uiNextendCanvas"),this.layer.nextendLayerList({mainContainer:this,$fixed:t("#n2-ss-layers"),$scrolled:t("#n2-ss-layer-list")}),this.layerListUIManager=this.layer.data("uiNextendLayerList"),this.layer.parent().prepend('<div class="n2-ss-slide-border n2-ss-slide-border-left" /><div class="n2-ss-slide-border n2-ss-slide-border-top" /><div class="n2-ss-slide-border n2-ss-slide-border-right" /><div class="n2-ss-slide-border n2-ss-slide-border-bottom" />'),this.container=new e.LayerContainer(this,t("#n2-ss-layer-list").find("ul"),"absolute","> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group",["content","row","layer","group"]),this.layerRow=this.container.$ul,this.$.on("layerCreated",t.proxy(function(){this.refreshHasLayers()},this))}return r.prototype.lateInit=function(){this.container.startWithExistingNodes(),this.layer.parent().on("click",t.proxy(function(){this.canvasManager.shouldPreventActivationBubble?this.blurActiveGroup():this.unBlurActiveGroup(),this.canvasManager.allowActivation()},this)),i.frontend.sliderElement.on("SliderResize",t.proxy(this.onResize,this))},r.prototype.onResize=function(t,e){for(var i=this.getEverySortedLayers(),n=0;n<i.length;n++)i[n].placement.doLinearResize(e)},r.prototype.getEverySortedLayers=function(){for(var t=this.container.getChildLayersRecursive(!1),e={},i=t.length-1;i>=0;i--)"undefined"!=typeof t[i].property.parentid&&t[i].property.parentid&&("undefined"==typeof e[t[i].property.parentid]&&(e[t[i].property.parentid]=[]),e[t[i].property.parentid].push(t[i]),t.splice(i,1));for(var i=0;i<t.length;i++)"undefined"!=typeof t[i].property.id&&t[i].property.id&&"undefined"!=typeof e[t[i].property.id]&&(e[t[i].property.id].unshift(0),e[t[i].property.id].unshift(i+1),t.splice.apply(t,e[t[i].property.id]),delete e[t[i].property.id]);return t},r.prototype.deleteLayers=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]["delete"]()},r.prototype.blurActiveGroup=function(){this.isActiveGroupBlurred=!0},r.prototype.unBlurActiveGroup=function(){this.isActiveGroupBlurred=!1},r.prototype.getActiveGroup=function(){if(this.isActiveGroupBlurred){var t=this,e=this.activeLayer;switch(this.canvasManager.isGroup(e)||this.canvasManager.isCol(e)||this.canvasManager.isContent(e)?t=e:this.canvasManager.isRow(e)?t=e.container.getSortedLayers()[0]:e&&(t=e.group),this.canvasManager.currentEditorMode){case"content":t==this&&(t=this.canvasManager.mainContent);break;case"canvas":t==this.canvasManager.mainContent&&(t=this)}return t}switch(this.canvasManager.currentEditorMode){case"content":return this.canvasManager.mainContent}return this},r.prototype.getSelectedLayer=function(){return null==this.activeLayer?!1:this.activeLayer},r.prototype.getLayerData=function(t){if(t===n)return[];for(var e=[],i=[],r=0;r<t.length;r++)t[r].getDataWithChildren(e,i);return e},r.prototype.layerDeleted=function(t){for(var e=this.canvasManager.selectedLayers.length;e--;)t==this.canvasManager.selectedLayers[e]&&this.canvasManager.selectedLayers.splice(e,1);this._afterLayerDeletedDeBounced(t),this.refreshHasLayers()},r.prototype._afterLayerDeletedDeBounced=NextendDeBounce(function(t){this.activeLayer&&!this.activeLayer.isDeleted||this.canvasManager.resetActiveLayer()},50),r.prototype.refreshHasLayers=function(){t("body").toggleClass("n2-ss-has-layers",this.container.getLayerCount()>0),nextend.triggerResize()},r.prototype.getName=function(){return"Slide"},r.prototype.update=function(){},r.prototype.onChildCountChange=function(){},r.prototype.markEnter=function(t){},r.prototype.markLeave=function(t){},r.prototype.getSelf=function(){return this},r.prototype.createLayerAnimations=function(t,e){for(var i=[],n=this.container.getSortedLayers(),r=0;r<n.length;r++)i.push.apply(i,n[r].createLayerAnimations(t,e));return i},r.prototype.getDroppables=function(e){var i,n=this.canvasManager.currentEditorMode,r=[];if("canvas"==n){r.push(this.getDroppable()),i=this.container.getSortedLayers();var s=t.inArray(this.canvasManager.mainContent,i);s>-1&&i.splice(s,1)}else"content"==n&&(i=[this.canvasManager.mainContent]);for(var o=0;o<i.length;o++)if(i[o]!=e){var a=i[o].getDroppable();"object"==typeof a&&r.push(a),"hidden"!=a&&i[o].container&&r.push.apply(r,i[o].container.getDroppables(e))}return r},r.prototype.getLLDroppables=function(t){return this.container.getLLDroppables(t)},r.prototype.getDroppable=function(){return{$container:this.layer,layer:this,placement:"absolute"}},r.prototype.getLLDroppable=function(t){switch(t.type){case"layer":case"row":case"group":case"content":return{$container:this.container.$ul,layer:this}}return!1},r.prototype.replaceLayers=function(e){this._idTranslation={};var n=this.dataToLayers(t.extend(!0,[],e).reverse()),r=[];this.deleteLayers(),this.canvasManager.mainContent.remove();for(var s=0;s<n.length;s++)r.push(this.container.append(n[s]));return this.canvasManager.refreshMode(),this.container.layerContainerElement.n2imagesLoaded().always(t.proxy(this.canvasManager.refreshMode,this.canvasManager)),this.getSelectedLayer()||r.length>0&&r[0].activate(),i.history.isEnabled()&&i.history.addSimple(this,this.historyDeleteAll,this.historyReplaceLayers,[e,r,this.container.getAllLayers()]),r},r.prototype.historyDeleteAll=function(t,e){for(var i=0;i<e.length;i++)e[i].getSelf()["delete"]();this.canvasManager.mainContent.getSelf().remove()},r.prototype.historyReplaceLayers=function(t,e,i){this.replaceLayers(t);for(var n=this.container.getAllLayers(),r=0;r<i.length;r++)i[r].setSelf(n[r])},r.prototype.addLayers=function(e,n){this._idTranslation={};for(var r=this.dataToLayers(t.extend(!0,[],e)),s=[],o=0;o<r.length;o++)s.push(n.container.append(r[o]));return this.canvasManager.refreshMode(),i.history.addSimple(this,this.historyDeleteLayers,this.historyAddLayers,[e,s,n]),s},r.prototype.historyDeleteLayers=function(t,e,i){for(var n=0;n<e.length;n++)e[n].getSelf()["delete"]()},r.prototype.historyAddLayers=function(t,e,i){for(var n=this.addLayers(t,i.getSelf()),r=0;r<e.length;r++)e[r].setSelf(n[r])},r.prototype.dataToLayers=function(t,e){for(var i=[],n=0;n<t.length;n++)switch(t[n].type){case"group":console.error("Group data to layer not implemented!");break;case"row":i.push(this.buildRowNode(t[n],e));break;case"col":i.push(this.buildColNode(t[n],e));break;case"content":i.push(this.buildContentNode(t[n],e));break;case"layer":default:i.push(this.buildLayerNode(t[n],e))}return i},r.prototype._buildNodePrepareID=function(e,i){if(i.id){var n=t.fn.uid(),r=!1;"object"==typeof this._idTranslation[i.id]&&(r=this._idTranslation[i.id]),this._idTranslation[i.id]=n,i.id=n,e.attr("id",n),r&&r.resolve(i.id,n)}if(i.parentid)switch(typeof this._idTranslation[i.parentid]){case"string":i.parentid=this._idTranslation[i.parentid];break;case"undefined":this._idTranslation[i.parentid]=t.Deferred();case"object":this._idTranslation[i.parentid].done(t.proxy(function(t,e,i){t.data("parentid",i)},this,e));break;default:i.parentid=""}},r.prototype.buildContentNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='content'/>"),s=t("<div class='n2-ss-section-main-content n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildRowNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='row'/>"),s=t("<div class='n2-ss-layer-row' />").appendTo(r);this._buildNodePrepareID(r,e);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.cols,s),r},r.prototype.buildColNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='col'/>"),s=t("<div class='n2-ss-layer-col n2-ss-layer-content' />").appendTo(r);for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),this.dataToLayers(e.layers,s),r},r.prototype.buildLayerNode=function(e,i){var r=t("<div class='n2-ss-layer' data-type='layer'></div>").attr("style",e.style),s=1;e.zIndex&&(s=e.zIndex),this._buildNodePrepareID(r,e),e.items!==n&&(e.item=e.items[0],delete e.items),t('<div class="n2-ss-item n2-ss-item-'+e.item.type+'"></div>').data("item",e.item.type).data("itemvalues",e.item.values).appendTo(r),delete e.style,delete e.item;for(var o in e)r.data(o,e[o]);return i!==n&&r.appendTo(i),r},r}),N2Require("Row",["LayerContainer","ComponentAbstract"],["smartSlider"],function(t,e,i,n){"use strict";function r(i,n,r){this.label=n2_("Row"),this.type="row",this._syncbgThrottled=NextendThrottle(this._syncbgThrottled,50),this.innerContainer="> .n2-ss-layer-row",this.columnsField=t("#layerrow-columns").data("field"),this.refreshUI=NextendDeBounce(this.refreshUI,100),e.ComponentAbstract.prototype.constructor.call(this,i,n,r),this.placement.allow("absolute"),this.placement.allow("normal")}return r.prototype=Object.create(e.ComponentAbstract.prototype),r.prototype.constructor=r,r.prototype.addProperties=function(t){this.createProperty("opened",1,t,this),e.ComponentAbstract.prototype.addProperties.call(this,t),this.createProperty("bgimage","",t),this.createProperty("bgimagex",50,t),this.createProperty("bgimagey",50,t),this.createProperty("bgimageparallax",0,t),this.createProperty("bgcolor","00000000",t),this.createProperty("bgcolorgradient","off",t),this.createProperty("bgcolorgradientend","00000000",t),this.createProperty("borderradius",0,t),this.createProperty("boxshadow","0|*|0|*|0|*|0|*|00000080",t),this.createProperty("fullwidth",1,t),this.createProperty("stretch",0,t),this.createDeviceProperty("inneralign",{desktopPortrait:"inherit"},t),this.createDeviceProperty("padding",{desktopPortrait:"10|*|10|*|10|*|10|*|px+"},t),this.createDeviceProperty("gutter",{desktopPortrait:20},t),this.createDeviceProperty("wrapafter",{desktopPortrait:0,mobilePortrait:1,mobileLandscape:1},t)},r.prototype.historyDeleteSelf=function(){this["delete"]()},r.prototype.historyCreateSelf=function(t,i,n){var r=new e.Row(this.canvasManager,t.getSelf(),{});r.create(i),this.setSelf(r);for(var s=r.container.getSortedLayers(),o=0;o<s.length;o++)n[o].setSelf(s[o])},r.prototype.create=function(n){var r,s=function(e){return t("<div class='n2-ss-layer' />").append(t("<div class='n2-ss-layer-row' />").append(e)).attr("data-type","row")},o=function(e){return t("<div class='n2-ss-layer' data-type='col'/>").append(t("<div class='n2-ss-layer-col n2-ss-layer-content' />").append(e))};switch(n){case"2col":r=function(t){return s([o(),o()])};break;case"2col-60-40":r=function(t){return s([o().data("colwidth","6/10"),o().data("colwidth","4/10")])};break;case"2col-40-60":r=function(t){return s([o().data("colwidth","4/10"),o().data("colwidth","6/10")])};break;case"2col-80-20":r=function(t){return s([o().data("colwidth","8/10"),o().data("colwidth","2/10")])};break;case"2col-20-80":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","8/10")])};break;case"3col":r=function(t){return s([o(),o(),o()])};break;case"3col-20-60-20":r=function(t){return s([o().data("colwidth","2/10"),o().data("colwidth","6/10"),o().data("colwidth","2/10")])};break;case"4col":r=function(t){return s([o(),o(),o(),o()])};break;case"special":r=function(t){var e=s([o(),o()]);return s([o().data("colwidth","1/5"),o(e).data("colwidth","4/5")])};break;default:r=function(t){return s([o()])}}"absolute"==this.group.container.allowedPlacementMode&&(this.originalProperties=t.extend({width:"100%",align:"center",valign:"top",top:20},this.originalProperties)),e.ComponentAbstract.prototype.create.call(this,r,!0),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this.renderModeProperties(),this.container.renderModeProperties(),i.history.addSimple(this,this.historyDeleteSelf,this.historyCreateSelf,[this.group,n,this.container.getSortedLayers()]),this._onReady()},r.prototype.load=function(t){e.ComponentAbstract.prototype.load.call(this,t),this.initUI(),this.container.startWithExistingNodes(),this._syncpadding(),this._syncinneralign(),this._syncfullwidth(),this._syncstretch(),this._syncbgThrottled(),this._syncborderradius(),this._syncboxshadow(),this._onReady()},r.prototype.initUI=function(){this.layer.nextendCanvasItem({canvasUIManager:this.canvasManager.mainContainer.canvasUIManager,layer:this,$layer:this.layer}),this.layer.on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"layerClicked"),click:t.proxy(function(t){!nextend.shouldPreventMouseUp&&this.canvasManager.preventActivationBubbling()&&this.activate(t)},this),dblclick:t.proxy(function(e){e.stopPropagation(),t('[data-tab="row"]').trigger("click")},this)}),this.$row.nextendSpacing({handles:"n, s, e, w",start:t.proxy(function(t,e){i.positionDisplay.show("Spacing")},this),spacing:t.proxy(function(t,e){var n="";for(var r in e.changed)n+="Padding "+r+": "+e.changed[r]+"px<br>";i.positionDisplay.update(t,"Spacing",n)},this),stop:t.proxy(this.____makeLayerResizeableStop,this)}),this.$row.nextendColumns({columns:"1",gutter:this.getGutter(),start:t.proxy(function(t,e){i.positionDisplay.show("Columns")},this),colwidth:t.proxy(function(t,e){this.updateColumnWidth(e.currentPercent),i.positionDisplay.update(t,"Columns",Math.round(100*e.currentPercent[e.index])+"% &mdash; "+Math.round(100*e.currentPercent[e.index+1])+"%")},this),stop:t.proxy(function(t,e){i.positionDisplay.hide("Columns"),this.setRealColsWidth(e.currentFractions)},this)}),this.$row.sortable({distance:10,tolerance:"pointer",forceHelperSize:!0,forcePlaceholderSize:!0,items:"> .n2-ss-layer",handle:" > .n2-ss-layer-ui-label-container > .n2-ss-layer-ui-label-self",start:t.proxy(function(t,e){var i=this.getColumns().split("+");e.placeholder.css({width:100*new Fraction(i[e.item.data("layerObject").getIndex()]).valueOf()+"%",height:e.helper.height(),visibility:"visible",marginRight:this.getGutter()+"px",marginTop:this.getGutter()+"px"}),e.helper.hasClass("n2-ss-last-in-row")&&e.placeholder.addClass("n2-ss-last-in-row"),e.placeholder.css("order",e.helper.css("order")),e.placeholder.attr("data-r",e.helper.attr("data-r"))},this),stop:t.proxy(function(t,e){var i=e.item.data("layerObject"),n=e.item.prevAll(".n2-ss-layer, .n2-ss-layer-group").first().data("layerObject");this.$row.sortable("cancel");var r=i.getIndex(),s=0;n&&(s=n.getIndex(),r>s&&s++),r!=s&&this.moveCol(r,s)},this)})},r.prototype.____makeLayerResizeableStop=function(e,n){i.positionDisplay.hide("Spacing");var r=this.getPadding().split("|*|"),s=1,o=1;"px+"==r[r.length-1]&&Math.abs(parseFloat(this.layer.css("fontSize"))-this.baseSize)>1&&(s=this.canvasManager.getResponsiveRatio("h"),o=this.canvasManager.getResponsiveRatio("v"));for(var a in n.changed){var l=n.changed[a];switch(a){case"top":r[0]=Math.round(l/o);break;case"right":r[1]=Math.round(l/s);break;case"bottom":r[2]=Math.round(l/o);break;case"left":r[3]=Math.round(l/s)}}this.setProperty("padding",r.join("|*|")),t("#layerrow-padding").data("field").insideChange(r.join("|*|"))},r.prototype._createLayer=function(){return t('<div class="n2-ss-layer"><div class="n2-ss-layer-row"></div></div>').attr("data-type",this.type)},r.prototype.historyDeleteCol=function(t,e){e.getSelf()["delete"]()},r.prototype.historyCreateCol=function(t,e){var i=t.getSelf().createCol();e.setSelf(i)},r.prototype.createCol=function(){var t=new e.Col(this.canvasManager,this,{});return i.history.addSimple(this,this.historyDeleteCol,this.historyCreateCol,[this,t]),t.create(),this.isReady()&&this.placement.updatePosition(),t},r.prototype.createRow=function(){this.$row=this.layer.find(".n2-ss-layer-row:first"),this.container=new e.LayerContainer(this,t('<ul class="n2-list n2-h4 n2-list-orderable" />'),"default","> .n2-ss-layer",["col"]),this.container.setLayerContainerElement(this.$row);var i=t('<div class="n2-ss-layer-status"></div>'),n=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Delete layer")+'"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(this["delete"],this)),r=t('<div class="n2-button n2-button-icon n2-button-m n2-button-m-narrow" data-n2tip="'+n2_("Duplicate layer")+'"><i class="n2-i n2-i-duplicate n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(){this.duplicate(!0,!1)},this));t('<a href="#" class="n2-ss-sc-hide n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-eye"></i></a>').appendTo(i).on("click",t.proxy(function(t){t.preventDefault(),this.status==e.ComponentAbstract.STATUS.HIDDEN?this.setStatusNormal():this.changeStatus(e.ComponentAbstract.STATUS.HIDDEN)},this)),this._createLayerListRow([t('<div class="n2-actions-left"></div>').append(i),t('<div class="n2-actions"></div>').append(r).append(n)]).addClass("n2-ss-layer-row-row"),this.openerElement=t('<a href="#" class="n2-ss-layer-icon n2-button n2-button-icon n2-button-m"><i class="n2-i n2-i-row"></i></a>').insertBefore(this.layerTitleSpan).on("click",t.proxy(this.switchOpened,this)),this.container.$ul.appendTo(this.layerRow),this.readyDeferred.done(t.proxy(this._syncopened,this))},r.prototype.activate=function(){e.PluginActivatable.prototype.activate.apply(this,arguments),this.columnsField.setRow(this)},r.prototype.switchOpened=function(t){t.preventDefault(),this.getProperty("opened")?this.setProperty("opened",0):this.setProperty("opened",1)},r.prototype._syncopened=function(){this.getProperty("opened")?(this.openerElement.removeClass("n2-closed"),this.container.$ul.css("display",""),this.layer.triggerHandler("opened")):(this.openerElement.addClass("n2-closed"),this.container.$ul.css("display","none"),this.layer.triggerHandler("closed"))},r.prototype.getColumns=function(){for(var t=this.container.getSortedLayers(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype.getColumnsOrdered=function(){for(var t=this.getOrderedColumns(),e=[],i=0;i<t.length;i++)e.push(t[i].getProperty("colwidth"));return e.join("+")},r.prototype._synccolumns=function(){for(var t=this.container.getSortedLayers(),e=0;e<t.length;e++)t[e]._synccolwidth();this.update()},r.prototype.getPadding=function(){return this.getProperty("padding")},r.prototype._syncpadding=function(){var t=this.getPadding().split("|*|"),e=t.pop(),i=this.baseSize;if("px+"==e&&i>0){e="em";for(var n=0;n<t.length;n++)t[n]=parseInt(t[n])/i}var r=t.join(e+" ")+e;this.$row.css("padding",r),this.$row.nextendSpacing("option","current",r),this.update()},r.prototype.getGutter=function(){return this.getProperty("gutter")},r.prototype._syncgutter=function(){var t=this.getGutter()+"px",e=this.container.getSortedLayers();if(e.length>0)for(var i=e.length-1;i>=0;i--)e[i].layer.css("marginRight",t).css("marginTop",t);this.$row.nextendColumns("option","gutter",this.getGutter()),this.update()},r.prototype._syncwrapafter=function(){if(!this.isDeleted&&!this.isDeleteStarted){for(var e=parseInt(this.getProperty("wrapafter")),i=this.getOrderedColumns(),n=!1,r=i.length-1;r>=0;r--)i[r].showsOnCurrent||i.splice(r,1);var s=i.length;if(e>0&&s>e&&(n=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",n),n)for(var r=0;s>r;r++){var o=parseInt(r/e);if(i[r].layer.attr("data-r",o),(r+1)%e==0||r==s-1){var a=i[r].getProperty("order");0==a&&(a=10),t('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[r].layer.addClass("n2-ss-last-in-row"))}else i[r].layer.removeClass("n2-ss-last-in-row")}else{for(var r=0;s>r;r++)i[r].layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i.length>0?i[s-1].layer.addClass("n2-ss-last-in-row"):console.error("The row does not have col.")}this.update()}},r.prototype.getOrderedColumns=function(){return this.container.getSortedLayers().sort(function(t,e){return t.getRealOrder()-e.getRealOrder()})},r.prototype.getInnerAlign=function(){return this.getProperty("inneralign")},r.prototype._syncinneralign=function(){this.layer.attr("data-csstextalign",this.getInnerAlign())},r.prototype._syncfullwidth=function(){this.layer.toggleClass("n2-ss-autowidth",0==this.getProperty("fullwidth"))},r.prototype._syncstretch=function(){this.layer.toggleClass("n2-ss-stretch-layer",1==this.getProperty("stretch"))},r.prototype._syncborderradius=function(){this.$row.css("border-radius",this.getProperty("borderradius")+"px")},r.prototype._syncboxshadow=function(){var t=this.getProperty("boxshadow").split("|*|");0==t[0]&&0==t[1]&&0==t[2]&&0==t[3]||0==N2Color.hex2alpha(t[4])?this.$row.css("box-shadow",""):this.$row.css("box-shadow",t[0]+"px "+t[1]+"px "+t[2]+"px "+t[3]+"px "+N2Color.hex2rgbaCSS(t[4]))},r.prototype._syncbgimage=r.prototype._syncbgimagex=r.prototype._syncbgimagey=r.prototype._syncbgimageparallax=r.prototype._syncbgcolor=r.prototype._syncbgcolorgradient=r.prototype._syncbgcolorgradientend=function(){this._syncbgThrottled()},r.prototype._syncbgThrottled=function(){var t="",e=nextend.smartSlider.generator.fill(this.getProperty("bgimage"));if(""!=e){var i=parseInt(this.getProperty("bgimagex"));isFinite(i)||(i=50);var n=parseInt(this.getProperty("bgimagey"));isFinite(n)||(n=50),t+='url("'+nextend.imageHelper.fixed(e)+'") '+i+"% "+n+"% / cover no-repeat"+(1==this.getProperty("bgimageparallax")?" fixed":"")}var r=this.getProperty("bgcolor"),s=this.getProperty("bgcolorgradient"),o=this.getProperty("bgcolorgradientend");if(0!=N2Color.hex2alpha(r)||"off"!=s&&0!=N2Color.hex2alpha(o)){var a="";switch(""!=t&&(a=","+t),s){case"horizontal":this.$row.css("background","-moz-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(left, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to right, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"vertical":this.$row.css("background","-moz-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(top, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(to bottom, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal1":this.$row.css("background","-moz-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"diagonal2":this.$row.css("background","-moz-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background"," -webkit-linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a).css("background","linear-gradient(-45deg, "+N2Color.hex2rgbaCSS(r)+" 0%,"+N2Color.hex2rgbaCSS(o)+" 100%)"+a);break;case"off":default:""!=t?t="linear-gradient("+N2Color.hex2rgbaCSS(r)+", "+N2Color.hex2rgbaCSS(r)+"),"+t:t+=N2Color.hex2rgbaCSS(r),this.$row.css("background",t)}}else this.$row.css("background",t)},r.prototype.getData=function(t){var i=e.ComponentAbstract.prototype.getData.call(this,t);return t.itemsIncluded&&(i.cols=this.container.getData(t)),i},r.prototype.moveCol=function(t,e){if("desktopPortrait"==this.getMode()){this._moveCol(t,e);var n=i.history.addValue(this,this.historyMoveCol,[]);n&&n.setValues({oldIndex:e,newIndex:t},{oldIndex:t,newIndex:e})}else{var r=this.getOrderedColumns(),s=r[t];r.splice(t,1),r.splice(e,0,s);for(var o=0;o<r.length;o++)r[o].setProperty("order",o+1);this.refreshUI()}},r.prototype._moveCol=function(t,e){var i=this.container.getSortedLayers();e>t&&e++,this.container.insertLayerAt(i[t],e),this.refreshUI()},r.prototype.historyMoveCol=function(t){this._moveCol(t.oldIndex,t.newIndex)},r.prototype.setColsWidth=function(t){for(var e=this.container.getSortedLayers(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.setRealColsWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<t.length;i++)e[i].setProperty("colwidth",t[i].toFraction());this.update(),this.refreshUI()},r.prototype.updateColumnWidth=function(t){for(var e=this.getOrderedColumns(),i=0;i<e.length;i++)e[i].layer.css("width",100*t[i]+"%");this.update()},r.prototype.activateColumn=function(t,e){this.container.getSortedLayers()[t].activate(e)},r.prototype.onChildCountChange=function(){if(!this.isDeleted&&!this.isDeleteStarted){var t=this.container.getSortedLayers(),e=t.length;if(e){for(var i=this.getColumns().split("+"),n=0,r=0;r<i.length;r++)n=new Fraction(i[r]).add(n);if(1!=n.valueOf())for(var r=0;e>r;r++)t[r].setProperty("colwidth","1/"+e);else for(var r=0;e>r;r++)t[r]._synccolwidth();this.refreshUI()}this._syncgutter(),this._syncwrapafter()}},r.prototype.renderModeProperties=function(t){e.ComponentAbstract.prototype.renderModeProperties.call(this,t),this._syncpadding(),this._syncinneralign(),this._syncwrapafter(),this._syncgutter(),this.isActive&&this.columnsField.setRow(this)},r.prototype.hightlightStructure=function(e){e=e||4e3,this.isStructureHighlighted&&(clearTimeout(this.isStructureHighlighted),this.isStructureHighlighted=!1),this.layer.addClass("n2-highlight-structure"),this.isStructureHighlighted=setTimeout(t.proxy(function(){this.isDeleted||this.layer.removeClass("n2-highlight-structure")},this),e)},r.prototype.refreshUI=function(){this.isDeleteStarted||(this.isActive&&this.columnsField.setRow(this),this._syncwrapafter(),this.$row.nextendColumns("option","columns",this.getColumnsOrdered()))},r.prototype.getDroppable=function(){return this.layer.is(":visible")&&this.status!=N2Classes.ComponentAbstract.STATUS.HIDDEN&&this.status!=N2Classes.ComponentAbstract.STATUS.LOCKED?{$container:this.$row,layer:this,placement:"normal",axis:"x"}:"hidden"},r.prototype.getLLDroppable=function(t){switch(t.type){case"col":if(t.group==this)return{$container:this.container.$ul,layer:this}}return!1},r.prototype.getContents=function(){return this.$row},r}),N2Require("ComponentSettings",[],["smartSlider"],function(t,e,i,n){"use strict";function r(e){this.componentType="undefined",this.placementType="undefined",t("html").attr("data-component",""),t("html").attr("data-placement",""),this.currentForm={},this.forms={undefined:null,placement:{absolute:{},normal:{},"default":{}},component:{content:{},layer:{},row:{},col:{},group:{}},global:{id:t("#layerid"),desktopPortrait:t("#layershow-desktop-portrait"),desktopLandscape:t("#layershow-desktop-landscape"),tabletPortrait:t("#layershow-tablet-portrait"),tabletLandscape:t("#layershow-tablet-landscape"),mobilePortrait:t("#layershow-mobile-portrait"),mobileLandscape:t("#layershow-mobile-landscape"),"class":t("#layerclass"),generatorvisible:t("#layergenerator-visible"),crop:t("#layercrop"),rotation:t("#layerrotation"),parallax:t("#layerparallax"),fontsize:t("#layerfont-size"),adaptivefont:t("#layeradaptive-font"),mouseenter:t("#layeronmouseenter"),click:t("#layeronclick"),mouseleave:t("#layeronmouseleave"),play:t("#layeronplay"),pause:t("#layeronpause"),stop:t("#layeronstop")}},this.canvasManager=e;var n=i.frontend.responsive;n.enabled("desktop","Landscape")||this.forms.global.desktopLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Portrait")||this.forms.global.tabletPortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("tablet","Landscape")||this.forms.global.tabletLandscape.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Portrait")||this.forms.global.mobilePortrait.closest(".n2-mixed-group").css("display","none"),n.enabled("mobile","Landscape")||this.forms.global.mobileLandscape.closest(".n2-mixed-group").css("display","none"),this.forms.placement.absolute={parentid:t("#layerparentid"),parentalign:t("#layerparentalign"),parentvalign:t("#layerparentvalign"),left:t("#layerleft"),top:t("#layertop"),responsiveposition:t("#layerresponsive-position"),width:t("#layerwidth"),height:t("#layerheight"),responsivesize:t("#layerresponsive-size"),align:t("#layeralign"),valign:t("#layervalign")},this.forms.placement.normal={margin:t("#layernormal-margin"),height:t("#layernormal-height"),maxwidth:t("#layernormal-maxwidth"),selfalign:t("#layernormal-selfalign")},this.forms.component.content={maxwidth:t("#layercontent-maxwidth"),selfalign:t("#layercontent-selfalign"),padding:t("#layercontent-padding"),inneralign:t("#layercontent-inneralign"),
9
+ verticalalign:t("#layercontent-verticalalign"),bgcolor:t("#layercontent-background-color"),bgimage:t("#layercontent-background-image"),bgimagex:t("#layercontent-background-focus-x"),bgimagey:t("#layercontent-background-focus-y"),bgimageparallax:t("#layercontent-background-parallax"),bgcolorgradient:t("#layercontent-background-gradient"),bgcolorgradientend:t("#layercontent-background-color-end"),opened:t("#layercontent-opened")},i.generator.registerField(this.forms.component.content.bgimage),this.forms.component.row={padding:t("#layerrow-padding"),gutter:t("#layerrow-gutter"),fullwidth:t("#layerrow-fullwidth"),stretch:t("#layerrow-stretch"),wrapafter:t("#layerrow-wrap-after"),inneralign:t("#layerrow-inneralign"),bgimage:t("#layerrow-background-image"),bgimagex:t("#layerrow-background-focus-x"),bgimagey:t("#layerrow-background-focus-y"),bgimageparallax:t("#layerrow-background-parallax"),bgcolor:t("#layerrow-background-color"),bgcolorgradient:t("#layerrow-background-gradient"),bgcolorgradientend:t("#layerrow-background-color-end"),borderradius:t("#layerrow-border-radius"),boxshadow:t("#layerrow-boxshadow"),opened:t("#layerrow-opened")},i.generator.registerField(this.forms.component.row.bgimage),this.forms.component.col={maxwidth:t("#layercol-maxwidth"),padding:t("#layercol-padding"),inneralign:t("#layercol-inneralign"),verticalalign:t("#layercol-verticalalign"),bgcolor:t("#layercol-background-color"),link:t("#layercol-link"),bgimage:t("#layercol-background-image"),bgimagex:t("#layercol-background-focus-x"),bgimagey:t("#layercol-background-focus-y"),bgimageparallax:t("#layercol-background-parallax"),bgcolorgradient:t("#layercol-background-gradient"),bgcolorgradientend:t("#layercol-background-color-end"),borderradius:t("#layercol-border-radius"),boxshadow:t("#layercol-boxshadow"),borderwidth:t("#layercol-border-width"),borderstyle:t("#layercol-border-style"),bordercolor:t("#layercol-border-color"),opened:t("#layercol-opened"),colwidth:t("#layercol-colwidth"),order:t("#layercol-order")},i.generator.registerField(t("#col-linklayercol-link_0")),i.generator.registerField(this.forms.component.col.bgimage)}return r.prototype.changeActiveComponent=function(e,i,n,r){if(this.currentLayer=e,this.componentType!=i){switch(t("html").attr("data-component",i),i){case"content":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["content","animations","position"]);break;case"layer":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["item","style","animations","position"]);break;case"group":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["group","animations"]);break;case"row":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["row","animations","position"]);break;case"col":t("#n2-tabbed-slide-editor-settings").data("pane").showTabs(["column","animations","position"])}this.componentType=i}this.changeActiveComponentPlacement(n),this.syncFields(r)},r.prototype.changeActiveComponentPlacement=function(e,i){this.placementType!=e&&(t("html").attr("data-placement",e),this.placementType=e),this.syncFields(i)},r.prototype.syncFields=function(e){if("object"==typeof e){this.currentForm=t.extend({},this.forms.global,this.forms.component[this.componentType],this.forms.placement[this.placementType]);for(var i in e)typeof e[i]!==n?this.updateField(i,e[i]):console.error("Value is undefined for: "+i);for(var r in this.currentForm)this.currentForm[r].off(".layeroptions").on("outsideChange.layeroptions",t.proxy(this.activeComponentPropertyChanged,this,r))}},r.prototype.onUpdateField=function(t,e,i){t.target==this.currentLayer&&this.updateField(e,i)},r.prototype.updateField=function(t,e){if("function"==typeof this.currentLayer["formSet"+t])this.currentLayer["formSet"+t](this,e);else if(this.currentForm[t]!==n){var i=this.currentForm[t].data("field");i!==n&&i.insideChange(e)}else console.error("field not available: "+t+":"+e,this.currentForm)},r.prototype.activeComponentPropertyChanged=function(t,e){if(this.currentLayer&&!this.currentLayer.isDeleted){var i=this.currentForm[t].val();this.currentLayer.setProperty(t,i,"manager")}else{var n=this.currentForm[t].data("field");"undefined"!=typeof n&&null!==n&&n.insideChange("")}},r.prototype.startFeatures=function(){this.layerFeatures=new e.LayerFeatures(this.forms.placement.absolute,this.canvasManager);var i=t("#n2-ss-layer-adaptive-font").on("click",t.proxy(function(){this.currentForm.adaptivefont.data("field").onoff.trigger("click")},this));this.forms.global.adaptivefont.on("nextendChange",t.proxy(function(){1==this.currentForm.adaptivefont.val()?i.addClass("n2-active"):i.removeClass("n2-active")},this)),new N2Classes.FormElementNumber("n2-ss-layer-font-size",-Number.MAX_VALUE,Number.MAX_VALUE),new N2Classes.FormElementAutocompleteSlider("n2-ss-layer-font-size",{min:50,max:300,step:5});var n=t("#n2-ss-layer-font-size").on("outsideChange",t.proxy(function(){var t=parseInt(n.val());this.currentForm.fontsize.val(t).trigger("change")},this));this.forms.global.fontsize.on("nextendChange",t.proxy(function(){n.data("field").insideChange(this.forms.global.fontsize.val())},this))},r}),N2Require("BgAnimationManager",[],[],function(t,e,i){function n(){this.type="backgroundanimation",NextendVisualManagerMultipleSelection.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(NextendVisualManagerMultipleSelection.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualManagerMultipleSelection.prototype.loadDefaults.apply(this,arguments),this.type="backgroundanimation",this.labels={visual:"Background animation",visuals:"Background animations"}},n.prototype.initController=function(){return new e.BgAnimationEditor},n.prototype.createVisual=function(t,e){return new NextendVisualWithSetRowMultipleSelection(t,e,this)},n}),N2Require("BgAnimationEditor",[],[],function(t,e,i){function n(){this.parameters={shiftedBackgroundAnimation:0},NextendVisualEditorController.prototype.constructor.call(this,!1),this.bgAnimationElement=t(".n2-bg-animation"),this.slides=t(".n2-bg-animation-slide"),this.bgImages=t(".n2-bg-animation-slide-bg"),NextendTween.set(this.bgImages,{rotationZ:1e-4}),this.directionTab=new N2Classes.FormElementRadio("n2-background-animation-preview-tabs",["0","1"]),this.directionTab.element.on("nextendChange.n2-editor",t.proxy(this.directionTabChanged,this)),nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d||nextend.notificationCenter.error("Background animations are not available in your browser. It works if the <i>transform-style: preserve-3d</i> feature available. ")}return n.prototype=Object.create(NextendVisualEditorController.prototype),n.prototype.constructor=n,n.prototype.loadDefaults=function(){NextendVisualEditorController.prototype.loadDefaults.call(this),this.type="backgroundanimation",this.current=0,this.animationProperties=!1,this.direction=0},n.prototype.get=function(){return null},n.prototype.load=function(t,e,i,n){this.lightbox.addClass("n2-editor-loaded")},n.prototype.setTabs=function(t){},n.prototype.directionTabChanged=function(){this.direction=parseInt(this.directionTab.element.val())},n.prototype.start=function(){this.animationProperties&&(this.timeline?this.timeline.play():this.next())},n.prototype.pause=function(){this.timeline&&this.timeline.pause()},n.prototype.next=function(){this.timeline=new NextendTimeline({paused:!0,onComplete:t.proxy(this.ended,this)});var e=this.bgImages.eq(this.current),i=this.bgImages.eq(1-this.current);nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d?(this.currentAnimation=new N2Classes["SmartSliderBackgroundAnimation"+this.animationProperties.type](this,e,i,this.animationProperties,1,this.direction),this.slides.eq(this.current).css("zIndex",2),this.slides.eq(1-this.current).css("zIndex",3),this.timeline.to(this.slides.eq(this.current),.5,{opacity:0},this.currentAnimation.getExtraDelay()),this.timeline.to(this.slides.eq(1-this.current),.5,{opacity:1},this.currentAnimation.getExtraDelay()),this.currentAnimation.postSetup()):(this.timeline.to(this.slides.eq(this.current),1.5,{opacity:0},0),this.timeline.to(this.slides.eq(1-this.current),1.5,{opacity:1},0)),this.current=1-this.current,this.timeline.play()},n.prototype.ended=function(){this.currentAnimation&&this.currentAnimation.ended(),this.next()},n.prototype.setAnimationProperties=function(t){var e=this.animationProperties;this.animationProperties=t,e||this.next()},n});
library/media/dist/smartslider-frontend.js CHANGED
@@ -5513,7 +5513,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
5513
  };
5514
 
5515
  SmartSliderResponsive.prototype.onResize = function (e) {
5516
- if (!this.slider.mainAnimation || this.slider.mainAnimation.getState() == 'ended') {
5517
  this.doResize(e);
5518
  } else if (!this.delayedResizeAdded) {
5519
  this.delayedResizeAdded = true;
@@ -5631,6 +5631,7 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
5631
  };
5632
 
5633
  SmartSliderResponsive.prototype.doResize = function (e, fixedMode, timeline, nextSlide, duration) {
 
5634
  if (!this.disableTransitions) {
5635
  this.disableTransitions = true;
5636
  this.sliderElement.addClass('n2notransition');
@@ -5672,12 +5673,13 @@ N2Require('SmartSliderResponsive', [], [], function ($, scope, undefined) {
5672
 
5673
  var windowWidth = customWidth > 0 ? customWidth : (document.body.clientWidth || document.documentElement.clientWidth),
5674
  outerEl = this.containerElement.parent(),
5675
- outerElBoundingRect = outerEl[0].getBoundingClientRect(),
5676
  outerElOffset;
 
5677
  if (nextend.rtl.isRtl) {
5678
- outerElOffset = windowWidth - (outerElBoundingRect.left + outerEl.outerWidth());
5679
  } else {
5680
- outerElOffset = outerElBoundingRect.left;
5681
  }
5682
  this.containerElement.css(nextend.rtl.marginLeft, -outerElOffset - parseInt(outerEl.css('paddingLeft')) - parseInt(outerEl.css('borderLeftWidth')) + adjustLeftOffset)
5683
  .width(windowWidth);
5513
  };
5514
 
5515
  SmartSliderResponsive.prototype.onResize = function (e) {
5516
+ if (!this.slider.mainAnimation || this.slider.mainAnimation.getState() != 'playing') {
5517
  this.doResize(e);
5518
  } else if (!this.delayedResizeAdded) {
5519
  this.delayedResizeAdded = true;
5631
  };
5632
 
5633
  SmartSliderResponsive.prototype.doResize = function (e, fixedMode, timeline, nextSlide, duration) {
5634
+
5635
  if (!this.disableTransitions) {
5636
  this.disableTransitions = true;
5637
  this.sliderElement.addClass('n2notransition');
5673
 
5674
  var windowWidth = customWidth > 0 ? customWidth : (document.body.clientWidth || document.documentElement.clientWidth),
5675
  outerEl = this.containerElement.parent(),
5676
+ outerElLeft = outerEl.offset().left,
5677
  outerElOffset;
5678
+
5679
  if (nextend.rtl.isRtl) {
5680
+ outerElOffset = windowWidth - (outerElLeft + outerEl.outerWidth());
5681
  } else {
5682
+ outerElOffset = outerElLeft;
5683
  }
5684
  this.containerElement.css(nextend.rtl.marginLeft, -outerElOffset - parseInt(outerEl.css('paddingLeft')) - parseInt(outerEl.css('borderLeftWidth')) + adjustLeftOffset)
5685
  .width(windowWidth);
library/media/dist/smartslider-frontend.min.js CHANGED
@@ -1,5 +1,5 @@
1
  N2Require("SmartSliderBackgroundImages",[],[],function(e,t,i){function s(t){this.device=null,this.slider=t,this.lazyLoad=t.parameters.lazyLoad,this.lazyLoadNeighbor=t.parameters.lazyLoadNeighbor,this.deviceDeferred=e.Deferred(),this.slider.sliderElement.one("SliderDevice",e.proxy(this.onSlideDeviceChangedFirst,this)),this.slider.sliderElement.on("visibleSlidesChanged",e.proxy(this.onVisibleSlidesChanged,this)),this.slider.sliderElement.on("slideCountChanged",e.proxy(this.onVisibleSlidesChanged,this))}return s.prototype.whenWithProgress=function(t){for(var i=0,s=e.Deferred(),r=0;r<t.length;r++)e.when(t[r]).done(function(){s.notify(++i,t.length)});return e.when.apply(e,t).done(function(){s.resolveWith(null,arguments)}),s},s.prototype.getBackgroundImages=function(){for(var e=[],t=0;t<this.slider.realSlides.length;t++)e.push(this.slider.realSlides[t].backgroundImage);return e},s.prototype.onVisibleSlidesChanged=function(){1==this.lazyLoad?this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)):2==this.lazyLoad&&(this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)))},s.prototype.onSlideDeviceChangedFirst=function(t,i){this.onSlideDeviceChanged(t,i),this.deviceDeferred.resolve(),this.slider.sliderElement.on("SliderDevice",e.proxy(this.onSlideDeviceChanged,this)),this.preLoadSlides=this._preLoadSlides,1==this.lazyLoad?(this.preLoadSlides=this.preloadSlidesLazyNeighbor,this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):2==this.lazyLoad?(e(window).on("load",e.proxy(this.preLoadAll,this)),this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):this.load=this.whenWithProgress(this.preLoadAll())},s.prototype.onSlideDeviceChanged=function(e,t){this.device=t;for(var i=0;i<this.slider.realSlides.length;i++)this.slider.realSlides[i].backgroundImage&&this.slider.realSlides[i].backgroundImage.updateBackgroundToDevice(t)},s.prototype.preLoadAll=function(){for(var e=[],t=0;t<this.slider.realSlides.length;t++)e.push(this.slider.realSlides[t].preLoad());return e},s.prototype._preLoadSlides=function(t){var i=[];"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);for(var s=0;s<t.length;s++)i.push(t[s].preLoad());return e.when.apply(e,i)},s.prototype.preloadSlidesLazyNeighbor=function(t){var i=[this._preLoadSlides(t)];if(this.lazyLoadNeighbor)for(var s=0,r=t[0].previousSlide,n=t[t.length-1].nextSlide;s<this.lazyLoadNeighbor;)i.push(r.preLoad()),r=r.previousSlide,i.push(n.preLoad()),n=n.nextSlide,s++;var o=e.Deferred();if("resolved"!=i[0].state()){var a=setTimeout(e.proxy(function(){this.slider.load.showSpinner("backgroundImage"+t[0].index),a=null},this),50);e.when.apply(e,i).done(e.proxy(function(){a?(clearTimeout(a),a=null):this.slider.load.removeSpinner("backgroundImage"+t[0].index),setTimeout(function(){o.resolve()},100)},this))}else setTimeout(function(){o.resolve()},100);return o},s.prototype.hack=function(){for(var e=0;e<this.slider.realSlides.length;e++)this.slider.realSlides[e].backgroundImage&&this.slider.realSlides[e].backgroundImage.hack()},s}),N2Require("SmartSliderLoad",[],[],function(e,t,i){function s(t,i){this.parameters=e.extend({fade:1,scroll:0},i),this.deferred=e.Deferred(),this.smartSlider=t,this.spinnerKey="fadePlaceholder",this.id=t.sliderElement.attr("id"),this.$window=e(window),this.spinner=e("#"+this.id+"-spinner")}return s.prototype.start=function(){if(this.parameters.scroll){var t=e(window);t.on("scroll."+this.id,e.proxy(this.onScroll,this)),this.onScroll()}else if(this.parameters.fade){this.loadingArea=e("#"+this.id+"-placeholder").eq(0),this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&this.smartSlider.backgroundImages.load.progress(e.proxy(function(e,t){i.html(Math.round(e/(t+1)*100)+"%")},this)),this.showSlider()}else this.showSlider()},s.prototype.onScroll=function(){this.$window.scrollTop()+this.$window.height()>this.smartSlider.sliderElement.offset().top+100&&(this.$window.off("scroll."+this.id),this.showSlider())},s.prototype.loadLayerImages=function(){var t=e.Deferred();return this.smartSlider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){t.resolve()}),t},s.prototype.showSlider=function(){e.when(this.smartSlider.responsive.ready,this.smartSlider.backgroundImages.load,this.loadLayerImages()).always(e.proxy(function(){this._showSlider()},this))},s.prototype._showSlider=function(t){this.smartSlider.responsive.isReadyToResize=!0,e.when.apply(e,this.smartSlider.widgetDeferreds).done(e.proxy(function(){this.smartSlider.responsive.invalidateResponsiveState=!0,this.smartSlider.responsive.doResize(),this.smartSlider.mainAnimation&&this.smartSlider.mainAnimation.setToStarterSlide(this.smartSlider.starterSlide),this.smartSlider.starterSlide.setStarterSlide(),this.smartSlider.sliderElement.trigger("BeforeVisible"),this.smartSlider.responsive.alignElement.addClass("n2-ss-slider-align-visible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.removeSpinner("fadePlaceholder"),e("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof t?t(this.deferred):this.deferred.resolve()},this))},s.prototype.loaded=function(e){this.deferred.done(e)},s.prototype.showSpinner=function(e){this.spinnerKey=e,this.spinner.appendTo(this.loadingArea).css("display","")},s.prototype.removeSpinner=function(e){this.spinnerKey==e&&(this.spinner.detach(),this.spinnerKey="")},s}),N2Require("scrollTracker",[],[],function(e,t,i){function s(){this.started=!1,this.items=[]}s.prototype.add=function(e,t,i){var s={$el:e,onVisible:t,onHide:i,state:"unknown"};this.items.push(s),this._onScroll(s,Math.max(document.documentElement.clientHeight,window.innerHeight)),this.started||this.start()},s.prototype.start=function(){this.started||(e(window).on("scroll.scrollTracker",e.proxy(this.onScroll,this)),this.started=!0)},s.prototype.onScroll=function(e){for(var t=Math.max(document.documentElement.clientHeight,window.innerHeight),i=0;i<this.items.length;i++)this._onScroll(this.items[i],t)},s.prototype._onScroll=function(e,t){var i=e.$el[0].getBoundingClientRect(),s=i.height>.7*t;!s&&(i.bottom-i.height<0||i.top-t+i.height>=0)||s&&(i.bottom<0||i.top>=i.height)?"hidden"!=e.state&&("function"==typeof e.onHide&&e.onHide(),e.state="hidden"):"visible"!=e.state&&("function"==typeof e.onVisible&&e.onVisible(),e.state="visible")},nextend.scrollTracker=new s}),N2Require("SmartSliderApi",[],[],function(e,t,i){function s(){this.sliders={},this.readys={},this._resetCounters=[]}return s.prototype.makeReady=function(e,t){if(this.sliders[e]=t,"undefined"!=typeof this.readys[e])for(var i=0;i<this.readys[e].length;i++)this.readys[e][i].call(t,t,t.sliderElement)},s.prototype.ready=function(e,t){"undefined"!=typeof this.sliders[e]?t.call(this.sliders[e],this.sliders[e],this.sliders[e].sliderElement):("undefined"==typeof this.readys[e]&&(this.readys[e]=[]),this.readys[e].push(t))},s.prototype.trigger=function(t,i){var s=n2(t),r=i.split(","),n=s.closest(".n2-ss-slide,.n2-ss-static-slide");if(r.length>1){-1==e.inArray(t,this._resetCounters)&&(this._resetCounters.push(t),n.on("layerAnimationSetStart.resetCounter",function(){s.data("eventCounter",0)}));var o=s.data("eventCounter")||0;i=r[o],o++,o>r.length-1&&(o=0),s.data("eventCounter",o)}n.triggerHandler(i)},s.prototype.applyAction=function(e,t){var i=n2(e).closest(".n2-ss-slider").data("ss");i[t].apply(i,Array.prototype.slice.call(arguments,2))},s.prototype.applyActionWithClick=function(){nextend.shouldPreventClick||this.applyAction.apply(this,arguments)},window.n2ss=new s,s}),N2Require("SmartSliderAbstract",[],[],function($,scope,undefined){function SmartSliderAbstract(e,t){this.startedDeferred=$.Deferred(),e instanceof n2&&(e="#"+e.attr("id"));var i=e.substr(1);return window[i]&&window[i]instanceof SmartSliderAbstract?!1:(this.isAdmin=!!t.admin,this.id=parseInt(i.replace("n2-ss-","")),window[i]=this,this.readyDeferred=$.Deferred(),void this.waitForExists(i,t))}return SmartSliderAbstract.prototype.kill=function(){this.killed=!0,$("#"+this.sliderElement.attr("id")+"-placeholder").remove(),this.sliderElement.closest(".n2-ss-align").remove()},SmartSliderAbstract.prototype.waitForExists=function(e,t){var i=$.Deferred(),s=function(){var t=$("#"+e);t.length?i.resolve(t):setTimeout(s,500)};i.done($.proxy(this.onSliderExists,this,e,t)),s()},SmartSliderAbstract.prototype.onSliderExists=function(e,t,i){if("SCRIPT"==i.prop("tagName")){var s=i.data("dependency"),r=i.data("delay"),n=$.proxy(function(){var s=$(i.html().replace(/<_s_c_r_i_p_t/g,"<script").replace(/<_\/_s_c_r_i_p_t/g,"</script"));i.replaceWith(s),this.waitForDimension($("#"+e),t),$(window).triggerHandler("n2Rocket",[this.sliderElement])},this);s&&$("#n2-ss-"+s).length?n2ss.ready(s,$.proxy(function(e){e.ready(n)},this)):r?setTimeout(n,r):n()}else this.waitForDimension(i,t)},SmartSliderAbstract.prototype.waitForDimension=function(e,t){var i=$.Deferred(),s=function(){var t=e.is(":visible");t?i.resolve():setTimeout(s,200)};s(),i.done($.proxy(this.onSliderHasDimension,this,e,t))},SmartSliderAbstract.prototype.onSliderHasDimension=function($sliderElement,parameters){if(this.killed=!1,this.responsive=!1,this.mainAnimationLastChangeTime=0,this.currentSlide=null,this.currentRealSlide=null,this.staticSlide=!1,this.isShuffled=!1,this.slides=[],this.visibleSlides=1,this.sliderElement=$sliderElement.data("ss",this),this.parameters=$.extend({admin:!1,playWhenVisible:1,playWhenVisibleAt:.5,perspective:1e3,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{drag:!1,touch:"horizontal",keyboard:!1,scroll:!1,tilt:!1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},foreverLayerAnimation:!1,parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:[],dynamicHeight:0,lightbox:[],lightboxDeviceImages:[],titles:[],descriptions:[],"background.parallax.tablet":0,"background.parallax.mobile":0,allowBGImageAttachmentFixed:1,particlejs:0},parameters),!(this.isAdmin||parameters.responsive.desktop&&parameters.responsive.tablet&&parameters.responsive.mobile)){var md=new MobileDetect(window.navigator.userAgent,801),isTablet=!!md.tablet(),isMobile=!!md.phone();if(!parameters.responsive.mobile&&isMobile||!parameters.responsive.tablet&&isTablet||!parameters.responsive.desktop&&!isTablet&&!isMobile)return void this.kill()}this.firstSlideReady=$.Deferred();try{eval(this.parameters.callbacks)}catch(e){console.error(e)}this.startVisibilityCheck(),n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",$.proxy(this.addWidget,this)),this.isAdmin&&(this.changeTo=function(){}),this.load=new scope.SmartSliderLoad(this,this.parameters.load),this.backgroundImages=new scope.SmartSliderBackgroundImages(this),this.__initSlides(),$.when(this.overrideFirstSlide()).done($.proxy(this.onFirstSlideInitialized,this)),navigator.userAgent.match("UCBrowser")&&$("html").addClass("n2-ucbrowser")},SmartSliderAbstract.prototype.overrideFirstSlide=function(){if("undefined"!=typeof window["ss"+this.id]){if("object"==typeof window["ss"+this.id])return window["ss"+this.id].done($.proxy(function(e){null!==e&&this.changeActiveBeforeLoad(e)},this));var e="undefined"!=typeof window["ss"+this.id]?parseInt(window["ss"+this.id]):null;null!==e&&this.changeActiveBeforeLoad(e)}else if(!this.isAdmin&&this.parameters.maintainSession&&"undefined"!=typeof sessionStorage){var t=sessionStorage.getItem("ss-"+this.id);null!==t&&this.changeActiveBeforeLoad(parseInt(t)),this.sliderElement.on("mainAnimationComplete",$.proxy(function(e,t,i,s){sessionStorage.setItem("ss-"+this.id,s)},this))}return!0},SmartSliderAbstract.prototype.changeActiveBeforeLoad=function(e){e>0&&e<this.realSlides.length&&this.starterSlide!=this.realSlides[e]&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[e],this.setActiveSlide(this.realSlides[e]))},SmartSliderAbstract.prototype.startCurrentSlideIndex=function(){this.currentRealSlide=this.currentSlide=this.starterSlide,this.setActiveSlide(this.currentSlide),parseInt(this.parameters.carousel)?this.initCarousel():this.initNotCarousel()},SmartSliderAbstract.prototype.onFirstSlideInitialized=function(){for(var i=0;i<this.realSlides.length;i++)this.realSlides[i].setNext(this.realSlides[i+1>this.realSlides.length-1?0:i+1]);this.startCurrentSlideIndex(),this.firstSlideReady.resolve(this.currentSlide);for(var j=0;j<this.parameters.initCallbacks.length;j++)new Function("$",this.parameters.initCallbacks[j]).call(this,$);if(this.widgets=new scope.SmartSliderWidgets(this),this.sliderElement.on({universalenter:$.proxy(function(e){$(e.target).closest(".n2-full-screen-widget").length||(this.sliderElement.addClass("n2-hover"),this.widgets.setState("hover",!0))},this),universalleave:$.proxy(function(e){e.stopPropagation(),this.sliderElement.removeClass("n2-hover"),this.widgets.setState("hover",!1)},this)}),this.controls={},this.parameters.blockrightclick&&this.sliderElement.bind("contextmenu",function(e){e.preventDefault()}),this.initMainAnimation(),this.initResponsiveMode(),!this.killed){try{var removeHoverClassCB=$.proxy(function(){this.sliderElement.removeClass("n2-has-hover"),this.sliderElement[0].removeEventListener("touchstart",removeHoverClassCB,window.n2passiveEvents?{passive:!0}:!1)},this);this.sliderElement[0].addEventListener("touchstart",removeHoverClassCB,window.n2passiveEvents?{passive:!0}:!1)}catch(e){}if(this.initControls(),this.startedDeferred.resolve(this),!this.isAdmin){var event="click";this.hasTouch()&&(event="n2click"),this.sliderElement.find("[data-n2click]").each(function(i,el){var el=$(el);el.on(event,function(){eval(el.data("n2click"))})}),this.sliderElement.find("[data-click]").each(function(i,el){var el=$(el).on("click",function(){eval(el.data("click"))}).css("cursor","pointer")}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(e){var el=$(this);2!=e.which&&4!=e.which||(e.preventDefault(),eval(el.data("n2middleclick")))}),this.sliderElement.find("[data-mouseenter]").each(function(i,el){var el=$(el).on("mouseenter",function(){eval(el.data("mouseenter"))})}),this.sliderElement.find("[data-mouseleave]").each(function(i,el){var el=$(el).on("mouseleave",function(){eval(el.data("mouseleave"))})}),this.sliderElement.find("[data-play]").each(function(i,el){var el=$(el).on("n2play",function(){eval(el.data("play"))})}),this.sliderElement.find("[data-pause]").each(function(i,el){var el=$(el).on("n2pause",function(){eval(el.data("pause"))})}),this.sliderElement.find("[data-stop]").each(function(i,el){var el=$(el).on("n2stop",function(){eval(el.data("stop"))})}),window.n2FocusAllowed==undefined&&(window.n2FocusAllowed=!1,$(window).on({keydown:function(){window.n2FocusAllowed=!0},keyup:function(){window.n2FocusAllowed=!1}})),this.sliderElement.find("a").on({focus:$.proxy(function(e){if(n2FocusAllowed){var t=this.findSlideByElement(e.currentTarget);t&&t!=this.currentRealSlide&&this.directionalChangeToReal(t.index)}},this)})}this.preReadyResolve(),this.sliderElement.find('[role="button"], [tabindex]').not("input,select,textarea").keypress(function(e){32!==e.charCode&&13!==e.charCode||(e.preventDefault(),$(e.target).click())}).on("mouseleave",function(e){$(e.currentTarget).blur()})}},SmartSliderAbstract.prototype.__initSlides=function(){for(var e=this.sliderElement.find(".n2-ss-slide"),t=0;t<e.length;t++)this.slides.push(new scope.FrontendSliderSlide(this,e.eq(t),t));this.starterSlide=this.slides[0];for(var t=0;t<this.slides.length;t++)this.slides[t].init(),1==this.slides[t].$element.data("first")&&(this.starterSlide=this.slides[t]);this.realSlides=this.slides,this.afterRawSlidesReady(),this.randomize(this.slides);var i=this.sliderElement.find(".n2-ss-static-slide");i.length&&(this.staticSlide=new scope.FrontendSliderStaticSlide(this,i))},SmartSliderAbstract.prototype.afterRawSlidesReady=function(){},SmartSliderAbstract.prototype.setVisibleSlides=function(e){e!=this.visibleSlides&&(this.visibleSlides=e,this.sliderElement.triggerHandler("visibleSlidesChanged"))},SmartSliderAbstract.prototype.getVisibleSlides=function(e){return 0==arguments.length&&(e=this.currentSlide),[e]},SmartSliderAbstract.prototype.findSlideBackground=function(e){return e.$element.find(".n2-ss-slide-background")},SmartSliderAbstract.prototype.getRealIndex=function(e){return e},SmartSliderAbstract.prototype.randomize=function(e){this.randomizeFirst(),this.parameters.randomize.randomize&&this.shuffleSlides(e)},SmartSliderAbstract.prototype.randomizeFirst=function(){this.parameters.randomize.randomizeFirst&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[Math.floor(Math.random()*this.realSlides.length)],this.setActiveSlide(this.starterSlide),console.log("randomize first"))},SmartSliderAbstract.prototype.shuffleSlides=function(e){e.sort(function(){return.5-Math.random()});for(var t=e[0].$element.parent(),i=0;i<e.length;i++)e[i].$element.appendTo(t),e[i].setIndex(i);this.isShuffled=!0},SmartSliderAbstract.prototype.addWidget=function(e,t){this.widgetDeferreds.push(t)},SmartSliderAbstract.prototype.started=function(e){this.startedDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.preReadyResolve=function(){setTimeout($.proxy(this._preReadyResolve,this),1)},SmartSliderAbstract.prototype._preReadyResolve=function(){this.load.start(),this.load.loaded($.proxy(this.readyResolve,this))},SmartSliderAbstract.prototype.readyResolve=function(){$(window).scroll(),this.readyDeferred.resolve()},SmartSliderAbstract.prototype.ready=function(e){this.readyDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.startVisibilityCheck=function(){this.visibleDeferred=$.Deferred(),this.parameters.playWhenVisible?this.ready($.proxy(function(){$(window).on("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.checkIfVisible()},this)):this.ready($.proxy(function(){this.visibleDeferred.resolve()},this))},SmartSliderAbstract.prototype.checkIfVisible=function(){var e=$(window).scrollTop(),t=$(window).height(),i=this.sliderElement.offset().top,s=i+Math.min(this.sliderElement.height(),t)*this.parameters.playWhenVisibleAt,r=i+Math.min(this.sliderElement.height(),t)*(1-this.parameters.playWhenVisibleAt);(this.isAdmin||s>=e&&e+t>=r)&&($(window).off("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.visibleDeferred.resolve())},SmartSliderAbstract.prototype.visible=function(e){this.visibleDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.isPlaying=function(){return"ended"!=this.mainAnimation.getState()},SmartSliderAbstract.prototype.focus=function(e){var t=$.Deferred();if("undefined"==typeof e&&(e=0),this.responsive.parameters.focusUser&&!e||this.responsive.parameters.focusAutoplay&&e){var i=this.sliderElement.offset().top-(this.responsive.verticalOffsetSelectors.height()||0);$(window).scrollTop()!=i?$("html, body").animate({scrollTop:i},400,$.proxy(function(){t.resolve()},this)):t.resolve()}else t.resolve();return t},SmartSliderAbstract.prototype.initNotCarousel=function(){this.next=function(e,t){var i=this.currentSlide.index+1;return i<this.slides.length?this.changeTo(i,!1,e,t):!1},this.previous=function(e,t){var i=this.currentSlide.index-1;return i>=0?this.changeTo(i,!0,e,t):!1},this.isChangePossible=function(e){var t=!1;return"next"==e?(t=this.currentSlide.index+1,t>=this.slides.length&&(t=!1)):"previous"==e&&(t=this.currentSlide.index-1,0>t&&(t=!1)),t!==!1&&t!=this.currentSlide.index};var e=$.proxy(function(e){0==e?this.widgets.setState("nonCarouselFirst",!0):this.widgets.setState("nonCarouselFirst",!1),e==this.slides.length-1?this.widgets.setState("nonCarouselLast",!0):this.widgets.setState("nonCarouselLast",!1)},this);this.startedDeferred.done($.proxy(function(){e(this.currentSlide.index)},this)),this.sliderElement.on("sliderSwitchTo",function(t,i){e(i)})},SmartSliderAbstract.prototype.isChangePossibleCarousel=function(e){var t=!1;return"next"==e?(t=this.currentSlide.index+1,t>=this.slides.length&&(t=0)):"previous"==e&&(t=this.currentSlide.index-1,0>t&&(t=this.slides.length-1)),t!==!1&&t!=this.currentSlide.index},SmartSliderAbstract.prototype.initCarousel=function(){this.next=this.nextCarousel,this.previous=this.previousCarousel,this.isChangePossible=this.isChangePossibleCarousel},SmartSliderAbstract.prototype.nextCarousel=function(e,t){var i=this.currentSlide.index+1;return i>=this.slides.length&&(i=0),this.changeTo(i,!1,e,t)},SmartSliderAbstract.prototype.previousCarousel=function(e,t){var i=this.currentSlide.index-1;return 0>i&&(i=this.slides.length-1),this.changeTo(i,!0,e,t)},SmartSliderAbstract.prototype.directionalChangeToReal=function(e){this.directionalChangeTo(e)},SmartSliderAbstract.prototype.directionalChangeTo=function(e){e>this.currentSlide.index?this.changeTo(e,!1):this.changeTo(e,!0)},SmartSliderAbstract.prototype.changeTo=function(e,t,i,s){if(e=parseInt(e),e!=this.currentSlide.index){this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)]);var r=$.now();return $.when(this.backgroundImages.preLoadSlides(this.getVisibleSlides(this.slides[e])),this.focus(i)).done($.proxy(function(){if(this.mainAnimationLastChangeTime<=r){this.mainAnimationLastChangeTime=r;var n=this.mainAnimation.getState();if("ended"==n){"undefined"==typeof i&&(i=!1);var o=this.mainAnimation;"undefined"!=typeof s&&(o=s),this._changeTo(e,t,i,s),o.changeTo(this.currentSlide,this.slides[e],t,i),this._changeCurrentSlide(e)}else"playing"==n&&(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",$.proxy(function(){this.changeTo.call(this,e,t,i,s)},this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}},this)),!0}return!1},SmartSliderAbstract.prototype._changeCurrentSlide=function(e){this.currentRealSlide=this.currentSlide=this.slides[e]},SmartSliderAbstract.prototype._changeTo=function(e,t,i,s){},SmartSliderAbstract.prototype.revertTo=function(e,t){this.unsetActiveSlide(this.slides[t]),this.setActiveSlide(this.slides[e]),this._changeCurrentSlide(e),this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)])},SmartSliderAbstract.prototype.setActiveSlide=function(e){e.$element.addClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.unsetActiveSlide=function(e){e.$element.removeClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.findSlideByElement=function(e){e=$(e);for(var t=0;t<this.realSlides.length;t++)if(1===this.realSlides[t].$element.has(e).length)return this.realSlides[t];return!1},SmartSliderAbstract.prototype.findSlideIndexByElement=function(e){var t=this.findSlideByElement(e);return t?t:-1},SmartSliderAbstract.prototype.initMainAnimation=function(){this.mainAnimation=!1},SmartSliderAbstract.prototype.initResponsiveMode=function(){this.dimensions=this.responsive.responsiveDimensions},SmartSliderAbstract.prototype.hasTouch=function(){return"0"!=this.parameters.controls.touch&&this.slides.length>1},SmartSliderAbstract.prototype.initControls=function(){this.parameters.admin||(this.hasTouch()&&new scope.SmartSliderControlTouch(this,this.parameters.controls.touch,{fallbackToMouseEvents:this.parameters.controls.drag}),this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new scope.SmartSliderControlKeyboard(this,this.controls.touch._direction.axis):new scope.SmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.scroll&&new scope.SmartSliderControlScroll(this),this.parameters.controls.tilt&&new scope.SmartSliderControlTilt(this),this.controlAutoplay=new scope.SmartSliderControlAutoplay(this,this.parameters.autoplay),this.controlFullscreen=new scope.SmartSliderControlFullscreen(this))},SmartSliderAbstract.prototype.getSlideIndex=function(e){return e},SmartSliderAbstract.prototype.slideToID=function(e,t){for(var i=0;i<this.realSlides.length;i++)if(this.realSlides[i].id==e)return this.slide(this.getSlideIndex(i),t);var s=$('[data-id="'+e+'"]').closest(".n2-ss-slider");if(s.length&&this.id==s.data("ss").id)return!0;if(s.length){var r=0;return"undefined"!=typeof n2ScrollOffsetSelector&&(r=n2(n2ScrollOffsetSelector).outerHeight()),n2("html, body").animate({scrollTop:s.offset().top-r},400),s.data("ss").slideToID(e,t)}},SmartSliderAbstract.prototype.slide=function(e,t){return e>=0&&e<this.slides.length?"undefined"==typeof t?parseInt(this.parameters.carousel)&&this.currentSlide.index==this.slides.length-1&&0==e?this.next():this.currentSlide.index>e?this.changeTo(e,!0):this.changeTo(e):this.changeTo(e,!t):!1},SmartSliderAbstract.prototype.startAutoplay=function(e){return"undefined"!=typeof this.controlAutoplay?(this.controlAutoplay.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"),!0):!1},SmartSliderAbstract}),N2Require("SmartSliderWidgets",[],[],function($,scope,undefined){function SmartSliderWidgets(e){this.slider=e,this.sliderElement=e.sliderElement.on("BeforeVisible",$.proxy(this.onReady,this)),this.widgets={},this.excludedSlides={},this.states={hover:!1,nonCarouselFirst:!1,nonCarouselLast:!1,currentSlideIndex:-1}}return SmartSliderWidgets.prototype.setState=function(e,t){this.states[e]!=t&&(this.states[e]=t,this.onStateChange())},SmartSliderWidgets.prototype.onStateChange=function(){var e={};for(var t in this.widgets)this.widgets[t].hasClass("n2-ss-widget-display-hover")?this.states.hover?e[t]=!0:e[t]=!1:e[t]=!0,this.excludedSlides[t]!=undefined&&-1!=$.inArray(this.states.currentSlideIndex+1,this.excludedSlides[t])&&(e[t]=!1);this.states.nonCarouselFirst&&(e.previous=!1),this.states.nonCarouselLast&&(e.next=!1);for(var t in this.widgets)this.widgets[t].toggleClass("n2-ss-widget-hidden",!e[t])},SmartSliderWidgets.prototype.onReady=function(){this.dimensions=this.slider.dimensions,this.widgets={previous:this.sliderElement.find(".nextend-arrow-previous"),next:this.sliderElement.find(".nextend-arrow-next"),bullet:this.sliderElement.find(".n2-ss-control-bullet"),autoplay:this.sliderElement.find(".nextend-autoplay"),indicator:this.sliderElement.find(".nextend-indicator"),bar:this.sliderElement.find(".nextend-bar"),thumbnail:this.sliderElement.find(".nextend-thumbnail"),shadow:this.sliderElement.find(".nextend-shadow"),fullscreen:this.sliderElement.find(".nextend-fullscreen"),html:this.sliderElement.find(".nextend-widget-html")},this.$vertical=this.sliderElement.find('[data-position="above"],[data-position="below"]').not(".nextend-shadow");var e=!1;for(var t in this.widgets){var i=this.widgets[t].attr("data-exclude-slides");if(i!=undefined){for(var s=i.split(","),r=s.length-1;r>=0;r--){var n=s[r].split("-");if(2==n.length){var o=parseInt(n[0]),a=parseInt(n[1]);if(a>=o)for(var l=o;a>=l;l++)s.push(l)}else s[r]=parseInt(s[r])}s.length>0&&(this.excludedSlides[t]=s,e=!0)}}if(e){var d=$.proxy(function(e,t){this.setState("currentSlideIndex",t)},this);d(null,this.slider.currentRealSlide.index),this.slider.sliderElement.on("sliderSwitchTo",d)}this.variableElementsDimension={width:this.sliderElement.find("[data-sswidth]"),height:this.sliderElement.find("[data-ssheight]")},this.variableElements={top:this.sliderElement.find("[data-sstop]"),right:this.sliderElement.find("[data-ssright]"),bottom:this.sliderElement.find("[data-ssbottom]"),left:this.sliderElement.find("[data-ssleft]")},this.slider.sliderElement.on("SliderAnimatedResize",$.proxy(this.onAnimatedResize,this)),this.slider.sliderElement.on("SliderResize",$.proxy(this.onResize,this)),this.slider.sliderElement.one("slideCountChanged",$.proxy(function(){this.onResize(this.slider.responsive.lastRatios)},this)),this.onResize(this.slider.responsive.lastRatios),this.onStateChange()},SmartSliderWidgets.prototype.onAnimatedResize=function(e,ratios,timeline,duration){for(var key in this.widgets){var el=this.widgets[key],visible=el.is(":visible");this.dimensions[key+"width"]=visible?el.outerWidth(!1):0,this.dimensions[key+"height"]=visible?el.outerHeight(!1):0}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible")){var to={};try{to[k]=eval(el.data("ss"+k))+"px";for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}timeline.to(el,duration,to,0)}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var to={};to[k]=eval(el.data("ss"+k))+"px",timeline.to(el,duration,to,0)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}},SmartSliderWidgets.prototype.onResize=function(e,ratios,responsive,timeline){if(!timeline){for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,0)}for(var key in this.widgets){var el=this.widgets[key],visible=el.length&&el.is(":visible");el.length&&el.is(":visible")?(this.dimensions[key+"width"]=el.outerWidth(!1),this.dimensions[key+"height"]=el.outerHeight(!1)):(this.dimensions[key+"width"]=0,this.dimensions[key+"height"]=0)}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,last)}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible"))try{el.css(k,eval(el.data("ss"+k))+"px");for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k));
2
  }}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var value=eval(el.data("ss"+k));el.css(k,value+"px"),el.data("n2Last"+k,value)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}this.slider.responsive.refreshStaticSizes()}},SmartSliderWidgets}),N2Require("SmartSliderBackgroundAnimationAbstract",[],[],function(e,t,i){function s(e,t,i,s,r,n){this.durationMultiplier=r,this.original={currentImage:t,nextImage:i},this.animationProperties=s,this.reversed=n,this.timeline=e.timeline,this.containerElement=e.bgAnimationElement,this.shiftedBackgroundAnimation=e.parameters.shiftedBackgroundAnimation,this.clonedImages={}}return s.prototype.postSetup=function(){},s.prototype.ended=function(){},s.prototype.revertEnded=function(){},s.prototype.placeNextImage=function(){this.clonedImages.nextImage=this.original.nextImage.clone().css({position:"absolute",top:0,left:0}),NextendTween.set(this.clonedImages.nextImage,{transform:"none"}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({position:"absolute",top:0,left:0}),NextendTween.set(this.clonedImages.currentImage,{transform:"none"}),this.containerElement.append(this.clonedImages.currentImage)},s.prototype.hideOriginals=function(){this.original.currentImage.css("opacity",0),this.original.nextImage.css("opacity",0)},s.prototype.resetAll=function(){this.original.currentImage.css("opacity",1),this.original.nextImage.css("opacity",1),this.containerElement.html("")},s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationCubic",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,fullCube:!0,tiles:{delay:.2,sequence:"Parallel"},depth:50,main:{side:"Left",duration:.5,ease:"easeInOutCubic",direction:"horizontal",real3D:!0},pre:[],post:[]},this.animationProperties);i.fullCube=!0,this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=r.depth;switch(a){case"width":a=i;break;case"height":a=s}switch(r.main.side){case"Top":case"Bottom":a=s;break;case"Left":case"Right":a=i}r.main.real3D&&NextendTween.set(t.get(0),{transformStyle:"preserve-3d"});var l=e('<div class="cuboid"></div>').css({position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}).appendTo(t);NextendTween.set(l.get(0),{transformStyle:"preserve-3d",z:-a/2});var d=0;"horizontal"==r.main.direction&&(d=180);var h=this.getSide(l,i,s,0,0,-a/2,180,0,d),p={Back:h,BackInvert:h};return(r.fullCube||"vertical"==r.main.direction)&&(p.Bottom=this.getSide(l,i,a,0,s-a/2,0,-90,0,0),p.Top=this.getSide(l,i,a,0,-a/2,0,90,0,0)),p.Front=this.getSide(l,i,s,0,0,a/2,0,0,0),(r.fullCube||"horizontal"==r.main.direction)&&(p.Left=this.getSide(l,a,s,-a/2,0,0,0,-90,0),p.Right=this.getSide(l,a,s,i-a/2,0,0,0,90,0)),p.Front.append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})),p[r.main.side].append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})),l},s.prototype.getSide=function(t,i,s,r,n,o,a,l,d){var h=e('<div class="n2-3d-side"></div>').css({width:i,height:s}).appendTo(t);return NextendTween.set(h.get(0),{x:r,y:n,z:o,rotationX:a,rotationY:l,rotationZ:d,backfaceVisibility:"hidden"}),h},s.prototype.addAnimation=function(e,t){var i=e.duration;delete e.duration,this.timeline.to(t,i*this.durationMultiplier,e)},s.prototype.transform=function(e,t,i){for(var s=0;s<e.pre.length;s++){var r=e.pre[s],n=r.duration*this.durationMultiplier;this.timeline.to(t,n,r,i),i+=n}this["transform"+e.main.side](e.main,t,i),i+=e.main.duration;for(var s=0;s<e.post.length;s++){var r=e.post[s],n=r.duration*this.durationMultiplier;this.timeline.to(t,n,r,i),i+=n}},s.prototype.transformLeft=function(e,t,i){this._transform(e,t,i,0,90,0)},s.prototype.transformRight=function(e,t,i){this._transform(e,t,i,0,-90,0)},s.prototype.transformTop=function(e,t,i){this._transform(e,t,i,-90,0,0)},s.prototype.transformBottom=function(e,t,i){this._transform(e,t,i,90,0,0)},s.prototype.transformBack=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,180,0):this._transform(e,t,i,180,0,0)},s.prototype.transformBackInvert=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,-180,0):this._transform(e,t,i,-180,0,0)},s.prototype._transform=function(e,t,i,s,r,n){this.timeline.to(t,e.duration*this.durationMultiplier,{rotationX:s,rotationY:r,rotationZ:n,ease:e.ease},i)},s}),N2Require("SmartSliderBackgroundAnimationExplode",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.transform=function(t,i,s){var r=e.extend(!0,{},t.main.current);r.rotationX=90*(3*Math.random()-1),r.rotationY=90*(3*Math.random()-1),r.rotationZ=90*(3*Math.random()-1),this.timeline.to(i.tile,t.main.duration*this.durationMultiplier,r,s)},s}),N2Require("SmartSliderBackgroundAnimationExplodeReversed",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeCurrentImage(),this.clonedImages.currentImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{next:a,tile:t}},s.prototype.transform=function(t,i,s){var r=e.extend(!0,{},t.main.current);r.rotationX=90*(3*Math.random()-1),r.rotationY=90*(3*Math.random()-1),r.rotationZ=30*(3*Math.random()-1),this.timeline.from(i.tile,t.main.duration*this.durationMultiplier,r,s)},s}),N2Require("SmartSliderBackgroundAnimationFlat",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,tiles:{cropOuter:!1,crop:!0,delay:0,sequence:"Parallel"},main:{type:"next",duration:.5,real3D:!0,zIndex:1,current:{ease:"easeInOutCubic"},next:{ease:"easeInOutCubic"}}},this.animationProperties);this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i),i.tiles.cropOuter&&this.container.css("overflow","hidden")},s.prototype.renderTile=function(t,i,s,r,n,o){r.tiles.crop&&t.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t),l=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:1}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return r.main.real3D&&(NextendTween.set(t.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(a.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(l.get(0),{transformStyle:"preserve-3d"})),{current:a,next:l}},s.prototype.transform=function(e,t,i){var s=e.main;"current"!=s.type&&"both"!=s.type||this.timeline.to(t.current,s.duration*this.durationMultiplier,s.current,i),"next"!=s.type&&"both"!=s.type||this.timeline.from(t.next,s.duration*this.durationMultiplier,s.next,i)},s}),N2Require("SmartSliderBackgroundAnimationSlixes",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:2,rows:2,main:{duration:2,zIndex:2}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){this.container.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.animate=function(t,i,s){this.timeline.to(s[0][0].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},0),this.timeline.to(s[0][1].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},.3),this.timeline.to(s[1][0].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.15),this.timeline.to(s[1][1].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.45),e("<div />").css({position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}).prependTo(this.clonedImages.nextImage.parent()).append(this.clonedImages.nextImage),this.timeline.fromTo(this.clonedImages.nextImage,t.main.duration*this.durationMultiplier,{scale:1.3},{scale:1},.45)},s}),N2Require("SmartSliderBackgroundAnimationTiled",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments),this.setup()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.setup=function(t){var i=e("<div></div>").css({position:"absolute",left:0,top:0,width:this.w,height:this.h});this.container=i,NextendTween.set(i.get(0),{force3D:!0,perspective:1e3});for(var s=[],r=[],n=t.columns,o=t.rows,a=Math.floor(this.w/n),l=Math.floor(this.h/o),d=this.w-n*a,h=Math.ceil(d/n),p=this.h-o*l,c=Math.ceil(p/o),u=0,m=0;n>m;m++){s[m]=[];var f=a,g=0;if(d>0){var y=d>=h?h:d;f+=y,d-=y}for(var v=p,S=0;o>S;S++){var b=l;if(v>0){var y=v>=c?c:v;b+=y,v-=y}var x=e('<div class="tile tile-'+m+"-"+S+'"></div>').css({position:"absolute",top:g+"px",left:u+"px",width:f+"px",height:b+"px",zIndex:-Math.abs(m-parseInt(n/2))+n-Math.abs(S-parseInt(o/2))}).appendTo(i),w=this.renderTile(x,f,b,t,u,g);r.push(w),s[m][S]=w,g+=b}u+=f}i.appendTo(this.containerElement),this.preSetup(),this.animate(t,r,s)},s.prototype.animate=function(t,i,s){this["sequence"+t.tiles.sequence](e.proxy(this.transform,this,t),i,s,t.tiles.delay*this.durationMultiplier)},s.prototype.sequenceParallel=function(e,t){e(t,null)},s.prototype.sequenceRandom=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<t.length;n++)e(t[n],r+Math.random()*s)},s.prototype.sequenceForwardCol=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<t.length;n++)e(t[n],r+s*n)},s.prototype.sequenceBackwardCol=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=t.length-1,o=0;o<t.length;o++)e(t[o],r+s*(n-o))},s.prototype.sequenceForwardRow=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*n),n++},s.prototype.sequenceBackwardRow=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=t.length-1,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*n),n--},s.prototype.sequenceForwardDiagonal=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<i[0].length;n++)for(var o=0;o<i.length;o++)e(i[o][n],r+s*(o+n))},s.prototype.sequenceBackwardDiagonal=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=i[0].length+i.length-2,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*(n-a-o))},s}),N2Require("SmartSliderBackgroundAnimationTurn",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments);var i=e.extend(!0,{perspective:1.5*this.w,duration:.8,direction:"left"},this.animationProperties);this.reversed&&("left"==i.direction?i.direction="right":i.direction="left");var s=parseInt(this.w/2);this.clonedCurrent().css({position:"absolute",top:0,left:"left"==i.direction?-1*(this.w/2):0}),this.clonedNext().css({position:"absolute",top:0,left:"left"==i.direction?0:-1*(this.w/2)});var r=e('<div class="tab"></div>').css({width:s,height:this.h,position:"absolute",top:"0px",left:"left"==i.direction?s:"0","z-index":101});NextendTween.set(r,{transformStyle:"preserve-3d",transformOrigin:"left"==i.direction?"0px 0px":s+"px 0px"});var n=e('<div class="n2-ff-3d"></div>').append(this.clonedCurrent()).css({width:s,height:this.h,position:"absolute",top:0,left:0,"-webkit-transform":"translateZ(0.1px)",overflow:"hidden"}).appendTo(r);NextendTween.set(n,{backfaceVisibility:"hidden",transformStyle:"preserve-3d"});var o=e('<div class="n2-ff-3d"></div>').append(this.clonedNext()).appendTo(r).css({width:s,height:this.h,position:"absolute",top:0,left:0,overflow:"hidden"});NextendTween.set(o,{backfaceVisibility:"hidden",transformStyle:"preserve-3d",rotationY:180,rotationZ:0});var a=e("<div></div>").append(this.clonedCurrent().clone().css("left","left"==i.direction?0:-s)).css({position:"absolute",top:0,left:"left"==i.direction?"0":s,width:s,height:this.h,zIndex:100,overflow:"hidden"}),l=e('<div class="overlay"></div>').css({position:"absolute",top:0,left:"left"==i.direction?s:0,width:s,height:this.h,background:"#000",opacity:1,overflow:"hidden"}),d=e("<div></div>").css({width:this.w,height:this.h,position:"absolute",top:0,left:0}).append(r).append(a).append(l);NextendTween.set(d,{perspective:i.perspective,perspectiveOrigin:"50% 50%"}),this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),this.containerElement.append(d),this.preSetup(),this.timeline.to(r.get(0),i.duration*this.durationMultiplier,{rotationY:"left"==i.direction?-180:180},0),this.timeline.to(l.get(0),i.duration*this.durationMultiplier,{opacity:0},0)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationFluxAbstract",["SmartSliderBackgroundAnimationAbstract"],[],function(e,t,i){function s(){this.shiftedPreSetup=!1,this._clonedCurrent=!1,this._clonedNext=!1,t.SmartSliderBackgroundAnimationAbstract.prototype.constructor.apply(this,arguments),this.w=this.original.currentImage.width(),this.h=this.original.currentImage.height()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationAbstract.prototype),s.prototype.constructor=s,s.prototype.clonedCurrent=function(){return this._clonedCurrent||(this._clonedCurrent=this.original.currentImage.clone().css({width:this.w,height:this.h}),this._clonedCurrent.find(".n2-ss-slide-background-video").remove(),NextendTween.set(this._clonedCurrent,{transform:"none"})),this._clonedCurrent},s.prototype.clonedNext=function(){return this._clonedNext||(this._clonedNext=this.original.nextImage.clone().css({width:this.w,height:this.h}),this._clonedNext.find(".n2-ss-slide-background-video").remove(),NextendTween.set(this._clonedNext,{transform:"none"})),this._clonedNext},s.prototype.preSetup=function(){0!=this.shiftedBackgroundAnimation?this.shiftedPreSetup=!0:this._preSetup()},s.prototype._preSetup=function(e){this.timeline.to(this.original.currentImage.get(0),this.getExtraDelay(),{opacity:0},0),this.original.nextImage.css("opacity",0)},s.prototype.postSetup=function(){this.timeline.to(this.original.nextImage.get(0),this.getExtraDelay(),{opacity:1})},s.prototype.getExtraDelay=function(){return.2},s.prototype.ended=function(){this.original.currentImage.css("opacity",1),this.containerElement.html("")},s.prototype.revertEnded=function(){this.original.nextImage.css("opacity",1),this.containerElement.html("")},s}),N2Require("SmartSliderMainAnimationAbstract",[],[],function(e,t,i){function s(t,i){this.state="ended",this.isTouch=!1,this.isReverseAllowed=!0,this.isReverseEnabled=!1,this.reverseSlideIndex=null,this.isNoAnimation=!1,this.slider=t,this.parameters=e.extend({duration:1500,ease:"easeInOutQuint"},i),this.parameters.duration/=1e3,this.sliderElement=t.sliderElement,this.timeline=new NextendTimeline({paused:!0}),this.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s){this._revertCurrentSlideIndex=i,this._revertNextSlideIndex=s},this))}return s.prototype.setToStarterSlide=function(e){},s.prototype.enableReverseMode=function(){this.isReverseEnabled=!0,this.reverseTimeline=new NextendTimeline({paused:!0}),this.sliderElement.triggerHandler("reverseModeEnabled",this.reverseSlideIndex)},s.prototype.disableReverseMode=function(){this.isReverseEnabled=!1},s.prototype.setTouch=function(e){this.isTouch=e},s.prototype.setTouchProgress=function(e){this.isReverseEnabled?this._setTouchProgressWithReverse(e):this._setTouchProgress(e)},s.prototype._setTouchProgress=function(e){"ended"!=this.state&&(0>=e?this.timeline.progress(Math.max(e,1e-6),!1):e>=0&&1>=e&&this.timeline.progress(e))},s.prototype._setTouchProgressWithReverse=function(e){0==e?(this.reverseTimeline.progress(0),this.timeline.progress(e,!1)):e>=0&&1>=e?(this.reverseTimeline.progress(0),this.timeline.progress(e)):0>e&&e>=-1&&(this.timeline.progress(0),this.reverseTimeline.progress(Math.abs(e)))},s.prototype.setTouchEnd=function(e,t,i){"ended"!=this.state&&(this.isReverseEnabled?this._setTouchEndWithReverse(e,t,i):this._setTouchEnd(e,t,i))},s.prototype._setTouchEnd=function(e,t,i){e&&t>0?(this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse(),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},s.prototype._setTouchEndWithReverse=function(e,t,i){e?0>t&&this.reverseTimeline.totalDuration()>0?(this.fixTouchDuration(this.reverseTimeline,t,i),this.reverseTimeline.play(),this.willRevertTo(this.reverseSlideIndex,this._revertNextSlideIndex)):(this.willCleanSlideIndex(this.reverseSlideIndex),this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(0>t?(this.revertCB(this.reverseTimeline),this.fixTouchDuration(this.reverseTimeline,1-t,i),this.reverseTimeline.reverse()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse()),this.willCleanSlideIndex(this.reverseSlideIndex),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},s.prototype.fixTouchDuration=function(e,t,i){var s=e.totalDuration(),r=Math.max(s/3,Math.min(s,i/Math.abs(t)/1e3));r!=s&&e.totalDuration(r)},s.prototype.getState=function(){return this.state},s.prototype.timeScale=function(){return arguments.length>0?(this.timeline.timeScale(arguments[0]),this):this.timeline.timeScale()},s.prototype.changeTo=function(t,i,s,r){if(this._initAnimation(t,i,s),this.state="initAnimation",this.timeline.paused(!0),this.timeline.eventCallback("onStart",this.onChangeToStart,[t,i,r],this),this.timeline.eventCallback("onComplete",this.onChangeToComplete,[t,i,r],this),this.timeline.eventCallback("onReverseComplete",null),this.revertCB=e.proxy(function(e){e.eventCallback("onReverseComplete",this.onReverseChangeToComplete,[i,t,r],this)},this),this.slider.parameters.dynamicHeight){var n=new NextendTimeline;this.slider.responsive.doResize(null,!1,n,i,.6),this.timeline.add(n)}this.isTouch||this.timeline.play()},s.prototype.willRevertTo=function(t,i){this.sliderElement.triggerHandler("mainAnimationWillRevertTo",[t,i]),this.sliderElement.one("mainAnimationComplete",e.proxy(this.revertTo,this,t,i))},s.prototype.revertTo=function(e,t){this.slider.revertTo(e,t),this.slider.slides[t].triggerHandler("mainAnimationStartInCancel")},s.prototype.willCleanSlideIndex=function(t){this.sliderElement.one("mainAnimationComplete",e.proxy(this.cleanSlideIndex,this,t))},s.prototype.cleanSlideIndex=function(){},s.prototype._initAnimation=function(e,t,i){},s.prototype.onChangeToStart=function(e,t,i){this.state="playing";var s=[this,e.index,t.index,i];this.sliderElement.trigger("mainAnimationStart",s),this.slider.slides[e.index].trigger("mainAnimationStartOut",s),this.slider.slides[t.index].trigger("mainAnimationStartIn",s)},s.prototype.onChangeToComplete=function(e,t,i){var s=[this,e.index,t.index,i];this.clearTimelines(),this.disableReverseMode(),this.slider.slides[e.index].trigger("mainAnimationCompleteOut",s),this.slider.slides[t.index].trigger("mainAnimationCompleteIn",s),this.state="ended",this.sliderElement.trigger("mainAnimationComplete",s)},s.prototype.onReverseChangeToComplete=function(e,t,i){s.prototype.onChangeToComplete.apply(this,arguments)},s.prototype.clearTimelines=function(){this.revertCB=function(){},this.timeline.clear(),this.timeline.timeScale(1)},s.prototype.getEase=function(){return this.isTouch?"linear":this.parameters.ease},s}),N2Require("SmartSliderControlAutoplay",[],[],function(e,t,i){"use strict";function s(t,i){this._paused=!0,this._wait=!1,this._disabled=!1,this._currentCount=0,this._progressEnabled=!1,this.timeline=null,this.hasButton=!1,this.deferredsMediaPlaying=null,this.deferredMouseLeave=null,this.deferredMouseEnter=null,this.mainAnimationDeferred=!0,this.autoplayDeferred=null,this.slider=t,this.parameters=e.extend({enabled:0,start:1,duration:8e3,autoplayToSlide:0,autoplayToSlideIndex:-1,allowReStart:0,pause:{mouse:"enter",click:!0,mediaStarted:!0},resume:{click:0,mouse:0,mediaEnded:!0}},i),this.parameters.enabled?(this.parameters.duration/=1e3,t.controls.autoplay=this,this.deferredsExtraPlaying={},this.slider.visible(e.proxy(this.onReady,this))):this.disable(),t.controls.autoplay=this}var r=!1;return s.prototype.onReady=function(){this.autoplayDeferred=e.Deferred();var t={_progress:0};this.timeline=NextendTween.to(t,this.getSlideDuration(this.slider.currentSlide.index),{_progress:1,paused:!0,onComplete:e.proxy(this.next,this)}),this._progressEnabled&&this.enableProgress();var i=this.slider.sliderElement;if(this.parameters.start?this.continueAutoplay():this.pauseAutoplayExtraPlaying(null,"autoplayButton"),i.on("mainAnimationStart.autoplay",e.proxy(this.onMainAnimationStart,this)),"0"!=this.parameters.pause.mouse)switch(i.on("touchend.autoplay",function(){r=!0,setTimeout(function(){r=!1},300)}),this.parameters.pause.mouse){case"enter":i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseEnter,this)),i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseEnterEnded,this));break;case"leave":i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseLeave,this)),i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseLeaveEnded,this))}if(this.parameters.pause.click&&!this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(this.pauseAutoplayUniversal,this)):!this.parameters.pause.click&&this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this)):this.parameters.pause.click&&this.parameters.resume.click&&i.on("universalclick.autoplay",e.proxy(function(e){this._paused?this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"):this.pauseAutoplayUniversal(e)},this)),this.parameters.pause.mediaStarted&&(this.deferredsMediaPlaying={},i.on("mediaStarted.autoplay",e.proxy(this.pauseAutoplayMediaPlaying,this)),i.on("mediaEnded.autoplay",e.proxy(this.pauseAutoplayMediaPlayingEnded,this))),"0"!=this.parameters.resume.mouse)switch(this.parameters.resume.mouse){case"enter":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseenter.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseenter.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this));break;case"leave":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseleave.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseleave.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this))}this.parameters.resume.mediaEnded&&i.on("mediaEnded.autoplay",e.proxy(this.continueAutoplay,this)),i.on("autoplayExtraWait.autoplay",e.proxy(this.pauseAutoplayExtraPlaying,this)),i.on("autoplayExtraContinue.autoplay",e.proxy(this.pauseAutoplayExtraPlayingEnded,this)),this.slider.sliderElement.on("mainAnimationComplete.autoplay",e.proxy(this.onMainAnimationComplete,this))},s.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",e.proxy(this.onUpdate,this)),this._progressEnabled=!0},s.prototype.onMainAnimationStart=function(t,i,s,r,n){this.mainAnimationDeferred=e.Deferred(),this.deActivate(0,"wait");for(var o in this.deferredsMediaPlaying)this.deferredsMediaPlaying[o].resolve()},s.prototype.onMainAnimationComplete=function(e,t,i,s){this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+1&&this.limitAutoplay(),this.timeline.duration(this.getSlideDuration(s)),this.mainAnimationDeferred.resolve(),this.continueAutoplay()},s.prototype.getSlideDuration=function(e){var t=this.slider.realSlides[this.slider.getRealIndex(e)],i=t.minimumSlideDuration;return.3>i&&i<this.parameters.duration&&(i=this.parameters.duration),i},s.prototype.continueAutoplay=function(t){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.reject();var i=[];for(var s in this.deferredsExtraPlaying)i.push(this.deferredsExtraPlaying[s]);for(var s in this.deferredsMediaPlaying)i.push(this.deferredsMediaPlaying[s]);this.deferredMouseEnter&&i.push(this.deferredMouseEnter),this.deferredMouseLeave&&i.push(this.deferredMouseLeave),i.push(this.mainAnimationDeferred),this.autoplayDeferred=e.Deferred(),this.autoplayDeferred.done(e.proxy(this._continueAutoplay,this)),e.when.apply(e,i).done(e.proxy(function(){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.resolve()},this))},s.prototype._continueAutoplay=function(){!this._paused&&!this._wait||this._disabled||(this._paused=!1,this._wait=!1,this.slider.sliderElement.triggerHandler("autoplayStarted"),1==this.timeline.progress()&&this.timeline.pause(0,!1),this.startTimeout(null))},s.prototype.pauseAutoplayUniversal=function(e){this.pauseAutoplayExtraPlaying(e,"autoplayButton"),this.deActivate(null,"pause")},s.prototype.pauseAutoplayMouseEnter=function(){r||(this.autoplayDeferred.reject(),this.deferredMouseEnter=e.Deferred(),this.deActivate(null,"leave"==this.parameters.resume.mouse?"wait":"pause"))},s.prototype.pauseAutoplayMouseEnterEnded=function(){this.deferredMouseEnter&&this.deferredMouseEnter.resolve()},s.prototype.pauseAutoplayMouseLeave=function(){this.autoplayDeferred.reject(),this.deferredMouseLeave=e.Deferred(),this.deActivate(null,"enter"==this.parameters.resume.mouse?"wait":"pause")},s.prototype.pauseAutoplayMouseLeaveEnded=function(){this.deferredMouseLeave&&this.deferredMouseLeave.resolve()},s.prototype.pauseAutoplayMediaPlaying=function(t,i){"undefined"!=typeof this.deferredsMediaPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsMediaPlaying[i]=e.Deferred(),this.deActivate(null,"wait")},s.prototype.pauseAutoplayMediaPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsMediaPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsMediaPlaying[t].resolve(),delete this.deferredsMediaPlaying[t])},s.prototype.pauseAutoplayExtraPlaying=function(t,i){"undefined"!=typeof this.deferredsExtraPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsExtraPlaying[i]=e.Deferred(),this.deActivate(null,"pause")},s.prototype.pauseAutoplayExtraPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsExtraPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsExtraPlaying[t].resolve(),delete this.deferredsExtraPlaying[t]),this.continueAutoplay()},s.prototype.deActivate=function(e,t){"pause"==t?this._paused||(this._paused=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayPaused")):"wait"==t&&(this._wait||(this._wait=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayWait"))),this.timeline&&this.timeline.pause(e,!1)},s.prototype.disable=function(){this.deActivate(0,"pause"),this.slider.sliderElement.triggerHandler("autoplayPaused"),this.slider.sliderElement.triggerHandler("autoplayDisabled"),this.slider.sliderElement.off(".autoplay"),this._disabled=!0},s.prototype.startTimeout=function(e){this._paused||this._disabled||this.timeline.play(e)},s.prototype.next=function(){this.timeline.pause(),this._currentCount++,(this.parameters.autoplayToSlide>0&&this._currentCount>=this.parameters.autoplayToSlide||this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+2)&&this.limitAutoplay(),this.slider.nextCarousel(!0)},s.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.slider.sliderElement.triggerHandler("autoplayExtraWait","autoplayButton")):this.disable()},s.prototype.onUpdate=function(){this.slider.sliderElement.triggerHandler("autoplay",this.timeline.progress())},s}),N2Require("SmartSliderControlFullscreen",[],[],function(e,t,i){"use strict";function s(t,i,s){this.slider=t,this.responsive=this.slider.responsive,this._type=this.responsive.parameters.type,this._forceFull=this.responsive.parameters.forceFull,this.forceFullpage="auto"==this._type||"fullwidth"==this._type||"fullpage"==this._type,this.forceFullpage&&(this._upscale=this.responsive.parameters.upscale,this._minimumHeightRatio=e.extend({},this.responsive.parameters.minimumHeightRatio),this._maximumHeightRatio=e.extend({},this.responsive.parameters.maximumHeightRatio)),this.isFullScreen=!1,this.fullParent=this.slider.sliderElement.closest(".n2-ss-align"),this.browserSpecific={};var r=this.slider.sliderElement[0];r.requestFullscreen?(this.browserSpecific.requestFullscreen="requestFullscreen",this.browserSpecific.event="fullscreenchange"):r.msRequestFullscreen?(this.browserSpecific.requestFullscreen="msRequestFullscreen",this.browserSpecific.event="MSFullscreenChange"):r.mozRequestFullScreen?(this.browserSpecific.requestFullscreen="mozRequestFullScreen",this.browserSpecific.event="mozfullscreenchange"):r.webkitRequestFullscreen?(this.browserSpecific.requestFullscreen="webkitRequestFullscreen",
3
  this.browserSpecific.event="webkitfullscreenchange"):(this.browserSpecific.requestFullscreen="nextendRequestFullscreen",this.browserSpecific.event="nextendfullscreenchange",this.fullParent[0][this.browserSpecific.requestFullscreen]=e.proxy(function(){this.fullParent.css({position:"fixed",left:0,top:0,width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e6}),document.fullscreenElement=this.fullParent[0],this.triggerEvent(document,this.browserSpecific.event),e(window).trigger("resize")},this)),document.exitFullscreen?this.browserSpecific.exitFullscreen="exitFullscreen":document.msExitFullscreen?this.browserSpecific.exitFullscreen="msExitFullscreen":document.mozCancelFullScreen?this.browserSpecific.exitFullscreen="mozCancelFullScreen":document.webkitExitFullscreen?this.browserSpecific.exitFullscreen="webkitExitFullscreen":(this.browserSpecific.exitFullscreen="nextendExitFullscreen",this.fullParent[0][this.browserSpecific.exitFullscreen]=e.proxy(function(){this.fullParent.css({position:"",left:"",top:"",width:"",height:"",backgroundColor:"",zIndex:""}),document.fullscreenElement=null,this.triggerEvent(document,this.browserSpecific.event)},this)),document.addEventListener(this.browserSpecific.event,e.proxy(this.fullScreenChange,this))}return s.prototype.switchState=function(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this._fullScreen():this._normalScreen()},s.prototype.requestFullscreen=function(){return this.isFullScreen?!1:(this.isFullScreen=!0,this._fullScreen(),!0)},s.prototype.exitFullscreen=function(){return this.isFullScreen?(this.isFullScreen=!1,this._normalScreen(),!0):!1},s.prototype.triggerEvent=function(e,t){var i;document.createEvent?(i=document.createEvent("HTMLEvents"),i.initEvent(t,!0,!0)):document.createEventObject&&(i=document.createEventObject(),i.eventType=t),i.eventName=t,e.dispatchEvent?e.dispatchEvent(i):e.fireEvent&&htmlEvents["on"+t]?e.fireEvent("on"+i.eventType,i):e[t]?e[t]():e["on"+t]&&e["on"+t]()},s.prototype._fullScreen=function(){this.forceFullpage&&(this.responsive.parameters.type="fullpage",this.responsive.parameters.upscale=!0,this.responsive.parameters.forceFull=!1,this._marginLeft=this.responsive.containerElement[0].style.marginLeft,this.responsive.containerElement.css(nextend.rtl.marginLeft,0)),this.fullParent.css({width:"100%",height:"100%",backgroundColor:e("body").css("background-color")}).addClass("n2-ss-in-fullscreen"),this.fullParent.get(0)[this.browserSpecific.requestFullscreen]()},s.prototype._normalScreen=function(){document[this.browserSpecific.exitFullscreen]?document[this.browserSpecific.exitFullscreen]():this.fullParent[0][this.browserSpecific.exitFullscreen]&&this.fullParent[0][this.browserSpecific.exitFullscreen]()},s.prototype.fullScreenChange=function(){this.isDocumentInFullScreenMode()?(this.slider.sliderElement.triggerHandler("n2FullScreen"),e("html").addClass("n2-in-fullscreen"),this.isFullScreen=!0,e(window).trigger("resize")):this.forceFullpage&&(this.responsive.parameters.type=this._type,this.responsive.parameters.upscale=this._upscale,this.responsive.parameters.forceFull=this._forceFull,this.responsive.parameters.minimumHeightRatio=this._minimumHeightRatio,this.responsive.parameters.maximumHeightRatio=this._maximumHeightRatio,this.responsive.containerElement.css(nextend.rtl.marginLeft,this._marginLeft),this.fullParent.css({width:"",height:"",backgroundColor:""}).removeClass("n2-ss-in-fullscreen"),e("html").removeClass("n2-in-fullscreen"),e(window).trigger("resize"),this.isFullScreen=!1,this.slider.sliderElement.triggerHandler("n2ExitFullScreen"))},s.prototype.isDocumentInFullScreenMode=function(){return document.fullscreenElement&&null!==document.fullscreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen},s}),N2Require("SmartSliderControlKeyboard",[],[],function(e,t,i){"use strict";function s(t,i,r){this.slider=t,this.parameters=e.extend({},r),"vertical"==i?this.parseEvent=s.prototype.parseEventVertical:this.parseEvent=s.prototype.parseEventHorizontal,e(document).on("keydown",e.proxy(this.onKeyDown,this)),t.controls.keyboard=this}return s.prototype.isSliderOnScreen=function(){var t=this.slider.sliderElement.offset(),i=e(window).scrollTop(),s=this.slider.sliderElement.height();return t.top+.5*s>=i&&t.top-.5*s<=i+e(window).height()},s.prototype.onKeyDown=function(e){e.target.tagName.match(/BODY|DIV|IMG/)&&this.isSliderOnScreen()&&(e=e||window.event,this.parseEvent.call(this,e)&&(e.preventDefault(),e.stopImmediatePropagation()))},s.prototype.parseEventHorizontal=function(e){switch(e.keyCode){case 39:return this.slider[nextend.rtl.next](),!0;case 37:return this.slider[nextend.rtl.previous](),!0;default:return!1}},s.prototype.parseEventVertical=function(e){switch(e.keyCode){case 40:return this.slider.next(),!0;case 38:return this.slider.previous(),!0;default:return!1}},s}),N2Require("SmartSliderControlScroll",[],[],function(e,t,i){"use strict";function s(t){this.preventScroll=!1,this._preventScrollTimeout=null,this.slider=t,t.sliderElement.on("DOMMouseScroll mousewheel",e.proxy(this.onMouseWheel,this)),t.controls.scroll=this}return s.prototype.onMouseWheel=function(e){if(this.preventScroll)this.preventScrollTimeout(e);else{var t=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(t=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(t=e.originalEvent.deltaY<0),e.originalEvent.detail&&(t=e.originalEvent.detail<0)),t?this.slider.previous()&&this.preventScrollTimeout(e):this.slider.next()&&this.preventScrollTimeout(e)}},s.prototype.preventScrollTimeout=function(t){null!==this._preventScrollTimeout&&clearTimeout(this._preventScrollTimeout),this.preventScroll=!0,t.preventDefault(),this._preventScrollTimeout=setTimeout(e.proxy(function(){this.preventScroll=!1,this._preventScrollTimeout=null},this),400)},s}),N2Require("SmartSliderControlTilt",[],[],function(e,t,i){"use strict";function s(t,i){return"undefined"==typeof window.DeviceOrientationEvent||"undefined"==typeof window.orientation?"Not supported":(this.timeout=null,this.slider=t,this.parameters=e.extend({duration:2e3},i),this.orientationchange(),window.addEventListener("orientationchange",e.proxy(this.orientationchange,this)),window.addEventListener("deviceorientation",e.proxy(this.handleOrientation,this),!0),void(t.controls.tilt=this))}return s.prototype.orientationchange=function(){switch(window.orientation){case-90:case 90:this.parseEvent=s.prototype.parseEventHorizontalLandscape;break;default:this.parseEvent=s.prototype.parseEventHorizontal}},s.prototype.clearTimeout=function(){this.timeout=null},s.prototype.handleOrientation=function(t){null==this.timeout&&this.parseEvent.call(this,t)&&(this.timeout=setTimeout(e.proxy(this.clearTimeout,this),this.parameters.duration),t.preventDefault())},s.prototype.parseEventHorizontal=function(e){return e.gamma>10?(this.slider.next(),!0):e.gamma<-10?(this.slider.previous(),!0):!1},s.prototype.parseEventHorizontalLandscape=function(e){return e.beta<-10?(this.slider.next(),!0):e.beta>10?(this.slider.previous(),!0):!1},s}),N2Require("SmartSliderControlTouch",[],[],function(e,t,i){"use strict";function s(t,i,s){this.currentAnimation=null,this.slider=t,this._animation=t.mainAnimation,this.parameters=e.extend({fallbackToMouseEvents:!0},s),this.swipeElement=this.slider.sliderElement.find("> .n2-ss-swipe-element"),"vertical"==i?this.setVertical():"horizontal"==i&&this.setHorizontal();var r=e.proxy(function(){var e=this;this._animation.isNoAnimation?N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(){n=!1},move:function(t,i,s,r,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e.currentAnimation={direction:a};var l=e.slider.isChangePossible(e._direction[a]);if(!l)return e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),(n||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return n=!0,!0}return!1},end:function(t,i,s,r,n){if(null!==e.currentAnimation){var o=n?0:e.measureRealDirection();o&&e.slider[e._direction[e.currentAnimation.direction]](),e.swipeElement.removeClass("n2-grabbing"),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?e.onTap(t):nextend.preventClick()}}):N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(e,t){n=!1},move:function(t,i,s,r,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e._animation.setTouch(e._direction.axis),e.currentAnimation={direction:a,percent:0};var l=e.slider[e._direction[a]](!1);if(!l)return e._animation.setTouch(!1),e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),e.currentAnimation.percent<1){var h=Math.max(-.99999,Math.min(.99999,d/e.slider.dimensions.slider[e._property]));e.currentAnimation.percent=h,e._animation.setTouchProgress(h)}if((n||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return n=!0,!0}return!1},end:function(t,i,s,r,n){if(null!==e.currentAnimation){var o=n?0:e.measureRealDirection(),a=e._animation.timeline.progress();1!=a&&e._animation.setTouchEnd(o,e.currentAnimation.percent,s.time),e.swipeElement.removeClass("n2-grabbing"),e._animation.setTouch(!1),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?e.onTap(t):nextend.preventClick()}})},this);if(navigator.userAgent.toLowerCase().indexOf("android")>-1){var o=this.swipeElement.parent();1!=o.css("opacity")?this.swipeElement.parent().one("transitionend",r):r()}else r();this.parameters.fallbackToMouseEvents||this.swipeElement.on("click",e.proxy(this.onTap,this)),this.parameters.fallbackToMouseEvents&&this.swipeElement.addClass("n2-grab"),t.controls.touch=this}var r=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,n=!1,o=!1;return s.prototype.setHorizontal=function(){this._property="width",this._direction={left:nextend.rtl.next,right:nextend.rtl.previous,up:null,down:null,axis:"horizontal",minDistance:10,measure:function(e){return!n&&Math.abs(e.x)<10||0==e.x||Math.abs(e.x)<Math.abs(e.y)?"unknown":e.x<0?"left":"right"},get:function(e,t){return"left"==t?-e.x:e.x}},r&&(this.swipeElement.css("-ms-touch-action","pan-y"),this.swipeElement.css("touch-action","pan-y"))},s.prototype.setVertical=function(){this._property="height",this._direction={left:null,right:null,up:"next",down:"previous",axis:"vertical",minDistance:1,measure:function(e){return!n&&Math.abs(e.y)<1||0==e.y||Math.abs(e.y)<Math.abs(e.x)?"unknown":e.y<0?"up":"down"},get:function(e,t){return"up"==t?-e.y:e.y}},r&&(this.swipeElement.css("-ms-touch-action","pan-x"),this.swipeElement.css("touch-action","pan-x"))},s.prototype.logDistance=function(e){this.distance.length>3&&this.distance.shift(),this.distance.push(e)},s.prototype.measureRealDirection=function(){var e=this.distance[0],t=this.distance[this.distance.length-1];return t>=0&&e>t||0>t&&t>e?0:1},s.prototype.onTap=function(t){o||(e(t.target).trigger("n2click"),o=!0,setTimeout(function(){o=!1},500))},s}),N2Require("SmartSliderBackgroundImage",[],[],function(e,t,i){function s(t,i,s){this.loadStarted=!1,this.loadAllowed=!1,this.width=0,this.height=0,this.slide=t,this.element=i,this.$mask=this.element.find(".n2-ss-slide-background-mask"),this.manager=s,this.loadDeferred=e.Deferred(),this.currentSrc="",this.mode=i.data("mode"),this.opacity=i.data("opacity"),this.blur=i.data("blur"),this.x=i.data("x"),this.y=i.data("y"),this.hasImage=!1,this.$image=this.$mask.find("img"),this.$image.length?(this.hasImage=!0,this.startImageMode()):this.startColorMode()}return s.prototype.startColorMode=function(){this.loadDeferred.resolve()},s.prototype.startImageMode=function(){if("fixed"==this.mode&&(n2const.isPhone&&!this.slide.slider.parameters["background.parallax.mobile"]||n2const.isTablet&&!this.slide.slider.parameters["background.parallax.tablet"])&&(this.mode="fill"),this.$image.css("display","none"),this.$background=e('<div class="n2-ss-background-image"/>').css({opacity:this.opacity,backgroundPosition:this.x+"% "+this.y+"%"}).appendTo(this.$mask),window.n2FilterProperty&&(this.blur>0?this.$background.css({margin:"-"+2*this.blur+"px",padding:2*this.blur+"px"}).css(window.n2FilterProperty,"blur("+this.blur+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),"fixed"==this.mode&&this.startFixed(),this.desktopSrc=this.element.data("desktop")||"",this.tabletSrc=this.element.data("tablet")||"",this.mobileSrc=this.element.data("mobile")||"",nextend.isRetina){var t=this.element.data("desktop-retina");t&&(this.desktopSrc=t),t=this.element.data("tablet-retina"),t&&(this.tabletSrc=t),t=this.element.data("mobile-retina"),t&&(this.mobileSrc=t)}},s.prototype.preLoad=function(){return this.loadStarted||(this.slide.$element.find("[data-lazysrc]").each(function(){var t=e(this);t.attr("src",t.data("lazysrc"))}),this.loadStarted=!0),"pending"==this.loadDeferred.state()&&(this.loadAllowed=!0,this.manager.deviceDeferred.done(e.proxy(function(){this.updateBackgroundToDevice(this.manager.device),this.$background.n2imagesLoaded({background:!0},e.proxy(function(e){var t=e.images[0].img;this.width=t.naturalWidth,this.height=t.naturalHeight,this.isLoaded=!0,this.loadDeferred.resolve(this.element)},this))},this))),this.loadDeferred},s.prototype.updateBackgroundToDevice=function(e){var t=this.desktopSrc;"mobile"==e.device?this.mobileSrc?t=this.mobileSrc:this.tabletSrc&&(t=this.tabletSrc):"tablet"==e.device&&this.tabletSrc&&(t=this.tabletSrc),t?this.setSrc(t):this.setSrc("")},s.prototype.setSrc=function(e){this.loadAllowed&&e!=this.currentSrc&&(""===e?this.$background.css("background-image",""):this.$background.css("background-image",'url("'+e+'")'),this.currentSrc=e)},s.prototype.startFixed=function(){n2const.isEdge||(this.slide.slider.parameters.allowBGImageAttachmentFixed&&!n2const.isIOS?(this.$background.css("background-repeat","repeat"),this.$background.css("position","static"),this.$background.css("background-attachment","fixed")):n2const.isIE||this.slide.slider.startedDeferred.done(e.proxy(function(){fixedBackground.addElement(this.$background,this.element)},this)))},s.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},s}),N2Require("FrontendComponent",[],[],function(e,t,i){function s(e,i,s,r){this.wraps={},this.isVisible=!0,this.device="",this.children=[],this.slide=e,this.parent=i,this.$layer=s.data("layer",this);var n=this.$layer.find("> .n2-ss-layer-mask");n.length&&(this.wraps.mask=n);var o=this.$layer.find("> .n2-ss-layer-parallax");switch(o.length&&(this.wraps.parallax=o),s.data("pm")){case"absolute":this.placement=new t.FrontendPlacementAbsolute(this);break;case"normal":this.placement=new t.FrontendPlacementNormal(this);break;case"content":this.placement=new t.FrontendPlacementContent(this);break;default:this.placement=new t.FrontendPlacementDefault(this)}if(this.parallax=s.data("parallax"),this.baseSize=this.baseSize||100,this.isAdaptiveFont=this.get("adaptivefont"),this.refreshBaseSize(this.getDevice("fontsize")),r)for(var a=0;a<r.length;a++)switch(r.eq(a).data("type")){case"content":this.children.push(new t.FrontendComponentContent(this.slide,this,r.eq(a)));break;case"row":this.children.push(new t.FrontendComponentRow(this.slide,this,r.eq(a)));break;case"col":this.children.push(new t.FrontendComponentCol(this.slide,this,r.eq(a)));break;case"group":break;default:this.children.push(new t.FrontendComponentLayer(this.slide,this,r.eq(a)))}}return s.prototype.refreshBaseSize=function(e){this.isAdaptiveFont?this.baseSize=16*e/100:this.baseSize=this.parent.baseSize*e/100},s.prototype.start=function(){this.placement.start();for(var e=0;e<this.children.length;e++)this.children[e].start();var t=this.get("rotation")||0;if(t/360!=0){var i=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(i[0],{rotationZ:t})}},s.prototype.onDeviceChange=function(e){this.device=e;var t=this.isVisible;if(this.isVisible=this.getDevice(""),this.isVisible===i&&(this.isVisible=1),t&&!this.isVisible?(this.$layer.data("shows",0),this.$layer.css("display","none")):!t&&this.isVisible&&(this.$layer.data("shows",1),this.$layer.css("display","block")),this.isVisible){var s=this.getDevice("fontsize");this.refreshBaseSize(s),this.isAdaptiveFont?this.$layer.css("font-size",16*s/100+"px"):this.$layer.css("font-size",s+"%");for(var r=0;r<this.children.length;r++)this.children[r].onDeviceChange(e);this.placement.onDeviceChange(e),this.onAfterDeviceChange(e)}},s.prototype.onAfterDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){if(this.isVisible||this.placement.alwaysResize){for(var s=0;s<this.children.length;s++)this.children[s].onResize(e,t,i);this.placement.onResize(e,t,i)}},s.prototype.getDevice=function(e,t){var s=this.$layer.data(this.device+e);return s!=i?s:"desktopportrait"!=this.device?this.$layer.data("desktopportrait"+e):t!==i?t:0},s.prototype.get=function(e){return this.$layer.data(e)},s.prototype.getParallaxNodes=function(){var e=[];if(this.isVisible){this.parallax&&e.push(this.$layer[0]);for(var t=0;t<this.children.length;t++)e.push.apply(e,this.children[t].getParallaxNodes())}return e},s.prototype.addWrap=function(t,s){if(this.wraps[t]===i){var r=e(s);switch(t){case"rotation":this.wraps.mask!==i?r.appendTo(this.wraps.mask):this.wraps.parallax!==i?r.appendTo(this.wraps.parallax):r.appendTo(this.$layer),r.append(this.getContents())}this.wraps[t]=r}return r},s.prototype.getContents=function(){return!1},s}),N2Require("FrontendPlacement",[],[],function(e,t,i){function s(e){this.layer=e,this.alwaysResize=!1}return s.prototype.start=function(){},s.prototype.onDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){},s}),N2Require("FrontendSliderSlide",["FrontendComponentSlideAbstract"],[],function(e,t,i){function s(i,s,r){this.isStaticSlide=!1,this.originalIndex=r,this.index=r,this.localIndex=r,this.$element=s.data("slide",this),this.id=this.$element.data("id"),this.backgroundImage=!1,this.backgroundVideo=!1,this.slides=[this],i.parameters.admin?this.minimumSlideDuration=0:(this.minimumSlideDuration=s.data("slide-duration"),e.isNumeric(this.minimumSlideDuration)||(this.minimumSlideDuration=0));var n=s.find(".n2-ss-layers-container");t.FrontendComponentSlideAbstract.prototype.constructor.call(this,i,n)}return s.prototype=Object.create(t.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s.prototype.init=function(){t.FrontendComponentSlideAbstract.prototype.init.call(this);var e=this.slider.findSlideBackground(this);e.length>0&&(this.slider.isAdmin?this.backgroundImage=new t.SmartSliderBackgroundImageAdmin(this,e,this.slider.backgroundImages):this.backgroundImage=new t.SmartSliderBackgroundImage(this,e,this.slider.backgroundImages)),this.$element.data("slideBackground",this.backgroundImage);var i=this.backgroundImage.element.find(".n2-ss-slide-background-video");i.length>0&&(this.backgroundVideo=new t.SmartSliderBackgroundVideo(this,i))},s.prototype.setStarterSlide=function(){t.FrontendComponentSlideAbstract.prototype.setStarterSlide.call(this)},s.prototype.setIndex=function(e){this.localIndex=this.index=e},s.prototype.preLoad=function(){return this.backgroundImage?this.backgroundImage.preLoad():!0},s.prototype.setPrevious=function(e){this.previousSlide=e},s.prototype.setNext=function(e){this.nextSlide=e,e.setPrevious(this)},s.prototype.hasBackgroundVideo=function(){return this.backgroundVideo},s}),N2Require("FrontendComponentSlideAbstract",["FrontendComponent"],[],function(e,t,i){function s(i,s){this.baseSize=16,this.slider=i,this.isCurrentlyEdited()||(this.status=r.NOT_INITIALIZED,t.FrontendComponent.prototype.constructor.call(this,this,this,s,s.find("> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group")),this.slider.sliderElement.on({SliderDeviceOrientation:e.proxy(function(e,t){this.onDeviceChange(t.device+t.orientation.toLowerCase())},this),SliderResize:e.proxy(function(e,t,i){this.onResize(t,i.responsiveDimensions)},this)}),t.FrontendComponent.prototype.start.call(this))}var r={NOT_INITIALIZED:-1,INITIALIZED:0,READY_TO_START:1,PLAYING:2,ENDED:3};return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.isCurrentlyEdited=function(){return this.slider.parameters.admin&&this.$element.hasClass("n2-ss-currently-edited-slide")},s.prototype.trigger=function(){this.$element.trigger.apply(this.$element,[].slice.call(arguments))},s.prototype.triggerHandler=function(){return this.$element.triggerHandler.apply(this.$element,[].slice.call(arguments))},s.prototype.init=function(){!this.isCurrentlyEdited()},s.prototype.refreshBaseSize=function(e){},s.prototype.onResize=function(e,t){for(var i=0;i<this.children.length;i++)this.children[i].onResize(e,t,this.isStaticSlide)},s.prototype.hasLayers=function(){return this.children.length>0},s.prototype.onDeviceChange=function(e){this.device=e;for(var t=0;t<this.children.length;t++)this.children[t].onDeviceChange(e);this.placement.onDeviceChange(e)},s.prototype.setStarterSlide=function(){},s}),N2Require("FrontendSliderStaticSlide",["FrontendComponentSlideAbstract"],[],function(e,t,i){function s(e,i){this.isStaticSlide=!0,this.$element=i.data("slide",this),t.FrontendComponentSlideAbstract.prototype.constructor.call(this,e,i),this.init()}return s.prototype=Object.create(t.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementAbsolute",["FrontendPlacement"],[],function(e,t,i){function s(e){return e.position()}function s(e){return{left:e.prop("offsetLeft"),top:e.prop("offsetTop")}}function r(e){this.linked=[],this.parentLayer=!1,this.$parent=!1,t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent),r.prototype=Object.create(t.FrontendPlacement.prototype),r.prototype.constructor=r,r.prototype.start=function(){var t=this.layer.get("parentid");t&&(this.$parent=e("#"+t),0==this.$parent.length?this.$parent=!1:(this.parentLayer=this.$parent.data("layer"),this.parentLayer.placement.addLinked(this),this.onResize=function(){}))},r.prototype.addLinked=function(e){this.linked.push(e),this.alwaysResize=!0},r.prototype.onResize=r.prototype.onResizeLinked=function(e,t,i){var r=this.layer.$layer,n=e.slideW,o=n,a=e.slideH,l=a;parseInt(this.layer.get("responsivesize"))||(o=l=1),r.css("width",this.getWidth(o)),r.css("height",this.getHeight(l)),parseInt(this.layer.get("responsiveposition"))||(n=a=1);var d=this.layer.getDevice("left")*n,h=this.layer.getDevice("top")*a,p=this.layer.getDevice("align"),c=this.layer.getDevice("valign"),u={left:"auto",top:"auto",right:"auto",bottom:"auto"};if(this.$parent&&this.$parent.data("layer").isVisible){var m=s(this.$parent),f={left:0,top:0};switch(this.layer.getDevice("parentalign")){case"right":f.left=m.left+this.$parent.width();break;case"center":f.left=m.left+this.$parent.width()/2;break;default:f.left=m.left}switch(p){case"right":u.right=r.parent().width()-f.left-d+"px";break;case"center":u.left=f.left+d-r.width()/2+"px";break;default:u.left=f.left+d+"px"}switch(this.layer.getDevice("parentvalign")){case"bottom":f.top=m.top+this.$parent.height();break;case"middle":f.top=m.top+this.$parent.height()/2;break;default:f.top=m.top}switch(c){case"bottom":u.bottom=r.parent().height()-f.top-h+"px";break;case"middle":u.top=f.top+h-r.height()/2+"px";break;default:u.top=f.top+h+"px"}}else{switch(p){case"right":u.right=-d+"px";break;case"center":u.left=(i?r.parent().width():t.slide.width)/2+d-r.width()/2+"px";break;default:u.left=d+"px"}switch(c){case"bottom":u.bottom=-h+"px";break;case"middle":u.top=(i?r.parent().height():t.slide.height)/2+h-r.height()/2+"px";break;default:u.top=h+"px"}}r.css(u);for(var g=0;g<this.linked.length;g++)this.linked[g].onResizeLinked(e,t,i)},r.prototype.getWidth=function(e){var t=this.layer.getDevice("width");return this.isDimensionPropertyAccepted(t)?t:t*e+"px"},r.prototype.getHeight=function(e){var t=this.layer.getDevice("height");return this.isDimensionPropertyAccepted(t)?t:t*e+"px"},r.prototype.isDimensionPropertyAccepted=function(e){return!(!(e+"").match(/[0-9]+%/)&&"auto"!=e)},r}),N2Require("FrontendPlacementContent",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementDefault",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementNormal",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(){this.updateMargin(),this.updateHeight(),this.updateMaxWidth(),this.updateSelfAlign()},s.prototype.updateMargin=function(){var e=this.layer.getDevice("margin").split("|*|"),t=e.pop(),i=this.layer.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.layer.$layer.css("margin",e.join(t+" ")+t)},s.prototype.updateHeight=function(){var e=this.layer.getDevice("height"),t="px";if(e>0){var i=this.layer.baseSize;i>0&&(t="em",e=parseInt(e)/i),this.layer.$layer.css("height",e+t)}else this.layer.$layer.css("height","")},s.prototype.updateMaxWidth=function(){var e=parseInt(this.layer.getDevice("maxwidth"));0>=e||isNaN(e)?this.layer.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.layer.$layer.attr("data-cssselfalign",this.layer.getDevice("selfalign"))},s}),N2Require("FrontendComponentCol",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$content=s.find(".n2-ss-layer-col:first"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updateOrder(),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$content.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var e=parseInt(this.getDevice("maxwidth"));0>=e||isNaN(e)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.getRealOrder=function(){var e=this.getDevice("order");return 0==e?10:e},s.prototype.updateOrder=function(){var e=this.getDevice("order");0==e?this.$layer.css("order",""):this.$layer.css("order",e)},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentContent",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$content=s.find("> .n2-ss-section-main-content"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth(),this.updateSelfAlign()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$content.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var e=parseInt(this.getDevice("maxwidth"));0>=e||isNaN(e)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.$layer.attr("data-cssselfalign",this.getDevice("selfalign"))},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentLayer",["FrontendComponent"],[],function(e,t,i){function s(e,s,r){t.FrontendComponent.prototype.constructor.call(this,e,s,r),this.wraps.mask!==i?this.$item=this.wraps.mask.children():this.wraps.parallax!==i?this.$item=this.wraps.parallax.children():this.$item=r.children()}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.getContents=function(){return this.$item},s}),N2Require("FrontendComponentRow",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$row=s.find(".n2-ss-layer-row:first"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$row.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateGutter(),this.updateInnerAlign()},s.prototype.onAfterDeviceChange=function(e){this.updateWrapAfter()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$row.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateGutter=function(){var e=this.getDevice("gutter")+"px";if(this.children.length>0)for(var t=this.children.length-1;t>=0;t--)this.children[t].$layer.css(nextend.rtl.marginRight,e).css("marginTop",e)},s.prototype.getSortedColumns=function(){for(var t=e.extend([],this.children).sort(function(e,t){return e.getRealOrder()-t.getRealOrder()}),i=t.length-1;i>=0;i--)t[i].isVisible||t.splice(i,1);return t},s.prototype.updateWrapAfter=function(){var t=parseInt(this.getDevice("wrapafter")),i=this.getSortedColumns(),s=i.length,r=!1;if(0==s)return!1;if(t>0&&s>t&&(r=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",r),r)for(var n=0;s>n;n++){var o=parseInt(n/t);if(i[n].$layer.attr("data-r",o),(n+1)%t==0||n==s-1){i[n].$layer.addClass("n2-ss-last-in-row");var a=i[n].getDevice("order");0==a&&(a=10),e('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[n].$layer),i[n].$layer}else i[n].$layer.removeClass("n2-ss-last-in-row")}else{for(var n=0;s>n;n++)i[n].$layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i[s-1].$layer.addClass("n2-ss-last-in-row")}},s.prototype.getContents=function(){return this.$row},s}),N2Require("SmartSliderResponsive",[],[],function(e,t,i){function s(t,i){this.disableTransitions=!1,this.disableTransitionsTimeout=null,this.lastClientHeight=0,this.lastOrientation=0,this.invalidateResponsiveState=!0,this.parameters=e.extend({desktop:1,tablet:1,mobile:1,onResizeEnabled:!0,type:"auto",downscale:!0,upscale:!1,constrainRatio:!0,minimumHeight:0,maximumHeight:0,minimumHeightRatio:0,maximumHeightRatio:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},maximumSlideWidth:0,maximumSlideWidthLandscape:0,maximumSlideWidthRatio:-1,maximumSlideWidthTablet:0,maximumSlideWidthTabletLandscape:0,maximumSlideWidthMobile:0,maximumSlideWidthMobileLandscape:0,
4
- maximumSlideWidthConstrainHeight:0,forceFull:0,forceFullOverflowX:"body",forceFullHorizontalSelector:"",verticalOffsetSelectors:"",focusUser:0,focusAutoplay:0,deviceModes:{desktopLandscape:1,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},normalizedDeviceModes:{unknownUnknown:["unknown","Unknown"],desktopPortrait:["desktop","Portrait"]},verticalRatioModifiers:{unknownUnknown:1,desktopLandscape:1,desktopPortrait:1,mobileLandscape:1,mobilePortrait:1,tabletLandscape:1,tabletPortrait:1},minimumFontSizes:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},ratioToDevice:{Portrait:{tablet:0,mobile:0},Landscape:{tablet:0,mobile:0}},sliderWidthToDevice:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},basedOn:"combined",desktopPortraitScreenWidth:1200,tabletPortraitScreenWidth:800,mobilePortraitScreenWidth:440,tabletLandscapeScreenWidth:1024,mobileLandscapeScreenWidth:740,orientationMode:"width_and_height",scrollFix:0,overflowHiddenPage:0},i),t.isAdmin&&(this.doResize=NextendThrottle(this.doResize,50)),this.loadDeferred=e.Deferred(),this.slider=t,this.sliderElement=t.sliderElement}var r=null,n=null;return s.OrientationMode={SCREEN:0,ADMIN_LANDSCAPE:1,ADMIN_PORTRAIT:2,SCREEN_WIDTH_ONLY:3},s.DeviceOrientation={UNKNOWN:0,LANDSCAPE:1,PORTRAIT:2},s._DeviceOrientation={0:"Unknown",1:"Landscape",2:"Portrait"},s.DeviceMode={UNKNOWN:0,DESKTOP:1,TABLET:2,MOBILE:3},s._DeviceMode={0:"unknown",1:"desktop",2:"tablet",3:"mobile"},s.prototype.start=function(){nextend.fontsDeferred==i?nextend.loadDeferred.always(e.proxy(function(){this.loadDeferred.resolve()},this)):nextend.fontsDeferred.always(e.proxy(function(){this.loadDeferred.resolve()},this)),this.normalizeTimeout=null,this.delayedResizeAdded=!1,this.deviceMode=s.DeviceMode.UNKNOWN,this.orientationMode=s.OrientationMode.SCREEN,this.orientation=s.DeviceOrientation.UNKNOWN,this.lastRatios={ratio:-1},this.lastRawRatios={ratio:-1},this.normalizedMode="unknownUnknown",this.widgetMargins={Top:[],Right:[],Bottom:[],Left:[]},this.staticSizes={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},this.enabledWidgetMargins=[],this.alignElement=this.slider.sliderElement.closest(".n2-ss-align");var t=this.ready=e.Deferred();switch(this.sliderElement.triggerHandler("SliderResponsiveStarted"),this.sliderElement.one("SliderResize",function(){t.resolve()}),this.containerElementPadding=this.sliderElement.parent(),this.containerElement=this.containerElementPadding.parent(),!this.slider.isAdmin&&this.parameters.overflowHiddenPage&&e("html, body").css("overflow","hidden"),"width"==this.parameters.orientationMode&&(this.orientationMode=s.OrientationMode.SCREEN_WIDTH_ONLY),nextend.smallestZoom=Math.min(Math.max(this.parameters.sliderWidthToDevice.mobilePortrait,120),320),this.parameters.basedOn){case"screen":break;default:if(null==r){var o=new MobileDetect(window.navigator.userAgent,801);r=!!o.tablet(),n=!!o.phone()}}if(this.verticalOffsetSelectors=e(this.parameters.verticalOffsetSelectors),this.storeDefaults(),this.parameters.minimumHeight>0&&(this.parameters.minimumHeightRatio=this.parameters.minimumHeight/this.responsiveDimensions.startHeight),this.parameters.maximumHeight>0&&this.parameters.maximumHeight>=this.parameters.minimumHeight&&(this.parameters.maximumHeightRatio={desktopPortrait:this.parameters.maximumHeight/this.responsiveDimensions.startHeight},this.parameters.maximumHeightRatio.desktopLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletPortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobilePortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobileLandscape=this.parameters.maximumHeightRatio.desktopPortrait),this.parameters.maximumSlideWidth>0&&(this.parameters.maximumSlideWidthRatio={desktopPortrait:this.parameters.maximumSlideWidth/this.responsiveDimensions.startSlideWidth,desktopLandscape:this.parameters.maximumSlideWidthLandscape/this.responsiveDimensions.startSlideWidth,tabletPortrait:this.parameters.maximumSlideWidthTablet/this.responsiveDimensions.startSlideWidth,tabletLandscape:this.parameters.maximumSlideWidthTabletLandscape/this.responsiveDimensions.startSlideWidth,mobilePortrait:this.parameters.maximumSlideWidthMobile/this.responsiveDimensions.startSlideWidth,mobileLandscape:this.parameters.maximumSlideWidthMobileLandscape/this.responsiveDimensions.startSlideWidth},this.parameters.maximumSlideWidthConstrainHeight)){this.parameters.maximumHeightRatio=e.extend({},this.parameters.maximumSlideWidthRatio);for(var a in this.parameters.maximumHeightRatio)this.parameters.maximumHeightRatio[a]*=this.parameters.verticalRatioModifiers[a]}if("undefined"!=typeof nextend&&"undefined"!=typeof nextend.ssBeforeResponsive&&nextend.ssBeforeResponsive.call(this),this.onResize(),(this.parameters.onResizeEnabled||"adaptive"==this.parameters.type)&&(e(window).on({resize:e.proxy(this.onResize,this),orientationchange:e.proxy(this.onResize,this)}),this.sliderElement.on("SliderInternalResize",e.proxy(this.onResize,this)),this.parameters.scrollFix))try{var l=this;e('<iframe sandbox="allow-same-origin allow-scripts" style="height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;"/>').on("load",function(t){e(t.target.contentWindow?t.target.contentWindow:t.target.contentDocument.defaultView).on("resize",function(){l.sliderElement.triggerHandler("SliderInternalResize")})}).insertBefore(this.containerElement)}catch(d){}},s.prototype.getOuterWidth=function(){return this.responsiveDimensions.startSliderWidth+this.responsiveDimensions.startSliderMarginLeft+this.responsiveDimensions.startSliderMarginRight},s.prototype.storeDefaults=function(){this.responsiveDimensions={startWidth:this.sliderElement.outerWidth(!0),startHeight:this.sliderElement.outerHeight(!0)},this.horizontalElements=[],this.verticalElements=[],this.init(),this.margins={top:this.responsiveDimensions.startSliderMarginTop,right:this.responsiveDimensions.startSliderMarginRight,bottom:this.responsiveDimensions.startSliderMarginBottom,left:this.responsiveDimensions.startSliderMarginLeft}},s.prototype.addHorizontalElement=function(e,i,s,r){s=s||"ratio";var n=new t.SmartSliderResponsiveElement(this,s,e,i,r);return this.horizontalElements.push(n),n},s.prototype.addVerticalElement=function(e,i,s,r){s=s||"ratio";var n=new t.SmartSliderResponsiveElement(this,s,e,i,r);return this.verticalElements.push(n),n},s.prototype.resizeHorizontalElements=function(e){for(var t=0;t<this.horizontalElements.length;t++){var i=this.horizontalElements[t];"undefined"==typeof e[i.ratioName]&&console.log("error with "+i.ratioName),i.resize(this.responsiveDimensions,e[i.ratioName],!1,0)}},s.prototype.updateVerticalRatios=function(e){return e},s.prototype._updateVerticalRatios=function(t){var i=this.responsiveDimensions.startSlideHeight*t.slideH,s=!1;return this.sliderElement.find(".n2-ss-section-main-content").addClass("n2-ss-section-main-content-calc").each(function(t,r){var n=e(r).outerHeight();n>i&&(s=!0,i=n)}).removeClass("n2-ss-section-main-content-calc"),s&&(t.slideH=i/this.responsiveDimensions.startSlideHeight,t.h=Math.max(t.h,t.slideH)),t},s.prototype.resizeVerticalElements=function(e,t,i){for(var s=0;s<this.verticalElements.length;s++){var r=this.verticalElements[s];"undefined"==typeof e[r.ratioName]&&console.log("error with "+r.ratioName),r.resize(this.responsiveDimensions,e[r.ratioName],t,i)}},s.prototype.getDeviceMode=function(){return s._DeviceMode[this.deviceMode]},s.prototype.getDeviceModeOrientation=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.onResize=function(t){this.slider.mainAnimation&&"ended"!=this.slider.mainAnimation.getState()?this.delayedResizeAdded||(this.delayedResizeAdded=!0,this.sliderElement.on("mainAnimationComplete.responsive",e.proxy(this._doDelayedResize,this))):this.doResize(t)},s.prototype._doDelayedResize=function(){this.doResize(),this.delayedResizeAdded=!1},s.prototype.doNormalizedResize=function(){this.normalizeTimeout&&clearTimeout(this.normalizeTimeout),this.normalizeTimeout=setTimeout(e.proxy(this.doResize,this),10)},s.prototype._getOrientation=function(){return this.orientationMode==s.OrientationMode.SCREEN?window.innerHeight<=window.innerWidth?s.DeviceOrientation.LANDSCAPE:s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE?s.DeviceOrientation.LANDSCAPE:void 0},s.prototype._getDevice=function(){switch(this.parameters.basedOn){case"combined":return this._getDeviceDevice(this._getDeviceScreenWidth());case"device":return this._getDeviceDevice(s.DeviceMode.DESKTOP);case"screen":return this._getDeviceScreenWidth()}},s.prototype._getDeviceScreenWidth=function(){var e=window.innerWidth;if(this.orientation==s.DeviceOrientation.PORTRAIT){if(e<this.parameters.mobilePortraitScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletPortraitScreenWidth)return s.DeviceMode.TABLET}else{if(e<this.parameters.mobileLandscapeScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletLandscapeScreenWidth)return s.DeviceMode.TABLET}return s.DeviceMode.DESKTOP},s.prototype._getDeviceAndOrientationByScreenWidth=function(){var e=window.innerWidth;return e<this.parameters.mobilePortraitScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.PORTRAIT]:e<this.parameters.mobileLandscapeScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.tabletPortraitScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.PORTRAIT]:e<this.parameters.tabletLandscapeScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.desktopPortraitScreenWidth?[s.DeviceMode.DESKTOP,s.DeviceOrientation.PORTRAIT]:[s.DeviceMode.DESKTOP,s.DeviceOrientation.LANDSCAPE]},s.prototype._getDeviceDevice=function(e){return n===!0?s.DeviceMode.MOBILE:r&&e!=s.DeviceMode.MOBILE?s.DeviceMode.TABLET:e},s.prototype._getDeviceZoom=function(e){var t;this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?t=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(t=s.DeviceOrientation.LANDSCAPE);var i=s.DeviceMode.DESKTOP;return e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].mobile<.001?i=s.DeviceMode.MOBILE:e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].tablet<.001&&(i=s.DeviceMode.TABLET),i},s.prototype.reTriggerSliderDeviceOrientation=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:e[0],lastOrientation:e[1],device:e[0],orientation:e[1]})},s.prototype.doResize=function(t,i,r,n,o){if(this.disableTransitions||(this.disableTransitions=!0,this.sliderElement.addClass("n2notransition"),this.disableTransitionsTimeout&&clearTimeout(this.disableTransitionsTimeout),this.disableTransitionsTimeout=setTimeout(e.proxy(function(){this.sliderElement.removeClass("n2notransition"),this.disableTransitions=!1},this),500)),this.refreshMargin(),"center"==this.slider.parameters.align&&("fullpage"==this.parameters.type?this.alignElement.css("maxWidth","none"):this.alignElement.css("maxWidth",this.responsiveDimensions.startWidth)),!this.slider.isAdmin&&this.parameters.forceFull){"none"!=this.parameters.forceFullOverflowX&&e(this.parameters.forceFullOverflowX).css("overflow-x","hidden");var a=0,l=0;if(""!=this.parameters.forceFullHorizontalSelector){var d=this.sliderElement.closest(this.parameters.forceFullHorizontalSelector);d&&d.length>0&&(a=d.width(),l=d.offset().left)}var h,p=a>0?a:document.body.clientWidth||document.documentElement.clientWidth,c=this.containerElement.parent(),u=c[0].getBoundingClientRect();h=nextend.rtl.isRtl?p-(u.left+c.outerWidth()):u.left,this.containerElement.css(nextend.rtl.marginLeft,-h-parseInt(c.css("paddingLeft"))-parseInt(c.css("borderLeftWidth"))+l).width(p)}var m=this.containerElementPadding.width()/this.getOuterWidth(),f=!1,g=this.orientation,y=this.deviceMode,v=null,S=null;if(this.orientationMode==s.OrientationMode.SCREEN_WIDTH_ONLY){var b=this._getDeviceAndOrientationByScreenWidth();S=b[0],v=b[1]}else v=this._getOrientation();if(this.orientation!=v&&(this.orientation=v,f=!0,this.sliderElement.trigger("SliderOrientation",{lastOrientation:s._DeviceOrientation[g],orientation:s._DeviceOrientation[v]})),i||(this.orientationMode!=s.OrientationMode.SCREEN_WIDTH_ONLY&&(S=this._getDevice(m)),this.deviceMode!=S&&(this.deviceMode=S,this.sliderElement.removeClass("n2-ss-"+s._DeviceMode[y]).addClass("n2-ss-"+s._DeviceMode[S]),this.sliderElement.trigger("SliderDevice",{lastDevice:s._DeviceMode[y],device:s._DeviceMode[S]}),f=!0)),!this.slider.isAdmin&&"fullpage"==this.parameters.type){var x=0;if(window.matchMedia&&/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||window.opera)){var w,E=!1;t&&"orientationchange"==t.type&&(E=!0),w=n2const.isIOS?document.documentElement.clientHeight:window.innerHeight,window.matchMedia("(orientation: landscape)").matches?(x=Math.min(screen.width,w),90!=this.lastOrientation&&(E=!0,this.lastOrientation=90)):(x=Math.min(screen.height,w),0!=this.lastOrientation&&(E=!0,this.lastOrientation=0)),!E&&Math.abs(x-this.lastClientHeight)<100?x=this.lastClientHeight:this.lastClientHeight=x}else x=window.n2ClientHeight||document.documentElement.clientHeight||document.body.clientHeight;this.parameters.maximumHeightRatio[this.getDeviceModeOrientation()]=this.parameters.minimumHeightRatio=(x-this.getVerticalOffsetHeight())/this.responsiveDimensions.startHeight}if(f){var A=this._normalizeMode(s._DeviceMode[y],s._DeviceOrientation[g]),D=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);A[0]==D[0]&&A[1]==D[1]||(this.normalizedMode=D[0]+D[1],this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:A[0],lastOrientation:A[1],device:D[0],orientation:D[1]}))}var k=this.parameters.sliderWidthToDevice[this.normalizedMode]/this.parameters.sliderWidthToDevice.desktopPortrait;!this.parameters.downscale&&k>m?m=k:!this.parameters.upscale&&m>k&&(m=k),this._doResize(m,r,n,o),"center"==this.slider.parameters.align&&this.alignElement.css("maxWidth",this.responsiveDimensions.slider.width)},s.prototype._normalizeMode=function(e,t){return this.parameters.normalizedDeviceModes[e+t]},s.prototype.getNormalizedModeString=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);return e.join("")},s.prototype.getModeString=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.enabled=function(e,t){return this.parameters.deviceModes[e+t]},s.prototype._doResize=function(t,i,s,r){var n={ratio:t,w:t,h:t,slideW:t,slideH:t,fontRatio:1};this._buildRatios(n,this.slider.parameters.dynamicHeight,s),n.fontRatio=n.slideW;var o=!1;for(var a in n)if(n[a]!=this.lastRawRatios[a]){o=!0;break}(this.invalidateResponsiveState||o)&&(this.lastRawRatios=e.extend({},n),this.resizeHorizontalElements(n),this.finishResize(n,i,r))},s.prototype.finishResize=function(t,i,s){this.loadDeferred.done(e.proxy(function(){var r=e.proxy(function(){this.finishResize=this._finishResize,this.finishResize(t,i,s)},this);/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor)||/CriOS/.exec(window.navigator.userAgent)?setTimeout(r,200):r()},this)),this.invalidateResponsiveState=!1},s.prototype._finishResize=function(e,t,i){this.invalidateResponsiveState=!1,e=this.updateVerticalRatios(e),this.resizeVerticalElements(e,t,i),this.lastRatios=e,t?(this.sliderElement.trigger("SliderAnimatedResize",[e,t,i]),t.eventCallback("onComplete",function(){this.triggerResize(e,t)},[],this)):this.triggerResize(e,!1)},s.prototype.doVerticalResize=function(){var t=this.updateVerticalRatios(e.extend({},this.lastRawRatios)),i=!1;for(var s in t)if(t[s]!=this.lastRatios[s]){i=!0;break}i&&this.finishVerticalResize(t)},s.prototype.finishVerticalResize=function(t){this.loadDeferred.done(e.proxy(function(){this.finishVerticalResize=this._finishVerticalResize,this.finishVerticalResize(t)},this))},s.prototype._finishVerticalResize=function(e){this.resizeVerticalElements(e,!1,0),this.lastRatios=e,this.triggerResize(e,!1)},s.prototype.triggerResize=function(e,t){this.sliderElement.trigger("SliderResize",[e,this,t])},s.prototype._buildRatios=function(e,t,i){var s=this.getDeviceModeOrientation();this.parameters.maximumSlideWidthRatio[s]>0&&e.slideW>this.parameters.maximumSlideWidthRatio[s]&&(e.slideW=this.parameters.maximumSlideWidthRatio[s]),e.slideW=e.slideH=Math.min(e.slideW,e.slideH);var r=this.parameters.verticalRatioModifiers[s];if(e.slideH*=r,"fullpage"==this.parameters.type)e.h*=r,this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),this.slider.isAdmin?this.parameters.constrainRatio?(e.slideH=Math.min(e.slideH,e.h),e.slideH=e.slideW=Math.min(e.slideW,e.slideH)):(e.w=e.slideW,e.h=e.slideH):this.parameters.constrainRatio?(e.slideH=Math.min(e.slideH,e.h),e.slideH=e.slideW=Math.min(e.slideW,e.slideH)):(e.slideW=e.w,this.parameters.maximumSlideWidthRatio[s]>0&&e.slideW>this.parameters.maximumSlideWidthRatio[s]&&(e.slideW=this.parameters.maximumSlideWidthRatio[s]),e.slideH=e.h);else if(e.h*=r,this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),e.slideH=Math.min(e.slideH,e.h),e.slideW=e.slideH/r,"showcase"==this.slider.type&&(e.slideW=Math.min(e.slideW,e.w),e.slideH=Math.min(e.slideW,e.slideH)),t){var n=this.slider.currentSlide.backgroundImage;if("undefined"!=typeof i&&(n=i.backgroundImage),n.width>0&&n.height>0){var o=this.responsiveDimensions.startSlideWidth/n.width*(n.height/this.responsiveDimensions.startSlideHeight);-1!=o&&(e.slideH*=o,e.h*=o)}}this.sliderElement.triggerHandler("responsiveBuildRatios",[e])},s.prototype.setOrientation=function(e){"portrait"==e?this.orientationMode=s.OrientationMode.ADMIN_PORTRAIT:"landscape"==e&&(this.orientationMode=s.OrientationMode.ADMIN_LANDSCAPE)},s.prototype.setMode=function(e,t){var i;if(this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?i=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(i=s.DeviceOrientation.LANDSCAPE),this==t){var r=this.parameters.sliderWidthToDevice[e+s._DeviceOrientation[i]];if("mobile"==e)switch(s._DeviceOrientation[i]){case"Portrait":r=Math.max(nextend.smallestZoom,320)}this.setSize(r)}},s.prototype.setSize=function(e){this.containerElement.width(e),this.doResize()},s.prototype.getVerticalOffsetHeight=function(){for(var e=0,t=0;t<this.verticalOffsetSelectors.length;t++)e+=this.verticalOffsetSelectors.eq(t).outerHeight();if(this.slider.widgets.$vertical)for(var t=0;t<this.slider.widgets.$vertical.length;t++)e+=this.slider.widgets.$vertical.eq(t).outerHeight();return e},s.prototype.addMargin=function(e,t){this.widgetMargins[e].push(t),t.isVisible()&&(this._addMarginSize(e,t.getSize()),this.enabledWidgetMargins.push(t)),this.doNormalizedResize()},s.prototype.addStaticMargin=function(e,t){"Bottom"!=e&&"Top"!=e&&(this.widgetStaticMargins||(this.widgetStaticMargins={Top:[],Right:[],Bottom:[],Left:[]}),this.widgetStaticMargins[e].push(t),this.doNormalizedResize())},s.prototype.refreshMargin=function(){for(var t in this.widgetMargins)for(var i=this.widgetMargins[t],s=i.length-1;s>=0;s--){var r=i[s];if(r.isVisible())-1==e.inArray(r,this.enabledWidgetMargins)&&(this._addMarginSize(t,r.getSize()),this.enabledWidgetMargins.push(r));else{var n=e.inArray(r,this.enabledWidgetMargins);-1!=n&&(this._addMarginSize(t,-r.getSize()),this.enabledWidgetMargins.splice(n,1))}}this.refreshStaticSizes()},s.prototype.refreshStaticSizes=function(){if(this.widgetStaticMargins){var e={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0};for(var t in this.widgetStaticMargins)for(var i=this.widgetStaticMargins[t],s=i.length-1;s>=0;s--){var r=i[s];r.isVisible()&&(e["padding"+t]+=r.getSize())}for(var n in e)this.containerElementPadding.css(e);this.staticSizes=e}},s.prototype._addMarginSize=function(e,t){var i=null;switch(e){case"Top":case"Bottom":i=this._sliderVertical;break;default:i=this._sliderHorizontal}i.data["margin"+e]+=t,this.responsiveDimensions["startSliderMargin"+e]+=t},s}),N2Require("SmartSliderResponsiveElement",[],[],function(e,t,i){function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(t,i,s,r,n){this._lastRatio=1,this.responsive=t,this.ratioName=i,this.element=s,this._readyDeferred=e.Deferred(),"undefined"!=typeof n?this.name=n:this.name=null,this.data={},this.helper={parent:null,parentProps:null,fontSize:!1,centered:!1},this._lateInit(r)}return r.prototype._lateInit=function(t){this._cssProperties=t,this.reloadDefault(),-1!=e.inArray("fontSize",t)&&(this.data.fontSize=this.element.data("fontsize"),this.helper.fontSize={fontSize:this.element.data("fontsize"),desktopPortrait:this.element.data("minfontsizedesktopportrait"),desktopLandscape:this.element.data("minfontsizedesktoplandscape"),tabletPortrait:this.element.data("minfontsizetabletportrait"),tabletLandscape:this.element.data("minfontsizetabletlandscape"),mobilePortrait:this.element.data("minfontsizemobileportrait"),mobileLandscape:this.element.data("minfontsizemobilelandscape")},this.responsive.sliderElement.on("SliderDeviceOrientation",e.proxy(this.onModeChange,this))),this.resize=this._resize,this._readyDeferred.resolve()},r.prototype.reloadDefault=function(){for(var e=0;e<this._cssProperties.length;e++){var t=this._cssProperties[e];this.data[t]=parseInt(this.element.css(t))}if(this.name){var i=this.responsive.responsiveDimensions;for(var r in this.data)i["start"+s(this.name)+s(r)]=this.data[r]}},r.prototype.ready=function(e){this._readyDeferred.done(e)},r.prototype.resize=function(t,i){this.ready(e.proxy(this.resize,this,t,i)),this._lastRatio=i},r.prototype._resize=function(e,t,i,s){this.name&&"undefined"==typeof e[this.name]&&(e[this.name]={});var r={};for(var n in this.data){var o=this.data[n]*t;"function"==typeof this[n+"Prepare"]&&(o=this[n+"Prepare"](o)),this.name&&(e[this.name][n]=o),r[n]=o}if(i)i.to(this.element,s,r,0);else if(this.element.css(r),this.helper.centered){var a=this.getVerticalMargin(parseInt((this.helper.parent.height()-this.element.height())/2)),l=this.getHorizontalMargin(parseInt((this.helper.parent.width()-this.element.width())/2));this.element.css({marginLeft:l,marginRight:l,marginTop:a,marginBottom:a})}this._lastRatio=t},r.prototype.getHorizontalMargin=function(e){return e},r.prototype.getVerticalMargin=function(e){return e},r.prototype._refreshResize=function(){this.responsive.ready.done(e.proxy(function(){this._resize(this.responsive.responsiveDimensions,this.responsive.lastRatios[this.ratioName])},this))},r.prototype.widthPrepare=function(e){return Math.round(e)},r.prototype.heightPrepare=function(e){return Math.round(e)},r.prototype.marginLeftPrepare=function(e){return parseInt(e)},r.prototype.marginRightPrepare=function(e){return parseInt(e)},r.prototype.lineHeightPrepare=function(e){return e+"px"},r.prototype.borderLeftWidthPrepare=function(e){return parseInt(e)},r.prototype.borderRightWidthPrepare=function(e){return parseInt(e)},r.prototype.borderTopWidthPrepare=function(e){return parseInt(e)},r.prototype.borderBottomWidthPrepare=function(e){return parseInt(e)},r.prototype.fontSizePrepare=function(e){var t=this.responsive.getNormalizedModeString();return e<this.helper.fontSize[t]?this.helper.fontSize[t]:e},r.prototype.setCentered=function(){this.helper.parent=this.element.parent(),this.helper.centered=!0},r.prototype.unsetCentered=function(){this.helper.centered=!1},r.prototype.onModeChange=function(){this.setFontSizeByMode()},r.prototype.setFontSizeByMode=function(){this.element.css("fontSize",this.fontSizePrepare(this.data.fontSize*this._lastRatio))},r}),N2Require("FrontendItemVimeo",[],[],function(e,t,i){function s(t,i,s,r,n,o){this.state={scroll:!1,slide:!0,play:!1,continuePlay:!1},this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.start=o,this.parameters=e.extend({vimeourl:"//vimeo.com/144598279",center:0,autoplay:"0",reset:"0",title:"1",byline:"1",portrait:"0",loop:"0",color:"00adef",volume:"-1"},r),navigator.userAgent.toLowerCase().indexOf("android")>-1&&(this.parameters.autoplay=0),1==this.parameters.autoplay||!n||n2const.isMobile?this.ready(e.proxy(this.initVimeoPlayer,this)):e("#"+this.playerId).on("click.vimeo n2click.vimeo",e.proxy(function(t){e(t.currentTarget).off(".vimeo"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initVimeoPlayer()},this))},this))}return s.vimeoDeferred=null,s.prototype.ready=function(t){null===s.vimeoDeferred&&(s.vimeoDeferred=e.getScript("https://player.vimeo.com/api/player.js")),s.vimeoDeferred.done(t)},s.prototype.initVimeoPlayer=function(){var t=n2('<iframe id="'+this.playerId+'_video" src="https://player.vimeo.com/video/'+this.parameters.vimeocode+"?autoplay=0&_video&title="+this.parameters.title+"&byline="+this.parameters.byline+"&background="+this.parameters.background+"&portrait="+this.parameters.portrait+"&color="+this.parameters.color+"&loop="+this.parameters.loop+("-1"==this.parameters.quality?"":"&quality="+this.parameters.quality)+'" style="position: absolute; top:0; left: 0; width: 100%; height: 100%;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');e("#"+this.playerId).append(t),this.isStatic=t.closest(".n2-ss-static-slide").length,this.playerElement=t,this.player=new Vimeo.Player(t[0]),this.player.ready().then(e.proxy(this.onReady,this))},s.prototype.onReady=function(){var t=parseFloat(this.parameters.volume);t>=0&&this.setVolume(t),this.slide=this.slider.findSlideByElement(this.playerElement),1==this.parameters.center&&(this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)));var i=this.playerElement.parent().parent();this.player.on("play",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play")},this)),this.player.on("pause",e.proxy(function(){i.triggerHandler("n2pause"),this.state.continuePlay?(this.state.continuePlay=!1,this.state.play=!0):this.state.play=!1},this)),this.player.on("ended",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"),this.state.play=!1},this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(t,i,s,r,n){-1==e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))?(parseInt(this.parameters.reset)&&this.reset(),this.setState("slide",!1)):this.setState("slide",!0)},this)),nextend.scrollTracker.add(this.playerElement,e.proxy(function(){this.setState("scroll",!0)},this),e.proxy(function(){this.state.continuePlay=!0,this.setState("scroll",!1)},this))),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.playerElement.parent().css("background",""),this.readyDeferred.resolve()},s.prototype.onResize=function(){var e=52,t=this.playerElement.parent(),i=t.width()+e,s=t.height()+e,r=16/9,n={width:i,height:s,marginTop:0};n[nextend.rtl.marginLeft]=0,i/s>r?(n.height=i*r,n.marginTop=(s-n.height)/2):(n.width=s*r,n[nextend.rtl.marginLeft]=(i-n.width)/2),this.playerElement.css(n)},s.prototype.initAutoplay=function(){this.isStatic?(this.state.play=!0,this.setState("slide",!0)):(this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(t,i,s,r,n){e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))>=0?(this.state.play=!0,this.setState("slide",!0)):this.setState("slide",!1)},this)),e.inArray(this.slide,this.slider.getVisibleSlides())>=0&&(this.state.play=!0,this.setState("slide",!0)))},s.prototype.setState=function(e,t){this.state[e]=t,this.state.play&&this.state.slide&&this.state.scroll?this.play():this.pause()},s.prototype.play=function(){this.slider.sliderElement.trigger("mediaStarted",this.playerId),0!=this.start&&this.player.setCurrentTime(this.start),this.player.play(),this.player.getCurrentTime().then(e.proxy(function(e){e<this.start&&0!=this.start&&this.player.setCurrentTime(this.start),this.player.play()},this))["catch"](e.proxy(function(e){this.player.play()},this))},s.prototype.pause=function(){this.player.pause()},s.prototype.reset=function(){this.player.setCurrentTime(this.start)},s.prototype.setVolume=function(e){this.player.setVolume(e)},s}),N2Require("FrontendItemYouTube",[],[],function(e,t,i){function s(t,i,s,r){if(this.state={scroll:!1,slide:!0,play:!1,continuePlay:!1},this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.parameters=e.extend({youtubeurl:"//www.youtube.com/watch?v=MKmIwHAFjSU",youtubecode:"MKmIwHAFjSU",center:0,autoplay:"1",theme:"dark",related:"1",vq:"default",volume:"-1",loop:0,showinfo:1,modestbranding:1,reset:0,query:[],playsinline:0},s),1==this.parameters.autoplay&&(navigator.userAgent.toLowerCase().indexOf("android")>-1||n2const.isIOS)){this.parameters.autoplay=0;try{"playsInline"in document.createElement("video")&&(this.parameters.autoplay=1,this.parameters.playsinline=1,this.parameters.volume=0)}catch(n){}}1==this.parameters.autoplay||!r||n2const.isMobile?this.ready(e.proxy(this.initYoutubePlayer,this)):e("#"+this.playerId).on("click.youtube n2click.youtube",e.proxy(function(t){e(t.currentTarget).off(".youtube"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initYoutubePlayer()},this))},this))}return s.YTDeferred=null,s.prototype.ready=function(t){if(null===s.YTDeferred)if(s.YTDeferred=e.Deferred(),"undefined"==typeof YT){var i=function(){};"function"==typeof window.onYouTubeIframeAPIReady&&(i=window.onYouTubeIframeAPIReady),window.onYouTubeIframeAPIReady=function(){s.YTDeferred.resolve(),i()},e.getScript("https://www.youtube.com/iframe_api")}else if(YT.loaded)s.YTDeferred.resolve();else var r=setInterval(function(){YT.loaded&&(s.YTDeferred.resolve(),clearInterval(r))},200);s.YTDeferred.done(t)},s.prototype.initYoutubePlayer=function(){var t=e("#"+this.playerId),i=t.closest(".n2-ss-layer");this.isStatic=t.closest(".n2-ss-static-slide").length;var s={enablejsapi:1,origin:window.location.protocol+"//"+window.location.host,theme:this.parameters.theme,wmode:"opaque",rel:this.parameters.related,vq:this.parameters.vq,start:this.parameters.start,showinfo:this.parameters.showinfo,modestbranding:this.parameters.modestbranding,playsinline:this.parameters.playsinline};1==this.parameters.center&&(s.controls=0,s.showinfo=0),1!=this.parameters.controls&&(s.autohide=1,s.controls=0,s.showinfo=0),+(navigator.platform.toUpperCase().indexOf("MAC")>=0&&navigator.userAgent.search("Firefox")>-1)&&(s.html5=1);for(var r in this.parameters.query)this.parameters.query.hasOwnProperty(r)&&(s[r]=this.parameters.query[r]);this.player=new YT.Player(this.playerId,{videoId:this.parameters.youtubecode,wmode:"opaque",playerVars:s,events:{onReady:e.proxy(this.onReady,this),onStateChange:e.proxy(function(e){switch(e.data){case YT.PlayerState.PLAYING:this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play");break;case YT.PlayerState.PAUSED:i.triggerHandler("n2pause"),this.state.continuePlay?(this.state.continuePlay=!1,this.state.play=!0):this.state.play=!1;break;case YT.PlayerState.ENDED:
5
- 1==this.parameters.loop?(this.player.seekTo(0),this.player.playVideo()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"),this.state.play=!1)}},this)}}),this.playerElement=e("#"+this.playerId),this.slide=this.slider.findSlideByElement(this.playerElement),1==this.parameters.center&&(this.playerElement.parent().css("overflow","hidden"),this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)))},s.prototype.onReady=function(){var t=parseFloat(this.parameters.volume);t>0?this.setVolume(t):this.player.mute(),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(t,i,s,r){-1==e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))?this.setState("slide",!1):this.setState("slide",!0)},this)),parseInt(this.parameters.reset)&&this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(t,i,s,r){-1==e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))&&this.player.seekTo(0)},this))),this.readyDeferred.resolve(),nextend.scrollTracker.add(this.playerElement,e.proxy(function(){this.setState("scroll",!0)},this),e.proxy(function(){this.state.continuePlay=!0,this.setState("scroll",!1)},this))},s.prototype.onResize=function(){var e=100,t=this.playerElement.parent(),i=t.width(),s=t.height()+e,r=16/9,n={width:i,height:s,marginTop:0};n[nextend.rtl.marginLeft]=0,i/s>r?(n.height=i*r,n.marginTop=(s-n.height)/2):(n.width=s*r,n[nextend.rtl.marginLeft]=(i-n.width)/2),this.playerElement.css(n)},s.prototype.initAutoplay=function(){this.isStatic?(this.state.play=!0,this.setState("slide",!0)):(this.state.slide=!1,this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(t,i,s,r){e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))>=0?(this.state.play=!0,this.setState("slide",!0)):this.setState("slide",!1)},this)),e.inArray(this.slide,this.slider.getVisibleSlides())>=0&&(this.state.play=!0,this.setState("slide",!0)))},s.prototype.setState=function(e,t){this.state[e]=t,this.state.play&&this.state.slide&&this.state.scroll?this.play():this.pause()},s.prototype.play=function(){this.isStopped()&&(this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.player.playVideo())},s.prototype.pause=function(){this.isStopped()||this.player.pauseVideo()},s.prototype.stop=function(){this.player.stopVideo()},s.prototype.isStopped=function(){var e=this.player.getPlayerState();switch(e){case-1:case 0:case 2:case 5:return!0;default:return!1}},s.prototype.setVolume=function(e){this.player.setVolume(100*e)},s});
1
  N2Require("SmartSliderBackgroundImages",[],[],function(e,t,i){function s(t){this.device=null,this.slider=t,this.lazyLoad=t.parameters.lazyLoad,this.lazyLoadNeighbor=t.parameters.lazyLoadNeighbor,this.deviceDeferred=e.Deferred(),this.slider.sliderElement.one("SliderDevice",e.proxy(this.onSlideDeviceChangedFirst,this)),this.slider.sliderElement.on("visibleSlidesChanged",e.proxy(this.onVisibleSlidesChanged,this)),this.slider.sliderElement.on("slideCountChanged",e.proxy(this.onVisibleSlidesChanged,this))}return s.prototype.whenWithProgress=function(t){for(var i=0,s=e.Deferred(),r=0;r<t.length;r++)e.when(t[r]).done(function(){s.notify(++i,t.length)});return e.when.apply(e,t).done(function(){s.resolveWith(null,arguments)}),s},s.prototype.getBackgroundImages=function(){for(var e=[],t=0;t<this.slider.realSlides.length;t++)e.push(this.slider.realSlides[t].backgroundImage);return e},s.prototype.onVisibleSlidesChanged=function(){1==this.lazyLoad?this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)):2==this.lazyLoad&&(this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide)))},s.prototype.onSlideDeviceChangedFirst=function(t,i){this.onSlideDeviceChanged(t,i),this.deviceDeferred.resolve(),this.slider.sliderElement.on("SliderDevice",e.proxy(this.onSlideDeviceChanged,this)),this.preLoadSlides=this._preLoadSlides,1==this.lazyLoad?(this.preLoadSlides=this.preloadSlidesLazyNeighbor,this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):2==this.lazyLoad?(e(window).on("load",e.proxy(this.preLoadAll,this)),this.load=this.preLoadSlides(this.slider.getVisibleSlides(this.slider.currentSlide))):this.load=this.whenWithProgress(this.preLoadAll())},s.prototype.onSlideDeviceChanged=function(e,t){this.device=t;for(var i=0;i<this.slider.realSlides.length;i++)this.slider.realSlides[i].backgroundImage&&this.slider.realSlides[i].backgroundImage.updateBackgroundToDevice(t)},s.prototype.preLoadAll=function(){for(var e=[],t=0;t<this.slider.realSlides.length;t++)e.push(this.slider.realSlides[t].preLoad());return e},s.prototype._preLoadSlides=function(t){var i=[];"[object Array]"!==Object.prototype.toString.call(t)&&(t=[t]);for(var s=0;s<t.length;s++)i.push(t[s].preLoad());return e.when.apply(e,i)},s.prototype.preloadSlidesLazyNeighbor=function(t){var i=[this._preLoadSlides(t)];if(this.lazyLoadNeighbor)for(var s=0,r=t[0].previousSlide,n=t[t.length-1].nextSlide;s<this.lazyLoadNeighbor;)i.push(r.preLoad()),r=r.previousSlide,i.push(n.preLoad()),n=n.nextSlide,s++;var o=e.Deferred();if("resolved"!=i[0].state()){var a=setTimeout(e.proxy(function(){this.slider.load.showSpinner("backgroundImage"+t[0].index),a=null},this),50);e.when.apply(e,i).done(e.proxy(function(){a?(clearTimeout(a),a=null):this.slider.load.removeSpinner("backgroundImage"+t[0].index),setTimeout(function(){o.resolve()},100)},this))}else setTimeout(function(){o.resolve()},100);return o},s.prototype.hack=function(){for(var e=0;e<this.slider.realSlides.length;e++)this.slider.realSlides[e].backgroundImage&&this.slider.realSlides[e].backgroundImage.hack()},s}),N2Require("SmartSliderLoad",[],[],function(e,t,i){function s(t,i){this.parameters=e.extend({fade:1,scroll:0},i),this.deferred=e.Deferred(),this.smartSlider=t,this.spinnerKey="fadePlaceholder",this.id=t.sliderElement.attr("id"),this.$window=e(window),this.spinner=e("#"+this.id+"-spinner")}return s.prototype.start=function(){if(this.parameters.scroll){var t=e(window);t.on("scroll."+this.id,e.proxy(this.onScroll,this)),this.onScroll()}else if(this.parameters.fade){this.loadingArea=e("#"+this.id+"-placeholder").eq(0),this.showSpinner("fadePlaceholder");var i=this.spinner.find(".n2-ss-spinner-counter");i.length&&this.smartSlider.backgroundImages.load.progress(e.proxy(function(e,t){i.html(Math.round(e/(t+1)*100)+"%")},this)),this.showSlider()}else this.showSlider()},s.prototype.onScroll=function(){this.$window.scrollTop()+this.$window.height()>this.smartSlider.sliderElement.offset().top+100&&(this.$window.off("scroll."+this.id),this.showSlider())},s.prototype.loadLayerImages=function(){var t=e.Deferred();return this.smartSlider.sliderElement.find(".n2-ss-layers-container").n2imagesLoaded().always(function(){t.resolve()}),t},s.prototype.showSlider=function(){e.when(this.smartSlider.responsive.ready,this.smartSlider.backgroundImages.load,this.loadLayerImages()).always(e.proxy(function(){this._showSlider()},this))},s.prototype._showSlider=function(t){this.smartSlider.responsive.isReadyToResize=!0,e.when.apply(e,this.smartSlider.widgetDeferreds).done(e.proxy(function(){this.smartSlider.responsive.invalidateResponsiveState=!0,this.smartSlider.responsive.doResize(),this.smartSlider.mainAnimation&&this.smartSlider.mainAnimation.setToStarterSlide(this.smartSlider.starterSlide),this.smartSlider.starterSlide.setStarterSlide(),this.smartSlider.sliderElement.trigger("BeforeVisible"),this.smartSlider.responsive.alignElement.addClass("n2-ss-slider-align-visible"),this.smartSlider.sliderElement.addClass("n2-ss-loaded").removeClass("n2notransition"),this.removeSpinner("fadePlaceholder"),e("#"+this.id+"-placeholder").remove(),this.loadingArea=this.smartSlider.sliderElement,"function"==typeof t?t(this.deferred):this.deferred.resolve()},this))},s.prototype.loaded=function(e){this.deferred.done(e)},s.prototype.showSpinner=function(e){this.spinnerKey=e,this.spinner.appendTo(this.loadingArea).css("display","")},s.prototype.removeSpinner=function(e){this.spinnerKey==e&&(this.spinner.detach(),this.spinnerKey="")},s}),N2Require("scrollTracker",[],[],function(e,t,i){function s(){this.started=!1,this.items=[]}s.prototype.add=function(e,t,i){var s={$el:e,onVisible:t,onHide:i,state:"unknown"};this.items.push(s),this._onScroll(s,Math.max(document.documentElement.clientHeight,window.innerHeight)),this.started||this.start()},s.prototype.start=function(){this.started||(e(window).on("scroll.scrollTracker",e.proxy(this.onScroll,this)),this.started=!0)},s.prototype.onScroll=function(e){for(var t=Math.max(document.documentElement.clientHeight,window.innerHeight),i=0;i<this.items.length;i++)this._onScroll(this.items[i],t)},s.prototype._onScroll=function(e,t){var i=e.$el[0].getBoundingClientRect(),s=i.height>.7*t;!s&&(i.bottom-i.height<0||i.top-t+i.height>=0)||s&&(i.bottom<0||i.top>=i.height)?"hidden"!=e.state&&("function"==typeof e.onHide&&e.onHide(),e.state="hidden"):"visible"!=e.state&&("function"==typeof e.onVisible&&e.onVisible(),e.state="visible")},nextend.scrollTracker=new s}),N2Require("SmartSliderApi",[],[],function(e,t,i){function s(){this.sliders={},this.readys={},this._resetCounters=[]}return s.prototype.makeReady=function(e,t){if(this.sliders[e]=t,"undefined"!=typeof this.readys[e])for(var i=0;i<this.readys[e].length;i++)this.readys[e][i].call(t,t,t.sliderElement)},s.prototype.ready=function(e,t){"undefined"!=typeof this.sliders[e]?t.call(this.sliders[e],this.sliders[e],this.sliders[e].sliderElement):("undefined"==typeof this.readys[e]&&(this.readys[e]=[]),this.readys[e].push(t))},s.prototype.trigger=function(t,i){var s=n2(t),r=i.split(","),n=s.closest(".n2-ss-slide,.n2-ss-static-slide");if(r.length>1){-1==e.inArray(t,this._resetCounters)&&(this._resetCounters.push(t),n.on("layerAnimationSetStart.resetCounter",function(){s.data("eventCounter",0)}));var o=s.data("eventCounter")||0;i=r[o],o++,o>r.length-1&&(o=0),s.data("eventCounter",o)}n.triggerHandler(i)},s.prototype.applyAction=function(e,t){var i=n2(e).closest(".n2-ss-slider").data("ss");i[t].apply(i,Array.prototype.slice.call(arguments,2))},s.prototype.applyActionWithClick=function(){nextend.shouldPreventClick||this.applyAction.apply(this,arguments)},window.n2ss=new s,s}),N2Require("SmartSliderAbstract",[],[],function($,scope,undefined){function SmartSliderAbstract(e,t){this.startedDeferred=$.Deferred(),e instanceof n2&&(e="#"+e.attr("id"));var i=e.substr(1);return window[i]&&window[i]instanceof SmartSliderAbstract?!1:(this.isAdmin=!!t.admin,this.id=parseInt(i.replace("n2-ss-","")),window[i]=this,this.readyDeferred=$.Deferred(),void this.waitForExists(i,t))}return SmartSliderAbstract.prototype.kill=function(){this.killed=!0,$("#"+this.sliderElement.attr("id")+"-placeholder").remove(),this.sliderElement.closest(".n2-ss-align").remove()},SmartSliderAbstract.prototype.waitForExists=function(e,t){var i=$.Deferred(),s=function(){var t=$("#"+e);t.length?i.resolve(t):setTimeout(s,500)};i.done($.proxy(this.onSliderExists,this,e,t)),s()},SmartSliderAbstract.prototype.onSliderExists=function(e,t,i){if("SCRIPT"==i.prop("tagName")){var s=i.data("dependency"),r=i.data("delay"),n=$.proxy(function(){var s=$(i.html().replace(/<_s_c_r_i_p_t/g,"<script").replace(/<_\/_s_c_r_i_p_t/g,"</script"));i.replaceWith(s),this.waitForDimension($("#"+e),t),$(window).triggerHandler("n2Rocket",[this.sliderElement])},this);s&&$("#n2-ss-"+s).length?n2ss.ready(s,$.proxy(function(e){e.ready(n)},this)):r?setTimeout(n,r):n()}else this.waitForDimension(i,t)},SmartSliderAbstract.prototype.waitForDimension=function(e,t){var i=$.Deferred(),s=function(){var t=e.is(":visible");t?i.resolve():setTimeout(s,200)};s(),i.done($.proxy(this.onSliderHasDimension,this,e,t))},SmartSliderAbstract.prototype.onSliderHasDimension=function($sliderElement,parameters){if(this.killed=!1,this.responsive=!1,this.mainAnimationLastChangeTime=0,this.currentSlide=null,this.currentRealSlide=null,this.staticSlide=!1,this.isShuffled=!1,this.slides=[],this.visibleSlides=1,this.sliderElement=$sliderElement.data("ss",this),this.parameters=$.extend({admin:!1,playWhenVisible:1,playWhenVisibleAt:.5,perspective:1e3,callbacks:"",autoplay:{},blockrightclick:!1,maintainSession:0,align:"normal",controls:{drag:!1,touch:"horizontal",keyboard:!1,scroll:!1,tilt:!1},hardwareAcceleration:!0,layerMode:{playOnce:0,playFirstLayer:1,mode:"skippable",inAnimation:"mainInEnd"},foreverLayerAnimation:!1,parallax:{enabled:0,mobile:0,horizontal:"mouse",vertical:"mouse",origin:"enter"},load:{},mainanimation:{},randomize:{randomize:0,randomizeFirst:0},responsive:{},lazyload:{enabled:0},postBackgroundAnimations:!1,initCallbacks:[],dynamicHeight:0,lightbox:[],lightboxDeviceImages:[],titles:[],descriptions:[],"background.parallax.tablet":0,"background.parallax.mobile":0,allowBGImageAttachmentFixed:1,particlejs:0},parameters),!(this.isAdmin||parameters.responsive.desktop&&parameters.responsive.tablet&&parameters.responsive.mobile)){var md=new MobileDetect(window.navigator.userAgent,801),isTablet=!!md.tablet(),isMobile=!!md.phone();if(!parameters.responsive.mobile&&isMobile||!parameters.responsive.tablet&&isTablet||!parameters.responsive.desktop&&!isTablet&&!isMobile)return void this.kill()}this.firstSlideReady=$.Deferred();try{eval(this.parameters.callbacks)}catch(e){console.error(e)}this.startVisibilityCheck(),n2ss.makeReady(this.id,this),this.widgetDeferreds=[],this.sliderElement.on("addWidget",$.proxy(this.addWidget,this)),this.isAdmin&&(this.changeTo=function(){}),this.load=new scope.SmartSliderLoad(this,this.parameters.load),this.backgroundImages=new scope.SmartSliderBackgroundImages(this),this.__initSlides(),$.when(this.overrideFirstSlide()).done($.proxy(this.onFirstSlideInitialized,this)),navigator.userAgent.match("UCBrowser")&&$("html").addClass("n2-ucbrowser")},SmartSliderAbstract.prototype.overrideFirstSlide=function(){if("undefined"!=typeof window["ss"+this.id]){if("object"==typeof window["ss"+this.id])return window["ss"+this.id].done($.proxy(function(e){null!==e&&this.changeActiveBeforeLoad(e)},this));var e="undefined"!=typeof window["ss"+this.id]?parseInt(window["ss"+this.id]):null;null!==e&&this.changeActiveBeforeLoad(e)}else if(!this.isAdmin&&this.parameters.maintainSession&&"undefined"!=typeof sessionStorage){var t=sessionStorage.getItem("ss-"+this.id);null!==t&&this.changeActiveBeforeLoad(parseInt(t)),this.sliderElement.on("mainAnimationComplete",$.proxy(function(e,t,i,s){sessionStorage.setItem("ss-"+this.id,s)},this))}return!0},SmartSliderAbstract.prototype.changeActiveBeforeLoad=function(e){e>0&&e<this.realSlides.length&&this.starterSlide!=this.realSlides[e]&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[e],this.setActiveSlide(this.realSlides[e]))},SmartSliderAbstract.prototype.startCurrentSlideIndex=function(){this.currentRealSlide=this.currentSlide=this.starterSlide,this.setActiveSlide(this.currentSlide),parseInt(this.parameters.carousel)?this.initCarousel():this.initNotCarousel()},SmartSliderAbstract.prototype.onFirstSlideInitialized=function(){for(var i=0;i<this.realSlides.length;i++)this.realSlides[i].setNext(this.realSlides[i+1>this.realSlides.length-1?0:i+1]);this.startCurrentSlideIndex(),this.firstSlideReady.resolve(this.currentSlide);for(var j=0;j<this.parameters.initCallbacks.length;j++)new Function("$",this.parameters.initCallbacks[j]).call(this,$);if(this.widgets=new scope.SmartSliderWidgets(this),this.sliderElement.on({universalenter:$.proxy(function(e){$(e.target).closest(".n2-full-screen-widget").length||(this.sliderElement.addClass("n2-hover"),this.widgets.setState("hover",!0))},this),universalleave:$.proxy(function(e){e.stopPropagation(),this.sliderElement.removeClass("n2-hover"),this.widgets.setState("hover",!1)},this)}),this.controls={},this.parameters.blockrightclick&&this.sliderElement.bind("contextmenu",function(e){e.preventDefault()}),this.initMainAnimation(),this.initResponsiveMode(),!this.killed){try{var removeHoverClassCB=$.proxy(function(){this.sliderElement.removeClass("n2-has-hover"),this.sliderElement[0].removeEventListener("touchstart",removeHoverClassCB,window.n2passiveEvents?{passive:!0}:!1)},this);this.sliderElement[0].addEventListener("touchstart",removeHoverClassCB,window.n2passiveEvents?{passive:!0}:!1)}catch(e){}if(this.initControls(),this.startedDeferred.resolve(this),!this.isAdmin){var event="click";this.hasTouch()&&(event="n2click"),this.sliderElement.find("[data-n2click]").each(function(i,el){var el=$(el);el.on(event,function(){eval(el.data("n2click"))})}),this.sliderElement.find("[data-click]").each(function(i,el){var el=$(el).on("click",function(){eval(el.data("click"))}).css("cursor","pointer")}),this.sliderElement.find("[data-n2middleclick]").on("mousedown",function(e){var el=$(this);2!=e.which&&4!=e.which||(e.preventDefault(),eval(el.data("n2middleclick")))}),this.sliderElement.find("[data-mouseenter]").each(function(i,el){var el=$(el).on("mouseenter",function(){eval(el.data("mouseenter"))})}),this.sliderElement.find("[data-mouseleave]").each(function(i,el){var el=$(el).on("mouseleave",function(){eval(el.data("mouseleave"))})}),this.sliderElement.find("[data-play]").each(function(i,el){var el=$(el).on("n2play",function(){eval(el.data("play"))})}),this.sliderElement.find("[data-pause]").each(function(i,el){var el=$(el).on("n2pause",function(){eval(el.data("pause"))})}),this.sliderElement.find("[data-stop]").each(function(i,el){var el=$(el).on("n2stop",function(){eval(el.data("stop"))})}),window.n2FocusAllowed==undefined&&(window.n2FocusAllowed=!1,$(window).on({keydown:function(){window.n2FocusAllowed=!0},keyup:function(){window.n2FocusAllowed=!1}})),this.sliderElement.find("a").on({focus:$.proxy(function(e){if(n2FocusAllowed){var t=this.findSlideByElement(e.currentTarget);t&&t!=this.currentRealSlide&&this.directionalChangeToReal(t.index)}},this)})}this.preReadyResolve(),this.sliderElement.find('[role="button"], [tabindex]').not("input,select,textarea").keypress(function(e){32!==e.charCode&&13!==e.charCode||(e.preventDefault(),$(e.target).click())}).on("mouseleave",function(e){$(e.currentTarget).blur()})}},SmartSliderAbstract.prototype.__initSlides=function(){for(var e=this.sliderElement.find(".n2-ss-slide"),t=0;t<e.length;t++)this.slides.push(new scope.FrontendSliderSlide(this,e.eq(t),t));this.starterSlide=this.slides[0];for(var t=0;t<this.slides.length;t++)this.slides[t].init(),1==this.slides[t].$element.data("first")&&(this.starterSlide=this.slides[t]);this.realSlides=this.slides,this.afterRawSlidesReady(),this.randomize(this.slides);var i=this.sliderElement.find(".n2-ss-static-slide");i.length&&(this.staticSlide=new scope.FrontendSliderStaticSlide(this,i))},SmartSliderAbstract.prototype.afterRawSlidesReady=function(){},SmartSliderAbstract.prototype.setVisibleSlides=function(e){e!=this.visibleSlides&&(this.visibleSlides=e,this.sliderElement.triggerHandler("visibleSlidesChanged"))},SmartSliderAbstract.prototype.getVisibleSlides=function(e){return 0==arguments.length&&(e=this.currentSlide),[e]},SmartSliderAbstract.prototype.findSlideBackground=function(e){return e.$element.find(".n2-ss-slide-background")},SmartSliderAbstract.prototype.getRealIndex=function(e){return e},SmartSliderAbstract.prototype.randomize=function(e){this.randomizeFirst(),this.parameters.randomize.randomize&&this.shuffleSlides(e)},SmartSliderAbstract.prototype.randomizeFirst=function(){this.parameters.randomize.randomizeFirst&&(this.unsetActiveSlide(this.starterSlide),this.starterSlide=this.realSlides[Math.floor(Math.random()*this.realSlides.length)],this.setActiveSlide(this.starterSlide),console.log("randomize first"))},SmartSliderAbstract.prototype.shuffleSlides=function(e){e.sort(function(){return.5-Math.random()});for(var t=e[0].$element.parent(),i=0;i<e.length;i++)e[i].$element.appendTo(t),e[i].setIndex(i);this.isShuffled=!0},SmartSliderAbstract.prototype.addWidget=function(e,t){this.widgetDeferreds.push(t)},SmartSliderAbstract.prototype.started=function(e){this.startedDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.preReadyResolve=function(){setTimeout($.proxy(this._preReadyResolve,this),1)},SmartSliderAbstract.prototype._preReadyResolve=function(){this.load.start(),this.load.loaded($.proxy(this.readyResolve,this))},SmartSliderAbstract.prototype.readyResolve=function(){$(window).scroll(),this.readyDeferred.resolve()},SmartSliderAbstract.prototype.ready=function(e){this.readyDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.startVisibilityCheck=function(){this.visibleDeferred=$.Deferred(),this.parameters.playWhenVisible?this.ready($.proxy(function(){$(window).on("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.checkIfVisible()},this)):this.ready($.proxy(function(){this.visibleDeferred.resolve()},this))},SmartSliderAbstract.prototype.checkIfVisible=function(){var e=$(window).scrollTop(),t=$(window).height(),i=this.sliderElement.offset().top,s=i+Math.min(this.sliderElement.height(),t)*this.parameters.playWhenVisibleAt,r=i+Math.min(this.sliderElement.height(),t)*(1-this.parameters.playWhenVisibleAt);(this.isAdmin||s>=e&&e+t>=r)&&($(window).off("scroll.n2-ss-visible"+this.id+" resize.n2-ss-visible"+this.id,$.proxy(this.checkIfVisible,this)),this.visibleDeferred.resolve())},SmartSliderAbstract.prototype.visible=function(e){this.visibleDeferred.done($.proxy(e,this))},SmartSliderAbstract.prototype.isPlaying=function(){return"ended"!=this.mainAnimation.getState()},SmartSliderAbstract.prototype.focus=function(e){var t=$.Deferred();if("undefined"==typeof e&&(e=0),this.responsive.parameters.focusUser&&!e||this.responsive.parameters.focusAutoplay&&e){var i=this.sliderElement.offset().top-(this.responsive.verticalOffsetSelectors.height()||0);$(window).scrollTop()!=i?$("html, body").animate({scrollTop:i},400,$.proxy(function(){t.resolve()},this)):t.resolve()}else t.resolve();return t},SmartSliderAbstract.prototype.initNotCarousel=function(){this.next=function(e,t){var i=this.currentSlide.index+1;return i<this.slides.length?this.changeTo(i,!1,e,t):!1},this.previous=function(e,t){var i=this.currentSlide.index-1;return i>=0?this.changeTo(i,!0,e,t):!1},this.isChangePossible=function(e){var t=!1;return"next"==e?(t=this.currentSlide.index+1,t>=this.slides.length&&(t=!1)):"previous"==e&&(t=this.currentSlide.index-1,0>t&&(t=!1)),t!==!1&&t!=this.currentSlide.index};var e=$.proxy(function(e){0==e?this.widgets.setState("nonCarouselFirst",!0):this.widgets.setState("nonCarouselFirst",!1),e==this.slides.length-1?this.widgets.setState("nonCarouselLast",!0):this.widgets.setState("nonCarouselLast",!1)},this);this.startedDeferred.done($.proxy(function(){e(this.currentSlide.index)},this)),this.sliderElement.on("sliderSwitchTo",function(t,i){e(i)})},SmartSliderAbstract.prototype.isChangePossibleCarousel=function(e){var t=!1;return"next"==e?(t=this.currentSlide.index+1,t>=this.slides.length&&(t=0)):"previous"==e&&(t=this.currentSlide.index-1,0>t&&(t=this.slides.length-1)),t!==!1&&t!=this.currentSlide.index},SmartSliderAbstract.prototype.initCarousel=function(){this.next=this.nextCarousel,this.previous=this.previousCarousel,this.isChangePossible=this.isChangePossibleCarousel},SmartSliderAbstract.prototype.nextCarousel=function(e,t){var i=this.currentSlide.index+1;return i>=this.slides.length&&(i=0),this.changeTo(i,!1,e,t)},SmartSliderAbstract.prototype.previousCarousel=function(e,t){var i=this.currentSlide.index-1;return 0>i&&(i=this.slides.length-1),this.changeTo(i,!0,e,t)},SmartSliderAbstract.prototype.directionalChangeToReal=function(e){this.directionalChangeTo(e)},SmartSliderAbstract.prototype.directionalChangeTo=function(e){e>this.currentSlide.index?this.changeTo(e,!1):this.changeTo(e,!0)},SmartSliderAbstract.prototype.changeTo=function(e,t,i,s){if(e=parseInt(e),e!=this.currentSlide.index){this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)]);var r=$.now();return $.when(this.backgroundImages.preLoadSlides(this.getVisibleSlides(this.slides[e])),this.focus(i)).done($.proxy(function(){if(this.mainAnimationLastChangeTime<=r){this.mainAnimationLastChangeTime=r;var n=this.mainAnimation.getState();if("ended"==n){"undefined"==typeof i&&(i=!1);var o=this.mainAnimation;"undefined"!=typeof s&&(o=s),this._changeTo(e,t,i,s),o.changeTo(this.currentSlide,this.slides[e],t,i),this._changeCurrentSlide(e)}else"playing"==n&&(this.sliderElement.off(".fastChange").one("mainAnimationComplete.fastChange",$.proxy(function(){this.changeTo.call(this,e,t,i,s)},this)),this.mainAnimation.timeScale(2*this.mainAnimation.timeScale()))}},this)),!0}return!1},SmartSliderAbstract.prototype._changeCurrentSlide=function(e){this.currentRealSlide=this.currentSlide=this.slides[e]},SmartSliderAbstract.prototype._changeTo=function(e,t,i,s){},SmartSliderAbstract.prototype.revertTo=function(e,t){this.unsetActiveSlide(this.slides[t]),this.setActiveSlide(this.slides[e]),this._changeCurrentSlide(e),this.sliderElement.trigger("sliderSwitchTo",[e,this.getRealIndex(e)])},SmartSliderAbstract.prototype.setActiveSlide=function(e){e.$element.addClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.unsetActiveSlide=function(e){e.$element.removeClass("n2-ss-slide-active")},SmartSliderAbstract.prototype.findSlideByElement=function(e){e=$(e);for(var t=0;t<this.realSlides.length;t++)if(1===this.realSlides[t].$element.has(e).length)return this.realSlides[t];return!1},SmartSliderAbstract.prototype.findSlideIndexByElement=function(e){var t=this.findSlideByElement(e);return t?t:-1},SmartSliderAbstract.prototype.initMainAnimation=function(){this.mainAnimation=!1},SmartSliderAbstract.prototype.initResponsiveMode=function(){this.dimensions=this.responsive.responsiveDimensions},SmartSliderAbstract.prototype.hasTouch=function(){return"0"!=this.parameters.controls.touch&&this.slides.length>1},SmartSliderAbstract.prototype.initControls=function(){this.parameters.admin||(this.hasTouch()&&new scope.SmartSliderControlTouch(this,this.parameters.controls.touch,{fallbackToMouseEvents:this.parameters.controls.drag}),this.parameters.controls.keyboard&&("undefined"!=typeof this.controls.touch?new scope.SmartSliderControlKeyboard(this,this.controls.touch._direction.axis):new scope.SmartSliderControlKeyboard(this,"horizontal")),this.parameters.controls.scroll&&new scope.SmartSliderControlScroll(this),this.parameters.controls.tilt&&new scope.SmartSliderControlTilt(this),this.controlAutoplay=new scope.SmartSliderControlAutoplay(this,this.parameters.autoplay),this.controlFullscreen=new scope.SmartSliderControlFullscreen(this))},SmartSliderAbstract.prototype.getSlideIndex=function(e){return e},SmartSliderAbstract.prototype.slideToID=function(e,t){for(var i=0;i<this.realSlides.length;i++)if(this.realSlides[i].id==e)return this.slide(this.getSlideIndex(i),t);var s=$('[data-id="'+e+'"]').closest(".n2-ss-slider");if(s.length&&this.id==s.data("ss").id)return!0;if(s.length){var r=0;return"undefined"!=typeof n2ScrollOffsetSelector&&(r=n2(n2ScrollOffsetSelector).outerHeight()),n2("html, body").animate({scrollTop:s.offset().top-r},400),s.data("ss").slideToID(e,t)}},SmartSliderAbstract.prototype.slide=function(e,t){return e>=0&&e<this.slides.length?"undefined"==typeof t?parseInt(this.parameters.carousel)&&this.currentSlide.index==this.slides.length-1&&0==e?this.next():this.currentSlide.index>e?this.changeTo(e,!0):this.changeTo(e):this.changeTo(e,!t):!1},SmartSliderAbstract.prototype.startAutoplay=function(e){return"undefined"!=typeof this.controlAutoplay?(this.controlAutoplay.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"),!0):!1},SmartSliderAbstract}),N2Require("SmartSliderWidgets",[],[],function($,scope,undefined){function SmartSliderWidgets(e){this.slider=e,this.sliderElement=e.sliderElement.on("BeforeVisible",$.proxy(this.onReady,this)),this.widgets={},this.excludedSlides={},this.states={hover:!1,nonCarouselFirst:!1,nonCarouselLast:!1,currentSlideIndex:-1}}return SmartSliderWidgets.prototype.setState=function(e,t){this.states[e]!=t&&(this.states[e]=t,this.onStateChange())},SmartSliderWidgets.prototype.onStateChange=function(){var e={};for(var t in this.widgets)this.widgets[t].hasClass("n2-ss-widget-display-hover")?this.states.hover?e[t]=!0:e[t]=!1:e[t]=!0,this.excludedSlides[t]!=undefined&&-1!=$.inArray(this.states.currentSlideIndex+1,this.excludedSlides[t])&&(e[t]=!1);this.states.nonCarouselFirst&&(e.previous=!1),this.states.nonCarouselLast&&(e.next=!1);for(var t in this.widgets)this.widgets[t].toggleClass("n2-ss-widget-hidden",!e[t])},SmartSliderWidgets.prototype.onReady=function(){this.dimensions=this.slider.dimensions,this.widgets={previous:this.sliderElement.find(".nextend-arrow-previous"),next:this.sliderElement.find(".nextend-arrow-next"),bullet:this.sliderElement.find(".n2-ss-control-bullet"),autoplay:this.sliderElement.find(".nextend-autoplay"),indicator:this.sliderElement.find(".nextend-indicator"),bar:this.sliderElement.find(".nextend-bar"),thumbnail:this.sliderElement.find(".nextend-thumbnail"),shadow:this.sliderElement.find(".nextend-shadow"),fullscreen:this.sliderElement.find(".nextend-fullscreen"),html:this.sliderElement.find(".nextend-widget-html")},this.$vertical=this.sliderElement.find('[data-position="above"],[data-position="below"]').not(".nextend-shadow");var e=!1;for(var t in this.widgets){var i=this.widgets[t].attr("data-exclude-slides");if(i!=undefined){for(var s=i.split(","),r=s.length-1;r>=0;r--){var n=s[r].split("-");if(2==n.length){var o=parseInt(n[0]),a=parseInt(n[1]);if(a>=o)for(var l=o;a>=l;l++)s.push(l)}else s[r]=parseInt(s[r])}s.length>0&&(this.excludedSlides[t]=s,e=!0)}}if(e){var d=$.proxy(function(e,t){this.setState("currentSlideIndex",t)},this);d(null,this.slider.currentRealSlide.index),this.slider.sliderElement.on("sliderSwitchTo",d)}this.variableElementsDimension={width:this.sliderElement.find("[data-sswidth]"),height:this.sliderElement.find("[data-ssheight]")},this.variableElements={top:this.sliderElement.find("[data-sstop]"),right:this.sliderElement.find("[data-ssright]"),bottom:this.sliderElement.find("[data-ssbottom]"),left:this.sliderElement.find("[data-ssleft]")},this.slider.sliderElement.on("SliderAnimatedResize",$.proxy(this.onAnimatedResize,this)),this.slider.sliderElement.on("SliderResize",$.proxy(this.onResize,this)),this.slider.sliderElement.one("slideCountChanged",$.proxy(function(){this.onResize(this.slider.responsive.lastRatios)},this)),this.onResize(this.slider.responsive.lastRatios),this.onStateChange()},SmartSliderWidgets.prototype.onAnimatedResize=function(e,ratios,timeline,duration){for(var key in this.widgets){var el=this.widgets[key],visible=el.is(":visible");this.dimensions[key+"width"]=visible?el.outerWidth(!1):0,this.dimensions[key+"height"]=visible?el.outerHeight(!1):0}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible")){var to={};try{to[k]=eval(el.data("ss"+k))+"px";for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}timeline.to(el,duration,to,0)}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var to={};to[k]=eval(el.data("ss"+k))+"px",timeline.to(el,duration,to,0)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}},SmartSliderWidgets.prototype.onResize=function(e,ratios,responsive,timeline){if(!timeline){for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,0)}for(var key in this.widgets){var el=this.widgets[key],visible=el.length&&el.is(":visible");el.length&&el.is(":visible")?(this.dimensions[key+"width"]=el.outerWidth(!1),this.dimensions[key+"height"]=el.outerHeight(!1)):(this.dimensions[key+"width"]=0,this.dimensions[key+"height"]=0)}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var last=this.variableElements[k].data("n2Last"+k);last>0&&this.variableElements[k].css(k,last)}this.dimensions.width=this.dimensions.slider.width,this.dimensions.height=this.dimensions.slider.height,this.dimensions.outerwidth=this.sliderElement.parent().width(),this.dimensions.outerheight=this.sliderElement.parent().height(),this.dimensions.canvaswidth=this.dimensions.slide.width,this.dimensions.canvasheight=this.dimensions.slide.height,this.dimensions.margintop=this.dimensions.slider.marginTop,this.dimensions.marginright=this.dimensions.slider.marginRight,this.dimensions.marginbottom=this.dimensions.slider.marginBottom,this.dimensions.marginleft=this.dimensions.slider.marginLeft;var variableText="";for(var key in this.dimensions){var value=this.dimensions[key];if("object"==typeof value)for(var key2 in value)variableText+="var "+key+key2+" = "+value[key2]+";";else variableText+="var "+key+" = "+value+";"}eval(variableText);for(var k in this.variableElementsDimension)for(var i=0;i<this.variableElementsDimension[k].length;i++){var el=this.variableElementsDimension[k].eq(i);if(el.is(":visible"))try{el.css(k,eval(el.data("ss"+k))+"px");for(var widget in this.widgets)this.widgets[widget].filter(el).length&&("width"==k?this.dimensions[widget+k]=el.outerWidth(!1):"height"==k&&(this.dimensions[widget+k]=el.outerHeight(!1)),eval(widget+k+" = "+this.dimensions[widget+k]+";"))}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k));
2
  }}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){var el=this.variableElements[k].eq(i);try{var value=eval(el.data("ss"+k));el.css(k,value+"px"),el.data("n2Last"+k,value)}catch(e){console.log(el," position variable: "+e.message+": ",el.data("ss"+k))}}this.slider.responsive.refreshStaticSizes()}},SmartSliderWidgets}),N2Require("SmartSliderBackgroundAnimationAbstract",[],[],function(e,t,i){function s(e,t,i,s,r,n){this.durationMultiplier=r,this.original={currentImage:t,nextImage:i},this.animationProperties=s,this.reversed=n,this.timeline=e.timeline,this.containerElement=e.bgAnimationElement,this.shiftedBackgroundAnimation=e.parameters.shiftedBackgroundAnimation,this.clonedImages={}}return s.prototype.postSetup=function(){},s.prototype.ended=function(){},s.prototype.revertEnded=function(){},s.prototype.placeNextImage=function(){this.clonedImages.nextImage=this.original.nextImage.clone().css({position:"absolute",top:0,left:0}),NextendTween.set(this.clonedImages.nextImage,{transform:"none"}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({position:"absolute",top:0,left:0}),NextendTween.set(this.clonedImages.currentImage,{transform:"none"}),this.containerElement.append(this.clonedImages.currentImage)},s.prototype.hideOriginals=function(){this.original.currentImage.css("opacity",0),this.original.nextImage.css("opacity",0)},s.prototype.resetAll=function(){this.original.currentImage.css("opacity",1),this.original.nextImage.css("opacity",1),this.containerElement.html("")},s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationCubic",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,fullCube:!0,tiles:{delay:.2,sequence:"Parallel"},depth:50,main:{side:"Left",duration:.5,ease:"easeInOutCubic",direction:"horizontal",real3D:!0},pre:[],post:[]},this.animationProperties);i.fullCube=!0,this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=r.depth;switch(a){case"width":a=i;break;case"height":a=s}switch(r.main.side){case"Top":case"Bottom":a=s;break;case"Left":case"Right":a=i}r.main.real3D&&NextendTween.set(t.get(0),{transformStyle:"preserve-3d"});var l=e('<div class="cuboid"></div>').css({position:"absolute",left:"0",top:"0",width:"100%",height:"100%"}).appendTo(t);NextendTween.set(l.get(0),{transformStyle:"preserve-3d",z:-a/2});var d=0;"horizontal"==r.main.direction&&(d=180);var h=this.getSide(l,i,s,0,0,-a/2,180,0,d),p={Back:h,BackInvert:h};return(r.fullCube||"vertical"==r.main.direction)&&(p.Bottom=this.getSide(l,i,a,0,s-a/2,0,-90,0,0),p.Top=this.getSide(l,i,a,0,-a/2,0,90,0,0)),p.Front=this.getSide(l,i,s,0,0,a/2,0,0,0),(r.fullCube||"horizontal"==r.main.direction)&&(p.Left=this.getSide(l,a,s,-a/2,0,0,0,-90,0),p.Right=this.getSide(l,a,s,i-a/2,0,0,0,90,0)),p.Front.append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})),p[r.main.side].append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})),l},s.prototype.getSide=function(t,i,s,r,n,o,a,l,d){var h=e('<div class="n2-3d-side"></div>').css({width:i,height:s}).appendTo(t);return NextendTween.set(h.get(0),{x:r,y:n,z:o,rotationX:a,rotationY:l,rotationZ:d,backfaceVisibility:"hidden"}),h},s.prototype.addAnimation=function(e,t){var i=e.duration;delete e.duration,this.timeline.to(t,i*this.durationMultiplier,e)},s.prototype.transform=function(e,t,i){for(var s=0;s<e.pre.length;s++){var r=e.pre[s],n=r.duration*this.durationMultiplier;this.timeline.to(t,n,r,i),i+=n}this["transform"+e.main.side](e.main,t,i),i+=e.main.duration;for(var s=0;s<e.post.length;s++){var r=e.post[s],n=r.duration*this.durationMultiplier;this.timeline.to(t,n,r,i),i+=n}},s.prototype.transformLeft=function(e,t,i){this._transform(e,t,i,0,90,0)},s.prototype.transformRight=function(e,t,i){this._transform(e,t,i,0,-90,0)},s.prototype.transformTop=function(e,t,i){this._transform(e,t,i,-90,0,0)},s.prototype.transformBottom=function(e,t,i){this._transform(e,t,i,90,0,0)},s.prototype.transformBack=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,180,0):this._transform(e,t,i,180,0,0)},s.prototype.transformBackInvert=function(e,t,i){"horizontal"==e.direction?this._transform(e,t,i,0,-180,0):this._transform(e,t,i,-180,0,0)},s.prototype._transform=function(e,t,i,s,r,n){this.timeline.to(t,e.duration*this.durationMultiplier,{rotationX:s,rotationY:r,rotationZ:n,ease:e.ease},i)},s}),N2Require("SmartSliderBackgroundAnimationExplode",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.transform=function(t,i,s){var r=e.extend(!0,{},t.main.current);r.rotationX=90*(3*Math.random()-1),r.rotationY=90*(3*Math.random()-1),r.rotationZ=90*(3*Math.random()-1),this.timeline.to(i.tile,t.main.duration*this.durationMultiplier,r,s)},s}),N2Require("SmartSliderBackgroundAnimationExplodeReversed",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,reverse:!1,tiles:{delay:0,sequence:"Parallel"},main:{duration:.5,zIndex:2,current:{ease:"easeInOutCubic"}}},this.animationProperties);this.placeCurrentImage(),this.clonedImages.currentImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{next:a,tile:t}},s.prototype.transform=function(t,i,s){var r=e.extend(!0,{},t.main.current);r.rotationX=90*(3*Math.random()-1),r.rotationY=90*(3*Math.random()-1),r.rotationZ=30*(3*Math.random()-1),this.timeline.from(i.tile,t.main.duration*this.durationMultiplier,r,s)},s}),N2Require("SmartSliderBackgroundAnimationFlat",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:1,rows:1,tiles:{cropOuter:!1,crop:!0,delay:0,sequence:"Parallel"},main:{type:"next",duration:.5,real3D:!0,zIndex:1,current:{ease:"easeInOutCubic"},next:{ease:"easeInOutCubic"}}},this.animationProperties);this.reversed&&("undefined"!=typeof i.invert&&e.extend(!0,i.main,i.invert),"undefined"!=typeof i.invertTiles&&e.extend(i.tiles,i.invertTiles)),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i),i.tiles.cropOuter&&this.container.css("overflow","hidden")},s.prototype.renderTile=function(t,i,s,r,n,o){r.tiles.crop&&t.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t),l=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:1}).append(this.clonedNext().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return r.main.real3D&&(NextendTween.set(t.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(a.get(0),{transformStyle:"preserve-3d"}),NextendTween.set(l.get(0),{transformStyle:"preserve-3d"})),{current:a,next:l}},s.prototype.transform=function(e,t,i){var s=e.main;"current"!=s.type&&"both"!=s.type||this.timeline.to(t.current,s.duration*this.durationMultiplier,s.current,i),"next"!=s.type&&"both"!=s.type||this.timeline.from(t.next,s.duration*this.durationMultiplier,s.next,i)},s}),N2Require("SmartSliderBackgroundAnimationSlixes",["SmartSliderBackgroundAnimationTiled"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationTiled.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationTiled.prototype),s.prototype.constructor=s,s.prototype.setup=function(){var i=e.extend(!0,{columns:2,rows:2,main:{duration:2,zIndex:2}},this.animationProperties);this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),t.SmartSliderBackgroundAnimationTiled.prototype.setup.call(this,i)},s.prototype.renderTile=function(t,i,s,r,n,o){this.container.css("overflow","hidden");var a=e("<div></div>").css({position:"absolute",left:0,top:0,width:i,height:s,overflow:"hidden",zIndex:r.main.zIndex}).append(this.clonedCurrent().clone().css({position:"absolute",top:-o+"px",left:-n+"px"})).appendTo(t);return NextendTween.set(t.get(0),{transformPerspective:1e3,transformStyle:"preserve-3d"}),{current:a,tile:t}},s.prototype.animate=function(t,i,s){this.timeline.to(s[0][0].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},0),this.timeline.to(s[0][1].tile,t.main.duration*this.durationMultiplier,{left:"-50%",ease:"easeInOutCubic"},.3),this.timeline.to(s[1][0].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.15),this.timeline.to(s[1][1].tile,t.main.duration*this.durationMultiplier,{left:"100%",ease:"easeInOutCubic"},.45),e("<div />").css({position:"absolute",left:0,top:0,width:"100%",height:"100%",overflow:"hidden"}).prependTo(this.clonedImages.nextImage.parent()).append(this.clonedImages.nextImage),this.timeline.fromTo(this.clonedImages.nextImage,t.main.duration*this.durationMultiplier,{scale:1.3},{scale:1},.45)},s}),N2Require("SmartSliderBackgroundAnimationTiled",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments),this.setup()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.setup=function(t){var i=e("<div></div>").css({position:"absolute",left:0,top:0,width:this.w,height:this.h});this.container=i,NextendTween.set(i.get(0),{force3D:!0,perspective:1e3});for(var s=[],r=[],n=t.columns,o=t.rows,a=Math.floor(this.w/n),l=Math.floor(this.h/o),d=this.w-n*a,h=Math.ceil(d/n),p=this.h-o*l,c=Math.ceil(p/o),u=0,m=0;n>m;m++){s[m]=[];var f=a,g=0;if(d>0){var y=d>=h?h:d;f+=y,d-=y}for(var v=p,S=0;o>S;S++){var b=l;if(v>0){var y=v>=c?c:v;b+=y,v-=y}var x=e('<div class="tile tile-'+m+"-"+S+'"></div>').css({position:"absolute",top:g+"px",left:u+"px",width:f+"px",height:b+"px",zIndex:-Math.abs(m-parseInt(n/2))+n-Math.abs(S-parseInt(o/2))}).appendTo(i),w=this.renderTile(x,f,b,t,u,g);r.push(w),s[m][S]=w,g+=b}u+=f}i.appendTo(this.containerElement),this.preSetup(),this.animate(t,r,s)},s.prototype.animate=function(t,i,s){this["sequence"+t.tiles.sequence](e.proxy(this.transform,this,t),i,s,t.tiles.delay*this.durationMultiplier)},s.prototype.sequenceParallel=function(e,t){e(t,null)},s.prototype.sequenceRandom=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<t.length;n++)e(t[n],r+Math.random()*s)},s.prototype.sequenceForwardCol=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<t.length;n++)e(t[n],r+s*n)},s.prototype.sequenceBackwardCol=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=t.length-1,o=0;o<t.length;o++)e(t[o],r+s*(n-o))},s.prototype.sequenceForwardRow=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*n),n++},s.prototype.sequenceBackwardRow=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=t.length-1,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*n),n--},s.prototype.sequenceForwardDiagonal=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=0;n<i[0].length;n++)for(var o=0;o<i.length;o++)e(i[o][n],r+s*(o+n))},s.prototype.sequenceBackwardDiagonal=function(e,t,i,s){for(var r=this.timeline.totalDuration(),n=i[0].length+i.length-2,o=0;o<i[0].length;o++)for(var a=0;a<i.length;a++)e(i[a][o],r+s*(n-a-o))},s}),N2Require("SmartSliderBackgroundAnimationTurn",["SmartSliderBackgroundAnimationFluxAbstract"],[],function(e,t,i){function s(){t.SmartSliderBackgroundAnimationFluxAbstract.prototype.constructor.apply(this,arguments);var i=e.extend(!0,{perspective:1.5*this.w,duration:.8,direction:"left"},this.animationProperties);this.reversed&&("left"==i.direction?i.direction="right":i.direction="left");var s=parseInt(this.w/2);this.clonedCurrent().css({position:"absolute",top:0,left:"left"==i.direction?-1*(this.w/2):0}),this.clonedNext().css({position:"absolute",top:0,left:"left"==i.direction?0:-1*(this.w/2)});var r=e('<div class="tab"></div>').css({width:s,height:this.h,position:"absolute",top:"0px",left:"left"==i.direction?s:"0","z-index":101});NextendTween.set(r,{transformStyle:"preserve-3d",transformOrigin:"left"==i.direction?"0px 0px":s+"px 0px"});var n=e('<div class="n2-ff-3d"></div>').append(this.clonedCurrent()).css({width:s,height:this.h,position:"absolute",top:0,left:0,"-webkit-transform":"translateZ(0.1px)",overflow:"hidden"}).appendTo(r);NextendTween.set(n,{backfaceVisibility:"hidden",transformStyle:"preserve-3d"});var o=e('<div class="n2-ff-3d"></div>').append(this.clonedNext()).appendTo(r).css({width:s,height:this.h,position:"absolute",top:0,left:0,overflow:"hidden"});NextendTween.set(o,{backfaceVisibility:"hidden",transformStyle:"preserve-3d",rotationY:180,rotationZ:0});var a=e("<div></div>").append(this.clonedCurrent().clone().css("left","left"==i.direction?0:-s)).css({position:"absolute",top:0,left:"left"==i.direction?"0":s,width:s,height:this.h,zIndex:100,overflow:"hidden"}),l=e('<div class="overlay"></div>').css({position:"absolute",top:0,left:"left"==i.direction?s:0,width:s,height:this.h,background:"#000",opacity:1,overflow:"hidden"}),d=e("<div></div>").css({width:this.w,height:this.h,position:"absolute",top:0,left:0}).append(r).append(a).append(l);NextendTween.set(d,{perspective:i.perspective,perspectiveOrigin:"50% 50%"}),this.placeNextImage(),this.clonedImages.nextImage.css({overflow:"hidden",width:"100%",height:"100%"}),this.containerElement.append(d),this.preSetup(),this.timeline.to(r.get(0),i.duration*this.durationMultiplier,{rotationY:"left"==i.direction?-180:180},0),this.timeline.to(l.get(0),i.duration*this.durationMultiplier,{opacity:0},0)}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationFluxAbstract.prototype),s.prototype.constructor=s,s.prototype.getExtraDelay=function(){return 0},s}),N2Require("SmartSliderBackgroundAnimationFluxAbstract",["SmartSliderBackgroundAnimationAbstract"],[],function(e,t,i){function s(){this.shiftedPreSetup=!1,this._clonedCurrent=!1,this._clonedNext=!1,t.SmartSliderBackgroundAnimationAbstract.prototype.constructor.apply(this,arguments),this.w=this.original.currentImage.width(),this.h=this.original.currentImage.height()}return s.prototype=Object.create(t.SmartSliderBackgroundAnimationAbstract.prototype),s.prototype.constructor=s,s.prototype.clonedCurrent=function(){return this._clonedCurrent||(this._clonedCurrent=this.original.currentImage.clone().css({width:this.w,height:this.h}),this._clonedCurrent.find(".n2-ss-slide-background-video").remove(),NextendTween.set(this._clonedCurrent,{transform:"none"})),this._clonedCurrent},s.prototype.clonedNext=function(){return this._clonedNext||(this._clonedNext=this.original.nextImage.clone().css({width:this.w,height:this.h}),this._clonedNext.find(".n2-ss-slide-background-video").remove(),NextendTween.set(this._clonedNext,{transform:"none"})),this._clonedNext},s.prototype.preSetup=function(){0!=this.shiftedBackgroundAnimation?this.shiftedPreSetup=!0:this._preSetup()},s.prototype._preSetup=function(e){this.timeline.to(this.original.currentImage.get(0),this.getExtraDelay(),{opacity:0},0),this.original.nextImage.css("opacity",0)},s.prototype.postSetup=function(){this.timeline.to(this.original.nextImage.get(0),this.getExtraDelay(),{opacity:1})},s.prototype.getExtraDelay=function(){return.2},s.prototype.ended=function(){this.original.currentImage.css("opacity",1),this.containerElement.html("")},s.prototype.revertEnded=function(){this.original.nextImage.css("opacity",1),this.containerElement.html("")},s}),N2Require("SmartSliderMainAnimationAbstract",[],[],function(e,t,i){function s(t,i){this.state="ended",this.isTouch=!1,this.isReverseAllowed=!0,this.isReverseEnabled=!1,this.reverseSlideIndex=null,this.isNoAnimation=!1,this.slider=t,this.parameters=e.extend({duration:1500,ease:"easeInOutQuint"},i),this.parameters.duration/=1e3,this.sliderElement=t.sliderElement,this.timeline=new NextendTimeline({paused:!0}),this.sliderElement.on("mainAnimationStart",e.proxy(function(e,t,i,s){this._revertCurrentSlideIndex=i,this._revertNextSlideIndex=s},this))}return s.prototype.setToStarterSlide=function(e){},s.prototype.enableReverseMode=function(){this.isReverseEnabled=!0,this.reverseTimeline=new NextendTimeline({paused:!0}),this.sliderElement.triggerHandler("reverseModeEnabled",this.reverseSlideIndex)},s.prototype.disableReverseMode=function(){this.isReverseEnabled=!1},s.prototype.setTouch=function(e){this.isTouch=e},s.prototype.setTouchProgress=function(e){this.isReverseEnabled?this._setTouchProgressWithReverse(e):this._setTouchProgress(e)},s.prototype._setTouchProgress=function(e){"ended"!=this.state&&(0>=e?this.timeline.progress(Math.max(e,1e-6),!1):e>=0&&1>=e&&this.timeline.progress(e))},s.prototype._setTouchProgressWithReverse=function(e){0==e?(this.reverseTimeline.progress(0),this.timeline.progress(e,!1)):e>=0&&1>=e?(this.reverseTimeline.progress(0),this.timeline.progress(e)):0>e&&e>=-1&&(this.timeline.progress(0),this.reverseTimeline.progress(Math.abs(e)))},s.prototype.setTouchEnd=function(e,t,i){"ended"!=this.state&&(this.isReverseEnabled?this._setTouchEndWithReverse(e,t,i):this._setTouchEnd(e,t,i))},s.prototype._setTouchEnd=function(e,t,i){e&&t>0?(this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse(),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},s.prototype._setTouchEndWithReverse=function(e,t,i){e?0>t&&this.reverseTimeline.totalDuration()>0?(this.fixTouchDuration(this.reverseTimeline,t,i),this.reverseTimeline.play(),this.willRevertTo(this.reverseSlideIndex,this._revertNextSlideIndex)):(this.willCleanSlideIndex(this.reverseSlideIndex),this.fixTouchDuration(this.timeline,t,i),this.timeline.play()):(0>t?(this.revertCB(this.reverseTimeline),this.fixTouchDuration(this.reverseTimeline,1-t,i),this.reverseTimeline.reverse()):(this.revertCB(this.timeline),this.fixTouchDuration(this.timeline,1-t,i),this.timeline.reverse()),this.willCleanSlideIndex(this.reverseSlideIndex),this.willRevertTo(this._revertCurrentSlideIndex,this._revertNextSlideIndex))},s.prototype.fixTouchDuration=function(e,t,i){var s=e.totalDuration(),r=Math.max(s/3,Math.min(s,i/Math.abs(t)/1e3));r!=s&&e.totalDuration(r)},s.prototype.getState=function(){return this.state},s.prototype.timeScale=function(){return arguments.length>0?(this.timeline.timeScale(arguments[0]),this):this.timeline.timeScale()},s.prototype.changeTo=function(t,i,s,r){if(this._initAnimation(t,i,s),this.state="initAnimation",this.timeline.paused(!0),this.timeline.eventCallback("onStart",this.onChangeToStart,[t,i,r],this),this.timeline.eventCallback("onComplete",this.onChangeToComplete,[t,i,r],this),this.timeline.eventCallback("onReverseComplete",null),this.revertCB=e.proxy(function(e){e.eventCallback("onReverseComplete",this.onReverseChangeToComplete,[i,t,r],this)},this),this.slider.parameters.dynamicHeight){var n=new NextendTimeline;this.slider.responsive.doResize(null,!1,n,i,.6),this.timeline.add(n)}this.isTouch||this.timeline.play()},s.prototype.willRevertTo=function(t,i){this.sliderElement.triggerHandler("mainAnimationWillRevertTo",[t,i]),this.sliderElement.one("mainAnimationComplete",e.proxy(this.revertTo,this,t,i))},s.prototype.revertTo=function(e,t){this.slider.revertTo(e,t),this.slider.slides[t].triggerHandler("mainAnimationStartInCancel")},s.prototype.willCleanSlideIndex=function(t){this.sliderElement.one("mainAnimationComplete",e.proxy(this.cleanSlideIndex,this,t))},s.prototype.cleanSlideIndex=function(){},s.prototype._initAnimation=function(e,t,i){},s.prototype.onChangeToStart=function(e,t,i){this.state="playing";var s=[this,e.index,t.index,i];this.sliderElement.trigger("mainAnimationStart",s),this.slider.slides[e.index].trigger("mainAnimationStartOut",s),this.slider.slides[t.index].trigger("mainAnimationStartIn",s)},s.prototype.onChangeToComplete=function(e,t,i){var s=[this,e.index,t.index,i];this.clearTimelines(),this.disableReverseMode(),this.slider.slides[e.index].trigger("mainAnimationCompleteOut",s),this.slider.slides[t.index].trigger("mainAnimationCompleteIn",s),this.state="ended",this.sliderElement.trigger("mainAnimationComplete",s)},s.prototype.onReverseChangeToComplete=function(e,t,i){s.prototype.onChangeToComplete.apply(this,arguments)},s.prototype.clearTimelines=function(){this.revertCB=function(){},this.timeline.clear(),this.timeline.timeScale(1)},s.prototype.getEase=function(){return this.isTouch?"linear":this.parameters.ease},s}),N2Require("SmartSliderControlAutoplay",[],[],function(e,t,i){"use strict";function s(t,i){this._paused=!0,this._wait=!1,this._disabled=!1,this._currentCount=0,this._progressEnabled=!1,this.timeline=null,this.hasButton=!1,this.deferredsMediaPlaying=null,this.deferredMouseLeave=null,this.deferredMouseEnter=null,this.mainAnimationDeferred=!0,this.autoplayDeferred=null,this.slider=t,this.parameters=e.extend({enabled:0,start:1,duration:8e3,autoplayToSlide:0,autoplayToSlideIndex:-1,allowReStart:0,pause:{mouse:"enter",click:!0,mediaStarted:!0},resume:{click:0,mouse:0,mediaEnded:!0}},i),this.parameters.enabled?(this.parameters.duration/=1e3,t.controls.autoplay=this,this.deferredsExtraPlaying={},this.slider.visible(e.proxy(this.onReady,this))):this.disable(),t.controls.autoplay=this}var r=!1;return s.prototype.onReady=function(){this.autoplayDeferred=e.Deferred();var t={_progress:0};this.timeline=NextendTween.to(t,this.getSlideDuration(this.slider.currentSlide.index),{_progress:1,paused:!0,onComplete:e.proxy(this.next,this)}),this._progressEnabled&&this.enableProgress();var i=this.slider.sliderElement;if(this.parameters.start?this.continueAutoplay():this.pauseAutoplayExtraPlaying(null,"autoplayButton"),i.on("mainAnimationStart.autoplay",e.proxy(this.onMainAnimationStart,this)),"0"!=this.parameters.pause.mouse)switch(i.on("touchend.autoplay",function(){r=!0,setTimeout(function(){r=!1},300)}),this.parameters.pause.mouse){case"enter":i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseEnter,this)),i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseEnterEnded,this));break;case"leave":i.on("mouseleave.autoplay",e.proxy(this.pauseAutoplayMouseLeave,this)),i.on("mouseenter.autoplay",e.proxy(this.pauseAutoplayMouseLeaveEnded,this))}if(this.parameters.pause.click&&!this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(this.pauseAutoplayUniversal,this)):!this.parameters.pause.click&&this.parameters.resume.click?i.on("universalclick.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this)):this.parameters.pause.click&&this.parameters.resume.click&&i.on("universalclick.autoplay",e.proxy(function(e){this._paused?this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton"):this.pauseAutoplayUniversal(e)},this)),this.parameters.pause.mediaStarted&&(this.deferredsMediaPlaying={},i.on("mediaStarted.autoplay",e.proxy(this.pauseAutoplayMediaPlaying,this)),i.on("mediaEnded.autoplay",e.proxy(this.pauseAutoplayMediaPlayingEnded,this))),"0"!=this.parameters.resume.mouse)switch(this.parameters.resume.mouse){case"enter":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseenter.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseenter.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this));break;case"leave":this.hasButton&&"0"!=this.parameters.pause.mouse?i.on("mouseleave.autoplay",e.proxy(this.continueAutoplay,this)):i.on("mouseleave.autoplay",e.proxy(function(e){this.pauseAutoplayExtraPlayingEnded(e,"autoplayButton")},this))}this.parameters.resume.mediaEnded&&i.on("mediaEnded.autoplay",e.proxy(this.continueAutoplay,this)),i.on("autoplayExtraWait.autoplay",e.proxy(this.pauseAutoplayExtraPlaying,this)),i.on("autoplayExtraContinue.autoplay",e.proxy(this.pauseAutoplayExtraPlayingEnded,this)),this.slider.sliderElement.on("mainAnimationComplete.autoplay",e.proxy(this.onMainAnimationComplete,this))},s.prototype.enableProgress=function(){this.timeline&&this.timeline.eventCallback("onUpdate",e.proxy(this.onUpdate,this)),this._progressEnabled=!0},s.prototype.onMainAnimationStart=function(t,i,s,r,n){this.mainAnimationDeferred=e.Deferred(),this.deActivate(0,"wait");for(var o in this.deferredsMediaPlaying)this.deferredsMediaPlaying[o].resolve()},s.prototype.onMainAnimationComplete=function(e,t,i,s){this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+1&&this.limitAutoplay(),this.timeline.duration(this.getSlideDuration(s)),this.mainAnimationDeferred.resolve(),this.continueAutoplay()},s.prototype.getSlideDuration=function(e){var t=this.slider.realSlides[this.slider.getRealIndex(e)],i=t.minimumSlideDuration;return.3>i&&i<this.parameters.duration&&(i=this.parameters.duration),i},s.prototype.continueAutoplay=function(t){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.reject();var i=[];for(var s in this.deferredsExtraPlaying)i.push(this.deferredsExtraPlaying[s]);for(var s in this.deferredsMediaPlaying)i.push(this.deferredsMediaPlaying[s]);this.deferredMouseEnter&&i.push(this.deferredMouseEnter),this.deferredMouseLeave&&i.push(this.deferredMouseLeave),i.push(this.mainAnimationDeferred),this.autoplayDeferred=e.Deferred(),this.autoplayDeferred.done(e.proxy(this._continueAutoplay,this)),e.when.apply(e,i).done(e.proxy(function(){"pending"==this.autoplayDeferred.state()&&this.autoplayDeferred.resolve()},this))},s.prototype._continueAutoplay=function(){!this._paused&&!this._wait||this._disabled||(this._paused=!1,this._wait=!1,this.slider.sliderElement.triggerHandler("autoplayStarted"),1==this.timeline.progress()&&this.timeline.pause(0,!1),this.startTimeout(null))},s.prototype.pauseAutoplayUniversal=function(e){this.pauseAutoplayExtraPlaying(e,"autoplayButton"),this.deActivate(null,"pause")},s.prototype.pauseAutoplayMouseEnter=function(){r||(this.autoplayDeferred.reject(),this.deferredMouseEnter=e.Deferred(),this.deActivate(null,"leave"==this.parameters.resume.mouse?"wait":"pause"))},s.prototype.pauseAutoplayMouseEnterEnded=function(){this.deferredMouseEnter&&this.deferredMouseEnter.resolve()},s.prototype.pauseAutoplayMouseLeave=function(){this.autoplayDeferred.reject(),this.deferredMouseLeave=e.Deferred(),this.deActivate(null,"enter"==this.parameters.resume.mouse?"wait":"pause")},s.prototype.pauseAutoplayMouseLeaveEnded=function(){this.deferredMouseLeave&&this.deferredMouseLeave.resolve()},s.prototype.pauseAutoplayMediaPlaying=function(t,i){"undefined"!=typeof this.deferredsMediaPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsMediaPlaying[i]=e.Deferred(),this.deActivate(null,"wait")},s.prototype.pauseAutoplayMediaPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsMediaPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsMediaPlaying[t].resolve(),delete this.deferredsMediaPlaying[t])},s.prototype.pauseAutoplayExtraPlaying=function(t,i){"undefined"!=typeof this.deferredsExtraPlaying[i]&&this.autoplayDeferred.reject(),this.deferredsExtraPlaying[i]=e.Deferred(),this.deActivate(null,"pause")},s.prototype.pauseAutoplayExtraPlayingEnded=function(e,t){"undefined"!=typeof this.deferredsExtraPlaying[t]&&(this.autoplayDeferred.reject(),this.deferredsExtraPlaying[t].resolve(),delete this.deferredsExtraPlaying[t]),this.continueAutoplay()},s.prototype.deActivate=function(e,t){"pause"==t?this._paused||(this._paused=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayPaused")):"wait"==t&&(this._wait||(this._wait=!0,0!==e&&this.slider.sliderElement.triggerHandler("autoplayWait"))),this.timeline&&this.timeline.pause(e,!1)},s.prototype.disable=function(){this.deActivate(0,"pause"),this.slider.sliderElement.triggerHandler("autoplayPaused"),this.slider.sliderElement.triggerHandler("autoplayDisabled"),this.slider.sliderElement.off(".autoplay"),this._disabled=!0},s.prototype.startTimeout=function(e){this._paused||this._disabled||this.timeline.play(e)},s.prototype.next=function(){this.timeline.pause(),this._currentCount++,(this.parameters.autoplayToSlide>0&&this._currentCount>=this.parameters.autoplayToSlide||this.parameters.autoplayToSlideIndex>=0&&this.parameters.autoplayToSlideIndex==this.slider.currentRealSlide.index+2)&&this.limitAutoplay(),this.slider.nextCarousel(!0)},s.prototype.limitAutoplay=function(){this.parameters.allowReStart?(this._currentCount=0,this.slider.sliderElement.triggerHandler("autoplayExtraWait","autoplayButton")):this.disable()},s.prototype.onUpdate=function(){this.slider.sliderElement.triggerHandler("autoplay",this.timeline.progress())},s}),N2Require("SmartSliderControlFullscreen",[],[],function(e,t,i){"use strict";function s(t,i,s){this.slider=t,this.responsive=this.slider.responsive,this._type=this.responsive.parameters.type,this._forceFull=this.responsive.parameters.forceFull,this.forceFullpage="auto"==this._type||"fullwidth"==this._type||"fullpage"==this._type,this.forceFullpage&&(this._upscale=this.responsive.parameters.upscale,this._minimumHeightRatio=e.extend({},this.responsive.parameters.minimumHeightRatio),this._maximumHeightRatio=e.extend({},this.responsive.parameters.maximumHeightRatio)),this.isFullScreen=!1,this.fullParent=this.slider.sliderElement.closest(".n2-ss-align"),this.browserSpecific={};var r=this.slider.sliderElement[0];r.requestFullscreen?(this.browserSpecific.requestFullscreen="requestFullscreen",this.browserSpecific.event="fullscreenchange"):r.msRequestFullscreen?(this.browserSpecific.requestFullscreen="msRequestFullscreen",this.browserSpecific.event="MSFullscreenChange"):r.mozRequestFullScreen?(this.browserSpecific.requestFullscreen="mozRequestFullScreen",this.browserSpecific.event="mozfullscreenchange"):r.webkitRequestFullscreen?(this.browserSpecific.requestFullscreen="webkitRequestFullscreen",
3
  this.browserSpecific.event="webkitfullscreenchange"):(this.browserSpecific.requestFullscreen="nextendRequestFullscreen",this.browserSpecific.event="nextendfullscreenchange",this.fullParent[0][this.browserSpecific.requestFullscreen]=e.proxy(function(){this.fullParent.css({position:"fixed",left:0,top:0,width:"100%",height:"100%",backgroundColor:"#000",zIndex:1e6}),document.fullscreenElement=this.fullParent[0],this.triggerEvent(document,this.browserSpecific.event),e(window).trigger("resize")},this)),document.exitFullscreen?this.browserSpecific.exitFullscreen="exitFullscreen":document.msExitFullscreen?this.browserSpecific.exitFullscreen="msExitFullscreen":document.mozCancelFullScreen?this.browserSpecific.exitFullscreen="mozCancelFullScreen":document.webkitExitFullscreen?this.browserSpecific.exitFullscreen="webkitExitFullscreen":(this.browserSpecific.exitFullscreen="nextendExitFullscreen",this.fullParent[0][this.browserSpecific.exitFullscreen]=e.proxy(function(){this.fullParent.css({position:"",left:"",top:"",width:"",height:"",backgroundColor:"",zIndex:""}),document.fullscreenElement=null,this.triggerEvent(document,this.browserSpecific.event)},this)),document.addEventListener(this.browserSpecific.event,e.proxy(this.fullScreenChange,this))}return s.prototype.switchState=function(){this.isFullScreen=!this.isFullScreen,this.isFullScreen?this._fullScreen():this._normalScreen()},s.prototype.requestFullscreen=function(){return this.isFullScreen?!1:(this.isFullScreen=!0,this._fullScreen(),!0)},s.prototype.exitFullscreen=function(){return this.isFullScreen?(this.isFullScreen=!1,this._normalScreen(),!0):!1},s.prototype.triggerEvent=function(e,t){var i;document.createEvent?(i=document.createEvent("HTMLEvents"),i.initEvent(t,!0,!0)):document.createEventObject&&(i=document.createEventObject(),i.eventType=t),i.eventName=t,e.dispatchEvent?e.dispatchEvent(i):e.fireEvent&&htmlEvents["on"+t]?e.fireEvent("on"+i.eventType,i):e[t]?e[t]():e["on"+t]&&e["on"+t]()},s.prototype._fullScreen=function(){this.forceFullpage&&(this.responsive.parameters.type="fullpage",this.responsive.parameters.upscale=!0,this.responsive.parameters.forceFull=!1,this._marginLeft=this.responsive.containerElement[0].style.marginLeft,this.responsive.containerElement.css(nextend.rtl.marginLeft,0)),this.fullParent.css({width:"100%",height:"100%",backgroundColor:e("body").css("background-color")}).addClass("n2-ss-in-fullscreen"),this.fullParent.get(0)[this.browserSpecific.requestFullscreen]()},s.prototype._normalScreen=function(){document[this.browserSpecific.exitFullscreen]?document[this.browserSpecific.exitFullscreen]():this.fullParent[0][this.browserSpecific.exitFullscreen]&&this.fullParent[0][this.browserSpecific.exitFullscreen]()},s.prototype.fullScreenChange=function(){this.isDocumentInFullScreenMode()?(this.slider.sliderElement.triggerHandler("n2FullScreen"),e("html").addClass("n2-in-fullscreen"),this.isFullScreen=!0,e(window).trigger("resize")):this.forceFullpage&&(this.responsive.parameters.type=this._type,this.responsive.parameters.upscale=this._upscale,this.responsive.parameters.forceFull=this._forceFull,this.responsive.parameters.minimumHeightRatio=this._minimumHeightRatio,this.responsive.parameters.maximumHeightRatio=this._maximumHeightRatio,this.responsive.containerElement.css(nextend.rtl.marginLeft,this._marginLeft),this.fullParent.css({width:"",height:"",backgroundColor:""}).removeClass("n2-ss-in-fullscreen"),e("html").removeClass("n2-in-fullscreen"),e(window).trigger("resize"),this.isFullScreen=!1,this.slider.sliderElement.triggerHandler("n2ExitFullScreen"))},s.prototype.isDocumentInFullScreenMode=function(){return document.fullscreenElement&&null!==document.fullscreenElement||document.msFullscreenElement&&null!==document.msFullscreenElement||document.mozFullScreen||document.webkitIsFullScreen},s}),N2Require("SmartSliderControlKeyboard",[],[],function(e,t,i){"use strict";function s(t,i,r){this.slider=t,this.parameters=e.extend({},r),"vertical"==i?this.parseEvent=s.prototype.parseEventVertical:this.parseEvent=s.prototype.parseEventHorizontal,e(document).on("keydown",e.proxy(this.onKeyDown,this)),t.controls.keyboard=this}return s.prototype.isSliderOnScreen=function(){var t=this.slider.sliderElement.offset(),i=e(window).scrollTop(),s=this.slider.sliderElement.height();return t.top+.5*s>=i&&t.top-.5*s<=i+e(window).height()},s.prototype.onKeyDown=function(e){e.target.tagName.match(/BODY|DIV|IMG/)&&this.isSliderOnScreen()&&(e=e||window.event,this.parseEvent.call(this,e)&&(e.preventDefault(),e.stopImmediatePropagation()))},s.prototype.parseEventHorizontal=function(e){switch(e.keyCode){case 39:return this.slider[nextend.rtl.next](),!0;case 37:return this.slider[nextend.rtl.previous](),!0;default:return!1}},s.prototype.parseEventVertical=function(e){switch(e.keyCode){case 40:return this.slider.next(),!0;case 38:return this.slider.previous(),!0;default:return!1}},s}),N2Require("SmartSliderControlScroll",[],[],function(e,t,i){"use strict";function s(t){this.preventScroll=!1,this._preventScrollTimeout=null,this.slider=t,t.sliderElement.on("DOMMouseScroll mousewheel",e.proxy(this.onMouseWheel,this)),t.controls.scroll=this}return s.prototype.onMouseWheel=function(e){if(this.preventScroll)this.preventScrollTimeout(e);else{var t=!1;e.originalEvent&&(e.originalEvent.wheelDelta&&(t=e.originalEvent.wheelDelta/-1<0),e.originalEvent.deltaY&&(t=e.originalEvent.deltaY<0),e.originalEvent.detail&&(t=e.originalEvent.detail<0)),t?this.slider.previous()&&this.preventScrollTimeout(e):this.slider.next()&&this.preventScrollTimeout(e)}},s.prototype.preventScrollTimeout=function(t){null!==this._preventScrollTimeout&&clearTimeout(this._preventScrollTimeout),this.preventScroll=!0,t.preventDefault(),this._preventScrollTimeout=setTimeout(e.proxy(function(){this.preventScroll=!1,this._preventScrollTimeout=null},this),400)},s}),N2Require("SmartSliderControlTilt",[],[],function(e,t,i){"use strict";function s(t,i){return"undefined"==typeof window.DeviceOrientationEvent||"undefined"==typeof window.orientation?"Not supported":(this.timeout=null,this.slider=t,this.parameters=e.extend({duration:2e3},i),this.orientationchange(),window.addEventListener("orientationchange",e.proxy(this.orientationchange,this)),window.addEventListener("deviceorientation",e.proxy(this.handleOrientation,this),!0),void(t.controls.tilt=this))}return s.prototype.orientationchange=function(){switch(window.orientation){case-90:case 90:this.parseEvent=s.prototype.parseEventHorizontalLandscape;break;default:this.parseEvent=s.prototype.parseEventHorizontal}},s.prototype.clearTimeout=function(){this.timeout=null},s.prototype.handleOrientation=function(t){null==this.timeout&&this.parseEvent.call(this,t)&&(this.timeout=setTimeout(e.proxy(this.clearTimeout,this),this.parameters.duration),t.preventDefault())},s.prototype.parseEventHorizontal=function(e){return e.gamma>10?(this.slider.next(),!0):e.gamma<-10?(this.slider.previous(),!0):!1},s.prototype.parseEventHorizontalLandscape=function(e){return e.beta<-10?(this.slider.next(),!0):e.beta>10?(this.slider.previous(),!0):!1},s}),N2Require("SmartSliderControlTouch",[],[],function(e,t,i){"use strict";function s(t,i,s){this.currentAnimation=null,this.slider=t,this._animation=t.mainAnimation,this.parameters=e.extend({fallbackToMouseEvents:!0},s),this.swipeElement=this.slider.sliderElement.find("> .n2-ss-swipe-element"),"vertical"==i?this.setVertical():"horizontal"==i&&this.setHorizontal();var r=e.proxy(function(){var e=this;this._animation.isNoAnimation?N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(){n=!1},move:function(t,i,s,r,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e.currentAnimation={direction:a};var l=e.slider.isChangePossible(e._direction[a]);if(!l)return e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),(n||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return n=!0,!0}return!1},end:function(t,i,s,r,n){if(null!==e.currentAnimation){var o=n?0:e.measureRealDirection();o&&e.slider[e._direction[e.currentAnimation.direction]](),e.swipeElement.removeClass("n2-grabbing"),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?e.onTap(t):nextend.preventClick()}}):N2EventBurrito(this.swipeElement.get(0),{mouse:this.parameters.fallbackToMouseEvents,axis:"horizontal"==i?"x":"y",start:function(e,t){n=!1},move:function(t,i,s,r,o){var a=e._direction.measure(s);if(!o&&"unknown"!=a&&null===e.currentAnimation){if("ended"!=e._animation.state)return!1;e.distance=[0],e.swipeElement.addClass("n2-grabbing"),e._animation.setTouch(e._direction.axis),e.currentAnimation={direction:a,percent:0};var l=e.slider[e._direction[a]](!1);if(!l)return e._animation.setTouch(!1),e.currentAnimation=null,!1}if(e.currentAnimation){var d=e._direction.get(s,e.currentAnimation.direction);if(e.logDistance(d),e.currentAnimation.percent<1){var h=Math.max(-.99999,Math.min(.99999,d/e.slider.dimensions.slider[e._property]));e.currentAnimation.percent=h,e._animation.setTouchProgress(h)}if((n||Math.abs(d)>e._direction.minDistance)&&t.cancelable)return n=!0,!0}return!1},end:function(t,i,s,r,n){if(null!==e.currentAnimation){var o=n?0:e.measureRealDirection(),a=e._animation.timeline.progress();1!=a&&e._animation.setTouchEnd(o,e.currentAnimation.percent,s.time),e.swipeElement.removeClass("n2-grabbing"),e._animation.setTouch(!1),e.currentAnimation=null}Math.abs(s.x)<10&&Math.abs(s.y)<10?e.onTap(t):nextend.preventClick()}})},this);if(navigator.userAgent.toLowerCase().indexOf("android")>-1){var o=this.swipeElement.parent();1!=o.css("opacity")?this.swipeElement.parent().one("transitionend",r):r()}else r();this.parameters.fallbackToMouseEvents||this.swipeElement.on("click",e.proxy(this.onTap,this)),this.parameters.fallbackToMouseEvents&&this.swipeElement.addClass("n2-grab"),t.controls.touch=this}var r=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,n=!1,o=!1;return s.prototype.setHorizontal=function(){this._property="width",this._direction={left:nextend.rtl.next,right:nextend.rtl.previous,up:null,down:null,axis:"horizontal",minDistance:10,measure:function(e){return!n&&Math.abs(e.x)<10||0==e.x||Math.abs(e.x)<Math.abs(e.y)?"unknown":e.x<0?"left":"right"},get:function(e,t){return"left"==t?-e.x:e.x}},r&&(this.swipeElement.css("-ms-touch-action","pan-y"),this.swipeElement.css("touch-action","pan-y"))},s.prototype.setVertical=function(){this._property="height",this._direction={left:null,right:null,up:"next",down:"previous",axis:"vertical",minDistance:1,measure:function(e){return!n&&Math.abs(e.y)<1||0==e.y||Math.abs(e.y)<Math.abs(e.x)?"unknown":e.y<0?"up":"down"},get:function(e,t){return"up"==t?-e.y:e.y}},r&&(this.swipeElement.css("-ms-touch-action","pan-x"),this.swipeElement.css("touch-action","pan-x"))},s.prototype.logDistance=function(e){this.distance.length>3&&this.distance.shift(),this.distance.push(e)},s.prototype.measureRealDirection=function(){var e=this.distance[0],t=this.distance[this.distance.length-1];return t>=0&&e>t||0>t&&t>e?0:1},s.prototype.onTap=function(t){o||(e(t.target).trigger("n2click"),o=!0,setTimeout(function(){o=!1},500))},s}),N2Require("SmartSliderBackgroundImage",[],[],function(e,t,i){function s(t,i,s){this.loadStarted=!1,this.loadAllowed=!1,this.width=0,this.height=0,this.slide=t,this.element=i,this.$mask=this.element.find(".n2-ss-slide-background-mask"),this.manager=s,this.loadDeferred=e.Deferred(),this.currentSrc="",this.mode=i.data("mode"),this.opacity=i.data("opacity"),this.blur=i.data("blur"),this.x=i.data("x"),this.y=i.data("y"),this.hasImage=!1,this.$image=this.$mask.find("img"),this.$image.length?(this.hasImage=!0,this.startImageMode()):this.startColorMode()}return s.prototype.startColorMode=function(){this.loadDeferred.resolve()},s.prototype.startImageMode=function(){if("fixed"==this.mode&&(n2const.isPhone&&!this.slide.slider.parameters["background.parallax.mobile"]||n2const.isTablet&&!this.slide.slider.parameters["background.parallax.tablet"])&&(this.mode="fill"),this.$image.css("display","none"),this.$background=e('<div class="n2-ss-background-image"/>').css({opacity:this.opacity,backgroundPosition:this.x+"% "+this.y+"%"}).appendTo(this.$mask),window.n2FilterProperty&&(this.blur>0?this.$background.css({margin:"-"+2*this.blur+"px",padding:2*this.blur+"px"}).css(window.n2FilterProperty,"blur("+this.blur+"px)"):this.$background.css({margin:"",padding:""}).css(window.n2FilterProperty,"")),"fixed"==this.mode&&this.startFixed(),this.desktopSrc=this.element.data("desktop")||"",this.tabletSrc=this.element.data("tablet")||"",this.mobileSrc=this.element.data("mobile")||"",nextend.isRetina){var t=this.element.data("desktop-retina");t&&(this.desktopSrc=t),t=this.element.data("tablet-retina"),t&&(this.tabletSrc=t),t=this.element.data("mobile-retina"),t&&(this.mobileSrc=t)}},s.prototype.preLoad=function(){return this.loadStarted||(this.slide.$element.find("[data-lazysrc]").each(function(){var t=e(this);t.attr("src",t.data("lazysrc"))}),this.loadStarted=!0),"pending"==this.loadDeferred.state()&&(this.loadAllowed=!0,this.manager.deviceDeferred.done(e.proxy(function(){this.updateBackgroundToDevice(this.manager.device),this.$background.n2imagesLoaded({background:!0},e.proxy(function(e){var t=e.images[0].img;this.width=t.naturalWidth,this.height=t.naturalHeight,this.isLoaded=!0,this.loadDeferred.resolve(this.element)},this))},this))),this.loadDeferred},s.prototype.updateBackgroundToDevice=function(e){var t=this.desktopSrc;"mobile"==e.device?this.mobileSrc?t=this.mobileSrc:this.tabletSrc&&(t=this.tabletSrc):"tablet"==e.device&&this.tabletSrc&&(t=this.tabletSrc),t?this.setSrc(t):this.setSrc("")},s.prototype.setSrc=function(e){this.loadAllowed&&e!=this.currentSrc&&(""===e?this.$background.css("background-image",""):this.$background.css("background-image",'url("'+e+'")'),this.currentSrc=e)},s.prototype.startFixed=function(){n2const.isEdge||(this.slide.slider.parameters.allowBGImageAttachmentFixed&&!n2const.isIOS?(this.$background.css("background-repeat","repeat"),this.$background.css("position","static"),this.$background.css("background-attachment","fixed")):n2const.isIE||this.slide.slider.startedDeferred.done(e.proxy(function(){fixedBackground.addElement(this.$background,this.element)},this)))},s.prototype.hack=function(){NextendTween.set(this.element,{rotation:1e-4})},s}),N2Require("FrontendComponent",[],[],function(e,t,i){function s(e,i,s,r){this.wraps={},this.isVisible=!0,this.device="",this.children=[],this.slide=e,this.parent=i,this.$layer=s.data("layer",this);var n=this.$layer.find("> .n2-ss-layer-mask");n.length&&(this.wraps.mask=n);var o=this.$layer.find("> .n2-ss-layer-parallax");switch(o.length&&(this.wraps.parallax=o),s.data("pm")){case"absolute":this.placement=new t.FrontendPlacementAbsolute(this);break;case"normal":this.placement=new t.FrontendPlacementNormal(this);break;case"content":this.placement=new t.FrontendPlacementContent(this);break;default:this.placement=new t.FrontendPlacementDefault(this)}if(this.parallax=s.data("parallax"),this.baseSize=this.baseSize||100,this.isAdaptiveFont=this.get("adaptivefont"),this.refreshBaseSize(this.getDevice("fontsize")),r)for(var a=0;a<r.length;a++)switch(r.eq(a).data("type")){case"content":this.children.push(new t.FrontendComponentContent(this.slide,this,r.eq(a)));break;case"row":this.children.push(new t.FrontendComponentRow(this.slide,this,r.eq(a)));break;case"col":this.children.push(new t.FrontendComponentCol(this.slide,this,r.eq(a)));break;case"group":break;default:this.children.push(new t.FrontendComponentLayer(this.slide,this,r.eq(a)))}}return s.prototype.refreshBaseSize=function(e){this.isAdaptiveFont?this.baseSize=16*e/100:this.baseSize=this.parent.baseSize*e/100},s.prototype.start=function(){this.placement.start();for(var e=0;e<this.children.length;e++)this.children[e].start();var t=this.get("rotation")||0;if(t/360!=0){var i=this.addWrap("rotation","<div class='n2-ss-layer-rotation'></div>");NextendTween.set(i[0],{rotationZ:t})}},s.prototype.onDeviceChange=function(e){this.device=e;var t=this.isVisible;if(this.isVisible=this.getDevice(""),this.isVisible===i&&(this.isVisible=1),t&&!this.isVisible?(this.$layer.data("shows",0),this.$layer.css("display","none")):!t&&this.isVisible&&(this.$layer.data("shows",1),this.$layer.css("display","block")),this.isVisible){var s=this.getDevice("fontsize");this.refreshBaseSize(s),this.isAdaptiveFont?this.$layer.css("font-size",16*s/100+"px"):this.$layer.css("font-size",s+"%");for(var r=0;r<this.children.length;r++)this.children[r].onDeviceChange(e);this.placement.onDeviceChange(e),this.onAfterDeviceChange(e)}},s.prototype.onAfterDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){if(this.isVisible||this.placement.alwaysResize){for(var s=0;s<this.children.length;s++)this.children[s].onResize(e,t,i);this.placement.onResize(e,t,i)}},s.prototype.getDevice=function(e,t){var s=this.$layer.data(this.device+e);return s!=i?s:"desktopportrait"!=this.device?this.$layer.data("desktopportrait"+e):t!==i?t:0},s.prototype.get=function(e){return this.$layer.data(e)},s.prototype.getParallaxNodes=function(){var e=[];if(this.isVisible){this.parallax&&e.push(this.$layer[0]);for(var t=0;t<this.children.length;t++)e.push.apply(e,this.children[t].getParallaxNodes())}return e},s.prototype.addWrap=function(t,s){if(this.wraps[t]===i){var r=e(s);switch(t){case"rotation":this.wraps.mask!==i?r.appendTo(this.wraps.mask):this.wraps.parallax!==i?r.appendTo(this.wraps.parallax):r.appendTo(this.$layer),r.append(this.getContents())}this.wraps[t]=r}return r},s.prototype.getContents=function(){return!1},s}),N2Require("FrontendPlacement",[],[],function(e,t,i){function s(e){this.layer=e,this.alwaysResize=!1}return s.prototype.start=function(){},s.prototype.onDeviceChange=function(e){},s.prototype.onResize=function(e,t,i){},s}),N2Require("FrontendSliderSlide",["FrontendComponentSlideAbstract"],[],function(e,t,i){function s(i,s,r){this.isStaticSlide=!1,this.originalIndex=r,this.index=r,this.localIndex=r,this.$element=s.data("slide",this),this.id=this.$element.data("id"),this.backgroundImage=!1,this.backgroundVideo=!1,this.slides=[this],i.parameters.admin?this.minimumSlideDuration=0:(this.minimumSlideDuration=s.data("slide-duration"),e.isNumeric(this.minimumSlideDuration)||(this.minimumSlideDuration=0));var n=s.find(".n2-ss-layers-container");t.FrontendComponentSlideAbstract.prototype.constructor.call(this,i,n)}return s.prototype=Object.create(t.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s.prototype.init=function(){t.FrontendComponentSlideAbstract.prototype.init.call(this);var e=this.slider.findSlideBackground(this);e.length>0&&(this.slider.isAdmin?this.backgroundImage=new t.SmartSliderBackgroundImageAdmin(this,e,this.slider.backgroundImages):this.backgroundImage=new t.SmartSliderBackgroundImage(this,e,this.slider.backgroundImages)),this.$element.data("slideBackground",this.backgroundImage);var i=this.backgroundImage.element.find(".n2-ss-slide-background-video");i.length>0&&(this.backgroundVideo=new t.SmartSliderBackgroundVideo(this,i))},s.prototype.setStarterSlide=function(){t.FrontendComponentSlideAbstract.prototype.setStarterSlide.call(this)},s.prototype.setIndex=function(e){this.localIndex=this.index=e},s.prototype.preLoad=function(){return this.backgroundImage?this.backgroundImage.preLoad():!0},s.prototype.setPrevious=function(e){this.previousSlide=e},s.prototype.setNext=function(e){this.nextSlide=e,e.setPrevious(this)},s.prototype.hasBackgroundVideo=function(){return this.backgroundVideo},s}),N2Require("FrontendComponentSlideAbstract",["FrontendComponent"],[],function(e,t,i){function s(i,s){this.baseSize=16,this.slider=i,this.isCurrentlyEdited()||(this.status=r.NOT_INITIALIZED,t.FrontendComponent.prototype.constructor.call(this,this,this,s,s.find("> .n2-ss-section-outer > .n2-ss-layer, > .n2-ss-layer, > .n2-ss-layer-group")),this.slider.sliderElement.on({SliderDeviceOrientation:e.proxy(function(e,t){this.onDeviceChange(t.device+t.orientation.toLowerCase())},this),SliderResize:e.proxy(function(e,t,i){this.onResize(t,i.responsiveDimensions)},this)}),t.FrontendComponent.prototype.start.call(this))}var r={NOT_INITIALIZED:-1,INITIALIZED:0,READY_TO_START:1,PLAYING:2,ENDED:3};return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.isCurrentlyEdited=function(){return this.slider.parameters.admin&&this.$element.hasClass("n2-ss-currently-edited-slide")},s.prototype.trigger=function(){this.$element.trigger.apply(this.$element,[].slice.call(arguments))},s.prototype.triggerHandler=function(){return this.$element.triggerHandler.apply(this.$element,[].slice.call(arguments))},s.prototype.init=function(){!this.isCurrentlyEdited()},s.prototype.refreshBaseSize=function(e){},s.prototype.onResize=function(e,t){for(var i=0;i<this.children.length;i++)this.children[i].onResize(e,t,this.isStaticSlide)},s.prototype.hasLayers=function(){return this.children.length>0},s.prototype.onDeviceChange=function(e){this.device=e;for(var t=0;t<this.children.length;t++)this.children[t].onDeviceChange(e);this.placement.onDeviceChange(e)},s.prototype.setStarterSlide=function(){},s}),N2Require("FrontendSliderStaticSlide",["FrontendComponentSlideAbstract"],[],function(e,t,i){function s(e,i){this.isStaticSlide=!0,this.$element=i.data("slide",this),t.FrontendComponentSlideAbstract.prototype.constructor.call(this,e,i),this.init()}return s.prototype=Object.create(t.FrontendComponentSlideAbstract.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementAbsolute",["FrontendPlacement"],[],function(e,t,i){function s(e){return e.position()}function s(e){return{left:e.prop("offsetLeft"),top:e.prop("offsetTop")}}function r(e){this.linked=[],this.parentLayer=!1,this.$parent=!1,t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return/(MSIE\ [0-7]\.\d+)/.test(navigator.userAgent),r.prototype=Object.create(t.FrontendPlacement.prototype),r.prototype.constructor=r,r.prototype.start=function(){var t=this.layer.get("parentid");t&&(this.$parent=e("#"+t),0==this.$parent.length?this.$parent=!1:(this.parentLayer=this.$parent.data("layer"),this.parentLayer.placement.addLinked(this),this.onResize=function(){}))},r.prototype.addLinked=function(e){this.linked.push(e),this.alwaysResize=!0},r.prototype.onResize=r.prototype.onResizeLinked=function(e,t,i){var r=this.layer.$layer,n=e.slideW,o=n,a=e.slideH,l=a;parseInt(this.layer.get("responsivesize"))||(o=l=1),r.css("width",this.getWidth(o)),r.css("height",this.getHeight(l)),parseInt(this.layer.get("responsiveposition"))||(n=a=1);var d=this.layer.getDevice("left")*n,h=this.layer.getDevice("top")*a,p=this.layer.getDevice("align"),c=this.layer.getDevice("valign"),u={left:"auto",top:"auto",right:"auto",bottom:"auto"};if(this.$parent&&this.$parent.data("layer").isVisible){var m=s(this.$parent),f={left:0,top:0};switch(this.layer.getDevice("parentalign")){case"right":f.left=m.left+this.$parent.width();break;case"center":f.left=m.left+this.$parent.width()/2;break;default:f.left=m.left}switch(p){case"right":u.right=r.parent().width()-f.left-d+"px";break;case"center":u.left=f.left+d-r.width()/2+"px";break;default:u.left=f.left+d+"px"}switch(this.layer.getDevice("parentvalign")){case"bottom":f.top=m.top+this.$parent.height();break;case"middle":f.top=m.top+this.$parent.height()/2;break;default:f.top=m.top}switch(c){case"bottom":u.bottom=r.parent().height()-f.top-h+"px";break;case"middle":u.top=f.top+h-r.height()/2+"px";break;default:u.top=f.top+h+"px"}}else{switch(p){case"right":u.right=-d+"px";break;case"center":u.left=(i?r.parent().width():t.slide.width)/2+d-r.width()/2+"px";break;default:u.left=d+"px"}switch(c){case"bottom":u.bottom=-h+"px";break;case"middle":u.top=(i?r.parent().height():t.slide.height)/2+h-r.height()/2+"px";break;default:u.top=h+"px"}}r.css(u);for(var g=0;g<this.linked.length;g++)this.linked[g].onResizeLinked(e,t,i)},r.prototype.getWidth=function(e){var t=this.layer.getDevice("width");return this.isDimensionPropertyAccepted(t)?t:t*e+"px"},r.prototype.getHeight=function(e){var t=this.layer.getDevice("height");return this.isDimensionPropertyAccepted(t)?t:t*e+"px"},r.prototype.isDimensionPropertyAccepted=function(e){return!(!(e+"").match(/[0-9]+%/)&&"auto"!=e)},r}),N2Require("FrontendPlacementContent",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementDefault",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s}),N2Require("FrontendPlacementNormal",["FrontendPlacement"],[],function(e,t,i){function s(e){t.FrontendPlacement.prototype.constructor.apply(this,arguments)}return s.prototype=Object.create(t.FrontendPlacement.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(){this.updateMargin(),this.updateHeight(),this.updateMaxWidth(),this.updateSelfAlign()},s.prototype.updateMargin=function(){var e=this.layer.getDevice("margin").split("|*|"),t=e.pop(),i=this.layer.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.layer.$layer.css("margin",e.join(t+" ")+t)},s.prototype.updateHeight=function(){var e=this.layer.getDevice("height"),t="px";if(e>0){var i=this.layer.baseSize;i>0&&(t="em",e=parseInt(e)/i),this.layer.$layer.css("height",e+t)}else this.layer.$layer.css("height","")},s.prototype.updateMaxWidth=function(){var e=parseInt(this.layer.getDevice("maxwidth"));0>=e||isNaN(e)?this.layer.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.layer.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.layer.$layer.attr("data-cssselfalign",this.layer.getDevice("selfalign"))},s}),N2Require("FrontendComponentCol",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$content=s.find(".n2-ss-layer-col:first"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updateOrder(),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$content.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var e=parseInt(this.getDevice("maxwidth"));0>=e||isNaN(e)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.getRealOrder=function(){var e=this.getDevice("order");return 0==e?10:e},s.prototype.updateOrder=function(){var e=this.getDevice("order");0==e?this.$layer.css("order",""):this.$layer.css("order",e)},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentContent",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$content=s.find("> .n2-ss-section-main-content"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$content.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateInnerAlign(),this.updateMaxWidth(),this.updateSelfAlign()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$content.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateMaxWidth=function(){var e=parseInt(this.getDevice("maxwidth"));0>=e||isNaN(e)?this.$layer.css("maxWidth","").removeClass("n2-ss-has-maxwidth"):this.$layer.css("maxWidth",e+"px").addClass("n2-ss-has-maxwidth")},s.prototype.updateSelfAlign=function(){this.$layer.attr("data-cssselfalign",this.getDevice("selfalign"))},s.prototype.getContents=function(){return this.$content},s}),N2Require("FrontendComponentLayer",["FrontendComponent"],[],function(e,t,i){function s(e,s,r){t.FrontendComponent.prototype.constructor.call(this,e,s,r),this.wraps.mask!==i?this.$item=this.wraps.mask.children():this.wraps.parallax!==i?this.$item=this.wraps.parallax.children():this.$item=r.children()}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.getContents=function(){return this.$item},s}),N2Require("FrontendComponentRow",["FrontendComponent"],[],function(e,t,i){function s(e,i,s){this.$row=s.find(".n2-ss-layer-row:first"),t.FrontendComponent.prototype.constructor.call(this,e,i,s,this.$row.find("> .n2-ss-layer"))}return s.prototype=Object.create(t.FrontendComponent.prototype),s.prototype.constructor=s,s.prototype.onDeviceChange=function(e){t.FrontendComponent.prototype.onDeviceChange.apply(this,arguments),this.updatePadding(),this.updateGutter(),this.updateInnerAlign()},s.prototype.onAfterDeviceChange=function(e){this.updateWrapAfter()},s.prototype.updatePadding=function(){var e=this.getDevice("padding").split("|*|"),t=e.pop(),i=this.baseSize;if("px+"==t&&i>0){t="em";for(var s=0;s<e.length;s++)e[s]=parseInt(e[s])/i}this.$row.css("padding",e.join(t+" ")+t)},s.prototype.updateInnerAlign=function(){this.$layer.attr("data-csstextalign",this.getDevice("inneralign"))},s.prototype.updateGutter=function(){var e=this.getDevice("gutter")+"px";if(this.children.length>0)for(var t=this.children.length-1;t>=0;t--)this.children[t].$layer.css(nextend.rtl.marginRight,e).css("marginTop",e)},s.prototype.getSortedColumns=function(){for(var t=e.extend([],this.children).sort(function(e,t){return e.getRealOrder()-t.getRealOrder()}),i=t.length-1;i>=0;i--)t[i].isVisible||t.splice(i,1);return t},s.prototype.updateWrapAfter=function(){var t=parseInt(this.getDevice("wrapafter")),i=this.getSortedColumns(),s=i.length,r=!1;if(0==s)return!1;if(t>0&&s>t&&(r=!0),this.$row.find("> .n2-ss-row-break").remove(),this.$row.toggleClass("n2-ss-row-wrapped",r),r)for(var n=0;s>n;n++){var o=parseInt(n/t);if(i[n].$layer.attr("data-r",o),(n+1)%t==0||n==s-1){i[n].$layer.addClass("n2-ss-last-in-row");var a=i[n].getDevice("order");0==a&&(a=10),e('<div class="n2-ss-row-break"/>').css("order",a).insertAfter(i[n].$layer),i[n].$layer}else i[n].$layer.removeClass("n2-ss-last-in-row")}else{for(var n=0;s>n;n++)i[n].$layer.removeClass("n2-ss-last-in-row").attr("data-r",0);i[s-1].$layer.addClass("n2-ss-last-in-row")}},s.prototype.getContents=function(){return this.$row},s}),N2Require("SmartSliderResponsive",[],[],function(e,t,i){function s(t,i){this.disableTransitions=!1,this.disableTransitionsTimeout=null,this.lastClientHeight=0,this.lastOrientation=0,this.invalidateResponsiveState=!0,this.parameters=e.extend({desktop:1,tablet:1,mobile:1,onResizeEnabled:!0,type:"auto",downscale:!0,upscale:!1,constrainRatio:!0,minimumHeight:0,maximumHeight:0,minimumHeightRatio:0,maximumHeightRatio:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},maximumSlideWidth:0,maximumSlideWidthLandscape:0,maximumSlideWidthRatio:-1,maximumSlideWidthTablet:0,maximumSlideWidthTabletLandscape:0,maximumSlideWidthMobile:0,maximumSlideWidthMobileLandscape:0,
4
+ maximumSlideWidthConstrainHeight:0,forceFull:0,forceFullOverflowX:"body",forceFullHorizontalSelector:"",verticalOffsetSelectors:"",focusUser:0,focusAutoplay:0,deviceModes:{desktopLandscape:1,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},normalizedDeviceModes:{unknownUnknown:["unknown","Unknown"],desktopPortrait:["desktop","Portrait"]},verticalRatioModifiers:{unknownUnknown:1,desktopLandscape:1,desktopPortrait:1,mobileLandscape:1,mobilePortrait:1,tabletLandscape:1,tabletPortrait:1},minimumFontSizes:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},ratioToDevice:{Portrait:{tablet:0,mobile:0},Landscape:{tablet:0,mobile:0}},sliderWidthToDevice:{desktopLandscape:0,desktopPortrait:0,mobileLandscape:0,mobilePortrait:0,tabletLandscape:0,tabletPortrait:0},basedOn:"combined",desktopPortraitScreenWidth:1200,tabletPortraitScreenWidth:800,mobilePortraitScreenWidth:440,tabletLandscapeScreenWidth:1024,mobileLandscapeScreenWidth:740,orientationMode:"width_and_height",scrollFix:0,overflowHiddenPage:0},i),t.isAdmin&&(this.doResize=NextendThrottle(this.doResize,50)),this.loadDeferred=e.Deferred(),this.slider=t,this.sliderElement=t.sliderElement}var r=null,n=null;return s.OrientationMode={SCREEN:0,ADMIN_LANDSCAPE:1,ADMIN_PORTRAIT:2,SCREEN_WIDTH_ONLY:3},s.DeviceOrientation={UNKNOWN:0,LANDSCAPE:1,PORTRAIT:2},s._DeviceOrientation={0:"Unknown",1:"Landscape",2:"Portrait"},s.DeviceMode={UNKNOWN:0,DESKTOP:1,TABLET:2,MOBILE:3},s._DeviceMode={0:"unknown",1:"desktop",2:"tablet",3:"mobile"},s.prototype.start=function(){nextend.fontsDeferred==i?nextend.loadDeferred.always(e.proxy(function(){this.loadDeferred.resolve()},this)):nextend.fontsDeferred.always(e.proxy(function(){this.loadDeferred.resolve()},this)),this.normalizeTimeout=null,this.delayedResizeAdded=!1,this.deviceMode=s.DeviceMode.UNKNOWN,this.orientationMode=s.OrientationMode.SCREEN,this.orientation=s.DeviceOrientation.UNKNOWN,this.lastRatios={ratio:-1},this.lastRawRatios={ratio:-1},this.normalizedMode="unknownUnknown",this.widgetMargins={Top:[],Right:[],Bottom:[],Left:[]},this.staticSizes={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},this.enabledWidgetMargins=[],this.alignElement=this.slider.sliderElement.closest(".n2-ss-align");var t=this.ready=e.Deferred();switch(this.sliderElement.triggerHandler("SliderResponsiveStarted"),this.sliderElement.one("SliderResize",function(){t.resolve()}),this.containerElementPadding=this.sliderElement.parent(),this.containerElement=this.containerElementPadding.parent(),!this.slider.isAdmin&&this.parameters.overflowHiddenPage&&e("html, body").css("overflow","hidden"),"width"==this.parameters.orientationMode&&(this.orientationMode=s.OrientationMode.SCREEN_WIDTH_ONLY),nextend.smallestZoom=Math.min(Math.max(this.parameters.sliderWidthToDevice.mobilePortrait,120),320),this.parameters.basedOn){case"screen":break;default:if(null==r){var o=new MobileDetect(window.navigator.userAgent,801);r=!!o.tablet(),n=!!o.phone()}}if(this.verticalOffsetSelectors=e(this.parameters.verticalOffsetSelectors),this.storeDefaults(),this.parameters.minimumHeight>0&&(this.parameters.minimumHeightRatio=this.parameters.minimumHeight/this.responsiveDimensions.startHeight),this.parameters.maximumHeight>0&&this.parameters.maximumHeight>=this.parameters.minimumHeight&&(this.parameters.maximumHeightRatio={desktopPortrait:this.parameters.maximumHeight/this.responsiveDimensions.startHeight},this.parameters.maximumHeightRatio.desktopLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletPortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.tabletLandscape=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobilePortrait=this.parameters.maximumHeightRatio.desktopPortrait,this.parameters.maximumHeightRatio.mobileLandscape=this.parameters.maximumHeightRatio.desktopPortrait),this.parameters.maximumSlideWidth>0&&(this.parameters.maximumSlideWidthRatio={desktopPortrait:this.parameters.maximumSlideWidth/this.responsiveDimensions.startSlideWidth,desktopLandscape:this.parameters.maximumSlideWidthLandscape/this.responsiveDimensions.startSlideWidth,tabletPortrait:this.parameters.maximumSlideWidthTablet/this.responsiveDimensions.startSlideWidth,tabletLandscape:this.parameters.maximumSlideWidthTabletLandscape/this.responsiveDimensions.startSlideWidth,mobilePortrait:this.parameters.maximumSlideWidthMobile/this.responsiveDimensions.startSlideWidth,mobileLandscape:this.parameters.maximumSlideWidthMobileLandscape/this.responsiveDimensions.startSlideWidth},this.parameters.maximumSlideWidthConstrainHeight)){this.parameters.maximumHeightRatio=e.extend({},this.parameters.maximumSlideWidthRatio);for(var a in this.parameters.maximumHeightRatio)this.parameters.maximumHeightRatio[a]*=this.parameters.verticalRatioModifiers[a]}if("undefined"!=typeof nextend&&"undefined"!=typeof nextend.ssBeforeResponsive&&nextend.ssBeforeResponsive.call(this),this.onResize(),(this.parameters.onResizeEnabled||"adaptive"==this.parameters.type)&&(e(window).on({resize:e.proxy(this.onResize,this),orientationchange:e.proxy(this.onResize,this)}),this.sliderElement.on("SliderInternalResize",e.proxy(this.onResize,this)),this.parameters.scrollFix))try{var l=this;e('<iframe sandbox="allow-same-origin allow-scripts" style="height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;"/>').on("load",function(t){e(t.target.contentWindow?t.target.contentWindow:t.target.contentDocument.defaultView).on("resize",function(){l.sliderElement.triggerHandler("SliderInternalResize")})}).insertBefore(this.containerElement)}catch(d){}},s.prototype.getOuterWidth=function(){return this.responsiveDimensions.startSliderWidth+this.responsiveDimensions.startSliderMarginLeft+this.responsiveDimensions.startSliderMarginRight},s.prototype.storeDefaults=function(){this.responsiveDimensions={startWidth:this.sliderElement.outerWidth(!0),startHeight:this.sliderElement.outerHeight(!0)},this.horizontalElements=[],this.verticalElements=[],this.init(),this.margins={top:this.responsiveDimensions.startSliderMarginTop,right:this.responsiveDimensions.startSliderMarginRight,bottom:this.responsiveDimensions.startSliderMarginBottom,left:this.responsiveDimensions.startSliderMarginLeft}},s.prototype.addHorizontalElement=function(e,i,s,r){s=s||"ratio";var n=new t.SmartSliderResponsiveElement(this,s,e,i,r);return this.horizontalElements.push(n),n},s.prototype.addVerticalElement=function(e,i,s,r){s=s||"ratio";var n=new t.SmartSliderResponsiveElement(this,s,e,i,r);return this.verticalElements.push(n),n},s.prototype.resizeHorizontalElements=function(e){for(var t=0;t<this.horizontalElements.length;t++){var i=this.horizontalElements[t];"undefined"==typeof e[i.ratioName]&&console.log("error with "+i.ratioName),i.resize(this.responsiveDimensions,e[i.ratioName],!1,0)}},s.prototype.updateVerticalRatios=function(e){return e},s.prototype._updateVerticalRatios=function(t){var i=this.responsiveDimensions.startSlideHeight*t.slideH,s=!1;return this.sliderElement.find(".n2-ss-section-main-content").addClass("n2-ss-section-main-content-calc").each(function(t,r){var n=e(r).outerHeight();n>i&&(s=!0,i=n)}).removeClass("n2-ss-section-main-content-calc"),s&&(t.slideH=i/this.responsiveDimensions.startSlideHeight,t.h=Math.max(t.h,t.slideH)),t},s.prototype.resizeVerticalElements=function(e,t,i){for(var s=0;s<this.verticalElements.length;s++){var r=this.verticalElements[s];"undefined"==typeof e[r.ratioName]&&console.log("error with "+r.ratioName),r.resize(this.responsiveDimensions,e[r.ratioName],t,i)}},s.prototype.getDeviceMode=function(){return s._DeviceMode[this.deviceMode]},s.prototype.getDeviceModeOrientation=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.onResize=function(t){this.slider.mainAnimation&&"playing"==this.slider.mainAnimation.getState()?this.delayedResizeAdded||(this.delayedResizeAdded=!0,this.sliderElement.on("mainAnimationComplete.responsive",e.proxy(this._doDelayedResize,this))):this.doResize(t)},s.prototype._doDelayedResize=function(){this.doResize(),this.delayedResizeAdded=!1},s.prototype.doNormalizedResize=function(){this.normalizeTimeout&&clearTimeout(this.normalizeTimeout),this.normalizeTimeout=setTimeout(e.proxy(this.doResize,this),10)},s.prototype._getOrientation=function(){return this.orientationMode==s.OrientationMode.SCREEN?window.innerHeight<=window.innerWidth?s.DeviceOrientation.LANDSCAPE:s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE?s.DeviceOrientation.LANDSCAPE:void 0},s.prototype._getDevice=function(){switch(this.parameters.basedOn){case"combined":return this._getDeviceDevice(this._getDeviceScreenWidth());case"device":return this._getDeviceDevice(s.DeviceMode.DESKTOP);case"screen":return this._getDeviceScreenWidth()}},s.prototype._getDeviceScreenWidth=function(){var e=window.innerWidth;if(this.orientation==s.DeviceOrientation.PORTRAIT){if(e<this.parameters.mobilePortraitScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletPortraitScreenWidth)return s.DeviceMode.TABLET}else{if(e<this.parameters.mobileLandscapeScreenWidth)return s.DeviceMode.MOBILE;if(e<this.parameters.tabletLandscapeScreenWidth)return s.DeviceMode.TABLET}return s.DeviceMode.DESKTOP},s.prototype._getDeviceAndOrientationByScreenWidth=function(){var e=window.innerWidth;return e<this.parameters.mobilePortraitScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.PORTRAIT]:e<this.parameters.mobileLandscapeScreenWidth?[s.DeviceMode.MOBILE,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.tabletPortraitScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.PORTRAIT]:e<this.parameters.tabletLandscapeScreenWidth?[s.DeviceMode.TABLET,s.DeviceOrientation.LANDSCAPE]:e<this.parameters.desktopPortraitScreenWidth?[s.DeviceMode.DESKTOP,s.DeviceOrientation.PORTRAIT]:[s.DeviceMode.DESKTOP,s.DeviceOrientation.LANDSCAPE]},s.prototype._getDeviceDevice=function(e){return n===!0?s.DeviceMode.MOBILE:r&&e!=s.DeviceMode.MOBILE?s.DeviceMode.TABLET:e},s.prototype._getDeviceZoom=function(e){var t;this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?t=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(t=s.DeviceOrientation.LANDSCAPE);var i=s.DeviceMode.DESKTOP;return e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].mobile<.001?i=s.DeviceMode.MOBILE:e-this.parameters.ratioToDevice[s._DeviceOrientation[t]].tablet<.001&&(i=s.DeviceMode.TABLET),i},s.prototype.reTriggerSliderDeviceOrientation=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:e[0],lastOrientation:e[1],device:e[0],orientation:e[1]})},s.prototype.doResize=function(t,i,r,n,o){if(this.disableTransitions||(this.disableTransitions=!0,this.sliderElement.addClass("n2notransition"),this.disableTransitionsTimeout&&clearTimeout(this.disableTransitionsTimeout),this.disableTransitionsTimeout=setTimeout(e.proxy(function(){this.sliderElement.removeClass("n2notransition"),this.disableTransitions=!1},this),500)),this.refreshMargin(),"center"==this.slider.parameters.align&&("fullpage"==this.parameters.type?this.alignElement.css("maxWidth","none"):this.alignElement.css("maxWidth",this.responsiveDimensions.startWidth)),!this.slider.isAdmin&&this.parameters.forceFull){"none"!=this.parameters.forceFullOverflowX&&e(this.parameters.forceFullOverflowX).css("overflow-x","hidden");var a=0,l=0;if(""!=this.parameters.forceFullHorizontalSelector){var d=this.sliderElement.closest(this.parameters.forceFullHorizontalSelector);d&&d.length>0&&(a=d.width(),l=d.offset().left)}var h,p=a>0?a:document.body.clientWidth||document.documentElement.clientWidth,c=this.containerElement.parent(),u=c.offset().left;h=nextend.rtl.isRtl?p-(u+c.outerWidth()):u,this.containerElement.css(nextend.rtl.marginLeft,-h-parseInt(c.css("paddingLeft"))-parseInt(c.css("borderLeftWidth"))+l).width(p)}var m=this.containerElementPadding.width()/this.getOuterWidth(),f=!1,g=this.orientation,y=this.deviceMode,v=null,S=null;if(this.orientationMode==s.OrientationMode.SCREEN_WIDTH_ONLY){var b=this._getDeviceAndOrientationByScreenWidth();S=b[0],v=b[1]}else v=this._getOrientation();if(this.orientation!=v&&(this.orientation=v,f=!0,this.sliderElement.trigger("SliderOrientation",{lastOrientation:s._DeviceOrientation[g],orientation:s._DeviceOrientation[v]})),i||(this.orientationMode!=s.OrientationMode.SCREEN_WIDTH_ONLY&&(S=this._getDevice(m)),this.deviceMode!=S&&(this.deviceMode=S,this.sliderElement.removeClass("n2-ss-"+s._DeviceMode[y]).addClass("n2-ss-"+s._DeviceMode[S]),this.sliderElement.trigger("SliderDevice",{lastDevice:s._DeviceMode[y],device:s._DeviceMode[S]}),f=!0)),!this.slider.isAdmin&&"fullpage"==this.parameters.type){var x=0;if(window.matchMedia&&/Android|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent||navigator.vendor||window.opera)){var w,E=!1;t&&"orientationchange"==t.type&&(E=!0),w=n2const.isIOS?document.documentElement.clientHeight:window.innerHeight,window.matchMedia("(orientation: landscape)").matches?(x=Math.min(screen.width,w),90!=this.lastOrientation&&(E=!0,this.lastOrientation=90)):(x=Math.min(screen.height,w),0!=this.lastOrientation&&(E=!0,this.lastOrientation=0)),!E&&Math.abs(x-this.lastClientHeight)<100?x=this.lastClientHeight:this.lastClientHeight=x}else x=window.n2ClientHeight||document.documentElement.clientHeight||document.body.clientHeight;this.parameters.maximumHeightRatio[this.getDeviceModeOrientation()]=this.parameters.minimumHeightRatio=(x-this.getVerticalOffsetHeight())/this.responsiveDimensions.startHeight}if(f){var A=this._normalizeMode(s._DeviceMode[y],s._DeviceOrientation[g]),D=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);A[0]==D[0]&&A[1]==D[1]||(this.normalizedMode=D[0]+D[1],this.sliderElement.trigger("SliderDeviceOrientation",{lastDevice:A[0],lastOrientation:A[1],device:D[0],orientation:D[1]}))}var k=this.parameters.sliderWidthToDevice[this.normalizedMode]/this.parameters.sliderWidthToDevice.desktopPortrait;!this.parameters.downscale&&k>m?m=k:!this.parameters.upscale&&m>k&&(m=k),this._doResize(m,r,n,o),"center"==this.slider.parameters.align&&this.alignElement.css("maxWidth",this.responsiveDimensions.slider.width)},s.prototype._normalizeMode=function(e,t){return this.parameters.normalizedDeviceModes[e+t]},s.prototype.getNormalizedModeString=function(){var e=this._normalizeMode(s._DeviceMode[this.deviceMode],s._DeviceOrientation[this.orientation]);return e.join("")},s.prototype.getModeString=function(){return s._DeviceMode[this.deviceMode]+s._DeviceOrientation[this.orientation]},s.prototype.enabled=function(e,t){return this.parameters.deviceModes[e+t]},s.prototype._doResize=function(t,i,s,r){var n={ratio:t,w:t,h:t,slideW:t,slideH:t,fontRatio:1};this._buildRatios(n,this.slider.parameters.dynamicHeight,s),n.fontRatio=n.slideW;var o=!1;for(var a in n)if(n[a]!=this.lastRawRatios[a]){o=!0;break}(this.invalidateResponsiveState||o)&&(this.lastRawRatios=e.extend({},n),this.resizeHorizontalElements(n),this.finishResize(n,i,r))},s.prototype.finishResize=function(t,i,s){this.loadDeferred.done(e.proxy(function(){var r=e.proxy(function(){this.finishResize=this._finishResize,this.finishResize(t,i,s)},this);/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor)||/CriOS/.exec(window.navigator.userAgent)?setTimeout(r,200):r()},this)),this.invalidateResponsiveState=!1},s.prototype._finishResize=function(e,t,i){this.invalidateResponsiveState=!1,e=this.updateVerticalRatios(e),this.resizeVerticalElements(e,t,i),this.lastRatios=e,t?(this.sliderElement.trigger("SliderAnimatedResize",[e,t,i]),t.eventCallback("onComplete",function(){this.triggerResize(e,t)},[],this)):this.triggerResize(e,!1)},s.prototype.doVerticalResize=function(){var t=this.updateVerticalRatios(e.extend({},this.lastRawRatios)),i=!1;for(var s in t)if(t[s]!=this.lastRatios[s]){i=!0;break}i&&this.finishVerticalResize(t)},s.prototype.finishVerticalResize=function(t){this.loadDeferred.done(e.proxy(function(){this.finishVerticalResize=this._finishVerticalResize,this.finishVerticalResize(t)},this))},s.prototype._finishVerticalResize=function(e){this.resizeVerticalElements(e,!1,0),this.lastRatios=e,this.triggerResize(e,!1)},s.prototype.triggerResize=function(e,t){this.sliderElement.trigger("SliderResize",[e,this,t])},s.prototype._buildRatios=function(e,t,i){var s=this.getDeviceModeOrientation();this.parameters.maximumSlideWidthRatio[s]>0&&e.slideW>this.parameters.maximumSlideWidthRatio[s]&&(e.slideW=this.parameters.maximumSlideWidthRatio[s]),e.slideW=e.slideH=Math.min(e.slideW,e.slideH);var r=this.parameters.verticalRatioModifiers[s];if(e.slideH*=r,"fullpage"==this.parameters.type)e.h*=r,this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),this.slider.isAdmin?this.parameters.constrainRatio?(e.slideH=Math.min(e.slideH,e.h),e.slideH=e.slideW=Math.min(e.slideW,e.slideH)):(e.w=e.slideW,e.h=e.slideH):this.parameters.constrainRatio?(e.slideH=Math.min(e.slideH,e.h),e.slideH=e.slideW=Math.min(e.slideW,e.slideH)):(e.slideW=e.w,this.parameters.maximumSlideWidthRatio[s]>0&&e.slideW>this.parameters.maximumSlideWidthRatio[s]&&(e.slideW=this.parameters.maximumSlideWidthRatio[s]),e.slideH=e.h);else if(e.h*=r,this.parameters.minimumHeightRatio>0&&(e.h=Math.max(e.h,this.parameters.minimumHeightRatio)),this.parameters.maximumHeightRatio[s]>0&&(e.h=Math.min(e.h,this.parameters.maximumHeightRatio[s])),e.slideH=Math.min(e.slideH,e.h),e.slideW=e.slideH/r,"showcase"==this.slider.type&&(e.slideW=Math.min(e.slideW,e.w),e.slideH=Math.min(e.slideW,e.slideH)),t){var n=this.slider.currentSlide.backgroundImage;if("undefined"!=typeof i&&(n=i.backgroundImage),n.width>0&&n.height>0){var o=this.responsiveDimensions.startSlideWidth/n.width*(n.height/this.responsiveDimensions.startSlideHeight);-1!=o&&(e.slideH*=o,e.h*=o)}}this.sliderElement.triggerHandler("responsiveBuildRatios",[e])},s.prototype.setOrientation=function(e){"portrait"==e?this.orientationMode=s.OrientationMode.ADMIN_PORTRAIT:"landscape"==e&&(this.orientationMode=s.OrientationMode.ADMIN_LANDSCAPE)},s.prototype.setMode=function(e,t){var i;if(this.orientationMode==s.OrientationMode.ADMIN_PORTRAIT?i=s.DeviceOrientation.PORTRAIT:this.orientationMode==s.OrientationMode.ADMIN_LANDSCAPE&&(i=s.DeviceOrientation.LANDSCAPE),this==t){var r=this.parameters.sliderWidthToDevice[e+s._DeviceOrientation[i]];if("mobile"==e)switch(s._DeviceOrientation[i]){case"Portrait":r=Math.max(nextend.smallestZoom,320)}this.setSize(r)}},s.prototype.setSize=function(e){this.containerElement.width(e),this.doResize()},s.prototype.getVerticalOffsetHeight=function(){for(var e=0,t=0;t<this.verticalOffsetSelectors.length;t++)e+=this.verticalOffsetSelectors.eq(t).outerHeight();if(this.slider.widgets.$vertical)for(var t=0;t<this.slider.widgets.$vertical.length;t++)e+=this.slider.widgets.$vertical.eq(t).outerHeight();return e},s.prototype.addMargin=function(e,t){this.widgetMargins[e].push(t),t.isVisible()&&(this._addMarginSize(e,t.getSize()),this.enabledWidgetMargins.push(t)),this.doNormalizedResize()},s.prototype.addStaticMargin=function(e,t){"Bottom"!=e&&"Top"!=e&&(this.widgetStaticMargins||(this.widgetStaticMargins={Top:[],Right:[],Bottom:[],Left:[]}),this.widgetStaticMargins[e].push(t),this.doNormalizedResize())},s.prototype.refreshMargin=function(){for(var t in this.widgetMargins)for(var i=this.widgetMargins[t],s=i.length-1;s>=0;s--){var r=i[s];if(r.isVisible())-1==e.inArray(r,this.enabledWidgetMargins)&&(this._addMarginSize(t,r.getSize()),this.enabledWidgetMargins.push(r));else{var n=e.inArray(r,this.enabledWidgetMargins);-1!=n&&(this._addMarginSize(t,-r.getSize()),this.enabledWidgetMargins.splice(n,1))}}this.refreshStaticSizes()},s.prototype.refreshStaticSizes=function(){if(this.widgetStaticMargins){var e={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0};for(var t in this.widgetStaticMargins)for(var i=this.widgetStaticMargins[t],s=i.length-1;s>=0;s--){var r=i[s];r.isVisible()&&(e["padding"+t]+=r.getSize())}for(var n in e)this.containerElementPadding.css(e);this.staticSizes=e}},s.prototype._addMarginSize=function(e,t){var i=null;switch(e){case"Top":case"Bottom":i=this._sliderVertical;break;default:i=this._sliderHorizontal}i.data["margin"+e]+=t,this.responsiveDimensions["startSliderMargin"+e]+=t},s}),N2Require("SmartSliderResponsiveElement",[],[],function(e,t,i){function s(e){return e.charAt(0).toUpperCase()+e.slice(1)}function r(t,i,s,r,n){this._lastRatio=1,this.responsive=t,this.ratioName=i,this.element=s,this._readyDeferred=e.Deferred(),"undefined"!=typeof n?this.name=n:this.name=null,this.data={},this.helper={parent:null,parentProps:null,fontSize:!1,centered:!1},this._lateInit(r)}return r.prototype._lateInit=function(t){this._cssProperties=t,this.reloadDefault(),-1!=e.inArray("fontSize",t)&&(this.data.fontSize=this.element.data("fontsize"),this.helper.fontSize={fontSize:this.element.data("fontsize"),desktopPortrait:this.element.data("minfontsizedesktopportrait"),desktopLandscape:this.element.data("minfontsizedesktoplandscape"),tabletPortrait:this.element.data("minfontsizetabletportrait"),tabletLandscape:this.element.data("minfontsizetabletlandscape"),mobilePortrait:this.element.data("minfontsizemobileportrait"),mobileLandscape:this.element.data("minfontsizemobilelandscape")},this.responsive.sliderElement.on("SliderDeviceOrientation",e.proxy(this.onModeChange,this))),this.resize=this._resize,this._readyDeferred.resolve()},r.prototype.reloadDefault=function(){for(var e=0;e<this._cssProperties.length;e++){var t=this._cssProperties[e];this.data[t]=parseInt(this.element.css(t))}if(this.name){var i=this.responsive.responsiveDimensions;for(var r in this.data)i["start"+s(this.name)+s(r)]=this.data[r]}},r.prototype.ready=function(e){this._readyDeferred.done(e)},r.prototype.resize=function(t,i){this.ready(e.proxy(this.resize,this,t,i)),this._lastRatio=i},r.prototype._resize=function(e,t,i,s){this.name&&"undefined"==typeof e[this.name]&&(e[this.name]={});var r={};for(var n in this.data){var o=this.data[n]*t;"function"==typeof this[n+"Prepare"]&&(o=this[n+"Prepare"](o)),this.name&&(e[this.name][n]=o),r[n]=o}if(i)i.to(this.element,s,r,0);else if(this.element.css(r),this.helper.centered){var a=this.getVerticalMargin(parseInt((this.helper.parent.height()-this.element.height())/2)),l=this.getHorizontalMargin(parseInt((this.helper.parent.width()-this.element.width())/2));this.element.css({marginLeft:l,marginRight:l,marginTop:a,marginBottom:a})}this._lastRatio=t},r.prototype.getHorizontalMargin=function(e){return e},r.prototype.getVerticalMargin=function(e){return e},r.prototype._refreshResize=function(){this.responsive.ready.done(e.proxy(function(){this._resize(this.responsive.responsiveDimensions,this.responsive.lastRatios[this.ratioName])},this))},r.prototype.widthPrepare=function(e){return Math.round(e)},r.prototype.heightPrepare=function(e){return Math.round(e)},r.prototype.marginLeftPrepare=function(e){return parseInt(e)},r.prototype.marginRightPrepare=function(e){return parseInt(e)},r.prototype.lineHeightPrepare=function(e){return e+"px"},r.prototype.borderLeftWidthPrepare=function(e){return parseInt(e)},r.prototype.borderRightWidthPrepare=function(e){return parseInt(e)},r.prototype.borderTopWidthPrepare=function(e){return parseInt(e)},r.prototype.borderBottomWidthPrepare=function(e){return parseInt(e)},r.prototype.fontSizePrepare=function(e){var t=this.responsive.getNormalizedModeString();return e<this.helper.fontSize[t]?this.helper.fontSize[t]:e},r.prototype.setCentered=function(){this.helper.parent=this.element.parent(),this.helper.centered=!0},r.prototype.unsetCentered=function(){this.helper.centered=!1},r.prototype.onModeChange=function(){this.setFontSizeByMode()},r.prototype.setFontSizeByMode=function(){this.element.css("fontSize",this.fontSizePrepare(this.data.fontSize*this._lastRatio))},r}),N2Require("FrontendItemVimeo",[],[],function(e,t,i){function s(t,i,s,r,n,o){this.state={scroll:!1,slide:!0,play:!1,continuePlay:!1},this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.start=o,this.parameters=e.extend({vimeourl:"//vimeo.com/144598279",center:0,autoplay:"0",reset:"0",title:"1",byline:"1",portrait:"0",loop:"0",color:"00adef",volume:"-1"},r),navigator.userAgent.toLowerCase().indexOf("android")>-1&&(this.parameters.autoplay=0),1==this.parameters.autoplay||!n||n2const.isMobile?this.ready(e.proxy(this.initVimeoPlayer,this)):e("#"+this.playerId).on("click.vimeo n2click.vimeo",e.proxy(function(t){e(t.currentTarget).off(".vimeo"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initVimeoPlayer()},this))},this))}return s.vimeoDeferred=null,s.prototype.ready=function(t){null===s.vimeoDeferred&&(s.vimeoDeferred=e.getScript("https://player.vimeo.com/api/player.js")),s.vimeoDeferred.done(t)},s.prototype.initVimeoPlayer=function(){var t=n2('<iframe id="'+this.playerId+'_video" src="https://player.vimeo.com/video/'+this.parameters.vimeocode+"?autoplay=0&_video&title="+this.parameters.title+"&byline="+this.parameters.byline+"&background="+this.parameters.background+"&portrait="+this.parameters.portrait+"&color="+this.parameters.color+"&loop="+this.parameters.loop+("-1"==this.parameters.quality?"":"&quality="+this.parameters.quality)+'" style="position: absolute; top:0; left: 0; width: 100%; height: 100%;" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>');e("#"+this.playerId).append(t),this.isStatic=t.closest(".n2-ss-static-slide").length,this.playerElement=t,this.player=new Vimeo.Player(t[0]),this.player.ready().then(e.proxy(this.onReady,this))},s.prototype.onReady=function(){var t=parseFloat(this.parameters.volume);t>=0&&this.setVolume(t),this.slide=this.slider.findSlideByElement(this.playerElement),1==this.parameters.center&&(this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)));var i=this.playerElement.parent().parent();this.player.on("play",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play")},this)),this.player.on("pause",e.proxy(function(){i.triggerHandler("n2pause"),this.state.continuePlay?(this.state.continuePlay=!1,this.state.play=!0):this.state.play=!1},this)),this.player.on("ended",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"),this.state.play=!1},this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(t,i,s,r,n){-1==e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))?(parseInt(this.parameters.reset)&&this.reset(),this.setState("slide",!1)):this.setState("slide",!0)},this)),nextend.scrollTracker.add(this.playerElement,e.proxy(function(){this.setState("scroll",!0)},this),e.proxy(function(){this.state.continuePlay=!0,this.setState("scroll",!1)},this))),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.playerElement.parent().css("background",""),this.readyDeferred.resolve()},s.prototype.onResize=function(){var e=52,t=this.playerElement.parent(),i=t.width()+e,s=t.height()+e,r=16/9,n={width:i,height:s,marginTop:0};n[nextend.rtl.marginLeft]=0,i/s>r?(n.height=i*r,n.marginTop=(s-n.height)/2):(n.width=s*r,n[nextend.rtl.marginLeft]=(i-n.width)/2),this.playerElement.css(n)},s.prototype.initAutoplay=function(){this.isStatic?(this.state.play=!0,this.setState("slide",!0)):(this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(t,i,s,r,n){e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))>=0?(this.state.play=!0,this.setState("slide",!0)):this.setState("slide",!1)},this)),e.inArray(this.slide,this.slider.getVisibleSlides())>=0&&(this.state.play=!0,this.setState("slide",!0)))},s.prototype.setState=function(e,t){this.state[e]=t,this.state.play&&this.state.slide&&this.state.scroll?this.play():this.pause()},s.prototype.play=function(){this.slider.sliderElement.trigger("mediaStarted",this.playerId),0!=this.start&&this.player.setCurrentTime(this.start),this.player.play(),this.player.getCurrentTime().then(e.proxy(function(e){e<this.start&&0!=this.start&&this.player.setCurrentTime(this.start),this.player.play()},this))["catch"](e.proxy(function(e){this.player.play()},this))},s.prototype.pause=function(){this.player.pause()},s.prototype.reset=function(){this.player.setCurrentTime(this.start)},s.prototype.setVolume=function(e){this.player.setVolume(e)},s}),N2Require("FrontendItemYouTube",[],[],function(e,t,i){function s(t,i,s,r){if(this.state={scroll:!1,slide:!0,play:!1,continuePlay:!1},this.readyDeferred=e.Deferred(),this.slider=t,this.playerId=i,this.parameters=e.extend({youtubeurl:"//www.youtube.com/watch?v=MKmIwHAFjSU",youtubecode:"MKmIwHAFjSU",center:0,autoplay:"1",theme:"dark",related:"1",vq:"default",volume:"-1",loop:0,showinfo:1,modestbranding:1,reset:0,query:[],playsinline:0},s),1==this.parameters.autoplay&&(navigator.userAgent.toLowerCase().indexOf("android")>-1||n2const.isIOS)){this.parameters.autoplay=0;try{"playsInline"in document.createElement("video")&&(this.parameters.autoplay=1,this.parameters.playsinline=1,this.parameters.volume=0)}catch(n){}}1==this.parameters.autoplay||!r||n2const.isMobile?this.ready(e.proxy(this.initYoutubePlayer,this)):e("#"+this.playerId).on("click.youtube n2click.youtube",e.proxy(function(t){e(t.currentTarget).off(".youtube"),t.preventDefault(),t.stopPropagation(),this.ready(e.proxy(function(){this.readyDeferred.done(e.proxy(function(){this.play()},this)),this.initYoutubePlayer()},this))},this))}return s.YTDeferred=null,s.prototype.ready=function(t){if(null===s.YTDeferred)if(s.YTDeferred=e.Deferred(),"undefined"==typeof YT){var i=function(){};"function"==typeof window.onYouTubeIframeAPIReady&&(i=window.onYouTubeIframeAPIReady),window.onYouTubeIframeAPIReady=function(){s.YTDeferred.resolve(),i()},e.getScript("https://www.youtube.com/iframe_api")}else if(YT.loaded)s.YTDeferred.resolve();else var r=setInterval(function(){YT.loaded&&(s.YTDeferred.resolve(),clearInterval(r))},200);s.YTDeferred.done(t)},s.prototype.initYoutubePlayer=function(){var t=e("#"+this.playerId),i=t.closest(".n2-ss-layer");this.isStatic=t.closest(".n2-ss-static-slide").length;var s={enablejsapi:1,origin:window.location.protocol+"//"+window.location.host,theme:this.parameters.theme,wmode:"opaque",rel:this.parameters.related,vq:this.parameters.vq,start:this.parameters.start,showinfo:this.parameters.showinfo,modestbranding:this.parameters.modestbranding,playsinline:this.parameters.playsinline};1==this.parameters.center&&(s.controls=0,s.showinfo=0),1!=this.parameters.controls&&(s.autohide=1,s.controls=0,s.showinfo=0),+(navigator.platform.toUpperCase().indexOf("MAC")>=0&&navigator.userAgent.search("Firefox")>-1)&&(s.html5=1);for(var r in this.parameters.query)this.parameters.query.hasOwnProperty(r)&&(s[r]=this.parameters.query[r]);this.player=new YT.Player(this.playerId,{videoId:this.parameters.youtubecode,wmode:"opaque",playerVars:s,events:{onReady:e.proxy(this.onReady,this),onStateChange:e.proxy(function(e){switch(e.data){case YT.PlayerState.PLAYING:this.isStatic||this.slider.sliderElement.trigger("mediaStarted",this.playerId),i.triggerHandler("n2play");break;case YT.PlayerState.PAUSED:i.triggerHandler("n2pause"),this.state.continuePlay?(this.state.continuePlay=!1,this.state.play=!0):this.state.play=!1;break;case YT.PlayerState.ENDED:1==this.parameters.loop?(this.player.seekTo(0),
5
+ this.player.playVideo()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"),this.state.play=!1)}},this)}}),this.playerElement=e("#"+this.playerId),this.slide=this.slider.findSlideByElement(this.playerElement),1==this.parameters.center&&(this.playerElement.parent().css("overflow","hidden"),this.onResize(),this.slider.sliderElement.on("SliderResize",e.proxy(this.onResize,this)))},s.prototype.onReady=function(){var t=parseFloat(this.parameters.volume);t>0?this.setVolume(t):this.player.mute(),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),this.isStatic||(this.slider.sliderElement.on("mainAnimationStart",e.proxy(function(t,i,s,r){-1==e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))?this.setState("slide",!1):this.setState("slide",!0)},this)),parseInt(this.parameters.reset)&&this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(t,i,s,r){-1==e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))&&this.player.seekTo(0)},this))),this.readyDeferred.resolve(),nextend.scrollTracker.add(this.playerElement,e.proxy(function(){this.setState("scroll",!0)},this),e.proxy(function(){this.state.continuePlay=!0,this.setState("scroll",!1)},this))},s.prototype.onResize=function(){var e=100,t=this.playerElement.parent(),i=t.width(),s=t.height()+e,r=16/9,n={width:i,height:s,marginTop:0};n[nextend.rtl.marginLeft]=0,i/s>r?(n.height=i*r,n.marginTop=(s-n.height)/2):(n.width=s*r,n[nextend.rtl.marginLeft]=(i-n.width)/2),this.playerElement.css(n)},s.prototype.initAutoplay=function(){this.isStatic?(this.state.play=!0,this.setState("slide",!0)):(this.state.slide=!1,this.slider.sliderElement.on("mainAnimationComplete",e.proxy(function(t,i,s,r){e.inArray(this.slide,this.slider.getVisibleSlides(this.slider.slides[r]))>=0?(this.state.play=!0,this.setState("slide",!0)):this.setState("slide",!1)},this)),e.inArray(this.slide,this.slider.getVisibleSlides())>=0&&(this.state.play=!0,this.setState("slide",!0)))},s.prototype.setState=function(e,t){this.state[e]=t,this.state.play&&this.state.slide&&this.state.scroll?this.play():this.pause()},s.prototype.play=function(){this.isStopped()&&(this.slider.sliderElement.trigger("mediaStarted",this.playerId),this.player.playVideo())},s.prototype.pause=function(){this.isStopped()||this.player.pauseVideo()},s.prototype.stop=function(){this.player.stopVideo()},s.prototype.isStopped=function(){var e=this.player.getPlayerState();switch(e){case-1:case 0:case 2:case 5:return!0;default:return!1}},s.prototype.setVolume=function(e){this.player.setVolume(100*e)},s});
library/media/less/clear.n2less CHANGED
@@ -1,5 +1,7 @@
1
  (~'@{id}') {
2
 
 
 
3
  .n2-ow,
4
  .n2-ow-all * {
5
  font-size: inherit;
@@ -310,6 +312,7 @@
310
  position: absolute;
311
  left: 0;
312
  top: 0;
 
313
  }
314
 
315
  .n2-ss-layer-group > * {
1
  (~'@{id}') {
2
 
3
+ -webkit-font-smoothing: antialiased;
4
+
5
  .n2-ow,
6
  .n2-ow-all * {
7
  font-size: inherit;
312
  position: absolute;
313
  left: 0;
314
  top: 0;
315
+ z-index: 1;
316
  }
317
 
318
  .n2-ss-layer-group > * {
library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.js CHANGED
@@ -533,11 +533,11 @@ N2Require('SmartSliderMainAnimationSimple', ['SmartSliderMainAnimationAbstract']
533
  NextendTween.set(nextSlide.backgroundImage.element, o4);
534
  }
535
 
536
- nextSlideFrom[property] = propertyValue;
537
- nextSlideFromImage[property] = propertyValue;
538
 
539
- currentSlideTo[property] = -propertyValue;
540
- currentSlideToImage[property] = -propertyValue;
541
  }
542
 
543
  nextSlide.$element.css('zIndex', 23);
533
  NextendTween.set(nextSlide.backgroundImage.element, o4);
534
  }
535
 
536
+ nextSlideFrom[property] = propertyValue + (/chrome/i.test( navigator.userAgent ) ? (propertyValue < 0 ? 2 : -2) : 0);
537
+ nextSlideFromImage[property] = propertyValue + (/chrome/i.test( navigator.userAgent ) ? (propertyValue < 0 ? 2 : -2) : 0);
538
 
539
+ currentSlideTo[property] = -propertyValue + (/chrome/i.test( navigator.userAgent ) ? (propertyValue < 0 ? -2 : 2) : 0);
540
+ currentSlideToImage[property] = -propertyValue + (/chrome/i.test( navigator.userAgent ) ? (propertyValue < 0 ? -2 : 2) : 0);
541
  }
542
 
543
  nextSlide.$element.css('zIndex', 23);
library/media/plugins/type/simple/simple/dist/smartslider-simple-type-frontend.min.js CHANGED
@@ -1 +1 @@
1
- N2Require("SmartSliderMainAnimationSimple",["SmartSliderMainAnimationAbstract"],[],function(e,t,i){function n(i,n){switch(this.postBackgroundAnimation=!1,this._currentBackgroundAnimation=!1,this.reverseSlideIndex=null,n=e.extend({delay:0,parallax:.45,type:"horizontal",shiftedBackgroundAnimation:"auto"},n),n.delay/=1e3,t.SmartSliderMainAnimationAbstract.prototype.constructor.apply(this,arguments),this.parameters.type){case"no":this.animation=this._mainAnimationNo,this.isNoAnimation=!0;break;case"fade":this.animation=this._mainAnimationFade;break;case"crossfade":this.animation=this._mainAnimationCrossFade;break;case"vertical":1==this.parameters.parallax?this.animation=this._mainAnimationVertical:this.animation=this._mainAnimationVerticalParallax;break;case"vertical-reversed":1==this.parameters.parallax?this.animation=this._mainAnimationVerticalReversed:this.animation=this._mainAnimationVerticalReversedParallax;break;case"horizontal-reversed":1==this.parameters.parallax?this.animation=this._mainAnimationHorizontalReversed:this.animation=this._mainAnimationHorizontalReversedParallax;break;default:1==this.parameters.parallax?this.animation=this._mainAnimationHorizontal:this.animation=this._mainAnimationHorizontalParallax}}return n.prototype=Object.create(t.SmartSliderMainAnimationAbstract.prototype),n.prototype.constructor=n,n.prototype.setToStarterSlide=function(e){this.setActiveSlide(e)},n.prototype.changeTo=function(e,i,n,a){this.postBackgroundAnimation&&this.postBackgroundAnimation.prepareToSwitchSlide(e,i),t.SmartSliderMainAnimationAbstract.prototype.changeTo.apply(this,arguments)},n.prototype.setActiveSlide=function(e){for(var t=0;t<this.slider.slides.length;t++)this.slider.slides[t]!=e&&this._hideSlide(this.slider.slides[t])},n.prototype._hideSlide=function(e){NextendTween.set(e.$element,{x:-1e5*nextend.rtl.modifier}),e.backgroundImage&&NextendTween.set(e.backgroundImage.element,{x:-1e5*nextend.rtl.modifier})},n.prototype._showSlide=function(e){NextendTween.set(e.$element.get(0),{x:0}),e.backgroundImage&&NextendTween.set(e.backgroundImage.element,{x:0})},n.prototype.cleanSlideIndex=function(e){this._hideSlide(this.slider.slides[e])},n.prototype.revertTo=function(e,i){this.slider.slides[i].$element.css("zIndex",""),this._hideSlide(this.slider.slides[i]),t.SmartSliderMainAnimationAbstract.prototype.revertTo.apply(this,arguments)},n.prototype._initAnimation=function(e,t,i){this.animation(e,t,i)},n.prototype.onBackwardChangeToComplete=function(e,t,i){this.reverseSlideIndex=null,this.onChangeToComplete(e,t,i)},n.prototype.onChangeToComplete=function(e,i,n){null!==this.reverseSlideIndex&&(this.slider.slides[this.reverseSlideIndex].triggerHandler("mainAnimationStartInCancel"),this.reverseSlideIndex=null),this._hideSlide(e),t.SmartSliderMainAnimationAbstract.prototype.onChangeToComplete.apply(this,arguments)},n.prototype.onReverseChangeToComplete=function(e,i,n){this._hideSlide(e),t.SmartSliderMainAnimationAbstract.prototype.onReverseChangeToComplete.apply(this,arguments)},n.prototype._mainAnimationNo=function(t,i){this._showSlide(i),this.slider.unsetActiveSlide(t),i.$element.css("opacity",0),i.backgroundImage&&i.backgroundImage.element.css("opacity",0),this.slider.setActiveSlide(i);var n=this.timeline.totalDuration(),a=this.getExtraDelay();this._currentBackgroundAnimation&&this.parameters.shiftedBackgroundAnimation&&this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup(),0==n&&(n=1e-5,a+=n),this.timeline.set(t.$element,{opacity:0},a),!this._currentBackgroundAnimation&&t.backgroundImage&&this.timeline.set(t.backgroundImage.element,{opacity:0},a),this.timeline.set(i.$element,{opacity:1},n),!this._currentBackgroundAnimation&&i.backgroundImage&&this.timeline.set(i.backgroundImage.element,{opacity:1},n),this.sliderElement.on("mainAnimationComplete.n2-simple-no",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-no");var a=this.slider.slides[i],r=this.slider.slides[n];a.$element.css("opacity",""),!this._currentBackgroundAnimation&&a.backgroundImage&&a.backgroundImage.element.css("opacity",""),r.$element.css("opacity",""),!this._currentBackgroundAnimation&&r.backgroundImage&&r.backgroundImage.element.css("opacity","")},this))},n.prototype._mainAnimationFade=function(t,i){t.$element.css("zIndex",23),t.backgroundImage&&t.backgroundImage.element.css("zIndex",23),i.$element.css("opacity",0),this._showSlide(i),this.slider.unsetActiveSlide(t),this.slider.setActiveSlide(i);var n=this.adjustMainAnimation();if(0!=this.parameters.shiftedBackgroundAnimation){var a=!1,r=!1;"auto"==this.parameters.shiftedBackgroundAnimation?t.hasLayers()?a=!0:r=!0:a=!0,this._currentBackgroundAnimation&&a?(this.timeline.shiftChildren(n.outDuration-n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):r&&(this.timeline.shiftChildren(n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}this.timeline.to(t.$element.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),!this._currentBackgroundAnimation&&t.backgroundImage&&this.timeline.to(t.backgroundImage.element,n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),this.timeline.to(i.$element.get(0),n.inDuration,{opacity:1,ease:this.getEase()},n.inDelay),!this._currentBackgroundAnimation&&i.backgroundImage&&i.backgroundImage.element.css("opacity",1),this.sliderElement.on("mainAnimationComplete.n2-simple-fade",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade");var a=this.slider.slides[i],r=this.slider.slides[n];a.$element.css({zIndex:"",opacity:""}),!this._currentBackgroundAnimation&&a.backgroundImage&&a.backgroundImage.element.css({zIndex:"",opacity:""}),r.$element.css("opacity",""),!this._currentBackgroundAnimation&&r.backgroundImage&&r.backgroundImage.element.css("opacity","")},this))},n.prototype._mainAnimationCrossFade=function(t,i){t.$element.css("zIndex",23),t.backgroundImage&&t.backgroundImage.element.css("zIndex",23),i.$element.css("opacity",0),i.backgroundImage&&i.backgroundImage.element.css("opacity",0),this._showSlide(i),this.slider.unsetActiveSlide(t),this.slider.setActiveSlide(i);var n=this.adjustMainAnimation();if(0!=this.parameters.shiftedBackgroundAnimation){var a=!1,r=!1;"auto"==this.parameters.shiftedBackgroundAnimation?t.hasLayers()?a=!0:r=!0:a=!0,this._currentBackgroundAnimation&&a?(this.timeline.shiftChildren(n.outDuration-n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):r&&(this.timeline.shiftChildren(n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}this.timeline.to(t.$element.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),!this._currentBackgroundAnimation&&t.backgroundImage&&this.timeline.to(t.backgroundImage.element.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),this.timeline.to(i.$element.get(0),n.inDuration,{opacity:1,ease:this.getEase()},n.inDelay),!this._currentBackgroundAnimation&&i.backgroundImage&&this.timeline.to(i.backgroundImage.element.get(0),n.inDuration,{opacity:1,ease:this.getEase()},n.inDelay),this.sliderElement.on("mainAnimationComplete.n2-simple-fade",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade");var a=this.slider.slides[i],r=this.slider.slides[n];a.$element.css({zIndex:"",opacity:""}),!this._currentBackgroundAnimation&&a.backgroundImage&&a.backgroundImage.element.css({zIndex:"",opacity:""}),r.$element.css("opacity",""),!this._currentBackgroundAnimation&&r.backgroundImage&&r.backgroundImage.element.css("opacity","")},this))},n.prototype._mainAnimationHorizontal=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",1,i)},n.prototype._mainAnimationVertical=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",1,i)},n.prototype._mainAnimationHorizontalParallax=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",this.parameters.parallax,i)},n.prototype._mainAnimationVerticalParallax=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",this.parameters.parallax,i)},n.prototype._mainAnimationHorizontalReversed=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",1,!i)},n.prototype._mainAnimationVerticalReversed=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",1,!i)},n.prototype._mainAnimationHorizontalReversedParallax=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",this.parameters.parallax,!i)},n.prototype._mainAnimationVerticalReversedParallax=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",this.parameters.parallax,!i)},n.prototype.__mainAnimationDirection=function(t,i,n,a,r){var s="",o=0,d=0,l="";"horizontal"==n?(s="x",l="width",d=o=this.slider.dimensions.slideouter.width,nextend.rtl.isRtl&&(r=!r)):"vertical"==n&&(s="y",l="height",d=o=this.slider.dimensions.slideouter.height),r&&(o*=-1);var m={},c={ease:this.getEase()},h={},u={ease:this.getEase()},p={ease:this.getEase()},g={ease:this.getEase()};if(1!=a)if(r)t.$element.css("zIndex",24),t.backgroundImage&&t.backgroundImage.element.css("zIndex",24),t.$element.addClass("n2-ss-parallax-clip"),c[l]=-o,u[l]=-o,o*=a,m[s]=o,m[l]=-o,h[s]=o,h[l]=-o,p[l]=-o,p[s]=d,g[s]=-o;else{t.$element.css("zIndex",24),t.backgroundImage&&t.backgroundImage.element.css("zIndex",24),o*=a;var A={};if(A[s]=o,NextendTween.set(i.$element,A),i.backgroundImage){var y={};y[s]=o,NextendTween.set(i.backgroundImage.element,y)}i.$element.addClass("n2-ss-parallax-clip"),m[s]=d,m[l]=o,c[l]=d,h[s]=o,p[l]=o,g[l]=o,p[s]=-o,g[s]=-o}else{var k={};if(k[s]=o,NextendTween.set(i.$element,k),i.backgroundImage){var f={};f[s]=o,NextendTween.set(i.backgroundImage.element,f)}m[s]=o,h[s]=o,p[s]=-o,g[s]=-o}i.$element.css("zIndex",23),i.backgroundImage&&i.backgroundImage.element.css("zIndex",23),(r||1==a)&&(t.$element.css("zIndex",22),t.backgroundImage&&t.backgroundImage.element.css("zIndex",22)),this.slider.unsetActiveSlide(t),this.slider.setActiveSlide(i);var S=this.adjustMainAnimation();if(c[s]=0,u[s]=0,this.timeline.fromTo(i.$element.get(0),S.inDuration,m,c,S.inDelay),i.backgroundImage&&this.timeline.fromTo(i.backgroundImage.element,S.inDuration,h,u,S.inDelay),0!=this.parameters.shiftedBackgroundAnimation){var v=!1,b=!1;"auto"==this.parameters.shiftedBackgroundAnimation?t.hasLayers()?v=!0:b=!0:v=!0,this._currentBackgroundAnimation&&v?(this.timeline.shiftChildren(S.outDuration-S.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):b&&(this.timeline.shiftChildren(S.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}if(this.timeline.to(t.$element.get(0),S.outDuration,p,S.outDelay),t.backgroundImage&&this.timeline.to(t.backgroundImage.element,S.outDuration,g,S.outDelay),this.isTouch&&this.isReverseAllowed&&1==a){var _=r?t.index+1:t.index-1;if(0>_?_=this.slider.parameters.carousel?this.slider.slides.length-1:t.index:_>=this.slider.slides.length&&(_=this.slider.parameters.carousel?0:t.index),_!=i.index){if(_!=t.index){this.reverseSlideIndex=_,this.enableReverseMode();var x=this.slider.slides[_];"vertical"==n&&this._showSlide(x),x.$element.css(s,o);var I={},B={ease:this.getEase()},D={},E={ease:this.getEase()};B[s]=0,I[s]=-o,E[s]=o,D[s]=0,x.$element.trigger("mainAnimationStartIn",[this,t.index,x.index,!1]),this.reverseTimeline.paused(!0),this.reverseTimeline.eventCallback("onComplete",this.onBackwardChangeToComplete,[t,x,!1],this),this.reverseTimeline.fromTo(x.$element.get(0),S.inDuration,I,B,S.inDelay),x.backgroundImage&&this.reverseTimeline.fromTo(x.backgroundImage.element,S.inDuration,I,B,S.inDelay),this.reverseTimeline.fromTo(t.$element.get(0),S.inDuration,D,E,S.inDelay),t.backgroundImage&&this.reverseTimeline.fromTo(t.backgroundImage.element,S.inDuration,D,E,S.inDelay)}}else this.reverseSlideIndex=null}this.sliderElement.on("mainAnimationComplete.n2-simple-fade",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade");var a=this.slider.slides[i],r=this.slider.slides[n];r.$element.css("zIndex","").css(s,"").removeClass("n2-ss-parallax-clip"),r.backgroundImage&&r.backgroundImage.element.css("zIndex","").css(s,""),a.$element.css("zIndex","").css(l,"").removeClass("n2-ss-parallax-clip"),a.backgroundImage&&a.backgroundImage.element.css("zIndex","").css(l,"")},this))},n.prototype.getExtraDelay=function(){return 0},n.prototype.adjustMainAnimation=function(){var e=this.parameters.duration,t=this.parameters.delay,i=this.timeline.totalDuration(),n=this.getExtraDelay();if(i>0){var a=e+t;if(!(a>i))return{inDuration:e,outDuration:e,inDelay:i-e,outDelay:n,extraDelay:n};e=e*i/a,t=t*i/a,n>t&&(e-=n-t,t=n)}else t+=n;return{inDuration:e,outDuration:e,inDelay:t,outDelay:t,extraDelay:n}},n.prototype.hasBackgroundAnimation=function(){return!1},n}),N2Require("SmartSliderFrontendBackgroundAnimation",["SmartSliderMainAnimationSimple"],[],function(e,t,i){function n(i,n,a){this._currentBackgroundAnimation=!1,t.SmartSliderMainAnimationSimple.prototype.constructor.call(this,i,n),this.isReverseAllowed=!1,this.bgAnimationElement=this.sliderElement.find(".n2-ss-background-animation"),this.slider.parameters.perspective>0&&NextendTween.set(this.bgAnimationElement,{perspective:this.slider.parameters.perspective}),this.backgroundAnimations=e.extend({global:0,speed:"normal"},a),this.backgroundImages=i.backgroundImages.getBackgroundImages(),i.backgroundImages.hack()}return n.prototype=Object.create(t.SmartSliderMainAnimationSimple.prototype),n.prototype.constructor=n,n.prototype.getBackgroundAnimation=function(e,t){if(t.hasBackgroundVideo()||e.hasBackgroundVideo())return!1;var i=this.backgroundAnimations.global,n=this.backgroundAnimations.speed;if(t.backgroundAnimation){var a=t.backgroundAnimation;i=a.animation,n=a.speed}return i?[i[Math.floor(Math.random()*i.length)],n]:!1},n.prototype._initAnimation=function(i,n,a){this._currentBackgroundAnimation=!1;var r=i.backgroundImage,s=n.backgroundImage;if(r&&s){var o=this.getBackgroundAnimation(i,n);if(o!==!1){var d=1;switch(o[1]){case"superSlow":d=3;break;case"slow":d=1.5;break;case"fast":d=.75;break;case"superFast":d=.5}return this._currentBackgroundAnimation=new t["SmartSliderBackgroundAnimation"+o[0].type](this,r.element,s.element,o[0],d,a),t.SmartSliderMainAnimationSimple.prototype._initAnimation.apply(this,arguments),this._currentBackgroundAnimation.postSetup(),void this.timeline.set(e("<div />"),{opacity:1,onComplete:e.proxy(function(){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.ended(),this._currentBackgroundAnimation=!1)},this)})}}t.SmartSliderMainAnimationSimple.prototype._initAnimation.apply(this,arguments)},n.prototype.onChangeToComplete=function(e,i){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.ended(),this._currentBackgroundAnimation=!1),t.SmartSliderMainAnimationSimple.prototype.onChangeToComplete.apply(this,arguments)},n.prototype.onReverseChangeToComplete=function(e,i,n){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.revertEnded(),this._currentBackgroundAnimation=!1),t.SmartSliderMainAnimationSimple.prototype.onReverseChangeToComplete.apply(this,arguments)},n.prototype.getExtraDelay=function(){return this._currentBackgroundAnimation?this._currentBackgroundAnimation.getExtraDelay():0},n.prototype.hasBackgroundAnimation=function(){return this._currentBackgroundAnimation},n}),N2Require("SmartSliderResponsiveSimple",["SmartSliderResponsive"],[],function(e,t,i){function n(){this.round=1,t.SmartSliderResponsive.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(t.SmartSliderResponsive.prototype),n.prototype.constructor=n,n.prototype.init=function(){this.sliderElement.find(".n2-ss-section-main-content").length&&(this.updateVerticalRatios=this._updateVerticalRatios),this._sliderHorizontal=this.addHorizontalElement(this.sliderElement,["width","marginLeft","marginRight"],"w","slider"),this.addHorizontalElement(this.sliderElement.find(".n2-ss-slider-1"),["width","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],"w"),this._sliderVertical=this.addVerticalElement(this.sliderElement,["marginTop","marginBottom"],"h"),this.addHorizontalElement(this.sliderElement,["fontSize"],"fontRatio","slider"),this.addVerticalElement(this.sliderElement.find(".n2-ss-slider-1"),["height","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],"h","slider"),this.addHorizontalElement(this.sliderElement.find(".n2-ss-slide"),["width"],"w","slideouter"),this.addVerticalElement(this.sliderElement.find(".n2-ss-slide"),["height"],"h","slideouter");var t=this.sliderElement.find(".n2-ss-layers-container");this.addHorizontalElement(t,["width"],"slideW","slide"),this.addVerticalElement(t,["height"],"slideH","slide").setCentered();for(var i=this.slider.parameters.mainanimation.parallax,n=this.slider.backgroundImages.getBackgroundImages(),a=0;a<n.length;a++)1!=i&&(this.addHorizontalElement(n[a].element,["width"],"w"),this.addVerticalElement(n[a].element,["height"],"h"),this.addHorizontalElement(n[a].$mask,["width"],"w"),this.addVerticalElement(n[a].$mask,["height"],"h"));var r=this.sliderElement.find(".n2-ss-slider-background-video");if(r.length){var s=!/Mobi/.test(navigator.userAgent)||"playsInline"in document.createElement("video")||"webkit-playsinline"in document.createElement("video")||navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)&&parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2])>=53;s?r[0].videoWidth>0?this.videoPlayerReady(r):(r[0].addEventListener("error",e.proxy(this.videoPlayerError,this,r),!0),r[0].addEventListener("canplay",e.proxy(this.videoPlayerReady,this,r))):this.videoPlayerError(r)}},n.prototype.videoPlayerError=function(e){e.remove()},n.prototype.videoPlayerReady=function(t){t.data("ratio",t[0].videoWidth/t[0].videoHeight),t.addClass("n2-active"),this.slider.ready(e.proxy(function(){this.slider.sliderElement.on("SliderResize",e.proxy(this.resizeVideo,this,t)),this.resizeVideo(t)},this))},n.prototype.resizeVideo=function(e){var t=e.data("mode"),i=e.data("ratio"),n=this.slider.dimensions.slideouter||this.slider.dimensions.slide,a=n.width/n.height;"fill"==t?a>i?e.css({width:"100%",height:"auto"}):e.css({width:"auto",height:"100%"}):"fit"==t&&(i>a?e.css({width:"100%",height:"auto"}):e.css({width:"auto",height:"100%"})),e.css("marginTop",0).css(nextend.rtl.marginLeft,0),this.center(e)},n.prototype.center=function(e){var t=e.parent();e.css({marginTop:parseInt((t.height()-e.height())/2)}),e.css(nextend.rtl.marginLeft,parseInt((t.width()-e.width())/2))},n}),N2Require("SmartSliderSimple",["SmartSliderAbstract"],[],function(e,t,i){function n(i,n){this.type="simple",t.SmartSliderAbstract.prototype.constructor.call(this,i,e.extend({bgAnimations:0,carousel:1},n))}return n.prototype=Object.create(t.SmartSliderAbstract.prototype),n.prototype.constructor=n,n.prototype.initResponsiveMode=function(){this.responsive=new t.SmartSliderResponsiveSimple(this,this.parameters.responsive),this.responsive.start(),t.SmartSliderAbstract.prototype.initResponsiveMode.call(this),this.$backgroundsContainer=this.sliderElement.find(".n2-ss-slide-backgrounds")},n.prototype.initMainAnimation=function(){nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d&&this.parameters.bgAnimations?this.mainAnimation=new t.SmartSliderFrontendBackgroundAnimation(this,this.parameters.mainanimation,this.parameters.bgAnimations):this.mainAnimation=new t.SmartSliderMainAnimationSimple(this,this.parameters.mainanimation)},n.prototype.afterRawSlidesReady=function(){if(this.parameters.postBackgroundAnimations&&this.parameters.postBackgroundAnimations.slides){for(var e=0;e<this.slides.length;e++)this.slides[e].postBackgroundAnimation=this.parameters.postBackgroundAnimations.slides[e];delete this.parameters.postBackgroundAnimations.slides}if(this.parameters.bgAnimations&&this.parameters.bgAnimations.slides){for(var t=0;t<this.slides.length;t++)this.slides[t].backgroundAnimation=this.parameters.bgAnimations.slides[t];delete this.parameters.bgAnimations.slides}},n.prototype.findSlideBackground=function(e){var i=t.SmartSliderAbstract.prototype.findSlideBackground.call(this,e);return i.appendTo(this.sliderElement.find(".n2-ss-slide-backgrounds")),i},n});
1
+ N2Require("SmartSliderMainAnimationSimple",["SmartSliderMainAnimationAbstract"],[],function(e,t,i){function n(i,n){switch(this.postBackgroundAnimation=!1,this._currentBackgroundAnimation=!1,this.reverseSlideIndex=null,n=e.extend({delay:0,parallax:.45,type:"horizontal",shiftedBackgroundAnimation:"auto"},n),n.delay/=1e3,t.SmartSliderMainAnimationAbstract.prototype.constructor.apply(this,arguments),this.parameters.type){case"no":this.animation=this._mainAnimationNo,this.isNoAnimation=!0;break;case"fade":this.animation=this._mainAnimationFade;break;case"crossfade":this.animation=this._mainAnimationCrossFade;break;case"vertical":1==this.parameters.parallax?this.animation=this._mainAnimationVertical:this.animation=this._mainAnimationVerticalParallax;break;case"vertical-reversed":1==this.parameters.parallax?this.animation=this._mainAnimationVerticalReversed:this.animation=this._mainAnimationVerticalReversedParallax;break;case"horizontal-reversed":1==this.parameters.parallax?this.animation=this._mainAnimationHorizontalReversed:this.animation=this._mainAnimationHorizontalReversedParallax;break;default:1==this.parameters.parallax?this.animation=this._mainAnimationHorizontal:this.animation=this._mainAnimationHorizontalParallax}}return n.prototype=Object.create(t.SmartSliderMainAnimationAbstract.prototype),n.prototype.constructor=n,n.prototype.setToStarterSlide=function(e){this.setActiveSlide(e)},n.prototype.changeTo=function(e,i,n,a){this.postBackgroundAnimation&&this.postBackgroundAnimation.prepareToSwitchSlide(e,i),t.SmartSliderMainAnimationAbstract.prototype.changeTo.apply(this,arguments)},n.prototype.setActiveSlide=function(e){for(var t=0;t<this.slider.slides.length;t++)this.slider.slides[t]!=e&&this._hideSlide(this.slider.slides[t])},n.prototype._hideSlide=function(e){NextendTween.set(e.$element,{x:-1e5*nextend.rtl.modifier}),e.backgroundImage&&NextendTween.set(e.backgroundImage.element,{x:-1e5*nextend.rtl.modifier})},n.prototype._showSlide=function(e){NextendTween.set(e.$element.get(0),{x:0}),e.backgroundImage&&NextendTween.set(e.backgroundImage.element,{x:0})},n.prototype.cleanSlideIndex=function(e){this._hideSlide(this.slider.slides[e])},n.prototype.revertTo=function(e,i){this.slider.slides[i].$element.css("zIndex",""),this._hideSlide(this.slider.slides[i]),t.SmartSliderMainAnimationAbstract.prototype.revertTo.apply(this,arguments)},n.prototype._initAnimation=function(e,t,i){this.animation(e,t,i)},n.prototype.onBackwardChangeToComplete=function(e,t,i){this.reverseSlideIndex=null,this.onChangeToComplete(e,t,i)},n.prototype.onChangeToComplete=function(e,i,n){null!==this.reverseSlideIndex&&(this.slider.slides[this.reverseSlideIndex].triggerHandler("mainAnimationStartInCancel"),this.reverseSlideIndex=null),this._hideSlide(e),t.SmartSliderMainAnimationAbstract.prototype.onChangeToComplete.apply(this,arguments)},n.prototype.onReverseChangeToComplete=function(e,i,n){this._hideSlide(e),t.SmartSliderMainAnimationAbstract.prototype.onReverseChangeToComplete.apply(this,arguments)},n.prototype._mainAnimationNo=function(t,i){this._showSlide(i),this.slider.unsetActiveSlide(t),i.$element.css("opacity",0),i.backgroundImage&&i.backgroundImage.element.css("opacity",0),this.slider.setActiveSlide(i);var n=this.timeline.totalDuration(),a=this.getExtraDelay();this._currentBackgroundAnimation&&this.parameters.shiftedBackgroundAnimation&&this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup(),0==n&&(n=1e-5,a+=n),this.timeline.set(t.$element,{opacity:0},a),!this._currentBackgroundAnimation&&t.backgroundImage&&this.timeline.set(t.backgroundImage.element,{opacity:0},a),this.timeline.set(i.$element,{opacity:1},n),!this._currentBackgroundAnimation&&i.backgroundImage&&this.timeline.set(i.backgroundImage.element,{opacity:1},n),this.sliderElement.on("mainAnimationComplete.n2-simple-no",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-no");var a=this.slider.slides[i],r=this.slider.slides[n];a.$element.css("opacity",""),!this._currentBackgroundAnimation&&a.backgroundImage&&a.backgroundImage.element.css("opacity",""),r.$element.css("opacity",""),!this._currentBackgroundAnimation&&r.backgroundImage&&r.backgroundImage.element.css("opacity","")},this))},n.prototype._mainAnimationFade=function(t,i){t.$element.css("zIndex",23),t.backgroundImage&&t.backgroundImage.element.css("zIndex",23),i.$element.css("opacity",0),this._showSlide(i),this.slider.unsetActiveSlide(t),this.slider.setActiveSlide(i);var n=this.adjustMainAnimation();if(0!=this.parameters.shiftedBackgroundAnimation){var a=!1,r=!1;"auto"==this.parameters.shiftedBackgroundAnimation?t.hasLayers()?a=!0:r=!0:a=!0,this._currentBackgroundAnimation&&a?(this.timeline.shiftChildren(n.outDuration-n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):r&&(this.timeline.shiftChildren(n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}this.timeline.to(t.$element.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),!this._currentBackgroundAnimation&&t.backgroundImage&&this.timeline.to(t.backgroundImage.element,n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),this.timeline.to(i.$element.get(0),n.inDuration,{opacity:1,ease:this.getEase()},n.inDelay),!this._currentBackgroundAnimation&&i.backgroundImage&&i.backgroundImage.element.css("opacity",1),this.sliderElement.on("mainAnimationComplete.n2-simple-fade",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade");var a=this.slider.slides[i],r=this.slider.slides[n];a.$element.css({zIndex:"",opacity:""}),!this._currentBackgroundAnimation&&a.backgroundImage&&a.backgroundImage.element.css({zIndex:"",opacity:""}),r.$element.css("opacity",""),!this._currentBackgroundAnimation&&r.backgroundImage&&r.backgroundImage.element.css("opacity","")},this))},n.prototype._mainAnimationCrossFade=function(t,i){t.$element.css("zIndex",23),t.backgroundImage&&t.backgroundImage.element.css("zIndex",23),i.$element.css("opacity",0),i.backgroundImage&&i.backgroundImage.element.css("opacity",0),this._showSlide(i),this.slider.unsetActiveSlide(t),this.slider.setActiveSlide(i);var n=this.adjustMainAnimation();if(0!=this.parameters.shiftedBackgroundAnimation){var a=!1,r=!1;"auto"==this.parameters.shiftedBackgroundAnimation?t.hasLayers()?a=!0:r=!0:a=!0,this._currentBackgroundAnimation&&a?(this.timeline.shiftChildren(n.outDuration-n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):r&&(this.timeline.shiftChildren(n.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}this.timeline.to(t.$element.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),!this._currentBackgroundAnimation&&t.backgroundImage&&this.timeline.to(t.backgroundImage.element.get(0),n.outDuration,{opacity:0,ease:this.getEase()},n.outDelay),this.timeline.to(i.$element.get(0),n.inDuration,{opacity:1,ease:this.getEase()},n.inDelay),!this._currentBackgroundAnimation&&i.backgroundImage&&this.timeline.to(i.backgroundImage.element.get(0),n.inDuration,{opacity:1,ease:this.getEase()},n.inDelay),this.sliderElement.on("mainAnimationComplete.n2-simple-fade",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade");var a=this.slider.slides[i],r=this.slider.slides[n];a.$element.css({zIndex:"",opacity:""}),!this._currentBackgroundAnimation&&a.backgroundImage&&a.backgroundImage.element.css({zIndex:"",opacity:""}),r.$element.css("opacity",""),!this._currentBackgroundAnimation&&r.backgroundImage&&r.backgroundImage.element.css("opacity","")},this))},n.prototype._mainAnimationHorizontal=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",1,i)},n.prototype._mainAnimationVertical=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",1,i)},n.prototype._mainAnimationHorizontalParallax=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",this.parameters.parallax,i)},n.prototype._mainAnimationVerticalParallax=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",this.parameters.parallax,i)},n.prototype._mainAnimationHorizontalReversed=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",1,!i)},n.prototype._mainAnimationVerticalReversed=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",1,!i)},n.prototype._mainAnimationHorizontalReversedParallax=function(e,t,i){this.__mainAnimationDirection(e,t,"horizontal",this.parameters.parallax,!i)},n.prototype._mainAnimationVerticalReversedParallax=function(e,t,i){this._showSlide(t),this.__mainAnimationDirection(e,t,"vertical",this.parameters.parallax,!i)},n.prototype.__mainAnimationDirection=function(t,i,n,a,r){var s="",o=0,d=0,l="";"horizontal"==n?(s="x",l="width",d=o=this.slider.dimensions.slideouter.width,nextend.rtl.isRtl&&(r=!r)):"vertical"==n&&(s="y",l="height",d=o=this.slider.dimensions.slideouter.height),r&&(o*=-1);var m={},c={ease:this.getEase()},h={},u={ease:this.getEase()},p={ease:this.getEase()},g={ease:this.getEase()};if(1!=a)if(r)t.$element.css("zIndex",24),t.backgroundImage&&t.backgroundImage.element.css("zIndex",24),t.$element.addClass("n2-ss-parallax-clip"),c[l]=-o,u[l]=-o,o*=a,m[s]=o,m[l]=-o,h[s]=o,h[l]=-o,p[l]=-o,p[s]=d,g[s]=-o;else{t.$element.css("zIndex",24),t.backgroundImage&&t.backgroundImage.element.css("zIndex",24),o*=a;var A={};if(A[s]=o,NextendTween.set(i.$element,A),i.backgroundImage){var y={};y[s]=o,NextendTween.set(i.backgroundImage.element,y)}i.$element.addClass("n2-ss-parallax-clip"),m[s]=d,m[l]=o,c[l]=d,h[s]=o,p[l]=o,g[l]=o,p[s]=-o,g[s]=-o}else{var k={};if(k[s]=o,NextendTween.set(i.$element,k),i.backgroundImage){var f={};f[s]=o,NextendTween.set(i.backgroundImage.element,f)}m[s]=o+(/chrome/i.test(navigator.userAgent)?0>o?2:-2:0),h[s]=o+(/chrome/i.test(navigator.userAgent)?0>o?2:-2:0),p[s]=-o+(/chrome/i.test(navigator.userAgent)?0>o?-2:2:0),g[s]=-o+(/chrome/i.test(navigator.userAgent)?0>o?-2:2:0)}i.$element.css("zIndex",23),i.backgroundImage&&i.backgroundImage.element.css("zIndex",23),(r||1==a)&&(t.$element.css("zIndex",22),t.backgroundImage&&t.backgroundImage.element.css("zIndex",22)),this.slider.unsetActiveSlide(t),this.slider.setActiveSlide(i);var S=this.adjustMainAnimation();if(c[s]=0,u[s]=0,this.timeline.fromTo(i.$element.get(0),S.inDuration,m,c,S.inDelay),i.backgroundImage&&this.timeline.fromTo(i.backgroundImage.element,S.inDuration,h,u,S.inDelay),0!=this.parameters.shiftedBackgroundAnimation){var v=!1,b=!1;"auto"==this.parameters.shiftedBackgroundAnimation?t.hasLayers()?v=!0:b=!0:v=!0,this._currentBackgroundAnimation&&v?(this.timeline.shiftChildren(S.outDuration-S.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup()):b&&(this.timeline.shiftChildren(S.extraDelay),this._currentBackgroundAnimation.shiftedPreSetup&&this._currentBackgroundAnimation._preSetup())}if(this.timeline.to(t.$element.get(0),S.outDuration,p,S.outDelay),t.backgroundImage&&this.timeline.to(t.backgroundImage.element,S.outDuration,g,S.outDelay),this.isTouch&&this.isReverseAllowed&&1==a){var _=r?t.index+1:t.index-1;if(0>_?_=this.slider.parameters.carousel?this.slider.slides.length-1:t.index:_>=this.slider.slides.length&&(_=this.slider.parameters.carousel?0:t.index),_!=i.index){if(_!=t.index){this.reverseSlideIndex=_,this.enableReverseMode();var x=this.slider.slides[_];"vertical"==n&&this._showSlide(x),x.$element.css(s,o);var I={},B={ease:this.getEase()},D={},E={ease:this.getEase()};B[s]=0,I[s]=-o,E[s]=o,D[s]=0,x.$element.trigger("mainAnimationStartIn",[this,t.index,x.index,!1]),this.reverseTimeline.paused(!0),this.reverseTimeline.eventCallback("onComplete",this.onBackwardChangeToComplete,[t,x,!1],this),this.reverseTimeline.fromTo(x.$element.get(0),S.inDuration,I,B,S.inDelay),x.backgroundImage&&this.reverseTimeline.fromTo(x.backgroundImage.element,S.inDuration,I,B,S.inDelay),this.reverseTimeline.fromTo(t.$element.get(0),S.inDuration,D,E,S.inDelay),t.backgroundImage&&this.reverseTimeline.fromTo(t.backgroundImage.element,S.inDuration,D,E,S.inDelay)}}else this.reverseSlideIndex=null}this.sliderElement.on("mainAnimationComplete.n2-simple-fade",e.proxy(function(e,t,i,n){this.sliderElement.off("mainAnimationComplete.n2-simple-fade");var a=this.slider.slides[i],r=this.slider.slides[n];r.$element.css("zIndex","").css(s,"").removeClass("n2-ss-parallax-clip"),r.backgroundImage&&r.backgroundImage.element.css("zIndex","").css(s,""),a.$element.css("zIndex","").css(l,"").removeClass("n2-ss-parallax-clip"),a.backgroundImage&&a.backgroundImage.element.css("zIndex","").css(l,"")},this))},n.prototype.getExtraDelay=function(){return 0},n.prototype.adjustMainAnimation=function(){var e=this.parameters.duration,t=this.parameters.delay,i=this.timeline.totalDuration(),n=this.getExtraDelay();if(i>0){var a=e+t;if(!(a>i))return{inDuration:e,outDuration:e,inDelay:i-e,outDelay:n,extraDelay:n};e=e*i/a,t=t*i/a,n>t&&(e-=n-t,t=n)}else t+=n;return{inDuration:e,outDuration:e,inDelay:t,outDelay:t,extraDelay:n}},n.prototype.hasBackgroundAnimation=function(){return!1},n}),N2Require("SmartSliderFrontendBackgroundAnimation",["SmartSliderMainAnimationSimple"],[],function(e,t,i){function n(i,n,a){this._currentBackgroundAnimation=!1,t.SmartSliderMainAnimationSimple.prototype.constructor.call(this,i,n),this.isReverseAllowed=!1,this.bgAnimationElement=this.sliderElement.find(".n2-ss-background-animation"),this.slider.parameters.perspective>0&&NextendTween.set(this.bgAnimationElement,{perspective:this.slider.parameters.perspective}),this.backgroundAnimations=e.extend({global:0,speed:"normal"},a),this.backgroundImages=i.backgroundImages.getBackgroundImages(),i.backgroundImages.hack()}return n.prototype=Object.create(t.SmartSliderMainAnimationSimple.prototype),n.prototype.constructor=n,n.prototype.getBackgroundAnimation=function(e,t){if(t.hasBackgroundVideo()||e.hasBackgroundVideo())return!1;var i=this.backgroundAnimations.global,n=this.backgroundAnimations.speed;if(t.backgroundAnimation){var a=t.backgroundAnimation;i=a.animation,n=a.speed}return i?[i[Math.floor(Math.random()*i.length)],n]:!1},n.prototype._initAnimation=function(i,n,a){this._currentBackgroundAnimation=!1;var r=i.backgroundImage,s=n.backgroundImage;if(r&&s){var o=this.getBackgroundAnimation(i,n);if(o!==!1){var d=1;switch(o[1]){case"superSlow":d=3;break;case"slow":d=1.5;break;case"fast":d=.75;break;case"superFast":d=.5}return this._currentBackgroundAnimation=new t["SmartSliderBackgroundAnimation"+o[0].type](this,r.element,s.element,o[0],d,a),t.SmartSliderMainAnimationSimple.prototype._initAnimation.apply(this,arguments),this._currentBackgroundAnimation.postSetup(),void this.timeline.set(e("<div />"),{opacity:1,onComplete:e.proxy(function(){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.ended(),this._currentBackgroundAnimation=!1)},this)})}}t.SmartSliderMainAnimationSimple.prototype._initAnimation.apply(this,arguments)},n.prototype.onChangeToComplete=function(e,i){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.ended(),this._currentBackgroundAnimation=!1),t.SmartSliderMainAnimationSimple.prototype.onChangeToComplete.apply(this,arguments)},n.prototype.onReverseChangeToComplete=function(e,i,n){this._currentBackgroundAnimation&&(this._currentBackgroundAnimation.revertEnded(),this._currentBackgroundAnimation=!1),t.SmartSliderMainAnimationSimple.prototype.onReverseChangeToComplete.apply(this,arguments)},n.prototype.getExtraDelay=function(){return this._currentBackgroundAnimation?this._currentBackgroundAnimation.getExtraDelay():0},n.prototype.hasBackgroundAnimation=function(){return this._currentBackgroundAnimation},n}),N2Require("SmartSliderResponsiveSimple",["SmartSliderResponsive"],[],function(e,t,i){function n(){this.round=1,t.SmartSliderResponsive.prototype.constructor.apply(this,arguments)}return n.prototype=Object.create(t.SmartSliderResponsive.prototype),n.prototype.constructor=n,n.prototype.init=function(){this.sliderElement.find(".n2-ss-section-main-content").length&&(this.updateVerticalRatios=this._updateVerticalRatios),this._sliderHorizontal=this.addHorizontalElement(this.sliderElement,["width","marginLeft","marginRight"],"w","slider"),this.addHorizontalElement(this.sliderElement.find(".n2-ss-slider-1"),["width","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],"w"),this._sliderVertical=this.addVerticalElement(this.sliderElement,["marginTop","marginBottom"],"h"),this.addHorizontalElement(this.sliderElement,["fontSize"],"fontRatio","slider"),this.addVerticalElement(this.sliderElement.find(".n2-ss-slider-1"),["height","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],"h","slider"),this.addHorizontalElement(this.sliderElement.find(".n2-ss-slide"),["width"],"w","slideouter"),this.addVerticalElement(this.sliderElement.find(".n2-ss-slide"),["height"],"h","slideouter");var t=this.sliderElement.find(".n2-ss-layers-container");this.addHorizontalElement(t,["width"],"slideW","slide"),this.addVerticalElement(t,["height"],"slideH","slide").setCentered();for(var i=this.slider.parameters.mainanimation.parallax,n=this.slider.backgroundImages.getBackgroundImages(),a=0;a<n.length;a++)1!=i&&(this.addHorizontalElement(n[a].element,["width"],"w"),this.addVerticalElement(n[a].element,["height"],"h"),this.addHorizontalElement(n[a].$mask,["width"],"w"),this.addVerticalElement(n[a].$mask,["height"],"h"));var r=this.sliderElement.find(".n2-ss-slider-background-video");if(r.length){var s=!/Mobi/.test(navigator.userAgent)||"playsInline"in document.createElement("video")||"webkit-playsinline"in document.createElement("video")||navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)&&parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2])>=53;s?r[0].videoWidth>0?this.videoPlayerReady(r):(r[0].addEventListener("error",e.proxy(this.videoPlayerError,this,r),!0),r[0].addEventListener("canplay",e.proxy(this.videoPlayerReady,this,r))):this.videoPlayerError(r)}},n.prototype.videoPlayerError=function(e){e.remove()},n.prototype.videoPlayerReady=function(t){t.data("ratio",t[0].videoWidth/t[0].videoHeight),t.addClass("n2-active"),this.slider.ready(e.proxy(function(){this.slider.sliderElement.on("SliderResize",e.proxy(this.resizeVideo,this,t)),this.resizeVideo(t)},this))},n.prototype.resizeVideo=function(e){var t=e.data("mode"),i=e.data("ratio"),n=this.slider.dimensions.slideouter||this.slider.dimensions.slide,a=n.width/n.height;"fill"==t?a>i?e.css({width:"100%",height:"auto"}):e.css({width:"auto",height:"100%"}):"fit"==t&&(i>a?e.css({width:"100%",height:"auto"}):e.css({width:"auto",height:"100%"})),e.css("marginTop",0).css(nextend.rtl.marginLeft,0),this.center(e)},n.prototype.center=function(e){var t=e.parent();e.css({marginTop:parseInt((t.height()-e.height())/2)}),e.css(nextend.rtl.marginLeft,parseInt((t.width()-e.width())/2))},n}),N2Require("SmartSliderSimple",["SmartSliderAbstract"],[],function(e,t,i){function n(i,n){this.type="simple",t.SmartSliderAbstract.prototype.constructor.call(this,i,e.extend({bgAnimations:0,carousel:1},n))}return n.prototype=Object.create(t.SmartSliderAbstract.prototype),n.prototype.constructor=n,n.prototype.initResponsiveMode=function(){this.responsive=new t.SmartSliderResponsiveSimple(this,this.parameters.responsive),this.responsive.start(),t.SmartSliderAbstract.prototype.initResponsiveMode.call(this),this.$backgroundsContainer=this.sliderElement.find(".n2-ss-slide-backgrounds")},n.prototype.initMainAnimation=function(){nModernizr.csstransforms3d&&nModernizr.csstransformspreserve3d&&this.parameters.bgAnimations?this.mainAnimation=new t.SmartSliderFrontendBackgroundAnimation(this,this.parameters.mainanimation,this.parameters.bgAnimations):this.mainAnimation=new t.SmartSliderMainAnimationSimple(this,this.parameters.mainanimation)},n.prototype.afterRawSlidesReady=function(){if(this.parameters.postBackgroundAnimations&&this.parameters.postBackgroundAnimations.slides){for(var e=0;e<this.slides.length;e++)this.slides[e].postBackgroundAnimation=this.parameters.postBackgroundAnimations.slides[e];delete this.parameters.postBackgroundAnimations.slides}if(this.parameters.bgAnimations&&this.parameters.bgAnimations.slides){for(var t=0;t<this.slides.length;t++)this.slides[t].backgroundAnimation=this.parameters.bgAnimations.slides[t];delete this.parameters.bgAnimations.slides}},n.prototype.findSlideBackground=function(e){var i=t.SmartSliderAbstract.prototype.findSlideBackground.call(this,e);return i.appendTo(this.sliderElement.find(".n2-ss-slide-backgrounds")),i},n});
library/smartslider/backend/controllers/ajax/Slider.php CHANGED
@@ -98,9 +98,12 @@ class N2SmartsliderBackendSliderControllerAjax extends N2SmartSliderControllerAj
98
 
99
  $slider = $slidersModel->get(N2Request::getInt('sliderid'));
100
  $this->validateDatabase($slider);
101
- if ($sliderid = $slidersModel->save($slider['id'], N2Request::getVar('slider'))) {
 
 
 
102
  N2Message::success(n2_('Slider saved.'));
103
- $this->response->respond();
104
  }
105
  }
106
 
98
 
99
  $slider = $slidersModel->get(N2Request::getInt('sliderid'));
100
  $this->validateDatabase($slider);
101
+
102
+ $responseData = $slidersModel->save($slider['id'], N2Request::getVar('slider'));
103
+
104
+ if ($responseData !== false) {
105
  N2Message::success(n2_('Slider saved.'));
106
+ $this->response->respond($responseData);
107
  }
108
  }
109
 
library/smartslider/backend/inline/embedslidermanager.phtml CHANGED
@@ -27,12 +27,17 @@ $router = N2Base::getApplication('smartslider')
27
  'class' => 'n2-button n2-button-l n2-button-grey n2-radius-s n2-uc n2-h3'
28
  )));
29
 
 
 
 
 
 
 
 
 
30
 
31
  if ($mode == 'embed') {
32
- echo N2Html::tag('div', array(
33
- 'class' => 'n2-box n2-box-full n2-box-insert-group n2-h3 n2-uc',
34
- 'onclick' => 'window.parent.postMessage("' . $groupID . '", "*");',
35
- ), N2Html::link(n2_('Insert group'), '#', array(
36
  'class' => 'n2-button n2-button-l n2-button-green n2-radius-s n2-uc n2-h3'
37
  )));
38
  }
27
  'class' => 'n2-button n2-button-l n2-button-grey n2-radius-s n2-uc n2-h3'
28
  )));
29
 
30
+ $attributes = array(
31
+ 'class' => 'n2-box n2-box-full n2-box-insert-group n2-h3 n2-uc'
32
+ );
33
+ if(empty($group['alias'])){
34
+ $attributes['onclick'] = 'window.parent.postMessage(JSON.stringify({"action":"ss3embed","mode":"id","id":' . json_encode($group['id']) . '}), "*");';
35
+ } else {
36
+ $attributes['onclick'] = 'window.parent.postMessage(JSON.stringify({"action":"ss3embed","mode":"alias","alias":' . json_encode($group['alias']) . '}), "*");';
37
+ }
38
 
39
  if ($mode == 'embed') {
40
+ echo N2Html::tag('div', $attributes, N2Html::link(n2_('Insert group'), '#', array(
 
 
 
41
  'class' => 'n2-button n2-button-l n2-button-green n2-radius-s n2-uc n2-h3'
42
  )));
43
  }
library/smartslider/backend/inline/slidermanager.phtml CHANGED
@@ -120,10 +120,11 @@ $router = N2Base::getApplication('smartslider')
120
  echo N2Html::tag('div', array('class' => 'n2-box n2-box-full n2-box-template-library n2-h3 n2-uc'), N2Html::link(n2_('Template library'), '#', array(
121
  'class' => 'n2-ss-add-sample-slider n2-button n2-button-l n2-button-blue n2-radius-s n2-uc n2-h3'
122
  )));
123
- if (count($sliders) > 2 && !N2Base::getApplication('smartslider')->storage->get('free', 'review')) {
124
- include dirname(__FILE__) . '/review.phtml';
125
  }
126
 
 
127
 
128
  $parameters = array();
129
  if (N2Platform::$isWordpress) {
120
  echo N2Html::tag('div', array('class' => 'n2-box n2-box-full n2-box-template-library n2-h3 n2-uc'), N2Html::link(n2_('Template library'), '#', array(
121
  'class' => 'n2-ss-add-sample-slider n2-button n2-button-l n2-button-blue n2-radius-s n2-uc n2-h3'
122
  )));
123
+ if ( count( $sliders ) > 2 && ! N2Base::getApplication( 'smartslider' )->storage->get( 'free', 'review' ) ) {
124
+ include dirname( __FILE__ ) . '/review.phtml';
125
  }
126
 
127
+
128
 
129
  $parameters = array();
130
  if (N2Platform::$isWordpress) {
library/smartslider/backend/views/generator/_view.php CHANGED
@@ -103,7 +103,7 @@ class N2SmartsliderBackendGeneratorView extends N2ViewBase {
103
  "content" => N2Html::tag('div', array(
104
  'class' => 'n2-button-menu'
105
  ), N2Html::tag('div', array(
106
- 'class' => 'n2-button-menu-inner n2-border-radius'
107
  ), implode('', $actions)))
108
  ));
109
  $buttonMenu = ob_get_clean();
103
  "content" => N2Html::tag('div', array(
104
  'class' => 'n2-button-menu'
105
  ), N2Html::tag('div', array(
106
+ 'class' => 'n2-button-menu-inner n2-border-radius webkit-scroll-fix'
107
  ), implode('', $actions)))
108
  ));
109
  $buttonMenu = ob_get_clean();
library/smartslider/backend/views/slider/_slider_edit.phtml CHANGED
@@ -92,12 +92,31 @@ $this->renderInline("tutorial-free");
92
  url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
93
  data: $('#smartslider-form').serialize(),
94
  dataType: 'json'
95
- }).done(function () {
96
  var heading = $('.n2-heading-bar .n2-heading');
97
  $('.n2-heading-bar .n2-heading').html($('#slidertitle').val() + '<span>' + heading.find('span').html() + '</span>');
98
  $('dt.n2-ss-slide2-list > a > span').eq(0).html($('#slidertitle').val());
99
  nextend.askToSave = true;
100
  n2('#smartslider-form').trigger('saved');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  });
102
  }
103
  });
92
  url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
93
  data: $('#smartslider-form').serialize(),
94
  dataType: 'json'
95
+ }).done(function (response) {
96
  var heading = $('.n2-heading-bar .n2-heading');
97
  $('.n2-heading-bar .n2-heading').html($('#slidertitle').val() + '<span>' + heading.find('span').html() + '</span>');
98
  $('dt.n2-ss-slide2-list > a > span').eq(0).html($('#slidertitle').val());
99
  nextend.askToSave = true;
100
  n2('#smartslider-form').trigger('saved');
101
+
102
+ if(response && response.data && response.data.changedFields){
103
+ for(var k in response.data.changedFields){
104
+ $('#'+k).val(response.data.changedFields[k]);
105
+ }
106
+ if(typeof response.data.changedFields['slideralias'] !== 'undefined'){
107
+ var newAlias = response.data.changedFields[k],
108
+ $aliasCode = $('.n2-ss-slider-shortcode-alias');
109
+ if(!$aliasCode.length){
110
+ $aliasCode = $('<div class="n2-code n2-ss-slider-shortcode-alias" onclick="return selectText(this);"></div>').appendTo($('.n2-ss-slider-shortcode-id').parent());
111
+ }
112
+
113
+ if(newAlias){
114
+ $aliasCode.html('[smartslider3 alias="'+newAlias+'"]');
115
+ }else{
116
+ $aliasCode.remove();
117
+ }
118
+ }
119
+ }
120
  });
121
  }
122
  });
library/smartslider/backend/views/slider/group.phtml CHANGED
@@ -80,11 +80,30 @@ $this->widget->init('heading', array(
80
  url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
81
  data: $('#smartslider-form').serialize(),
82
  dataType: 'json'
83
- }).done(function () {
84
  $('.n2-heading-bar .n2-heading').html($('#slidertitle').val());
85
  $('dt.n2-ss-slide2-list > a > span').eq(0).html($('#slidertitle').val());
86
  nextend.askToSave = true;
87
  n2('#smartslider-form').trigger('saved');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  });
89
  }
90
  });
80
  url: NextendAjaxHelper.makeAjaxUrl(window.location.href),
81
  data: $('#smartslider-form').serialize(),
82
  dataType: 'json'
83
+ }).done(function (response) {
84
  $('.n2-heading-bar .n2-heading').html($('#slidertitle').val());
85
  $('dt.n2-ss-slide2-list > a > span').eq(0).html($('#slidertitle').val());
86
  nextend.askToSave = true;
87
  n2('#smartslider-form').trigger('saved');
88
+
89
+ if(response && response.data && response.data.changedFields){
90
+ for(var k in response.data.changedFields){
91
+ $('#'+k).val(response.data.changedFields[k]);
92
+ }
93
+ if(typeof response.data.changedFields['slideralias'] !== 'undefined'){
94
+ var newAlias = response.data.changedFields[k],
95
+ $aliasCode = $('.n2-ss-slider-shortcode-alias');
96
+ if(!$aliasCode.length){
97
+ $aliasCode = $('<div class="n2-code n2-ss-slider-shortcode-alias" onclick="return selectText(this);"></div>').appendTo($('.n2-ss-slider-shortcode-id').parent());
98
+ }
99
+
100
+ if(newAlias){
101
+ $aliasCode.html('[smartslider3 alias="'+newAlias+'"]');
102
+ }else{
103
+ $aliasCode.remove();
104
+ }
105
+ }
106
+ }
107
  });
108
  }
109
  });
library/smartslider/backend/views/sliders/embed.phtml CHANGED
@@ -7,6 +7,7 @@
7
  //$this->widget->init('topbar', array('expert' => false));
8
 
9
  $groupID = N2Request::getInt('groupID', 0);
 
10
 
11
  if ($groupID > 0) {
12
  $slidersModel = new N2SmartsliderSlidersModel();
@@ -21,6 +22,7 @@ if ($groupID > 0) {
21
  <?php
22
  $this->renderInline("embedslidermanager", array(
23
  'groupID' => $groupID,
 
24
  'mode' => $mode
25
  ));
26
  ?>
7
  //$this->widget->init('topbar', array('expert' => false));
8
 
9
  $groupID = N2Request::getInt('groupID', 0);
10
+ $group = false;
11
 
12
  if ($groupID > 0) {
13
  $slidersModel = new N2SmartsliderSlidersModel();
22
  <?php
23
  $this->renderInline("embedslidermanager", array(
24
  'groupID' => $groupID,
25
+ 'group' => $group,
26
  'mode' => $mode
27
  ));
28
  ?>
library/smartslider/frontend/controllers/prerender/Slider.php CHANGED
@@ -16,8 +16,9 @@ class N2SmartSliderFrontendSliderPreRenderController extends N2Controller {
16
 
17
  public function actionIframe() {
18
 
19
- $sliderID = isset($_GET['sliderid']) ? intval($_GET['sliderid']) : false;
20
- if (!$sliderID) throw new Exception('Slider ID is not valid.');
 
21
  N2CSS::addStaticGroup(N2LIBRARYASSETS . '/normalize.min.css', 'normalize');
22
 
23
 
@@ -25,7 +26,7 @@ class N2SmartSliderFrontendSliderPreRenderController extends N2Controller {
25
  $locale = setlocale(LC_NUMERIC, 0);
26
  setlocale(LC_NUMERIC, "C");
27
 
28
- $sliderManager = new N2SmartSliderManager($sliderID);
29
  $slider = $sliderManager->render(true);
30
 
31
  setlocale(LC_NUMERIC, $locale);
16
 
17
  public function actionIframe() {
18
 
19
+ $sliderIDorAlias = isset($_GET['sliderid']) ? $_GET['sliderid'] : false;
20
+
21
+ if (empty($sliderIDorAlias)) throw new Exception('Slider ID or alias is not valid.');
22
  N2CSS::addStaticGroup(N2LIBRARYASSETS . '/normalize.min.css', 'normalize');
23
 
24
 
26
  $locale = setlocale(LC_NUMERIC, 0);
27
  setlocale(LC_NUMERIC, "C");
28
 
29
+ $sliderManager = new N2SmartSliderManager($sliderIDorAlias);
30
  $slider = $sliderManager->render(true);
31
 
32
  setlocale(LC_NUMERIC, $locale);
library/smartslider/languages/de_DE.mo CHANGED
Binary file
library/smartslider/libraries/export.php CHANGED
@@ -165,7 +165,7 @@ class N2SmartSliderExport {
165
  echo $zip->file();
166
  n2_exit(true);
167
  } else {
168
- $file = preg_replace('/[^a-zA-Z0-9_-]/', '', $this->backup->slider['title']) . '.ss3';
169
  $folder = N2Platform::getPublicDir();
170
  $folder .= '/export/';
171
  if (!N2Filesystem::existsFolder($folder)) {
165
  echo $zip->file();
166
  n2_exit(true);
167
  } else {
168
+ $file = $this->sliderId . '-' . preg_replace('/[^a-zA-Z0-9_-]/', '', $this->backup->slider['title']) . '.ss3';
169
  $folder = N2Platform::getPublicDir();
170
  $folder .= '/export/';
171
  if (!N2Filesystem::existsFolder($folder)) {
library/smartslider/libraries/import.php CHANGED
@@ -25,6 +25,10 @@ class N2SmartSliderImport {
25
  if (!is_writable($folder)) {
26
  $folder = N2Filesystem::getNotWebCachePath();
27
  }
 
 
 
 
28
  $tmp = tempnam($folder, 'ss3');
29
  file_put_contents($tmp, $filePathOrData);
30
  $filePathOrData = $tmp;
25
  if (!is_writable($folder)) {
26
  $folder = N2Filesystem::getNotWebCachePath();
27
  }
28
+ if (!is_writable($folder)){
29
+ N2Message::error(sprintf(n2_('Slider can\'t be imported. The destination folder ( %s ) is not writable. Contact your host to fix the permission issue.'), $folder));
30
+ return false;
31
+ }
32
  $tmp = tempnam($folder, 'ss3');
33
  file_put_contents($tmp, $filePathOrData);
34
  $filePathOrData = $tmp;
library/smartslider/libraries/slider/abstract.php CHANGED
@@ -134,8 +134,6 @@ abstract class N2SmartSliderAbstract {
134
 
135
  abstract public function parseSlider($slider);
136
 
137
- abstract public function addCMSFunctions($slider);
138
-
139
  public function loadSliderParams() {
140
 
141
  $slidersModel = new N2SmartsliderSlidersModel();
@@ -341,19 +339,20 @@ abstract class N2SmartSliderAbstract {
341
  }
342
 
343
  public function canDisplayOnCurrentDevice() {
344
- $this->getSliderFromDB();
345
- N2Loader::import('libraries.mobiledetect');
346
 
347
- if (N2MobileDetect::$current['isMobile'] && $this->params->get('mobile', '1') == '0') {
348
- return false;
349
- }
350
 
351
- if (N2MobileDetect::$current['isTablet'] && $this->params->get('tablet', '1') == '0') {
352
- return false;
353
- }
354
 
355
- if (N2MobileDetect::$current['isDesktop'] && $this->params->get('desktop', '1') == '0') {
356
- return false;
 
357
  }
358
 
359
  return true;
134
 
135
  abstract public function parseSlider($slider);
136
 
 
 
137
  public function loadSliderParams() {
138
 
139
  $slidersModel = new N2SmartsliderSlidersModel();
339
  }
340
 
341
  public function canDisplayOnCurrentDevice() {
342
+ if($this->getSliderFromDB()) {
343
+ N2Loader::import( 'libraries.mobiledetect' );
344
 
345
+ if ( N2MobileDetect::$current['isMobile'] && $this->params->get( 'mobile', '1' ) == '0' ) {
346
+ return false;
347
+ }
348
 
349
+ if ( N2MobileDetect::$current['isTablet'] && $this->params->get( 'tablet', '1' ) == '0' ) {
350
+ return false;
351
+ }
352
 
353
+ if ( N2MobileDetect::$current['isDesktop'] && $this->params->get( 'desktop', '1' ) == '0' ) {
354
+ return false;
355
+ }
356
  }
357
 
358
  return true;
library/smartslider/libraries/slider/features/fadeonload.php CHANGED
@@ -48,7 +48,7 @@ class N2SmartSliderFeatureFadeOnLoad {
48
  if (!$this->slider->isAdmin && $this->fadeOnLoad && ($this->slider->features->responsive->scaleDown || $this->slider->features->responsive->scaleUp)) {
49
 
50
  if (N2SystemHelper::testMemoryLimit()) {
51
- if ($sizes['width'] + $sizes['marginHorizontal'] > 0 && $sizes['height'] > 0 && function_exists('imagecreatetruecolor')) {
52
  return N2Html::tag("div", array(
53
  "id" => $this->slider->elementId . "-placeholder",
54
  "encode" => false,
48
  if (!$this->slider->isAdmin && $this->fadeOnLoad && ($this->slider->features->responsive->scaleDown || $this->slider->features->responsive->scaleUp)) {
49
 
50
  if (N2SystemHelper::testMemoryLimit()) {
51
+ if ($sizes['width'] + $sizes['marginHorizontal'] > 0 && $sizes['height'] > 0) {
52
  return N2Html::tag("div", array(
53
  "id" => $this->slider->elementId . "-placeholder",
54
  "encode" => false,
library/smartslider/libraries/slider/features/features.php CHANGED
@@ -90,40 +90,7 @@ class N2SmartSliderFeatures {
90
  $this->layerMode = new N2SmartSliderFeatureLayerMode($slider);
91
  $this->slideBackground = new N2SmartSliderFeatureSlideBackground($slider);
92
  $this->loadSpinner = new N2SmartSliderFeatureSpinner($slider);
93
- $this->removeSpaces();
94
  }
95
-
96
- public function removeSpaces(){
97
- $id = 'jQuery("#' . $this->slider->elementId . '-align")';
98
- $parentlist = preg_replace('/\s+/', '', $this->slider->params->get('remove-spaces-from-parents', ''));
99
- $js = '';
100
- if(!empty($parentlist)){
101
- $parents = array_map('intval', explode(',', $parentlist));
102
- $js .= '(function(){';
103
- foreach($parents AS $parent){
104
- $js .= $id;
105
- for($i = 0; $i < $parent; $i++){
106
- $js .= '.parent()';
107
- }
108
- $js .= '.css({padding:0, margin:0});';
109
- }
110
- }
111
- $siblinglist = preg_replace('/\s+/', '', $this->slider->params->get('hide-siblings', ''));
112
- if(!empty($siblinglist)){
113
- $siblings = array_map('intval', explode(',', $siblinglist));
114
- if(empty($js)){
115
- $js .= '(function(){';
116
- }
117
- foreach($siblings AS $sibling){
118
- $sibling = $sibling - 1;
119
- $js .= $id . '.siblings().eq(' . $sibling . ').hide(0);';
120
- }
121
- }
122
- if(!empty($js)){
123
- $js .= '})();';
124
- N2JS::addInline($js);
125
- }
126
- }
127
 
128
  public function generateJSProperties() {
129
 
90
  $this->layerMode = new N2SmartSliderFeatureLayerMode($slider);
91
  $this->slideBackground = new N2SmartSliderFeatureSlideBackground($slider);
92
  $this->loadSpinner = new N2SmartSliderFeatureSpinner($slider);
 
93
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
 
95
  public function generateJSProperties() {
96
 
library/smartslider/libraries/slider/features/layermode.php CHANGED
@@ -47,16 +47,5 @@ class N2SmartSliderFeatureLayerMode {
47
  'mode' => $this->mode,
48
  'inAnimation' => $this->inAnimation
49
  );
50
-
51
- $properties['parallax'] = array(
52
- 'enabled' => intval($params->get('parallax-enabled', 1)),
53
- 'mobile' => intval($params->get('parallax-enabled-mobile', 0)),
54
- 'is3D' => intval($params->get('parallax-3d', 0)),
55
- 'animate' => intval($params->get('parallax-animate', 1)),
56
- 'horizontal' => $params->get('parallax-horizontal', 'mouse'),
57
- 'vertical' => $params->get('parallax-vertical', 'mouse'),
58
- 'origin' => $params->get('parallax-mouse-origin', 'slider'),
59
- 'scrollmove' => $params->get('parallax-scroll-move', 'both')
60
- );
61
  }
62
  }
47
  'mode' => $this->mode,
48
  'inAnimation' => $this->inAnimation
49
  );
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
  }
library/smartslider/libraries/slider/features/responsive.php CHANGED
@@ -429,10 +429,6 @@ class N2SmartSliderFeatureResponsive {
429
  'sliderWidthToDevice' => $this->sliderWidthToDevice,
430
 
431
  'basedOn' => $this->basedOn,
432
- 'tabletPortraitScreenWidth' => $this->tabletPortraitScreenWidth,
433
- 'mobilePortraitScreenWidth' => $this->mobilePortraitScreenWidth,
434
- 'tabletLandscapeScreenWidth' => $this->tabletLandscapeScreenWidth,
435
- 'mobileLandscapeScreenWidth' => $this->mobileLandscapeScreenWidth,
436
  'orientationMode' => $this->orientationMode,
437
 
438
  'scrollFix' => intval($this->slider->params->get('scroll-fix', 0)),
429
  'sliderWidthToDevice' => $this->sliderWidthToDevice,
430
 
431
  'basedOn' => $this->basedOn,
 
 
 
 
432
  'orientationMode' => $this->orientationMode,
433
 
434
  'scrollFix' => intval($this->slider->params->get('scroll-fix', 0)),
library/smartslider/libraries/slider/features/slidebackground.php CHANGED
@@ -39,7 +39,13 @@ class N2SmartSliderFeatureSlideBackground {
39
 
40
  private function getBackgroundStyle($slide) {
41
  $style = '';
42
- $color = $slide->parameters->get('backgroundColor', '');
 
 
 
 
 
 
43
  $gradient = $slide->parameters->get('backgroundGradient', 'off');
44
 
45
  if (!class_exists('N2Color')) {
@@ -47,7 +53,13 @@ class N2SmartSliderFeatureSlideBackground {
47
  }
48
 
49
  if ($gradient != 'off') {
50
- $colorEnd = $slide->parameters->get('backgroundColorEnd', 'ffffff00');
 
 
 
 
 
 
51
  switch ($gradient) {
52
  case 'horizontal':
53
  $style .= 'background:#' . substr($color, 0, 6) . ';';
39
 
40
  private function getBackgroundStyle($slide) {
41
  $style = '';
42
+ $color = $slide->fill($slide->parameters->get('backgroundColor', ''));
43
+ if(strlen($color) > 0 && $color[0] == '#'){
44
+ $color = substr($color, 1);
45
+ if(strlen($color) == 6){
46
+ $color .= 'ff';
47
+ }
48
+ }
49
  $gradient = $slide->parameters->get('backgroundGradient', 'off');
50
 
51
  if (!class_exists('N2Color')) {
53
  }
54
 
55
  if ($gradient != 'off') {
56
+ $colorEnd = $slide->fill($slide->parameters->get('backgroundColorEnd', 'ffffff00'));
57
+ if(strlen($colorEnd) > 0 && $colorEnd[0] == '#'){
58
+ $colorEnd = substr($colorEnd, 1);
59
+ if(strlen($colorEnd) == 6){
60
+ $colorEnd .= 'ff';
61
+ }
62
+ }
63
  switch ($gradient) {
64
  case 'horizontal':
65
  $style .= 'background:#' . substr($color, 0, 6) . ';';
library/smartslider/libraries/slider/manager.php CHANGED
@@ -2,23 +2,40 @@
2
 
3
  class N2SmartSliderManager {
4
 
 
 
5
  protected $usage = 'Unknown';
6
 
7
  public $slider;
8
 
9
  public $nextCacheRefresh;
10
 
11
- public function __construct($sliderId, $backend = false, $parameters = array()) {
12
-
13
- if ($backend) {
14
- N2Loader::import("libraries.slider.backend", "smartslider");
15
- $this->slider = new N2SmartSliderBackend($sliderId, $parameters);
16
- } else {
17
- N2Loader::import("libraries.slider.abstract", "smartslider");
18
- $this->slider = new N2SmartSlider($sliderId, $parameters);
19
- }
20
-
21
- N2AssetsManager::addCachedGroup($this->slider->cacheId);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  }
23
 
24
  public function setUsage($usage) {
@@ -30,6 +47,9 @@ class N2SmartSliderManager {
30
  }
31
 
32
  public function render($cache = false) {
 
 
 
33
 
34
  if (!N2Platform::$isAdmin && N2SmartSliderSettings::get('serversidemobiledetect', '0') == '1') {
35
  if (!$this->slider->canDisplayOnCurrentDevice()) {
@@ -41,7 +61,7 @@ class N2SmartSliderManager {
41
  }
42
  N2Loader::import("libraries.slider.cache.slider", "smartslider");
43
 
44
- return $this->slider->addCMSFunctions($this->cacheSlider());
45
  }
46
 
47
  private function cacheSlider() {
2
 
3
  class N2SmartSliderManager {
4
 
5
+ private $hasError = false;
6
+
7
  protected $usage = 'Unknown';
8
 
9
  public $slider;
10
 
11
  public $nextCacheRefresh;
12
 
13
+ public function __construct($sliderIDorAlias, $backend = false, $parameters = array()) {
14
+ $sliderID = false;
15
+
16
+ if(!is_numeric($sliderIDorAlias)){
17
+ $model = new N2SmartsliderSlidersModel();
18
+ $slider = $model->getByAlias($sliderIDorAlias);
19
+ if($slider){
20
+ $sliderID = intval($slider['id']);
21
+ }
22
+ } else {
23
+ $sliderID = intval($sliderIDorAlias);
24
+ }
25
+
26
+ if($sliderID) {
27
+ if ( $backend ) {
28
+ N2Loader::import( "libraries.slider.backend", "smartslider" );
29
+ $this->slider = new N2SmartSliderBackend( $sliderID, $parameters );
30
+ } else {
31
+ N2Loader::import( "libraries.slider.abstract", "smartslider" );
32
+ $this->slider = new N2SmartSlider( $sliderID, $parameters );
33
+ }
34
+
35
+ N2AssetsManager::addCachedGroup( $this->slider->cacheId );
36
+ } else{
37
+ $this->hasError = true;
38
+ }
39
  }
40
 
41
  public function setUsage($usage) {
47
  }
48
 
49
  public function render($cache = false) {
50
+ if($this->hasError){
51
+ return '';
52
+ }
53
 
54
  if (!N2Platform::$isAdmin && N2SmartSliderSettings::get('serversidemobiledetect', '0') == '1') {
55
  if (!$this->slider->canDisplayOnCurrentDevice()) {
61
  }
62
  N2Loader::import("libraries.slider.cache.slider", "smartslider");
63
 
64
+ return N2SmartSlider::addCMSFunctions($this->cacheSlider());
65
  }
66
 
67
  private function cacheSlider() {
library/smartslider/libraries/slider/slides/slide.php CHANGED
@@ -35,7 +35,7 @@ class N2SmartSliderSlide {
35
 
36
  public $index = -1;
37
 
38
- public $attributes = array(), $containerAttributes = array(
39
  'class' => 'n2-ss-layers-container n2-ow',
40
  'data-csstextalign' => 'center',
41
  'style' => ''
@@ -187,25 +187,28 @@ class N2SmartSliderSlide {
187
 
188
  $url = N2ImageHelper::fixed($url);
189
 
190
- $this->containerAttributes['onclick'] = '';
191
  if (strpos($url, 'javascript:') === 0) {
192
- $this->containerAttributes['onclick'] = $url;
193
  } else {
194
 
195
  N2Loader::import('libraries.link.link');
196
- $url = N2LinkParser::parse($url, $this->containerAttributes);
197
 
198
- $this->containerAttributes['data-href'] = (N2Platform::$isJoomla ? JRoute::_($url, false) : $url);
199
- if (empty($this->containerAttributes['onclick'])) {
200
  if ($target == '_blank') {
201
- $this->containerAttributes['data-n2click'] = "window.open(this.getAttribute('data-href'),'_blank');";
202
  } else {
203
- $this->containerAttributes['data-n2click'] = "window.location=this.getAttribute('data-href')";
204
  }
205
- $this->containerAttributes['data-n2middleclick'] = "window.open(this.getAttribute('data-href'),'_blank');";
206
  }
207
  }
208
- $this->containerAttributes['style'] .= 'cursor:pointer;';
 
 
 
209
  $this->hasLink = true;
210
  }
211
  }
35
 
36
  public $index = -1;
37
 
38
+ public $attributes = array(), $linkAttributes = array(), $containerAttributes = array(
39
  'class' => 'n2-ss-layers-container n2-ow',
40
  'data-csstextalign' => 'center',
41
  'style' => ''
187
 
188
  $url = N2ImageHelper::fixed($url);
189
 
190
+ $this->linkAttributes['onclick'] = '';
191
  if (strpos($url, 'javascript:') === 0) {
192
+ $this->linkAttributes['onclick'] = $url;
193
  } else {
194
 
195
  N2Loader::import('libraries.link.link');
196
+ $url = N2LinkParser::parse($url, $this->linkAttributes);
197
 
198
+ $this->linkAttributes['data-href'] = (N2Platform::$isJoomla ? JRoute::_($url, false) : $url);
199
+ if (empty($this->linkAttributes['onclick'])) {
200
  if ($target == '_blank') {
201
+ $this->linkAttributes['data-n2click'] = "window.open(this.getAttribute('data-href'),'_blank');";
202
  } else {
203
+ $this->linkAttributes['data-n2click'] = "window.location=this.getAttribute('data-href')";
204
  }
205
+ $this->linkAttributes['data-n2middleclick'] = "window.open(this.getAttribute('data-href'),'_blank');";
206
  }
207
  }
208
+ if(!isset($this->linkAttributes['style'])){
209
+ $this->linkAttributes['style'] = '';
210
+ }
211
+ $this->linkAttributes['style'] .= 'cursor:pointer;';
212
  $this->hasLink = true;
213
  }
214
  }
library/smartslider/models/Install.php CHANGED
@@ -14,6 +14,7 @@ class N2SmartsliderInstallModel extends N2Model {
14
 
15
  "CREATE TABLE IF NOT EXISTS `#__nextend2_smartslider3_sliders` (
16
  `id` INT(11) NOT NULL AUTO_INCREMENT,
 
17
  `title` VARCHAR(100) NOT NULL,
18
  `type` VARCHAR(30) NOT NULL,
19
  `params` MEDIUMTEXT NOT NULL,
@@ -64,6 +65,10 @@ class N2SmartsliderInstallModel extends N2Model {
64
  $this->db->query($this->db->parsePrefix("ALTER TABLE `#__nextend2_smartslider3_sliders` ADD `ordering` INT NOT NULL DEFAULT '0'"));
65
  }
66
 
 
 
 
 
67
  N2Loader::import('install', 'smartslider.platform');
68
 
69
  $sliders = $this->db->queryAll($this->db->parsePrefix('SELECT * FROM #__nextend2_smartslider3_sliders LIMIT 1'));
14
 
15
  "CREATE TABLE IF NOT EXISTS `#__nextend2_smartslider3_sliders` (
16
  `id` INT(11) NOT NULL AUTO_INCREMENT,
17
+ `alias` VARCHAR(255) NULL DEFAULT NULL,
18
  `title` VARCHAR(100) NOT NULL,
19
  `type` VARCHAR(30) NOT NULL,
20
  `params` MEDIUMTEXT NOT NULL,
65
  $this->db->query($this->db->parsePrefix("ALTER TABLE `#__nextend2_smartslider3_sliders` ADD `ordering` INT NOT NULL DEFAULT '0'"));
66
  }
67
 
68
+ if (!$this->hasColumn('#__nextend2_smartslider3_sliders', 'alias')) {
69
+ $this->db->query($this->db->parsePrefix("ALTER TABLE `#__nextend2_smartslider3_sliders` ADD `alias` VARCHAR( 255 ) NULL DEFAULT NULL"));
70
+ }
71
+
72
  N2Loader::import('install', 'smartslider.platform');
73
 
74
  $sliders = $this->db->queryAll($this->db->parsePrefix('SELECT * FROM #__nextend2_smartslider3_sliders LIMIT 1'));
library/smartslider/models/Sliders.php CHANGED
@@ -23,6 +23,12 @@ class N2SmartsliderSlidersModel extends N2Model {
23
  ));
24
  }
25
 
 
 
 
 
 
 
26
  public function getWithThumbnail($id) {
27
  $slidesModel = new N2SmartsliderSlidesModel();
28
 
@@ -96,6 +102,7 @@ class N2SmartsliderSlidersModel extends N2Model {
96
  $data['title'] = $slider['title'];
97
  $data['type'] = $slider['type'];
98
  $data['thumbnail'] = $slider['thumbnail'];
 
99
 
100
  return self::editForm($data);
101
  }
@@ -146,6 +153,10 @@ class N2SmartsliderSlidersModel extends N2Model {
146
 
147
  $sliderID = $this->db->insertId();
148
 
 
 
 
 
149
  $this->xref->add($groupID, $sliderID);
150
 
151
  return $sliderID;
@@ -174,6 +185,10 @@ class N2SmartsliderSlidersModel extends N2Model {
174
 
175
  $sliderID = $this->db->insertId();
176
 
 
 
 
 
177
  if ($groupID) {
178
  $this->xref->add($groupID, $sliderID);
179
  }
@@ -243,10 +258,15 @@ class N2SmartsliderSlidersModel extends N2Model {
243
 
244
  function save($id, $slider) {
245
  if (!isset($slider['title']) || $id <= 0) return false;
 
 
 
246
  if ($slider['title'] == '') $slider['title'] = n2_('New slider');
247
 
248
  $title = $slider['title'];
249
  unset($slider['title']);
 
 
250
  $type = $slider['type'];
251
  unset($slider['type']);
252
 
@@ -265,9 +285,92 @@ class N2SmartsliderSlidersModel extends N2Model {
265
  "id" => $id
266
  ));
267
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  self::markChanged($id);
269
 
270
- return $id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  }
272
 
273
  function setThumbnail($id, $thumbnail) {
@@ -399,6 +502,12 @@ class N2SmartsliderSlidersModel extends N2Model {
399
  'class' => 'n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-grey n2-h5',
400
  ), '#' . $slider['id'])
401
  );
 
 
 
 
 
 
402
 
403
 
404
  $attributes = array(
@@ -449,6 +558,12 @@ class N2SmartsliderSlidersModel extends N2Model {
449
  'class' => 'n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-grey n2-h5',
450
  ), '#' . $slider['id'])
451
  );
 
 
 
 
 
 
452
 
453
 
454
  $attributes = array(
@@ -464,7 +579,11 @@ class N2SmartsliderSlidersModel extends N2Model {
464
  )
465
  )) . '";';
466
  } else {
467
- $attributes['onclick'] = 'window.parent.postMessage("' . $slider['id'] . '", "*");';
 
 
 
 
468
  }
469
 
470
  $widget->init("box", array(
@@ -539,6 +658,7 @@ class N2SmartsliderSlidersModel extends N2Model {
539
  $data['title'] = $slider['title'];
540
  $data['type'] = $slider['type'];
541
  $data['thumbnail'] = $slider['thumbnail'];
 
542
 
543
  return self::editGroupForm($data);
544
  }
23
  ));
24
  }
25
 
26
+ public function getByAlias($alias) {
27
+ return $this->db->queryRow("SELECT id FROM " . $this->getTable() . " WHERE alias = :alias", array(
28
+ ":alias" => $alias
29
+ ));
30
+ }
31
+
32
  public function getWithThumbnail($id) {
33
  $slidesModel = new N2SmartsliderSlidesModel();
34
 
102
  $data['title'] = $slider['title'];
103
  $data['type'] = $slider['type'];
104
  $data['thumbnail'] = $slider['thumbnail'];
105
+ $data['alias'] = isset($slider['alias']) ? $slider['alias'] : '';
106
 
107
  return self::editForm($data);
108
  }
153
 
154
  $sliderID = $this->db->insertId();
155
 
156
+ if(isset($slider['alias'])){
157
+ $this->updateAlias($sliderID, $slider['alias']);
158
+ }
159
+
160
  $this->xref->add($groupID, $sliderID);
161
 
162
  return $sliderID;
185
 
186
  $sliderID = $this->db->insertId();
187
 
188
+ if(isset($slider['alias'])){
189
+ $this->updateAlias($sliderID, $slider['alias']);
190
+ }
191
+
192
  if ($groupID) {
193
  $this->xref->add($groupID, $sliderID);
194
  }
258
 
259
  function save($id, $slider) {
260
  if (!isset($slider['title']) || $id <= 0) return false;
261
+ $response = array(
262
+ 'changedFields' => array()
263
+ );
264
  if ($slider['title'] == '') $slider['title'] = n2_('New slider');
265
 
266
  $title = $slider['title'];
267
  unset($slider['title']);
268
+ $alias = $slider['alias'];
269
+ unset($slider['alias']);
270
  $type = $slider['type'];
271
  unset($slider['type']);
272
 
285
  "id" => $id
286
  ));
287
 
288
+ $aliasResult = $this->updateAlias($id, $alias);
289
+ if($aliasResult !== false){
290
+ if($aliasResult['oldAlias'] !== $aliasResult['newAlias']) {
291
+ if($aliasResult['newAlias'] === null){
292
+ N2Message::notice( n2_( 'Alias removed' ) );
293
+ $response['changedFields']['slideralias'] = '';
294
+ } else if($aliasResult['newAlias'] === ''){
295
+ N2Message::error( n2_( 'Alias must contain one or more letters' ) );
296
+ $response['changedFields']['slideralias'] = '';
297
+ } else {
298
+ N2Message::notice( sprintf( n2_( 'Alias updated to: %s' ), $aliasResult['newAlias'] ) );
299
+ $response['changedFields']['slideralias'] = $aliasResult['newAlias'];
300
+ }
301
+ }
302
+ }
303
+
304
  self::markChanged($id);
305
 
306
+ return $response;
307
+ }
308
+
309
+ function updateAlias($sliderID, $alias){
310
+ $isNull = false;
311
+ if(empty($alias)){
312
+ $isNull = true;
313
+ }else {
314
+
315
+ $alias = strtolower( $alias );
316
+ $alias = preg_replace( '/&.+?;/', '', $alias ); // kill entities
317
+ $alias = str_replace( '.', '-', $alias );
318
+
319
+ $alias = preg_replace( '/[^%a-z0-9 _-]/', '', $alias );
320
+ $alias = preg_replace( '/\s+/', '-', $alias );
321
+ $alias = preg_replace( '|-+|', '-', $alias );
322
+ $alias = preg_replace( '|^-*|', '', $alias );
323
+
324
+ if(empty($alias)){
325
+ $isNull = true;
326
+ }
327
+ }
328
+
329
+ $slider = $this->get($sliderID);
330
+ if($isNull){
331
+ if($slider['alias'] == 'null'){
332
+ }else {
333
+ $this->db->query( 'UPDATE ' . $this->db->tableName . ' SET `alias` = NULL WHERE id = ' . intval( $sliderID ) );
334
+ return array(
335
+ 'oldAlias' => $slider['alias'],
336
+ 'newAlias' => null
337
+ );
338
+ }
339
+ } else {
340
+ if(!is_numeric($alias)){
341
+ if($slider['alias'] == $alias){
342
+ return array(
343
+ 'oldAlias' => $slider['alias'],
344
+ 'newAlias' => $alias
345
+ );
346
+ }else {
347
+ $_alias = $alias;
348
+ for($i = 2; $i < 12; $i++){
349
+ $sliderWithAlias = $this->getByAlias( $_alias );
350
+ if(!$sliderWithAlias) {
351
+ $this->db->update(array(
352
+ 'alias' => $_alias
353
+ ), array(
354
+ "id" => $sliderID
355
+ ));
356
+ return array(
357
+ 'oldAlias' => $slider['alias'],
358
+ 'newAlias' => $_alias
359
+ );
360
+ break;
361
+ } else {
362
+ $_alias = $alias . $i;
363
+ }
364
+ }
365
+ }
366
+ }
367
+ return array(
368
+ 'oldAlias' => $slider['alias'],
369
+ 'newAlias' => ''
370
+ );
371
+ }
372
+
373
+ return false;
374
  }
375
 
376
  function setThumbnail($id, $thumbnail) {
502
  'class' => 'n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-grey n2-h5',
503
  ), '#' . $slider['id'])
504
  );
505
+ if(!empty($slider['alias'])){
506
+ $lb[] = N2Html::tag('div', array(
507
+ 'class' => 'n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-grey n2-h5',
508
+ 'style' => 'margin: 0 5px;'
509
+ ), $slider['alias']);
510
+ }
511
 
512
 
513
  $attributes = array(
558
  'class' => 'n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-grey n2-h5',
559
  ), '#' . $slider['id'])
560
  );
561
+ if(!empty($slider['alias'])){
562
+ $lb[] = N2Html::tag('div', array(
563
+ 'class' => 'n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-grey n2-h5',
564
+ 'style' => 'margin: 0 5px;'
565
+ ), $slider['alias']);
566
+ }
567
 
568
 
569
  $attributes = array(
579
  )
580
  )) . '";';
581
  } else {
582
+ if(empty($slider['alias'])){
583
+ $attributes['onclick'] = 'window.parent.postMessage(JSON.stringify({"action":"ss3embed","mode":"id","id":' . json_encode($slider['id']) . '}), "*");';
584
+ } else {
585
+ $attributes['onclick'] = 'window.parent.postMessage(JSON.stringify({"action":"ss3embed","mode":"alias","alias":' . json_encode($slider['alias']) . '}), "*");';
586
+ }
587
  }
588
 
589
  $widget->init("box", array(
658
  $data['title'] = $slider['title'];
659
  $data['type'] = $slider['type'];
660
  $data['thumbnail'] = $slider['thumbnail'];
661
+ $data['alias'] = isset($slider['alias']) ? $slider['alias'] : '';
662
 
663
  return self::editGroupForm($data);
664
  }
library/smartslider/models/forms/settings/default.xml CHANGED
@@ -16,6 +16,10 @@
16
  <param type="onoff" name="editor-icon" label="Show editor icon" default="1"/>
17
  <param type="onoff" name="wp-adminbar" label="Show in WordPress admin bar" default="1"/>
18
  <param type="onoff" name="yoast-sitemap" label="YOAST SEO sitemap - add images" default="1"/>
 
 
 
 
19
  <param type="onoff" name="force-rtl-backend" label="Force Joomla RTL backend" default="0"/>
20
  </params>
21
  <params name="reponsive" label="Responsive mode">
16
  <param type="onoff" name="editor-icon" label="Show editor icon" default="1"/>
17
  <param type="onoff" name="wp-adminbar" label="Show in WordPress admin bar" default="1"/>
18
  <param type="onoff" name="yoast-sitemap" label="YOAST SEO sitemap - add images" default="1"/>
19
+ <param type="number" name="wordpress-widget-areas" label="WordPress - Create widget area" default="1" min="0"
20
+ style="width:40px;">
21
+ <unit>widget area(s)</unit>
22
+ </param>
23
  <param type="onoff" name="force-rtl-backend" label="Force Joomla RTL backend" default="0"/>
24
  </params>
25
  <params name="reponsive" label="Responsive mode">
library/smartslider/models/forms/slider.xml CHANGED
@@ -8,6 +8,7 @@
8
  <params name="general" type="groupped" label="General">
9
  <params name="slider" label="Slider settings" hidetitle="1">
10
  <param name="title" type="text" label="Name" default="Slider" style="width:200px;"/>
 
11
  <param label="Controls" type="group">
12
  <param name="controlsScroll" type="onoff" label="Mouse scroll" default="0"/>
13
  <param name="controlsDrag" type="onoff" label="Mouse drag" default="1"/>
@@ -133,8 +134,6 @@
133
  <params name="developer-options" hidetitle="1">
134
  <param name="overflow-hidden-page" type="onoff" label="Hide website&apos;s scrollbar" default="0" tip="You won&apos;t be able to scroll your website anymore."/>
135
  <param name="clear-both" type="onoff" label="Clear both before slider" tip="If your slider doesn&apos;t resize correctly, turn this option on." default="0"/>
136
- <param name="remove-spaces-from-parents" type="text" label="Remove spaces from parents" tip="This option removes the margins and paddings from the given parents. Write the Xth number, which parent&apos;s margins and paddings should be removed. You can write multiple numbers separated by commas. Example: 1,2,3" default=""/>
137
- <param name="hide-siblings" type="text" label="Hide siblings" tip="This option hides the given siblings. Write the Xth number, which sibling you want to hide. You can write multiple numbers separated by commas. Example: 1,2,3" default=""/>
138
  <param type="textarea" name="callbacks" label="JavaScript callbacks" style2="width:600px;height:600px;"/>
139
  </params>
140
  </params>
8
  <params name="general" type="groupped" label="General">
9
  <params name="slider" label="Slider settings" hidetitle="1">
10
  <param name="title" type="text" label="Name" default="Slider" style="width:200px;"/>
11
+ <param name="alias" type="text" label="Alias" default="" style="width:200px;"/>
12
  <param label="Controls" type="group">
13
  <param name="controlsScroll" type="onoff" label="Mouse scroll" default="0"/>
14
  <param name="controlsDrag" type="onoff" label="Mouse drag" default="1"/>
134
  <params name="developer-options" hidetitle="1">
135
  <param name="overflow-hidden-page" type="onoff" label="Hide website&apos;s scrollbar" default="0" tip="You won&apos;t be able to scroll your website anymore."/>
136
  <param name="clear-both" type="onoff" label="Clear both before slider" tip="If your slider doesn&apos;t resize correctly, turn this option on." default="0"/>
 
 
137
  <param type="textarea" name="callbacks" label="JavaScript callbacks" style2="width:600px;height:600px;"/>
138
  </params>
139
  </params>
library/smartslider/models/forms/slidergroup.xml CHANGED
@@ -9,6 +9,7 @@
9
  <params name="general" type="groupped" label="General">
10
  <params name="slider" label="Group settings" hidetitle="1">
11
  <param name="title" type="text" label="Name" default="Group" style="width:200px;"/>
 
12
 
13
  <param name="thumbnail" label="Thumbnail" type="image" default=""/>
14
  <param name="type" type="hidden" default="group" class="n2-hidden"/>
9
  <params name="general" type="groupped" label="General">
10
  <params name="slider" label="Group settings" hidetitle="1">
11
  <param name="title" type="text" label="Name" default="Group" style="width:200px;"/>
12
+ <param name="alias" type="text" label="Alias" default="" style="width:200px;"/>
13
 
14
  <param name="thumbnail" label="Thumbnail" type="image" default=""/>
15
  <param name="type" type="hidden" default="group" class="n2-hidden"/>
library/smartslider/plugins/type/simple/simple/type.php CHANGED
@@ -64,10 +64,10 @@ class N2SmartSliderTypeSimple extends N2SmartSliderType {
64
  echo N2Html::tag('div', array('class' => 'n2-ss-slide-backgrounds'));
65
 
66
  foreach ($this->slider->slides AS $i => $slide) {
67
- echo N2Html::tag('div', $slide->attributes + array(
68
  'class' => 'n2-ss-slide n2-ss-canvas n2-ow ' . $slide->classes,
69
  'style' => $slide->style
70
- ), $slide->background . $slide->getHTML());
71
  }
72
  ?>
73
  </div>
64
  echo N2Html::tag('div', array('class' => 'n2-ss-slide-backgrounds'));
65
 
66
  foreach ($this->slider->slides AS $i => $slide) {
67
+ echo N2Html::tag('div', N2HTML::mergeAttributes($slide->attributes, $slide->linkAttributes, array(
68
  'class' => 'n2-ss-slide n2-ss-canvas n2-ow ' . $slide->classes,
69
  'style' => $slide->style
70
+ )), $slide->background . $slide->getHTML());
71
  }
72
  ?>
73
  </div>
library/smartslider/plugins/widgetarrow/image/image.php CHANGED
@@ -177,18 +177,20 @@ class N2SSPluginWidgetArrowImage extends N2SSPluginWidgetAbstract {
177
  $image = N2ImageHelper::fixed($image);
178
  }
179
 
 
 
180
  if ($imageHover === null) {
181
- $image = N2Html::image($image, 'Arrow', array(
182
  'class' => 'n2-ow',
183
  'data-no-lazy' => '1',
184
  'data-hack' => 'data-lazy-src'
185
  ));
186
  } else {
187
- $image = N2Html::image($image, 'Arrow', array(
188
  'class' => 'n2-arrow-normal-img n2-ow',
189
  'data-no-lazy' => '1',
190
  'data-hack' => 'data-lazy-src'
191
- )) . N2Html::image($imageHover, 'Arrow', array(
192
  'class' => 'n2-arrow-hover-img n2-ow',
193
  'data-no-lazy' => '1',
194
  'data-hack' => 'data-lazy-src'
177
  $image = N2ImageHelper::fixed($image);
178
  }
179
 
180
+ $alt = $params->get(self::$key . $side . '-alt', $side . ' arrow');
181
+
182
  if ($imageHover === null) {
183
+ $image = N2Html::image($image, $alt, array(
184
  'class' => 'n2-ow',
185
  'data-no-lazy' => '1',
186
  'data-hack' => 'data-lazy-src'
187
  ));
188
  } else {
189
+ $image = N2Html::image($image, $alt, array(
190
  'class' => 'n2-arrow-normal-img n2-ow',
191
  'data-no-lazy' => '1',
192
  'data-hack' => 'data-lazy-src'
193
+ )) . N2Html::image($imageHover, $alt, array(
194
  'class' => 'n2-arrow-hover-img n2-ow',
195
  'data-no-lazy' => '1',
196
  'data-hack' => 'data-lazy-src'
library/smartslider/plugins/widgetarrow/image/image/config.xml CHANGED
@@ -10,5 +10,8 @@
10
  </param>
11
  <param type="widgetposition" name="widget-arrow-previous-position" label="Previous position"/>
12
  <param type="widgetposition" name="widget-arrow-next-position" label="Next position"/>
 
 
 
13
  </params>
14
  </root>
10
  </param>
11
  <param type="widgetposition" name="widget-arrow-previous-position" label="Previous position"/>
12
  <param type="widgetposition" name="widget-arrow-next-position" label="Next position"/>
13
+ <param type="group" label="Alt tags">
14
+ <param type="text" name="widget-arrow-previous-alt" label="Previous arrow" default="previous arrow"/>
15
+ <param type="text" name="widget-arrow-next-alt" label="Next arrow" default="next arrow"/></param>
16
  </params>
17
  </root>
library/smartslider/plugins/widgetbar/horizontal/horizontal.php CHANGED
@@ -100,7 +100,7 @@ class N2SSPluginWidgetBarHorizontal extends N2SSPluginWidgetAbstract {
100
 
101
  $description = $slider->slides[$i]->getDescription();
102
  if ($showDescription && !empty($description)) {
103
- $html .= N2Html::tag('span', array('class' => $fontDescription . ' n2-ow'), (!empty($html) ? $separator : '') . N2Translation::_($description));
104
  }
105
 
106
  $slides[$i] = array(
100
 
101
  $description = $slider->slides[$i]->getDescription();
102
  if ($showDescription && !empty($description)) {
103
+ $html .= N2Html::tag('span', array('class' => $fontDescription . ' n2-ow'), (!empty($html) ? $separator : '') . N2SmartSlider::addCMSFunctions(N2Translation::_($description)));
104
  }
105
 
106
  $slides[$i] = array(
library/smartslider/plugins/widgetthumbnail/default/default.php CHANGED
@@ -220,7 +220,7 @@ class N2SSPluginWidgetThumbnailDefault extends N2SSPluginWidgetAbstract {
220
  if ($showDescription && !empty($description)) {
221
  $html .= N2Html::tag('div', array(
222
  'class' => $descriptionFont . ' n2-ow'
223
- ), $description);
224
  }
225
 
226
  $inner = N2Html::tag('div', array(
220
  if ($showDescription && !empty($description)) {
221
  $html .= N2Html::tag('div', array(
222
  'class' => $descriptionFont . ' n2-ow'
223
+ ), N2SmartSlider::addCMSFunctions(N2Translation::_($description)));
224
  }
225
 
226
  $inner = N2Html::tag('div', array(
library/smartslider/smartslider3.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class N2SS3 {
4
 
5
- public static $version = '3.2.12';
6
 
7
  public static $plan = 'pro';
8
 
2
 
3
  class N2SS3 {
4
 
5
+ public static $version = '3.2.13';
6
 
7
  public static $plan = 'pro';
8
 
library/wordpress/backend/inline/publish.phtml CHANGED
@@ -1,10 +1,18 @@
 
 
 
 
1
  <div class="n2-table n2-table-fixed n2-ss-slider-publish">
2
  <div class="n2-tr">
3
  <div class="n2-td n2-first">
4
  <div class="n2-h2"><?php n2_e('Shortcode'); ?></div>
5
 
6
  <div class="n2-h4"><?php n2_e('Copy and paste this shortcode into your posts or pages:'); ?></div>
7
- <div class="n2-code" onclick="return selectText(this);">[smartslider3 slider=<?php echo $sliderid; ?>]</div>
 
 
 
 
8
  </div>
9
  <div class="n2-td">
10
  <div class="n2-h2"><?php n2_e('Page or Post editor'); ?></div>
@@ -15,7 +23,7 @@
15
  <div class="n2-td n2-last">
16
  <div class="n2-h2"><?php n2_e('PHP code'); ?></div>
17
 
18
- <div class="n2-h4"><?php n2_e('Paste the PHP code into your template file:'); ?></div>
19
  <div class="n2-code" onclick="return selectText(this);">
20
  &lt;?php <br/>
21
  echo do_shortcode('[smartslider3 slider=<?php echo $sliderid; ?>]');<br/>
1
+ <?php
2
+ $model = new N2SmartsliderSlidersModel();
3
+ $slider = $model->get($sliderid);
4
+ ?>
5
  <div class="n2-table n2-table-fixed n2-ss-slider-publish">
6
  <div class="n2-tr">
7
  <div class="n2-td n2-first">
8
  <div class="n2-h2"><?php n2_e('Shortcode'); ?></div>
9
 
10
  <div class="n2-h4"><?php n2_e('Copy and paste this shortcode into your posts or pages:'); ?></div>
11
+ <div class="n2-code n2-ss-slider-shortcode-id" onclick="return selectText(this);">[smartslider3 slider=<?php echo $sliderid; ?>]</div>
12
+ <br>
13
+ <?php if(!empty($slider['alias'])): ?>
14
+ <div class="n2-code n2-ss-slider-shortcode-alias" onclick="return selectText(this);">[smartslider3 alias="<?php echo $slider['alias']; ?>"]</div>
15
+ <?php endif; ?>
16
  </div>
17
  <div class="n2-td">
18
  <div class="n2-h2"><?php n2_e('Page or Post editor'); ?></div>
23
  <div class="n2-td n2-last">
24
  <div class="n2-h2"><?php n2_e('PHP code'); ?></div>
25
 
26
+ <div class="n2-h4"><?php n2_e('Paste the PHP code into your theme\'s file:'); ?></div>
27
  <div class="n2-code" onclick="return selectText(this);">
28
  &lt;?php <br/>
29
  echo do_shortcode('[smartslider3 slider=<?php echo $sliderid; ?>]');<br/>
library/wordpress/libraries/slider/slider.php CHANGED
@@ -11,11 +11,11 @@ class N2SmartSlider extends N2SmartSliderAbstract {
11
  return $slider;
12
  }
13
 
14
- public function addCMSFunctions($slider) {
15
 
16
- $slider = apply_filters('translate_text', do_shortcode(preg_replace('/\[smartslider3 slider=[0-9]+\]/', '', preg_replace('/\[smartslider3 slider="[0-9]+"\]/', '', $slider))));
17
 
18
- return $slider;
19
  }
20
 
21
 
11
  return $slider;
12
  }
13
 
14
+ public static function addCMSFunctions($text) {
15
 
16
+ $text = apply_filters('translate_text', do_shortcode(preg_replace('/\[smartslider3 slider=[0-9]+\]/', '', preg_replace('/\[smartslider3 slider="[0-9]+"\]/', '', $text))));
17
 
18
+ return $text;
19
  }
20
 
21
 
library/wordpress/plugins/generator/posts/postsbyids/generator.php CHANGED
@@ -88,7 +88,7 @@ class N2GeneratorPostsPostsByIDs extends N2GeneratorAbstract
88
  $record[$k] = $v['url'];
89
  } else if(is_array($v)){
90
  foreach($v AS $v_v => $k_k){
91
- if(isset($k_k['url'])){
92
  $record[$k . $v_v] = $k_k['url'];
93
  }
94
  }
88
  $record[$k] = $v['url'];
89
  } else if(is_array($v)){
90
  foreach($v AS $v_v => $k_k){
91
+ if(is_array($k_k) && isset($k_k['url'])){
92
  $record[$k . $v_v] = $k_k['url'];
93
  }
94
  }
nextend/library/applications/system/models/forms/image/form.xml CHANGED
@@ -5,7 +5,7 @@
5
  <param label="Width" type="number" style="width: 40px;">
6
  <unit>px</unit>
7
  </param>
8
- <param label="Width" type="number" style="width: 40px;">
9
  <unit>px</unit>
10
  </param>
11
  </param>
5
  <param label="Width" type="number" style="width: 40px;">
6
  <unit>px</unit>
7
  </param>
8
+ <param label="Height" type="number" style="width: 40px;">
9
  <unit>px</unit>
10
  </param>
11
  </param>
nextend/library/libraries/assets/css/assets.php CHANGED
@@ -21,6 +21,8 @@ class N2AssetsCss extends N2AssetsAbstract {
21
  )) . "\n";
22
  }
23
 
 
 
24
  $mode = N2Settings::get('css-mode', 'normal');
25
  if (N2Platform::$isAdmin || $mode == 'normal') {
26
 
@@ -30,7 +32,7 @@ class N2AssetsCss extends N2AssetsAbstract {
30
  'media' => 'all'
31
  )) . "\n";
32
  } else {
33
- $output .= N2Html::style(N2Uri::pathToUri($file, false) . '?' . filemtime($file), true, array(
34
  'media' => 'all'
35
  )) . "\n";
36
  }
@@ -49,13 +51,13 @@ class N2AssetsCss extends N2AssetsAbstract {
49
  $combinedFile = $cssCombine->make();
50
 
51
  if ($mode == 'combine') {
52
- $output .= N2Html::style(N2Uri::pathToUri($combinedFile, false), true, array(
53
  'media' => 'all'
54
  )) . "\n";
55
  } else if ($mode == 'async') {
56
- N2JS::addInline('window.n2CSS = "' . N2Uri::pathToUri($combinedFile, false) . '";', true, true);
57
  } else if ($mode == 'inline') {
58
- $output .= N2Html::style(file_get_contents($combinedFile), false, array());
59
  }
60
  }
61
 
21
  )) . "\n";
22
  }
23
 
24
+ $needProtocol = !N2Settings::get('protocol-relative', '1');
25
+
26
  $mode = N2Settings::get('css-mode', 'normal');
27
  if (N2Platform::$isAdmin || $mode == 'normal') {
28
 
32
  'media' => 'all'
33
  )) . "\n";
34
  } else {
35
+ $output .= N2Html::style(N2Uri::pathToUri($file, $needProtocol) . '?' . filemtime($file), true, array(
36
  'media' => 'all'
37
  )) . "\n";
38
  }
51
  $combinedFile = $cssCombine->make();
52
 
53
  if ($mode == 'combine') {
54
+ $output .= N2Html::style(N2Uri::pathToUri($combinedFile, $needProtocol), true, array(
55
  'media' => 'all'
56
  )) . "\n";
57
  } else if ($mode == 'async') {
58
+ N2JS::addInline('window.n2CSS = "' . N2Uri::pathToUri($combinedFile, $needProtocol) . '";', true, true);
59
  } else if ($mode == 'inline') {
60
+ $output .= N2Html::style(file_get_contents($combinedFile), $needProtocol, array());
61
  }
62
  }
63
 
nextend/library/libraries/assets/js/assets.php CHANGED
@@ -14,6 +14,8 @@ class N2AssetsJs extends N2AssetsAbstract {
14
 
15
  $output = "";
16
 
 
 
17
  $globalInline = $this->getGlobalInlineScripts();
18
  if (!empty($globalInline)) {
19
  $output .= N2Html::script(self::minify_js($globalInline . "\n"));
@@ -33,7 +35,7 @@ class N2AssetsJs extends N2AssetsAbstract {
33
  }
34
  }
35
  $combinedFile = $jsCombined->make();
36
- $scripts = 'nextend.loadScript("' . N2Uri::pathToUri($combinedFile, false) . '");';
37
  $output .= N2Html::script(self::minify_js($scripts . "\n"));
38
  } else {
39
  if (!defined('NEXTEND_CACHE_STORAGE') && !N2Platform::$isAdmin && N2Settings::get('combine-js', '0')) {
@@ -46,14 +48,14 @@ class N2AssetsJs extends N2AssetsAbstract {
46
  if (substr($combinedFile, 0, 2) == '//') {
47
  $output .= N2Html::script($combinedFile, true) . "\n";
48
  } else {
49
- $output .= N2Html::script(N2Uri::pathToUri($combinedFile, false), true) . "\n";
50
  }
51
  } else {
52
  foreach ($this->getFiles() AS $file) {
53
  if (substr($file, 0, 2) == '//') {
54
  $output .= N2Html::script($file, true) . "\n";
55
  } else {
56
- $output .= N2Html::script(N2Uri::pathToUri($file, false) . '?' . filemtime($file), true) . "\n";
57
  }
58
  }
59
  }
14
 
15
  $output = "";
16
 
17
+ $needProtocol = !N2Settings::get('protocol-relative', '1');
18
+
19
  $globalInline = $this->getGlobalInlineScripts();
20
  if (!empty($globalInline)) {
21
  $output .= N2Html::script(self::minify_js($globalInline . "\n"));
35
  }
36
  }
37
  $combinedFile = $jsCombined->make();
38
+ $scripts = 'nextend.loadScript("' . N2Uri::pathToUri($combinedFile, $needProtocol) . '");';
39
  $output .= N2Html::script(self::minify_js($scripts . "\n"));
40
  } else {
41
  if (!defined('NEXTEND_CACHE_STORAGE') && !N2Platform::$isAdmin && N2Settings::get('combine-js', '0')) {
48
  if (substr($combinedFile, 0, 2) == '//') {
49
  $output .= N2Html::script($combinedFile, true) . "\n";
50
  } else {
51
+ $output .= N2Html::script(N2Uri::pathToUri($combinedFile, $needProtocol), true) . "\n";
52
  }
53
  } else {
54
  foreach ($this->getFiles() AS $file) {
55
  if (substr($file, 0, 2) == '//') {
56
  $output .= N2Html::script($file, true) . "\n";
57
  } else {
58
+ $output .= N2Html::script(N2Uri::pathToUri($file, $needProtocol) . '?' . filemtime($file), true) . "\n";
59
  }
60
  }
61
  }
nextend/library/libraries/form/tab.php CHANGED
@@ -33,7 +33,7 @@ class N2Tab {
33
 
34
  var $_hide = false;
35
 
36
- public $_tabs;
37
 
38
  /**
39
  * @param $form
33
 
34
  var $_hide = false;
35
 
36
+ public $_tabs = array();
37
 
38
  /**
39
  * @param $form
nextend/library/libraries/form/tabs/grouppedsidebar.php CHANGED
@@ -5,8 +5,6 @@ N2Loader::import('libraries.form.tabs.tabbedsidebar');
5
  class N2TabGrouppedSidebar extends N2TabTabbedSidebar
6
  {
7
 
8
- var $_tabs;
9
-
10
  function render($control_name) {
11
  $this->initTabs();
12
  foreach ($this->_tabs AS $tabname => $tab) {
5
  class N2TabGrouppedSidebar extends N2TabTabbedSidebar
6
  {
7
 
 
 
8
  function render($control_name) {
9
  $this->initTabs();
10
  foreach ($this->_tabs AS $tabname => $tab) {
nextend/library/libraries/form/tabs/tabbedsidebar.php CHANGED
@@ -3,8 +3,6 @@ N2Loader::import('libraries.form.tab');
3
 
4
  class N2TabTabbedSidebar extends N2Tab {
5
 
6
- var $_tabs;
7
-
8
  function initTabs() {
9
  if (count($this->_tabs) == 0) {
10
  foreach ($this->_xml->params as $tab) {
3
 
4
  class N2TabTabbedSidebar extends N2Tab {
5
 
 
 
6
  function initTabs() {
7
  if (count($this->_tabs) == 0) {
8
  foreach ($this->_xml->params as $tab) {
nextend/library/libraries/helpers/html.php CHANGED
@@ -266,4 +266,27 @@ class N2Html {
266
  return $attributes;
267
  }
268
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  }
266
  return $attributes;
267
  }
268
 
269
+ /**
270
+ * @param array $array1
271
+ * @param array $array2 [optional]
272
+ * @param array $_ [optional]
273
+ * @return array the resulting array.
274
+ * @since 4.0
275
+ * @since 5.0
276
+ */
277
+ public static function mergeAttributes($array1, $array2 = null, $_ = null){
278
+ $arguments = func_get_args();
279
+ $target = array_shift($arguments);
280
+ foreach($arguments AS $array){
281
+ if(isset($array['style'])){
282
+ if(!isset($target['style'])) $target['style'] = '';
283
+ $target['style'].=$array['style'];
284
+ unset($array['style']);
285
+ }
286
+ $target = array_merge($target, $array);
287
+ }
288
+
289
+ return $target;
290
+ }
291
+
292
  }
nextend/library/libraries/image/image.php CHANGED
@@ -246,7 +246,7 @@ class N2Image extends N2CacheImage {
246
  } else if ($extension == 'jpg') {
247
  $image = @imagecreatefromjpeg($imagePath);
248
  if (function_exists("exif_read_data")) {
249
- $exif = exif_read_data($imagePath);
250
 
251
  $rotated = $this->getOrientation($exif, $image);
252
  if ($rotated) {
246
  } else if ($extension == 'jpg') {
247
  $image = @imagecreatefromjpeg($imagePath);
248
  if (function_exists("exif_read_data")) {
249
+ $exif = @exif_read_data($imagePath);
250
 
251
  $rotated = $this->getOrientation($exif, $image);
252
  if ($rotated) {
nextend/media/dist/nextend-backend.css CHANGED
@@ -5036,6 +5036,17 @@ html[dir="rtl"] .n2-button-menu-open .n2-button-menu {
5036
  display: block;
5037
  }
5038
 
 
 
 
 
 
 
 
 
 
 
 
5039
  /**
5040
  SIZE
5041
  **/
@@ -5594,7 +5605,6 @@ html[dir="rtl"] .n2-list li > .n2-actions {
5594
  position: absolute;
5595
  left: 5px;
5596
  bottom: 55px;
5597
- width: 50%;
5598
  }
5599
 
5600
  .n2-box-small .n2-box-lb {
5036
  display: block;
5037
  }
5038
 
5039
+ /* scrollfix for mac*/
5040
+ .webkit-scroll-fix::-webkit-scrollbar {
5041
+ -webkit-appearance: none;
5042
+ width: 7px;
5043
+ }
5044
+ .webkit-scroll-fix::-webkit-scrollbar-thumb {
5045
+ border-radius: 4px;
5046
+ background-color: rgba(0,0,0,.5);
5047
+ box-shadow: 0 0 1px rgba(255,255,255,.5);
5048
+ }
5049
+
5050
  /**
5051
  SIZE
5052
  **/
5605
  position: absolute;
5606
  left: 5px;
5607
  bottom: 55px;
 
5608
  }
5609
 
5610
  .n2-box-small .n2-box-lb {
nextend/media/dist/nextend-backend.js CHANGED
@@ -5764,7 +5764,9 @@ N2Require('FormElementColor', ['FormElement'], [], function ($, scope, undefined
5764
  var current = this.getCurrent(),
5765
  value = this.element.val();
5766
  if (current != value) {
5767
- this.element.n2spectrum("set", value);
 
 
5768
 
5769
  this.triggerInsideChange();
5770
  this.triggerOutsideChange();
5764
  var current = this.getCurrent(),
5765
  value = this.element.val();
5766
  if (current != value) {
5767
+ if(value.length > 0 && value.charAt(0) != '{') {
5768
+ this.element.n2spectrum("set", value);
5769
+ }
5770
 
5771
  this.triggerInsideChange();
5772
  this.triggerOutsideChange();
nextend/media/dist/nextend-backend.min.css CHANGED
@@ -1,4 +1,4 @@
1
- @font-face{font-family:'Nextend';src:url(../fonts/Nextend.eot?jk6d47);src:url(../fonts/Nextend.eot?jk6d47#iefix) format('embedded-opentype'),url(../fonts/Nextend.ttf?jk6d47) format('truetype'),url(../fonts/Nextend.woff?jk6d47) format('woff');font-weight:400;font-style:normal}.n2-i{font-family:'Nextend'!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n2-i-slidelibrary:before{content:"\e97d"}.n2-i-newslide:before{content:"\e981"}.n2-i-canvas:before{content:"\e916"}.n2-i-builder:before{content:"\e97c"}.n2-i-minimize:before{content:"\e914"}.n2-i-maximize:before{content:"\e915"}.n2-i-vertical-align-top:before{content:"\e96c"}.n2-i-vertical-align-space-between:before{content:"\e97a"}.n2-i-vertical-align-space-around:before{content:"\e97b"}.n2-i-vertical-align-center:before{content:"\e97e"}.n2-i-vertical-align-bottom:before{content:"\e97f"}.n2-i-mini-desktop-portrait:before{content:"\e980"}.n2-i-uplevel:before{content:"\e979"}.n2-i-hidedesktoplandscape:before{content:"\e95a"}.n2-i-mini-arrow-thin:before{content:"\e926"}.n2-i-mini-move:before{content:"\e973"}.n2-i-color:before{content:"\e95b"}.n2-i-col:before{content:"\e95c"}.n2-i-structure-Sb:before{content:"\e95d"}.n2-i-structure-Sa:before{content:"\e95e"}.n2-i-structure-4a:before{content:"\e95f"}.n2-i-structure-3b:before{content:"\e960"}.n2-i-structure-3a:before{content:"\e961"}.n2-i-structure-2e:before{content:"\e962"}.n2-i-structure-2d:before{content:"\e963"}.n2-i-structure-2c:before{content:"\e964"}.n2-i-structure-2b:before{content:"\e965"}.n2-i-structure-2a:before{content:"\e966"}.n2-i-structure-1a:before{content:"\e967"}.n2-i-mini-tablet-portrait:before{content:"\e968"}.n2-i-mini-tablet-landscape:before{content:"\e969"}.n2-i-mini-mobile-portrait:before{content:"\e96a"}.n2-i-mini-mobile-landscape:before{content:"\e96b"}.n2-i-mini-desktop-landscape:before{content:"\e96d"}.n2-i-video:before{content:"\e96e"}.n2-i-stretch:before{content:"\e96f"}.n2-i-row:before{content:"\e970"}.n2-i-none:before{content:"\e971"}.n2-i-mini-trash:before{content:"\e972"}.n2-i-mini-duplicate:before{content:"\e974"}.n2-i-mini-arrow-up:before{content:"\e975"}.n2-i-mini-arrow-right:before{content:"\e976"}.n2-i-mini-arrow-left:before{content:"\e977"}.n2-i-mini-arrow-down:before{content:"\e978"}.n2-i-chainsmall:before{content:"\e949"}.n2-i-reset2:before{content:"\e946"}.n2-i-save:before{content:"\e947"}.n2-i-clearanimation:before{content:"\e948"}.n2-i-magnet:before{content:"\e936"}.n2-i-layerlist:before{content:"\e935"}.n2-i-layer-text:before{content:"\e920"}.n2-i-layer-image:before{content:"\e931"}.n2-i-layer-heading:before{content:"\e932"}.n2-i-layer-button:before{content:"\e933"}.n2-i-settings:before{content:"\e934"}.n2-i-selectarrow:before{content:"\e930"}.n2-i-closewindow:before{content:"\e90a"}.n2-i-selected:before{content:"\e90b"}.n2-i-layerlistopen:before{content:"\e92b"}.n2-i-layerlistclose:before{content:"\e92c"}.n2-i-backtoslider:before{content:"\e92e"}.n2-i-addlayer2:before{content:"\e92f"}.n2-i-newdrag:before{content:"\e913"}.n2-i-addlayer:before{content:"\e917"}.n2-i-listlayer:before{content:"\e918"}.n2-i-closelayer:before{content:"\e919"}.n2-i-copy:before{content:"\e907"}.n2-i-paste:before{content:"\e908"}.n2-i-undo:before{content:"\e905"}.n2-i-redo:before{content:"\e906"}.n2-i-sortdate2:before{content:"\e900"}.n2-i-sortdate1:before{content:"\e901"}.n2-i-sortalphabetic2:before{content:"\e902"}.n2-i-sortalphabetic1:before{content:"\e903"}.n2-i-hide:before{content:"\e60e"}.n2-i-adaptive:before{content:"\e64e"}.n2-i-reset:before{content:"\e64f"}.n2-i-fontmodifier:before{content:"\e650"}.n2-i-sun:before{content:"\e651"}.n2-i-layerunlink:before{content:"\e64b"}.n2-i-layerlink:before{content:"\e64d"}.n2-i-moon:before{content:"\e64c"}.n2-i-horizontal-right:before{content:"\e645"}.n2-i-horizontal-center:before{content:"\e646"}.n2-i-horizontal-left:before{content:"\e647"}.n2-i-vertical-bottom:before{content:"\e648"}.n2-i-vertical-middle:before{content:"\e649"}.n2-i-vertical-top:before{content:"\e64a"}.n2-i-bulb:before{content:"\e643"}.n2-i-unlock:before{content:"\e63f"}.n2-i-anim-out:before{content:"\e640"}.n2-i-anim-in:before{content:"\e641"}.n2-i-anim-loop:before{content:"\e642"}.n2-i-more:before{content:"\e639"}.n2-i-buttonarrow:before{content:"\e638"}.n2-i-list:before{content:"\e635"}.n2-i-link:before{content:"\e636"}.n2-i-play:before{content:"\e605"}.n2-i-pause:before{content:"\e606"}.n2-i-stop:before{content:"\e607"}.n2-i-snapcenter:before{content:"\e62e"}.n2-i-snapgrid:before{content:"\e62f"}.n2-i-snaplayer:before{content:"\e630"}.n2-i-snapnone:before{content:"\e631"}.n2-i-plus:before{content:"\e632"}.n2-i-minus:before{content:"\e633"}.n2-i-bold:before{content:"\e601"}.n2-i-unpublished:before{content:"\e62d"}.n2-i-published:before{content:"\e60c"}.n2-i-underline:before{content:"\e602"}.n2-i-italic:before{content:"\e615"}.n2-i-empty:before{content:"\e62c"}.n2-i-tick:before{content:"\e600"}.n2-i-star:before{content:"\e603"}.n2-i-right:before{content:"\e604"}.n2-i-order:before{content:"\e608"}.n2-i-lock:before{content:"\e609"}.n2-i-left:before{content:"\e60a"}.n2-i-justify:before{content:"\e60b"}.n2-i-info:before{content:"\e60d"}.n2-i-eye:before{content:"\e60f"}.n2-i-edit:before{content:"\e610"}.n2-i-duplicate:before{content:"\e611"}.n2-i-delete:before{content:"\e612"}.n2-i-close:before{content:"\e613"}.n2-i-center:before{content:"\e614"}.n2-i-emptyslide:before{content:"\e91b"}.n2-i-addslide:before{content:"\e91c"}.n2-i-staraction:before{content:"\e91d"}.n2-i-breadcrumbarrow:before{content:"\e91e"}.n2-i-animation:before{content:"\e91f"}.n2-i-folderclosed:before{content:"\e921"}.n2-i-folderopened:before{content:"\e922"}.n2-i-hide2:before{content:"\e923"}.n2-i-select:before{content:"\e924"}.n2-i-hidedesktopportrait:before{content:"\e925"}.n2-i-hidetabletlandscape:before{content:"\e927"}.n2-i-hidetabletportrait:before{content:"\e928"}.n2-i-hidemobilelandscape:before{content:"\e929"}.n2-i-hidemobileportrait:before{content:"\e92a"}.n2-i-backgroundedit:before{content:"\e909"}.n2-i-backgroundmanage:before{content:"\e90c"}.n2-i-backgroundposition:before{content:"\e90d"}.n2-i-viewmini:before{content:"\e90e"}.n2-i-viewgrid:before{content:"\e90f"}.n2-i-viewlist:before{content:"\e910"}.n2-i-more2:before{content:"\e911"}.n2-i-tick2:before{content:"\e912"}.n2-i-group:before{content:"\e957"}.n2-i-group-up:before{content:"\e958"}.n2-i-group-insert:before{content:"\e959"}.n2-i-add-sample:before{content:"\e951"}.n2-i-add-new:before{content:"\e952"}.n2-i-progressbar-layer:before{content:"\e982"}.n2-i-imagebox-layer:before{content:"\e983"}.n2-i-counter-layer:before{content:"\e984"}.n2-i-circlecounter-layer:before{content:"\e985"}.n2-i-audio-layer:before{content:"\e986"}.n2-i-a-license:before{content:"\e953"}.n2-i-a-import:before{content:"\e954"}.n2-i-a-deauthorize:before{content:"\e955"}.n2-i-a-clear:before{content:"\e956"}.n2-i-imagearea-layer:before{content:"\e950"}.n2-i-window-settings:before{content:"\e94c"}.n2-i-window-animation:before{content:"\e94d"}.n2-i-window-design:before{content:"\e94e"}.n2-i-window-layer:before{content:"\e94f"}.n2-i-dashboard:before{content:"\e94a"}.n2-i-slider2:before{content:"\e94b"}.n2-i-area-layer:before{content:"\e937"}.n2-i-iframe-layer:before{content:"\e938"}.n2-i-input-layer:before{content:"\e939"}.n2-i-html-layer:before{content:"\e93a"}.n2-i-video-layer:before{content:"\e93b"}.n2-i-vimeo-layer:before{content:"\e93c"}.n2-i-youtube-layer:before{content:"\e93d"}.n2-i-list-layer:before{content:"\e93e"}.n2-i-transition-layer:before{content:"\e93f"}.n2-i-caption-layer:before{content:"\e940"}.n2-i-icon-layer:before{content:"\e941"}.n2-i-button-layer:before{content:"\e942"}.n2-i-image-layer:before{content:"\e943"}.n2-i-text-layer:before{content:"\e944"}.n2-i-heading-layer:before{content:"\e945"}.n2-i-preview:before{content:"\e92d"}.n2-i-slides:before{content:"\e91a"}.n2-i-slideedit:before{content:"\e904"}.n2-i-help:before{content:"\e644"}.n2-i-v-tablet-landscape:before{content:"\e63a"}.n2-i-v-mobile-landscape:before{content:"\e63b"}.n2-i-v-desktop-landscape:before{content:"\e63c"}.n2-i-bulk:before{content:"\e634"}.n2-i-notification:before{content:"\e637"}.n2-i-v-tablet:before{content:"\e616"}.n2-i-v-mobile:before{content:"\e617"}.n2-i-v-desktop:before{content:"\e618"}.n2-i-v-all:before{content:"\e619"}.n2-i-smart:before{content:"\e61a"}.n2-i-slider:before{content:"\e61b"}.n2-i-s-open:before{content:"\e61c"}.n2-i-s-close:before{content:"\e61d"}.n2-i-next:before{content:"\e61e"}.n2-i-n-success:before{content:"\e61f"}.n2-i-n-notice:before{content:"\e620"}.n2-i-n-error:before{content:"\e621"}.n2-i-n-close:before{content:"\e622"}.n2-i-drag:before{content:"\e623"}.n2-i-a-text:before{content:"\e624"}.n2-i-a-refresh:before{content:"\e625"}.n2-i-a-html:before{content:"\e626"}.n2-i-a-export:before{content:"\e627"}.n2-i-a-duplicate:before{content:"\e628"}.n2-i-a-deletes:before{content:"\e629"}.n2-i-a-delete:before{content:"\e62a"}.n2-i-a-back:before{content:"\e62b"}.n2-i-up:before{content:"\e63e"}.n2-i-folder:before{content:"\e63d"}.n2{box-sizing:initial}.n2,.n2 .ui-widget,.n2 td,.n2 th,html[dir=rtl] .n2{font-family:"Montserrat",Arial,sans-serif;-webkit-font-smoothing:antialiased;font-size:12px}.n2 a:ACTIVE,.n2 a:FOCUS,.n2 a:LINK,.n2 a:VISITED{text-decoration:none}.n2-h1{font-size:26px}.n2-h2{font-size:20px}.n2-h3{font-size:14px}.n2-h4{font-size:12px}.n2-h5,input[type].n2-h5,select.n2-h5,textarea.n2-h5{font-size:11px}.n2-h6{font-size:10px}.n2-b{font-weight:700}.n2-uc{text-transform:uppercase}.n2-ucf{text-transform:capitalize}.n2-i+span,.n2-i+span+span,.n2-i+span+span+span{vertical-align:middle}.n2-actions-left>a,.n2-actions-left>a:HOVER,.n2-i-grey-opacity,.n2-i-grey-opacity:HOVER{color:#b2bfc9}.n2-active>.n2-i-star{color:#c68c1e}.n2-active>.n2-i-unpublished:before{content:"\e60c"}.n2-active>.n2-i-unpublished,.n2-active>.n2-i-unpublished:HOVER{color:#6fbc49}.n2-button .n2-i,.n2-i.n2-it{line-height:inherit;vertical-align:top}.n2-description,.n2-description p{font-size:12px;color:#6b7989}.n2-description ol{font-size:11px}div.n2-description ul{padding-left:20px;font-size:12px;list-style-type:disc}#wpbody-content{padding-bottom:0!important}#wpfooter{display:none}#wpbody-content #n2-admin{margin:10px 20px 0 0}html[dir=rtl] #wpbody-content #n2-admin{margin:10px 0 0 20px}#wpbody-content #n2-admin a:focus{box-shadow:none}#content-box #toolbar-box{display:none}.n2 input:focus,.n2 select:focus,.n2 textarea:focus{background:0 0}.n2 ul{padding:0}.n2 dt{font-weight:400}#status,.admin .subhead-collapse,.admin header.header{display:none}div#system-debug,div.container-main{padding-bottom:0}.admin #content{margin-top:20px}.n2 button,.n2 input,.n2 label,.n2 select,.n2 textarea{line-height:inherit}.n2 *:focus{box-shadow:none}#n2-admin img{display:inline}#system-message-container,.ui-helper-hidden{display:none}.n2 td{vertical-align:inherit}.n2 .thumb{margin-top:0}body.n2-platform-native{padding:10px;font-size:13px;line-height:1.4em;overflow:auto}.n2 hr,iframe{border:0}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#n2-admin{min-width:980px;background-color:#e9edf0}.n2 hr{border-top:1px solid #ccd1d6;border-bottom:1px solid #fafafa}.n2 a{-moz-transition:none;-webkit-transition:none;-o-transition:color 0s ease-in;transition:none;outline:0}.n2-clickable{cursor:pointer}.n2-table{display:table;width:100%;border-spacing:0;border-collapse:collapse}.n2-table.n2-content{border-collapse:separate}.n2-table-auto{width:auto}.n2-table-fixed{table-layout:fixed}.n2-tr{display:table-row}.n2-td{display:table-cell;vertical-align:top}.n2-table-fancy,.n2-table-pane{width:100%;text-align:center;border-spacing:0}.n2-table-pane{table-layout:fixed;border-collapse:separate}.n2-table-fancy{border-collapse:collapse;border:2px solid #a1aeb5;border-radius:5px}.n2-table-fancy tr:nth-child(odd){background-color:#f2f5fa}.n2-table-fancy td{border:1px solid #e0e3e6;padding:10px;text-align:left;font-size:11px}html[dir=rtl] .n2-table-fancy td{text-align:right}.n2-table-fancy-wrap{border:2px solid #a1aeb5;border-radius:5px}.n2-table-fancy-wrap .n2-table-fancy{border:0}.n2-table-fancy-wrap .n2-table-fancy td{border:0;border-bottom:1px solid #e0e3e6}.n2-table-pane td{padding:0}.n2-inline-block{display:inline-block;vertical-align:top}.n2-left{float:left}.n2-right,html[dir=rtl] .n2-left{float:right}html[dir=rtl] .n2-right{float:left}.n2-clear{clear:both}.n2-blue-bg,.n2-blue-logo-bg{background-color:#0c92df}.n2-sidebar-base-bg{background-color:#4d5d70}.n2-sidebar-header-bg{background-color:#485769}.n2-sidebar-list-bg{background-color:#212d3a}.n2-sidebar-tab-bg{background-color:#202934}.n2-sidebar-parameter-label-bg{background-color:#212d3a}.n2-sidebar-tab-switcher{border-bottom:1px solid #2c3540}.n2-sidebar-tab-switcher .n2-td{color:#b2bfc9;text-align:center;height:60px;line-height:60px;cursor:pointer}.n2-sidebar-tab-switcher .n2-td.n2-active{color:#fff}.n2-sidebar-pane-sizer{top:0;left:0;height:15px;width:100%;cursor:ns-resize;background:#212d3a;text-align:center;color:#4d5d70;font-size:32px;line-height:15px}.n2-content-base-bg{background-color:#e9edf0}.n2-content-box-title-bg{background-color:#f2f5fa}.n2-border-radius{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-border-radius-tr{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px}html[dir=rtl] .n2-border-radius-tr{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0}.n2-border-radius-tl,html[dir=rtl] .n2-border-radius-tr{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px}html[dir=rtl] .n2-border-radius-tl{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0}.n2-border-radius-br{-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px}html[dir=rtl] .n2-border-radius-br{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0}.n2-border-radius-bl,html[dir=rtl] .n2-border-radius-br{-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px}html[dir=rtl] .n2-border-radius-bl{-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0}.n2-a,.n2-a:ACTIVE,.n2-a:FOCUS,.n2-a:HOVER,.n2-a:VISITED{color:#08c}#n2-ss-redo,#n2-ss-undo{opacity:.5}#n2-ss-redo.n2-active,#n2-ss-undo.n2-active{opacity:1}#n2-ss-undo+#n2-ss-redo{margin-left:-15px}.n2-top-bar-menu .n2-button-icon{margin:12px 2px 0}.n2-expert-switch{display:inline-block;height:36px;margin-right:20px;vertical-align:top;position:relative;overflow:hidden;padding:0 30px;text-align:right}.n2-expert-switch .n2-expert-expert,.n2-expert-switch .n2-expert-simple{display:inline-block;height:100%;position:relative;line-height:36px;color:#b2bfc9;transition:top .3s,opacity .3s}.n2-expert-switch .n2-expert-simple{top:-36px;opacity:1}.n2-expert-switch .n2-expert-expert{top:-10px;opacity:0}.n2-expert-switch.n2-active .n2-expert-simple{top:-26px;opacity:0}.n2-expert-switch.n2-active .n2-expert-expert{top:0;opacity:1}.n2-expert-switch .n2-expert-bar{position:absolute;top:5px;right:8px;width:8px;height:24px;background:#6b7986;border-radius:4px;transition:background .3s}.n2-expert-switch.n2-active .n2-expert-bar{background:#51b82d}.n2-expert-switch .n2-expert-dot{position:absolute;top:-1px;left:-3px;width:14px;height:14px;border-radius:7px;background:#fff;transition:top .3s}.n2-expert-switch.n2-active .n2-expert-dot{top:10px}.n2-button-play{text-align:left;padding:0}.n2-button-play .n2-i,.n2-button-play span{vertical-align:middle}.n2-button-play span{display:inline-block;padding:0 20px;border-left:1px solid #1582c2}.n2-header{display:flex;justify-content:space-between;flex:1;height:70px;z-index:11;border-top-right-radius:5px;overflow:hidden}.n2-logo{width:339px;border-right:1px solid #1681c1;border-top-left-radius:5px}.n2-logo a{display:inline-block;width:100%;height:100%;text-align:center}.n2-logo a img{margin-top:9px}.n2-header-breadcrumbs{align-self:center}.n2-header-menu{text-align:right;white-space:nowrap}.n2-header-right>*{color:RGBA(255,255,255,.7);line-height:23px;display:inline-block;height:100%;padding:0 24px;vertical-align:top;font-size:13px}.n2-header-menu>*{line-height:70px}.n2-header-menu .n2-menu-has-sub .n2-menu-sub{display:none;position:absolute;right:5px;bottom:0;line-height:26px;white-space:nowrap}html[dir=rtl] .n2-header-menu .n2-menu-has-sub .n2-menu-sub{left:5px;right:auto}.n2-header-menu .n2-menu-has-sub:HOVER .n2-menu-sub{display:block}.n2-header-menu .n2-menu-has-sub .n2-menu-sub *{color:RGBA(255,255,255,.7)!important;padding:0 10px;font-size:11px}.n2-header-breadcrumbs>a{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-header-breadcrumbs>span{padding:0;margin:0 -10px}.n2-header-right>.n2-h4,.n2-header-right>.n2-h4:ACTIVE,.n2-header-right>.n2-h4:FOCUS,.n2-header-right>.n2-h4:LINK,.n2-header-right>.n2-h4:VISITED{color:RGBA(255,255,255,.7);text-decoration:none}.n2-header-right .n2-h4.n2-active{color:#fff}.n2-sidebar{width:439px;border-right:1px solid #212d3a}.n2-sidebar-hidden>.n2-content .n2-sidebar{display:none}.n2-sidebar>:first-child{border-top:1px solid #2c3540}.n2-lightbox .n2-sidebar>:first-child{border-top:0}.n2-sidebar-fixed{position:fixed;top:0}.admin-bar .n2-sidebar-fixed{top:32px}.admin .n2-sidebar-fixed{top:31px}.n2-content-area{position:relative;border:1px solid #a3adb7;border-width:0 1px 1px 0;min-height:1000px;width:100%}.n2-sidebar-hidden .n2-content-area{border-width:0 1px 1px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px}.n2-top-bar{position:relative;top:0;height:60px;z-index:1020;margin-right:-1px;border-bottom:1px solid #1c2329;display:flex;flex-wrap:nowrap;flex-flow:row;justify-content:space-between}.n2-sidebar-hidden .n2-top-bar{margin-left:-1px}.n2-top-bar>*{flex:1 0 auto}.n2-top-bar-middle{text-align:center;display:inline-block;height:100%}.n2-top-bar .n2-back{margin:0}.n2-top-bar .n2-back a{border-right:1px solid #1c2329;line-height:17px;padding-bottom:7px;color:#80a3b5}.n2-top-bar .n2-back a:before{font-family:'Nextend'!important;display:block;color:#80a3b5;font-size:32px;text-align:center;line-height:25px;margin-top:11px}.n2-top-bar-menu{line-height:60px;height:60px;overflow:hidden}.n2-top-bar-menu .n2-form-dark{margin-top:16px;height:28px;line-height:28px;overflow:hidden}.n2-top-bar-menu>.n2-h4{display:inline-block;line-height:60px;padding:0;color:#b2bfc9;font-size:10px;min-width:80px;text-align:center}.n2-top-bar-menu>.n2-h4.n2-active{color:#ebeced;cursor:default}.n2-top-bar-menu span{color:#b2bfc9;padding:0 10px}@media all and (max-width:800px){.n2-top-bar-menu>.n2-h4{display:none}}.n2-top-bar .n2-save-mode{color:#b2bfc9;font-size:12px}.n2-top-bar .n2-save-mode i{margin:0 10px;padding:0}.n2-top-bar .n2-form-dark .n2-form-element-radio-tab{vertical-align:middle}.n2-top-bar-actions{margin:12px 1px 0;white-space:nowrap;text-align:right}.n2-top-bar-actions .n2-button{margin-right:20px;vertical-align:top}html[dir=rtl] .n2-top-bar-actions .n2-button{margin-right:0;margin-left:20px}.n2-heading-bar{z-index:9;position:relative;background-color:#fff;border-bottom:1px solid #e0e6ed;padding:35px 0;display:flex}.n2-heading-bar-left{flex:1;align-self:center}.n2-heading{position:relative;color:#6b7989;line-height:40px;margin:0 30px}.n2-heading span{position:absolute;font-size:11px;left:2px;bottom:-26px}.n2-heading-menu{position:absolute;bottom:0;left:10px}html[dir=rtl] .n2-heading-menu{left:auto;right:10px}.n2-heading-menu>div{display:inline-block;padding:0 20px;color:#7b8898;cursor:pointer;line-height:34px}.n2-heading-menu>div.n2-active{color:#0c92df}.n2-heading-menu>div.n2-button{color:#fff;line-height:28px}.n2-heading-actions{white-space:nowrap;align-self:center}.n2-heading-actions-label{color:#6b7989;vertical-align:middle;line-height:32px}.n2-heading-actions a,.n2-heading-actions a:HOVER,.n2-heading-actions a:focus{display:inline-block;padding:10px;color:#b0b9bf;vertical-align:middle;font-size:32px}.n2-underline{position:relative}.n2-has-underline>.n2-underline:after{content:"";position:absolute;width:0;height:3px;bottom:-10px;left:0;background-color:#0c92df}.n2-active>.n2-underline:after{width:100%}.n2-controls-panel{line-height:28px}.n2-controls-panel .n2-panel-heading{padding-right:11px;color:#7b8898}.n2-panel-option a{display:inline-block;background-color:#a1aeb5;color:#fff;padding:0 24px;border-right:1px solid #b9c3c9}.n2-panel-option.n2-first a{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}.n2-panel-option.n2-last a{border-right:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-panel-option.n2-active a{background-color:#0c92df}.n2-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100002;background-color:RGBA(43,52,63,.9)}.n2-modal-window{position:absolute;top:50%;left:50%;background-color:#fff;z-index:1}.n2-modal-title{line-height:59px;color:#6b7989;border-bottom:1px solid #ccd1d6;overflow:hidden;border-top-left-radius:3px;border-top-right-radius:3px}.n2-modal-title .n2-h2{text-align:center;margin:0 58px;height:59px;overflow:hidden}.n2-modal-title .n2-i{position:absolute;top:0;cursor:pointer;font-size:32px;color:#a1aeb5}.n2-modal-title .n2-i-a-back,.n2-modal-title .n2-i-a-deletes{margin:13px}.n2-modal-title .n2-i-a-deletes{right:0}.n2-modal-title .n2-i-a-back.n2-hidden,.n2-modal-title .n2-i-a-deletes.n2-hidden{display:none}.n2-modal-title .n2-i-a-back{left:0}.n2-modal-content{padding:0 20px 20px;color:#7b8898}.n2-modal-content h3.n2-center,.n2-modal-content p,.n2-tr.n2-modal-controls-1 .n2-td{text-align:center}.n2-modal-content .n2-form{margin:0 -10px}.n2-modal-content .n2-td{padding:0 10px}.n2-modal-controls{position:absolute;left:0;bottom:0;width:100%;margin:20px 0}.n2-modal-controls .n2-table{width:100%}.n2-modal-controls .n2-td{padding:0 20px}.n2-tr.n2-modal-controls-2 .n2-td{width:50%}.n2-tr.n2-modal-controls-2 .n2-modal-controls-0{text-align:right}.n2-tr.n2-modal-controls-2 .n2-modal-controls-1{text-align:left}.n2-modal-controls-side .n2-tr.n2-modal-controls-2 .n2-modal-controls-0{text-align:left;vertical-align:middle}.n2-modal-controls-side .n2-tr.n2-modal-controls-2 .n2-modal-controls-1{text-align:right}.n2-modal-content .n2-table-pane{margin:20px 0}.n2-modal-content .n2-table-pane td{cursor:pointer;padding:20px;border:3px solid #fff;border-radius:3px;transition:all .3s}.n2-modal-content .n2-table-pane td:HOVER{border-color:#dee1e5}.n2-modal-content h3{color:#7b8898;font-weight:400;margin:20px 0 10px}.n2-modal-content p{font-size:11px}.n2-modal-active{overflow:hidden!important}.n2-modal-simple{cursor:pointer}.n2-modal-simple .n2-modal-window{left:0;top:0;cursor:default;width:100%;height:100%}.n2-modal-simple .n2-i-a-deletes{position:absolute;top:19px;right:30px;color:#a4b0b7;font-size:32px;z-index:2}.n2-lb-header{position:relative;background-color:#fff;border-bottom:1px solid #e0e6ed;z-index:10}.n2-modal-simple-header{line-height:40px;padding:15px 30px;color:#6b7989;font-size:24px}.n2-modal-simple .n2-modal-simple-header{padding:20px 30px 0}.n2-modal .n2-mixed-label{margin:20px 0 10px}.n2-modal .n2-mixed-label label{color:#7b8898;font-weight:400;font-size:14px}.n2-modal-radio{text-align:left;margin:0 -20px;overflow:auto}.n2-modal-radio-option{width:112px;height:70px;display:inline-block;margin:0 35px 50px;cursor:pointer;background-position:0 0;text-align:center}.n2-modal-radio-option.n2-active{cursor:default;background-position:0 -80px}.n2-modal-radio-option div{color:#7b8898;margin:75px -20px 0}.n2-modal-radio-option.n2-active div{color:#0c92df}.n2-modal iframe{max-width:none;border:0}.n2-lightbox-heading{color:#fff;line-height:61px;text-align:center;border-bottom:1px solid #2e3742;border-right:0}.n2-sidebar-row{line-height:58px;border-bottom:1px solid #333e4a;padding:0 10px}.n2-sets-header .n2-td{padding:0 10px}.n2-sets-header .n2-td>*{vertical-align:middle}.n2-sets-header .n2-h3,.n2-sets-header .n2-h4{color:#b2bfc9}.n2-sets-header .n2-form{display:inline-block;margin:0}.n2-sets-header .n2-form .n2-form-element-list{margin-bottom:0}.n2-sidebar-heading .n2-h3{color:#fff;margin:0 10px}.n2-lightbox-container{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:RGBA(43,52,63,.9);padding:20px;z-index:100002;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.n2-lightbox-container .n2-lightbox{width:100%;height:100%;overflow:hidden}.n2-lightbox-container .n2-content-area,.n2-lightbox-sidebar-list{overflow:auto}.n2-lightbox-container .n2-top-bar{margin-right:0}.n2-lightbox-container .n2-content-area{min-height:0}.n2-lightbox-no-sidebar .n2-blue-logo-bg{background:#3c4958;padding:0 30px;text-align:left}.n2-lightbox-no-sidebar .n2-sidebar{border-right-color:#3c4958}.n2-visual-editor-preview-tab,.n2-visual-editor-tabs{text-align:right;vertical-align:middle}html[dir=rtl] .n2-manage-set,html[dir=rtl] .n2-visual-editor-preview-tab,html[dir=rtl] .n2-visual-editor-tabs{text-align:left}.n2-visual-editor-preview-tab .n2-form-element-radio-tab,.n2-visual-editor-tabs .n2-form-element-radio-tab{vertical-align:baseline}.n2-editor-background-color{display:inline-block;height:28px;vertical-align:middle}#n2-font-editor-preview,#n2-style-editor-preview{padding:20px}#n2-animation-editor-preview{position:relative;height:500px;resize:vertical;overflow:hidden}.n2-animation-preview-box{position:absolute;top:50%;left:50%;background-color:#000;background-size:cover}#n2-animation-editor-tab-add,#n2-animation-editor-tab-delete{padding:0;width:28px;vertical-align:middle}.n2-ss-dashboard{max-width:1240px}.n2-form-tab.n2-editor-preview-box{background-color:#ced3d5}.n2-manage-set{text-align:right}.n2-browse-container{height:100%;overflow:auto;margin:0 -20px;transition:opacity .4s;opacity:1}.n2-browse-container.n2-drag-over{opacity:.3}.n2-browse-container .n2-browse-box{position:relative;width:140px;height:140px;border-radius:3px;float:left;margin:10px;cursor:pointer;text-align:center;color:#cdd3d7;overflow:hidden}.n2-browse-container .n2-browse-box>.n2-i{font-size:48px;line-height:134px}.n2-browse-container .n2-browse-upload{margin:7px;width:300px;overflow:hidden;border:3px dashed #dbe0e3}.n2-browse-container .n2-browse-upload div{text-align:center;line-height:30px;margin-top:32px;color:#7b8898}.n2-browse-container .n2-browse-upload input{font-size:200px;height:200px;position:absolute;left:0;top:0;opacity:0;cursor:pointer}.n2-browse-container .n2-browse-directory{box-shadow:0 0 0 3px #dbe0e3}.n2-browse-container .n2-browse-image{background-size:contain;background-repeat:no-repeat;background-color:#f3f5f7}.n2-browse-container .n2-browse-image.n2-active{box-shadow:0 0 0 3px #0c92df}.n2-browse-container .n2-browse-image .n2-button{position:absolute;top:5px;right:5px;padding:0;width:24px;display:none}.n2-browse-container .n2-browse-image.n2-active .n2-button{display:inline-block}.n2-browse-container .n2-browse-box .n2-browse-title{position:absolute;left:0;bottom:0;width:124px;padding:5px;height:30px;line-height:30px;text-align:center;color:#95a0ad;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-browse-container .n2-browse-image .n2-browse-title{color:#e8ebed;background-color:#212d3a;background-color:RGBA(43,52,63,.9);width:130px}.sumome-badge-hint{display:none}.n2-result{margin-bottom:20px}.n2-ss-back-to:before{font-family:'Nextend'!important;font-size:16px;vertical-align:top;content:"\e92e";margin:0 4px;color:#7b8898}.n2-ui-autocomplete.ui-autocomplete{z-index:1000000;max-height:300px;overflow:auto;position:absolute;background:#fff;border:2px solid #0c92df;color:#7b8898;font-size:11px;margin:5px 0;border-radius:0;box-shadow:none;list-style-type:none;padding:0}.n2-ui-autocomplete .ui-menu-item{line-height:20px;padding:0 5px;cursor:pointer}.n2-ui-autocomplete .ui-menu-item.ui-state-focus{background:#e9edf0;border:0;margin:0;color:#7b8898;font-weight:400}.n2-nav{position:relative;z-index:11;display:flex}.n2 .ui-slider .ui-slider-handle:focus{outline:none}.n2-form{margin-bottom:20px;border-top:1px solid transparent;margin-top:-1px}.n2-form-dark .n2-content-box-title-bg{background-color:#4d5d70}.n2-form-tab{background:#fff;margin:20px 20px 0;border:1px solid #ccd1d6;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-form-dark .n2-form-tab{background:#4d5d70;margin:0;border:0}.n2-form-tab>.n2-description{margin:20px}.n2-form-dark .n2-form-tab>table{border-bottom:1px solid #303b47}.n2-form-tab .n2-heading-controls,.n2-form-tab>.n2-h2{position:relative;padding:0 20px;color:#6b7989;line-height:54px;border-bottom:1px solid #ccd1d6;z-index:2}.n2-form-tab .n2-heading-controls{min-height:54px}.n2-form-tab table{width:100%;border-spacing:0;border-collapse:collapse;table-layout:fixed;margin-top:-1px}.n2-form-tab-horizontal{padding:20px 20px 0}.n2-form .n2-hidden,.n2-hidden{display:none!important}.n2-label-col{width:251px}.n2-form-dark .n2-label-col{width:136px}.n2-label{width:210px;background-color:#f9fafb;border:1px solid #dee1e5;border-width:1px 1px 0 0;padding:14px 20px;line-height:20px;color:#7b8898;font-size:12px}.n2-label label{color:#7b8898;display:inline-block;margin:0;font-size:100%}.n2-form-element-mixed label .n2-i,.n2-label label .n2-i{font-size:16px;vertical-align:middle}.n2-label label[data-n2tip]:after{font-family:'Nextend'!important;content:"\e620";font-size:16px;vertical-align:top;margin:0 5px;color:#b0b9bf}html[dir=rtl] .n2-label{border-width:1px 0 0 1px}.n2-form-dark .n2-label{width:102px;background-color:#3c4958;border-color:#303b47;color:#b2bfc9}.n2-form-dark .n2-label label{color:#b2bfc9}.n2-documentation,.n2-documentation:ACTIVE,.n2-documentation:FOCUS,.n2-documentation:HOVER{display:inline-block;color:#b9c3c9}.n2-i-info{vertical-align:middle;font-size:16px;margin:0;padding:10px 5px}.n2-form-dark .n2-i-info{color:RGBA(150,167,180,.8)}.n2-element{border-top:1px solid #dee1e5;padding:10px 10px 0}.n2-form-dark .n2-element{border-top:1px solid #414e5e}.n2-element>div{position:relative}.n2-element .n2-element-plain{margin-bottom:10px;color:#6b7989;font-size:12px}.n2 input,.n2 select,.n2 textarea{padding:0;width:auto;box-shadow:none;transition:none;font-family:"Montserrat",Arial,sans-serif}.n2-form input[disabled],.n2-form input[readonly],.n2-form select[disabled],.n2-form select[readonly],.n2-form textarea[disabled],.n2-form textarea[readonly]{background:0 0}.n2-form input,.n2-form textarea{box-sizing:border-box}.n2-form-element-button,.n2-form-element-button:active,.n2-form-element-button:hover,.n2-form-element-button:link,.n2-form-element-button:visited{vertical-align:top;display:inline-block;height:28px;line-height:28px;background-color:#51b82d;color:#fff;padding:0 11px;margin:-2px -2px -2px 0;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-element-button-inverted,.n2-form-element-button-inverted:active,.n2-form-element-button-inverted:hover,.n2-form-element-button-inverted:link,.n2-form-element-button-inverted:visited,html[dir=rtl] .n2-form-element-button,html[dir=rtl] .n2-form-element-button:active,html[dir=rtl] .n2-form-element-button:hover,html[dir=rtl] .n2-form-element-button:link,html[dir=rtl] .n2-form-element-button:visited{margin:-2px 0 -2px -2px;border-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}html[dir=rtl] .n2-form-element-button-inverted,html[dir=rtl] .n2-form-element-button-inverted:active,html[dir=rtl] .n2-form-element-button-inverted:hover,html[dir=rtl] .n2-form-element-button-inverted:link,html[dir=rtl] .n2-form-element-button-inverted:visited{margin:-2px -2px -2px 0;border-radius:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-element-button-inverted.n2-icon-button:active,.n2-form-element-button-inverted.n2-icon-button:hover,.n2-form-element-button-inverted.n2-icon-button:link,.n2-form-element-button-inverted.n2-icon-button:visited,.n2-form-element-button.n2-icon-button{font-size:16px;min-width:28px;padding:0;text-align:center}.n2-form-element-clear,.n2-form-element-clear:active,.n2-form-element-clear:hover,.n2-form-element-clear:link,.n2-form-element-clear:visited{display:inline-block;height:24px;line-height:24px;width:28px;vertical-align:top;font-size:16px;text-align:center}.n2-form-element-text{display:inline-block;border:2px solid #a1aeb5;margin:0 10px;background:#fff;white-space:nowrap;vertical-align:top;height:24px}.n2-form-dark .n2-form-element-text{border-color:#28313a;background:#303b47}.n2-form .n2-form-element-text{margin-bottom:10px}.n2-form-element-text.focus{border-color:#0c92df}.n2-form-element-option-chooser input[type],.n2-form-element-text input,.n2-form-element-text input:focus,.n2-form-element-text input[type],.n2-form-element-text input[type]:focus{display:inline-block;margin:0 5px;padding:0;border:0;box-shadow:none;height:24px;line-height:24px;color:#7b8898;vertical-align:top}.n2-form-dark .n2-form-element-text input,.n2-form-dark .n2-form-element-text input:focus{background:#303b47;color:#b2bfc9}.n2-form-element-autocomplete.n2-form-element-number .ui-autocomplete .ui-menu-item,.n2-form-element-number input{text-align:center}.n2-form-element-text .n2-text-sub-label,.n2-form-element-text .n2-text-unit{display:inline-block;padding:0 5px;background-color:#a1aeb5;height:24px;line-height:24px;vertical-align:top;color:#fff}.n2-form-element-text .n2-text-unit,html[dir=rtl] .n2-form-element-text .n2-text-sub-label{margin-right:-2px;margin-left:0}.n2-form-element-text .n2-text-sub-label,html[dir=rtl] .n2-form-element-text .n2-text-unit{margin-right:0;margin-left:-2px}.n2-form-dark .n2-form-element-text .n2-text-sub-label,.n2-form-dark .n2-form-element-text .n2-text-unit{background:#28313a;color:#9aa7b2}.n2-form-element-text.focus .n2-text-sub-label,.n2-form-element-text.focus .n2-text-unit{background-color:#0c92df;color:#fff}.n2-form-element-text .n2-form-element-preview{display:inline-block;margin:1px;width:20px;height:20px;background-size:cover;border:1px solid rgba(0,0,0,.2);vertical-align:top}.n2-form-element-connected .n2-form-element-text{position:relative;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0;border-right-width:1px}.n2-form-element-connected .n2-form-element-text+.n2-form-element-text{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:1px}.n2-form-element-connected-marginpadding{margin-left:10px}.n2-form-element-connected-marginpadding .n2-text-sub-label{display:inline-block;border:2px solid #28313a;border-right-width:1px;background:#28313a;height:24px;line-height:24px;color:#9aa7b2;vertical-align:top;padding:0 5px;border-top-left-radius:3px;border-bottom-left-radius:3px;font-size:16px;cursor:pointer}.n2-form-element-connected-marginpadding.n2-values-linked .n2-text-sub-label .n2-i:before{content:'\e64d'}.n2-form-element-connected-marginpadding .n2-form-element-text{position:relative;border-radius:0;margin-right:0;margin-left:0;border-left-width:1px;border-right-width:1px}.n2-form-element-connected-marginpadding.n2-values-linked .n2-form-element-text+.n2-form-element-text{display:none}.n2-form-element-text .n2-ui-slider-container{display:none;position:absolute;top:24px;width:100%;min-width:70px;border:2px solid #a1aeb5;border-radius:3px;background-color:#fff;margin:0 -2px;z-index:2}.n2-form-dark .n2-form-element-text .n2-ui-slider-container{border:2px solid #28313a;background:#303b47}.n2-form-element-text.focus .n2-ui-slider-container{border:2px solid #0c92df}.n2-form-element-text.n2-active .n2-ui-slider-container,.n2-form-element-text:HOVER .n2-ui-slider-container{display:block}.n2-form-element-text .ui-slider{position:relative;background:#a1aeb5;height:6px;margin:10px;border-radius:10px}.n2-form-dark .n2-form-element-text .ui-slider{background:#526a80}.n2-form-element-text .ui-slider .ui-slider-handle{position:absolute;top:0;z-index:2;width:10px;height:10px;-ms-touch-action:none;touch-action:none;background:#fff;border:2px solid #a1aeb5;margin:-4px -7px 0;border-radius:50px;cursor:ew-resize}.n2-form-dark .n2-form-element-text .ui-slider .ui-slider-handle{border:2px solid #526a80}.n2-form-element-file input[type=file],.n2-form-element-file input[type=file]:focus{padding:0;height:24px;line-height:24px;margin:0}.n2-form-element-preview-fixed{position:relative;height:96px;border:2px solid #303b47;background-position:50% 50%;background-size:contain;background-repeat:no-repeat;margin:0 10px;overflow:hidden;cursor:pointer;width:300px}.n2-form-element-preview-fixed .n2-button{display:none;position:absolute;top:3px;left:3px}.n2-form-element-preview-fixed:HOVER .n2-button{display:block}.n2-form-element-preview-fixed+div{display:inline-block}.n2-form-element-autocomplete .ui-autocomplete{position:absolute;min-width:100%!important;background:#fff;border:2px solid #0c92df;color:#7b8898;font-size:11px;margin:5px 0;border-radius:0;box-shadow:none;list-style-type:none;z-index:1000}.n2-form-element-autocomplete .ui-autocomplete .ui-menu-item{line-height:20px;padding:0 5px;cursor:pointer}.n2-form-element-autocomplete .ui-autocomplete .ui-menu-item.ui-state-focus{background:#e9edf0;border:0;margin:0;color:#7b8898;font-weight:400}.n2-form-element-autocomplete.ui-front{z-index:auto}.n2-form-element-textarea{display:inline-block;border:2px solid #a1aeb5;margin:0 10px}.n2-form .n2-form-element-textarea{margin-bottom:10px}.n2-form-dark .n2-form-element-textarea{border-color:#28313a;background-color:#303b47}.n2-form-element-textarea.focus{border-color:#0c92df}.n2-form-element-textarea textarea,.n2-form-element-textarea textarea:focus{margin:0;padding:2px 6px;border:0;display:inline-block;color:#7b8898;vertical-align:top;min-height:24px}.n2-form-dark .n2-form-element-textarea textarea,.n2-form-dark .n2-form-element-textarea textarea:focus{background:#303b47;color:#b2bfc9}.n2-textarea-rich{background:#4d5d70;border-bottom:2px solid #28313a;height:32px;color:#fff;font-size:16px;line-height:32px}.n2-textarea-rich>div{display:inline-block;width:32px;text-align:center;border-right:2px solid #28313a;cursor:pointer}.n2-form-element-option-chooser{display:inline-block;border:2px solid #a1aeb5;margin:0 10px;background:#fff}.n2-form .n2-form-element-option-chooser{margin-bottom:10px}.n2-form-dark .n2-form-element-option-chooser{border-color:#28313a;background:#303b47}.n2-form-element-option-chooser input{display:inline-block;margin:0 5px;border:0;box-shadow:none;height:24px;line-height:24px;color:#7b8898;width:120px}.n2-form-dark .n2-form-element-option-chooser input{background:#303b47;color:#b2bfc9}.n2-form-element-color input{text-transform:uppercase;width:50px;text-align:center}.n2-form-element-color-alpha input{width:70px}.n2-form-element-connected,.n2-form-element-mixed,.n2-form-element-onoff,.n2-form-element-onoff *{display:inline-block}.n2-form-element-mixed .n2-mixed-group{display:inline-block;vertical-align:top}.n2-form-element-mixed .n2-mixed-label{line-height:14px}.n2-form-element-mixed label{margin:0 10px;color:#7b8898;font-size:10px;display:inline-block}.n2-form-dark .n2-form-element-mixed label{color:#b2bfc9}.n2-mixed-element>div{position:relative}.n2-form-element-onoff{position:relative;background:#9aa8af;width:44px;height:24px;margin:2px 10px;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;overflow:hidden;cursor:pointer}.n2-form .n2-form-element-onoff{margin-bottom:7px}.n2-form-element-onoff.n2-onoff-on{background:#51b82d}.n2-form-element-onoff .n2-onoff-slider{position:absolute;top:3px;left:0;width:88px;height:18px;-webkit-transition:left .25s;transition:left .25s}.n2-form-element-onoff .n2-onoff-slider *{vertical-align:top}.n2-form-element-onoff.n2-onoff-on .n2-onoff-slider{left:-18px}html[dir=rtl] .n2-form-element-onoff .n2-onoff-slider{left:-44px}html[dir=rtl] .n2-form-element-onoff.n2-onoff-on .n2-onoff-slider{left:-26px}.n2-form-element-onoff .n2-onoff-no{font-size:16px}.n2-form-element-onoff .n2-onoff-no,.n2-form-element-onoff .n2-onoff-yes{width:14px;line-height:18px;color:#fff}.n2-form-element-onoff .n2-onoff-slider .n2-i{line-height:inherit}.n2-form-element-onoff .n2-onoff-no{margin:0 4px}.n2-form-element-onoff .n2-onoff-yes{font-size:14px;margin:0 3px}.n2-form-element-onoff .n2-onoff-round{width:18px;height:18px;background-color:#fff;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;box-shadow:0 0 0 1px RGBA(0,0,0,.1)}.n2-form-element-onoff-button{display:inline-block;border-radius:3px;background-color:#909ca3;line-height:28px;overflow:hidden;cursor:pointer}.n2-form-element-onoff-button .n2-onoffb-label{display:inline-block;color:#fff;font-size:11px;padding:0 10px;line-height:28px}.n2-form-element-onoff-button .n2-onoffb-container{background-color:#a1aeb5;width:32px;height:28px;display:inline-block}.n2-form-element-onoff-button *{vertical-align:top;display:inline-block}.n2-form-element-onoff-button .n2-onoffb-slider{position:relative;border-radius:4px;background-color:#6b7986;width:20px;height:8px;margin:10px 6px}.n2-form-element-onoff-button.n2-onoff-on .n2-onoffb-slider{background-color:#40b618}.n2-form-element-onoff-button .n2-onoffb-round{position:absolute;left:10px;top:-1px;border-radius:5px;width:10px;height:10px;background:#fff;-webkit-transition:left .25s;transition:left .25s}.n2-form-element-onoff-button.n2-onoff-on .n2-onoffb-round{left:0}.n2-form-element-switcher,.n2-form-element-switcher *{display:inline-block}.n2-form-element-switcher{margin:0 10px}.n2-form .n2-form-element-switcher{margin-bottom:10px}.n2-form-element-switcher .n2-switcher-unit{background-color:#a1aeb5;line-height:28px;color:#fff;padding:0 8px;cursor:pointer;border-right:1px solid #b9c3c9}.n2-form-dark .n2-form-element-switcher .n2-switcher-unit{border-color:#28313a;background-color:#303b47;color:#9aa7b2}.n2-form-element-switcher .n2-switcher-unit.n2-active{background-color:#0c92df;cursor:default;color:#fff}.n2-form-element-switcher .n2-switcher-unit.n2-first{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}.n2-form-element-switcher .n2-switcher-unit.n2-last{-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-right:0}.n2-form-element-units{display:inline-block;position:relative;color:#fff}.n2-form-dark .n2-form-element-units{color:#9aa7b2}.n2-form-element-units .n2-element-current-unit{display:inline-block;padding:0 5px;background-color:#a1aeb5;height:24px;line-height:24px;vertical-align:top;border:2px solid #a1aeb5;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-dark .n2-form-element-units .n2-element-current-unit{background-color:#28313a;border:2px solid #28313a}.n2-element-units{display:none;position:absolute;left:0;top:28px;line-height:28px;background-color:#a1aeb5;padding:0 7px;z-index:10000}.n2-form-dark .n2-element-units{background-color:#28313a}.n2-form-element-units:HOVER .n2-element-units{display:block}.n2-element-units>*{cursor:pointer;text-align:center}.n2-form .n2-form-element-radio{margin-bottom:10px}.n2-form-element-radio,.n2-form-element-radio *{display:inline-block}.n2-form-element-radio .n2-radio-option{color:#7b8898;margin:5px 10px;cursor:pointer;line-height:18px;vertical-align:top}.n2-form-dark .n2-form-element-radio .n2-radio-option{color:#b2bfc9}.n2-form-element-radio .n2-radio-option.n2-active{cursor:default}.n2-form-element-radio .n2-radio-option-marker{width:14px;height:14px;border:2px solid #bcc6cb;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;margin-right:5px;-webkit-transition:border-color .25s,background-color .25s;transition:border-color .25s,background-color .25s;background-color:#fff;font-size:12px;line-height:14px;color:#fff;vertical-align:top;text-align:center}html[dir=rtl] .n2-form-element-radio .n2-radio-option-marker{margin-left:5px;margin-right:0}.n2-form-dark .n2-form-element-radio .n2-radio-option-marker{border-color:#28313a;background-color:#4d5d70}.n2-form-element-radio .n2-radio-option-marker .n2-i{-webkit-transition:opacity .25s;transition:opacity .25s;opacity:0}.n2-form-element-radio .n2-radio-option.n2-active .n2-radio-option-marker{border-color:#6fbc49;background-color:#6fbc49}.n2-form-element-radio .n2-radio-option.n2-active .n2-radio-option-marker .n2-i{opacity:1}.n2-form-element-radio .n2-radio-option.n2-active .n2-radio-option-marker+span{vertical-align:top}.n2-imagelist .n2-form-element-radio,.n2-imagelist img{max-width:100%}.n2-imagelist .n2-radio-option{border:4px solid #b8c2cd;padding:4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;vertical-align:middle}.n2-imagelist .n2-imagelist-option{line-height:0;background:#b8c2cd;max-width:94%}.n2-white .n2-imagelist .n2-imagelist-option{background:#fff}.n2-imagelist .n2-radio-option.n2-active{border-color:#0c92df}.n2-imagelistlabel .n2-radio-option{position:relative;width:110px;height:70px;background:center 0 no-repeat;padding:0;border:0;border-radius:0;margin-top:10px;margin-bottom:10px}.n2-imagelistlabel .n2-radio-option span{text-align:center;position:absolute;bottom:-8px;left:0;display:block;width:100%;line-height:20px}.n2-imagelistlabel .n2-radio-option.n2-active{background-position:center -70px;color:#0c92df}.n2-form-element-radio-tab{margin:0 10px;line-height:28px;vertical-align:middle!important;height:28px;display:inline-block}.n2-form .n2-form-element-radio-tab{margin-bottom:10px}.n2-form-element-radio-tab>div{float:left}.n2-form-element-radio-tab .n2-radio-option,.n2-form-element-radio-tab .n2-radio-option-label{padding:0 10px;text-align:center;background:#8e9ea7;color:#fff;vertical-align:top;text-transform:uppercase}.n2-form-element-radio-tab .n2-radio-option{cursor:pointer}.n2-form-element-radio-tab .n2-radio-option-label{background:#909ca3;cursor:default}.n2-form-dark .n2-form-element-radio-tab .n2-radio-option{background:#28313a;color:#9aa7b2}.n2-form-element-radio-tab .n2-radio-option.n2-active{background:#0c92df;color:#fff}.n2-form-element-radio-tab .n2-radio-option-label.n2-first,.n2-form-element-radio-tab .n2-radio-option.n2-first{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}.n2-form-element-radio-tab .n2-radio-option-label.n2-last,.n2-form-element-radio-tab .n2-radio-option.n2-last{-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-element-list{margin:0 10px;display:inline-block}.n2-form .n2-form-element-list{margin-bottom:10px}.n2 .n2-form-element-list select{padding:0;margin:0;height:24px;border:2px solid #b9c3c9;background:0 0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.n2 .n2-form-element-list select[multiple]{height:auto}.n2 .n2-form-dark .n2-form-element-list select{border:2px solid #28313a;background:#303b47;color:#b2bfc9}.n2 .n2-form-element-list select:focus{box-shadow:none}.n2 .n2-form-element-list select{font-weight:400;font-size:12px;color:#7b8898}.n2 .n2-form-element-list select option{padding:0 5px}.n2-form-element-single-button{margin:0 10px}.n2-form .n2-form-element-checkbox,.n2-form .n2-form-element-single-button{margin-bottom:10px}.n2-form-element-checkbox{display:inline-block;margin:0 10px;white-space:nowrap}.n2-checkbox-option{display:inline-block;margin:0 3px;background:#8e9ea7;cursor:pointer;line-height:28px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-checkbox-option.n2-first{margin-left:0}.n2-checkbox-option.n2-last{margin-right:0}.n2-form-dark .n2-checkbox-option{background:#28313a;color:#9aa7b2}.n2-form-element-decoration{display:inline-block}.n2-form-element-decoration .n2-checkbox-option,.n2-form-element-icon-radio .n2-radio-option,.n2-form-element-textalign .n2-radio-option{width:28px;height:28px;line-height:28px;text-align:center;font-size:16px;color:#fff;padding:0}.n2-form-dark .n2-form-element-decoration .n2-checkbox-option,.n2-form-dark .n2-form-element-icon-radio .n2-radio-option{color:#9aa7b2}.n2-checkbox-option.n2-active,.n2-form-dark .n2-checkbox-option.n2-active,.n2-form-dark .n2-form-element-icon-radio .n2-radio-option.n2-active{background:#0c92df;color:#fff}.n2-form-element-img+a,.n2-form-element-img+a+a{margin-right:10px}.n2-form-element-icon{display:inline-block;margin:0 10px;white-space:nowrap}.n2-form .n2-form-element-icon{margin-bottom:10px}.n2-form-element-icon .n2-form-element-preview{margin-right:3px;border:0;width:22px;height:22px;text-align:center;line-height:22px}.n2-form-element-icon .n2-form-element-preview>.n2i{color:#fff;font-size:22px;vertical-align:top}.n2-icons-modal .n2-modal-content{overflow:auto!important}.n2-icons-modal .n2-icon{display:inline-block;margin:5px;width:32px;height:32px;cursor:pointer;font-size:24px;line-height:32px;text-align:center;color:#000}.n2-icons-modal .n2-modal-content{}.n2-icons-modal .n2-modal-content .n2-form-tab:last-child{margin-bottom:40px}.n2-subform-image .n2-subform-image-option{display:inline-block;width:150px;height:120px;padding:30px 3%;color:#7b8898}.n2-subform-image .n2-subform-image-option .n2-subform-image-element{width:150px;height:90px;cursor:pointer}.n2-subform-image .n2-subform-image-option.n2-active .n2-subform-image-element{background-position:0 -100px;cursor:default}.n2-subform-image .n2-subform-image-option .n2-subform-image-title{text-align:center;margin-top:10px}.n2-subform-image .n2-subform-image-option.n2-active{color:#0c92df}.n2-subform-image.n2-small .n2-subform-image-option .n2-subform-image-element{width:100px;height:70px}.n2-subform-image.n2-small .n2-subform-image-option.n2-active .n2-subform-image-element{background-position:0 -80px}.n2-subform-image.n2-small .n2-subform-image-option{width:100px;height:100px}.n2-subform-image .n2-subform-image-option-simple{display:inline-block;width:190px;height:120px;border-radius:3px;border:5px solid #a1aeb5;margin:25px;padding:0;vertical-align:top}.n2-subform-image .n2-subform-image-option-simple.n2-active{border-color:#0c92df}.n2-subform-image .n2-subform-image-option-simple div.n2-subform-image-element{width:100%;height:100%;background-repeat:repeat-y}.n2-subform-image .n2-subform-image-option-simple.n2-active div.n2-subform-image-element{background-position:0 -120px}.n2-subform-2-rows{max-height:360px;overflow:auto;margin:-10px -10px 0}.n2-form-matrix{border-bottom-width:1px;border-radius:3px}.n2-form-matrix .n2-form-tab{border-radius:0}.n2-form-matrix>.n2-h2{padding:0}.n2-form-matrix .n2-form-matrix-menu{cursor:pointer;display:inline-block;margin:0 20px;vertical-align:top;line-height:60px;font-size:14px;color:#b2bfc9}.n2-form-matrix .n2-form-matrix-menu.n2-active{color:#fff}.n2-form-matrix .n2-form-matrix-menu.n2-has-underline>.n2-underline::after{bottom:-10px;color:#0c92df}#n2-css-basiccss.n2-basiccss-show-preset-list #n2-tab-basiccssfont,#n2-css-basiccss.n2-basiccss-show-preset-list #n2-tab-basiccssstyle,.n2-form-matrix-pane{display:none}.n2-form-matrix>.n2-form-matrix-views{z-index:4;padding:0 20px;background:#212d3a;margin:-1px -1px 0;border-top-left-radius:3px;border-top-right-radius:3px}#n2-tab-basiccssfont.n2-css-has-font,#n2-tab-basiccssstyle.n2-css-has-style,.n2-form-matrix-pane.n2-active{display:block}.n2-form-matrix-pane .n2-form{margin-bottom:0}.n2-form-matrix-pane .n2-form-tab{border-width:0 0 1px;margin:0}.n2-form-matrix-pane .n2-form-tab>.n2-h2{font-size:14px}#n2-tab-basiccssfont,#n2-tab-basiccssstyle{display:none;background:#3c4958}#n2-tab-basiccssfont>.n2-h2,#n2-tab-basiccssstyle>.n2-h2,.n2-editor-header.n2-h2{padding:0;line-height:43px;background:#28313a;border-bottom:1px solid #20282f}#n2-tab-basiccssfont>.n2-h2,#n2-tab-basiccssstyle>.n2-h2{margin-bottom:5px}.n2-editor-header>span{position:relative;font-size:11px;display:inline-block;vertical-align:top;color:#b2bfc9}.n2-css-name{color:#b2bfc9}.n2-css-name,.n2-css-tab,.n2-editor-header .n2-ss-button-container,.n2-editor-header .n2-ss-button-container-left{position:relative;font-size:11px;display:inline-block;vertical-align:top}.n2-editor-header .n2-ss-button-container{float:right;color:#fff}.n2-editor-header .n2-ss-button-container-left{color:#fff;float:left}.n2-css-tab{float:right;color:#fff}.n2-editor-header .n2-ss-button-container-left>*{margin-left:10px;vertical-align:middle}#n2-tab-basiccssfont .n2-css-tab,#n2-tab-basiccssstyle .n2-css-tab{overflow:hidden;height:24px;line-height:24px;border-radius:3px;margin:10px 10px 0 0}#n2-tab-basiccssfont .n2-css-tab-reset,#n2-tab-basiccssstyle .n2-css-tab-reset{display:none;float:right;margin:10px 10px 0 0}#n2-tab-basiccssfont.n2-css-show-reset .n2-css-tab-reset,#n2-tab-basiccssstyle.n2-css-show-reset .n2-css-tab-reset{display:inline-block}.n2-css-tab>*,.n2-editor-header .n2-ss-button-container>*{display:inline-block;padding:0 10px}.n2-editor-header .n2-ss-button-container{margin-right:10px}.n2-css-tab>.n2-button,.n2-editor-header .n2-ss-button-container>.n2-button{height:24px;line-height:24px;padding:0}.n2-editor-header .n2-ss-button-container>.n2-button-icon{height:28px;line-height:28px;width:28px;vertical-align:middle}.n2-css-tab>.n2-button-normal,.n2-editor-header .n2-ss-button-container>.n2-button-normal{padding:0 15px}.n2-css-name-label,.n2-editor-header>span{padding:0 10px}.n2-css-name .n2-css-name-list{display:none}.n2-css-name.n2-multiple .n2-css-name-label:after{content:"\e638";font-family:'Nextend'!important;vertical-align:top;margin:0 0 0 5px}.n2-css-name.n2-multiple .n2-css-name-list{position:absolute;left:0;top:34px;background:#28313a;white-space:nowrap}.n2-css-name.n2-multiple:HOVER .n2-css-name-list{display:block}.n2-css-name.n2-multiple .n2-css-name-list>*{white-space:nowrap;display:block;padding:0 10px;cursor:pointer}.n2-css-name.n2-multiple .n2-css-name-list>*:HOVER{background:#303b47}.n2-css-tab span{background:#6b7986;cursor:pointer;height:24px;line-height:24px}.n2-css-tab span.n2-active{background:#0c92df;cursor:default}#n2-tab-basiccssfont #layerfamily{max-width:none!important}#n2-tab-basiccsspresets{display:none}#n2-css-basiccss.n2-basiccss-show-preset-list #n2-tab-basiccsspresets{display:block}#n2-tab-basiccsspresets div div{line-height:30px;background-color:#303b47;border-bottom:1px solid RGBA(0,0,0,.2);color:#fff;cursor:pointer;padding:0 20px}#n2-tab-basiccsspresets div div:HOVER{background:#1681c1}.n2-basiccss-more{background:#303b47;line-height:28px;height:28px;vertical-align:top;margin-top:15px;float:right;margin-right:23px;color:#9aa7b2}.n2-notification-center-modal{background-color:RGBA(43,52,63,.9);width:100%;height:100%;position:fixed;left:0;top:0;display:none;z-index:2147483646}.n2-notification-center-modal.n2-active,.n2-notification-center-modal.n2-active .n2-notification-center{display:block}.n2-notification-center{display:none;position:absolute;top:61px;right:0;width:370px;background:#fff;border:1px solid #ccd1d6;border-top:0;opacity:0}.n2-notification-center-modal .n2-notification-center{display:none;position:absolute;left:50%;right:auto;top:50%;margin-left:-185px;margin-top:-63px;opacity:1}.n2-notification-settings{position:relative;background:#f2f5fa;border-top:1px solid #ccd1d6;height:44px}.n2-notification-clear{position:absolute;left:10px;top:10px}.n2-notification-important{position:absolute;right:10px;top:13px;cursor:pointer}.n2-notification-important span{vertical-align:top;padding:0 10px;color:#6b7989}.n2-checkbox{display:inline-block;width:14px;height:14px;background:#f2f5fa;border:2px solid #b9c3c9;border-radius:2px;vertical-align:top}.n2-checkbox .n2-i{color:#f2f5fa;font-size:14px;margin:0;padding:0;vertical-align:top}.n2-active>.n2-checkbox{background:#6fbc49;border-color:#6fbc49}.n2-active>.n2-checkbox .n2-i{color:#fff}.n2-notification-message{border-top:1px solid #ccd1d6}.n2-notification-message .n2-td{padding:22px 0}.n2-notification-message .n2-first{width:62px}.n2-notification-message .n2-i{vertical-align:middle;margin:0 10px;font-size:32px}.n2-notification-message h4{margin:0}.n2-notification-message p{color:#7b8898;margin:0}.n2-notification-message-error,.n2-notification-message-error h4{color:#c54633}.n2-notification-message-success,.n2-notification-message-success h4{color:#50aa31}.n2-notification-message-notice,.n2-notification-message-notice h4{color:#0c92df}.n2-notification-empty{color:#7b8898;margin:20px;text-align:center}.n2-loader-overlay{display:none;position:fixed;width:100%;height:100%;left:0;top:0;z-index:2147483647;background-color:RGBA(43,52,63,.9)}.n2-loader-overlay.n2-active{display:block}.n2-loader{position:absolute;left:50%;top:50%;margin-left:-20px;margin-top:-20px;border:10px solid rgba(255,255,255,.2);border-left-color:#fff;-webkit-animation:n2-load 1.1s infinite linear;animation:n2-load 1.1s infinite linear;overflow:hidden}.n2-loader,.n2-loader:after{border-radius:50%;width:40px;height:40px}@-webkit-keyframes n2-load{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes n2-load{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.n2-sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:2147483647;overflow:hidden}.n2-sp-container.n2-sp-flat,.n2-sp-top{position:relative}.n2-sp-top{width:100%;display:inline-block}.n2-sp-top-inner{left:0;right:0;margin-bottom:5px}.n2-sp-color,.n2-sp-hue,.n2-sp-top-inner{position:absolute;top:0;bottom:0}.n2-sp-color{margin-right:5px;left:0;right:20%}.n2-sp-hue{right:0;left:84%;height:100%;box-shadow:0 0 1px 1px rgba(0,0,0,.2)inset}.n2-sp-fill{padding-top:80%}.n2-sp-sat,.n2-sp-val{position:absolute;top:0;left:0;right:0;bottom:0;box-shadow:0 0 1px 1px rgba(0,0,0,.2)inset}.n2-sp-alpha-enabled .n2-sp-top{margin-bottom:18px}.n2-sp-alpha-enabled .n2-sp-alpha{display:block}.n2-sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:7px;left:50%;cursor:pointer;box-shadow:0 0 0 1px RGBA(0,0,0,.4);background:#fff;border-radius:2px}.n2-sp-alpha{display:none;bottom:-14px;right:0;left:0;height:8px}.n2-sp-alpha-inner{background:-moz-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:-webkit-gradient(linear,left top,right top,color-stop(25%,rgba(0,0,0,0)),color-stop(100%,#000));background:-webkit-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:-o-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:-ms-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:linear-gradient(to right,rgba(0,0,0,0)25%,#000 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#000000', GradientType=1);box-shadow:0 0 1px 1px rgba(0,0,0,.2)inset}.n2-sp-alpha,.n2-sp-alpha-handle,.n2-sp-container,.n2-sp-container button,.n2-sp-container.n2-sp-dragging .n2-sp-input,.n2-sp-dragger,.n2-sp-preview,.n2-sp-replacer,.n2-sp-slider{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.n2-sp-container.n2-sp-buttons-disabled .n2-sp-button-container,.n2-sp-container.n2-sp-input-disabled .n2-sp-input-container,.n2-sp-initial-disabled .n2-sp-initial,.n2-sp-palette-disabled .n2-sp-palette-container,.n2-sp-palette-only .n2-sp-picker-container{display:none}.n2-sp-sat{background-image:-webkit-gradient(linear,0 0,100% 0,from(#fff),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.n2-sp-val{background-image:-webkit-gradient(linear,0 100%,0 0,from(#000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.n2-sp-hue{background:-moz-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-ms-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-o-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-webkit-gradient(linear,left top,left bottom,from(red),color-stop(.17,#ff0),color-stop(.33,#0f0),color-stop(.5,#0ff),color-stop(.67,#00f),color-stop(.83,#f0f),to(red));background:-webkit-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}.n2-sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.n2-sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.n2-sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.n2-sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.n2-sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.n2-sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.n2-sp-cf:after,.n2-sp-cf:before{content:"";display:table}.n2-sp-cf:after{clear:both}.n2-sp-cf{*zoom:1}@media (max-device-width:480px){.n2-sp-color{right:40%}.n2-sp-hue{left:63%}.n2-sp-fill{padding-top:60%}}.n2-sp-dragger,.n2-sp-slider{position:absolute;top:0;cursor:pointer;background:#fff;box-shadow:0 0 0 1px RGBA(0,0,0,.4)}.n2-sp-dragger{width:12px;transform:translateX(6px) translateY(6px);border-radius:12px;height:12px;left:0}.n2-sp-slider{height:6px;left:-2px;right:-2px;border-radius:2px;transform:translateY(3px)}.n2-sp-container{border-radius:3px;background-color:#fff;padding:0;border:2px solid #b9c3c9}.n2-sp-color,.n2-sp-container,.n2-sp-container button,.n2-sp-container input,.n2-sp-hue{font:12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.n2-sp-top{margin-bottom:3px}.n2-sp-input-container{float:right;width:100px;margin-bottom:4px}.n2-sp-initial-disabled .n2-sp-input-container{width:100%}.n2-sp-input{font-size:12px!important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:0 0;border-radius:3px;color:#222}.n2-sp-input:focus{border:1px solid orange}.n2-sp-input.n2-sp-validation-error{border:1px solid red;background:#fdd}.n2-sp-palette-container,.n2-sp-picker-container{float:left;position:relative;padding:10px 10px 300px;margin-bottom:-295px}.n2-sp-picker-container{width:172px}.n2-sp-palette-container{border-right:solid 1px #ccc}.n2-sp-palette-row{float:left}.n2-sp-palette-row-selection{border-left:1px solid rgba(0,0,0,.2);margin-left:7px;padding-left:5px}.n2-sp-palette .n2-sp-thumb-el{display:block;position:relative;clear:left;float:left;cursor:pointer}.n2-sp-palette .n2-sp-thumb-el.n2-sp-thumb-active,.n2-sp-palette .n2-sp-thumb-el:hover{border-color:orange}.n2-sp-initial{float:left;border:solid 1px #333}.n2-sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.n2-sp-button-container{float:right}.n2-sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:2px;border-radius:3px;display:inline-block;*zoom:1;*display:inline;color:#333;vertical-align:top}.n2-sp-replacer.n2-sp-active,.n2-sp-replacer:hover{border-color:#d8d8d8;color:#111}.n2-sp-replacer.n2-sp-disabled{cursor:default;border-color:silver;color:silver}.n2-sp-dd{display:none;height:8px;line-height:8px;width:8px;background-color:#d8d8d8;font-size:7px;margin:13px 0 0 -9px;position:relative;-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;float:left;text-align:center}.n2-sp-preview{width:20px;height:20px;border-radius:3px;float:left;z-index:0;overflow:hidden}.n2-sp-palette{*width:220px;max-width:220px}.n2-sp-palette .n2-sp-thumb-el{width:20px;height:20px;margin:4px;border:0}.n2-sp-palette .n2-sp-thumb-inner{width:20px;height:20px}.n2-sp-container{padding-bottom:0}.n2-sp-container button{background-color:#eee;background-image:-webkit-linear-gradient(top,#eee,#ccc);background-image:-moz-linear-gradient(top,#eee,#ccc);background-image:-o-linear-gradient(top,#eee,#ccc);background-image:-ms-linear-gradient(top,#eee,#ccc);background-image:linear-gradient(to bottom,#eee,#ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.n2-sp-container button:hover{background-color:#ddd;background-image:-webkit-linear-gradient(top,#ddd,#bbb);background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-o-linear-gradient(top,#ddd,#bbb);background-image:-ms-linear-gradient(top,#ddd,#bbb);background-image:linear-gradient(to bottom,#ddd,#bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.n2-sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.n2-sp-cancel{font-size:11px;color:#d93f3f!important;padding:2px;margin:0 5px 0 0;vertical-align:middle;text-decoration:none}.n2-sp-cancel:hover{color:#d93f3f!important;text-decoration:underline}.n2-sp-palette span.n2-sp-thumb-active,.n2-sp-palette span:hover{border-color:rgba(0,0,0,.5)}.n2-sp-alpha,.n2-sp-preview,.n2-sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.n2-sp-alpha-inner,.n2-sp-preview-inner,.n2-sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.n2-sp-thumb-inner{border-radius:3px}.n2-sp-preview-inner,.n2-sp-thumb-inner{border:solid 1px RGBA(0,0,0,.2)}.n2-sp-palette .n2-sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.n2-sp-palette .n2-sp-thumb-light.n2-sp-thumb-active .n2-sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.n2-sp-palette .n2-sp-thumb-dark.n2-sp-thumb-active .n2-sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.n2-vt{vertical-align:top}.n2-vm{vertical-align:middle}.n2-radius-s{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-radius-m{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.n2-radius-l{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.n2-tooltip{position:absolute;left:-10000px;top:-10000px;margin-top:-9000000px;opacity:0;z-index:100000;border-radius:3px;line-height:16px;padding:4px 6px;color:#fff;font-size:10px;background:RGBA(32,41,52,.95)}.n2-tooltip.n2-active{opacity:1;margin:10px}.n2-position-display-active .n2-tooltip{display:none}.n2-button{display:inline-block;text-align:center;cursor:pointer}.n2-button,.n2-button-inner,.n2-button-inner:ACTIVE,.n2-button-inner:FOCUS,.n2-button-inner:LINK,.n2-button-inner:VISITED,.n2-button:ACTIVE,.n2-button:FOCUS,.n2-button:LINK,.n2-button:VISITED{color:#fff;text-decoration:none}.n2-button-darker,.n2-button-darker:ACTIVE,.n2-button-darker:FOCUS,.n2-button-darker:LINK,.n2-button-darker:VISITED{color:#b2bfc9}.n2-button-wide{display:block;margin:10px 20px}.n2-button-icon{font-size:16px}.n2-button-icon.n2-h32{font-size:32px}.n2-button-with-actions{position:relative}.n2-button-with-actions .n2-button-inner{display:inline-block;height:100%;padding:0 20px;line-height:inherit}.n2-button-with-actions .n2-button-menu-open{position:relative;width:36px;height:100%;display:inline-block;vertical-align:top;background:RGBA(0,0,0,.1);border-left:1px solid RGBA(0,0,0,.1)}.n2-button-menu-open .n2-button-menu{display:none;position:absolute;right:0;top:36px;z-index:3}html[dir=rtl] .n2-button-menu-open .n2-button-menu{right:auto;left:0}.n2-button-menu-inner{margin-top:5px;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);padding:5px 0;background-color:#fff;border-radius:5px}.n2-box-generator .n2-button-menu-inner{max-height:150px;overflow-y:auto;overflow-x:hidden}.n2-button-menu-open.n2-active .n2-button-menu{display:block}.n2-button-xs{height:18px;line-height:18px}.n2-button-xs.n2-button-normal{padding:0 5px}.n2-button-s{height:24px;line-height:24px}.n2-button-s.n2-button-normal,.n2-button-s.n2-button-with-actions .n2-button-inner{padding:0 10px}.n2-button-s .n2-button-menu-open{width:25px}.n2-button-s .n2-button-menu-open .n2-button-menu{top:24px}.n2-button-s.n2-button-icon{width:24px}.n2-button-m{height:28px;line-height:28px}.n2-button-m.n2-button-normal{padding:0 10px}.n2-button-m.n2-button-with-actions .n2-button-inner{padding:0 16px}.n2-button-m .n2-button-menu-open,.n2-button-m.n2-button-icon{width:28px}.n2-button-m .n2-button-menu-open .n2-button-menu{top:28px}.n2-button-m-narrow.n2-button-icon{width:20px}.n2-button-l{height:36px;line-height:36px}.n2-button-l.n2-button-normal{padding:0 15px;min-width:70px}.n2-button-l.n2-button-icon{width:36px}.n2-button-xl{height:50px;line-height:50px}.n2-button-xl,.n2-button-xl.n2-button-normal{padding:0 44px}.n2-button-grey{background:#6b7986}.n2-button-blue,.n2-button-blue-active.n2-active{background:#0c92df}.n2-button-green{background:#51b82d}.n2-button-red{background:#c54633}.n2-button-purple{background:#5f39c2}.n2-button-menu a{display:block;text-align:left;color:#7b8898;line-height:30px;padding:0 20px;white-space:nowrap}.n2-button-menu a:active,.n2-button-menu a:focus,.n2-button-menu a:hover{color:#7b8898}.n2-button-menu a:HOVER{background:#e9edf0}.n2-button-menu a.n2-separator{border-bottom:2px solid #ccd1d6}.n2-button-plain{background:0 0!important;color:#7b8898;height:26px;line-height:26px}.n2-button-plain .n2-button-inner{color:#7b8898;padding:0 5px!important}.n2-button-plain.n2-button-with-actions .n2-button-menu-open{border-left:0;background:0 0}.n2-button-plain .n2-button-inner:active,.n2-button-plain .n2-button-inner:focus,.n2-button-plain .n2-button-inner:link,.n2-button-plain .n2-button-inner:visited,.n2-button-plain:active,.n2-button-plain:focus,.n2-button-plain:link,.n2-button-plain:visited{color:#7b8898}.n2-button-plain.n2-button-with-actions .n2-button-menu-open{width:16px}.n2-button-plain.n2-button-with-actions .n2-button-menu-open .n2-button-menu{top:20px}.n2-button-with-icon{border:2px solid #e0e6ed;color:#6b7989;margin:5px;padding:0 10px}.n2-button-with-icon:ACTIVE,.n2-button-with-icon:FOCUS,.n2-button-with-icon:LINK,.n2-button-with-icon:VISITED{color:#6b7989}.n2-color-red,.n2-color-red.n2-button-plain:visited,.n2-color-red:active,.n2-color-red:focus,.n2-color-red:link{color:#c44e3d!important}.n2-color-blue,.n2-color-blue.n2-button-plain:visited,.n2-color-blue:active,.n2-color-blue:focus,.n2-color-blue:link{color:#0c92df!important}.n2-definition-list,.n2-list{margin:0;padding:0}.n2-definition-list dt{position:relative;line-height:59px;height:59px;background:#303b47;border-bottom:1px solid RGBA(0,0,0,.2);overflow:hidden}.n2-definition-list dt>a{display:block;padding:0 20px;color:#b2bfc9}.n2-definition-list dt>a .n2-i{margin-right:10px;vertical-align:middle;font-size:32px}html[dir=rtl] .n2-definition-list dt>a .n2-i{margin-right:0;margin-left:10px}.n2-definition-list dt .n2-id{display:block;width:70px;position:absolute;left:0;bottom:5px;text-align:center;line-height:11px;color:#8b99a6}.n2-definition-list dt>.n2-actions{display:block;position:absolute;top:0;right:0;background-color:#303b47;font-size:16px;line-height:16px;padding:22px 20px 0}.n2-definition-list dt.n2-open>.n2-actions{background-color:#3c4958}.n2-definition-list dt>.n2-actions a{display:inline-block;padding:0 5px}.n2-definition-list dt>.n2-actions a .n2-i,.n2-list li .n2-actions>* .n2-i{vertical-align:middle}html[dir=rtl] .n2-definition-list dt>.n2-actions,html[dir=rtl] .n2-list li>.n2-actions{right:auto;left:0}.n2-definition-list dd{margin:0}.n2-list li,.n2-list li>a{color:#b2bfc9;display:block}.n2-list li{position:relative;margin:0;line-height:39px;background-color:#303b47;border-bottom:1px solid RGBA(0,0,0,.2)}.n2-list li>a{padding:0 20px}.n2-list li>a .n2-i{vertical-align:middle;padding:7px;margin-left:-7px;font-size:16px}.n2-list li.n2-active{background:#1681c1}.n2-list li.n2-active>a{color:#fff;vertical-align:middle}.n2-list .n2-list-checkbox.n2-active .n2-i,.n2-list li.n2-active>.n2-actions .n2-i{color:#fff}.n2-list li .n2-actions{position:absolute;top:0;right:0;padding:2px 3px 0;line-height:24px}.n2-list li .n2-actions-left>*,.n2-list li .n2-actions>*{display:inline-block;margin:0 2px}.n2-list li.n2-button-container{padding:22px 20px}.n2-list .n2-list-checkbox{display:inline-block;width:16px;height:16px;background:#343f4c;vertical-align:top;border:2px solid #212d3a;border-radius:2px;line-height:16px;margin:10px 10px 0 0}.n2-list .n2-list-checkbox .n2-i{color:#343f4c;font-size:16px;margin:0;padding:0;vertical-align:top}.n2-list .n2-list-checkbox.n2-active{background:#6fbc49;border-color:#6fbc49}.n2-box{float:left;display:inline-block;position:relative;width:270px;height:180px;margin:15px;border-radius:3px;background-color:#212d3a;background-size:cover;background-position:50% 50%;opacity:1;transition:opacity .6s;box-shadow:0 0 5px RGBA(0,0,0,.05)}.n2-box.n2-active{box-shadow:0 0 0 3px #0c92df}.n2-ss-box-just-added{opacity:0}.n2-box-small{width:200px;height:135px;margin:10px}.n2-box.ui-sortable-helper{transform:scale(.8);opacity:.8}.n2-box-sortable-placeholder{height:200px;margin:5px 0;width:0;box-shadow:0 0 0 2px #0c92df;float:left;display:inline-block}.n2-box-sortable-placeholder-small{height:145px}.n2-box img{position:absolute;clip:rect(0,270px,180px,0);border-radius:3px;width:100%}.n2-box-small img{clip:rect(0,200px,95px,0)}.n2-box .n2-box-overlay{position:absolute;left:0;top:0;z-index:3;width:100%;height:100%;background-color:rgba(32,41,52,.9);text-align:center;line-height:130px;border-radius:3px}.n2-box-small .n2-box-overlay{line-height:100px}.n2-box-overlay .n2-button{line-height:28px;height:28px}.n2-box .n2-box-placeholder{position:absolute;left:0;bottom:0;height:50px;background:#fff;background:#212d3a;border-bottom-left-radius:3px;border-bottom-right-radius:3px;width:100%;z-index:9;display:flex;justify-content:space-between}.n2-box-small .n2-box-placeholder{height:40px}.n2-box-placeholder>*{margin:auto 0}.n2-box-placeholder-title{margin:auto 10px;overflow:hidden;max-height:100%}.n2-box-placeholder-buttons{white-space:nowrap;margin:auto 10px}.n2-box-placeholder-button{text-align:center;margin:auto}.n2-box-placeholder-title,.n2-box-placeholder-title a{color:#cedae2;line-height:16px}.n2-box-small .n2-box-placeholder-title,.n2-box-small .n2-box-placeholder-title a{line-height:20px}.n2-box .n2-box-lt{position:absolute;left:5px;top:5px;width:50%;text-align:left;z-index:4}.n2-box .n2-box-rt{position:absolute;right:5px;top:5px;width:50%;text-align:right}.n2-box .n2-box-lb{position:absolute;left:5px;bottom:55px;width:50%}.n2-box-small .n2-box-lb{bottom:45px}.n2-box .n2-box-lb>*{white-space:nowrap}.n2-box .n2-box-rb{position:absolute;right:5px;bottom:55px;text-align:right}.n2-box-small .n2-box-rb{bottom:45px}.n2-box .n2-box-center{position:absolute;left:0;top:74px;width:100%;text-align:center;z-index:4}.n2-box>.n2-on-hover{display:none}.n2-box:HOVER>.n2-on-hover{display:block}.n2-ss-box-select{display:none;border-radius:3px;border:2px solid #8793a2;width:16px;height:16px;text-align:center}.n2-box:HOVER .n2-ss-box-select{display:block}.n2-box.n2-selected .n2-ss-box-select{display:block;border-color:#1999e3;background-color:#1999e3}.n2-box.n2-selected .n2-ss-box-select .n2-i{display:inline-block;color:#fff;font-size:16px;line-height:16px;margin:0 -2px}.n2-bulk-select{margin:0 10px}.n2-box .n2-ss-box-select .n2-i,.n2-bulk-actions{display:none}.n2-ss-has-box-selection .n2-heading-actions{visibility:hidden}.n2-ss-has-box-selection .n2-bulk-actions{display:inline-block}.n2-ss-has-box-selection .n2-box-selectable{opacity:.5}.n2-ss-has-box-selection .n2-box-selectable.n2-selected{opacity:1}.n2-ss-has-box-selection .n2-ss-box-select{display:inline-block}.n2-box-menu{display:none;z-index:9}.n2-box-menu.n2-inited{display:inline-block;position:absolute;top:5px;right:5px;text-align:right}.n2-box-menu .n2-button{float:right}.n2-box-menu .n2-box-menu-content{display:none}.n2-box-menu.n2-active .n2-box-menu-content{margin-top:3px;display:block;clear:both;float:right;background:#fff;border-radius:5px;line-height:30px;text-align:left;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);padding:5px 0;white-space:nowrap}.n2-box-menu.n2-active .n2-box-menu-content ul{margin:0;list-style-type:none}.n2-box-menu.n2-active .n2-box-menu-content li{padding:0 20px;margin:0;color:#7b8898;line-height:30px}.n2-box-menu.n2-active .n2-box-menu-content li:HOVER{background-color:#e9edf0}.n2-box-menu.n2-active .n2-box-menu-content li.n2-ss-delete{color:#c44e3d}.n2-box-full>a{width:100%;height:180px;padding:0}.n2-box-full>a:before{display:block;font-family:'Nextend'!important;font-size:74px;line-height:90px;content:"\e952";margin-top:35px}.n2-box-promo{background:0 0}.n2-box-promo-light{background:#fff}.n2-box-promo-overlay,.n2-box-promo-overlay:FOCUS,.n2-box-promo-overlay:HOVER,.n2-box-promo-overlay:VISITED{position:absolute;display:block;width:100%;height:100%;color:#fff;text-align:center}.n2-box-promo .n2-close{position:absolute;right:10px;top:10px;cursor:pointer;display:none;z-index:3}.n2-box-promo:hover .n2-close{display:block}.n2-box-promo .n2-close:before{font-family:'Nextend'!important;content:"\e90a";font-size:16px}.n2-box-promo-light .n2-close:before{color:#7b8898}.n2-box-promo-dark .n2-close:before{color:#fff}.n2-box-promo span{display:block;position:absolute;bottom:50px;width:100%;line-height:23px;text-align:center;font-size:12px}.n2-box-promo-light span{color:#7b8898}.n2-box-promo-dark span{color:#eff7fb}.n2-box-promo-buttons{position:absolute;bottom:17px;width:100%;text-align:center}.n2-box-promo-buttons .n2-button+.n2-button{margin-left:20px}.n2-box-review{text-align:center}.n2-box-review-bigstar{width:170px;height:105px;margin:0 auto;background-image:url(../images/stars-big.png)}[data-stars="1"] .n2-box-review-bigstar{background-position:0 -105px}[data-stars="2"] .n2-box-review-bigstar{background-position:0 -210px}[data-stars="3"] .n2-box-review-bigstar{background-position:0 -315px}[data-stars="4"] .n2-box-review-bigstar{background-position:0 -420px}[data-stars="5"] .n2-box-review-bigstar{background-position:0 -525px}.n2-box-review-label{color:#7b8898;font-size:15px;line-height:22px;height:22px;overflow:hidden;display:none}[data-stars="0"] .n2-box-review-label[data-star="0"],[data-stars="1"] .n2-box-review-label[data-star="1"],[data-stars="2"] .n2-box-review-label[data-star="2"],[data-stars="3"] .n2-box-review-label[data-star="3"],[data-stars="4"] .n2-box-review-label[data-star="4"],[data-stars="5"] .n2-box-review-label[data-star="5"]{display:block}.n2-box-review-stars-container{width:170px;height:34px;margin:0 auto}.n2-box-review-star{cursor:pointer;transition:transform .4s;vertical-align:top;float:left;width:34px;height:34px;background-image:url(../images/stars-small.png)}[data-stars="1"] .n2-box-review-star[data-star="1"],[data-stars="2"] .n2-box-review-star[data-star="1"],[data-stars="2"] .n2-box-review-star[data-star="2"],[data-stars="3"] .n2-box-review-star[data-star="1"],[data-stars="3"] .n2-box-review-star[data-star="2"],[data-stars="3"] .n2-box-review-star[data-star="3"],[data-stars="4"] .n2-box-review-star[data-star="1"],[data-stars="4"] .n2-box-review-star[data-star="2"],[data-stars="4"] .n2-box-review-star[data-star="3"],[data-stars="4"] .n2-box-review-star[data-star="4"],[data-stars="5"] .n2-box-review-star[data-star="1"],[data-stars="5"] .n2-box-review-star[data-star="2"],[data-stars="5"] .n2-box-review-star[data-star="3"],[data-stars="5"] .n2-box-review-star[data-star="4"],[data-stars="5"] .n2-box-review-star[data-star="5"]{background-position:0 -34px;transform:scale(1.3)}.n2-modal-review-star-5{width:560px;height:241px;background:url(../images/star-5.png)}.n2-modal-review-details{font-size:14px;line-height:28px;color:#7b8898;text-align:center}.nextend-tab-tabbed{width:100%;overflow:hidden}.nextend-tab-tabbed .nextend-tab-tabbed-panes{-webkit-transition:all 400ms ease-in-out;-moz-transition:all 400ms ease-in-out;-ms-transition:all 400ms ease-in-out;-o-transition:all 400ms ease-in-out;transition:all 400ms ease-in-out}.nextend-tab-tabbed .nextend-tab-tabbed-pane{float:left}.xdsoft_datetimepicker{background:#fff;border-radius:5px;border:2px solid #a1aeb5;color:#333;padding:2px 8px 8px 0;position:absolute;z-index:9999;-moz-box-sizing:border-box;box-sizing:border-box;display:none}.xdsoft_datetimepicker iframe{position:absolute;left:0;top:0;width:75px;height:210px;background:0 0;border:none}.xdsoft_datetimepicker button{border:none!important}.xdsoft_noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.xdsoft_noselect::selection{background:0 0}.xdsoft_noselect::-moz-selection{background:0 0}.xdsoft_datetimepicker.xdsoft_inline{display:inline-block;position:static}.xdsoft_datetimepicker *{-moz-box-sizing:border-box;box-sizing:border-box;padding:0;margin:0}.xdsoft_datetimepicker .xdsoft_datepicker,.xdsoft_datetimepicker .xdsoft_timepicker{display:none}.xdsoft_datetimepicker .xdsoft_datepicker.active,.xdsoft_datetimepicker .xdsoft_timepicker.active{display:block}.xdsoft_datetimepicker .xdsoft_datepicker{width:224px;float:left;margin-left:8px}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{width:256px}.xdsoft_datetimepicker .xdsoft_timepicker{width:58px;float:left;text-align:center;margin-left:8px;margin-top:0}.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{margin-top:8px;margin-bottom:3px}.xdsoft_datetimepicker .xdsoft_mounthpicker{position:relative;text-align:center}.xdsoft_datetimepicker .xdsoft_label i,.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC)}.xdsoft_datetimepicker .xdsoft_label i{opacity:.5;background-position:-92px -19px;display:inline-block;width:9px;height:20px;vertical-align:middle}.xdsoft_datetimepicker .xdsoft_prev{float:left;background-position:-20px 0}.xdsoft_datetimepicker .xdsoft_today_button{float:left;background-position:-70px 0;margin-left:5px}.xdsoft_datetimepicker .xdsoft_next{float:right;background-position:0 0}.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-color:transparent;background-repeat:no-repeat;border:0 none currentColor;cursor:pointer;display:block;height:30px;opacity:.5;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";outline:medium none currentColor;overflow:hidden;padding:0;position:relative;text-indent:100%;white-space:nowrap;width:20px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{float:none;height:15px;width:30px;display:block;margin-left:14px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{background-position:-40px -15px;margin-top:7px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{background-position:-40px 0;margin-bottom:7px;margin-top:0}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{height:151px;overflow:hidden;border-bottom:1px solid #ddd}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div{background:#f9fafb;border-top:1px solid #dee1e5;color:#7b8898;font-size:12px;text-align:center;border-collapse:collapse;cursor:pointer;border-bottom-width:0;height:25px;line-height:25px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:first-child{border-top-width:0}.xdsoft_datetimepicker .xdsoft_next:hover,.xdsoft_datetimepicker .xdsoft_prev:hover,.xdsoft_datetimepicker .xdsoft_today_button:hover{opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}.xdsoft_datetimepicker .xdsoft_label{display:inline;position:relative;z-index:9999;margin:0;padding:5px 3px;font-size:14px;line-height:20px;background-color:#fff;float:left;width:182px;text-align:center;cursor:pointer;color:#6b7989}.xdsoft_datetimepicker .xdsoft_label:hover i{opacity:1}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select{border:2px solid #a1aeb5;border-radius:3px;position:absolute;right:0;top:30px;z-index:101;display:none;background:#fff;max-height:160px;overflow-y:hidden}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_monthselect{right:-7px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_yearselect{right:2px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#fff;background:#51b82d}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option{padding:2px 13px 2px 5px;text-decoration:none!important}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#0c92df;color:#fff}.xdsoft_datetimepicker .xdsoft_month{width:100px;text-align:right}.xdsoft_datetimepicker .xdsoft_calendar{clear:both}.xdsoft_datetimepicker .xdsoft_year{width:48px;margin-left:5px}.xdsoft_datetimepicker .xdsoft_calendar table{border-collapse:collapse;width:100%}.xdsoft_datetimepicker .xdsoft_calendar td>div{padding-right:5px}.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{width:14.2857142%;background:#f9fafb;border:1px solid #dee1e5;color:#7b8898;font-size:12px;text-align:right;vertical-align:middle;padding:0;border-collapse:collapse;cursor:pointer;height:25px}.xdsoft_datetimepicker .xdsoft_calendar th{background:#f2f5fa;text-align:center;color:#999;cursor:default;font-weight:400}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{width:12.5%}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{color:#0c92df}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#0c92df;color:#fff}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,.xdsoft_datetimepicker .xdsoft_time_box>div>div.xdsoft_disabled{opacity:.5;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"}.xdsoft_datetimepicker .xdsoft_calendar td:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#fff!important;background:#51b82d!important}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_disabled:hover{color:inherit!important;background:inherit!important}.xdsoft_datetimepicker .xdsoft_copyright{color:#ccc!important;font-size:10px;clear:both;float:none;margin-left:8px}.xdsoft_datetimepicker .xdsoft_copyright a{color:#eee!important}.xdsoft_datetimepicker .xdsoft_copyright a:hover{color:#aaa!important}.xdsoft_time_box{position:relative;border:1px solid #ccc}.xdsoft_scrollbar>.xdsoft_scroller{background:#ccc!important;height:20px;border-radius:3px}.xdsoft_scrollbar{position:absolute;width:7px;right:2px;top:0;bottom:0;cursor:pointer}.xdsoft_scroller_box{position:relative}
2
  /*!
3
  * jQuery UI Resizable 1.10.2
4
  * http://jqueryui.com
1
+ @font-face{font-family:'Nextend';src:url(../fonts/Nextend.eot?jk6d47);src:url(../fonts/Nextend.eot?jk6d47#iefix) format('embedded-opentype'),url(../fonts/Nextend.ttf?jk6d47) format('truetype'),url(../fonts/Nextend.woff?jk6d47) format('woff');font-weight:400;font-style:normal}.n2-i{font-family:'Nextend'!important;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.n2-i-slidelibrary:before{content:"\e97d"}.n2-i-newslide:before{content:"\e981"}.n2-i-canvas:before{content:"\e916"}.n2-i-builder:before{content:"\e97c"}.n2-i-minimize:before{content:"\e914"}.n2-i-maximize:before{content:"\e915"}.n2-i-vertical-align-top:before{content:"\e96c"}.n2-i-vertical-align-space-between:before{content:"\e97a"}.n2-i-vertical-align-space-around:before{content:"\e97b"}.n2-i-vertical-align-center:before{content:"\e97e"}.n2-i-vertical-align-bottom:before{content:"\e97f"}.n2-i-mini-desktop-portrait:before{content:"\e980"}.n2-i-uplevel:before{content:"\e979"}.n2-i-hidedesktoplandscape:before{content:"\e95a"}.n2-i-mini-arrow-thin:before{content:"\e926"}.n2-i-mini-move:before{content:"\e973"}.n2-i-color:before{content:"\e95b"}.n2-i-col:before{content:"\e95c"}.n2-i-structure-Sb:before{content:"\e95d"}.n2-i-structure-Sa:before{content:"\e95e"}.n2-i-structure-4a:before{content:"\e95f"}.n2-i-structure-3b:before{content:"\e960"}.n2-i-structure-3a:before{content:"\e961"}.n2-i-structure-2e:before{content:"\e962"}.n2-i-structure-2d:before{content:"\e963"}.n2-i-structure-2c:before{content:"\e964"}.n2-i-structure-2b:before{content:"\e965"}.n2-i-structure-2a:before{content:"\e966"}.n2-i-structure-1a:before{content:"\e967"}.n2-i-mini-tablet-portrait:before{content:"\e968"}.n2-i-mini-tablet-landscape:before{content:"\e969"}.n2-i-mini-mobile-portrait:before{content:"\e96a"}.n2-i-mini-mobile-landscape:before{content:"\e96b"}.n2-i-mini-desktop-landscape:before{content:"\e96d"}.n2-i-video:before{content:"\e96e"}.n2-i-stretch:before{content:"\e96f"}.n2-i-row:before{content:"\e970"}.n2-i-none:before{content:"\e971"}.n2-i-mini-trash:before{content:"\e972"}.n2-i-mini-duplicate:before{content:"\e974"}.n2-i-mini-arrow-up:before{content:"\e975"}.n2-i-mini-arrow-right:before{content:"\e976"}.n2-i-mini-arrow-left:before{content:"\e977"}.n2-i-mini-arrow-down:before{content:"\e978"}.n2-i-chainsmall:before{content:"\e949"}.n2-i-reset2:before{content:"\e946"}.n2-i-save:before{content:"\e947"}.n2-i-clearanimation:before{content:"\e948"}.n2-i-magnet:before{content:"\e936"}.n2-i-layerlist:before{content:"\e935"}.n2-i-layer-text:before{content:"\e920"}.n2-i-layer-image:before{content:"\e931"}.n2-i-layer-heading:before{content:"\e932"}.n2-i-layer-button:before{content:"\e933"}.n2-i-settings:before{content:"\e934"}.n2-i-selectarrow:before{content:"\e930"}.n2-i-closewindow:before{content:"\e90a"}.n2-i-selected:before{content:"\e90b"}.n2-i-layerlistopen:before{content:"\e92b"}.n2-i-layerlistclose:before{content:"\e92c"}.n2-i-backtoslider:before{content:"\e92e"}.n2-i-addlayer2:before{content:"\e92f"}.n2-i-newdrag:before{content:"\e913"}.n2-i-addlayer:before{content:"\e917"}.n2-i-listlayer:before{content:"\e918"}.n2-i-closelayer:before{content:"\e919"}.n2-i-copy:before{content:"\e907"}.n2-i-paste:before{content:"\e908"}.n2-i-undo:before{content:"\e905"}.n2-i-redo:before{content:"\e906"}.n2-i-sortdate2:before{content:"\e900"}.n2-i-sortdate1:before{content:"\e901"}.n2-i-sortalphabetic2:before{content:"\e902"}.n2-i-sortalphabetic1:before{content:"\e903"}.n2-i-hide:before{content:"\e60e"}.n2-i-adaptive:before{content:"\e64e"}.n2-i-reset:before{content:"\e64f"}.n2-i-fontmodifier:before{content:"\e650"}.n2-i-sun:before{content:"\e651"}.n2-i-layerunlink:before{content:"\e64b"}.n2-i-layerlink:before{content:"\e64d"}.n2-i-moon:before{content:"\e64c"}.n2-i-horizontal-right:before{content:"\e645"}.n2-i-horizontal-center:before{content:"\e646"}.n2-i-horizontal-left:before{content:"\e647"}.n2-i-vertical-bottom:before{content:"\e648"}.n2-i-vertical-middle:before{content:"\e649"}.n2-i-vertical-top:before{content:"\e64a"}.n2-i-bulb:before{content:"\e643"}.n2-i-unlock:before{content:"\e63f"}.n2-i-anim-out:before{content:"\e640"}.n2-i-anim-in:before{content:"\e641"}.n2-i-anim-loop:before{content:"\e642"}.n2-i-more:before{content:"\e639"}.n2-i-buttonarrow:before{content:"\e638"}.n2-i-list:before{content:"\e635"}.n2-i-link:before{content:"\e636"}.n2-i-play:before{content:"\e605"}.n2-i-pause:before{content:"\e606"}.n2-i-stop:before{content:"\e607"}.n2-i-snapcenter:before{content:"\e62e"}.n2-i-snapgrid:before{content:"\e62f"}.n2-i-snaplayer:before{content:"\e630"}.n2-i-snapnone:before{content:"\e631"}.n2-i-plus:before{content:"\e632"}.n2-i-minus:before{content:"\e633"}.n2-i-bold:before{content:"\e601"}.n2-i-unpublished:before{content:"\e62d"}.n2-i-published:before{content:"\e60c"}.n2-i-underline:before{content:"\e602"}.n2-i-italic:before{content:"\e615"}.n2-i-empty:before{content:"\e62c"}.n2-i-tick:before{content:"\e600"}.n2-i-star:before{content:"\e603"}.n2-i-right:before{content:"\e604"}.n2-i-order:before{content:"\e608"}.n2-i-lock:before{content:"\e609"}.n2-i-left:before{content:"\e60a"}.n2-i-justify:before{content:"\e60b"}.n2-i-info:before{content:"\e60d"}.n2-i-eye:before{content:"\e60f"}.n2-i-edit:before{content:"\e610"}.n2-i-duplicate:before{content:"\e611"}.n2-i-delete:before{content:"\e612"}.n2-i-close:before{content:"\e613"}.n2-i-center:before{content:"\e614"}.n2-i-emptyslide:before{content:"\e91b"}.n2-i-addslide:before{content:"\e91c"}.n2-i-staraction:before{content:"\e91d"}.n2-i-breadcrumbarrow:before{content:"\e91e"}.n2-i-animation:before{content:"\e91f"}.n2-i-folderclosed:before{content:"\e921"}.n2-i-folderopened:before{content:"\e922"}.n2-i-hide2:before{content:"\e923"}.n2-i-select:before{content:"\e924"}.n2-i-hidedesktopportrait:before{content:"\e925"}.n2-i-hidetabletlandscape:before{content:"\e927"}.n2-i-hidetabletportrait:before{content:"\e928"}.n2-i-hidemobilelandscape:before{content:"\e929"}.n2-i-hidemobileportrait:before{content:"\e92a"}.n2-i-backgroundedit:before{content:"\e909"}.n2-i-backgroundmanage:before{content:"\e90c"}.n2-i-backgroundposition:before{content:"\e90d"}.n2-i-viewmini:before{content:"\e90e"}.n2-i-viewgrid:before{content:"\e90f"}.n2-i-viewlist:before{content:"\e910"}.n2-i-more2:before{content:"\e911"}.n2-i-tick2:before{content:"\e912"}.n2-i-group:before{content:"\e957"}.n2-i-group-up:before{content:"\e958"}.n2-i-group-insert:before{content:"\e959"}.n2-i-add-sample:before{content:"\e951"}.n2-i-add-new:before{content:"\e952"}.n2-i-progressbar-layer:before{content:"\e982"}.n2-i-imagebox-layer:before{content:"\e983"}.n2-i-counter-layer:before{content:"\e984"}.n2-i-circlecounter-layer:before{content:"\e985"}.n2-i-audio-layer:before{content:"\e986"}.n2-i-a-license:before{content:"\e953"}.n2-i-a-import:before{content:"\e954"}.n2-i-a-deauthorize:before{content:"\e955"}.n2-i-a-clear:before{content:"\e956"}.n2-i-imagearea-layer:before{content:"\e950"}.n2-i-window-settings:before{content:"\e94c"}.n2-i-window-animation:before{content:"\e94d"}.n2-i-window-design:before{content:"\e94e"}.n2-i-window-layer:before{content:"\e94f"}.n2-i-dashboard:before{content:"\e94a"}.n2-i-slider2:before{content:"\e94b"}.n2-i-area-layer:before{content:"\e937"}.n2-i-iframe-layer:before{content:"\e938"}.n2-i-input-layer:before{content:"\e939"}.n2-i-html-layer:before{content:"\e93a"}.n2-i-video-layer:before{content:"\e93b"}.n2-i-vimeo-layer:before{content:"\e93c"}.n2-i-youtube-layer:before{content:"\e93d"}.n2-i-list-layer:before{content:"\e93e"}.n2-i-transition-layer:before{content:"\e93f"}.n2-i-caption-layer:before{content:"\e940"}.n2-i-icon-layer:before{content:"\e941"}.n2-i-button-layer:before{content:"\e942"}.n2-i-image-layer:before{content:"\e943"}.n2-i-text-layer:before{content:"\e944"}.n2-i-heading-layer:before{content:"\e945"}.n2-i-preview:before{content:"\e92d"}.n2-i-slides:before{content:"\e91a"}.n2-i-slideedit:before{content:"\e904"}.n2-i-help:before{content:"\e644"}.n2-i-v-tablet-landscape:before{content:"\e63a"}.n2-i-v-mobile-landscape:before{content:"\e63b"}.n2-i-v-desktop-landscape:before{content:"\e63c"}.n2-i-bulk:before{content:"\e634"}.n2-i-notification:before{content:"\e637"}.n2-i-v-tablet:before{content:"\e616"}.n2-i-v-mobile:before{content:"\e617"}.n2-i-v-desktop:before{content:"\e618"}.n2-i-v-all:before{content:"\e619"}.n2-i-smart:before{content:"\e61a"}.n2-i-slider:before{content:"\e61b"}.n2-i-s-open:before{content:"\e61c"}.n2-i-s-close:before{content:"\e61d"}.n2-i-next:before{content:"\e61e"}.n2-i-n-success:before{content:"\e61f"}.n2-i-n-notice:before{content:"\e620"}.n2-i-n-error:before{content:"\e621"}.n2-i-n-close:before{content:"\e622"}.n2-i-drag:before{content:"\e623"}.n2-i-a-text:before{content:"\e624"}.n2-i-a-refresh:before{content:"\e625"}.n2-i-a-html:before{content:"\e626"}.n2-i-a-export:before{content:"\e627"}.n2-i-a-duplicate:before{content:"\e628"}.n2-i-a-deletes:before{content:"\e629"}.n2-i-a-delete:before{content:"\e62a"}.n2-i-a-back:before{content:"\e62b"}.n2-i-up:before{content:"\e63e"}.n2-i-folder:before{content:"\e63d"}.n2{box-sizing:initial}.n2,.n2 .ui-widget,.n2 td,.n2 th,html[dir=rtl] .n2{font-family:"Montserrat",Arial,sans-serif;-webkit-font-smoothing:antialiased;font-size:12px}.n2 a:ACTIVE,.n2 a:FOCUS,.n2 a:LINK,.n2 a:VISITED{text-decoration:none}.n2-h1{font-size:26px}.n2-h2{font-size:20px}.n2-h3{font-size:14px}.n2-h4{font-size:12px}.n2-h5,input[type].n2-h5,select.n2-h5,textarea.n2-h5{font-size:11px}.n2-h6{font-size:10px}.n2-b{font-weight:700}.n2-uc{text-transform:uppercase}.n2-ucf{text-transform:capitalize}.n2-i+span,.n2-i+span+span,.n2-i+span+span+span{vertical-align:middle}.n2-actions-left>a,.n2-actions-left>a:HOVER,.n2-i-grey-opacity,.n2-i-grey-opacity:HOVER{color:#b2bfc9}.n2-active>.n2-i-star{color:#c68c1e}.n2-active>.n2-i-unpublished:before{content:"\e60c"}.n2-active>.n2-i-unpublished,.n2-active>.n2-i-unpublished:HOVER{color:#6fbc49}.n2-button .n2-i,.n2-i.n2-it{line-height:inherit;vertical-align:top}.n2-description,.n2-description p{font-size:12px;color:#6b7989}.n2-description ol{font-size:11px}div.n2-description ul{padding-left:20px;font-size:12px;list-style-type:disc}#wpbody-content{padding-bottom:0!important}#wpfooter{display:none}#wpbody-content #n2-admin{margin:10px 20px 0 0}html[dir=rtl] #wpbody-content #n2-admin{margin:10px 0 0 20px}#wpbody-content #n2-admin a:focus{box-shadow:none}#content-box #toolbar-box{display:none}.n2 input:focus,.n2 select:focus,.n2 textarea:focus{background:0 0}.n2 ul{padding:0}.n2 dt{font-weight:400}#status,.admin .subhead-collapse,.admin header.header{display:none}div#system-debug,div.container-main{padding-bottom:0}.admin #content{margin-top:20px}.n2 button,.n2 input,.n2 label,.n2 select,.n2 textarea{line-height:inherit}.n2 *:focus{box-shadow:none}#n2-admin img{display:inline}#system-message-container,.ui-helper-hidden{display:none}.n2 td{vertical-align:inherit}.n2 .thumb{margin-top:0}body.n2-platform-native{padding:10px;font-size:13px;line-height:1.4em;overflow:auto}.n2 hr,iframe{border:0}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}#n2-admin{min-width:980px;background-color:#e9edf0}.n2 hr{border-top:1px solid #ccd1d6;border-bottom:1px solid #fafafa}.n2 a{-moz-transition:none;-webkit-transition:none;-o-transition:color 0s ease-in;transition:none;outline:0}.n2-clickable{cursor:pointer}.n2-table{display:table;width:100%;border-spacing:0;border-collapse:collapse}.n2-table.n2-content{border-collapse:separate}.n2-table-auto{width:auto}.n2-table-fixed{table-layout:fixed}.n2-tr{display:table-row}.n2-td{display:table-cell;vertical-align:top}.n2-table-fancy,.n2-table-pane{width:100%;text-align:center;border-spacing:0}.n2-table-pane{table-layout:fixed;border-collapse:separate}.n2-table-fancy{border-collapse:collapse;border:2px solid #a1aeb5;border-radius:5px}.n2-table-fancy tr:nth-child(odd){background-color:#f2f5fa}.n2-table-fancy td{border:1px solid #e0e3e6;padding:10px;text-align:left;font-size:11px}html[dir=rtl] .n2-table-fancy td{text-align:right}.n2-table-fancy-wrap{border:2px solid #a1aeb5;border-radius:5px}.n2-table-fancy-wrap .n2-table-fancy{border:0}.n2-table-fancy-wrap .n2-table-fancy td{border:0;border-bottom:1px solid #e0e3e6}.n2-table-pane td{padding:0}.n2-inline-block{display:inline-block;vertical-align:top}.n2-left{float:left}.n2-right,html[dir=rtl] .n2-left{float:right}html[dir=rtl] .n2-right{float:left}.n2-clear{clear:both}.n2-blue-bg,.n2-blue-logo-bg{background-color:#0c92df}.n2-sidebar-base-bg{background-color:#4d5d70}.n2-sidebar-header-bg{background-color:#485769}.n2-sidebar-list-bg{background-color:#212d3a}.n2-sidebar-tab-bg{background-color:#202934}.n2-sidebar-parameter-label-bg{background-color:#212d3a}.n2-sidebar-tab-switcher{border-bottom:1px solid #2c3540}.n2-sidebar-tab-switcher .n2-td{color:#b2bfc9;text-align:center;height:60px;line-height:60px;cursor:pointer}.n2-sidebar-tab-switcher .n2-td.n2-active{color:#fff}.n2-sidebar-pane-sizer{top:0;left:0;height:15px;width:100%;cursor:ns-resize;background:#212d3a;text-align:center;color:#4d5d70;font-size:32px;line-height:15px}.n2-content-base-bg{background-color:#e9edf0}.n2-content-box-title-bg{background-color:#f2f5fa}.n2-border-radius{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-border-radius-tr{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px}html[dir=rtl] .n2-border-radius-tr{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0}.n2-border-radius-tl,html[dir=rtl] .n2-border-radius-tr{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px}html[dir=rtl] .n2-border-radius-tl{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0}.n2-border-radius-br{-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px}html[dir=rtl] .n2-border-radius-br{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0}.n2-border-radius-bl,html[dir=rtl] .n2-border-radius-br{-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px}html[dir=rtl] .n2-border-radius-bl{-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0}.n2-a,.n2-a:ACTIVE,.n2-a:FOCUS,.n2-a:HOVER,.n2-a:VISITED{color:#08c}#n2-ss-redo,#n2-ss-undo{opacity:.5}#n2-ss-redo.n2-active,#n2-ss-undo.n2-active{opacity:1}#n2-ss-undo+#n2-ss-redo{margin-left:-15px}.n2-top-bar-menu .n2-button-icon{margin:12px 2px 0}.n2-expert-switch{display:inline-block;height:36px;margin-right:20px;vertical-align:top;position:relative;overflow:hidden;padding:0 30px;text-align:right}.n2-expert-switch .n2-expert-expert,.n2-expert-switch .n2-expert-simple{display:inline-block;height:100%;position:relative;line-height:36px;color:#b2bfc9;transition:top .3s,opacity .3s}.n2-expert-switch .n2-expert-simple{top:-36px;opacity:1}.n2-expert-switch .n2-expert-expert{top:-10px;opacity:0}.n2-expert-switch.n2-active .n2-expert-simple{top:-26px;opacity:0}.n2-expert-switch.n2-active .n2-expert-expert{top:0;opacity:1}.n2-expert-switch .n2-expert-bar{position:absolute;top:5px;right:8px;width:8px;height:24px;background:#6b7986;border-radius:4px;transition:background .3s}.n2-expert-switch.n2-active .n2-expert-bar{background:#51b82d}.n2-expert-switch .n2-expert-dot{position:absolute;top:-1px;left:-3px;width:14px;height:14px;border-radius:7px;background:#fff;transition:top .3s}.n2-expert-switch.n2-active .n2-expert-dot{top:10px}.n2-button-play{text-align:left;padding:0}.n2-button-play .n2-i,.n2-button-play span{vertical-align:middle}.n2-button-play span{display:inline-block;padding:0 20px;border-left:1px solid #1582c2}.n2-header{display:flex;justify-content:space-between;flex:1;height:70px;z-index:11;border-top-right-radius:5px;overflow:hidden}.n2-logo{width:339px;border-right:1px solid #1681c1;border-top-left-radius:5px}.n2-logo a{display:inline-block;width:100%;height:100%;text-align:center}.n2-logo a img{margin-top:9px}.n2-header-breadcrumbs{align-self:center}.n2-header-menu{text-align:right;white-space:nowrap}.n2-header-right>*{color:RGBA(255,255,255,.7);line-height:23px;display:inline-block;height:100%;padding:0 24px;vertical-align:top;font-size:13px}.n2-header-menu>*{line-height:70px}.n2-header-menu .n2-menu-has-sub .n2-menu-sub{display:none;position:absolute;right:5px;bottom:0;line-height:26px;white-space:nowrap}html[dir=rtl] .n2-header-menu .n2-menu-has-sub .n2-menu-sub{left:5px;right:auto}.n2-header-menu .n2-menu-has-sub:HOVER .n2-menu-sub{display:block}.n2-header-menu .n2-menu-has-sub .n2-menu-sub *{color:RGBA(255,255,255,.7)!important;padding:0 10px;font-size:11px}.n2-header-breadcrumbs>a{max-width:250px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-header-breadcrumbs>span{padding:0;margin:0 -10px}.n2-header-right>.n2-h4,.n2-header-right>.n2-h4:ACTIVE,.n2-header-right>.n2-h4:FOCUS,.n2-header-right>.n2-h4:LINK,.n2-header-right>.n2-h4:VISITED{color:RGBA(255,255,255,.7);text-decoration:none}.n2-header-right .n2-h4.n2-active{color:#fff}.n2-sidebar{width:439px;border-right:1px solid #212d3a}.n2-sidebar-hidden>.n2-content .n2-sidebar{display:none}.n2-sidebar>:first-child{border-top:1px solid #2c3540}.n2-lightbox .n2-sidebar>:first-child{border-top:0}.n2-sidebar-fixed{position:fixed;top:0}.admin-bar .n2-sidebar-fixed{top:32px}.admin .n2-sidebar-fixed{top:31px}.n2-content-area{position:relative;border:1px solid #a3adb7;border-width:0 1px 1px 0;min-height:1000px;width:100%}.n2-sidebar-hidden .n2-content-area{border-width:0 1px 1px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px}.n2-top-bar{position:relative;top:0;height:60px;z-index:1020;margin-right:-1px;border-bottom:1px solid #1c2329;display:flex;flex-wrap:nowrap;flex-flow:row;justify-content:space-between}.n2-sidebar-hidden .n2-top-bar{margin-left:-1px}.n2-top-bar>*{flex:1 0 auto}.n2-top-bar-middle{text-align:center;display:inline-block;height:100%}.n2-top-bar .n2-back{margin:0}.n2-top-bar .n2-back a{border-right:1px solid #1c2329;line-height:17px;padding-bottom:7px;color:#80a3b5}.n2-top-bar .n2-back a:before{font-family:'Nextend'!important;display:block;color:#80a3b5;font-size:32px;text-align:center;line-height:25px;margin-top:11px}.n2-top-bar-menu{line-height:60px;height:60px;overflow:hidden}.n2-top-bar-menu .n2-form-dark{margin-top:16px;height:28px;line-height:28px;overflow:hidden}.n2-top-bar-menu>.n2-h4{display:inline-block;line-height:60px;padding:0;color:#b2bfc9;font-size:10px;min-width:80px;text-align:center}.n2-top-bar-menu>.n2-h4.n2-active{color:#ebeced;cursor:default}.n2-top-bar-menu span{color:#b2bfc9;padding:0 10px}@media all and (max-width:800px){.n2-top-bar-menu>.n2-h4{display:none}}.n2-top-bar .n2-save-mode{color:#b2bfc9;font-size:12px}.n2-top-bar .n2-save-mode i{margin:0 10px;padding:0}.n2-top-bar .n2-form-dark .n2-form-element-radio-tab{vertical-align:middle}.n2-top-bar-actions{margin:12px 1px 0;white-space:nowrap;text-align:right}.n2-top-bar-actions .n2-button{margin-right:20px;vertical-align:top}html[dir=rtl] .n2-top-bar-actions .n2-button{margin-right:0;margin-left:20px}.n2-heading-bar{z-index:9;position:relative;background-color:#fff;border-bottom:1px solid #e0e6ed;padding:35px 0;display:flex}.n2-heading-bar-left{flex:1;align-self:center}.n2-heading{position:relative;color:#6b7989;line-height:40px;margin:0 30px}.n2-heading span{position:absolute;font-size:11px;left:2px;bottom:-26px}.n2-heading-menu{position:absolute;bottom:0;left:10px}html[dir=rtl] .n2-heading-menu{left:auto;right:10px}.n2-heading-menu>div{display:inline-block;padding:0 20px;color:#7b8898;cursor:pointer;line-height:34px}.n2-heading-menu>div.n2-active{color:#0c92df}.n2-heading-menu>div.n2-button{color:#fff;line-height:28px}.n2-heading-actions{white-space:nowrap;align-self:center}.n2-heading-actions-label{color:#6b7989;vertical-align:middle;line-height:32px}.n2-heading-actions a,.n2-heading-actions a:HOVER,.n2-heading-actions a:focus{display:inline-block;padding:10px;color:#b0b9bf;vertical-align:middle;font-size:32px}.n2-underline{position:relative}.n2-has-underline>.n2-underline:after{content:"";position:absolute;width:0;height:3px;bottom:-10px;left:0;background-color:#0c92df}.n2-active>.n2-underline:after{width:100%}.n2-controls-panel{line-height:28px}.n2-controls-panel .n2-panel-heading{padding-right:11px;color:#7b8898}.n2-panel-option a{display:inline-block;background-color:#a1aeb5;color:#fff;padding:0 24px;border-right:1px solid #b9c3c9}.n2-panel-option.n2-first a{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}.n2-panel-option.n2-last a{border-right:0;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-panel-option.n2-active a{background-color:#0c92df}.n2-modal{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100002;background-color:RGBA(43,52,63,.9)}.n2-modal-window{position:absolute;top:50%;left:50%;background-color:#fff;z-index:1}.n2-modal-title{line-height:59px;color:#6b7989;border-bottom:1px solid #ccd1d6;overflow:hidden;border-top-left-radius:3px;border-top-right-radius:3px}.n2-modal-title .n2-h2{text-align:center;margin:0 58px;height:59px;overflow:hidden}.n2-modal-title .n2-i{position:absolute;top:0;cursor:pointer;font-size:32px;color:#a1aeb5}.n2-modal-title .n2-i-a-back,.n2-modal-title .n2-i-a-deletes{margin:13px}.n2-modal-title .n2-i-a-deletes{right:0}.n2-modal-title .n2-i-a-back.n2-hidden,.n2-modal-title .n2-i-a-deletes.n2-hidden{display:none}.n2-modal-title .n2-i-a-back{left:0}.n2-modal-content{padding:0 20px 20px;color:#7b8898}.n2-modal-content h3.n2-center,.n2-modal-content p,.n2-tr.n2-modal-controls-1 .n2-td{text-align:center}.n2-modal-content .n2-form{margin:0 -10px}.n2-modal-content .n2-td{padding:0 10px}.n2-modal-controls{position:absolute;left:0;bottom:0;width:100%;margin:20px 0}.n2-modal-controls .n2-table{width:100%}.n2-modal-controls .n2-td{padding:0 20px}.n2-tr.n2-modal-controls-2 .n2-td{width:50%}.n2-tr.n2-modal-controls-2 .n2-modal-controls-0{text-align:right}.n2-tr.n2-modal-controls-2 .n2-modal-controls-1{text-align:left}.n2-modal-controls-side .n2-tr.n2-modal-controls-2 .n2-modal-controls-0{text-align:left;vertical-align:middle}.n2-modal-controls-side .n2-tr.n2-modal-controls-2 .n2-modal-controls-1{text-align:right}.n2-modal-content .n2-table-pane{margin:20px 0}.n2-modal-content .n2-table-pane td{cursor:pointer;padding:20px;border:3px solid #fff;border-radius:3px;transition:all .3s}.n2-modal-content .n2-table-pane td:HOVER{border-color:#dee1e5}.n2-modal-content h3{color:#7b8898;font-weight:400;margin:20px 0 10px}.n2-modal-content p{font-size:11px}.n2-modal-active{overflow:hidden!important}.n2-modal-simple{cursor:pointer}.n2-modal-simple .n2-modal-window{left:0;top:0;cursor:default;width:100%;height:100%}.n2-modal-simple .n2-i-a-deletes{position:absolute;top:19px;right:30px;color:#a4b0b7;font-size:32px;z-index:2}.n2-lb-header{position:relative;background-color:#fff;border-bottom:1px solid #e0e6ed;z-index:10}.n2-modal-simple-header{line-height:40px;padding:15px 30px;color:#6b7989;font-size:24px}.n2-modal-simple .n2-modal-simple-header{padding:20px 30px 0}.n2-modal .n2-mixed-label{margin:20px 0 10px}.n2-modal .n2-mixed-label label{color:#7b8898;font-weight:400;font-size:14px}.n2-modal-radio{text-align:left;margin:0 -20px;overflow:auto}.n2-modal-radio-option{width:112px;height:70px;display:inline-block;margin:0 35px 50px;cursor:pointer;background-position:0 0;text-align:center}.n2-modal-radio-option.n2-active{cursor:default;background-position:0 -80px}.n2-modal-radio-option div{color:#7b8898;margin:75px -20px 0}.n2-modal-radio-option.n2-active div{color:#0c92df}.n2-modal iframe{max-width:none;border:0}.n2-lightbox-heading{color:#fff;line-height:61px;text-align:center;border-bottom:1px solid #2e3742;border-right:0}.n2-sidebar-row{line-height:58px;border-bottom:1px solid #333e4a;padding:0 10px}.n2-sets-header .n2-td{padding:0 10px}.n2-sets-header .n2-td>*{vertical-align:middle}.n2-sets-header .n2-h3,.n2-sets-header .n2-h4{color:#b2bfc9}.n2-sets-header .n2-form{display:inline-block;margin:0}.n2-sets-header .n2-form .n2-form-element-list{margin-bottom:0}.n2-sidebar-heading .n2-h3{color:#fff;margin:0 10px}.n2-lightbox-container{display:none;position:fixed;top:0;left:0;width:100%;height:100%;background:RGBA(43,52,63,.9);padding:20px;z-index:100002;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.n2-lightbox-container .n2-lightbox{width:100%;height:100%;overflow:hidden}.n2-lightbox-container .n2-content-area,.n2-lightbox-sidebar-list{overflow:auto}.n2-lightbox-container .n2-top-bar{margin-right:0}.n2-lightbox-container .n2-content-area{min-height:0}.n2-lightbox-no-sidebar .n2-blue-logo-bg{background:#3c4958;padding:0 30px;text-align:left}.n2-lightbox-no-sidebar .n2-sidebar{border-right-color:#3c4958}.n2-visual-editor-preview-tab,.n2-visual-editor-tabs{text-align:right;vertical-align:middle}html[dir=rtl] .n2-manage-set,html[dir=rtl] .n2-visual-editor-preview-tab,html[dir=rtl] .n2-visual-editor-tabs{text-align:left}.n2-visual-editor-preview-tab .n2-form-element-radio-tab,.n2-visual-editor-tabs .n2-form-element-radio-tab{vertical-align:baseline}.n2-editor-background-color{display:inline-block;height:28px;vertical-align:middle}#n2-font-editor-preview,#n2-style-editor-preview{padding:20px}#n2-animation-editor-preview{position:relative;height:500px;resize:vertical;overflow:hidden}.n2-animation-preview-box{position:absolute;top:50%;left:50%;background-color:#000;background-size:cover}#n2-animation-editor-tab-add,#n2-animation-editor-tab-delete{padding:0;width:28px;vertical-align:middle}.n2-ss-dashboard{max-width:1240px}.n2-form-tab.n2-editor-preview-box{background-color:#ced3d5}.n2-manage-set{text-align:right}.n2-browse-container{height:100%;overflow:auto;margin:0 -20px;transition:opacity .4s;opacity:1}.n2-browse-container.n2-drag-over{opacity:.3}.n2-browse-container .n2-browse-box{position:relative;width:140px;height:140px;border-radius:3px;float:left;margin:10px;cursor:pointer;text-align:center;color:#cdd3d7;overflow:hidden}.n2-browse-container .n2-browse-box>.n2-i{font-size:48px;line-height:134px}.n2-browse-container .n2-browse-upload{margin:7px;width:300px;overflow:hidden;border:3px dashed #dbe0e3}.n2-browse-container .n2-browse-upload div{text-align:center;line-height:30px;margin-top:32px;color:#7b8898}.n2-browse-container .n2-browse-upload input{font-size:200px;height:200px;position:absolute;left:0;top:0;opacity:0;cursor:pointer}.n2-browse-container .n2-browse-directory{box-shadow:0 0 0 3px #dbe0e3}.n2-browse-container .n2-browse-image{background-size:contain;background-repeat:no-repeat;background-color:#f3f5f7}.n2-browse-container .n2-browse-image.n2-active{box-shadow:0 0 0 3px #0c92df}.n2-browse-container .n2-browse-image .n2-button{position:absolute;top:5px;right:5px;padding:0;width:24px;display:none}.n2-browse-container .n2-browse-image.n2-active .n2-button{display:inline-block}.n2-browse-container .n2-browse-box .n2-browse-title{position:absolute;left:0;bottom:0;width:124px;padding:5px;height:30px;line-height:30px;text-align:center;color:#95a0ad;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n2-browse-container .n2-browse-image .n2-browse-title{color:#e8ebed;background-color:#212d3a;background-color:RGBA(43,52,63,.9);width:130px}.sumome-badge-hint{display:none}.n2-result{margin-bottom:20px}.n2-ss-back-to:before{font-family:'Nextend'!important;font-size:16px;vertical-align:top;content:"\e92e";margin:0 4px;color:#7b8898}.n2-ui-autocomplete.ui-autocomplete{z-index:1000000;max-height:300px;overflow:auto;position:absolute;background:#fff;border:2px solid #0c92df;color:#7b8898;font-size:11px;margin:5px 0;border-radius:0;box-shadow:none;list-style-type:none;padding:0}.n2-ui-autocomplete .ui-menu-item{line-height:20px;padding:0 5px;cursor:pointer}.n2-ui-autocomplete .ui-menu-item.ui-state-focus{background:#e9edf0;border:0;margin:0;color:#7b8898;font-weight:400}.n2-nav{position:relative;z-index:11;display:flex}.n2 .ui-slider .ui-slider-handle:focus{outline:none}.n2-form{margin-bottom:20px;border-top:1px solid transparent;margin-top:-1px}.n2-form-dark .n2-content-box-title-bg{background-color:#4d5d70}.n2-form-tab{background:#fff;margin:20px 20px 0;border:1px solid #ccd1d6;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-form-dark .n2-form-tab{background:#4d5d70;margin:0;border:0}.n2-form-tab>.n2-description{margin:20px}.n2-form-dark .n2-form-tab>table{border-bottom:1px solid #303b47}.n2-form-tab .n2-heading-controls,.n2-form-tab>.n2-h2{position:relative;padding:0 20px;color:#6b7989;line-height:54px;border-bottom:1px solid #ccd1d6;z-index:2}.n2-form-tab .n2-heading-controls{min-height:54px}.n2-form-tab table{width:100%;border-spacing:0;border-collapse:collapse;table-layout:fixed;margin-top:-1px}.n2-form-tab-horizontal{padding:20px 20px 0}.n2-form .n2-hidden,.n2-hidden{display:none!important}.n2-label-col{width:251px}.n2-form-dark .n2-label-col{width:136px}.n2-label{width:210px;background-color:#f9fafb;border:1px solid #dee1e5;border-width:1px 1px 0 0;padding:14px 20px;line-height:20px;color:#7b8898;font-size:12px}.n2-label label{color:#7b8898;display:inline-block;margin:0;font-size:100%}.n2-form-element-mixed label .n2-i,.n2-label label .n2-i{font-size:16px;vertical-align:middle}.n2-label label[data-n2tip]:after{font-family:'Nextend'!important;content:"\e620";font-size:16px;vertical-align:top;margin:0 5px;color:#b0b9bf}html[dir=rtl] .n2-label{border-width:1px 0 0 1px}.n2-form-dark .n2-label{width:102px;background-color:#3c4958;border-color:#303b47;color:#b2bfc9}.n2-form-dark .n2-label label{color:#b2bfc9}.n2-documentation,.n2-documentation:ACTIVE,.n2-documentation:FOCUS,.n2-documentation:HOVER{display:inline-block;color:#b9c3c9}.n2-i-info{vertical-align:middle;font-size:16px;margin:0;padding:10px 5px}.n2-form-dark .n2-i-info{color:RGBA(150,167,180,.8)}.n2-element{border-top:1px solid #dee1e5;padding:10px 10px 0}.n2-form-dark .n2-element{border-top:1px solid #414e5e}.n2-element>div{position:relative}.n2-element .n2-element-plain{margin-bottom:10px;color:#6b7989;font-size:12px}.n2 input,.n2 select,.n2 textarea{padding:0;width:auto;box-shadow:none;transition:none;font-family:"Montserrat",Arial,sans-serif}.n2-form input[disabled],.n2-form input[readonly],.n2-form select[disabled],.n2-form select[readonly],.n2-form textarea[disabled],.n2-form textarea[readonly]{background:0 0}.n2-form input,.n2-form textarea{box-sizing:border-box}.n2-form-element-button,.n2-form-element-button:active,.n2-form-element-button:hover,.n2-form-element-button:link,.n2-form-element-button:visited{vertical-align:top;display:inline-block;height:28px;line-height:28px;background-color:#51b82d;color:#fff;padding:0 11px;margin:-2px -2px -2px 0;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-element-button-inverted,.n2-form-element-button-inverted:active,.n2-form-element-button-inverted:hover,.n2-form-element-button-inverted:link,.n2-form-element-button-inverted:visited,html[dir=rtl] .n2-form-element-button,html[dir=rtl] .n2-form-element-button:active,html[dir=rtl] .n2-form-element-button:hover,html[dir=rtl] .n2-form-element-button:link,html[dir=rtl] .n2-form-element-button:visited{margin:-2px 0 -2px -2px;border-radius:0;border-top-left-radius:3px;border-bottom-left-radius:3px}html[dir=rtl] .n2-form-element-button-inverted,html[dir=rtl] .n2-form-element-button-inverted:active,html[dir=rtl] .n2-form-element-button-inverted:hover,html[dir=rtl] .n2-form-element-button-inverted:link,html[dir=rtl] .n2-form-element-button-inverted:visited{margin:-2px -2px -2px 0;border-radius:0;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-element-button-inverted.n2-icon-button:active,.n2-form-element-button-inverted.n2-icon-button:hover,.n2-form-element-button-inverted.n2-icon-button:link,.n2-form-element-button-inverted.n2-icon-button:visited,.n2-form-element-button.n2-icon-button{font-size:16px;min-width:28px;padding:0;text-align:center}.n2-form-element-clear,.n2-form-element-clear:active,.n2-form-element-clear:hover,.n2-form-element-clear:link,.n2-form-element-clear:visited{display:inline-block;height:24px;line-height:24px;width:28px;vertical-align:top;font-size:16px;text-align:center}.n2-form-element-text{display:inline-block;border:2px solid #a1aeb5;margin:0 10px;background:#fff;white-space:nowrap;vertical-align:top;height:24px}.n2-form-dark .n2-form-element-text{border-color:#28313a;background:#303b47}.n2-form .n2-form-element-text{margin-bottom:10px}.n2-form-element-text.focus{border-color:#0c92df}.n2-form-element-option-chooser input[type],.n2-form-element-text input,.n2-form-element-text input:focus,.n2-form-element-text input[type],.n2-form-element-text input[type]:focus{display:inline-block;margin:0 5px;padding:0;border:0;box-shadow:none;height:24px;line-height:24px;color:#7b8898;vertical-align:top}.n2-form-dark .n2-form-element-text input,.n2-form-dark .n2-form-element-text input:focus{background:#303b47;color:#b2bfc9}.n2-form-element-autocomplete.n2-form-element-number .ui-autocomplete .ui-menu-item,.n2-form-element-number input{text-align:center}.n2-form-element-text .n2-text-sub-label,.n2-form-element-text .n2-text-unit{display:inline-block;padding:0 5px;background-color:#a1aeb5;height:24px;line-height:24px;vertical-align:top;color:#fff}.n2-form-element-text .n2-text-unit,html[dir=rtl] .n2-form-element-text .n2-text-sub-label{margin-right:-2px;margin-left:0}.n2-form-element-text .n2-text-sub-label,html[dir=rtl] .n2-form-element-text .n2-text-unit{margin-right:0;margin-left:-2px}.n2-form-dark .n2-form-element-text .n2-text-sub-label,.n2-form-dark .n2-form-element-text .n2-text-unit{background:#28313a;color:#9aa7b2}.n2-form-element-text.focus .n2-text-sub-label,.n2-form-element-text.focus .n2-text-unit{background-color:#0c92df;color:#fff}.n2-form-element-text .n2-form-element-preview{display:inline-block;margin:1px;width:20px;height:20px;background-size:cover;border:1px solid rgba(0,0,0,.2);vertical-align:top}.n2-form-element-connected .n2-form-element-text{position:relative;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0;border-right-width:1px}.n2-form-element-connected .n2-form-element-text+.n2-form-element-text{margin-left:0;border-top-left-radius:0;border-bottom-left-radius:0;border-left-width:1px}.n2-form-element-connected-marginpadding{margin-left:10px}.n2-form-element-connected-marginpadding .n2-text-sub-label{display:inline-block;border:2px solid #28313a;border-right-width:1px;background:#28313a;height:24px;line-height:24px;color:#9aa7b2;vertical-align:top;padding:0 5px;border-top-left-radius:3px;border-bottom-left-radius:3px;font-size:16px;cursor:pointer}.n2-form-element-connected-marginpadding.n2-values-linked .n2-text-sub-label .n2-i:before{content:'\e64d'}.n2-form-element-connected-marginpadding .n2-form-element-text{position:relative;border-radius:0;margin-right:0;margin-left:0;border-left-width:1px;border-right-width:1px}.n2-form-element-connected-marginpadding.n2-values-linked .n2-form-element-text+.n2-form-element-text{display:none}.n2-form-element-text .n2-ui-slider-container{display:none;position:absolute;top:24px;width:100%;min-width:70px;border:2px solid #a1aeb5;border-radius:3px;background-color:#fff;margin:0 -2px;z-index:2}.n2-form-dark .n2-form-element-text .n2-ui-slider-container{border:2px solid #28313a;background:#303b47}.n2-form-element-text.focus .n2-ui-slider-container{border:2px solid #0c92df}.n2-form-element-text.n2-active .n2-ui-slider-container,.n2-form-element-text:HOVER .n2-ui-slider-container{display:block}.n2-form-element-text .ui-slider{position:relative;background:#a1aeb5;height:6px;margin:10px;border-radius:10px}.n2-form-dark .n2-form-element-text .ui-slider{background:#526a80}.n2-form-element-text .ui-slider .ui-slider-handle{position:absolute;top:0;z-index:2;width:10px;height:10px;-ms-touch-action:none;touch-action:none;background:#fff;border:2px solid #a1aeb5;margin:-4px -7px 0;border-radius:50px;cursor:ew-resize}.n2-form-dark .n2-form-element-text .ui-slider .ui-slider-handle{border:2px solid #526a80}.n2-form-element-file input[type=file],.n2-form-element-file input[type=file]:focus{padding:0;height:24px;line-height:24px;margin:0}.n2-form-element-preview-fixed{position:relative;height:96px;border:2px solid #303b47;background-position:50% 50%;background-size:contain;background-repeat:no-repeat;margin:0 10px;overflow:hidden;cursor:pointer;width:300px}.n2-form-element-preview-fixed .n2-button{display:none;position:absolute;top:3px;left:3px}.n2-form-element-preview-fixed:HOVER .n2-button{display:block}.n2-form-element-preview-fixed+div{display:inline-block}.n2-form-element-autocomplete .ui-autocomplete{position:absolute;min-width:100%!important;background:#fff;border:2px solid #0c92df;color:#7b8898;font-size:11px;margin:5px 0;border-radius:0;box-shadow:none;list-style-type:none;z-index:1000}.n2-form-element-autocomplete .ui-autocomplete .ui-menu-item{line-height:20px;padding:0 5px;cursor:pointer}.n2-form-element-autocomplete .ui-autocomplete .ui-menu-item.ui-state-focus{background:#e9edf0;border:0;margin:0;color:#7b8898;font-weight:400}.n2-form-element-autocomplete.ui-front{z-index:auto}.n2-form-element-textarea{display:inline-block;border:2px solid #a1aeb5;margin:0 10px}.n2-form .n2-form-element-textarea{margin-bottom:10px}.n2-form-dark .n2-form-element-textarea{border-color:#28313a;background-color:#303b47}.n2-form-element-textarea.focus{border-color:#0c92df}.n2-form-element-textarea textarea,.n2-form-element-textarea textarea:focus{margin:0;padding:2px 6px;border:0;display:inline-block;color:#7b8898;vertical-align:top;min-height:24px}.n2-form-dark .n2-form-element-textarea textarea,.n2-form-dark .n2-form-element-textarea textarea:focus{background:#303b47;color:#b2bfc9}.n2-textarea-rich{background:#4d5d70;border-bottom:2px solid #28313a;height:32px;color:#fff;font-size:16px;line-height:32px}.n2-textarea-rich>div{display:inline-block;width:32px;text-align:center;border-right:2px solid #28313a;cursor:pointer}.n2-form-element-option-chooser{display:inline-block;border:2px solid #a1aeb5;margin:0 10px;background:#fff}.n2-form .n2-form-element-option-chooser{margin-bottom:10px}.n2-form-dark .n2-form-element-option-chooser{border-color:#28313a;background:#303b47}.n2-form-element-option-chooser input{display:inline-block;margin:0 5px;border:0;box-shadow:none;height:24px;line-height:24px;color:#7b8898;width:120px}.n2-form-dark .n2-form-element-option-chooser input{background:#303b47;color:#b2bfc9}.n2-form-element-color input{text-transform:uppercase;width:50px;text-align:center}.n2-form-element-color-alpha input{width:70px}.n2-form-element-connected,.n2-form-element-mixed,.n2-form-element-onoff,.n2-form-element-onoff *{display:inline-block}.n2-form-element-mixed .n2-mixed-group{display:inline-block;vertical-align:top}.n2-form-element-mixed .n2-mixed-label{line-height:14px}.n2-form-element-mixed label{margin:0 10px;color:#7b8898;font-size:10px;display:inline-block}.n2-form-dark .n2-form-element-mixed label{color:#b2bfc9}.n2-mixed-element>div{position:relative}.n2-form-element-onoff{position:relative;background:#9aa8af;width:44px;height:24px;margin:2px 10px;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;overflow:hidden;cursor:pointer}.n2-form .n2-form-element-onoff{margin-bottom:7px}.n2-form-element-onoff.n2-onoff-on{background:#51b82d}.n2-form-element-onoff .n2-onoff-slider{position:absolute;top:3px;left:0;width:88px;height:18px;-webkit-transition:left .25s;transition:left .25s}.n2-form-element-onoff .n2-onoff-slider *{vertical-align:top}.n2-form-element-onoff.n2-onoff-on .n2-onoff-slider{left:-18px}html[dir=rtl] .n2-form-element-onoff .n2-onoff-slider{left:-44px}html[dir=rtl] .n2-form-element-onoff.n2-onoff-on .n2-onoff-slider{left:-26px}.n2-form-element-onoff .n2-onoff-no{font-size:16px}.n2-form-element-onoff .n2-onoff-no,.n2-form-element-onoff .n2-onoff-yes{width:14px;line-height:18px;color:#fff}.n2-form-element-onoff .n2-onoff-slider .n2-i{line-height:inherit}.n2-form-element-onoff .n2-onoff-no{margin:0 4px}.n2-form-element-onoff .n2-onoff-yes{font-size:14px;margin:0 3px}.n2-form-element-onoff .n2-onoff-round{width:18px;height:18px;background-color:#fff;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;box-shadow:0 0 0 1px RGBA(0,0,0,.1)}.n2-form-element-onoff-button{display:inline-block;border-radius:3px;background-color:#909ca3;line-height:28px;overflow:hidden;cursor:pointer}.n2-form-element-onoff-button .n2-onoffb-label{display:inline-block;color:#fff;font-size:11px;padding:0 10px;line-height:28px}.n2-form-element-onoff-button .n2-onoffb-container{background-color:#a1aeb5;width:32px;height:28px;display:inline-block}.n2-form-element-onoff-button *{vertical-align:top;display:inline-block}.n2-form-element-onoff-button .n2-onoffb-slider{position:relative;border-radius:4px;background-color:#6b7986;width:20px;height:8px;margin:10px 6px}.n2-form-element-onoff-button.n2-onoff-on .n2-onoffb-slider{background-color:#40b618}.n2-form-element-onoff-button .n2-onoffb-round{position:absolute;left:10px;top:-1px;border-radius:5px;width:10px;height:10px;background:#fff;-webkit-transition:left .25s;transition:left .25s}.n2-form-element-onoff-button.n2-onoff-on .n2-onoffb-round{left:0}.n2-form-element-switcher,.n2-form-element-switcher *{display:inline-block}.n2-form-element-switcher{margin:0 10px}.n2-form .n2-form-element-switcher{margin-bottom:10px}.n2-form-element-switcher .n2-switcher-unit{background-color:#a1aeb5;line-height:28px;color:#fff;padding:0 8px;cursor:pointer;border-right:1px solid #b9c3c9}.n2-form-dark .n2-form-element-switcher .n2-switcher-unit{border-color:#28313a;background-color:#303b47;color:#9aa7b2}.n2-form-element-switcher .n2-switcher-unit.n2-active{background-color:#0c92df;cursor:default;color:#fff}.n2-form-element-switcher .n2-switcher-unit.n2-first{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}.n2-form-element-switcher .n2-switcher-unit.n2-last{-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-right:0}.n2-form-element-units{display:inline-block;position:relative;color:#fff}.n2-form-dark .n2-form-element-units{color:#9aa7b2}.n2-form-element-units .n2-element-current-unit{display:inline-block;padding:0 5px;background-color:#a1aeb5;height:24px;line-height:24px;vertical-align:top;border:2px solid #a1aeb5;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-dark .n2-form-element-units .n2-element-current-unit{background-color:#28313a;border:2px solid #28313a}.n2-element-units{display:none;position:absolute;left:0;top:28px;line-height:28px;background-color:#a1aeb5;padding:0 7px;z-index:10000}.n2-form-dark .n2-element-units{background-color:#28313a}.n2-form-element-units:HOVER .n2-element-units{display:block}.n2-element-units>*{cursor:pointer;text-align:center}.n2-form .n2-form-element-radio{margin-bottom:10px}.n2-form-element-radio,.n2-form-element-radio *{display:inline-block}.n2-form-element-radio .n2-radio-option{color:#7b8898;margin:5px 10px;cursor:pointer;line-height:18px;vertical-align:top}.n2-form-dark .n2-form-element-radio .n2-radio-option{color:#b2bfc9}.n2-form-element-radio .n2-radio-option.n2-active{cursor:default}.n2-form-element-radio .n2-radio-option-marker{width:14px;height:14px;border:2px solid #bcc6cb;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px;margin-right:5px;-webkit-transition:border-color .25s,background-color .25s;transition:border-color .25s,background-color .25s;background-color:#fff;font-size:12px;line-height:14px;color:#fff;vertical-align:top;text-align:center}html[dir=rtl] .n2-form-element-radio .n2-radio-option-marker{margin-left:5px;margin-right:0}.n2-form-dark .n2-form-element-radio .n2-radio-option-marker{border-color:#28313a;background-color:#4d5d70}.n2-form-element-radio .n2-radio-option-marker .n2-i{-webkit-transition:opacity .25s;transition:opacity .25s;opacity:0}.n2-form-element-radio .n2-radio-option.n2-active .n2-radio-option-marker{border-color:#6fbc49;background-color:#6fbc49}.n2-form-element-radio .n2-radio-option.n2-active .n2-radio-option-marker .n2-i{opacity:1}.n2-form-element-radio .n2-radio-option.n2-active .n2-radio-option-marker+span{vertical-align:top}.n2-imagelist .n2-form-element-radio,.n2-imagelist img{max-width:100%}.n2-imagelist .n2-radio-option{border:4px solid #b8c2cd;padding:4px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;vertical-align:middle}.n2-imagelist .n2-imagelist-option{line-height:0;background:#b8c2cd;max-width:94%}.n2-white .n2-imagelist .n2-imagelist-option{background:#fff}.n2-imagelist .n2-radio-option.n2-active{border-color:#0c92df}.n2-imagelistlabel .n2-radio-option{position:relative;width:110px;height:70px;background:center 0 no-repeat;padding:0;border:0;border-radius:0;margin-top:10px;margin-bottom:10px}.n2-imagelistlabel .n2-radio-option span{text-align:center;position:absolute;bottom:-8px;left:0;display:block;width:100%;line-height:20px}.n2-imagelistlabel .n2-radio-option.n2-active{background-position:center -70px;color:#0c92df}.n2-form-element-radio-tab{margin:0 10px;line-height:28px;vertical-align:middle!important;height:28px;display:inline-block}.n2-form .n2-form-element-radio-tab{margin-bottom:10px}.n2-form-element-radio-tab>div{float:left}.n2-form-element-radio-tab .n2-radio-option,.n2-form-element-radio-tab .n2-radio-option-label{padding:0 10px;text-align:center;background:#8e9ea7;color:#fff;vertical-align:top;text-transform:uppercase}.n2-form-element-radio-tab .n2-radio-option{cursor:pointer}.n2-form-element-radio-tab .n2-radio-option-label{background:#909ca3;cursor:default}.n2-form-dark .n2-form-element-radio-tab .n2-radio-option{background:#28313a;color:#9aa7b2}.n2-form-element-radio-tab .n2-radio-option.n2-active{background:#0c92df;color:#fff}.n2-form-element-radio-tab .n2-radio-option-label.n2-first,.n2-form-element-radio-tab .n2-radio-option.n2-first{-webkit-border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-topleft:3px;-moz-border-radius-bottomleft:3px;border-top-left-radius:3px;border-bottom-left-radius:3px}.n2-form-element-radio-tab .n2-radio-option-label.n2-last,.n2-form-element-radio-tab .n2-radio-option.n2-last{-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px}.n2-form-element-list{margin:0 10px;display:inline-block}.n2-form .n2-form-element-list{margin-bottom:10px}.n2 .n2-form-element-list select{padding:0;margin:0;height:24px;border:2px solid #b9c3c9;background:0 0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.n2 .n2-form-element-list select[multiple]{height:auto}.n2 .n2-form-dark .n2-form-element-list select{border:2px solid #28313a;background:#303b47;color:#b2bfc9}.n2 .n2-form-element-list select:focus{box-shadow:none}.n2 .n2-form-element-list select{font-weight:400;font-size:12px;color:#7b8898}.n2 .n2-form-element-list select option{padding:0 5px}.n2-form-element-single-button{margin:0 10px}.n2-form .n2-form-element-checkbox,.n2-form .n2-form-element-single-button{margin-bottom:10px}.n2-form-element-checkbox{display:inline-block;margin:0 10px;white-space:nowrap}.n2-checkbox-option{display:inline-block;margin:0 3px;background:#8e9ea7;cursor:pointer;line-height:28px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-checkbox-option.n2-first{margin-left:0}.n2-checkbox-option.n2-last{margin-right:0}.n2-form-dark .n2-checkbox-option{background:#28313a;color:#9aa7b2}.n2-form-element-decoration{display:inline-block}.n2-form-element-decoration .n2-checkbox-option,.n2-form-element-icon-radio .n2-radio-option,.n2-form-element-textalign .n2-radio-option{width:28px;height:28px;line-height:28px;text-align:center;font-size:16px;color:#fff;padding:0}.n2-form-dark .n2-form-element-decoration .n2-checkbox-option,.n2-form-dark .n2-form-element-icon-radio .n2-radio-option{color:#9aa7b2}.n2-checkbox-option.n2-active,.n2-form-dark .n2-checkbox-option.n2-active,.n2-form-dark .n2-form-element-icon-radio .n2-radio-option.n2-active{background:#0c92df;color:#fff}.n2-form-element-img+a,.n2-form-element-img+a+a{margin-right:10px}.n2-form-element-icon{display:inline-block;margin:0 10px;white-space:nowrap}.n2-form .n2-form-element-icon{margin-bottom:10px}.n2-form-element-icon .n2-form-element-preview{margin-right:3px;border:0;width:22px;height:22px;text-align:center;line-height:22px}.n2-form-element-icon .n2-form-element-preview>.n2i{color:#fff;font-size:22px;vertical-align:top}.n2-icons-modal .n2-modal-content{overflow:auto!important}.n2-icons-modal .n2-icon{display:inline-block;margin:5px;width:32px;height:32px;cursor:pointer;font-size:24px;line-height:32px;text-align:center;color:#000}.n2-icons-modal .n2-modal-content{}.n2-icons-modal .n2-modal-content .n2-form-tab:last-child{margin-bottom:40px}.n2-subform-image .n2-subform-image-option{display:inline-block;width:150px;height:120px;padding:30px 3%;color:#7b8898}.n2-subform-image .n2-subform-image-option .n2-subform-image-element{width:150px;height:90px;cursor:pointer}.n2-subform-image .n2-subform-image-option.n2-active .n2-subform-image-element{background-position:0 -100px;cursor:default}.n2-subform-image .n2-subform-image-option .n2-subform-image-title{text-align:center;margin-top:10px}.n2-subform-image .n2-subform-image-option.n2-active{color:#0c92df}.n2-subform-image.n2-small .n2-subform-image-option .n2-subform-image-element{width:100px;height:70px}.n2-subform-image.n2-small .n2-subform-image-option.n2-active .n2-subform-image-element{background-position:0 -80px}.n2-subform-image.n2-small .n2-subform-image-option{width:100px;height:100px}.n2-subform-image .n2-subform-image-option-simple{display:inline-block;width:190px;height:120px;border-radius:3px;border:5px solid #a1aeb5;margin:25px;padding:0;vertical-align:top}.n2-subform-image .n2-subform-image-option-simple.n2-active{border-color:#0c92df}.n2-subform-image .n2-subform-image-option-simple div.n2-subform-image-element{width:100%;height:100%;background-repeat:repeat-y}.n2-subform-image .n2-subform-image-option-simple.n2-active div.n2-subform-image-element{background-position:0 -120px}.n2-subform-2-rows{max-height:360px;overflow:auto;margin:-10px -10px 0}.n2-form-matrix{border-bottom-width:1px;border-radius:3px}.n2-form-matrix .n2-form-tab{border-radius:0}.n2-form-matrix>.n2-h2{padding:0}.n2-form-matrix .n2-form-matrix-menu{cursor:pointer;display:inline-block;margin:0 20px;vertical-align:top;line-height:60px;font-size:14px;color:#b2bfc9}.n2-form-matrix .n2-form-matrix-menu.n2-active{color:#fff}.n2-form-matrix .n2-form-matrix-menu.n2-has-underline>.n2-underline::after{bottom:-10px;color:#0c92df}#n2-css-basiccss.n2-basiccss-show-preset-list #n2-tab-basiccssfont,#n2-css-basiccss.n2-basiccss-show-preset-list #n2-tab-basiccssstyle,.n2-form-matrix-pane{display:none}.n2-form-matrix>.n2-form-matrix-views{z-index:4;padding:0 20px;background:#212d3a;margin:-1px -1px 0;border-top-left-radius:3px;border-top-right-radius:3px}#n2-tab-basiccssfont.n2-css-has-font,#n2-tab-basiccssstyle.n2-css-has-style,.n2-form-matrix-pane.n2-active{display:block}.n2-form-matrix-pane .n2-form{margin-bottom:0}.n2-form-matrix-pane .n2-form-tab{border-width:0 0 1px;margin:0}.n2-form-matrix-pane .n2-form-tab>.n2-h2{font-size:14px}#n2-tab-basiccssfont,#n2-tab-basiccssstyle{display:none;background:#3c4958}#n2-tab-basiccssfont>.n2-h2,#n2-tab-basiccssstyle>.n2-h2,.n2-editor-header.n2-h2{padding:0;line-height:43px;background:#28313a;border-bottom:1px solid #20282f}#n2-tab-basiccssfont>.n2-h2,#n2-tab-basiccssstyle>.n2-h2{margin-bottom:5px}.n2-editor-header>span{position:relative;font-size:11px;display:inline-block;vertical-align:top;color:#b2bfc9}.n2-css-name{color:#b2bfc9}.n2-css-name,.n2-css-tab,.n2-editor-header .n2-ss-button-container,.n2-editor-header .n2-ss-button-container-left{position:relative;font-size:11px;display:inline-block;vertical-align:top}.n2-editor-header .n2-ss-button-container{float:right;color:#fff}.n2-editor-header .n2-ss-button-container-left{color:#fff;float:left}.n2-css-tab{float:right;color:#fff}.n2-editor-header .n2-ss-button-container-left>*{margin-left:10px;vertical-align:middle}#n2-tab-basiccssfont .n2-css-tab,#n2-tab-basiccssstyle .n2-css-tab{overflow:hidden;height:24px;line-height:24px;border-radius:3px;margin:10px 10px 0 0}#n2-tab-basiccssfont .n2-css-tab-reset,#n2-tab-basiccssstyle .n2-css-tab-reset{display:none;float:right;margin:10px 10px 0 0}#n2-tab-basiccssfont.n2-css-show-reset .n2-css-tab-reset,#n2-tab-basiccssstyle.n2-css-show-reset .n2-css-tab-reset{display:inline-block}.n2-css-tab>*,.n2-editor-header .n2-ss-button-container>*{display:inline-block;padding:0 10px}.n2-editor-header .n2-ss-button-container{margin-right:10px}.n2-css-tab>.n2-button,.n2-editor-header .n2-ss-button-container>.n2-button{height:24px;line-height:24px;padding:0}.n2-editor-header .n2-ss-button-container>.n2-button-icon{height:28px;line-height:28px;width:28px;vertical-align:middle}.n2-css-tab>.n2-button-normal,.n2-editor-header .n2-ss-button-container>.n2-button-normal{padding:0 15px}.n2-css-name-label,.n2-editor-header>span{padding:0 10px}.n2-css-name .n2-css-name-list{display:none}.n2-css-name.n2-multiple .n2-css-name-label:after{content:"\e638";font-family:'Nextend'!important;vertical-align:top;margin:0 0 0 5px}.n2-css-name.n2-multiple .n2-css-name-list{position:absolute;left:0;top:34px;background:#28313a;white-space:nowrap}.n2-css-name.n2-multiple:HOVER .n2-css-name-list{display:block}.n2-css-name.n2-multiple .n2-css-name-list>*{white-space:nowrap;display:block;padding:0 10px;cursor:pointer}.n2-css-name.n2-multiple .n2-css-name-list>*:HOVER{background:#303b47}.n2-css-tab span{background:#6b7986;cursor:pointer;height:24px;line-height:24px}.n2-css-tab span.n2-active{background:#0c92df;cursor:default}#n2-tab-basiccssfont #layerfamily{max-width:none!important}#n2-tab-basiccsspresets{display:none}#n2-css-basiccss.n2-basiccss-show-preset-list #n2-tab-basiccsspresets{display:block}#n2-tab-basiccsspresets div div{line-height:30px;background-color:#303b47;border-bottom:1px solid RGBA(0,0,0,.2);color:#fff;cursor:pointer;padding:0 20px}#n2-tab-basiccsspresets div div:HOVER{background:#1681c1}.n2-basiccss-more{background:#303b47;line-height:28px;height:28px;vertical-align:top;margin-top:15px;float:right;margin-right:23px;color:#9aa7b2}.n2-notification-center-modal{background-color:RGBA(43,52,63,.9);width:100%;height:100%;position:fixed;left:0;top:0;display:none;z-index:2147483646}.n2-notification-center-modal.n2-active,.n2-notification-center-modal.n2-active .n2-notification-center{display:block}.n2-notification-center{display:none;position:absolute;top:61px;right:0;width:370px;background:#fff;border:1px solid #ccd1d6;border-top:0;opacity:0}.n2-notification-center-modal .n2-notification-center{display:none;position:absolute;left:50%;right:auto;top:50%;margin-left:-185px;margin-top:-63px;opacity:1}.n2-notification-settings{position:relative;background:#f2f5fa;border-top:1px solid #ccd1d6;height:44px}.n2-notification-clear{position:absolute;left:10px;top:10px}.n2-notification-important{position:absolute;right:10px;top:13px;cursor:pointer}.n2-notification-important span{vertical-align:top;padding:0 10px;color:#6b7989}.n2-checkbox{display:inline-block;width:14px;height:14px;background:#f2f5fa;border:2px solid #b9c3c9;border-radius:2px;vertical-align:top}.n2-checkbox .n2-i{color:#f2f5fa;font-size:14px;margin:0;padding:0;vertical-align:top}.n2-active>.n2-checkbox{background:#6fbc49;border-color:#6fbc49}.n2-active>.n2-checkbox .n2-i{color:#fff}.n2-notification-message{border-top:1px solid #ccd1d6}.n2-notification-message .n2-td{padding:22px 0}.n2-notification-message .n2-first{width:62px}.n2-notification-message .n2-i{vertical-align:middle;margin:0 10px;font-size:32px}.n2-notification-message h4{margin:0}.n2-notification-message p{color:#7b8898;margin:0}.n2-notification-message-error,.n2-notification-message-error h4{color:#c54633}.n2-notification-message-success,.n2-notification-message-success h4{color:#50aa31}.n2-notification-message-notice,.n2-notification-message-notice h4{color:#0c92df}.n2-notification-empty{color:#7b8898;margin:20px;text-align:center}.n2-loader-overlay{display:none;position:fixed;width:100%;height:100%;left:0;top:0;z-index:2147483647;background-color:RGBA(43,52,63,.9)}.n2-loader-overlay.n2-active{display:block}.n2-loader{position:absolute;left:50%;top:50%;margin-left:-20px;margin-top:-20px;border:10px solid rgba(255,255,255,.2);border-left-color:#fff;-webkit-animation:n2-load 1.1s infinite linear;animation:n2-load 1.1s infinite linear;overflow:hidden}.n2-loader,.n2-loader:after{border-radius:50%;width:40px;height:40px}@-webkit-keyframes n2-load{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes n2-load{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.n2-sp-container{position:absolute;top:0;left:0;display:inline-block;*display:inline;*zoom:1;z-index:2147483647;overflow:hidden}.n2-sp-container.n2-sp-flat,.n2-sp-top{position:relative}.n2-sp-top{width:100%;display:inline-block}.n2-sp-top-inner{left:0;right:0;margin-bottom:5px}.n2-sp-color,.n2-sp-hue,.n2-sp-top-inner{position:absolute;top:0;bottom:0}.n2-sp-color{margin-right:5px;left:0;right:20%}.n2-sp-hue{right:0;left:84%;height:100%;box-shadow:0 0 1px 1px rgba(0,0,0,.2)inset}.n2-sp-fill{padding-top:80%}.n2-sp-sat,.n2-sp-val{position:absolute;top:0;left:0;right:0;bottom:0;box-shadow:0 0 1px 1px rgba(0,0,0,.2)inset}.n2-sp-alpha-enabled .n2-sp-top{margin-bottom:18px}.n2-sp-alpha-enabled .n2-sp-alpha{display:block}.n2-sp-alpha-handle{position:absolute;top:-4px;bottom:-4px;width:7px;left:50%;cursor:pointer;box-shadow:0 0 0 1px RGBA(0,0,0,.4);background:#fff;border-radius:2px}.n2-sp-alpha{display:none;bottom:-14px;right:0;left:0;height:8px}.n2-sp-alpha-inner{background:-moz-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:-webkit-gradient(linear,left top,right top,color-stop(25%,rgba(0,0,0,0)),color-stop(100%,#000));background:-webkit-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:-o-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:-ms-linear-gradient(left,rgba(0,0,0,0)25%,#000 100%);background:linear-gradient(to right,rgba(0,0,0,0)25%,#000 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#000000', GradientType=1);box-shadow:0 0 1px 1px rgba(0,0,0,.2)inset}.n2-sp-alpha,.n2-sp-alpha-handle,.n2-sp-container,.n2-sp-container button,.n2-sp-container.n2-sp-dragging .n2-sp-input,.n2-sp-dragger,.n2-sp-preview,.n2-sp-replacer,.n2-sp-slider{-webkit-user-select:none;-moz-user-select:-moz-none;-o-user-select:none;user-select:none}.n2-sp-container.n2-sp-buttons-disabled .n2-sp-button-container,.n2-sp-container.n2-sp-input-disabled .n2-sp-input-container,.n2-sp-initial-disabled .n2-sp-initial,.n2-sp-palette-disabled .n2-sp-palette-container,.n2-sp-palette-only .n2-sp-picker-container{display:none}.n2-sp-sat{background-image:-webkit-gradient(linear,0 0,100% 0,from(#fff),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-moz-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-o-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:-ms-linear-gradient(left,#fff,rgba(204,154,129,0));background-image:linear-gradient(to right,#fff,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81')}.n2-sp-val{background-image:-webkit-gradient(linear,0 100%,0 0,from(#000),to(rgba(204,154,129,0)));background-image:-webkit-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-moz-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-o-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:-ms-linear-gradient(bottom,#000,rgba(204,154,129,0));background-image:linear-gradient(to top,#000,rgba(204,154,129,0));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000')}.n2-sp-hue{background:-moz-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-ms-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-o-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%);background:-webkit-gradient(linear,left top,left bottom,from(red),color-stop(.17,#ff0),color-stop(.33,#0f0),color-stop(.5,#0ff),color-stop(.67,#00f),color-stop(.83,#f0f),to(red));background:-webkit-linear-gradient(top,red 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red 100%)}.n2-sp-1{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00')}.n2-sp-2{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00')}.n2-sp-3{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff')}.n2-sp-4{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff')}.n2-sp-5{height:16%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff')}.n2-sp-6{height:17%;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000')}.n2-sp-cf:after,.n2-sp-cf:before{content:"";display:table}.n2-sp-cf:after{clear:both}.n2-sp-cf{*zoom:1}@media (max-device-width:480px){.n2-sp-color{right:40%}.n2-sp-hue{left:63%}.n2-sp-fill{padding-top:60%}}.n2-sp-dragger,.n2-sp-slider{position:absolute;top:0;cursor:pointer;background:#fff;box-shadow:0 0 0 1px RGBA(0,0,0,.4)}.n2-sp-dragger{width:12px;transform:translateX(6px) translateY(6px);border-radius:12px;height:12px;left:0}.n2-sp-slider{height:6px;left:-2px;right:-2px;border-radius:2px;transform:translateY(3px)}.n2-sp-container{border-radius:3px;background-color:#fff;padding:0;border:2px solid #b9c3c9}.n2-sp-color,.n2-sp-container,.n2-sp-container button,.n2-sp-container input,.n2-sp-hue{font:12px "Lucida Grande","Lucida Sans Unicode","Lucida Sans",Geneva,Verdana,sans-serif;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.n2-sp-top{margin-bottom:3px}.n2-sp-input-container{float:right;width:100px;margin-bottom:4px}.n2-sp-initial-disabled .n2-sp-input-container{width:100%}.n2-sp-input{font-size:12px!important;border:1px inset;padding:4px 5px;margin:0;width:100%;background:0 0;border-radius:3px;color:#222}.n2-sp-input:focus{border:1px solid orange}.n2-sp-input.n2-sp-validation-error{border:1px solid red;background:#fdd}.n2-sp-palette-container,.n2-sp-picker-container{float:left;position:relative;padding:10px 10px 300px;margin-bottom:-295px}.n2-sp-picker-container{width:172px}.n2-sp-palette-container{border-right:solid 1px #ccc}.n2-sp-palette-row{float:left}.n2-sp-palette-row-selection{border-left:1px solid rgba(0,0,0,.2);margin-left:7px;padding-left:5px}.n2-sp-palette .n2-sp-thumb-el{display:block;position:relative;clear:left;float:left;cursor:pointer}.n2-sp-palette .n2-sp-thumb-el.n2-sp-thumb-active,.n2-sp-palette .n2-sp-thumb-el:hover{border-color:orange}.n2-sp-initial{float:left;border:solid 1px #333}.n2-sp-initial span{width:30px;height:25px;border:none;display:block;float:left;margin:0}.n2-sp-button-container{float:right}.n2-sp-replacer{margin:0;overflow:hidden;cursor:pointer;padding:2px;border-radius:3px;display:inline-block;*zoom:1;*display:inline;color:#333;vertical-align:top}.n2-sp-replacer.n2-sp-active,.n2-sp-replacer:hover{border-color:#d8d8d8;color:#111}.n2-sp-replacer.n2-sp-disabled{cursor:default;border-color:silver;color:silver}.n2-sp-dd{display:none;height:8px;line-height:8px;width:8px;background-color:#d8d8d8;font-size:7px;margin:13px 0 0 -9px;position:relative;-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;float:left;text-align:center}.n2-sp-preview{width:20px;height:20px;border-radius:3px;float:left;z-index:0;overflow:hidden}.n2-sp-palette{*width:220px;max-width:220px}.n2-sp-palette .n2-sp-thumb-el{width:20px;height:20px;margin:4px;border:0}.n2-sp-palette .n2-sp-thumb-inner{width:20px;height:20px}.n2-sp-container{padding-bottom:0}.n2-sp-container button{background-color:#eee;background-image:-webkit-linear-gradient(top,#eee,#ccc);background-image:-moz-linear-gradient(top,#eee,#ccc);background-image:-o-linear-gradient(top,#eee,#ccc);background-image:-ms-linear-gradient(top,#eee,#ccc);background-image:linear-gradient(to bottom,#eee,#ccc);border:1px solid #ccc;border-bottom:1px solid #bbb;border-radius:3px;color:#333;font-size:14px;line-height:1;padding:5px 4px;text-align:center;text-shadow:0 1px 0 #eee;vertical-align:middle}.n2-sp-container button:hover{background-color:#ddd;background-image:-webkit-linear-gradient(top,#ddd,#bbb);background-image:-moz-linear-gradient(top,#ddd,#bbb);background-image:-o-linear-gradient(top,#ddd,#bbb);background-image:-ms-linear-gradient(top,#ddd,#bbb);background-image:linear-gradient(to bottom,#ddd,#bbb);border:1px solid #bbb;border-bottom:1px solid #999;cursor:pointer;text-shadow:0 1px 0 #ddd}.n2-sp-container button:active{border:1px solid #aaa;border-bottom:1px solid #888;-webkit-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-moz-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-ms-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;-o-box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee;box-shadow:inset 0 0 5px 2px #aaa,0 1px 0 0 #eee}.n2-sp-cancel{font-size:11px;color:#d93f3f!important;padding:2px;margin:0 5px 0 0;vertical-align:middle;text-decoration:none}.n2-sp-cancel:hover{color:#d93f3f!important;text-decoration:underline}.n2-sp-palette span.n2-sp-thumb-active,.n2-sp-palette span:hover{border-color:rgba(0,0,0,.5)}.n2-sp-alpha,.n2-sp-preview,.n2-sp-thumb-el{position:relative;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.n2-sp-alpha-inner,.n2-sp-preview-inner,.n2-sp-thumb-inner{display:block;position:absolute;top:0;left:0;bottom:0;right:0}.n2-sp-thumb-inner{border-radius:3px}.n2-sp-preview-inner,.n2-sp-thumb-inner{border:solid 1px RGBA(0,0,0,.2)}.n2-sp-palette .n2-sp-thumb-inner{background-position:50% 50%;background-repeat:no-repeat}.n2-sp-palette .n2-sp-thumb-light.n2-sp-thumb-active .n2-sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=)}.n2-sp-palette .n2-sp-thumb-dark.n2-sp-thumb-active .n2-sp-thumb-inner{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=)}.n2-vt{vertical-align:top}.n2-vm{vertical-align:middle}.n2-radius-s{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.n2-radius-m{-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.n2-radius-l{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.n2-tooltip{position:absolute;left:-10000px;top:-10000px;margin-top:-9000000px;opacity:0;z-index:100000;border-radius:3px;line-height:16px;padding:4px 6px;color:#fff;font-size:10px;background:RGBA(32,41,52,.95)}.n2-tooltip.n2-active{opacity:1;margin:10px}.n2-position-display-active .n2-tooltip{display:none}.n2-button{display:inline-block;text-align:center;cursor:pointer}.n2-button,.n2-button-inner,.n2-button-inner:ACTIVE,.n2-button-inner:FOCUS,.n2-button-inner:LINK,.n2-button-inner:VISITED,.n2-button:ACTIVE,.n2-button:FOCUS,.n2-button:LINK,.n2-button:VISITED{color:#fff;text-decoration:none}.n2-button-darker,.n2-button-darker:ACTIVE,.n2-button-darker:FOCUS,.n2-button-darker:LINK,.n2-button-darker:VISITED{color:#b2bfc9}.n2-button-wide{display:block;margin:10px 20px}.n2-button-icon{font-size:16px}.n2-button-icon.n2-h32{font-size:32px}.n2-button-with-actions{position:relative}.n2-button-with-actions .n2-button-inner{display:inline-block;height:100%;padding:0 20px;line-height:inherit}.n2-button-with-actions .n2-button-menu-open{position:relative;width:36px;height:100%;display:inline-block;vertical-align:top;background:RGBA(0,0,0,.1);border-left:1px solid RGBA(0,0,0,.1)}.n2-button-menu-open .n2-button-menu{display:none;position:absolute;right:0;top:36px;z-index:3}html[dir=rtl] .n2-button-menu-open .n2-button-menu{right:auto;left:0}.n2-button-menu-inner{margin-top:5px;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);padding:5px 0;background-color:#fff;border-radius:5px}.n2-box-generator .n2-button-menu-inner{max-height:150px;overflow-y:auto;overflow-x:hidden}.n2-button-menu-open.n2-active .n2-button-menu{display:block}.webkit-scroll-fix::-webkit-scrollbar{-webkit-appearance:none;width:7px}.webkit-scroll-fix::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,.5);box-shadow:0 0 1px rgba(255,255,255,.5)}.n2-button-xs{height:18px;line-height:18px}.n2-button-xs.n2-button-normal{padding:0 5px}.n2-button-s{height:24px;line-height:24px}.n2-button-s.n2-button-normal,.n2-button-s.n2-button-with-actions .n2-button-inner{padding:0 10px}.n2-button-s .n2-button-menu-open{width:25px}.n2-button-s .n2-button-menu-open .n2-button-menu{top:24px}.n2-button-s.n2-button-icon{width:24px}.n2-button-m{height:28px;line-height:28px}.n2-button-m.n2-button-normal{padding:0 10px}.n2-button-m.n2-button-with-actions .n2-button-inner{padding:0 16px}.n2-button-m .n2-button-menu-open,.n2-button-m.n2-button-icon{width:28px}.n2-button-m .n2-button-menu-open .n2-button-menu{top:28px}.n2-button-m-narrow.n2-button-icon{width:20px}.n2-button-l{height:36px;line-height:36px}.n2-button-l.n2-button-normal{padding:0 15px;min-width:70px}.n2-button-l.n2-button-icon{width:36px}.n2-button-xl{height:50px;line-height:50px}.n2-button-xl,.n2-button-xl.n2-button-normal{padding:0 44px}.n2-button-grey{background:#6b7986}.n2-button-blue,.n2-button-blue-active.n2-active{background:#0c92df}.n2-button-green{background:#51b82d}.n2-button-red{background:#c54633}.n2-button-purple{background:#5f39c2}.n2-button-menu a{display:block;text-align:left;color:#7b8898;line-height:30px;padding:0 20px;white-space:nowrap}.n2-button-menu a:active,.n2-button-menu a:focus,.n2-button-menu a:hover{color:#7b8898}.n2-button-menu a:HOVER{background:#e9edf0}.n2-button-menu a.n2-separator{border-bottom:2px solid #ccd1d6}.n2-button-plain{background:0 0!important;color:#7b8898;height:26px;line-height:26px}.n2-button-plain .n2-button-inner{color:#7b8898;padding:0 5px!important}.n2-button-plain.n2-button-with-actions .n2-button-menu-open{border-left:0;background:0 0}.n2-button-plain .n2-button-inner:active,.n2-button-plain .n2-button-inner:focus,.n2-button-plain .n2-button-inner:link,.n2-button-plain .n2-button-inner:visited,.n2-button-plain:active,.n2-button-plain:focus,.n2-button-plain:link,.n2-button-plain:visited{color:#7b8898}.n2-button-plain.n2-button-with-actions .n2-button-menu-open{width:16px}.n2-button-plain.n2-button-with-actions .n2-button-menu-open .n2-button-menu{top:20px}.n2-button-with-icon{border:2px solid #e0e6ed;color:#6b7989;margin:5px;padding:0 10px}.n2-button-with-icon:ACTIVE,.n2-button-with-icon:FOCUS,.n2-button-with-icon:LINK,.n2-button-with-icon:VISITED{color:#6b7989}.n2-color-red,.n2-color-red.n2-button-plain:visited,.n2-color-red:active,.n2-color-red:focus,.n2-color-red:link{color:#c44e3d!important}.n2-color-blue,.n2-color-blue.n2-button-plain:visited,.n2-color-blue:active,.n2-color-blue:focus,.n2-color-blue:link{color:#0c92df!important}.n2-definition-list,.n2-list{margin:0;padding:0}.n2-definition-list dt{position:relative;line-height:59px;height:59px;background:#303b47;border-bottom:1px solid RGBA(0,0,0,.2);overflow:hidden}.n2-definition-list dt>a{display:block;padding:0 20px;color:#b2bfc9}.n2-definition-list dt>a .n2-i{margin-right:10px;vertical-align:middle;font-size:32px}html[dir=rtl] .n2-definition-list dt>a .n2-i{margin-right:0;margin-left:10px}.n2-definition-list dt .n2-id{display:block;width:70px;position:absolute;left:0;bottom:5px;text-align:center;line-height:11px;color:#8b99a6}.n2-definition-list dt>.n2-actions{display:block;position:absolute;top:0;right:0;background-color:#303b47;font-size:16px;line-height:16px;padding:22px 20px 0}.n2-definition-list dt.n2-open>.n2-actions{background-color:#3c4958}.n2-definition-list dt>.n2-actions a{display:inline-block;padding:0 5px}.n2-definition-list dt>.n2-actions a .n2-i,.n2-list li .n2-actions>* .n2-i{vertical-align:middle}html[dir=rtl] .n2-definition-list dt>.n2-actions,html[dir=rtl] .n2-list li>.n2-actions{right:auto;left:0}.n2-definition-list dd{margin:0}.n2-list li,.n2-list li>a{color:#b2bfc9;display:block}.n2-list li{position:relative;margin:0;line-height:39px;background-color:#303b47;border-bottom:1px solid RGBA(0,0,0,.2)}.n2-list li>a{padding:0 20px}.n2-list li>a .n2-i{vertical-align:middle;padding:7px;margin-left:-7px;font-size:16px}.n2-list li.n2-active{background:#1681c1}.n2-list li.n2-active>a{color:#fff;vertical-align:middle}.n2-list .n2-list-checkbox.n2-active .n2-i,.n2-list li.n2-active>.n2-actions .n2-i{color:#fff}.n2-list li .n2-actions{position:absolute;top:0;right:0;padding:2px 3px 0;line-height:24px}.n2-list li .n2-actions-left>*,.n2-list li .n2-actions>*{display:inline-block;margin:0 2px}.n2-list li.n2-button-container{padding:22px 20px}.n2-list .n2-list-checkbox{display:inline-block;width:16px;height:16px;background:#343f4c;vertical-align:top;border:2px solid #212d3a;border-radius:2px;line-height:16px;margin:10px 10px 0 0}.n2-list .n2-list-checkbox .n2-i{color:#343f4c;font-size:16px;margin:0;padding:0;vertical-align:top}.n2-list .n2-list-checkbox.n2-active{background:#6fbc49;border-color:#6fbc49}.n2-box{float:left;display:inline-block;position:relative;width:270px;height:180px;margin:15px;border-radius:3px;background-color:#212d3a;background-size:cover;background-position:50% 50%;opacity:1;transition:opacity .6s;box-shadow:0 0 5px RGBA(0,0,0,.05)}.n2-box.n2-active{box-shadow:0 0 0 3px #0c92df}.n2-ss-box-just-added{opacity:0}.n2-box-small{width:200px;height:135px;margin:10px}.n2-box.ui-sortable-helper{transform:scale(.8);opacity:.8}.n2-box-sortable-placeholder{height:200px;margin:5px 0;width:0;box-shadow:0 0 0 2px #0c92df;float:left;display:inline-block}.n2-box-sortable-placeholder-small{height:145px}.n2-box img{position:absolute;clip:rect(0,270px,180px,0);border-radius:3px;width:100%}.n2-box-small img{clip:rect(0,200px,95px,0)}.n2-box .n2-box-overlay{position:absolute;left:0;top:0;z-index:3;width:100%;height:100%;background-color:rgba(32,41,52,.9);text-align:center;line-height:130px;border-radius:3px}.n2-box-small .n2-box-overlay{line-height:100px}.n2-box-overlay .n2-button{line-height:28px;height:28px}.n2-box .n2-box-placeholder{position:absolute;left:0;bottom:0;height:50px;background:#fff;background:#212d3a;border-bottom-left-radius:3px;border-bottom-right-radius:3px;width:100%;z-index:9;display:flex;justify-content:space-between}.n2-box-small .n2-box-placeholder{height:40px}.n2-box-placeholder>*{margin:auto 0}.n2-box-placeholder-title{margin:auto 10px;overflow:hidden;max-height:100%}.n2-box-placeholder-buttons{white-space:nowrap;margin:auto 10px}.n2-box-placeholder-button{text-align:center;margin:auto}.n2-box-placeholder-title,.n2-box-placeholder-title a{color:#cedae2;line-height:16px}.n2-box-small .n2-box-placeholder-title,.n2-box-small .n2-box-placeholder-title a{line-height:20px}.n2-box .n2-box-lt{position:absolute;left:5px;top:5px;width:50%;text-align:left;z-index:4}.n2-box .n2-box-rt{position:absolute;right:5px;top:5px;width:50%;text-align:right}.n2-box .n2-box-lb{position:absolute;left:5px;bottom:55px}.n2-box-small .n2-box-lb{bottom:45px}.n2-box .n2-box-lb>*{white-space:nowrap}.n2-box .n2-box-rb{position:absolute;right:5px;bottom:55px;text-align:right}.n2-box-small .n2-box-rb{bottom:45px}.n2-box .n2-box-center{position:absolute;left:0;top:74px;width:100%;text-align:center;z-index:4}.n2-box>.n2-on-hover{display:none}.n2-box:HOVER>.n2-on-hover{display:block}.n2-ss-box-select{display:none;border-radius:3px;border:2px solid #8793a2;width:16px;height:16px;text-align:center}.n2-box:HOVER .n2-ss-box-select{display:block}.n2-box.n2-selected .n2-ss-box-select{display:block;border-color:#1999e3;background-color:#1999e3}.n2-box.n2-selected .n2-ss-box-select .n2-i{display:inline-block;color:#fff;font-size:16px;line-height:16px;margin:0 -2px}.n2-bulk-select{margin:0 10px}.n2-box .n2-ss-box-select .n2-i,.n2-bulk-actions{display:none}.n2-ss-has-box-selection .n2-heading-actions{visibility:hidden}.n2-ss-has-box-selection .n2-bulk-actions{display:inline-block}.n2-ss-has-box-selection .n2-box-selectable{opacity:.5}.n2-ss-has-box-selection .n2-box-selectable.n2-selected{opacity:1}.n2-ss-has-box-selection .n2-ss-box-select{display:inline-block}.n2-box-menu{display:none;z-index:9}.n2-box-menu.n2-inited{display:inline-block;position:absolute;top:5px;right:5px;text-align:right}.n2-box-menu .n2-button{float:right}.n2-box-menu .n2-box-menu-content{display:none}.n2-box-menu.n2-active .n2-box-menu-content{margin-top:3px;display:block;clear:both;float:right;background:#fff;border-radius:5px;line-height:30px;text-align:left;box-shadow:0 0 5px 0 RGBA(0,0,0,.3);padding:5px 0;white-space:nowrap}.n2-box-menu.n2-active .n2-box-menu-content ul{margin:0;list-style-type:none}.n2-box-menu.n2-active .n2-box-menu-content li{padding:0 20px;margin:0;color:#7b8898;line-height:30px}.n2-box-menu.n2-active .n2-box-menu-content li:HOVER{background-color:#e9edf0}.n2-box-menu.n2-active .n2-box-menu-content li.n2-ss-delete{color:#c44e3d}.n2-box-full>a{width:100%;height:180px;padding:0}.n2-box-full>a:before{display:block;font-family:'Nextend'!important;font-size:74px;line-height:90px;content:"\e952";margin-top:35px}.n2-box-promo{background:0 0}.n2-box-promo-light{background:#fff}.n2-box-promo-overlay,.n2-box-promo-overlay:FOCUS,.n2-box-promo-overlay:HOVER,.n2-box-promo-overlay:VISITED{position:absolute;display:block;width:100%;height:100%;color:#fff;text-align:center}.n2-box-promo .n2-close{position:absolute;right:10px;top:10px;cursor:pointer;display:none;z-index:3}.n2-box-promo:hover .n2-close{display:block}.n2-box-promo .n2-close:before{font-family:'Nextend'!important;content:"\e90a";font-size:16px}.n2-box-promo-light .n2-close:before{color:#7b8898}.n2-box-promo-dark .n2-close:before{color:#fff}.n2-box-promo span{display:block;position:absolute;bottom:50px;width:100%;line-height:23px;text-align:center;font-size:12px}.n2-box-promo-light span{color:#7b8898}.n2-box-promo-dark span{color:#eff7fb}.n2-box-promo-buttons{position:absolute;bottom:17px;width:100%;text-align:center}.n2-box-promo-buttons .n2-button+.n2-button{margin-left:20px}.n2-box-review{text-align:center}.n2-box-review-bigstar{width:170px;height:105px;margin:0 auto;background-image:url(../images/stars-big.png)}[data-stars="1"] .n2-box-review-bigstar{background-position:0 -105px}[data-stars="2"] .n2-box-review-bigstar{background-position:0 -210px}[data-stars="3"] .n2-box-review-bigstar{background-position:0 -315px}[data-stars="4"] .n2-box-review-bigstar{background-position:0 -420px}[data-stars="5"] .n2-box-review-bigstar{background-position:0 -525px}.n2-box-review-label{color:#7b8898;font-size:15px;line-height:22px;height:22px;overflow:hidden;display:none}[data-stars="0"] .n2-box-review-label[data-star="0"],[data-stars="1"] .n2-box-review-label[data-star="1"],[data-stars="2"] .n2-box-review-label[data-star="2"],[data-stars="3"] .n2-box-review-label[data-star="3"],[data-stars="4"] .n2-box-review-label[data-star="4"],[data-stars="5"] .n2-box-review-label[data-star="5"]{display:block}.n2-box-review-stars-container{width:170px;height:34px;margin:0 auto}.n2-box-review-star{cursor:pointer;transition:transform .4s;vertical-align:top;float:left;width:34px;height:34px;background-image:url(../images/stars-small.png)}[data-stars="1"] .n2-box-review-star[data-star="1"],[data-stars="2"] .n2-box-review-star[data-star="1"],[data-stars="2"] .n2-box-review-star[data-star="2"],[data-stars="3"] .n2-box-review-star[data-star="1"],[data-stars="3"] .n2-box-review-star[data-star="2"],[data-stars="3"] .n2-box-review-star[data-star="3"],[data-stars="4"] .n2-box-review-star[data-star="1"],[data-stars="4"] .n2-box-review-star[data-star="2"],[data-stars="4"] .n2-box-review-star[data-star="3"],[data-stars="4"] .n2-box-review-star[data-star="4"],[data-stars="5"] .n2-box-review-star[data-star="1"],[data-stars="5"] .n2-box-review-star[data-star="2"],[data-stars="5"] .n2-box-review-star[data-star="3"],[data-stars="5"] .n2-box-review-star[data-star="4"],[data-stars="5"] .n2-box-review-star[data-star="5"]{background-position:0 -34px;transform:scale(1.3)}.n2-modal-review-star-5{width:560px;height:241px;background:url(../images/star-5.png)}.n2-modal-review-details{font-size:14px;line-height:28px;color:#7b8898;text-align:center}.nextend-tab-tabbed{width:100%;overflow:hidden}.nextend-tab-tabbed .nextend-tab-tabbed-panes{-webkit-transition:all 400ms ease-in-out;-moz-transition:all 400ms ease-in-out;-ms-transition:all 400ms ease-in-out;-o-transition:all 400ms ease-in-out;transition:all 400ms ease-in-out}.nextend-tab-tabbed .nextend-tab-tabbed-pane{float:left}.xdsoft_datetimepicker{background:#fff;border-radius:5px;border:2px solid #a1aeb5;color:#333;padding:2px 8px 8px 0;position:absolute;z-index:9999;-moz-box-sizing:border-box;box-sizing:border-box;display:none}.xdsoft_datetimepicker iframe{position:absolute;left:0;top:0;width:75px;height:210px;background:0 0;border:none}.xdsoft_datetimepicker button{border:none!important}.xdsoft_noselect{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.xdsoft_noselect::selection{background:0 0}.xdsoft_noselect::-moz-selection{background:0 0}.xdsoft_datetimepicker.xdsoft_inline{display:inline-block;position:static}.xdsoft_datetimepicker *{-moz-box-sizing:border-box;box-sizing:border-box;padding:0;margin:0}.xdsoft_datetimepicker .xdsoft_datepicker,.xdsoft_datetimepicker .xdsoft_timepicker{display:none}.xdsoft_datetimepicker .xdsoft_datepicker.active,.xdsoft_datetimepicker .xdsoft_timepicker.active{display:block}.xdsoft_datetimepicker .xdsoft_datepicker{width:224px;float:left;margin-left:8px}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{width:256px}.xdsoft_datetimepicker .xdsoft_timepicker{width:58px;float:left;text-align:center;margin-left:8px;margin-top:0}.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{margin-top:8px;margin-bottom:3px}.xdsoft_datetimepicker .xdsoft_mounthpicker{position:relative;text-align:center}.xdsoft_datetimepicker .xdsoft_label i,.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC)}.xdsoft_datetimepicker .xdsoft_label i{opacity:.5;background-position:-92px -19px;display:inline-block;width:9px;height:20px;vertical-align:middle}.xdsoft_datetimepicker .xdsoft_prev{float:left;background-position:-20px 0}.xdsoft_datetimepicker .xdsoft_today_button{float:left;background-position:-70px 0;margin-left:5px}.xdsoft_datetimepicker .xdsoft_next{float:right;background-position:0 0}.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-color:transparent;background-repeat:no-repeat;border:0 none currentColor;cursor:pointer;display:block;height:30px;opacity:.5;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";outline:medium none currentColor;overflow:hidden;padding:0;position:relative;text-indent:100%;white-space:nowrap;width:20px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{float:none;height:15px;width:30px;display:block;margin-left:14px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next{background-position:-40px -15px;margin-top:7px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{background-position:-40px 0;margin-bottom:7px;margin-top:0}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{height:151px;overflow:hidden;border-bottom:1px solid #ddd}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div{background:#f9fafb;border-top:1px solid #dee1e5;color:#7b8898;font-size:12px;text-align:center;border-collapse:collapse;cursor:pointer;border-bottom-width:0;height:25px;line-height:25px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:first-child{border-top-width:0}.xdsoft_datetimepicker .xdsoft_next:hover,.xdsoft_datetimepicker .xdsoft_prev:hover,.xdsoft_datetimepicker .xdsoft_today_button:hover{opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}.xdsoft_datetimepicker .xdsoft_label{display:inline;position:relative;z-index:9999;margin:0;padding:5px 3px;font-size:14px;line-height:20px;background-color:#fff;float:left;width:182px;text-align:center;cursor:pointer;color:#6b7989}.xdsoft_datetimepicker .xdsoft_label:hover i{opacity:1}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select{border:2px solid #a1aeb5;border-radius:3px;position:absolute;right:0;top:30px;z-index:101;display:none;background:#fff;max-height:160px;overflow-y:hidden}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_monthselect{right:-7px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_yearselect{right:2px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#fff;background:#51b82d}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option{padding:2px 13px 2px 5px;text-decoration:none!important}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#0c92df;color:#fff}.xdsoft_datetimepicker .xdsoft_month{width:100px;text-align:right}.xdsoft_datetimepicker .xdsoft_calendar{clear:both}.xdsoft_datetimepicker .xdsoft_year{width:48px;margin-left:5px}.xdsoft_datetimepicker .xdsoft_calendar table{border-collapse:collapse;width:100%}.xdsoft_datetimepicker .xdsoft_calendar td>div{padding-right:5px}.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{width:14.2857142%;background:#f9fafb;border:1px solid #dee1e5;color:#7b8898;font-size:12px;text-align:right;vertical-align:middle;padding:0;border-collapse:collapse;cursor:pointer;height:25px}.xdsoft_datetimepicker .xdsoft_calendar th{background:#f2f5fa;text-align:center;color:#999;cursor:default;font-weight:400}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{width:12.5%}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{color:#0c92df}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#0c92df;color:#fff}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,.xdsoft_datetimepicker .xdsoft_time_box>div>div.xdsoft_disabled{opacity:.5;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"}.xdsoft_datetimepicker .xdsoft_calendar td:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#fff!important;background:#51b82d!important}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_disabled:hover{color:inherit!important;background:inherit!important}.xdsoft_datetimepicker .xdsoft_copyright{color:#ccc!important;font-size:10px;clear:both;float:none;margin-left:8px}.xdsoft_datetimepicker .xdsoft_copyright a{color:#eee!important}.xdsoft_datetimepicker .xdsoft_copyright a:hover{color:#aaa!important}.xdsoft_time_box{position:relative;border:1px solid #ccc}.xdsoft_scrollbar>.xdsoft_scroller{background:#ccc!important;height:20px;border-radius:3px}.xdsoft_scrollbar{position:absolute;width:7px;right:2px;top:0;bottom:0;cursor:pointer}.xdsoft_scroller_box{position:relative}
2
  /*!
3
  * jQuery UI Resizable 1.10.2
4
  * http://jqueryui.com
nextend/media/dist/nextend-backend.min.js CHANGED
@@ -1,6 +1,6 @@
1
  function n2Context(){this.window=["main"],this.mouseDownArea=!1,this.timeout=null,this.isPreventDblClick=!1,this.dblClickTimeout=null}"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return 10>t?"0"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var n,i,o,s,r,a=gap,l=e[t];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(t)),"function"==typeof rep&&(l=rep.call(e,t,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,r=[],"[object Array]"===Object.prototype.toString.apply(l)){for(s=l.length,n=0;s>n;n+=1)r[n]=str(n,l)||"null";return o=0===r.length?"[]":gap?"[\n"+gap+r.join(",\n"+gap)+"\n"+a+"]":"["+r.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(s=rep.length,n=0;s>n;n+=1)"string"==typeof rep[n]&&(i=rep[n],o=str(i,l),o&&r.push(quote(i)+(gap?": ":":")+o));else for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(o=str(i,l),o&&r.push(quote(i)+(gap?": ":":")+o));return o=0===r.length?"{}":gap?"{\n"+gap+r.join(",\n"+gap)+"\n"+a+"}":"{"+r.join(",")+"}",gap=a,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(t){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,n){var i;if(gap="",indent="","number"==typeof n)for(i=0;n>i;i+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var n,i,o=t[e];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(i=walk(o,n),void 0!==i?o[n]=i:delete o[n]);return reviver.call(t,e,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),n2.extend(window.nextend,{fontManager:null,styleManager:null,notificationCenter:null,animationManager:null,browse:null,askToSave:!0,cancel:function(t){return nextend.askToSave=!1,window.location.href=t,!1}}),n2Context.prototype.addWindow=function(t){this.window.push(t)},n2Context.prototype.removeWindow=function(){this.window.pop()},n2Context.prototype.getCurrentWindow=function(){return this.window[this.window.length-1]},n2Context.prototype.setMouseDownArea=function(t,e){this.mouseDownArea=t,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(n2.proxy(function(){this.timeout=null,this.mouseDownArea=!1},this),50)},n2Context.prototype.preventDblClick=function(){this.isPreventDblClick=!0,this.dblClickTimeout&&clearTimeout(this.dblClickTimeout),this.dblClickTimeout=setTimeout(n2.proxy(function(){this.dblClickTimeout=null,this.isPreventDblClick=!1},this),200)},window.nextend.context=new n2Context,window.n2_=function(t){return"undefined"!=typeof nextend.localization[t]?nextend.localization[t]:t},window.n2_printf=function(t){var e=arguments,n=1;return t.replace(/%s/g,function(){return e[n++]})},window.nextendtime=n2.now(),window.nextend.roundTo=5,window.nextend.roundHelper=function(t){return window.nextend.roundTo<=1?t:Math.round(t/window.nextend.roundTo)*window.nextend.roundTo},function(t){function e(){s={left:"right",right:"left"}}function n(){s={left:"left",right:"right"}}function i(e,n){var i=0;return i=n==s.right?t(window).width()-(e.offset().left+e.outerWidth()):e.offset().left,0>i?0:i}var o=[],s={left:"left",right:"right"};t("html").on("changedir",function(i,r){for(var a=0;a<o.length;a++)o[a][0].css(s[o[a][2]],"auto");"rtl"===r?e():n(),t(document).trigger("scroll")});var r=0;nextend.ready(function(){var e=t("#wpadminbar, .navbar-fixed-top").height();e&&(r+=e),t(document).trigger("scroll")}),t(document).on("scroll",function(){for(var e=t(document).scrollTop()+r,n=0;n<o.length;n++)o[n][1]>e?o[n][0].removeClass("n2-static"):(o[n][0].addClass("n2-static"),o[n][0].css(s[o[n][2]],o[n][3]))}),t(window).on("resize",function(){for(var e=0;e<o.length;e++)o[e][1]=o[e][0].parent().offset().top,o[e][3]=i(o[e][0].parent(),o[e][2]);t(document).trigger("scroll")}),t.fn.staticonscroll=function(e){this.each(function(){var n=t(this);o.push([n,n.parent().offset().top,e,i(n.parent(),e)])}),t(document).trigger("scroll")}}(n2),function(t){var e={query:{}},n=null;e.addAjaxLoader=function(){n=t('<div class="n2-loader-overlay"><div class="n2-loader"></div></div>').appendTo("body")},e.addAjaxArray=function(t){for(var n in t)e.query[n]=t[n]},e.makeAjaxQuery=function(t,n){n&&(t.mode="ajax",t.nextendajax="1");for(var i in e.query)t[i]=e.query[i];return N2QueryString.stringify(t)},e.makeAjaxUrl=function(t,n){var i=t.split("?");i.length<2&&(i[1]="");var o=N2QueryString.parse(i[1]);if("undefined"!=typeof n)for(var s in n)o[s]=n[s];return i[0]+"?"+e.makeAjaxQuery(o,!0)},e.makeFallbackUrl=function(t,n){var i=t.split("?");i.length<2&&(i[1]="");var o=N2QueryString.parse(i[1]);if("undefined"!=typeof n)for(var s in n)o[s]=n[s];return i[0]+"?"+e.makeAjaxQuery(o,!1)},e.ajax=function(n){return e.startLoading(),t.ajax(n).always(function(t,n){e.stopLoading();try{if("success"!=n?t=JSON.parse(t.responseText):"string"==typeof t&&(t=JSON.parse(t)),"undefined"!=typeof t.redirect)return e.startLoading(),void(window.location.href=t.redirect);e.notification(t)}catch(i){var o=/<body[^>]*>((.|[\n\r])*)<\/body>/im,s=o.exec(t.responseText);s.length?NextendModalSafeHTML(t.status,s[1]):console.error(t.responseText,t)}})},e.notification=function(t){if("undefined"!=typeof t.notification&&t.notification)for(var e in t.notification)for(var n=0;n<t.notification[e].length;n++)nextend.notificationCenter[e](t.notification[e][n][0],t.notification[e][n][1])},e.getJSON=function(n){return e.startLoading(),t.getJSON(n).always(function(){e.stopLoading()})},e.startLoading=function(){n.addClass("n2-active")},e.stopLoading=function(){n.removeClass("n2-active")},window.NextendAjaxHelper=e,nextend.ready(function(){e.addAjaxLoader()})}(n2),function(t,e){function n(e,n,i,o){this.$node=e.data("pane",this),this.headings=n,this.contents=i,this.tabNames=[],this.headings.each(t.proxy(function(e,n){this.tabNames.push(t(n).data("tab"))},this)),this.identifier=o,this._active=n.index(n.filter(".n2-active"));for(var s=0;s<n.length;s++)n.eq(s).on("click",t.proxy(this.switchToPane,this,s));if(o){var r=t.jStorage.get(this.identifier+"-pane",-1);if(-1!=r)return void this.switchToPane(r)}this.hideAndShow()}function i(e,n,i){this.headings=e,this.contents=n,this.identifier=i;for(var o=0;o<e.length;o++)e.eq(o).on("click",t.proxy(this.scrollToPane,this,o))}n.prototype.switchToPane=function(t,e){e&&e.preventDefault(),this.headings.eq(this._active).removeClass("n2-active"),this.headings.eq(t).addClass("n2-active"),this._active=t,this.hideAndShow(),this.store(this._active),this.$node.triggerHandler("changetab")},n.prototype.hideAndShow=function(){t(this.contents[this._active]).css("display","block").trigger("activate");for(var e=0;e<this.contents.length;e++)e!=this._active&&t(this.contents[e]).css("display","none")},n.prototype.store=function(e){this.identifier&&t.jStorage.set(this.identifier+"-pane",e)},n.prototype.showTabs=function(e){for(var n=!1,i=0;i<this.tabNames.length;i++)"-1"!=t.inArray(this.tabNames[i],e)?(this.headings.eq(i).css("display",""),t(this.contents[i]).css("display",""),i==this._active?n=i:n===!1&&(n=i)):(this.headings.eq(i).css("display","none"),t(this.contents[i]).css("display","none"));this.switchToPane(n)},e.NextendHeadingPane=n,i.prototype.scrollToPane=function(e,n){n&&n.preventDefault(),t("html, body").animate({scrollTop:this.contents[e].offset().top-t(".n2-main-top-bar").height()-t("#wpadminbar, .navbar-fixed-top").height()-10},1e3)},e.NextendHeadingScrollToPane=i}(n2,window),function(t,e){var n=[],i=t(document),o=!1;e.NextendEsc={_listen:function(){o||(i.on("keydown.n2-esc",function(i){if(27==i.keyCode||8==i.keyCode)if(t(i.target).is("input, textarea"))27==i.keyCode&&(i.preventDefault(),t(i.target).blur());else{i.preventDefault();var o=n[n.length-1]();o&&e.NextendEsc.pop()}}),o=!0)},_stopListen:function(){i.off("keydown.n2-esc"),o=!1},add:function(t){n.push(t),e.NextendEsc._listen()},pop:function(){n.pop(),0===n.length&&e.NextendEsc._stopListen()}}}(n2,window),function(t,e){t.fn.n2opener=function(){return this.each(function(){var e=t(this).on("click",function(t){e.toggleClass("n2-active")});e.siblings("span").on("click",function(t){e.toggleClass("n2-active")}),e.parent().on("mouseleave",function(){e.removeClass("n2-active")}),e.find(".n2-button-menu").on("click",function(t){t.stopPropagation(),e.removeClass("n2-active")})})}}(n2,window),"undefined"!=typeof jQuery&&jQuery(document).on("wp-collapse-menu",function(){n2(window).trigger("resize")}),nextend.deepDiff=function(){return{map:function(t,e){if(this.isValue(t))return"undefined"!=typeof t&&t!=e?t:void 0;for(var n in e)this.isFunction(e[n])||(t[n]=this.map(t[n],e[n]),(void 0===t[n]||n2.isPlainObject(t[n])&&n2.isEmptyObject(t[n])||this.isArray(t[n])&&0==t[n].length)&&delete t[n]);return t},isFunction:function(t){return"[object Function]"==={}.toString.apply(t)},isArray:function(t){return"[object Array]"==={}.toString.apply(t)},isObject:function(t){return"[object Object]"==={}.toString.apply(t)},isValue:function(t){return!this.isObject(t)&&!this.isArray(t)}}}(),function(t,e){function n(){this.$element=t('<div class="n2 n2-tooltip n2-radius-m"></div>'),this.timeout=null,this.$tipFor=null,t(window).ready(t.proxy(this.ready,this))}function i(){this.isVisible=!1,this.$body=t("body"),this.$element=t('<div class="n2 n2-tooltip n2-radius-m"></div>').appendTo(this.$body)}n.prototype.ready=function(){this.$element.appendTo("body"),this.add(t("body"))},n.prototype.add=function(e){e.find("[data-n2tip]").off(".n2hastip").on({"mouseenter.n2hastip":t.proxy(this.onEnter,this)})},n.prototype.addElement=function(e,n,i,o){e.data({n2tip:n,n2tipv:o,n2tiph:i}).off(".n2hastip").on({"mouseenter.n2hastip":t.proxy(this.onEnter,this)})},n.prototype.onEnter=function(e){this.timeout&&clearTimeout(this.timeout),this.$tipFor=t(e.currentTarget).on({"mousemove.n2tip":t.proxy(this.onMove,this),"mouseleave.n2tip":t.proxy(this.onLeave,this)}),this.onMove(e),this.timeout=setTimeout(t.proxy(function(){var t=this.$tipFor.data("n2tipv"),e=this.$tipFor.data("n2tiph");"undefined"==typeof t&&(t=10),"undefined"==typeof e&&(e=10),this.$element.css({margin:t+"px "+e+"px"}).html(this.$tipFor.data("n2tip")).addClass("n2-active")},this),500)},n.prototype.onMove=function(t){this.$element.css({left:t.pageX,top:t.pageY})},n.prototype.onLeave=function(t){this.timeout&&clearTimeout(this.timeout),this.$tipFor&&(this.$tipFor.off(".n2tip"),this.$tipFor=null,this.$element.removeClass("n2-active").css("margin",""))},i.prototype.show=function(e,n){this.isVisible?this.$element.html(e):(this.isVisible=!0,this.$body.on("mousemove.tooltipMouse",t.proxy(this.mouseMove,this)),this.mouseMove(n),this.$element.html(e).addClass("n2-active"))},i.prototype.mouseMove=function(t){this.$element.css({left:t.pageX+10,top:t.pageY+10})},i.prototype.hide=function(){this.$body.off("mousemove.tooltipMouse"),this.$element.removeClass("n2-active").html(""),this.isVisible=!1},nextend.tooltip=new n,t(window).ready(function(){nextend.tooltipMouse=new i})}(n2,window),nextend.UnicodeToHTMLEntity=function(t){function e(t,e){return((1023&t)<<10)+(1023&e)+65536}function n(t){for(var n,i=[],o=0;o<t.length;)n=t.charCodeAt(o),55296==(63488&n)?i.push(e(n,t.charCodeAt(++o))):i.push(n),++o;return"&#"+i+";"}try{for(var i,o=/(?:[\uD800-\uDBFF][\uDC00-\uDFFF])/g;i=o.exec(t);)t=t.substr(0,i.index)+n(t.substr(i.index,o.lastIndex-i.index))+t.substr(o.lastIndex)}catch(s){return console.error(s),t}return t},window.N2Color={hex2rgba:function(t){var e=parseInt(t,16);return[e>>24&255,e>>16&255,e>>8&255,(255&e)/255]},hex2rgbaCSS:function(t){return"RGBA("+N2Color.hex2rgba(t).join(",")+")"},hexdec:function(t){return t=(t+"").replace(/[^a-f0-9]/gi,""),parseInt(t,16)},hex2alpha:function(t){var e=parseInt(t,16);return((255&e)/255).toFixed(3)},colorizeSVG:function(t,e){var n=t.split("base64,");return 1==n.length?t:(n[1]=Base64.encode(Base64.decode(n[1]).replace('fill="#FFF"','fill="#'+e.substr(0,6)+'"').replace('opacity="1"','opacity="'+N2Color.hex2alpha(e)+'"')),n.join("base64,"))},colorToSVG:function(t){var e=parseInt(t,16);return[t.substr(0,6),(255&e)/255]}},function(){"use strict";var t={};t.parse=function(t){return"string"!=typeof t?{}:(t=t.trim().replace(/^(\?|#)/,""),t?t.trim().split("&").reduce(function(t,e){var n=e.replace(/\+/g," ").split("="),i=n[0],o=n[1];return i=decodeURIComponent(i),o=void 0===o?null:decodeURIComponent(o),t.hasOwnProperty(i)?Array.isArray(t[i])?t[i].push(o):t[i]=[t[i],o]:t[i]=o,t},{}):{})},t.stringify=function(t){return t?Object.keys(t).map(function(e){var n=t[e];return Array.isArray(n)?n.map(function(t){return encodeURIComponent(e)+"="+encodeURIComponent(t)}).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(n)}).join("&"):""},window.N2QueryString=t}(),!function(t){function e(t){for(var e=enc="",n=end=0,i=0,o=t.length;o>i;i++){var s=t.charCodeAt(i);128>s?end++:(s>127&&2048>s?enc=String.fromCharCode(s>>6|192,63&s|128):enc=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),end>n&&(e+=t.slice(n,end)),e+=enc,n=end=i+1)}return end>n&&(e+=t.slice(n,o)),e}function n(t){var e,n;if(t+="",g=!1,v=y=t.length,y>63){for(i(t.substring(0,64)),r(u),g=!0,e=128;y>=e;e+=64)i(t.substring(e-64,e)),a(u);t=t.substring(e-64),y=t.length}for(h[0]=0,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=0,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=0,e=0;y>e;e++)n=e%4,0===n?h[e>>2]=t.charCodeAt(e):h[e>>2]|=t.charCodeAt(e)<<f[n];return h[e>>2]|=d[e%4],e>55?(g?a(h):(r(h),g=!0),a([0,0,0,0,0,0,0,0,0,0,0,0,0,0,v<<3,0])):(h[14]=v<<3,void(g?a(h):r(h)))}function i(t){for(var e=16;e--;){var n=e<<2;u[e]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24)}}function o(t,i,o){n(i?t:e(t));var s=m[0];return c[1]=p[15&s],c[0]=p[15&(s>>=4)],c[3]=p[15&(s>>=4)],c[2]=p[15&(s>>=4)],c[5]=p[15&(s>>=4)],c[4]=p[15&(s>>=4)],c[7]=p[15&(s>>=4)],c[6]=p[15&(s>>=4)],s=m[1],c[9]=p[15&s],c[8]=p[15&(s>>=4)],c[11]=p[15&(s>>=4)],c[10]=p[15&(s>>=4)],c[13]=p[15&(s>>=4)],c[12]=p[15&(s>>=4)],c[15]=p[15&(s>>=4)],c[14]=p[15&(s>>=4)],s=m[2],c[17]=p[15&s],c[16]=p[15&(s>>=4)],c[19]=p[15&(s>>=4)],c[18]=p[15&(s>>=4)],c[21]=p[15&(s>>=4)],c[20]=p[15&(s>>=4)],c[23]=p[15&(s>>=4)],c[22]=p[15&(s>>=4)],s=m[3],c[25]=p[15&s],c[24]=p[15&(s>>=4)],c[27]=p[15&(s>>=4)],c[26]=p[15&(s>>=4)],c[29]=p[15&(s>>=4)],c[28]=p[15&(s>>=4)],c[31]=p[15&(s>>=4)],c[30]=p[15&(s>>=4)],o?c:c.join("")}function s(t,e,n,i,o,s,r){return e+=t+i+r,(e<<o|e>>>s)+n<<0}function r(t){l(0,0,0,0,t),m[0]=b[0]+1732584193<<0,m[1]=b[1]-271733879<<0,m[2]=b[2]-1732584194<<0,m[3]=b[3]+271733878<<0}function a(t){l(m[0],m[1],m[2],m[3],t),m[0]=b[0]+m[0]<<0,m[1]=b[1]+m[1]<<0,m[2]=b[2]+m[2]<<0,m[3]=b[3]+m[3]<<0}function l(t,e,n,i,o){var r,a;g?(t=s((n^i)&e^i,t,e,o[0],7,25,-680876936),i=s((e^n)&t^n,i,t,o[1],12,20,-389564586),n=s((t^e)&i^e,n,i,o[2],17,15,606105819),e=s((i^t)&n^t,e,n,o[3],22,10,-1044525330)):(t=o[0]-680876937,t=(t<<7|t>>>25)-271733879<<0,i=o[1]-117830708+(2004318071&t^-1732584194),i=(i<<12|i>>>20)+t<<0,n=o[2]-1126478375+((-271733879^t)&i^-271733879),n=(n<<17|n>>>15)+i<<0,e=o[3]-1316259209+((i^t)&n^t),e=(e<<22|e>>>10)+n<<0),t=s((n^i)&e^i,t,e,o[4],7,25,-176418897),i=s((e^n)&t^n,i,t,o[5],12,20,1200080426),n=s((t^e)&i^e,n,i,o[6],17,15,-1473231341),e=s((i^t)&n^t,e,n,o[7],22,10,-45705983),t=s((n^i)&e^i,t,e,o[8],7,25,1770035416),i=s((e^n)&t^n,i,t,o[9],12,20,-1958414417),n=s((t^e)&i^e,n,i,o[10],17,15,-42063),e=s((i^t)&n^t,e,n,o[11],22,10,-1990404162),t=s((n^i)&e^i,t,e,o[12],7,25,1804603682),i=s((e^n)&t^n,i,t,o[13],12,20,-40341101),n=s((t^e)&i^e,n,i,o[14],17,15,-1502002290),e=s((i^t)&n^t,e,n,o[15],22,10,1236535329),t=s((e^n)&i^n,t,e,o[1],5,27,-165796510),i=s((t^e)&n^e,i,t,o[6],9,23,-1069501632),n=s((i^t)&e^t,n,i,o[11],14,18,643717713),e=s((n^i)&t^i,e,n,o[0],20,12,-373897302),t=s((e^n)&i^n,t,e,o[5],5,27,-701558691),i=s((t^e)&n^e,i,t,o[10],9,23,38016083),n=s((i^t)&e^t,n,i,o[15],14,18,-660478335),e=s((n^i)&t^i,e,n,o[4],20,12,-405537848),t=s((e^n)&i^n,t,e,o[9],5,27,568446438),i=s((t^e)&n^e,i,t,o[14],9,23,-1019803690),n=s((i^t)&e^t,n,i,o[3],14,18,-187363961),e=s((n^i)&t^i,e,n,o[8],20,12,1163531501),t=s((e^n)&i^n,t,e,o[13],5,27,-1444681467),i=s((t^e)&n^e,i,t,o[2],9,23,-51403784),n=s((i^t)&e^t,n,i,o[7],14,18,1735328473),e=s((n^i)&t^i,e,n,o[12],20,12,-1926607734),r=e^n,t=s(r^i,t,e,o[5],4,28,-378558),i=s(r^t,i,t,o[8],11,21,-2022574463),a=i^t,n=s(a^e,n,i,o[11],16,16,1839030562),e=s(a^n,e,n,o[14],23,9,-35309556),r=e^n,t=s(r^i,t,e,o[1],4,28,-1530992060),i=s(r^t,i,t,o[4],11,21,1272893353),a=i^t,n=s(a^e,n,i,o[7],16,16,-155497632),e=s(a^n,e,n,o[10],23,9,-1094730640),r=e^n,t=s(r^i,t,e,o[13],4,28,681279174),i=s(r^t,i,t,o[0],11,21,-358537222),a=i^t,n=s(a^e,n,i,o[3],16,16,-722521979),e=s(a^n,e,n,o[6],23,9,76029189),r=e^n,t=s(r^i,t,e,o[9],4,28,-640364487),i=s(r^t,i,t,o[12],11,21,-421815835),a=i^t,n=s(a^e,n,i,o[15],16,16,530742520),e=s(a^n,e,n,o[2],23,9,-995338651),t=s(n^(e|~i),t,e,o[0],6,26,-198630844),i=s(e^(t|~n),i,t,o[7],10,22,1126891415),n=s(t^(i|~e),n,i,o[14],15,17,-1416354905),e=s(i^(n|~t),e,n,o[5],21,11,-57434055),t=s(n^(e|~i),t,e,o[12],6,26,1700485571),i=s(e^(t|~n),i,t,o[3],10,22,-1894986606),n=s(t^(i|~e),n,i,o[10],15,17,-1051523),e=s(i^(n|~t),e,n,o[1],21,11,-2054922799),t=s(n^(e|~i),t,e,o[8],6,26,1873313359),i=s(e^(t|~n),i,t,o[15],10,22,-30611744),n=s(t^(i|~e),n,i,o[6],15,17,-1560198380),e=s(i^(n|~t),e,n,o[13],21,11,1309151649),t=s(n^(e|~i),t,e,o[4],6,26,-145523070),i=s(e^(t|~n),i,t,o[11],10,22,-1120210379),n=s(t^(i|~e),n,i,o[2],15,17,718787259),e=s(i^(n|~t),e,n,o[9],21,11,-343485551),b[0]=t,b[1]=e,b[2]=n,b[3]=i}var c=[],h=[],u=[],d=[],p="0123456789abcdef".split(""),f=[],m=[],g=!1,v=0,y=0,b=[];if(t.Int32Array)h=new Int32Array(16),u=new Int32Array(16),d=new Int32Array(4),f=new Int32Array(4),m=new Int32Array(4),b=new Int32Array(4);else{var x;for(x=0;16>x;x++)h[x]=u[x]=0;for(x=0;4>x;x++)d[x]=f[x]=m[x]=b[x]=0}d[0]=128,d[1]=32768,d[2]=8388608,d[3]=-2147483648,f[0]=0,f[1]=8,f[2]=16,f[3]=24,t.md5=t.md5||o}(window),function(t,e){function n(){this.style=""}n.prototype.add=function(t){var e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");e.appendChild(n),n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))},n.prototype.deleteRule=function(t){for(var e=t.toLowerCase(),n=e.replace(".","\\."),i=document.styleSheets.length-1;i>=0;i--)for(var o=this._getRulesArray(i),s=0;o&&s<o.length;s++)if(o[s].selectorText){var r=o[s].selectorText.toLowerCase();r!=e&&r!=n||(document.styleSheets[i].cssRules?document.styleSheets[i].deleteRule(s):document.styleSheets[i].removeRule(s))}return null},n.prototype._getRulesArray=function(t){var e=null;try{document.styleSheets[t].cssRules?e=document.styleSheets[t].cssRules:document.styleSheets[t].rules&&(e=document.styleSheets[t].rules)}catch(n){}return e},window.nextend.css=new n}(n2,window),function(t,e,n){function i(e,n,o,s){i.prototype.openLightbox=n,i.prototype.openMultipleLightbox=o,i.prototype.openFoldersLightbox=s,nextend.imageHelper=this,this.parameters=t.extend({siteKeywords:[],imageUrls:[],wordpressUrl:"",placeholderImage:"",placeholderRepeatedImage:"",protocolRelative:1},e)}i.prototype.protocolRelative=function(t){return this.parameters.protocolRelative?t.replace(/^http(s)?:\/\//,"//"):t},i.prototype.make=function(t){return this.dynamic(t)},i.prototype.dynamic=function(t){for(var e=this.parameters.imageUrls,n=this.parameters.siteKeywords,i=this.protocolRelative(t),o=0;o<n.length;o++)if(0===i.indexOf(e[o])){t=n[o]+i.slice(e[o].length);break}return t},i.prototype.fixed=function(t){for(var e=this.parameters.imageUrls,n=this.parameters.siteKeywords,i=0;i<n.length;i++)if(0===t.indexOf(n[i])){t=e[i]+t.slice(n[i].length);break}return t},i.prototype.openLightbox=function(t){},i.prototype.openMultipleLightbox=function(t){},i.prototype.openFoldersLightbox=function(t){},i.prototype.getPlaceholder=function(){return this.fixed(this.parameters.placeholderImage)},i.prototype.getRepeatedPlaceholder=function(){return this.fixed(this.parameters.placeholderRepeatedImage)},e.NextendImageHelper=i}(n2,window),function(t,e){function n(e,n,i){this.inited=!1,this.currentPane=null,this.customClass="",this.$=t(this),this.counter=r++,this.panes=e,n&&this.show(null,i)}function i(e,n){this.$=t(this),this.options=t.extend({"class":""},n),this.modal=t('<div class="n2-modal n2-modal-simple"/>').addClass(this.options["class"]).css({display:"none"}).appendTo("#n2-admin"),t('<i class="n2-i n2-i-a-deletes"/>').on("click",t.proxy(this.hide,this)).appendTo(this.modal),this.window=t('<div class="n2-modal-window"/>').on("click",function(t){t.stopPropagation()}).appendTo(this.modal),this.notificationStack=new NextendNotificationCenterStackModal(this.modal),this.content=t(e).appendTo(this.window)}function o(e,i,o){return t.jStorage.get("n2-delete-"+e,!1)?(o(),!0):(new n({zero:{size:[500,190],title:n2_("Delete"),back:!1,close:!0,content:"",controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-uc n2-h4">'+n2_("Cancel")+"</a>",'<div class="n2-button n2-button-with-actions n2-button-l n2-radius-s n2-button-red"><a href="#" class="n2-button-inner n2-uc n2-h4">'+n2_("Delete")+'</a><div class="n2-button-menu-open"><i class="n2-i n2-i-buttonarrow"></i><div class="n2-button-menu"><div class="n2-button-menu-inner n2-border-radius"><a href="#" class="n2-h4">'+n2_("Delete and never ask for confirmation again")+"</a></div></div></div></div>"],fn:{show:function(){this.createCenteredSubHeading(n2_("Are you sure you want to delete?")).appendTo(this.content),this.controls.find(".n2-button-grey").on("click",t.proxy(function(t){t.preventDefault(),this.hide(t)},this)),this.controls.find(".n2-button-red a").on("click",t.proxy(function(t){t.preventDefault(),o(),this.hide(t)},this)),this.controls.find(".n2-button-red .n2-button-menu-inner a").on("click",t.proxy(function(n){n.preventDefault(),t.jStorage.set("n2-delete-"+e,!0)},this)),this.controls.find(".n2-button-menu-open").n2opener()},destroy:function(){this.destroy()}}}},!0),!1)}function s(e,n,i){return o(n,i,function(){window.location.href=t(e).attr("href")}),!1}var r=0;n.prototype.setCustomClass=function(t){this.customClass=t},n.prototype.lateInit=function(){if(!this.inited){for(var e in this.panes)this.panes[e]=t.extend({customClass:"",fit:!1,fitX:!0,overflow:"hidden",size:!1,back:!1,close:!0,controlsClass:"",controls:[],fn:{}},this.panes[e]);var n=!1;this.modal=t('<div class="n2-modal '+this.customClass+'"/>').css("opacity",0).on("click",t.proxy(function(e){0==n&&(this.close.hasClass("n2-hidden")||0!=t(e.target).closest(".n2-notification-center-modal").length||this.hide(e)),n=!1},this)),this.window=t('<div class="n2-modal-window n2-border-radius"/>').on("click",function(t){n=!0}).appendTo(this.modal),this.notificationStack=new NextendNotificationCenterStackModal(this.modal);var i=t('<div class="n2-modal-title n2-content-box-title-bg"/>').appendTo(this.window);this.title=t('<div class="n2-h2 n2-ucf"/>').appendTo(i),this.back=t('<i class="n2-i n2-i-a-back"/>').on("click",t.proxy(this.goBackButton,this)).appendTo(i),this.close=t('<i class="n2-i n2-i-a-deletes"/>').on("click",t.proxy(this.hide,this)).appendTo(i),this.content=t('<div class="n2-modal-content"/>').appendTo(this.window),this.controls=t('<div class="n2-table n2-table-fixed n2-table-auto"/>'),t('<div class="n2-modal-controls"/>').append(this.controls).appendTo(this.window),this.inited=!0}},n.prototype.show=function(e,n){this.lateInit(),this.notificationStack.enableStack(),"undefined"!=typeof e&&e||(e="zero"),nextend.context.addWindow("modal"),NextendEsc.add(t.proxy(function(){return this.close.hasClass("n2-hidden")?!1:(this.hide("esc"),!0)},this)),this.loadPane(e,!1,!0,n),NextendTween.fromTo(this.modal,.3,{opacity:0},{opacity:1,ease:"easeOutCubic"}).play()},n.prototype.hide=function(e){t(window).off(".n2-modal-"+this.counter),this.notificationStack.popStack(),nextend.context.removeWindow(),arguments.length>0&&"esc"!=e&&NextendEsc.pop(),this.apply("hide"),this.apply("destroy"),this.currentPane=null,this.modal.detach(),t(document).off("keyup.n2-esc-modal")},n.prototype.destroy=function(){this.modal.remove()},n.prototype.loadPane=function(e,n,i,o){var s=t.proxy(function(){var s=this.panes[e];this.currentPane=s,s.title!==!1&&this.title.html(s.title),s.back===!1?this.back.addClass("n2-hidden"):this.back.removeClass("n2-hidden"),s.close===!1?this.close.addClass("n2-hidden"):this.close.removeClass("n2-hidden"),this.content.find("> *").detach(),this.content.append(s.content);for(var r=!1,a=t('<div class="n2-tr" />'),l=0;l<s.controls.length;l++)t('<div class="n2-td"/>').addClass("n2-modal-controls-"+l).html(s.controls[l]).appendTo(a),r=!0;if(a.addClass("n2-modal-controls-"+l),this.controls.html(a),this.controls.attr("class","n2-table n2-table-fixed n2-table-auto "+s.controlsClass),"undefined"!=typeof i&&i||NextendTween.fromTo(this.window,.3,{x:n?-2e3:2e3},{x:0,ease:"easeOutCubic"}).play(),this.modal.appendTo("#n2-admin"),s.fit){var c=t(window),h=40,u=t.proxy(function(){var t=c.width()-2*h,e=c.height()-2*h;s.fitX||(t=s.size[0]),this.window.css({width:t,height:e,marginLeft:t/-2,marginTop:e/-2}),this.content.css({height:e-80-(r?this.controls.parent().outerHeight(!0):0),overflow:s.overflow})},this);u(),c.on("resize.n2-modal-"+this.counter,u)}else s.size!==!1&&(this.window.css({width:s.size[0],height:s.size[1],marginLeft:s.size[0]/-2,marginTop:s.size[1]/-2}),this.content.css({height:s.size[1]-80-(r?this.controls.parent().outerHeight(!0):0),overflow:s.overflow}));this.apply("show",o)},this);null!==this.currentPane?(this.apply("destroy"),NextendTween.to(this.window,.3,{x:n?2e3:-2e3,onComplete:s,ease:"easeOutCubic"}).play()):s()},n.prototype.trigger=function(t,e){this.$.trigger(t,e)},n.prototype.on=function(t,e){this.$.on(t,e)},n.prototype.one=function(t,e){this.$.one(t,e)},n.prototype.off=function(t,e){this.$.off(t,e)},n.prototype.goBackButton=function(){var t=null;null!==typeof this.goBackArgs&&(t=this.goBackArgs,this.goBackArgs=null),this.goBack(t)},n.prototype.goBack=function(t){this.apply("goBack",t)&&this.loadPane(this.currentPane.back,!0,!1,t)},n.prototype.apply=function(t,e){return"undefined"!=typeof this.currentPane.fn[t]?this.currentPane.fn[t].apply(this,e):!0},n.prototype.createInput=function(e,n){var i="";return 3==arguments.length&&(i=arguments[2]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+n+'" value="" class="n2-h5" autocomplete="off" style="'+i+'"></div></div></div></div>')},n.prototype.createInputUnit=function(e,n,i){var o="";return 4==arguments.length&&(o=arguments[3]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+n+'" value="" class="n2-h5" autocomplete="off" style="'+o+'"><div class="n2-text-unit n2-h5 n2-uc">'+i+"</div></div></div></div></div>")},n.prototype.createInputSub=function(e,n,i){var o="";return 4==arguments.length&&(o=arguments[3]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+i+'</div><input type="text" id="'+n+'" value="" class="n2-h5" autocomplete="off" style="'+o+'"></div></div></div></div>')},n.prototype.createTextarea=function(e,n){var i="";return 3==arguments.length&&(i=arguments[2]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+n+'" class="n2-h5" autocomplete="off" style="resize:none;'+i+'"></textarea></div></div></div></div>')},n.prototype.createSelect=function(e,n,i){var o="";4==arguments.length&&(o=arguments[3]),$group=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group "><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list" style=""><select id="'+n+'" autocomplete="off" style="'+o+'"></select></div></div></div></div>'),$select=$group.find("select");for(var s in i)$select.append('<option value="'+s+'">'+i[s]+"</option>");return $select.prop("selectedIndex",0),$group},n.prototype.createHeading=function(e){return t('<h3 class="n2-h3">'+e+"</h3>")},n.prototype.createSubHeading=function(e){return t('<h3 class="n2-h4">'+e+"</h3>")},n.prototype.createCenteredHeading=function(e){return t('<h3 class="n2-h3 n2-center">'+e+"</h3>")},n.prototype.createCenteredSubHeading=function(e){return t('<h3 class="n2-h4 n2-center">'+e+"</h3>")},n.prototype.createResult=function(){return t('<div class="n2-result"></div>')},n.prototype.createTable=function(e,n){for(var i=t('<table class="n2-table-fancy"/>'),o=0;o<e.length;o++)for(var s=t("<tr />").appendTo(i),r=0;r<e[o].length;r++)s.append(t('<td style="'+n[r]+'"/>').append(e[o][r]));return i},n.prototype.createTableWrap=function(){return t('<div class="n2-table-fancy-wrap" style="overflow:auto;height:196px;" />')},n.prototype.createImageRadio=function(e){for(var n=t('<div class="n2-modal-radio" />'),i=t('<input type="hidden" value="'+e[0].key+'"/>').appendTo(n),o=0;o<e.length;o++)n.append('<div class="n2-modal-radio-option" data-key="'+e[o].key+'" style="background-image: url(\''+nextend.imageHelper.fixed(e[o].image)+'\')"><div class="n2-h4">'+e[o].name+"</div></div>");var e=n.find(".n2-modal-radio-option");return e.eq(0).addClass("n2-active"),e.on("click",function(n){e.removeClass("n2-active");var o=t(n.currentTarget);o.addClass("n2-active"),i.val(o.data("key"))}),n},e.NextendModal=n,e.NextendModalSafeHTML=function(e,i){var o=new n({zero:{fit:!0,size:[1300,700],title:e,content:""}},!0);o.content.removeClass("n2-modal-content").css("padding","0 20px 20px");var s,r=t(i.replace(/document\.write/g,"n2Write"));window.n2Write=t.proxy(function(e){t("<span />").html(e).appendTo(o.content)},this),r.each(t.proxy(function(e,n){s=t(n),s.appendTo(o.content)},this)),delete window.n2Write},e.NextendModalSetting={show:function(t,e){new n({zero:{size:[1300,700],title:t,content:'<iframe src="'+e+'" width="1300" height="640" frameborder="0" style="margin:0 -20px -20px -20px;"></iframe>'}},!0)}},e.NextendModalDocumentation=function(t,e){
2
  new n({zero:{size:[760,700],title:t,content:'<iframe src="'+e+'" width="760" height="640" frameborder="0" style="margin:0 -20px -20px -20px;"></iframe>'}},!0)},e.NextendNewFullWindow=function(t,e){var n=["height="+screen.height,"width="+screen.width,"fullscreen=yes"].join(","),i=window.open(t,e,n);return i.moveTo(0,0),i},i.prototype.resize=function(){this.window.width(this.modal.width()),this.window.height(this.modal.height())},i.prototype.show=function(){t("body").addClass("n2-modal-active"),this.modal.css("display","block"),this.resize(),t(window).on("resize.n2-simple-modal",t.proxy(this.resize,this)),this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return this.hide("esc"),!0},this))},i.prototype.hide=function(e){this.notificationStack.popStack(),arguments.length>0&&"esc"!=e&&NextendEsc.pop(),this.modal.css("display","none"),t("body").removeClass("n2-modal-active"),t(document).off("keyup.n2-esc-modal"),t(window).off(".n2-simple-modal"),this.modal.trigger("ModalHide")},e.NextendSimpleModal=i,e.NextendDeleteModal=o,e.NextendDeleteModalLink=s}(n2,window),function(t,e){function n(){this.stack=[],this.tween=null,nextend.ready(t.proxy(function(){var e=t("#n2-admin").find(".n2-main-top-bar");if(e.length>0){var n=new i(t("#n2-admin").find(".n2-main-top-bar"));n.enableStack()}else{var n=new o(t("#n2-admin"));n.enableStack()}},this))}function i(e){this.messages=[],this.isShow=!1,this.importantOnly=0,this.importantOnlyNode=t('<div class="n2-notification-important n2-h5 '+(this.importantOnly?"n2-active":"")+'"><span>'+n2_("Show only errors")+'</span><div class="n2-checkbox n2-light"><i class="n2-i n2-i-tick"></i></div></div>').on("click",t.proxy(this.changeImportant,this)),t.jStorage.listenKeyChange("ss-important-only",t.proxy(this.importantOnlyChanged,this)),this.importantOnlyChanged(),this._init(e),this.emptyMessage=t('<div class="n2-notification-empty n2-h4">'+n2_("There are no messages to display.")+"</div>")}function o(){i.prototype.constructor.apply(this,arguments)}n.prototype.add=function(t){this.stack.push(t)},n.prototype.popStack=function(){this.stack.pop()},n.prototype.getCurrentStack=function(){return this.stack[this.stack.length-1]},n.prototype.success=function(t,e){this.getCurrentStack().success(t,e)},n.prototype.error=function(t,e){this.getCurrentStack().error(t,e)},n.prototype.notice=function(t,e){this.getCurrentStack().notice(t,e)},window.nextend.notificationCenter=new n,i.prototype._init=function(e){this.showButton=e.find(".n2-notification-button").on("click",t.proxy(this.hideOrShow,this));var n=t('<div class="n2-notification-settings"></div>').append(t('<div class="n2-button n2-button-normal n2-button-s n2-button-blue n2-radius-s n2-h5 n2-uc n2-notification-clear">'+n2_("Got it!")+"</div>").on("click",t.proxy(this.clear,this))).append(this.importantOnlyNode);this.container=this.messageContainer=t('<div class="n2-notification-center n2-border-radius-br n2-border-radius-bl"></div>').append(n).appendTo(e)},i.prototype.enableStack=function(){nextend.notificationCenter.add(this)},i.prototype.popStack=function(){nextend.notificationCenter.popStack()},i.prototype.hideOrShow=function(t){t.preventDefault(),this.isShow?this.hide():this.show()},i.prototype.show=function(){this.isShow||(this.isShow=!0,0==this.messages.length&&this.showEmptyMessage(),this.showButton&&this.showButton.addClass("n2-active"),this.container.addClass("n2-active"),this.container.css("display","block"),this._animateShow())},i.prototype.hide=function(){this.isShow&&(this.showButton&&this.showButton.removeClass("n2-active"),this.container.removeClass("n2-active"),this._animateHide(),this.container.css("display","none"),this.isShow=!1)},i.prototype._animateShow=function(){this.tween&&this.tween.pause(),this.tween=NextendTween.fromTo(this.container,.4,{opacity:0},{opacity:1}).play()},i.prototype._animateHide=function(){this.tween&&this.tween.pause()},i.prototype.success=function(t,e){this._message("success",n2_("success"),t,e)},i.prototype.error=function(t,e){this._message("error",n2_("error"),t,e)},i.prototype.notice=function(t,e){this._message("notice",n2_("notice"),t,e)},i.prototype._message=function(e,n,i,o){this.hideEmptyMessage(),o=t.extend({timeout:!1,remove:!1},o);var s=t("<div></div>");return o.timeout&&setTimeout(t.proxy(function(){this.hideMessage(s,o.remove)},this),1e3*o.timeout),s.addClass("n2-table n2-table-fixed n2-h3 n2-border-radius n2-notification-message n2-notification-message-"+e).append(t('<div class="n2-tr"></div>').append('<div class="n2-td n2-first"><i class="n2-i n2-i-n-'+e+'"/></div>').append('<div class="n2-td n2-message"><h4 class="n2-h4 n2-uc">'+n+'</h4><p class="n2-h4">'+i+"</p></div>")).prependTo(this.messageContainer),this.messages.push(s),this.messages.length>3&&this.messages.shift().remove(),this.importantOnly&&"error"!=e&&"notice"!=e||this.show(),s},i.prototype.hideMessage=function(t,e){e?this.deleteMessage(t):this.hide()},i.prototype.deleteMessage=function(e){var n=t.inArray(e,this.messages);n>-1&&(this.messages.splice(n,1),e.remove()),0==this.messages.length&&this.hide()},i.prototype.clear=function(){for(var t=this.messages.length-1;t>=0;t--)this.messages.pop().remove();this.showEmptyMessage(),this.hide()},i.prototype.changeImportant=function(){this.importantOnly?t.jStorage.set("ss-important-only",0):t.jStorage.set("ss-important-only",1)},i.prototype.importantOnlyChanged=function(){this.importantOnly=parseInt(t.jStorage.get("ss-important-only",0)),this.importantOnly?this.importantOnlyNode.addClass("n2-active"):this.importantOnlyNode.removeClass("n2-active")},i.prototype.showEmptyMessage=function(){this.emptyMessage.prependTo(this.container)},i.prototype.hideEmptyMessage=function(){this.emptyMessage.detach()},e.NextendNotificationCenterStack=i,o.prototype=Object.create(i.prototype),o.prototype.constructor=o,o.prototype._init=function(e){var n=t('<div class="n2-notification-settings"></div>').append(t('<div class="n2-button n2-button-normal n2-button-s n2-button-blue n2-radius-s n2-h5 n2-uc n2-notification-clear">Got it!</div>').on("click",t.proxy(this.clear,this))).append(this.importantOnlyNode);this.messageContainer=t('<div class="n2-notification-center n2-border-radius"></div>').append(n),this.container=t('<div class="n2-notification-center-modal"></div>').append(this.messageContainer).appendTo(e)},o.prototype.show=function(){document.activeElement&&document.activeElement.blur(),NextendEsc.add(t.proxy(function(){return this.clear(),!1},this)),i.prototype.show.apply(this,arguments)},o.prototype.hide=function(){NextendEsc.pop(),i.prototype.hide.apply(this,arguments)},o.prototype._animateShow=function(){},o.prototype._animateHide=function(){},e.NextendNotificationCenterStackModal=o}(n2,window),function(t,e,n){function i(t,e,n){for(var i=[],o=0;o<t.length;o++){var s=p(t[o]),r=s.toHsl().l<.5?"n2-sp-thumb-el n2-sp-thumb-dark":"n2-sp-thumb-el n2-sp-thumb-light";r+=p.equals(e,t[o])?" n2-sp-thumb-active":"";var a=v?"background-color:"+s.toRgbString():"filter:"+s.toFilter();i.push('<span title="'+s.toRgbString()+'" data-color="'+s.toRgbString()+'" class="'+r+'"><span class="n2-sp-thumb-inner" style="'+a+';" /></span>')}return"<div class='n2-sp-cf "+n+"'>"+i.join("")+"</div>"}function o(){for(var t=0;t<m.length;t++)m[t]&&m[t].hide()}function s(t,n){var i=e.extend({},f,t);return i.callbacks={move:h(i.move,n),change:h(i.change,n),show:h(i.show,n),hide:h(i.hide,n),beforeShow:h(i.beforeShow,n)},i}function r(r,l){function h(t){vt.toggleClass("n2-sp-flat",W),vt.toggleClass("n2-sp-input-disabled",!B.showInput),vt.toggleClass("n2-sp-alpha-enabled",B.showAlpha),vt.toggleClass("n2-sp-buttons-disabled",!B.showButtons||W),vt.toggleClass("n2-sp-palette-disabled",!B.showPalette),vt.toggleClass("n2-sp-palette-only",B.showPaletteOnly),vt.toggleClass("n2-sp-initial-disabled",!B.showInitial),vt.addClass(B.className),"undefined"==typeof t&&H()}function f(){function n(t){return t.data&&t.data.ignore?(j(e(this).data("color")),P()):(j(e(this).data("color")),z(!0),P(),M()),!1}g&&vt.find("*:not(input)").attr("unselectable","on");var i=mt.parent().find(".n2-sp-replacer");if(i.length?Nt=i:(Nt=jt?e(y).addClass(V):e([]),jt&&mt.parent().after(Nt)),At=jt?Nt:mt,Pt=Nt.find(".n2-sp-preview-inner"),h(!0),W?mt.parent().after(vt).hide():e(ft).append(vt.hide()),Y&&t.localStorage)try{ut=t.localStorage[Y].split(";")}catch(o){}At.bind("click.spectrum touchstart.spectrum",function(t){gt||D(),t.stopPropagation(),e(t.target).is("input")||t.preventDefault()}),(mt.is(":disabled")||B.disabled===!0)&&J(),vt.click(c),Tt.change(C),Tt.bind("paste",function(){setTimeout(C,1)}),Tt.keydown(function(t){13==t.keyCode&&C()}),Ot.text(B.cancelText),Ot.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),M("cancel")}),Mt.text(B.chooseText),Mt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),A()&&(z(!0),M())}),u(kt,function(t,e,n){lt=t/nt,n.shiftKey&&(lt=Math.round(10*lt)/10),P()}),u(xt,function(t,e){st=parseFloat(e/tt),P()},_,T),u(yt,function(t,e){rt=parseFloat(t/K),at=parseFloat((Q-e)/Q),P()},_,T),Et?(j(Et),E(),Ht=zt||p(Et).format,x(Et)):E(),W&&O();var s=g?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Ct.delegate(".n2-sp-thumb-el",s,n),Dt.delegate(".n2-sp-thumb-el:nth-child(1)",s,{ignore:!0},n)}function x(n){if(q){var i=p(n).toRgbString();if(-1===e.inArray(i,ut)&&ut.push(i),Y&&t.localStorage)try{t.localStorage[Y]=ut.join(";")}catch(o){}}}function w(){var t,e=[],n=ut,i={};if(B.showPalette){for(var o=0;o<ht.length;o++)for(var s=0;s<ht[o].length;s++)t=p(ht[o][s]).toRgbString(),i[t]=!0;for(o=0;o<n.length;o++)t=p(n[o]).toRgbString(),i.hasOwnProperty(t)||(e.push(n[o]),i[t]=!0)}return e.reverse().slice(0,B.maxSelectionSize)}function S(){var t=N(),n=e.map(ht,function(e,n){return i(e,t,"n2-sp-palette-row n2-sp-palette-row-"+n)});ut&&n.push(i(w(),t,"n2-sp-palette-row n2-sp-palette-row-selection")),Ct.html(n.join(""))}function k(){if(B.showInitial){var t=It,e=N();Dt.html(i([t,e],e,"n2-sp-palette-row-initial"))}}function _(){0!==Q&&0!==K&&0!==tt||H(),vt.addClass(dt)}function T(){vt.removeClass(dt)}function C(){var t=p(Tt.val());t.ok?j(t):Tt.addClass("n2-sp-validation-error")}function D(){G?M():O()}function O(){return G?void H():void(U.beforeShow(N())!==!1&&(o(),G=!0,e(pt).bind("click.spectrum",M),e(t).bind("resize.spectrum",X),Nt.addClass("n2-sp-active"),vt.show(),B.showPalette&&S(),H(),E(),It=N(),k(),U.show(It)))}function M(n){if((!n||"click"!=n.type||2!=n.button)&&G&&!W){G=!1,e(pt).unbind("click.spectrum",M),e(t).unbind("resize.spectrum",X),Nt.removeClass("n2-sp-active"),vt.hide();var i=!p.equals(N(),It);i&&(Rt&&"cancel"!==n?z(!0):F()),U.hide(N())}}function F(){j(It,!0)}function j(t,e){if(!p.equals(t,N())){var n=p(t),i=n.toHsv();st=i.h,rt=i.s,at=i.v,lt=i.a,E(),e||(Ht=zt||n.format)}}function N(){return p.fromRatio({h:st,s:rt,v:at,a:Math.round(100*lt)/100})}function A(){return!Tt.hasClass("n2-sp-validation-error")}function P(){E(),U.move(N())}function E(){Tt.removeClass("n2-sp-validation-error"),I();var t=p({h:st,s:"1.0",v:"1.0"});yt.css("background-color","#"+t.toHexString());var e=Ht;1>lt&&("hex"!==e&&"name"!==e||(e="rgb"));var n=N(),i=n.toHexString(),o=n.toRgbString();if(v||1===n.alpha?Pt.css("background-color",o):(Pt.css("background-color","transparent"),Pt.css("filter",n.toFilter())),B.showAlpha){var s=n.toRgb();s.a=0;var r=p(s).toRgbString(),a="linear-gradient(left, "+r+", "+i+")";g?St.css("filter",p(r).toFilter({gradientType:1},i)):(St.css("background","-webkit-"+a),St.css("background","-moz-"+a),St.css("background","-ms-"+a),St.css("background",a))}B.showInput&&(1>lt&&("hex"!==e&&"name"!==e||(e="rgb")),Tt.val(n.toString(e))),B.showPalette&&S(),k()}function I(){var t=rt,e=at,n=t*K,i=Q-e*Q;n=Math.max(-Z,Math.min(K-Z,n-Z)),i=Math.max(-Z,Math.min(Q-Z,i-Z)),bt.css({top:i,left:n});var o=lt*nt;_t.css({left:o-it/2});var s=st*tt;wt.css({top:s-ot})}function z(t){var e=N();Ft&&mt.val(e.toString(Ht)).change();var n=1;It=e,x(e),t&&n&&U.change(e)}function H(){K=yt.width(),Q=yt.height(),Z=bt.height(),et=xt.width(),tt=xt.height(),ot=wt.height(),nt=kt.width(),it=_t.width(),W||vt.offset(a(vt,At.parent())),I()}function R(){mt.show(),At.unbind("click.spectrum touchstart.spectrum"),vt.remove(),Nt.remove(),m[Lt.id]=null}function L(t,i){return t===n?e.extend({},B):i===n?B[t]:(B[t]=i,void h())}function $(){gt=!1,mt.attr("disabled",!1),At.removeClass("n2-sp-disabled")}function J(){M(),gt=!0,mt.attr("disabled",!0),At.addClass("n2-sp-disabled")}var B=s(l,r),W=B.flat,q=B.showSelectionPalette,Y=B.localStorageKey,V=B.theme,U=B.callbacks,X=d(H,10),G=!1,K=0,Q=0,Z=0,tt=0,et=0,nt=0,it=0,ot=0,st=0,rt=0,at=0,lt=1,ct=B.palette.slice(0),ht=e.isArray(ct[0])?ct:[ct],ut=B.selectionPalette.slice(0),dt="n2-sp-dragging",pt=r.ownerDocument,ft=pt.body,mt=e(r),gt=!1,vt=e(b,pt).addClass(V),yt=vt.find(".n2-sp-color"),bt=vt.find(".n2-sp-dragger"),xt=vt.find(".n2-sp-hue"),wt=vt.find(".n2-sp-slider"),St=vt.find(".n2-sp-alpha-inner"),kt=vt.find(".n2-sp-alpha"),_t=vt.find(".n2-sp-alpha-handle"),Tt=vt.find(".n2-sp-input"),Ct=vt.find(".n2-sp-palette"),Dt=vt.find(".n2-sp-initial"),Ot=vt.find(".n2-sp-cancel"),Mt=vt.find(".n2-sp-choose"),Ft=mt.is("input"),jt=Ft&&!W,Nt=null,At=null,Pt=null,Et=B.color||Ft&&mt.val(),It=!1,zt=B.preferredFormat,Ht=zt,Rt=!B.showButtons||B.clickoutFiresChange;vt.on("mousedown",function(t){nextend.context.setMouseDownArea("colorpicker",t)}),f();var Lt={show:O,hide:M,toggle:D,reflow:H,option:L,enable:$,disable:J,set:function(t){j(t),z()},get:N,destroy:R,container:vt};return Lt.id=m.push(Lt)-1,Lt}function a(t,n){var i=0,o=t.outerWidth(),s=t.outerHeight(),r=n.outerHeight(),a=t[0].ownerDocument,l=a.documentElement,c=l.clientWidth+e(a).scrollLeft(),h=l.clientHeight+e(a).scrollTop(),u=n.offset();return u.top+=r+3,u.left-=Math.min(u.left,u.left+o>c&&c>o?Math.abs(u.left+o-c):0),u.top-=Math.min(u.top,u.top+s>h&&h>s?Math.abs(s+r+6-i):i),u}function l(){}function c(t){t.stopPropagation()}function h(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function u(t,n,i,o){function s(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function r(e){if(h){if(g&&document.documentMode<9&&!e.button)return l();var i=e.originalEvent.touches,o=i?i[0].pageX:e.pageX,r=i?i[0].pageY:e.pageY,a=Math.max(0,Math.min(o-u.left,p)),c=Math.max(0,Math.min(r-u.top,d));f&&s(e),n.apply(t,[a,c,e])}}function a(n){var o=n.which?3==n.which:2==n.button;n.originalEvent.touches;o||h||i.apply(t,arguments)!==!1&&(h=!0,d=e(t).height(),p=e(t).width(),u=e(t).offset(),e(c).bind(m),e(c.body).addClass("n2-sp-dragging"),f||r(n),s(n))}function l(){h&&(e(c).unbind(m),e(c.body).removeClass("n2-sp-dragging"),o.apply(t,arguments)),h=!1}n=n||function(){},i=i||function(){},o=o||function(){};var c=t.ownerDocument||document,h=!1,u={},d=0,p=0,f=!1,m={};m.selectstart=s,m.dragstart=s,m[f?"touchmove":"mousemove"]=r,m[f?"touchend":"mouseup"]=l,e(t).bind(f?"touchstart":"mousedown",a)}function d(t,e,n){var i;return function(){var o=this,s=arguments,r=function(){i=null,t.apply(o,s)};n&&clearTimeout(i),!n&&i||(i=setTimeout(r,e))}}var p=null,f={beforeShow:l,move:l,change:l,show:l,hide:l,color:!1,flat:!1,showInput:!1,showButtons:!0,clickoutFiresChange:!1,showInitial:!1,showPalette:!1,showPaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",preferredFormat:!1,className:"",showAlpha:!1,theme:"n2-sp-light",palette:["fff","000"],selectionPalette:[],disabled:!1},m=[],g=!!/msie/i.exec(t.navigator.userAgent),v=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),y=["<div class='n2-sp-replacer'>","<div class='n2-sp-preview'><div class='n2-sp-preview-inner'></div></div>","<div class='n2-sp-dd'>&#9650;</div>","</div>"].join(""),b=function(){var t="";if(g)for(var e=1;6>=e;e++)t+="<div class='n2-sp-"+e+"'></div>";return["<div class='n2-sp-container'>","<div class='n2-sp-palette-container'>","<div class='n2-sp-palette n2-sp-thumb n2-sp-cf'></div>","</div>","<div class='n2-sp-picker-container'>","<div class='n2-sp-top n2-sp-cf'>","<div class='n2-sp-fill'></div>","<div class='n2-sp-top-inner'>","<div class='n2-sp-color'>","<div class='n2-sp-sat'>","<div class='n2-sp-val'>","<div class='n2-sp-dragger'></div>","</div>","</div>","</div>","<div class='n2-sp-hue'>","<div class='n2-sp-slider'></div>",t,"</div>","</div>","<div class='n2-sp-alpha'><div class='n2-sp-alpha-inner'><div class='n2-sp-alpha-handle'></div></div></div>","</div>","<div class='n2-sp-input-container n2-sp-cf'>","<input class='n2-sp-input' type='text' spellcheck='false' />","</div>","<div class='n2-sp-initial n2-sp-thumb n2-sp-cf'></div>","<div class='n2-sp-button-container n2-sp-cf'>","<a class='n2-sp-cancel' href='#'></a>","<button class='n2-sp-choose'></button>","</div>","</div>","</div>"].join("")}(),x="spectrum.id";e.fn.n2spectrum=function(t,n){if("string"==typeof t){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=m[e(this).data(x)];if(n){var s=n[t];if(!s)throw new Error("Spectrum: no such method: '"+t+"'");"get"==t?i=n.get():"container"==t?i=n.container:"option"==t?i=n.option.apply(n,o):"destroy"==t?(n.destroy(),e(this).removeData(x)):s.apply(n,o)}}),i}return this.n2spectrum("destroy").each(function(){var n=r(this,t);e(this).data(x,n.id)})},e.fn.n2spectrum.load=!0,e.fn.n2spectrum.loadOpts={},e.fn.n2spectrum.draggable=u,e.fn.n2spectrum.defaults=f,e.n2spectrum={},e.n2spectrum.localization={},e.n2spectrum.palettes={},e.fn.n2spectrum.processNativeColorInputs=function(){var t=e("<input type='color' value='!' />")[0],n="color"===t.type&&"!"!=t.value;n||e("input[type=color]").n2spectrum({preferredFormat:"hex6"})},function(t){function e(t){var e={r:0,g:0,b:0},i=1,s=!1,a=!1;return"string"==typeof t&&(t=g(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=n(t.r,t.g,t.b),s=!0,a="rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(e=r(t.h,t.s,t.v),s=!0,a="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(e=o(t.h,t.s,t.l),s=!0,a="hsl"),t.hasOwnProperty("a")&&(i=t.a)),e.r=S(255,k(e.r,0)),e.g=S(255,k(e.g,0)),e.b=S(255,k(e.b,0)),e.r<1&&(e.r=w(e.r)),e.g<1&&(e.g=w(e.g)),e.b<1&&(e.b=w(e.b)),{ok:s,format:t&&t.format||a,r:e.r,g:e.g,b:e.b,a:i}}function n(t,e,n){return{r:255*c(t,255),g:255*c(e,255),b:255*c(n,255)}}function i(t,e,n){t=c(t,255),e=c(e,255),n=c(n,255);var i,o,s=k(t,e,n),r=S(t,e,n),a=(s+r)/2;if(s==r)i=o=0;else{var l=s-r;switch(o=a>.5?l/(2-s-r):l/(s+r),s){case t:i=(e-n)/l+(n>e?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:o,l:a}}function o(t,e,n){function i(t,e,n){return 0>n&&(n+=1),n>1&&(n-=1),1/6>n?t+6*(e-t)*n:.5>n?e:2/3>n?t+(e-t)*(2/3-n)*6:t}var o,s,r;if(t=c(t,360),e=c(e,100),n=c(n,100),0===e)o=s=r=n;else{var a=.5>n?n*(1+e):n+e-n*e,l=2*n-a;o=i(l,a,t+1/3),s=i(l,a,t),r=i(l,a,t-1/3)}return{r:255*o,g:255*s,b:255*r}}function s(t,e,n){t=c(t,255),e=c(e,255),n=c(n,255);var i,o,s=k(t,e,n),r=S(t,e,n),a=s,l=s-r;if(o=0===s?0:l/s,s==r)i=0;else{switch(s){case t:i=(e-n)/l+(n>e?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:o,v:a}}function r(t,e,n){t=6*c(t,360),e=c(e,100),n=c(n,100);var i=x.floor(t),o=t-i,s=n*(1-e),r=n*(1-o*e),a=n*(1-(1-o)*e),l=i%6,h=[n,r,s,s,a,n][l],u=[a,n,n,r,s,s][l],d=[s,s,a,n,n,r][l];return{r:255*h,g:255*u,b:255*d}}function a(t,e,n,i){var o=[m(w(t).toString(16)),m(w(e).toString(16)),m(w(n).toString(16))];return i||o[0].charAt(0)!=o[0].charAt(1)||o[1].charAt(0)!=o[1].charAt(1)||o[2].charAt(0)!=o[2].charAt(1)?o.join(""):o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)}function l(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function c(t,e){d(t)&&(t="100%");var n=f(t);return t=S(e,k(0,T(t))),n&&(t*=e/100),x.abs(t-e)<1e-6?1:t>=1?t%e/T(e):t}function h(t){return S(1,k(0,t))}function u(t){return parseInt(t,16)}function d(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===T(t)}function f(t){return"string"==typeof t&&-1!=t.indexOf("%")}function m(t){return 1==t.length?"0"+t:""+t}function g(t){t=t.replace(v,"").replace(y,"").toLowerCase();var e=!1;if(C[t])t=C[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0};var n;return(n=O.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=O.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=O.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=O.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=O.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=O.hex6.exec(t))?{r:u(n[1]),g:u(n[2]),b:u(n[3]),format:e?"name":"hex"}:(n=O.hex8.exec(t))?{r:u(n[1]),g:u(n[2]),b:u(n[3]),a:u(n[4])/255,format:e?"name":"hex"}:(n=O.hex3.exec(t))?{r:u(n[1]+""+n[1]),g:u(n[2]+""+n[2]),b:u(n[3]+""+n[3]),format:e?"name":"hex"}:!1}var v=/^[\s,#]+/,y=/\s+$/,b=0,x=Math,w=x.round,S=x.min,k=x.max,_=x.random,T=t.parseFloat;p=function(t,n){if("object"==typeof t&&t.hasOwnProperty("_tc_id"))return t;var o=e(t),r=o.r,l=o.g,c=o.b,h=T(o.a),u=o.format;return{ok:o.ok,format:u,_tc_id:b++,alpha:h,toHsv:function(){var t=s(r,l,c);return{h:t.h,s:t.s,v:t.v,a:h}},toHsvString:function(){var t=s(r,l,c),e=w(360*t.h),n=w(100*t.s),i=w(100*t.v);return 1==h?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+h+")"},toHsl:function(){var t=i(r,l,c);return{h:t.h,s:t.s,l:t.l,a:h}},toHslString:function(){var t=i(r,l,c),e=w(360*t.h),n=w(100*t.s),o=w(100*t.l);return 1==h?"hsl("+e+", "+n+"%, "+o+"%)":"hsla("+e+", "+n+"%, "+o+"%, "+h+")"},toHex:function(){return a(r,l,c)},toHexString:function(t){return a(r,l,c,t)},toHexString8:function(){return a(r,l,c,!0)+m(w(255*h).toString(16))},toRgb:function(){return{r:w(r),g:w(l),b:w(c),a:h}},toRgbString:function(){return 1==h?"rgb("+w(r)+", "+w(l)+", "+w(c)+")":"rgba("+w(r)+", "+w(l)+", "+w(c)+", "+h+")"},toName:function(){return D[a(r,l,c)]||!1},toFilter:function(t,e){var n=a(r,l,c,!0),i=n,o=Math.round(255*T(h)).toString(16),s=o,u=t&&t.gradientType?"GradientType = 1, ":"";if(e){var d=p(e);i=d.toHex(),s=Math.round(255*T(d.alpha)).toString(16)}return"progid:DXImageTransform.Microsoft.gradient("+u+"startColorstr=#"+m(o)+n+",endColorstr=#"+m(s)+i+")"},toString:function(t){t=t||this.format;var e=!1;return"rgb"===t&&(e=this.toRgbString()),"hex"===t&&(e=this.toHexString()),"hex6"===t&&(e=this.toHexString(!0)),"hex8"===t&&(e=this.toHexString8()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString(!0)}}},p.fromRatio=function(t){if("object"==typeof t)for(var e in t)1===t[e]&&(t[e]="1.0");return p(t)},p.equals=function(t,e){return t&&e?p(t).toRgbString()==p(e).toRgbString():!1},p.random=function(){return p.fromRatio({r:_(),g:_(),b:_()})},p.desaturate=function(t,e){var n=p(t).toHsl();return n.s-=(e||10)/100,n.s=h(n.s),p(n)},p.saturate=function(t,e){var n=p(t).toHsl();return n.s+=(e||10)/100,n.s=h(n.s),p(n)},p.greyscale=function(t){return p.desaturate(t,100)},p.lighten=function(t,e){var n=p(t).toHsl();return n.l+=(e||10)/100,n.l=h(n.l),p(n)},p.darken=function(t,e){var n=p(t).toHsl();return n.l-=(e||10)/100,n.l=h(n.l),p(n)},p.complement=function(t){var e=p(t).toHsl();return e.h=(e.h+.5)%1,p(e)},p.triad=function(t){var e=p(t).toHsl(),n=360*e.h;return[p(t),p({h:(n+120)%360,s:e.s,l:e.l}),p({h:(n+240)%360,s:e.s,l:e.l})]},p.tetrad=function(t){var e=p(t).toHsl(),n=360*e.h;return[p(t),p({h:(n+90)%360,s:e.s,l:e.l}),p({h:(n+180)%360,s:e.s,l:e.l}),p({h:(n+270)%360,s:e.s,l:e.l})]},p.splitcomplement=function(t){var e=p(t).toHsl(),n=360*e.h;return[p(t),p({h:(n+72)%360,s:e.s,l:e.l}),p({h:(n+216)%360,s:e.s,l:e.l})]},p.analogous=function(t,e,n){e=e||6,n=n||30;var i=p(t).toHsl(),o=360/n,s=[p(t)];for(i.h*=360,i.h=(i.h-(o*e>>1)+720)%360;--e;)i.h=(i.h+o)%360,s.push(p(i));return s},p.monochromatic=function(t,e){e=e||6;for(var n=p(t).toHsv(),i=n.h,o=n.s,s=n.v,r=[],a=1/e;e--;)r.push(p({h:i,s:o,v:s})),s=(s+a)%1;return r},p.readable=function(t,e){var n=p(t).toRgb(),i=p(e).toRgb();return(i.r-n.r)*(i.r-n.r)+(i.g-n.g)*(i.g-n.g)+(i.b-n.b)*(i.b-n.b)>10404};var C=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=p.hexNames=l(C),O=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}()}(this),e(function(){e.fn.n2spectrum.load&&e.fn.n2spectrum.processNativeColorInputs()})}(window,n2),function(t,e){function n(e,n){this.app="system",this.key="IsExpert",this.isExpert=0,this.style=t('<div style="display: none;"></div>').appendTo("body"),n?(this.switches=t(".n2-expert-switch").on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"expertClicked"),click:t.proxy(this.switchExpert,this,!0)}),this.load(),this.isExpert||this.disable(!1),t.jStorage.listenKeyChange(this.app+this.key,t.proxy(this.load,this))):(this.switches=t(),this.disable(!1))}n.prototype.load=function(){var e=parseInt(t.jStorage.get(this.app+this.key,0));e!=this.isExpert&&this.switchExpert(!1,!1)},n.prototype.set=function(e,n){this.isExpert=e,n&&t.jStorage.set(this.app+this.key,e)},n.prototype.switchExpert=function(t,e){e&&e.preventDefault(),this.isExpert?this.disable(t):this.enable(t)},n.prototype.measureElement=function(){var e=null,n=t(window).scrollTop(),i=n+62,o=n+t(window).height()-100;t(".n2-content-area > .n2-heading-bar,.n2-content-area > .n2-form-tab ,#n2-admin .n2-content-area form > .n2-form > .n2-form-tab").each(function(){var n=t(this);return n.offset().top>i?(n.hasClass("n2-heading-bar")||(e=n),!1):n.offset().top+n.height()>o?(n.hasClass("n2-heading-bar")||(e=n),!1):void 0}),this.measuredElement=e},n.prototype.scrollToMeasured=function(){if(null!==this.measuredElement){for(;this.measuredElement.length&&!this.measuredElement.is(":VISIBLE");)this.measuredElement=this.measuredElement.prev();0!=this.measuredElement.length&&t("html,body").scrollTop(this.measuredElement.offset().top-102)}},n.prototype.enable=function(e){this.measureElement(),this.changeStyle(""),this.set(1,e),this.switches.addClass("n2-active"),t("html").addClass("n2-in-expert"),e&&this.scrollToMeasured()},n.prototype.disable=function(e){this.measureElement(),this.changeStyle(".n2-expert{display: none !important;}"),this.set(0,e),this.switches.removeClass("n2-active"),t("html").removeClass("n2-in-expert"),e&&this.scrollToMeasured()},n.prototype.changeStyle=function(t){this.style.html('<style type="text/css">'+t+"</style>")},e.NextendExpertMode=n}(n2,window),function(t){t(n2)}(function(t){function e(e){var r=e||window.event,a=l.call(arguments,1),c=0,u=0,d=0,p=0,f=0,m=0;if(e=t.event.fix(r),e.type="mousewheel","detail"in r&&(d=-1*r.detail),"wheelDelta"in r&&(d=r.wheelDelta),"wheelDeltaY"in r&&(d=r.wheelDeltaY),"wheelDeltaX"in r&&(u=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(u=-1*d,d=0),c=0===d?u:d,"deltaY"in r&&(d=-1*r.deltaY,c=d),"deltaX"in r&&(u=r.deltaX,0===d&&(c=-1*u)),0!==d||0!==u){if(1===r.deltaMode){var g=t.data(this,"mousewheel-line-height");c*=g,d*=g,u*=g}else if(2===r.deltaMode){var v=t.data(this,"mousewheel-page-height");c*=v,d*=v,u*=v}if(p=Math.max(Math.abs(d),Math.abs(u)),(!s||s>p)&&(s=p,i(r,p)&&(s/=40)),i(r,p)&&(c/=40,u/=40,d/=40),c=Math[c>=1?"floor":"ceil"](c/s),u=Math[u>=1?"floor":"ceil"](u/s),d=Math[d>=1?"floor":"ceil"](d/s),h.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=e.clientX-y.left,m=e.clientY-y.top}return e.deltaX=u,e.deltaY=d,e.deltaFactor=s,e.offsetX=f,e.offsetY=m,e.deltaMode=0,a.unshift(e,c,u,d),o&&clearTimeout(o),o=setTimeout(n,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function n(){s=null}function i(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var o,s,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var c=r.length;c;)t.event.fixHooks[r[--c]]=t.event.mouseHooks;var h=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",h.getLineHeight(this)),t.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),i=n["offsetParent"in t.fn?"offsetParent":"parent"]();return i.length||(i=t("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel");
3
- },unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t,e){function n(){o||(t(window).on("beforeunload",function(e){if(nextend.askToSave&&o+18e4<t.now()){var n={changed:!1};if(t(window).triggerHandler("n2-before-unload",n),n.changed){var i=n2_("The changes you made will be lost if you navigate away from this page.");return(e||window.event).returnValue=i,i}}}),o=t.now())}function i(e,i,o){this.form=t("#"+e).on("saved",t.proxy(this.onSaved,this)).data("form",this),this.onSaved(),this.url=i,this.values=o,"undefined"!=typeof document.formvalidator&&(document.formvalidator.isValid=function(){return!0}),t(window).on("n2-before-unload",t.proxy(this.onBeforeUnload,this)),n(),t("input, textarea").on("keyup",function(t){27==t.which&&(t.target.blur(),t.stopPropagation())})}var o=!1;i.prototype.onBeforeUnload=function(t,e){!e.changed&&this.isChanged()&&(e.changed=!0)},i.prototype.isChanged=function(){return this.form.triggerHandler("checkChanged"),this.serialized!=this.form.serialize()},i.prototype.onSaved=function(){this.serialized=this.form.serialize()},i.submit=function(t){return nextend.askToSave=!1,setTimeout(function(){n2(t).submit()},300),!1},e.NextendForm=i,t(window).ready(function(){t("input[data-disabled]").on("focus",function(){this.blur()})})}(n2,window),N2Require("FormElement",[],[],function(t,e,n){function i(){this.connectedField=null,this.element.data("field",this)}return i.prototype.triggerOutsideChange=function(){this.element.triggerHandler("outsideChange",this),this.element.triggerHandler("nextendChange",this)},i.prototype.triggerInsideChange=function(){this.element.triggerHandler("insideChange",this),this.element.triggerHandler("nextendChange",this)},i.prototype.focus=function(t){this.connectedField&&this.connectedField.focus(t)},i}),N2Require("FormElementText",["FormElement"],[],function(t,e,n){function i(n){this.element=t("#"+n).on({focus:t.proxy(this._focus,this),blur:t.proxy(this._blur,this),change:t.proxy(this.change,this)}),this.tagName=this.element.prop("tagName"),this.parent=this.element.parent(),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype._focus=function(){this.parent.addClass("focus"),"TEXTAREA"!=this.tagName&&this.element.on("keypress.n2-text",t.proxy(function(t){13==t.which&&(this.element.off("keypress.n2-text"),this.element.trigger("blur"))},this))},i.prototype._blur=function(){this.parent.removeClass("focus")},i.prototype.change=function(){this.triggerOutsideChange()},i.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},i.prototype.focus=function(t){this.connectedField?this.connectedField.focus(t):t&&this.element.focus().select()},i}),N2Require("FormElementAutocompleteSimple",[],[],function(t,e,n){function i(e,n){this.element=t("#"+e).data("autocomplete",this),this.element.nextendAutocomplete({appendTo:"body",minLength:0,position:{my:"center top",at:"center bottom",collision:"flip"},source:function(t,e){e(n)},select:function(e,n){return t(this).val(n.item.value).trigger("change"),!1}}).click(function(){t(this).nextendAutocomplete("search","")})}return i}),N2Require("FormElementAutocompleteSlider",[],[],function(t,e,n){function i(e,n){this.localChange=!1,this.element=t("#"+e).data("autocomplete",this);var i=this.element.parent().on({"mouseenter.n2slider":t.proxy(this.startSlider,this,n)}),o=i.siblings(".n2-form-element-units").find("> input");if(n.units&&o.length){var s=n.units;o.on("nextendChange",t.proxy(function(){n.min=s[o.val()+"min"],n.max=s[o.val()+"max"],this.slider&&(this.slider.slider("option","min",n.min),this.slider.slider("option","max",n.max))},this))}}return i.prototype.startSlider=function(e,n){this.element.parent().off(".n2slider"),this.slider||(this.slider=t("<div></div>").appendTo(t('<div class="n2-ui-slider-container"></div>').insertAfter(this.element)).removeAttr("slide").prop("slide",!1).slider(t.extend({start:t.proxy(function(){this.element.parent().addClass("n2-active")},this),stop:t.proxy(function(){this.element.parent().removeClass("n2-active")},this),slide:t.proxy(function(t,e){this.localChange=!0,this.element.val(e.value).trigger("change"),this.localChange=!1},this)},e)),"undefined"!=typeof this.slider[0].slide&&(this.slider[0].slide=null),this.element.on("nextendChange",t.proxy(function(){if(!this.localChange){var t=this.element.val();t==parseFloat(t)&&this.slider.slider("value",parseFloat(this.element.val()))}},this))),this.slider.slider("value",parseFloat(this.element.val()))},i}),N2Require("FormElementAutocomplete",[],[],function(t,e,n){function i(e,n){this.tags=n,this.element=t("#"+e).data("autocomplete",this),this.element.on("keydown",function(e){e.keyCode===t.ui.keyCode.TAB&&t(this).nextendAutocomplete("instance").menu.active&&e.preventDefault()}).nextendAutocomplete({minLength:0,position:{my:"left top-2",of:this.element.parent(),collision:"flip"},source:t.proxy(function(e,n){var i=e.term.split(/,/),o=[];t.each(this.tags,function(t,e){-1===i.indexOf(e)&&o.push(e)}),n(o)},this),focus:function(){return!1},select:function(e,n){var i=this.value.split(/,/);return i.pop(),i.push(n.item.value),i.push(""),this.value=i.join(","),t(this).trigger("change").nextendAutocomplete("search"),!1}}).click(function(){t(this).nextendAutocomplete("search")}),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}return i.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.element.val("").trigger("change")},i.prototype.setTags=function(t){this.tags=t},i}),N2Require("BasicCSSFont",["BasicCSSSkeleton"],[],function(t,e,n){function i(){this._singular="font",this._prular="fonts",e.BasicCSSSkeleton.prototype.constructor.apply(this,arguments),this.form={afont:t("#layerfamily"),color:t("#layercolor"),size:t("#layersize"),bold:t("#layerweight"),weight:t("#layerweight"),lineheight:t("#layerlineheight"),align:t("#layertextalign").on("nextendChange",t.proxy(function(e){if(!this.manager.underActivate&&!this.manager.inPresetList)switch(t(e.currentTarget).val()){case"left":case"justify":nextend.smartSlider.canvasManager.mainContainer.getSelectedLayer().setProperty("align","left","layer");break;case"right":nextend.smartSlider.canvasManager.mainContainer.getSelectedLayer().setProperty("align","right","layer");break;default:nextend.smartSlider.canvasManager.mainContainer.getSelectedLayer().setProperty("align","center","layer")}},this)),underline:t("#layerdecoration"),italic:t("#layerdecoration")},this.loaded()}return i.prototype=Object.create(e.BasicCSSSkeleton.prototype),i.prototype.constructor=i,i.prototype._transformsize=function(t){return t.split("||").join("|*|")},i.prototype._setsize=function(t,e){t.size=e.replace("|*|","||")},i.prototype._transformweight=function(t){return parseInt(t)},i.prototype._setweight=function(t,e){t.weight=parseInt(e)},i.prototype._transformunderline=function(t){return[1==this.value[this.activeTab].italic?"italic":"",1==t?"underline":""].join("||")},i.prototype._setunderline=function(t,e){var n=e.split("||");t.underline="underline"==n[1]?1:0},i.prototype._transformitalic=function(t){return[1==t?"italic":"",1==this.value[this.activeTab].underline?"underline":""].join("||")},i.prototype._setitalic=function(t,e){var n=e.split("||");t.italic="italic"==n[0]?1:0},i}),N2Require("BasicCSSSkeleton",[],[],function(t,e,n){function i(e){this.hasVisuals=!1,this.isInsideChange=!1,this.isReload=!1,this.manager=e,this.$container=e.$container.find("#n2-tab-basiccss"+this._singular),this.$visuals=this.$container.find(".n2-css-name"),this.$visualsLabel=this.$visuals.find(".n2-css-name-label"),this.$visualsList=this.$visuals.find(".n2-css-name-list"),this.$tabsContainer=this.$container.find(".n2-css-tab"),this.$reset=this.$container.find(".n2-css-tab-reset").on("click",t.proxy(function(t){this.value[this.activeTab]={},this._lazySave(t),this.activateTab(this.activeTab)},this)),this.$more=this.$container.find(".n2-basiccss-more").on("click",t.proxy(function(t){t.preventDefault(),this.visuals[this.activeVisual].field.show(t)},this)),this.activeVisual=0,this.activeTab=0,this.tabs=[]}return i.prototype.loaded=function(){for(var e in this.form)this.form[e].on({nextendChange:t.proxy(this.changeValue,this,e)})},i.prototype.changeValue=function(t,e){this.isReload||("function"==typeof this["_set"+t]?this["_set"+t](this.value[this.activeTab],this.form[t].val()):this.value[this.activeTab][t]=this.form[t].val(),this._lazySave(e))},i.prototype._lazySave=NextendDeBounce(function(t){this.isInsideChange=!0;var e=this.getBase64();this.visuals[this.activeVisual].field.save(t,e),this.visuals[this.activeVisual].value=e,this.isInsideChange=!1},50),i.prototype.save=function(t){this.isInsideChange=!0;for(var e in t)this.visualsByName[e].field.save({},t[e]),this.visualsByName[e].value=t[e];this.isInsideChange=!1},i.prototype.getBase64=function(){return Base64.encode(JSON.stringify({name:n2_("Static"),data:this.value}))},i.prototype.load=function(e,n){if(this.hasVisuals=n.length>0,this.$container.toggleClass("n2-css-has-"+this._singular,this.hasVisuals),this.hasVisuals){this.visuals=[],this.visualsByName={},this.$visualsList.html(""),this.$visuals.toggleClass("n2-multiple",n.length>1);for(var i=0;i<n.length;i++){var o=n[i];this.visualsByName[o.name]={value:e[o.name],mode:o.mode,field:o.field},o.field.element.off(".basiccss").on("outsideChange.basiccss",t.proxy(this.loadSingleValue,this,i,o.name)),this.visuals.push(this.visualsByName[o.name]),t("<span>"+o.field.getLabel()+"</span>").on("click",t.proxy(function(t,e){this.activateVisual(t),this.activateTab(0)},this,i)).appendTo(this.$visualsList)}this.activateVisual(0),this.activateTab(0)}},i.prototype.loadSingleValue=function(t,e,n){this.isInsideChange||(this.visuals[t].value=this.visuals[t].field.element.val(),this.activeVisual==t&&(this.activateVisual(t),this.activateTab(this.activeTab)))},i.prototype.activateVisual=function(e){this.activeVisual=e,this.$visualsLabel.html(this.visuals[e].field.getLabel()),nextend[this._singular+"Manager"].getDataFromController(this.visuals[e].value,{previewMode:this.visuals[e].mode},t.proxy(function(t,e){this.value=t,this.setTabs(e)},this))},i.prototype.activateTab=function(e){this.isReload=!0,this.activeTab=e,this.$container.toggleClass("n2-css-show-reset",0!=e);var n=0==e?this.value[e]:t.extend({},this.value[0],this.value[e]);for(var i in n)"undefined"!=typeof this.form[i]&&("function"==typeof this["_transform"+i]?this.form[i].data("field").insideChange(this["_transform"+i](n[i])):this.form[i].data("field").insideChange(n[i]));this.$tabs.removeClass("n2-active").eq(e).addClass("n2-active"),this.isReload=!1},i.prototype.setTabs=function(e){this.tabs=e,this.$tabsContainer.html("");for(var n=0;n<e.length;n++)t("<span>"+e[n]+"</span>").on("click",t.proxy(function(t,e){this.activateTab(t)},this,n)).appendTo(this.$tabsContainer);this.$tabs=this.$tabsContainer.find("span")},i.prototype.serialize=function(){if(this.hasVisuals){var t={};for(var e in this.visualsByName)t[e]=this.visualsByName[e].value;return t}return{}},i.prototype.unSerialize=function(t){for(var e in t)this.visualsByName[e].field.save({},t[e]),this.visualsByName[e].value=t[e]},i}),N2Require("BasicCSSStyle",["BasicCSSSkeleton"],[],function(t,e,n){function i(){this._singular="style",this._prular="styles",e.BasicCSSSkeleton.prototype.constructor.apply(this,arguments),this.form={backgroundcolor:t("#layerbackgroundcolor"),opacity:t("#layeropacity"),padding:t("#layerpadding"),border:t("#layerborder"),borderradius:t("#layerborderradius")},this.loaded()}return i.prototype=Object.create(e.BasicCSSSkeleton.prototype),i.prototype.constructor=i,i}),N2Require("BasicCSS",[],[],function(t,e,n){function i(n,i){this.underActivate=!1,this.inPresetList=!1,this.$container=t("#"+n),this.ajaxUrl=i,this.throttleSetTimeout=null,this.throttleExitTimeout=null,this.storage={},this.assets={font:new e.BasicCSSFont(this),style:new e.BasicCSSStyle(this)},this.$preset=t('<div id="n2-tab-basiccsspreset"><div class="n2-editor-header n2-h2 n2-uc"><span class="n2-css-name n2-css-name-label">'+n2_("Preset")+"</span></div></div>").prependTo(this.$container),t('<div class="n2-ss-editor-window-notice n2-ss-responsive-helper n2-h5">'+n2_(window.n2_printf('NOTE: Layer design changes apply to each device. Watch <a href="%s" target="_blank">video tutorial</a> to learn responsive tools.',"https://www.youtube.com/watch?v=yGpVsrzwt1U&index=4&list=PLSawiBnEUNfvzcI3pBHs4iKcbtMCQU0dB"))+"</div>").prependTo(this.$container);var o=t('<div class="n2-ss-button-container"></div>').insertAfter(this.$preset.find(".n2-css-name"));t('<a class="n2-button n2-button-icon n2-button-s n2-radius-s n2-button-darker n2-h5 n2-uc" href="#" data-n2tip="'+n2_("Reset design to default")+'"><i class="n2-i n2-i-reset2"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.exitPresetList(this.defs,t)},this)).appendTo(o),t('<a class="n2-basiccss-save n2-button n2-button-icon n2-button-s n2-radius-s n2-button-darker n2-h5 n2-uc" href="#" data-n2tip="'+n2_("Save design as new preset")+'"><i class="n2-i n2-i-save"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.saveAsNew()},this)).appendTo(o),this.$presets=t('<div id="n2-tab-basiccsspresets"></div>').appendTo(this.$container),t('<a class="n2-basiccss-choose n2-button n2-button-icon n2-button-s n2-radius-s n2-button-green n2-h5 n2-uc" data-n2tip="'+n2_("Load design")+'" href="#"><i class="n2-i n2-i-addlayer2"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.showList()},this)).appendTo(o),t('<a class="n2-basiccss-back n2-button n2-button-icon n2-button-s n2-radius-s n2-button-grey n2-h5 n2-uc" href="#"><i class="n2-i n2-i-closewindow"></i></a>').on("click",t.proxy(function(t){t.preventDefault(),this.exitPresetList(!1,t)},this)).appendTo(o),nextend.basicCSS=this}return i.prototype.showList=function(){this.inPresetList=!0,this.lastState=this.serialize(),t.when(this.loadType()).done(t.proxy(function(t){this.$presets.append(this.storage[this.type]),this.$container.addClass("n2-basiccss-show-preset-list")},this)),this.$presets.on("mouseleave",t.proxy(function(){this.throttledUnSerialize(this.lastState)},this))},i.prototype.activate=function(e,n,i){this.inPresetList&&this.exitPresetList(!1),this.underActivate=!0,this.type&&this.type!==e&&"undefined"!=typeof this.storage[this.type]&&this.storage[this.type].detach();var o=!1;this.defs={font:[],style:[]},this.type=e;for(var s in this.assets){for(var r=0;r<i[s].length;r++)this.defs[s][i[s][r].name]=i[s][r].def;this.assets[s].load(n,i[s]),o=o||this.assets[s].hasVisuals}t("#n2-ss-layer-window").toggleClass("n2-ss-has-design-option",o),o||t('#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab="style"]').hasClass("n2-active")&&t('#n2-ss-layer-window .n2-sidebar-tab-switcher .n2-td[data-tab="item"]').trigger("click"),this.underActivate=!1},i.prototype.deActivate=function(){this.inPresetList&&this.exitPresetList(!1)},i.prototype.serialize=function(){var t={};for(var e in this.assets)t[e]=this.assets[e].serialize();return t},i.prototype.unSerialize=function(t){for(var e in this.assets)this.assets[e].unSerialize(t[e])},i.prototype.throttledUnSerialize=function(e){this._addThrottledRenderTimeout(t.proxy(this.unSerialize,this,e))},i.prototype.saveAsNew=function(e){if("undefined"==typeof this.saveAsModal){var n=this;this.saveAsModal=new NextendModal({zero:{size:[500,220],title:n2_("Save as"),close:!0,content:'<form class="n2-form"></form>',controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">'+n2_("Save as new")+"</a>"],fn:{show:function(){var e=this.controls.find(".n2-button"),i=(this.content.find(".n2-form").on("submit",function(t){t.preventDefault(),e.trigger("click")}).append(this.createInput(n2_("Name"),"n2-visual-name","width: 446px;")),this.content.find("#n2-visual-name").focus());e.on("click",t.proxy(function(e){e.preventDefault();var o=i.val();""==o?nextend.notificationCenter.error(n2_("Please fill the name field!")):NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(n.ajaxUrl,{nextendaction:"addVisual"}),data:{type:n.type,value:Base64.encode(JSON.stringify({name:o,data:n.serialize()}))},dataType:"json"}).done(t.proxy(function(i){t.when(n.loadType()).done(function(){n.addVisual(i.data.visual).prependTo(n.storage[n.type])}),this.hide(e)},this))},this))}}}},!1)}this.saveAsModal.show()},i.prototype.loadType=function(){if("undefined"==typeof this.storage[this.type]){var e=t.Deferred(),n=t.proxy(function(n){this.storage[this.type]=t('<ul class="n2-list n2-h4"></ul>');for(var i=0;i<n.length;i++)this.addVisual(n[i]);e.resolve()},this);"undefined"==typeof window[this.type]?(this.storage[this.type]=e,NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"loadVisuals"}),data:{type:this.type},dataType:"json"}).done(t.proxy(function(t){n(t.data.visuals)},this))):n(window[this.type])}return this.storage[this.type]},i.prototype.addVisual=function(e){var n=e.value;"{"!=n[0]&&(n=Base64.decode(n));var i=JSON.parse(n),o=t('<li><a href="#">'+i.name+"</a></li>").on({mouseenter:t.proxy(function(t,e){this.throttledUnSerialize(t.data)},this,i),click:t.proxy(function(t,e){e.preventDefault(),this.exitPresetList(t,e)},this,i.data)}).appendTo(this.storage[this.type]);if(e.id>1e4){var s=t('<span class="n2-actions"></span>').appendTo(o);t('<div class="n2-button n2-button-icon n2-button-s" data-n2tip="Overwrite preset"><i class="n2-i n2-i-save n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(e,n,i){i.stopPropagation(),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"changeVisual"}),data:{visualId:e,value:Base64.encode(JSON.stringify({name:n,data:this.lastState})),type:this.type},dataType:"json"}).done(t.proxy(function(t){o.replaceWith(this.addVisual(t.data.visual))},this))},this,e.id,i.name)).appendTo(s),t('<div class="n2-button n2-button-icon n2-button-s"><i class="n2-i n2-i-delete n2-i-grey-opacity"></i></div>').on("click",t.proxy(function(e,n){n.preventDefault(),n.stopPropagation(),NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.ajaxUrl,{nextendaction:"deleteVisual"}),data:{visualId:e,type:this.type},dataType:"json"}).done(t.proxy(function(t){o.remove()},this))},this,e.id)).appendTo(s),nextend.tooltip.add(s)}return o},i.prototype.exitPresetList=function(t,e){this.throttleSetTimeout&&clearTimeout(this.throttleSetTimeout),this.$presets.off("mouseleave"),t?(this.inPresetList=!1,this.unSerialize(t)):this.unSerialize(this.lastState),this.$container.removeClass("n2-basiccss-show-preset-list"),this.inPresetList=!1},i.prototype._addThrottledRenderTimeout=function(t){this.throttleSetTimeout&&clearTimeout(this.throttleSetTimeout),this.throttleSetTimeout=setTimeout(t,100)},i.prototype._addThrottledExitTimeout=function(t){this.throttleExitTimeout&&clearTimeout(this.throttleExitTimeout),this.throttleExitTimeout=setTimeout(t,100)},i}),N2Require("FormElementCheckbox",["FormElement"],[],function(t,e,n){function i(n,i){this.separator="||",this.element=t("#"+n),this.values=i,this.checkboxes=this.element.parent().find(".n2-checkbox-option"),this.states=this.element.val().split(this.separator);for(var o=0;o<this.checkboxes.length;o++)"undefined"!=typeof this.states[o]&&this.states[o]==this.values[o]||(this.states[o]=""),this.checkboxes.eq(o).on("click",t.proxy(this.switchCheckbox,this,o));e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.switchCheckbox=function(t){this.states[t]==this.values[t]?(this.states[t]="",this.setSelected(t,0)):(this.states[t]=this.values[t],this.setSelected(t,1)),this.element.val(this.states.join(this.separator)),this.triggerOutsideChange()},i.prototype.insideChange=function(t){for(var e=t.split(this.separator),n=0;n<this.checkboxes.length;n++)"undefined"==typeof e[n]||e[n]!=this.values[n]?(this.states[n]="",this.setSelected(n,0)):(this.states[n]=this.values[n],this.setSelected(n,1));this.element.val(this.states.join(this.separator)),this.triggerInsideChange()},i.prototype.setSelected=function(t,e){e?this.checkboxes.eq(t).addClass("n2-active"):this.checkboxes.eq(t).removeClass("n2-active")},i}),N2Require("FormElementColor",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),1==i?this.alpha=!0:this.alpha=!1,this.element.off("change").n2spectrum({showAlpha:this.alpha,preferredFormat:1==this.alpha?"hex8":"hex6",showInput:!1,showButtons:!1,move:t.proxy(this.onMove,this),showSelectionPalette:!0,showPalette:!0,maxSelectionSize:6,localStorageKey:"color",palette:[["000000","55aa39","357cbd","bb4a28","8757b2","000000CC"],["81898d","5cba3c","4594e1","d85935","9e74c2","00000080"],["ced3d5","27ae60","01add3","e79d19","e264af","FFFFFFCC"],["ffffff","2ecc71","00c1c4","ecc31f","ec87c0","FFFFFF80"]]}).on("change",t.proxy(this.onChange,this)),this.text=this.element.data("field"),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.onMove=function(){this.element.val(this.getCurrent()),this.triggerOutsideChange()},i.prototype.onChange=function(t){var e=this.getCurrent(),n=this.element.val();e!=n&&(this.element.n2spectrum("set",n),this.triggerInsideChange(),this.triggerOutsideChange()),t.stopImmediatePropagation()},i.prototype.insideChange=function(t){this.element.val(t),this.element.n2spectrum("set",t),this.triggerInsideChange()},i.prototype.getCurrent=function(){return this.alpha?this.element.n2spectrum("get").toHexString8():this.element.n2spectrum("get").toHexString(!0)},i}),N2Require("FormElementDevice",["FormElementOnoff"],[],function(t,e,n){function i(t){e.FormElementOnoff.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElementOnoff.prototype),i.prototype.constructor=i,i.prototype.detach=function(){this.onoff.detach()},i.prototype.setSelected=function(t){t?this.onoff.addClass("n2-active"):this.onoff.removeClass("n2-active")},i}),N2Require("FormElementDevices",["FormElementDevice"],[],function(t,e,n){function i(n,i){this.$el=t("#"+n).data("field",this),this.fields={};for(var o=0;o<i.length;o++)this.fields[i[o]]=new e.FormElementDevice(n+"-"+i[o])}return i.prototype.setAvailableDevices=function(t){for(var e in t){var n=this.fields[e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()];t[e]||n.detach()}this.$el.children().first().addClass("n2-first"),this.$el.children().last().addClass("n2-last")},i}),N2Require("FormElementEnabled",[],[],function(t,e,n){function i(e,n){this.element=t("#"+e).on("nextendChange",t.proxy(this.onChange,this)),this.hide=this.element.closest("tr").nextAll().add(n),this.onChange()}return i.prototype.onChange=function(){var t=parseInt(this.element.val());t?this.hide.css("display",""):this.hide.css("display","none")},i}),N2Require("FormElementFolders",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),this.field=this.element.data("field"),this.parameters=i,this.editButton=t("#"+n+"_edit").on("click",t.proxy(this.edit,this)),this.button=t("#"+n+"_button").on("click",t.proxy(this.open,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},i.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},i.prototype.open=function(e){e.preventDefault(),nextend.imageHelper.openFoldersLightbox(t.proxy(this.val,this))},i}),N2Require("FormElementFont",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),this.parameters=i,this.defaultSetId=i.set,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),nextend.fontManager.$.on("visualDelete",t.proxy(this.fontDeleted,this)),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.getLabel=function(){return this.parameters.label},i.prototype.show=function(e){e.preventDefault(),""!=this.parameters.style&&nextend.fontManager.setConnectedStyle(this.parameters.style),""!=this.parameters.style2&&nextend.fontManager.setConnectedStyle2(this.parameters.style2),this.defaultSetId&&nextend.fontManager.changeSetById(this.defaultSetId),nextend.fontManager.show(this.element.val(),t.proxy(this.save,this),{previewMode:this.parameters.previewmode,previewHTML:this.parameters.preview})},i.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},i.prototype.save=function(t,e){nextend.fontManager.addVisualUsage(this.parameters.previewmode,e,window.nextend.pre),this.val(e)},i.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},i.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},i.prototype.updateName=function(e){t.when(nextend.fontManager.getVisual(e)).done(t.proxy(function(t){this.name.val(t.name)},this))},i.prototype.fontDeleted=function(t,e){e==this.element.val()&&this.insideChange("")},i.prototype.renderFont=function(){var t=this.element.val();return nextend.fontManager.addVisualUsage(this.parameters.previewmode,t,""),nextend.fontManager.getClass(t,this.parameters.previewmode)},i}),N2Require("FormElementIcon2Manager",["FormElement"],[],function(t,e,n){function i(n){this.element=t("#"+n),this.button=t("#"+n+"_edit").on("click",t.proxy(this.openModal,this)),this.preview=this.element.parent().find(".n2-form-element-preview").on("click",t.proxy(this.openModal,this)),this.element.on("nextendChange",t.proxy(this.makePreview,this)),e.FormElement.prototype.constructor.apply(this,arguments),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},i.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},i.prototype.openModal=function(n){n&&n.preventDefault(),e.Icons.showModal(t.proxy(this.setIcon,this))},i.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},i.prototype.setIcon=function(t){this.val(t)},i.prototype.makePreview=function(){var t=e.Icons.render(this.element.val());t?this.preview.html('<i class="n2i '+t["class"]+'">'+t.ligature+"</i>"):this.preview.html("")},i.prototype.focus=function(t){t&&this.openModal()},i}),N2Require("FormElementIconManager",["FormElement"],[],function(t,e,n){function i(){if(!s){var e="";s=new NextendModal({zero:{size:[1200,600],title:"Icons",back:!1,close:!0,content:e,fn:{show:function(){var e=this.content.find(".n2-icon");e.on("click",t.proxy(function(e){var n=t(e.currentTarget).clone(),i=n.find("svg");if(i[0].hasChildNodes())for(var o=i[0].childNodes,s=0;s<o.length;s++)o[s].setAttribute("data-style","{style}");r(n.html()),this.hide(e)},this))}}}},!1),s.setCustomClass("n2-icons-modal")}return s}function o(n){this.element=t("#"+n),this.button=t("#"+n+"_edit").on("click",t.proxy(this.openModal,this)),this.preview=this.element.parent().find("img").on("click",t.proxy(this.openModal,this)),this.element.on("nextendChange",t.proxy(this.makePreview,this)),e.FormElement.prototype.constructor.apply(this,arguments)}var s=null,r=function(){};return o.prototype=Object.create(e.FormElement.prototype),o.prototype.constructor=o,o.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},o.prototype.openModal=function(e){e&&e.preventDefault(),r=t.proxy(this.setIcon,this),i().show()},o.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},o.prototype.setIcon=function(t){this.val(t)},o.prototype.makePreview=function(){this.preview.attr("src","data:image/svg+xml;base64,"+Base64.encode(this.element.val()))},o.prototype.focus=function(t){t&&this.openModal()},o}),N2Require("FormElementImage",["FormElement"],[],function(t,e,n){function i(e,n){this.element=t("#"+e),this.field=this.element.data("field"),this.field.connectedField=this,this.parameters=n,this.preview=t("#"+e+"_preview").on("click",t.proxy(this.open,this)),this.element.on("nextendChange",t.proxy(this.makePreview,this)),this.button=t("#"+e+"_button").on("click",t.proxy(this.open,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},i.prototype.val=function(e,n){var n=t.extend({alt:!1},n);n.alt&&""!=n.alt&&this.parameters.alt&&""!=this.parameters.alt&&t("#"+this.parameters.alt).val(n.alt).trigger("change"),this.element.val(e),this.triggerOutsideChange()},i.prototype.makePreview=function(){var t=this.element.val();"{"==t.substr(0,1)?this.preview.css("background-image",""):this.preview.css("background-image","url("+nextend.imageHelper.fixed(t)+")")},i.prototype.open=function(e){e&&e.preventDefault(),nextend.imageHelper.openLightbox(t.proxy(this.val,this))},i.prototype.edit=function(e){e.preventDefault(),e.stopPropagation();var n=nextend.imageHelper.fixed(this.element.val()),i=t('<img src="'+n+'" />');"//"==n.substr(0,2)&&(n=location.protocol+n),window.nextend.getFeatherEditor().done(t.proxy(function(){nextend.featherEditor.launch({image:i.get(0),hiresUrl:n,onSave:t.proxy(this.aviarySave,this),onSaveHiRes:t.proxy(this.aviarySave,this)})},this))},i.prototype.aviarySave=function(e,n){NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(window.nextend.featherEditor.ajaxUrl,{nextendaction:"saveImage"}),data:{aviaryUrl:n},dataType:"json"}).done(t.proxy(function(t){this.val(nextend.imageHelper.make(t.data.image)),nextend.featherEditor.close()},this))},i.prototype.focus=function(t){t&&this.open()},i}),N2Require("FormElementImageManager",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),t("#"+n+"_manage").on("click",t.proxy(this.show,this)),this.parameters=i,this.imageField=this.element.data("field"),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.show=function(e){e.preventDefault(),nextend.imageManager.show(this.element.val(),t.proxy(this.save,this))},i.prototype.save=function(){},i.prototype.insideChange=function(t){this.element.val(t),this.triggerInsideChange()},i}),N2Require("FormElementList",["FormElement"],[],function(t,e,n){function i(n,i){this.separator="||",this.element=t("#"+n).on("change",t.proxy(this.onHiddenChange,this)),this.select=t("#"+n+"_select").on("change",t.proxy(this.onChange,this)),this.multiple=i,e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.onHiddenChange=function(){var t=this.element.val();t&&t!=this.select.val()&&this.insideChange(t)},i.prototype.onChange=function(){var t=this.select.val();null!==t&&"object"==typeof t&&(t=t.join(this.separator)),this.element.val(t),this.triggerOutsideChange()},i.prototype.insideChange=function(t){"object"==typeof t?this.select.val(t.split(this.separator)):this.select.val(t),this.element.val(t),this.select.val(t),this.triggerInsideChange()},i}),N2Require("FormElementMarginPadding",["FormElementMixed"],[],function(t,e,n){function i(n,i,o){this.linkedValues=!1,e.FormElementMixed.prototype.constructor.apply(this,arguments),this.$field=this.element.parent(),this.$field.find(".n2-text-sub-label").on("click",t.proxy(function(t){
4
- t.preventDefault(),this.linkedValues=!this.linkedValues,this.$field.toggleClass("n2-values-linked",this.linkedValues),this.linkedValues&&this.elements[0].trigger("change")},this))}return i.prototype=Object.create(e.FormElementMixed.prototype),i.prototype.constructor=i,i.prototype.onFieldChange=function(){if(this.linkedValues)for(var t=this.elements[0].val(),e=1;4>e;e++)this.elements[e].data("field").insideChange(t);this.element.val(this.getValue()),this.triggerOutsideChange()},i.prototype.insideChange=function(t){e.FormElementMixed.prototype.insideChange.apply(this,arguments),this.linkedValues=!0;for(var t=this.elements[0].val(),n=1;4>n;n++)if(t!=this.elements[n].val()){this.linkedValues=!1;break}this.$field.toggleClass("n2-values-linked",this.linkedValues)},i}),N2Require("FormElementMirror",[],[],function(t,e,n){function i(e){this.element=t("#"+e).on("nextendChange",t.proxy(this.onChange,this)),this.tr=this.element.closest("tr").nextAll(),this.onChange()}return i.prototype.onChange=function(){var t=parseInt(this.element.val());t?this.tr.css("display","none"):this.tr.css("display","")},i}),N2Require("FormElementMixed",["FormElement"],[],function(t,e,n){function i(n,i,o){this.element=t("#"+n),this.elements=[];for(var s=0;s<i.length;s++)this.elements.push(t("#"+i[s]).on("outsideChange",t.proxy(this.onFieldChange,this)));this.separator=o,e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.onFieldChange=function(){this.element.val(this.getValue()),this.triggerOutsideChange()},i.prototype.insideChange=function(t){this.element.val(t);for(var e=t.split(this.separator),n=0;n<this.elements.length;n++)this.elements[n].data("field").insideChange(e[n]);this.triggerInsideChange()},i.prototype.getValue=function(){for(var t=[],e=0;e<this.elements.length;e++)t.push(this.elements[e].val());return t.join(this.separator)},i}),N2Require("FormElementNumber",["FormElement"],[],function(t,e,n){function i(n,i,o,s){this.min=i,this.max=o,this.element=t("#"+n).on({focus:t.proxy(this._focus,this),blur:t.proxy(this.blur,this),change:t.proxy(this.change,this)}),this.parent=this.element.parent();var r=this.parent.siblings(".n2-form-element-units").find("> input");s&&r.length&&r.on("nextendChange",t.proxy(function(){this.min=s[r.val()+"min"],this.max=s[r.val()+"max"]},this)),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype._focus=function(){this.parent.addClass("focus"),this.element.on("keypress.n2-text",t.proxy(function(t){13==t.which&&(this.element.off("keypress.n2-text"),this.element.trigger("blur"))},this))},i.prototype.blur=function(){this.parent.removeClass("focus")},i.prototype.change=function(){var t=this.validate(this.element.val());t===!0?this.triggerOutsideChange():this.element.val(t).trigger("change")},i.prototype.insideChange=function(t){var e=this.validate(t);e===!0?this.element.val(t):this.element.val(e),this.triggerInsideChange()},i.prototype.validate=function(t){var e=parseFloat(t);return isNaN(e)&&(e=0),e=Math.max(this.min,Math.min(this.max,e)),e!=t?e:!0},i}),N2Require("FormElementOnoff",["FormElement"],[],function(t,e,n){function i(n){this.element=t("#"+n),this.onoff=this.element.parent().on("click",t.proxy(this["switch"],this)),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype["switch"]=function(){var t=parseInt(this.element.val());t=t?0:1,this.element.val(t),this.setSelected(t),this.triggerOutsideChange()},i.prototype.insideChange=function(t){t=parseInt(t),this.element.val(t),this.setSelected(t),this.triggerInsideChange()},i.prototype.setSelected=function(t){t?this.onoff.addClass("n2-onoff-on"):this.onoff.removeClass("n2-onoff-on")},i}),N2Require("FormElementRadio",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),this.values=i,this.parent=this.element.parent(),this.options=this.parent.find(".n2-radio-option");for(var o=0;o<this.options.length;o++)this.options.eq(o).on("click",t.proxy(this.click,this));e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.click=function(t){this.changeSelectedIndex(this.options.index(t.currentTarget))},i.prototype.changeSelectedIndex=function(t){var e=this.values[t];this.element.val(e),this.setSelected(t),this.triggerOutsideChange()},i.prototype.insideChange=function(e,n){var i=t.inArray(e,this.values);"-1"==i&&(i=this.partialSearch(e)),"-1"==i&&"undefined"!=typeof n&&(i=this.addOption(e,n)),"-1"!=i?(this.element.val(this.values[i]),this.setSelected(i),this.triggerInsideChange()):this.options.eq(0).trigger("click")},i.prototype.setSelected=function(t){this.options.removeClass("n2-active"),this.options.eq(t).addClass("n2-active")},i.prototype.partialSearch=function(t){t=t.replace(/^.*[\\\/]/,"");for(var e=0;e<this.values.length;e++)if(-1!=this.values[e].indexOf(t))return e;return-1},i.prototype.addOption=function(e,n){var i=this.values.push(e)-1;return n.appendTo(this.parent).on("click",t.proxy(this.click,this)),this.options=this.options.add(n),i},i.prototype.addTabOption=function(e,n){var i=this.values.push(e)-1,o=t('<div class="n2-radio-option n2-h4 n2-last">'+n+"</div>").insertAfter(this.options.last().removeClass("n2-last")).on("click",t.proxy(this.click,this));return this.options=this.options.add(o),i},i.prototype.removeTabOption=function(e){var n=t.inArray(e,this.values),i=this.options.eq(n);this.options=this.options.not(i),i.remove(),0==n&&this.options.eq(0).addClass("n2-first"),n==this.options.length&&this.options.eq(this.options.length-1).addClass("n2-last"),this.values.splice(n,1)},i.prototype.moveTab=function(t,e){},i}),N2Require("FormElementRichText",["FormElementText"],[],function(t,e,n){function i(n){e.FormElementText.prototype.constructor.apply(this,arguments),this.parent.find(".n2-textarea-rich-bold").on("click",t.proxy(this.bold,this)),this.parent.find(".n2-textarea-rich-italic").on("click",t.proxy(this.italic,this)),this.parent.find(".n2-textarea-rich-link").on("click",t.proxy(this.link,this))}return i.prototype=Object.create(e.FormElementText.prototype),i.prototype.constructor=i,i.prototype.bold=function(){this.wrapText("<b>","</b>")},i.prototype.italic=function(){this.wrapText("<i>","</i>")},i.prototype.link=function(){this.wrapText('<a href="">',"</a>")},i.prototype.list=function(){this.wrapText("","\n<ul>\n<li>#1 Item</li>\n<li>#2 Item</li>\n</ul>\n")},i.prototype.wrapText=function(t,e){var n=this.element,i=n.val().length,o=n[0].selectionStart,s=n[0].selectionEnd,r=n.val().substring(o,s),a=t+r+e;n.val(n.val().substring(0,o)+a+n.val().substring(s,i)),this.triggerOutsideChange(),this.element.focus()},i}),N2Require("FormElementSkin",["FormElement"],[],function(t,e,n){function i(n,i,o,s){this.element=t("#"+n),this.preId=i,this.skins=o,this.list=this.element.data("field"),this.fixedMode=s,this.firstOption=this.list.select.find("option").eq(0),this.originalText=this.firstOption.text(),this.element.on("nextendChange",t.proxy(this.onSkinSelect,this)),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.onSkinSelect=function(){var e=this.element.val();if("0"!=e){e=this.skins[e];for(var n in e)if(e.hasOwnProperty(n)){var i=t("#"+this.preId+n);if(i.length){var o=i.data("field");o.insideChange(e[n])}}this.fixedMode||(this.changeFirstOptionText(n2_("Done")),this.list.insideChange("0"),setTimeout(t.proxy(this.changeFirstOptionText,this,this.originalText),3e3))}},i.prototype.changeFirstOptionText=function(t){this.firstOption.text(t)},i.prototype.insideChange=function(t){this.element.val(t),this.list.select.val(t)},i}),N2Require("FormElementStyle",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),this.parameters=i,this.defaultSetId=i.set,this.element.parent().on("click",t.proxy(this.show,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this)),this.name=this.element.siblings("input"),nextend.styleManager.$.on("visualDelete",t.proxy(this.styleDeleted,this)),this.updateName(this.element.val()),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.getLabel=function(){return this.parameters.label},i.prototype.show=function(e){e.preventDefault(),""!=this.parameters.font&&nextend.styleManager.setConnectedFont(this.parameters.font),""!=this.parameters.font2&&nextend.styleManager.setConnectedFont2(this.parameters.font2),""!=this.parameters.style2&&nextend.styleManager.setConnectedStyle(this.parameters.style2),this.defaultSetId&&nextend.styleManager.changeSetById(this.defaultSetId),nextend.styleManager.show(this.element.val(),t.proxy(this.save,this),{previewMode:this.parameters.previewmode,previewHTML:this.parameters.preview})},i.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("")},i.prototype.save=function(t,e){nextend.styleManager.addVisualUsage(this.parameters.previewmode,e,window.nextend.pre),this.val(e)},i.prototype.val=function(t){this.element.val(t),this.updateName(t),this.triggerOutsideChange()},i.prototype.insideChange=function(t){this.element.val(t),this.updateName(t),this.triggerInsideChange()},i.prototype.updateName=function(e){t.when(nextend.styleManager.getVisual(e)).done(t.proxy(function(t){this.name.val(t.name)},this))},i.prototype.styleDeleted=function(t,e){e==this.element.val()&&this.insideChange("")},i.prototype.renderStyle=function(){var t=this.element.val();return nextend.styleManager.addVisualUsage(this.parameters.previewmode,t,""),nextend.styleManager.getClass(t,this.parameters.previewmode)},i}),N2Require("FormElementSubform",["FormElement"],[],function($,scope,undefined){function FormElementSubform(t,e,n,i){this.id=t,this.element=$("#"+t),this.target=$("#"+e),this.tab=n,this.originalValue=i,this.form=this.element.closest("form").data("form"),this.list=this.element.data("field"),this.element.on("nextendChange",$.proxy(this.loadSubform,this)),scope.FormElement.prototype.constructor.apply(this,arguments)}return FormElementSubform.prototype=Object.create(scope.FormElement.prototype),FormElementSubform.prototype.constructor=FormElementSubform,FormElementSubform.prototype.loadSubform=function(){var t=this.element.val();if("disabled"==t)this.target.html("");else{var e=[];t==this.originalValue&&(e=this.form.values);var n={id:this.id,values:e,tab:this.tab,value:t};NextendAjaxHelper.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(this.form.url),data:n,dataType:"json"}).done($.proxy(this.load,this))}},FormElementSubform.prototype.load=function(response){this.target.html(response.data.html),eval(response.data.scripts),nextend.tooltip.add(this.target)},FormElementSubform}),N2Require("FormElementSubformImage",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),this.options=t("#"+i).find(".n2-subform-image-option"),this.subform=this.element.data("field"),this.active=this.getIndex(this.options.filter(".n2-active").get(0));for(var o=0;o<this.options.length;o++)this.options.eq(o).on("click",t.proxy(this.selectOption,this));e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.selectOption=function(t){var e=this.getIndex(t.currentTarget);if(e!=this.active){this.options.eq(e).addClass("n2-active"),this.options.eq(this.active).removeClass("n2-active"),this.active=e;var n=this.subform.list.select.find("option").eq(e).val();this.subform.list.insideChange(n)}},i.prototype.getIndex=function(e){return t.inArray(e,this.options)},i}),N2Require("FormElementSwitcher",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),this.options=this.element.parent().find(".n2-switcher-unit"),this.active=this.options.index(this.options.filter(".n2-active")),this.values=i;for(var o=0;o<this.options.length;o++)this.options.eq(o).on("click",t.proxy(this["switch"],this,o));e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype["switch"]=function(t,e){this.element.val(this.values[t]),this.setSelected(t),this.triggerOutsideChange()},i.prototype.insideChange=function(e){var n=t.inArray(e,this.values);this.element.val(this.values[n]),this.setSelected(n),this.triggerInsideChange()},i.prototype.setSelected=function(t){this.options.eq(this.active).removeClass("n2-active"),this.options.eq(t).addClass("n2-active"),this.active=t},i}),N2Require("FormElementUnits",["FormElement"],[],function(t,e,n){function i(n,i){this.element=t("#"+n),this.options=this.element.parent().find(".n2-element-unit"),this.currentUnit=this.element.parent().find(".n2-element-current-unit"),this.values=i;for(var o=0;o<this.options.length;o++)this.options.eq(o).on("click",t.proxy(this["switch"],this,o));e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype["switch"]=function(t,e){this.element.val(this.values[t]),this.setSelected(t),this.triggerOutsideChange()},i.prototype.insideChange=function(e){var n=t.inArray(e,this.values);this.element.val(this.values[n]),this.setSelected(n),this.triggerInsideChange()},i.prototype.setSelected=function(t){this.currentUnit.html(this.options.eq(t).html())},i}),N2Require("FormElementUrl",["FormElement"],[],function(t,e,n){function i(e,n){this.element=t("#"+e),this.field=this.element.data("field"),this.parameters=n,o=this.parameters.url,this.button=t("#"+e+"_button").on("click",t.proxy(this.open,this)),this.element.siblings(".n2-form-element-clear").on("click",t.proxy(this.clear,this))}var o="",s=null,r={},a=function(t){},l="";return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype.clear=function(t){t.preventDefault(),t.stopPropagation(),this.val("#")},i.prototype.val=function(t){this.element.val(t),this.triggerOutsideChange()},i.prototype.open=function(e){e.preventDefault(),a=t.proxy(this.insert,this),l=this.element.val(),this.getModal().show()},i.prototype.insert=function(t){this.val(t)},i.prototype.getModal=function(){if(!s){var e=function(e){return"undefined"==typeof r[e]&&(r[e]=t.ajax({type:"POST",url:NextendAjaxHelper.makeAjaxUrl(o),data:{keyword:e},dataType:"json"})),r[e]},n=(this.parameters,{size:[600,500],title:n2_("Link"),back:"zero",close:!0,content:'<div class="n2-form"></div>',fn:{show:function(){this.content.find(".n2-form").append(this.createInput(n2_("Keyword"),"n2-links-keyword","width:546px;"));var n=t("#n2-links-keyword"),i=this.createHeading("").appendTo(this.content),o=this.createResult().appendTo(this.content),r="";n.on("keyup",t.proxy(function(){r=n.val(),e(r).done(t.proxy(function(e){if(n.val()==r){var s=e.data;""==r?i.html(n2_("No search term specified. Showing recent items.")):i.html(n2_printf(n2_('Showing items match for "%s"'),r));for(var l=[],c=this,h=0;h<s.length;h++)l.push([s[h].title,s[h].info,t('<div class="n2-button n2-button-normal n2-button-xs n2-radius-s n2-button-green n2-uc n2-h5">'+n2_("Select")+"</div>").on("click",{permalink:s[h].link},function(t){a(t.data.permalink),c.hide()})]);o.html(""),this.createTable(l,["width:100%;","",""]).appendTo(this.createTableWrap().appendTo(o))}},this))},this)).trigger("keyup").focus(),this.content.append('<hr style="margin: 0 -20px;"/>');var c=t('<div class="n2-input-button"><input placeholder="External url" type="text" id="external-url" name="external-url" value="" /><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">Insert</a></div>').css({display:"block",textAlign:"center"}).appendTo(this.content),h=c.find("input").val(l);c.find(".n2-button").on("click",function(t){t.preventDefault(),a(h.val()),s.hide()})}}});n.back=!1,s=new NextendModal({zero:n},!1),s.setCustomClass("n2-url-modal")}return s},i});var fixto=function(t,e,n){function i(){this._vendor=null}function o(){var t=!1;if(/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor))return!1;var e=n.createElement("div"),i=n.createElement("div");e.appendChild(i),e.style[p]="translate(0)",e.style.marginTop="10px",e.style.visibility="hidden",i.style.position="fixed",i.style.top=0,n.body.appendChild(e);var o=i.getBoundingClientRect();return o.top>0&&(t=!0),n.body.removeChild(e),t}function s(e,n,i){this.child=e,this._$child=t(e),this.parent=n,this.options={className:"fixto-fixed",top:0},this._setOptions(i)}function r(t,e,n){s.call(this,t,e,n),this._replacer=new c.MimicNode(t),this._ghostNode=this._replacer.replacer,this._saveStyles(),this._saveViewportHeight(),this._proxied_onscroll=this._bind(this._onscroll,this),this._proxied_onresize=this._bind(this._onresize,this),this.start()}function a(t,e,n){s.call(this,t,e,n),this.start()}var l=function(){var t={getAll:function(t){return n.defaultView.getComputedStyle(t)},get:function(t,e){return this.getAll(t)[e]},toFloat:function(t){return parseFloat(t,10)||0},getFloat:function(t,e){return this.toFloat(this.get(t,e))},_getAllCurrentStyle:function(t){return t.currentStyle}};return n.documentElement.currentStyle&&(t.getAll=t._getAllCurrentStyle),t}(),c=function(){function e(t){this.element=t,this.replacer=n.createElement("div"),this.replacer.style.visibility="hidden",this.hide(),t.parentNode.insertBefore(this.replacer,t)}e.prototype={replace:function(){var t=this.replacer.style,e=l.getAll(this.element);t.width=this._width(),t.height=this._height(),t.marginTop=e.marginTop,t.marginBottom=e.marginBottom,t.marginLeft=e.marginLeft,t.marginRight=e.marginRight,t.cssFloat=e.cssFloat,t.styleFloat=e.styleFloat,t.position=e.position,t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left,t.display=e.display},hide:function(){this.replacer.style.display="none"},_width:function(){return this.element.getBoundingClientRect().width+"px"},_widthOffset:function(){return this.element.offsetWidth+"px"},_height:function(){return this.element.getBoundingClientRect().height+"px"},_heightOffset:function(){return this.element.offsetHeight+"px"},destroy:function(){t(this.replacer).remove();for(var e in this)this.hasOwnProperty(e)&&(this[e]=null)}};var i=n.documentElement.getBoundingClientRect();return i.width||(e.prototype._width=e.prototype._widthOffset,e.prototype._height=e.prototype._heightOffset),{MimicNode:e,computedStyle:l}}();i.prototype={_vendors:{webkit:{cssPrefix:"-webkit-",jsPrefix:"Webkit"},moz:{cssPrefix:"-moz-",jsPrefix:"Moz"},ms:{cssPrefix:"-ms-",jsPrefix:"ms"},opera:{cssPrefix:"-o-",jsPrefix:"O"}},_prefixJsProperty:function(t,e){return t.jsPrefix+e[0].toUpperCase()+e.substr(1)},_prefixValue:function(t,e){return t.cssPrefix+e},_valueSupported:function(t,e,n){try{return n.style[t]=e,n.style[t]===e}catch(i){return!1}},propertySupported:function(t){return void 0!==n.documentElement.style[t]},getJsProperty:function(t){if(this.propertySupported(t))return t;if(this._vendor)return this._prefixJsProperty(this._vendor,t);var e;for(var n in this._vendors)if(e=this._prefixJsProperty(this._vendors[n],t),this.propertySupported(e))return this._vendor=this._vendors[n],e;return null},getCssValue:function(t,e){var i=n.createElement("div"),o=this.getJsProperty(t);if(this._valueSupported(o,e,i))return e;var s;if(this._vendor&&(s=this._prefixValue(this._vendor,e),this._valueSupported(o,s,i)))return s;for(var r in this._vendors)if(s=this._prefixValue(this._vendors[r],e),this._valueSupported(o,s,i))return this._vendor=this._vendors[r],s;return null}};var h,u,d=new i,p=d.getJsProperty("transform"),f=d.getCssValue("position","sticky"),m=d.getCssValue("position","fixed"),g="Microsoft Internet Explorer"===navigator.appName;g&&(u=parseFloat(navigator.appVersion.split("MSIE")[1])),s.prototype={_mindtop:function(){var t=0;if(this._$mind)for(var e,n,i=0,o=this._$mind.length;o>i;i++)if(e=this._$mind[i],n=e.getBoundingClientRect(),n.height)t+=n.height;else{var s=l.getAll(e);t+=e.offsetHeight+l.toFloat(s.marginTop)+l.toFloat(s.marginBottom)}return t},stop:function(){this._stop(),this._running=!1},start:function(){this._running||(this._start(),this._running=!0)},destroy:function(){this.stop(),this._destroy(),this._$child.removeData("fixto-instance");for(var t in this)this.hasOwnProperty(t)&&(this[t]=null)},_setOptions:function(e){t.extend(this.options,e),this.options.mind&&(this._$mind=t(this.options.mind)),this.options.zIndex&&(this.child.style.zIndex=this.options.zIndex)},setOptions:function(t){this._setOptions(t),this.refresh()},_stop:function(){},_start:function(){},_destroy:function(){},refresh:function(){}},r.prototype=new s,t.extend(r.prototype,{_bind:function(t,e){return function(){return t.call(e)}},_toresize:8===u?n.documentElement:e,_onscroll:function(){if(this._scrollTop=n.documentElement.scrollTop||n.body.scrollTop,this._parentBottom=this.parent.offsetHeight+this._fullOffset("offsetTop",this.parent)-l.getFloat(this.parent,"paddingBottom"),this.fixed){if(this._scrollTop>this._parentBottom||this._scrollTop<this._fullOffset("offsetTop",this._ghostNode)-this.options.top-this._mindtop())return void this._unfix();this._adjust()}else{var t=l.getAll(this.child);this._scrollTop<this._parentBottom&&this._scrollTop>this._fullOffset("offsetTop",this.child)-this.options.top-this._mindtop()&&this._viewportHeight>this.child.offsetHeight+l.toFloat(t.marginTop)+l.toFloat(t.marginBottom)&&(this._fix(),this._adjust())}},_adjust:function(){var t=0,e=this._mindtop(),n=0,i=l.getAll(this.child),o=null;h&&(o=this._getContext(),o&&(t=Math.abs(o.getBoundingClientRect().top))),n=this._parentBottom-this._scrollTop-(this.child.offsetHeight+l.toFloat(i.marginBottom)+e+this.options.top),n>0&&(n=0),this.child.style.top=n+e+t+this.options.top-l.toFloat(i.marginTop)+"px"},_fullOffset:function(t,e,n){for(var i=e[t],o=e.offsetParent;null!==o&&o!==n;)i+=o[t],o=o.offsetParent;return i},_getContext:function(){for(var t,e,i=this.child,o=null;!o;){if(t=i.parentNode,t===n.documentElement)return null;if(e=l.getAll(t),"none"!==e[p]){o=t;break}i=t}return o},_fix:function(){var t=this.child,e=t.style,i=l.getAll(t),o=t.getBoundingClientRect().left,s=i.width;if(this._saveStyles(),n.documentElement.currentStyle&&(s=t.offsetWidth-(l.toFloat(i.paddingLeft)+l.toFloat(i.paddingRight)+l.toFloat(i.borderLeftWidth)+l.toFloat(i.borderRightWidth))+"px"),h){var r=this._getContext();r&&(o=t.getBoundingClientRect().left-r.getBoundingClientRect().left)}this._replacer.replace(),e.left=o-l.toFloat(i.marginLeft)+"px",e.width=s,e.position="fixed",e.top=this._mindtop()+this.options.top-l.toFloat(i.marginTop)+"px",this._$child.addClass(this.options.className),this.fixed=!0},_unfix:function(){var t=this.child.style;this._replacer.hide(),t.position=this._childOriginalPosition,t.top=this._childOriginalTop,t.width=this._childOriginalWidth,t.left=this._childOriginalLeft,this._$child.removeClass(this.options.className),this.fixed=!1},_saveStyles:function(){var t=this.child.style;this._childOriginalPosition=t.position,this._childOriginalTop=t.top,this._childOriginalWidth=t.width,this._childOriginalLeft=t.left},_onresize:function(){this.refresh()},_saveViewportHeight:function(){this._viewportHeight=e.innerHeight||n.documentElement.clientHeight},_stop:function(){this._unfix(),t(e).unbind("scroll",this._proxied_onscroll),t(this._toresize).unbind("resize",this._proxied_onresize)},_start:function(){this._onscroll(),t(e).bind("scroll",this._proxied_onscroll),t(this._toresize).bind("resize",this._proxied_onresize)},_destroy:function(){this._replacer.destroy()},refresh:function(){this._saveViewportHeight(),this._unfix(),this._onscroll()}}),a.prototype=new s,t.extend(a.prototype,{_start:function(){var t=l.getAll(this.child);this._childOriginalPosition=t.position,this._childOriginalTop=t.top,this.child.style.position=f,this.refresh()},_stop:function(){this.child.style.position=this._childOriginalPosition,this.child.style.top=this._childOriginalTop},refresh:function(){this.child.style.top=this._mindtop()+this.options.top+"px"}});var v=function(e,n,i){var s=f;return"-webkit-sticky"==s&&"table-cell"==t(n).css("display")&&(s=!1),/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)&&(s=!1),s&&!i||s&&i&&i.useNativeSticky!==!1?new a(e,n,i):m?(void 0===h&&(h=o()),new r(e,n,i)):"Neither fixed nor sticky positioning supported"};return 8>u&&(v=function(){return"not supported"}),t.fn.fixTo=function(e,n){var i=t(e),o=0;return this.each(function(){var s=t(this).data("fixto-instance");if(s){var r=e;s[r].call(s,n)}else t(this).data("fixto-instance",v(this,i[o],n));o++})},{FixToContainer:r,fixTo:v,computedStyle:l,mimicNode:c}}(n2,window,document);!function(){"use strict";function t(){var t=!1;if("localStorage"in window)try{window.localStorage.setItem("_tmptest","tmpval"),t=!0,window.localStorage.removeItem("_tmptest")}catch(e){}if(t)try{window.localStorage&&(w=window.localStorage,_="localStorage",D=w.jStorage_update)}catch(o){}else if("globalStorage"in window)try{window.globalStorage&&(w="localhost"==window.location.hostname?window.globalStorage["localhost.localdomain"]:window.globalStorage[window.location.hostname],_="globalStorage",D=w.jStorage_update)}catch(s){}else{if(S=document.createElement("link"),!S.addBehavior)return void(S=null);S.style.behavior="url(#default#userData)",document.getElementsByTagName("head")[0].appendChild(S);try{S.load("jStorage")}catch(r){S.setAttribute("jStorage","{}"),S.save("jStorage"),S.load("jStorage")}var l="{}";try{l=S.getAttribute("jStorage")}catch(c){}try{D=S.getAttribute("jStorage_update")}catch(d){}w.jStorage=l,_="userDataBehavior"}a(),h(),n(),u(),"addEventListener"in window&&window.addEventListener("pageshow",function(t){t.persisted&&i()},!1)}function e(){var t="{}";if("userDataBehavior"==_){S.load("jStorage");try{t=S.getAttribute("jStorage")}catch(e){}try{D=S.getAttribute("jStorage_update")}catch(n){}w.jStorage=t}a(),h(),u()}function n(){"localStorage"==_||"globalStorage"==_?"addEventListener"in window?window.addEventListener("storage",i,!1):document.attachEvent("onstorage",i):"userDataBehavior"==_&&setInterval(i,1e3)}function i(){var t;clearTimeout(C),C=setTimeout(function(){if("localStorage"==_||"globalStorage"==_)t=w.jStorage_update;else if("userDataBehavior"==_){S.load("jStorage");try{t=S.getAttribute("jStorage_update")}catch(e){}}t&&t!=D&&(D=t,o())},25)}function o(){var t,n=y.parse(y.stringify(x.__jstorage_meta.CRC32));e(),t=y.parse(y.stringify(x.__jstorage_meta.CRC32));var i,o=[],r=[];for(i in n)if(n.hasOwnProperty(i)){if(!t[i]){r.push(i);continue}n[i]!=t[i]&&"2."==String(n[i]).substr(0,2)&&o.push(i)}for(i in t)t.hasOwnProperty(i)&&(n[i]||o.push(i));s(o,"updated"),s(r,"deleted")}function s(t,e){t=[].concat(t||[]);var n,i,o,s;if("flushed"==e){t=[];for(var r in T)T.hasOwnProperty(r)&&t.push(r);e="deleted"}for(n=0,o=t.length;o>n;n++){if(T[t[n]])for(i=0,s=T[t[n]].length;s>i;i++)T[t[n]][i](t[n],e);if(T["*"])for(i=0,s=T["*"].length;s>i;i++)T["*"][i](t[n],e)}}function r(){var t=(+new Date).toString();if("localStorage"==_||"globalStorage"==_)try{w.jStorage_update=t}catch(e){_=!1}else"userDataBehavior"==_&&(S.setAttribute("jStorage_update",t),S.save("jStorage"));i()}function a(){if(w.jStorage)try{x=y.parse(String(w.jStorage))}catch(t){w.jStorage="{}"}else w.jStorage="{}";k=w.jStorage?String(w.jStorage).length:0,x.__jstorage_meta||(x.__jstorage_meta={}),x.__jstorage_meta.CRC32||(x.__jstorage_meta.CRC32={})}function l(){p();try{w.jStorage=y.stringify(x),S&&(S.setAttribute("jStorage",w.jStorage),S.save("jStorage")),k=w.jStorage?String(w.jStorage).length:0}catch(t){}}function c(t){if("string"!=typeof t&&"number"!=typeof t)throw new TypeError("Key name must be string or numeric");if("__jstorage_meta"==t)throw new TypeError("Reserved key name");return!0}function h(){var t,e,n,i,o=1/0,a=!1,c=[];if(clearTimeout(b),x.__jstorage_meta&&"object"==typeof x.__jstorage_meta.TTL){t=+new Date,n=x.__jstorage_meta.TTL,i=x.__jstorage_meta.CRC32;for(e in n)n.hasOwnProperty(e)&&(n[e]<=t?(delete n[e],delete i[e],delete x[e],a=!0,c.push(e)):n[e]<o&&(o=n[e]));o!=1/0&&(b=setTimeout(h,Math.min(o-t,2147483647))),a&&(l(),r(),s(c,"deleted"))}}function u(){var t,e;if(x.__jstorage_meta.PubSub){var n,i=M,o=[];for(t=e=x.__jstorage_meta.PubSub.length-1;t>=0;t--)n=x.__jstorage_meta.PubSub[t],n[0]>M&&(i=n[0],o.unshift(n));for(t=o.length-1;t>=0;t--)d(o[t][1],o[t][2]);M=i}}function d(t,e){if(O[t])for(var n=0,i=O[t].length;i>n;n++)try{O[t][n](t,y.parse(y.stringify(e)))}catch(o){}}function p(){if(x.__jstorage_meta.PubSub){for(var t=+new Date-2e3,e=0,n=x.__jstorage_meta.PubSub.length;n>e;e++)if(x.__jstorage_meta.PubSub[e][0]<=t){x.__jstorage_meta.PubSub.splice(e,x.__jstorage_meta.PubSub.length-e);break}x.__jstorage_meta.PubSub.length||delete x.__jstorage_meta.PubSub}}function f(t,e){x.__jstorage_meta||(x.__jstorage_meta={}),x.__jstorage_meta.PubSub||(x.__jstorage_meta.PubSub=[]),x.__jstorage_meta.PubSub.unshift([+new Date,t,e]),l(),r()}function m(t,e){for(var n,i=t.length,o=e^i,s=0;i>=4;)n=255&t.charCodeAt(s)|(255&t.charCodeAt(++s))<<8|(255&t.charCodeAt(++s))<<16|(255&t.charCodeAt(++s))<<24,n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16),n^=n>>>24,n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)^n,i-=4,++s;switch(i){case 3:o^=(255&t.charCodeAt(s+2))<<16;case 2:o^=(255&t.charCodeAt(s+1))<<8;case 1:o^=255&t.charCodeAt(s),o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16)}return o^=o>>>13,o=1540483477*(65535&o)+((1540483477*(o>>>16)&65535)<<16),o^=o>>>15,o>>>0}var g="0.4.12",v=window.n2||window.$||(window.$={}),y={parse:window.JSON&&(window.JSON.parse||window.JSON.decode)||String.prototype.evalJSON&&function(t){return String(t).evalJSON()}||v.parseJSON||v.evalJSON,stringify:Object.toJSON||window.JSON&&(window.JSON.stringify||window.JSON.encode)||v.toJSON};if("function"!=typeof y.parse||"function"!=typeof y.stringify)throw new Error("No JSON support found, include //cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js to page");var b,x={__jstorage_meta:{CRC32:{}}},w={jStorage:"{}"},S=null,k=0,_=!1,T={},C=!1,D=0,O={},M=+new Date,F={isXML:function(t){var e=(t?t.ownerDocument||t:0).documentElement;return e?"HTML"!==e.nodeName:!1},encode:function(t){if(!this.isXML(t))return!1;try{return(new XMLSerializer).serializeToString(t)}catch(e){try{return t.xml}catch(n){}}return!1},decode:function(t){var e,n="DOMParser"in window&&(new DOMParser).parseFromString||window.ActiveXObject&&function(t){var e=new ActiveXObject("Microsoft.XMLDOM");return e.async="false",e.loadXML(t),e};return n?(e=n.call("DOMParser"in window&&new DOMParser||window,t,"text/xml"),this.isXML(e)?e:!1):!1}};v.jStorage={version:g,set:function(t,e,n){if(c(t),n=n||{},"undefined"==typeof e)return this.deleteKey(t),e;if(F.isXML(e))e={_is_xml:!0,xml:F.encode(e)};else{if("function"==typeof e)return;e&&"object"==typeof e&&(e=y.parse(y.stringify(e)))}return x[t]=e,x.__jstorage_meta.CRC32[t]="2."+m(y.stringify(e),2538058380),this.setTTL(t,n.TTL||0),s(t,"updated"),e},get:function(t,e){return c(t),t in x?x[t]&&"object"==typeof x[t]&&x[t]._is_xml?F.decode(x[t].xml):x[t]:"undefined"==typeof e?null:e},deleteKey:function(t){return c(t),t in x?(delete x[t],"object"==typeof x.__jstorage_meta.TTL&&t in x.__jstorage_meta.TTL&&delete x.__jstorage_meta.TTL[t],delete x.__jstorage_meta.CRC32[t],l(),r(),s(t,"deleted"),!0):!1},setTTL:function(t,e){var n=+new Date;return c(t),e=Number(e)||0,t in x?(x.__jstorage_meta.TTL||(x.__jstorage_meta.TTL={}),e>0?x.__jstorage_meta.TTL[t]=n+e:delete x.__jstorage_meta.TTL[t],l(),h(),r(),!0):!1},getTTL:function(t){var e,n=+new Date;return c(t),t in x&&x.__jstorage_meta.TTL&&x.__jstorage_meta.TTL[t]?(e=x.__jstorage_meta.TTL[t]-n,e||0):0},flush:function(){return x={
5
- __jstorage_meta:{CRC32:{}}},l(),r(),s(null,"flushed"),!0},storageObj:function(){function t(){}return t.prototype=x,new t},index:function(){var t,e=[];for(t in x)x.hasOwnProperty(t)&&"__jstorage_meta"!=t&&e.push(t);return e},storageSize:function(){return k},currentBackend:function(){return _},storageAvailable:function(){return!!_},listenKeyChange:function(t,e){c(t),T[t]||(T[t]=[]),T[t].push(e)},stopListening:function(t,e){if(c(t),T[t]){if(!e)return void delete T[t];for(var n=T[t].length-1;n>=0;n--)T[t][n]==e&&T[t].splice(n,1)}},subscribe:function(t,e){if(t=(t||"").toString(),!t)throw new TypeError("Channel not defined");O[t]||(O[t]=[]),O[t].push(e)},publish:function(t,e){if(t=(t||"").toString(),!t)throw new TypeError("Channel not defined");f(t,e)},reInit:function(){e()},noConflict:function(t){return delete window.$.jStorage,t&&(window.jStorage=this),this}},t()}(),function(jQuery){var module,define;!function(t){"use strict";var e={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeek:["ن","ث","ع","خ","ج","س","ح"]},ro:{months:["ianuarie","februarie","martie","aprilie","mai","iunie","iulie","august","septembrie","octombrie","noiembrie","decembrie"],dayOfWeek:["l","ma","mi","j","v","s","d"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeek:["Sen","Sel","Rab","Kam","Jum","Sab","Min"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeek:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeek:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeek:["Вск","Пн","Вт","Ср","Чт","Пт","Сб"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeek:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeek:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeek:["So","Mo","Di","Mi","Do","Fr","Sa"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeek:["zo","ma","di","wo","do","vr","za"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeek:["Paz","Pts","Sal","Çar","Per","Cum","Cts"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeek:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeek:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeek:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeek:["nd","pn","wt","śr","cz","pt","sb"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeek:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeek:["Søn","Man","Tir","Ons","Tor","Fre","Lør"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["日","月","火","水","木","金","土"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeek:["CN","T2","T3","T4","T5","T6","T7"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeek:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeek:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeek:["Va","Hé","Ke","Sze","Cs","Pé","Szo"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeek:["B","Be","Ça","Ç","Ca","C","Ş"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeek:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeek:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeek:["P","E","T","K","N","R","L"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeek:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeek:["Su","Ma","Ti","Ke","To","Pe","La"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeek:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeek:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeek:["일","월","화","수","목","금","토"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeek:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeek:["Sv","Pr","Ot","Tr","Ct","Pk","St"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeek:["нед","пон","вто","сре","чет","пет","саб"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeek:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeek:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeek:["Ne","Po","Ut","St","Št","Pi","So"]},sq:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeek:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeek:["Ned","Pon","Uto","Sre","čet","Pet","Sub"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeek:["нед","пон","уто","сре","чет","пет","суб"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeek:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeek:["日","一","二","三","四","五","六"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeek:["א'","ב'","ג'","ד'","ה'","ו'","שבת"]}},value:"",lang:"en",format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],disabledDates:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0};Array.prototype.indexOf||(Array.prototype.indexOf=function(t,e){var n,i;for(n=e||0,i=this.length;i>n;n+=1)if(this[n]===t)return n;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},t.fn.xdsoftScroller=function(e){return this.each(function(){var n,i,o,s,r,a=t(this),l=function(t){var e,n={x:0,y:0};return"touchstart"===t.type||"touchmove"===t.type||"touchend"===t.type||"touchcancel"===t.type?(e=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0],n.x=e.clientX,n.y=e.clientY):"mousedown"!==t.type&&"mouseup"!==t.type&&"mousemove"!==t.type&&"mouseover"!==t.type&&"mouseout"!==t.type&&"mouseenter"!==t.type&&"mouseleave"!==t.type||(n.x=t.clientX,n.y=t.clientY),n},c=100,h=!1,u=0,d=0,p=0,f=!1,m=0,g=function(){};return"hide"===e?void a.find(".xdsoft_scrollbar").hide():(t(this).hasClass("xdsoft_scroller_box")||(n=a.children().eq(0),i=a[0].clientHeight,o=n[0].offsetHeight,s=t('<div class="xdsoft_scrollbar"></div>'),r=t('<div class="xdsoft_scroller"></div>'),s.append(r),a.addClass("xdsoft_scroller_box").append(s),g=function(t){var e=l(t).y-u+m;0>e&&(e=0),e+r[0].offsetHeight>p&&(e=p-r[0].offsetHeight),a.trigger("scroll_element.xdsoft_scroller",[c?e/c:0])},r.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(n){i||a.trigger("resize_scroll.xdsoft_scroller",[e]),u=l(n).y,m=parseInt(r.css("margin-top"),10),p=s[0].offsetHeight,"mousedown"===n.type?(document&&t(document.body).addClass("xdsoft_noselect"),t([document.body,window]).on("mouseup.xdsoft_scroller",function o(){t([document.body,window]).off("mouseup.xdsoft_scroller",o).off("mousemove.xdsoft_scroller",g).removeClass("xdsoft_noselect")}),t(document.body).on("mousemove.xdsoft_scroller",g)):(f=!0,n.stopPropagation(),n.preventDefault())}).on("touchmove",function(t){f&&(t.preventDefault(),g(t))}).on("touchend touchcancel",function(t){f=!1,m=0}),a.on("scroll_element.xdsoft_scroller",function(t,e){i||a.trigger("resize_scroll.xdsoft_scroller",[e,!0]),e=e>1?1:0>e||isNaN(e)?0:e,r.css("margin-top",c*e),setTimeout(function(){n.css("marginTop",-parseInt((n[0].offsetHeight-i)*e,10))},10)}).on("resize_scroll.xdsoft_scroller",function(t,e,l){var h,u;i=a[0].clientHeight,o=n[0].offsetHeight,h=i/o,u=h*s[0].offsetHeight,h>1?r.hide():(r.show(),r.css("height",parseInt(u>10?u:10,10)),c=s[0].offsetHeight-r[0].offsetHeight,l!==!0&&a.trigger("scroll_element.xdsoft_scroller",[e||Math.abs(parseInt(n.css("marginTop"),10))/(o-i)]))}),a.on("mousewheel",function(t){var e=Math.abs(parseInt(n.css("marginTop"),10));return e-=20*t.deltaY,0>e&&(e=0),a.trigger("scroll_element.xdsoft_scroller",[e/(o-i)]),t.stopPropagation(),!1}),a.on("touchstart",function(t){h=l(t),d=Math.abs(parseInt(n.css("marginTop"),10))}),a.on("touchmove",function(t){if(h){t.preventDefault();var e=l(t);a.trigger("scroll_element.xdsoft_scroller",[(d-(e.y-h.y))/(o-i)])}}),a.on("touchend touchcancel",function(t){h=!1,d=0})),void a.trigger("resize_scroll.xdsoft_scroller",[e]))})},t.fn.datetimepicker=function(n){var i,o,s=48,r=57,a=96,l=105,c=17,h=46,u=13,d=27,p=8,f=37,m=38,g=39,v=40,y=9,b=116,x=65,w=67,S=86,k=90,_=89,T=!1,C=t.isPlainObject(n)||!n?t.extend(!0,{},e,n):t.extend(!0,{},e),D=0,O=function(t){"undefined"==typeof C.i18n[C.lang]&&(C.lang="en"),t.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function e(n){t.is(":disabled")||t.data("xdsoft_datetimepicker")||(clearTimeout(D),D=setTimeout(function(){t.data("xdsoft_datetimepicker")||i(t),t.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",e).trigger("open.xdsoft")},100))})};return i=function(e){function i(){var t,n=!1;return C.startDate?n=j.strToDate(C.startDate):(n=C.value||(e&&e.val&&e.val()?e.val():""),n?n=j.strToDateTime(n):C.defaultDate&&(n=j.strToDate(C.defaultDate),C.defaultTime&&(t=j.strtotime(C.defaultTime),n.setHours(t.getHours()),n.setMinutes(t.getMinutes())))),n&&j.isValidDate(n)?N.data("changed",!0):n="",n||0}var o,D,O,M,F,j,N=t("<div "+(C.id?'id="'+C.id+'"':"")+" "+(C.style?'style="'+C.style+'"':"")+' class="xdsoft_datetimepicker xdsoft_'+C.theme+" xdsoft_noselect "+(C.weeks?" xdsoft_showweeks":"")+C.className+'"></div>'),A=t('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),P=t('<div class="xdsoft_datepicker active"></div>'),E=t('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),I=t('<div class="xdsoft_calendar"></div>'),z=t('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),H=z.find(".xdsoft_time_box").eq(0),R=t('<div class="xdsoft_time_variant"></div>'),L=t('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),$=t('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),J=!1,B=0,W=0;E.find(".xdsoft_month span").after(L),E.find(".xdsoft_year span").after($),E.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(e){var n,i,o=t(this).find(".xdsoft_select").eq(0),s=0,r=0,a=o.is(":visible");for(E.find(".xdsoft_select").hide(),j.currentTime&&(s=j.currentTime[t(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),o[a?"hide":"show"](),n=o.find("div.xdsoft_option"),i=0;i<n.length&&n.eq(i).data("value")!==s;i+=1)r+=n[0].offsetHeight;return o.xdsoftScroller(r/(o.children()[0].offsetHeight-o[0].clientHeight)),e.stopPropagation(),!1}),E.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(t){t.stopPropagation(),t.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(e){var n=j.currentTime.getFullYear();j&&j.currentTime&&j.currentTime[t(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](t(this).data("value")),t(this).parent().parent().hide(),N.trigger("xchange.xdsoft"),C.onChangeMonth&&t.isFunction(C.onChangeMonth)&&C.onChangeMonth.call(N,j.currentTime,N.data("input")),n!==j.currentTime.getFullYear()&&t.isFunction(C.onChangeYear)&&C.onChangeYear.call(N,j.currentTime,N.data("input"))}),N.setOptions=function(n){if(C=t.extend(!0,{},C,n),n.allowTimes&&t.isArray(n.allowTimes)&&n.allowTimes.length&&(C.allowTimes=t.extend(!0,[],n.allowTimes)),n.weekends&&t.isArray(n.weekends)&&n.weekends.length&&(C.weekends=t.extend(!0,[],n.weekends)),n.disabledDates&&t.isArray(n.disabledDates)&&n.disabledDates.length&&(C.disabledDates=t.extend(!0,[],n.disabledDates)),!C.open&&!C.opened||C.inline||e.trigger("open.xdsoft"),C.inline&&(J=!0,N.addClass("xdsoft_inline"),e.after(N).hide()),C.inverseButton&&(C.next="xdsoft_prev",C.prev="xdsoft_next"),C.datepicker?P.addClass("active"):P.removeClass("active"),C.timepicker?z.addClass("active"):z.removeClass("active"),C.value&&(e&&e.val&&e.val(C.value),j.setCurrentTime(C.value)),isNaN(C.dayOfWeekStart)?C.dayOfWeekStart=0:C.dayOfWeekStart=parseInt(C.dayOfWeekStart,10)%7,C.timepickerScrollbar||H.xdsoftScroller("hide"),C.minDate&&/^-(.*)$/.test(C.minDate)&&(C.minDate=j.strToDateTime(C.minDate).dateFormat(C.formatDate)),C.maxDate&&/^\+(.*)$/.test(C.maxDate)&&(C.maxDate=j.strToDateTime(C.maxDate).dateFormat(C.formatDate)),E.find(".xdsoft_today_button").css("visibility",C.todayButton?"visible":"hidden"),C.mask){var i=function(t){try{if(document.selection&&document.selection.createRange){var e=document.selection.createRange();return e.getBookmark().charCodeAt(2)-2}if(t.setSelectionRange)return t.selectionStart}catch(n){return 0}},o=function(t,e){if(t="string"==typeof t||t instanceof String?document.getElementById(t):t,!t)return!1;if(t.createTextRange){var n=t.createTextRange();return n.collapse(!0),n.moveEnd("character",e),n.moveStart("character",e),n.select(),!0}return t.setSelectionRange?(t.setSelectionRange(e,e),!0):!1},D=function(t,e){var n=t.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(n).test(e)};e.off("keydown.xdsoft"),C.mask===!0&&(C.mask=C.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===t.type(C.mask)&&(D(C.mask,e.val())||e.val(C.mask.replace(/[0-9]/g,"_")),e.on("keydown.xdsoft",function(n){var O,M,F=this.value,j=n.which;if(j>=s&&r>=j||j>=a&&l>=j||j===p||j===h){for(O=i(this),M=j!==p&&j!==h?String.fromCharCode(j>=a&&l>=j?j-s:j):"_",j!==p&&j!==h||!O||(O-=1,M="_");/[^0-9_]/.test(C.mask.substr(O,1))&&O<C.mask.length&&O>0;)O+=j===p||j===h?-1:1;if(F=F.substr(0,O)+M+F.substr(O+1),""===t.trim(F))F=C.mask.replace(/[0-9]/g,"_");else if(O===C.mask.length)return n.preventDefault(),!1;for(O+=j===p||j===h?0:1;/[^0-9_]/.test(C.mask.substr(O,1))&&O<C.mask.length&&O>0;)O+=j===p||j===h?-1:1;D(C.mask,F)?(this.value=F,o(this,O)):""===t.trim(F)?this.value=C.mask.replace(/[0-9]/g,"_"):e.trigger("error_input.xdsoft")}else if(-1!==[x,w,S,k,_].indexOf(j)&&T||-1!==[d,m,v,f,g,b,c,y,u].indexOf(j))return!0;return n.preventDefault(),!1}))}C.validateOnBlur&&e.off("blur.xdsoft").on("blur.xdsoft",function(){C.allowBlank&&!t.trim(t(this).val()).length?(t(this).val(null),N.data("xdsoft_datetime").empty()):Date.parseDate(t(this).val(),C.format)?N.data("xdsoft_datetime").setCurrentTime(t(this).val()):(t(this).val(j.now().dateFormat(C.format)),N.data("xdsoft_datetime").setCurrentTime(t(this).val())),N.trigger("changedatetime.xdsoft")}),C.dayOfWeekStartPrev=0===C.dayOfWeekStart?6:C.dayOfWeekStart-1,N.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},N.data("options",C).on("mousedown.xdsoft",function(t){return t.stopPropagation(),t.preventDefault(),$.hide(),L.hide(),!1}),H.append(R),H.xdsoftScroller(),N.on("afterOpen.xdsoft",function(){H.xdsoftScroller()}),N.append(P).append(z),C.withoutCopyright!==!0&&N.append(A),P.append(E).append(I),t(C.parentID).append(N),o=function(){var e=this;e.now=function(t){var n,i,o=new Date;return!t&&C.defaultDate&&(n=e.strToDate(C.defaultDate),o.setFullYear(n.getFullYear()),o.setMonth(n.getMonth()),o.setDate(n.getDate())),C.yearOffset&&o.setFullYear(o.getFullYear()+C.yearOffset),!t&&C.defaultTime&&(i=e.strtotime(C.defaultTime),o.setHours(i.getHours()),o.setMinutes(i.getMinutes())),o},e.isValidDate=function(t){return"[object Date]"!==Object.prototype.toString.call(t)?!1:!isNaN(t.getTime())},e.setCurrentTime=function(t){e.currentTime="string"==typeof t?e.strToDateTime(t):e.isValidDate(t)?t:e.now(),N.trigger("xchange.xdsoft")},e.empty=function(){e.currentTime=null},e.getCurrentTime=function(t){return e.currentTime},e.nextMonth=function(){var n,i=e.currentTime.getMonth()+1;return 12===i&&(e.currentTime.setFullYear(e.currentTime.getFullYear()+1),i=0),n=e.currentTime.getFullYear(),e.currentTime.setDate(Math.min(new Date(e.currentTime.getFullYear(),i+1,0).getDate(),e.currentTime.getDate())),e.currentTime.setMonth(i),C.onChangeMonth&&t.isFunction(C.onChangeMonth)&&C.onChangeMonth.call(N,j.currentTime,N.data("input")),n!==e.currentTime.getFullYear()&&t.isFunction(C.onChangeYear)&&C.onChangeYear.call(N,j.currentTime,N.data("input")),N.trigger("xchange.xdsoft"),i},e.prevMonth=function(){var n=e.currentTime.getMonth()-1;return-1===n&&(e.currentTime.setFullYear(e.currentTime.getFullYear()-1),n=11),e.currentTime.setDate(Math.min(new Date(e.currentTime.getFullYear(),n+1,0).getDate(),e.currentTime.getDate())),e.currentTime.setMonth(n),C.onChangeMonth&&t.isFunction(C.onChangeMonth)&&C.onChangeMonth.call(N,j.currentTime,N.data("input")),N.trigger("xchange.xdsoft"),n},e.getWeekOfYear=function(t){var e=new Date(t.getFullYear(),0,1);return Math.ceil(((t-e)/864e5+e.getDay()+1)/7)},e.strToDateTime=function(t){var n,i,o=[];return t&&t instanceof Date&&e.isValidDate(t)?t:(o=/^(\+|\-)(.*)$/.exec(t),o&&(o[2]=Date.parseDate(o[2],C.formatDate)),o&&o[2]?(n=o[2].getTime()-6e4*o[2].getTimezoneOffset(),i=new Date(j.now().getTime()+parseInt(o[1]+"1",10)*n)):i=t?Date.parseDate(t,C.format):e.now(),e.isValidDate(i)||(i=e.now()),i)},e.strToDate=function(t){if(t&&t instanceof Date&&e.isValidDate(t))return t;var n=t?Date.parseDate(t,C.formatDate):e.now(!0);return e.isValidDate(n)||(n=e.now(!0)),n},e.strtotime=function(t){if(t&&t instanceof Date&&e.isValidDate(t))return t;var n=t?Date.parseDate(t,C.formatTime):e.now(!0);return e.isValidDate(n)||(n=e.now(!0)),n},e.str=function(){return e.currentTime.dateFormat(C.format)},e.currentTime=this.now()},j=new o,E.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){N.data("changed",!0),j.setCurrentTime(0),N.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){e.val(j.str()),N.trigger("close.xdsoft")}),E.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var e=t(this),n=0,i=!1;!function o(t){j.currentTime.getMonth();e.hasClass(C.next)?j.nextMonth():e.hasClass(C.prev)&&j.prevMonth(),C.monthChangeSpinner&&(i||(n=setTimeout(o,t||100)))}(500),t([document.body,window]).on("mouseup.xdsoft",function s(){clearTimeout(n),i=!0,t([document.body,window]).off("mouseup.xdsoft",s)})}),z.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var e=t(this),n=0,i=!1,o=110;!function s(t){var r=H[0].clientHeight,a=R[0].offsetHeight,l=Math.abs(parseInt(R.css("marginTop"),10));e.hasClass(C.next)&&a-r-C.timeHeightInTimePicker>=l?R.css("marginTop","-"+(l+C.timeHeightInTimePicker)+"px"):e.hasClass(C.prev)&&l-C.timeHeightInTimePicker>=0&&R.css("marginTop","-"+(l-C.timeHeightInTimePicker)+"px"),H.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(R.css("marginTop"),10)/(a-r))]),o=o>10?10:o-10,i||(n=setTimeout(s,t||o))}(500),t([document.body,window]).on("mouseup.xdsoft",function r(){clearTimeout(n),i=!0,t([document.body,window]).off("mouseup.xdsoft",r)})}),D=0,N.on("xchange.xdsoft",function(e){clearTimeout(D),D=setTimeout(function(){for(var e,i,o,s,r,a,l,c="",h=new Date(j.currentTime.getFullYear(),j.currentTime.getMonth(),1,12,0,0),u=0,d=j.now(),p=!1,f=!1,m=[],g=!0,v="",y="";h.getDay()!==C.dayOfWeekStart;)h.setDate(h.getDate()-1);for(c+="<table><thead><tr>",C.weeks&&(c+="<th></th>"),e=0;7>e;e+=1)c+="<th>"+C.i18n[C.lang].dayOfWeek[(e+C.dayOfWeekStart)%7]+"</th>";for(c+="</tr></thead>",c+="<tbody>",C.maxDate!==!1&&(p=j.strToDate(C.maxDate),p=new Date(p.getFullYear(),p.getMonth(),p.getDate(),23,59,59,999)),C.minDate!==!1&&(f=j.strToDate(C.minDate),f=new Date(f.getFullYear(),f.getMonth(),f.getDate()));u<j.currentTime.countDaysInMonth()||h.getDay()!==C.dayOfWeekStart||j.currentTime.getMonth()===h.getMonth();)m=[],u+=1,i=h.getDate(),o=h.getFullYear(),s=h.getMonth(),r=j.getWeekOfYear(h),m.push("xdsoft_date"),a=C.beforeShowDay&&t.isFunction(C.beforeShowDay.call)?C.beforeShowDay.call(N,h):null,p!==!1&&h>p||f!==!1&&f>h||a&&a[0]===!1?m.push("xdsoft_disabled"):-1!==C.disabledDates.indexOf(h.dateFormat(C.formatDate))&&m.push("xdsoft_disabled"),a&&""!==a[1]&&m.push(a[1]),j.currentTime.getMonth()!==s&&m.push("xdsoft_other_month"),(C.defaultSelect||N.data("changed"))&&j.currentTime.dateFormat(C.formatDate)===h.dateFormat(C.formatDate)&&m.push("xdsoft_current"),d.dateFormat(C.formatDate)===h.dateFormat(C.formatDate)&&m.push("xdsoft_today"),(0===h.getDay()||6===h.getDay()||~C.weekends.indexOf(h.dateFormat(C.formatDate)))&&m.push("xdsoft_weekend"),C.beforeShowDay&&t.isFunction(C.beforeShowDay)&&m.push(C.beforeShowDay(h)),g&&(c+="<tr>",g=!1,C.weeks&&(c+="<th>"+r+"</th>")),c+='<td data-date="'+i+'" data-month="'+s+'" data-year="'+o+'" class="xdsoft_date xdsoft_day_of_week'+h.getDay()+" "+m.join(" ")+'"><div>'+i+"</div></td>",h.getDay()===C.dayOfWeekStartPrev&&(c+="</tr>",g=!0),h.setDate(i+1);if(c+="</tbody></table>",I.html(c),E.find(".xdsoft_label span").eq(0).text(C.i18n[C.lang].months[j.currentTime.getMonth()]),E.find(".xdsoft_label span").eq(1).text(j.currentTime.getFullYear()),v="",y="",s="",l=function(t,e){var n=j.now();n.setHours(t),t=parseInt(n.getHours(),10),n.setMinutes(e),e=parseInt(n.getMinutes(),10);var i=new Date(j.currentTime);i.setHours(t),i.setMinutes(e),m=[],(C.minDateTime!==!1&&C.minDateTime>i||C.maxTime!==!1&&j.strtotime(C.maxTime).getTime()<n.getTime()||C.minTime!==!1&&j.strtotime(C.minTime).getTime()>n.getTime())&&m.push("xdsoft_disabled"),(C.initTime||C.defaultSelect||N.data("changed"))&&parseInt(j.currentTime.getHours(),10)===parseInt(t,10)&&(C.step>59||Math[C.roundTime](j.currentTime.getMinutes()/C.step)*C.step===parseInt(e,10))&&(C.defaultSelect||N.data("changed")?m.push("xdsoft_current"):C.initTime&&m.push("xdsoft_init_time")),parseInt(d.getHours(),10)===parseInt(t,10)&&parseInt(d.getMinutes(),10)===parseInt(e,10)&&m.push("xdsoft_today"),v+='<div class="xdsoft_time '+m.join(" ")+'" data-hour="'+t+'" data-minute="'+e+'">'+n.dateFormat(C.formatTime)+"</div>"},C.allowTimes&&t.isArray(C.allowTimes)&&C.allowTimes.length)for(u=0;u<C.allowTimes.length;u+=1)y=j.strtotime(C.allowTimes[u]).getHours(),s=j.strtotime(C.allowTimes[u]).getMinutes(),l(y,s);else for(u=0,e=0;u<(C.hours12?12:24);u+=1)for(e=0;60>e;e+=C.step)y=(10>u?"0":"")+u,s=(10>e?"0":"")+e,l(y,s);for(R.html(v),n="",u=0,u=parseInt(C.yearStart,10)+C.yearOffset;u<=parseInt(C.yearEnd,10)+C.yearOffset;u+=1)n+='<div class="xdsoft_option '+(j.currentTime.getFullYear()===u?"xdsoft_current":"")+'" data-value="'+u+'">'+u+"</div>";for($.children().eq(0).html(n),u=0,n="";11>=u;u+=1)n+='<div class="xdsoft_option '+(j.currentTime.getMonth()===u?"xdsoft_current":"")+'" data-value="'+u+'">'+C.i18n[C.lang].months[u]+"</div>";L.children().eq(0).html(n),t(N).trigger("generate.xdsoft")},10),e.stopPropagation()}).on("afterOpen.xdsoft",function(){if(C.timepicker){var t,e,n,i;R.find(".xdsoft_current").length?t=".xdsoft_current":R.find(".xdsoft_init_time").length&&(t=".xdsoft_init_time"),t?(e=H[0].clientHeight,n=R[0].offsetHeight,i=R.find(t).index()*C.timeHeightInTimePicker+1,i>n-e&&(i=n-e),H.trigger("scroll_element.xdsoft_scroller",[parseInt(i,10)/(n-e)])):H.trigger("scroll_element.xdsoft_scroller",[0])}}),O=0,I.on("click.xdsoft","td",function(n){n.stopPropagation(),O+=1;var i=t(this),o=j.currentTime;return void 0!==o&&null!==o||(j.currentTime=j.now(),o=j.currentTime),i.hasClass("xdsoft_disabled")?!1:(o.setDate(1),o.setFullYear(i.data("year")),o.setMonth(i.data("month")),o.setDate(i.data("date")),N.trigger("select.xdsoft",[o]),e.val(j.str()),(O>1||C.closeOnDateSelect===!0||0===C.closeOnDateSelect&&!C.timepicker)&&!C.inline&&N.trigger("close.xdsoft"),C.onSelectDate&&t.isFunction(C.onSelectDate)&&C.onSelectDate.call(N,j.currentTime,N.data("input"),n),N.data("changed",!0),N.trigger("xchange.xdsoft"),N.trigger("changedatetime.xdsoft"),void setTimeout(function(){O=0},200))}),R.on("click.xdsoft","div",function(e){e.stopPropagation();var n=t(this),i=j.currentTime;return void 0!==i&&null!==i||(j.currentTime=j.now(),i=j.currentTime),n.hasClass("xdsoft_disabled")?!1:(i.setHours(n.data("hour")),i.setMinutes(n.data("minute")),N.trigger("select.xdsoft",[i]),N.data("input").val(j.str()),C.inline||N.trigger("close.xdsoft"),C.onSelectTime&&t.isFunction(C.onSelectTime)&&C.onSelectTime.call(N,j.currentTime,N.data("input"),e),N.data("changed",!0),N.trigger("xchange.xdsoft"),void N.trigger("changedatetime.xdsoft"))}),P.on("mousewheel.xdsoft",function(t){return C.scrollMonth?(t.deltaY<0?j.nextMonth():j.prevMonth(),!1):!0}),e.on("mousewheel.xdsoft",function(t){return C.scrollInput?!C.datepicker&&C.timepicker?(M=R.find(".xdsoft_current").length?R.find(".xdsoft_current").eq(0).index():0,M+t.deltaY>=0&&M+t.deltaY<R.children().length&&(M+=t.deltaY),R.children().eq(M).length&&R.children().eq(M).trigger("mousedown"),!1):C.datepicker&&!C.timepicker?(P.trigger(t,[t.deltaY,t.deltaX,t.deltaY]),e.val&&e.val(j.str()),N.trigger("changedatetime.xdsoft"),!1):void 0:!0}),N.on("changedatetime.xdsoft",function(e){if(C.onChangeDateTime&&t.isFunction(C.onChangeDateTime)){var n=N.data("input");C.onChangeDateTime.call(N,j.currentTime,n,e),delete C.value,n.trigger("change")}}).on("generate.xdsoft",function(){C.onGenerate&&t.isFunction(C.onGenerate)&&C.onGenerate.call(N,j.currentTime,N.data("input")),J&&(N.trigger("afterOpen.xdsoft"),J=!1)}).on("click.xdsoft",function(t){t.stopPropagation()}),M=0,F=function(){var e=N.data("input").offset(),n=e.top+N.data("input")[0].offsetHeight-1,i=e.left,o="absolute";C.fixed?(n-=t(window).scrollTop(),i-=t(window).scrollLeft(),o="fixed"):(n+N[0].offsetHeight>t(window).height()+t(window).scrollTop()&&(n=e.top-N[0].offsetHeight+1),0>n&&(n=0),i+N[0].offsetWidth>t(window).width()&&(i=t(window).width()-N[0].offsetWidth)),N.css({left:i,top:n,position:o})},N.on("open.xdsoft",function(e){var n=!0;C.onShow&&t.isFunction(C.onShow)&&(n=C.onShow.call(N,j.currentTime,N.data("input"),e)),n!==!1&&(N.show(),F(),t(window).off("resize.xdsoft",F).on("resize.xdsoft",F),C.closeOnWithoutClick&&t([document.body,window]).on("mousedown.xdsoft",function i(){N.trigger("close.xdsoft"),t([document.body,window]).off("mousedown.xdsoft",i)}))}).on("close.xdsoft",function(e){var n=!0;E.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),C.onClose&&t.isFunction(C.onClose)&&(n=C.onClose.call(N,j.currentTime,N.data("input"),e)),n===!1||C.opened||C.inline||N.hide(),e.stopPropagation()}).on("toggle.xdsoft",function(t){N.is(":visible")?N.trigger("close.xdsoft"):N.trigger("open.xdsoft");
1
  function n2Context(){this.window=["main"],this.mouseDownArea=!1,this.timeout=null,this.isPreventDblClick=!1,this.dblClickTimeout=null}"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(t){return 10>t?"0"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var n,i,o,s,r,a=gap,l=e[t];switch(l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(t)),"function"==typeof rep&&(l=rep.call(e,t,l)),typeof l){case"string":return quote(l);case"number":return isFinite(l)?String(l):"null";case"boolean":case"null":return String(l);case"object":if(!l)return"null";if(gap+=indent,r=[],"[object Array]"===Object.prototype.toString.apply(l)){for(s=l.length,n=0;s>n;n+=1)r[n]=str(n,l)||"null";return o=0===r.length?"[]":gap?"[\n"+gap+r.join(",\n"+gap)+"\n"+a+"]":"["+r.join(",")+"]",gap=a,o}if(rep&&"object"==typeof rep)for(s=rep.length,n=0;s>n;n+=1)"string"==typeof rep[n]&&(i=rep[n],o=str(i,l),o&&r.push(quote(i)+(gap?": ":":")+o));else for(i in l)Object.prototype.hasOwnProperty.call(l,i)&&(o=str(i,l),o&&r.push(quote(i)+(gap?": ":":")+o));return o=0===r.length?"{}":gap?"{\n"+gap+r.join(",\n"+gap)+"\n"+a+"}":"{"+r.join(",")+"}",gap=a,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(t){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,n){var i;if(gap="",indent="","number"==typeof n)for(i=0;n>i;i+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var n,i,o=t[e];if(o&&"object"==typeof o)for(n in o)Object.prototype.hasOwnProperty.call(o,n)&&(i=walk(o,n),void 0!==i?o[n]=i:delete o[n]);return reviver.call(t,e,o)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),n2.extend(window.nextend,{fontManager:null,styleManager:null,notificationCenter:null,animationManager:null,browse:null,askToSave:!0,cancel:function(t){return nextend.askToSave=!1,window.location.href=t,!1}}),n2Context.prototype.addWindow=function(t){this.window.push(t)},n2Context.prototype.removeWindow=function(){this.window.pop()},n2Context.prototype.getCurrentWindow=function(){return this.window[this.window.length-1]},n2Context.prototype.setMouseDownArea=function(t,e){this.mouseDownArea=t,this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(n2.proxy(function(){this.timeout=null,this.mouseDownArea=!1},this),50)},n2Context.prototype.preventDblClick=function(){this.isPreventDblClick=!0,this.dblClickTimeout&&clearTimeout(this.dblClickTimeout),this.dblClickTimeout=setTimeout(n2.proxy(function(){this.dblClickTimeout=null,this.isPreventDblClick=!1},this),200)},window.nextend.context=new n2Context,window.n2_=function(t){return"undefined"!=typeof nextend.localization[t]?nextend.localization[t]:t},window.n2_printf=function(t){var e=arguments,n=1;return t.replace(/%s/g,function(){return e[n++]})},window.nextendtime=n2.now(),window.nextend.roundTo=5,window.nextend.roundHelper=function(t){return window.nextend.roundTo<=1?t:Math.round(t/window.nextend.roundTo)*window.nextend.roundTo},function(t){function e(){s={left:"right",right:"left"}}function n(){s={left:"left",right:"right"}}function i(e,n){var i=0;return i=n==s.right?t(window).width()-(e.offset().left+e.outerWidth()):e.offset().left,0>i?0:i}var o=[],s={left:"left",right:"right"};t("html").on("changedir",function(i,r){for(var a=0;a<o.length;a++)o[a][0].css(s[o[a][2]],"auto");"rtl"===r?e():n(),t(document).trigger("scroll")});var r=0;nextend.ready(function(){var e=t("#wpadminbar, .navbar-fixed-top").height();e&&(r+=e),t(document).trigger("scroll")}),t(document).on("scroll",function(){for(var e=t(document).scrollTop()+r,n=0;n<o.length;n++)o[n][1]>e?o[n][0].removeClass("n2-static"):(o[n][0].addClass("n2-static"),o[n][0].css(s[o[n][2]],o[n][3]))}),t(window).on("resize",function(){for(var e=0;e<o.length;e++)o[e][1]=o[e][0].parent().offset().top,o[e][3]=i(o[e][0].parent(),o[e][2]);t(document).trigger("scroll")}),t.fn.staticonscroll=function(e){this.each(function(){var n=t(this);o.push([n,n.parent().offset().top,e,i(n.parent(),e)])}),t(document).trigger("scroll")}}(n2),function(t){var e={query:{}},n=null;e.addAjaxLoader=function(){n=t('<div class="n2-loader-overlay"><div class="n2-loader"></div></div>').appendTo("body")},e.addAjaxArray=function(t){for(var n in t)e.query[n]=t[n]},e.makeAjaxQuery=function(t,n){n&&(t.mode="ajax",t.nextendajax="1");for(var i in e.query)t[i]=e.query[i];return N2QueryString.stringify(t)},e.makeAjaxUrl=function(t,n){var i=t.split("?");i.length<2&&(i[1]="");var o=N2QueryString.parse(i[1]);if("undefined"!=typeof n)for(var s in n)o[s]=n[s];return i[0]+"?"+e.makeAjaxQuery(o,!0)},e.makeFallbackUrl=function(t,n){var i=t.split("?");i.length<2&&(i[1]="");var o=N2QueryString.parse(i[1]);if("undefined"!=typeof n)for(var s in n)o[s]=n[s];return i[0]+"?"+e.makeAjaxQuery(o,!1)},e.ajax=function(n){return e.startLoading(),t.ajax(n).always(function(t,n){e.stopLoading();try{if("success"!=n?t=JSON.parse(t.responseText):"string"==typeof t&&(t=JSON.parse(t)),"undefined"!=typeof t.redirect)return e.startLoading(),void(window.location.href=t.redirect);e.notification(t)}catch(i){var o=/<body[^>]*>((.|[\n\r])*)<\/body>/im,s=o.exec(t.responseText);s.length?NextendModalSafeHTML(t.status,s[1]):console.error(t.responseText,t)}})},e.notification=function(t){if("undefined"!=typeof t.notification&&t.notification)for(var e in t.notification)for(var n=0;n<t.notification[e].length;n++)nextend.notificationCenter[e](t.notification[e][n][0],t.notification[e][n][1])},e.getJSON=function(n){return e.startLoading(),t.getJSON(n).always(function(){e.stopLoading()})},e.startLoading=function(){n.addClass("n2-active")},e.stopLoading=function(){n.removeClass("n2-active")},window.NextendAjaxHelper=e,nextend.ready(function(){e.addAjaxLoader()})}(n2),function(t,e){function n(e,n,i,o){this.$node=e.data("pane",this),this.headings=n,this.contents=i,this.tabNames=[],this.headings.each(t.proxy(function(e,n){this.tabNames.push(t(n).data("tab"))},this)),this.identifier=o,this._active=n.index(n.filter(".n2-active"));for(var s=0;s<n.length;s++)n.eq(s).on("click",t.proxy(this.switchToPane,this,s));if(o){var r=t.jStorage.get(this.identifier+"-pane",-1);if(-1!=r)return void this.switchToPane(r)}this.hideAndShow()}function i(e,n,i){this.headings=e,this.contents=n,this.identifier=i;for(var o=0;o<e.length;o++)e.eq(o).on("click",t.proxy(this.scrollToPane,this,o))}n.prototype.switchToPane=function(t,e){e&&e.preventDefault(),this.headings.eq(this._active).removeClass("n2-active"),this.headings.eq(t).addClass("n2-active"),this._active=t,this.hideAndShow(),this.store(this._active),this.$node.triggerHandler("changetab")},n.prototype.hideAndShow=function(){t(this.contents[this._active]).css("display","block").trigger("activate");for(var e=0;e<this.contents.length;e++)e!=this._active&&t(this.contents[e]).css("display","none")},n.prototype.store=function(e){this.identifier&&t.jStorage.set(this.identifier+"-pane",e)},n.prototype.showTabs=function(e){for(var n=!1,i=0;i<this.tabNames.length;i++)"-1"!=t.inArray(this.tabNames[i],e)?(this.headings.eq(i).css("display",""),t(this.contents[i]).css("display",""),i==this._active?n=i:n===!1&&(n=i)):(this.headings.eq(i).css("display","none"),t(this.contents[i]).css("display","none"));this.switchToPane(n)},e.NextendHeadingPane=n,i.prototype.scrollToPane=function(e,n){n&&n.preventDefault(),t("html, body").animate({scrollTop:this.contents[e].offset().top-t(".n2-main-top-bar").height()-t("#wpadminbar, .navbar-fixed-top").height()-10},1e3)},e.NextendHeadingScrollToPane=i}(n2,window),function(t,e){var n=[],i=t(document),o=!1;e.NextendEsc={_listen:function(){o||(i.on("keydown.n2-esc",function(i){if(27==i.keyCode||8==i.keyCode)if(t(i.target).is("input, textarea"))27==i.keyCode&&(i.preventDefault(),t(i.target).blur());else{i.preventDefault();var o=n[n.length-1]();o&&e.NextendEsc.pop()}}),o=!0)},_stopListen:function(){i.off("keydown.n2-esc"),o=!1},add:function(t){n.push(t),e.NextendEsc._listen()},pop:function(){n.pop(),0===n.length&&e.NextendEsc._stopListen()}}}(n2,window),function(t,e){t.fn.n2opener=function(){return this.each(function(){var e=t(this).on("click",function(t){e.toggleClass("n2-active")});e.siblings("span").on("click",function(t){e.toggleClass("n2-active")}),e.parent().on("mouseleave",function(){e.removeClass("n2-active")}),e.find(".n2-button-menu").on("click",function(t){t.stopPropagation(),e.removeClass("n2-active")})})}}(n2,window),"undefined"!=typeof jQuery&&jQuery(document).on("wp-collapse-menu",function(){n2(window).trigger("resize")}),nextend.deepDiff=function(){return{map:function(t,e){if(this.isValue(t))return"undefined"!=typeof t&&t!=e?t:void 0;for(var n in e)this.isFunction(e[n])||(t[n]=this.map(t[n],e[n]),(void 0===t[n]||n2.isPlainObject(t[n])&&n2.isEmptyObject(t[n])||this.isArray(t[n])&&0==t[n].length)&&delete t[n]);return t},isFunction:function(t){return"[object Function]"==={}.toString.apply(t)},isArray:function(t){return"[object Array]"==={}.toString.apply(t)},isObject:function(t){return"[object Object]"==={}.toString.apply(t)},isValue:function(t){return!this.isObject(t)&&!this.isArray(t)}}}(),function(t,e){function n(){this.$element=t('<div class="n2 n2-tooltip n2-radius-m"></div>'),this.timeout=null,this.$tipFor=null,t(window).ready(t.proxy(this.ready,this))}function i(){this.isVisible=!1,this.$body=t("body"),this.$element=t('<div class="n2 n2-tooltip n2-radius-m"></div>').appendTo(this.$body)}n.prototype.ready=function(){this.$element.appendTo("body"),this.add(t("body"))},n.prototype.add=function(e){e.find("[data-n2tip]").off(".n2hastip").on({"mouseenter.n2hastip":t.proxy(this.onEnter,this)})},n.prototype.addElement=function(e,n,i,o){e.data({n2tip:n,n2tipv:o,n2tiph:i}).off(".n2hastip").on({"mouseenter.n2hastip":t.proxy(this.onEnter,this)})},n.prototype.onEnter=function(e){this.timeout&&clearTimeout(this.timeout),this.$tipFor=t(e.currentTarget).on({"mousemove.n2tip":t.proxy(this.onMove,this),"mouseleave.n2tip":t.proxy(this.onLeave,this)}),this.onMove(e),this.timeout=setTimeout(t.proxy(function(){var t=this.$tipFor.data("n2tipv"),e=this.$tipFor.data("n2tiph");"undefined"==typeof t&&(t=10),"undefined"==typeof e&&(e=10),this.$element.css({margin:t+"px "+e+"px"}).html(this.$tipFor.data("n2tip")).addClass("n2-active")},this),500)},n.prototype.onMove=function(t){this.$element.css({left:t.pageX,top:t.pageY})},n.prototype.onLeave=function(t){this.timeout&&clearTimeout(this.timeout),this.$tipFor&&(this.$tipFor.off(".n2tip"),this.$tipFor=null,this.$element.removeClass("n2-active").css("margin",""))},i.prototype.show=function(e,n){this.isVisible?this.$element.html(e):(this.isVisible=!0,this.$body.on("mousemove.tooltipMouse",t.proxy(this.mouseMove,this)),this.mouseMove(n),this.$element.html(e).addClass("n2-active"))},i.prototype.mouseMove=function(t){this.$element.css({left:t.pageX+10,top:t.pageY+10})},i.prototype.hide=function(){this.$body.off("mousemove.tooltipMouse"),this.$element.removeClass("n2-active").html(""),this.isVisible=!1},nextend.tooltip=new n,t(window).ready(function(){nextend.tooltipMouse=new i})}(n2,window),nextend.UnicodeToHTMLEntity=function(t){function e(t,e){return((1023&t)<<10)+(1023&e)+65536}function n(t){for(var n,i=[],o=0;o<t.length;)n=t.charCodeAt(o),55296==(63488&n)?i.push(e(n,t.charCodeAt(++o))):i.push(n),++o;return"&#"+i+";"}try{for(var i,o=/(?:[\uD800-\uDBFF][\uDC00-\uDFFF])/g;i=o.exec(t);)t=t.substr(0,i.index)+n(t.substr(i.index,o.lastIndex-i.index))+t.substr(o.lastIndex)}catch(s){return console.error(s),t}return t},window.N2Color={hex2rgba:function(t){var e=parseInt(t,16);return[e>>24&255,e>>16&255,e>>8&255,(255&e)/255]},hex2rgbaCSS:function(t){return"RGBA("+N2Color.hex2rgba(t).join(",")+")"},hexdec:function(t){return t=(t+"").replace(/[^a-f0-9]/gi,""),parseInt(t,16)},hex2alpha:function(t){var e=parseInt(t,16);return((255&e)/255).toFixed(3)},colorizeSVG:function(t,e){var n=t.split("base64,");return 1==n.length?t:(n[1]=Base64.encode(Base64.decode(n[1]).replace('fill="#FFF"','fill="#'+e.substr(0,6)+'"').replace('opacity="1"','opacity="'+N2Color.hex2alpha(e)+'"')),n.join("base64,"))},colorToSVG:function(t){var e=parseInt(t,16);return[t.substr(0,6),(255&e)/255]}},function(){"use strict";var t={};t.parse=function(t){return"string"!=typeof t?{}:(t=t.trim().replace(/^(\?|#)/,""),t?t.trim().split("&").reduce(function(t,e){var n=e.replace(/\+/g," ").split("="),i=n[0],o=n[1];return i=decodeURIComponent(i),o=void 0===o?null:decodeURIComponent(o),t.hasOwnProperty(i)?Array.isArray(t[i])?t[i].push(o):t[i]=[t[i],o]:t[i]=o,t},{}):{})},t.stringify=function(t){return t?Object.keys(t).map(function(e){var n=t[e];return Array.isArray(n)?n.map(function(t){return encodeURIComponent(e)+"="+encodeURIComponent(t)}).join("&"):encodeURIComponent(e)+"="+encodeURIComponent(n)}).join("&"):""},window.N2QueryString=t}(),!function(t){function e(t){for(var e=enc="",n=end=0,i=0,o=t.length;o>i;i++){var s=t.charCodeAt(i);128>s?end++:(s>127&&2048>s?enc=String.fromCharCode(s>>6|192,63&s|128):enc=String.fromCharCode(s>>12|224,s>>6&63|128,63&s|128),end>n&&(e+=t.slice(n,end)),e+=enc,n=end=i+1)}return end>n&&(e+=t.slice(n,o)),e}function n(t){var e,n;if(t+="",g=!1,v=y=t.length,y>63){for(i(t.substring(0,64)),r(u),g=!0,e=128;y>=e;e+=64)i(t.substring(e-64,e)),a(u);t=t.substring(e-64),y=t.length}for(h[0]=0,h[1]=0,h[2]=0,h[3]=0,h[4]=0,h[5]=0,h[6]=0,h[7]=0,h[8]=0,h[9]=0,h[10]=0,h[11]=0,h[12]=0,h[13]=0,h[14]=0,h[15]=0,e=0;y>e;e++)n=e%4,0===n?h[e>>2]=t.charCodeAt(e):h[e>>2]|=t.charCodeAt(e)<<f[n];return h[e>>2]|=d[e%4],e>55?(g?a(h):(r(h),g=!0),a([0,0,0,0,0,0,0,0,0,0,0,0,0,0,v<<3,0])):(h[14]=v<<3,void(g?a(h):r(h)))}function i(t){for(var e=16;e--;){var n=e<<2;u[e]=t.charCodeAt(n)+(t.charCodeAt(n+1)<<8)+(t.charCodeAt(n+2)<<16)+(t.charCodeAt(n+3)<<24)}}function o(t,i,o){n(i?t:e(t));var s=m[0];return c[1]=p[15&s],c[0]=p[15&(s>>=4)],c[3]=p[15&(s>>=4)],c[2]=p[15&(s>>=4)],c[5]=p[15&(s>>=4)],c[4]=p[15&(s>>=4)],c[7]=p[15&(s>>=4)],c[6]=p[15&(s>>=4)],s=m[1],c[9]=p[15&s],c[8]=p[15&(s>>=4)],c[11]=p[15&(s>>=4)],c[10]=p[15&(s>>=4)],c[13]=p[15&(s>>=4)],c[12]=p[15&(s>>=4)],c[15]=p[15&(s>>=4)],c[14]=p[15&(s>>=4)],s=m[2],c[17]=p[15&s],c[16]=p[15&(s>>=4)],c[19]=p[15&(s>>=4)],c[18]=p[15&(s>>=4)],c[21]=p[15&(s>>=4)],c[20]=p[15&(s>>=4)],c[23]=p[15&(s>>=4)],c[22]=p[15&(s>>=4)],s=m[3],c[25]=p[15&s],c[24]=p[15&(s>>=4)],c[27]=p[15&(s>>=4)],c[26]=p[15&(s>>=4)],c[29]=p[15&(s>>=4)],c[28]=p[15&(s>>=4)],c[31]=p[15&(s>>=4)],c[30]=p[15&(s>>=4)],o?c:c.join("")}function s(t,e,n,i,o,s,r){return e+=t+i+r,(e<<o|e>>>s)+n<<0}function r(t){l(0,0,0,0,t),m[0]=b[0]+1732584193<<0,m[1]=b[1]-271733879<<0,m[2]=b[2]-1732584194<<0,m[3]=b[3]+271733878<<0}function a(t){l(m[0],m[1],m[2],m[3],t),m[0]=b[0]+m[0]<<0,m[1]=b[1]+m[1]<<0,m[2]=b[2]+m[2]<<0,m[3]=b[3]+m[3]<<0}function l(t,e,n,i,o){var r,a;g?(t=s((n^i)&e^i,t,e,o[0],7,25,-680876936),i=s((e^n)&t^n,i,t,o[1],12,20,-389564586),n=s((t^e)&i^e,n,i,o[2],17,15,606105819),e=s((i^t)&n^t,e,n,o[3],22,10,-1044525330)):(t=o[0]-680876937,t=(t<<7|t>>>25)-271733879<<0,i=o[1]-117830708+(2004318071&t^-1732584194),i=(i<<12|i>>>20)+t<<0,n=o[2]-1126478375+((-271733879^t)&i^-271733879),n=(n<<17|n>>>15)+i<<0,e=o[3]-1316259209+((i^t)&n^t),e=(e<<22|e>>>10)+n<<0),t=s((n^i)&e^i,t,e,o[4],7,25,-176418897),i=s((e^n)&t^n,i,t,o[5],12,20,1200080426),n=s((t^e)&i^e,n,i,o[6],17,15,-1473231341),e=s((i^t)&n^t,e,n,o[7],22,10,-45705983),t=s((n^i)&e^i,t,e,o[8],7,25,1770035416),i=s((e^n)&t^n,i,t,o[9],12,20,-1958414417),n=s((t^e)&i^e,n,i,o[10],17,15,-42063),e=s((i^t)&n^t,e,n,o[11],22,10,-1990404162),t=s((n^i)&e^i,t,e,o[12],7,25,1804603682),i=s((e^n)&t^n,i,t,o[13],12,20,-40341101),n=s((t^e)&i^e,n,i,o[14],17,15,-1502002290),e=s((i^t)&n^t,e,n,o[15],22,10,1236535329),t=s((e^n)&i^n,t,e,o[1],5,27,-165796510),i=s((t^e)&n^e,i,t,o[6],9,23,-1069501632),n=s((i^t)&e^t,n,i,o[11],14,18,643717713),e=s((n^i)&t^i,e,n,o[0],20,12,-373897302),t=s((e^n)&i^n,t,e,o[5],5,27,-701558691),i=s((t^e)&n^e,i,t,o[10],9,23,38016083),n=s((i^t)&e^t,n,i,o[15],14,18,-660478335),e=s((n^i)&t^i,e,n,o[4],20,12,-405537848),t=s((e^n)&i^n,t,e,o[9],5,27,568446438),i=s((t^e)&n^e,i,t,o[14],9,23,-1019803690),n=s((i^t)&e^t,n,i,o[3],14,18,-187363961),e=s((n^i)&t^i,e,n,o[8],20,12,1163531501),t=s((e^n)&i^n,t,e,o[13],5,27,-1444681467),i=s((t^e)&n^e,i,t,o[2],9,23,-51403784),n=s((i^t)&e^t,n,i,o[7],14,18,1735328473),e=s((n^i)&t^i,e,n,o[12],20,12,-1926607734),r=e^n,t=s(r^i,t,e,o[5],4,28,-378558),i=s(r^t,i,t,o[8],11,21,-2022574463),a=i^t,n=s(a^e,n,i,o[11],16,16,1839030562),e=s(a^n,e,n,o[14],23,9,-35309556),r=e^n,t=s(r^i,t,e,o[1],4,28,-1530992060),i=s(r^t,i,t,o[4],11,21,1272893353),a=i^t,n=s(a^e,n,i,o[7],16,16,-155497632),e=s(a^n,e,n,o[10],23,9,-1094730640),r=e^n,t=s(r^i,t,e,o[13],4,28,681279174),i=s(r^t,i,t,o[0],11,21,-358537222),a=i^t,n=s(a^e,n,i,o[3],16,16,-722521979),e=s(a^n,e,n,o[6],23,9,76029189),r=e^n,t=s(r^i,t,e,o[9],4,28,-640364487),i=s(r^t,i,t,o[12],11,21,-421815835),a=i^t,n=s(a^e,n,i,o[15],16,16,530742520),e=s(a^n,e,n,o[2],23,9,-995338651),t=s(n^(e|~i),t,e,o[0],6,26,-198630844),i=s(e^(t|~n),i,t,o[7],10,22,1126891415),n=s(t^(i|~e),n,i,o[14],15,17,-1416354905),e=s(i^(n|~t),e,n,o[5],21,11,-57434055),t=s(n^(e|~i),t,e,o[12],6,26,1700485571),i=s(e^(t|~n),i,t,o[3],10,22,-1894986606),n=s(t^(i|~e),n,i,o[10],15,17,-1051523),e=s(i^(n|~t),e,n,o[1],21,11,-2054922799),t=s(n^(e|~i),t,e,o[8],6,26,1873313359),i=s(e^(t|~n),i,t,o[15],10,22,-30611744),n=s(t^(i|~e),n,i,o[6],15,17,-1560198380),e=s(i^(n|~t),e,n,o[13],21,11,1309151649),t=s(n^(e|~i),t,e,o[4],6,26,-145523070),i=s(e^(t|~n),i,t,o[11],10,22,-1120210379),n=s(t^(i|~e),n,i,o[2],15,17,718787259),e=s(i^(n|~t),e,n,o[9],21,11,-343485551),b[0]=t,b[1]=e,b[2]=n,b[3]=i}var c=[],h=[],u=[],d=[],p="0123456789abcdef".split(""),f=[],m=[],g=!1,v=0,y=0,b=[];if(t.Int32Array)h=new Int32Array(16),u=new Int32Array(16),d=new Int32Array(4),f=new Int32Array(4),m=new Int32Array(4),b=new Int32Array(4);else{var x;for(x=0;16>x;x++)h[x]=u[x]=0;for(x=0;4>x;x++)d[x]=f[x]=m[x]=b[x]=0}d[0]=128,d[1]=32768,d[2]=8388608,d[3]=-2147483648,f[0]=0,f[1]=8,f[2]=16,f[3]=24,t.md5=t.md5||o}(window),function(t,e){function n(){this.style=""}n.prototype.add=function(t){var e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");e.appendChild(n),n.type="text/css",n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))},n.prototype.deleteRule=function(t){for(var e=t.toLowerCase(),n=e.replace(".","\\."),i=document.styleSheets.length-1;i>=0;i--)for(var o=this._getRulesArray(i),s=0;o&&s<o.length;s++)if(o[s].selectorText){var r=o[s].selectorText.toLowerCase();r!=e&&r!=n||(document.styleSheets[i].cssRules?document.styleSheets[i].deleteRule(s):document.styleSheets[i].removeRule(s))}return null},n.prototype._getRulesArray=function(t){var e=null;try{document.styleSheets[t].cssRules?e=document.styleSheets[t].cssRules:document.styleSheets[t].rules&&(e=document.styleSheets[t].rules)}catch(n){}return e},window.nextend.css=new n}(n2,window),function(t,e,n){function i(e,n,o,s){i.prototype.openLightbox=n,i.prototype.openMultipleLightbox=o,i.prototype.openFoldersLightbox=s,nextend.imageHelper=this,this.parameters=t.extend({siteKeywords:[],imageUrls:[],wordpressUrl:"",placeholderImage:"",placeholderRepeatedImage:"",protocolRelative:1},e)}i.prototype.protocolRelative=function(t){return this.parameters.protocolRelative?t.replace(/^http(s)?:\/\//,"//"):t},i.prototype.make=function(t){return this.dynamic(t)},i.prototype.dynamic=function(t){for(var e=this.parameters.imageUrls,n=this.parameters.siteKeywords,i=this.protocolRelative(t),o=0;o<n.length;o++)if(0===i.indexOf(e[o])){t=n[o]+i.slice(e[o].length);break}return t},i.prototype.fixed=function(t){for(var e=this.parameters.imageUrls,n=this.parameters.siteKeywords,i=0;i<n.length;i++)if(0===t.indexOf(n[i])){t=e[i]+t.slice(n[i].length);break}return t},i.prototype.openLightbox=function(t){},i.prototype.openMultipleLightbox=function(t){},i.prototype.openFoldersLightbox=function(t){},i.prototype.getPlaceholder=function(){return this.fixed(this.parameters.placeholderImage)},i.prototype.getRepeatedPlaceholder=function(){return this.fixed(this.parameters.placeholderRepeatedImage)},e.NextendImageHelper=i}(n2,window),function(t,e){function n(e,n,i){this.inited=!1,this.currentPane=null,this.customClass="",this.$=t(this),this.counter=r++,this.panes=e,n&&this.show(null,i)}function i(e,n){this.$=t(this),this.options=t.extend({"class":""},n),this.modal=t('<div class="n2-modal n2-modal-simple"/>').addClass(this.options["class"]).css({display:"none"}).appendTo("#n2-admin"),t('<i class="n2-i n2-i-a-deletes"/>').on("click",t.proxy(this.hide,this)).appendTo(this.modal),this.window=t('<div class="n2-modal-window"/>').on("click",function(t){t.stopPropagation()}).appendTo(this.modal),this.notificationStack=new NextendNotificationCenterStackModal(this.modal),this.content=t(e).appendTo(this.window)}function o(e,i,o){return t.jStorage.get("n2-delete-"+e,!1)?(o(),!0):(new n({zero:{size:[500,190],title:n2_("Delete"),back:!1,close:!0,content:"",controls:['<a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-grey n2-uc n2-h4">'+n2_("Cancel")+"</a>",'<div class="n2-button n2-button-with-actions n2-button-l n2-radius-s n2-button-red"><a href="#" class="n2-button-inner n2-uc n2-h4">'+n2_("Delete")+'</a><div class="n2-button-menu-open"><i class="n2-i n2-i-buttonarrow"></i><div class="n2-button-menu"><div class="n2-button-menu-inner n2-border-radius"><a href="#" class="n2-h4">'+n2_("Delete and never ask for confirmation again")+"</a></div></div></div></div>"],fn:{show:function(){this.createCenteredSubHeading(n2_("Are you sure you want to delete?")).appendTo(this.content),this.controls.find(".n2-button-grey").on("click",t.proxy(function(t){t.preventDefault(),this.hide(t)},this)),this.controls.find(".n2-button-red a").on("click",t.proxy(function(t){t.preventDefault(),o(),this.hide(t)},this)),this.controls.find(".n2-button-red .n2-button-menu-inner a").on("click",t.proxy(function(n){n.preventDefault(),t.jStorage.set("n2-delete-"+e,!0)},this)),this.controls.find(".n2-button-menu-open").n2opener()},destroy:function(){this.destroy()}}}},!0),!1)}function s(e,n,i){return o(n,i,function(){window.location.href=t(e).attr("href")}),!1}var r=0;n.prototype.setCustomClass=function(t){this.customClass=t},n.prototype.lateInit=function(){if(!this.inited){for(var e in this.panes)this.panes[e]=t.extend({customClass:"",fit:!1,fitX:!0,overflow:"hidden",size:!1,back:!1,close:!0,controlsClass:"",controls:[],fn:{}},this.panes[e]);var n=!1;this.modal=t('<div class="n2-modal '+this.customClass+'"/>').css("opacity",0).on("click",t.proxy(function(e){0==n&&(this.close.hasClass("n2-hidden")||0!=t(e.target).closest(".n2-notification-center-modal").length||this.hide(e)),n=!1},this)),this.window=t('<div class="n2-modal-window n2-border-radius"/>').on("click",function(t){n=!0}).appendTo(this.modal),this.notificationStack=new NextendNotificationCenterStackModal(this.modal);var i=t('<div class="n2-modal-title n2-content-box-title-bg"/>').appendTo(this.window);this.title=t('<div class="n2-h2 n2-ucf"/>').appendTo(i),this.back=t('<i class="n2-i n2-i-a-back"/>').on("click",t.proxy(this.goBackButton,this)).appendTo(i),this.close=t('<i class="n2-i n2-i-a-deletes"/>').on("click",t.proxy(this.hide,this)).appendTo(i),this.content=t('<div class="n2-modal-content"/>').appendTo(this.window),this.controls=t('<div class="n2-table n2-table-fixed n2-table-auto"/>'),t('<div class="n2-modal-controls"/>').append(this.controls).appendTo(this.window),this.inited=!0}},n.prototype.show=function(e,n){this.lateInit(),this.notificationStack.enableStack(),"undefined"!=typeof e&&e||(e="zero"),nextend.context.addWindow("modal"),NextendEsc.add(t.proxy(function(){return this.close.hasClass("n2-hidden")?!1:(this.hide("esc"),!0)},this)),this.loadPane(e,!1,!0,n),NextendTween.fromTo(this.modal,.3,{opacity:0},{opacity:1,ease:"easeOutCubic"}).play()},n.prototype.hide=function(e){t(window).off(".n2-modal-"+this.counter),this.notificationStack.popStack(),nextend.context.removeWindow(),arguments.length>0&&"esc"!=e&&NextendEsc.pop(),this.apply("hide"),this.apply("destroy"),this.currentPane=null,this.modal.detach(),t(document).off("keyup.n2-esc-modal")},n.prototype.destroy=function(){this.modal.remove()},n.prototype.loadPane=function(e,n,i,o){var s=t.proxy(function(){var s=this.panes[e];this.currentPane=s,s.title!==!1&&this.title.html(s.title),s.back===!1?this.back.addClass("n2-hidden"):this.back.removeClass("n2-hidden"),s.close===!1?this.close.addClass("n2-hidden"):this.close.removeClass("n2-hidden"),this.content.find("> *").detach(),this.content.append(s.content);for(var r=!1,a=t('<div class="n2-tr" />'),l=0;l<s.controls.length;l++)t('<div class="n2-td"/>').addClass("n2-modal-controls-"+l).html(s.controls[l]).appendTo(a),r=!0;if(a.addClass("n2-modal-controls-"+l),this.controls.html(a),this.controls.attr("class","n2-table n2-table-fixed n2-table-auto "+s.controlsClass),"undefined"!=typeof i&&i||NextendTween.fromTo(this.window,.3,{x:n?-2e3:2e3},{x:0,ease:"easeOutCubic"}).play(),this.modal.appendTo("#n2-admin"),s.fit){var c=t(window),h=40,u=t.proxy(function(){var t=c.width()-2*h,e=c.height()-2*h;s.fitX||(t=s.size[0]),this.window.css({width:t,height:e,marginLeft:t/-2,marginTop:e/-2}),this.content.css({height:e-80-(r?this.controls.parent().outerHeight(!0):0),overflow:s.overflow})},this);u(),c.on("resize.n2-modal-"+this.counter,u)}else s.size!==!1&&(this.window.css({width:s.size[0],height:s.size[1],marginLeft:s.size[0]/-2,marginTop:s.size[1]/-2}),this.content.css({height:s.size[1]-80-(r?this.controls.parent().outerHeight(!0):0),overflow:s.overflow}));this.apply("show",o)},this);null!==this.currentPane?(this.apply("destroy"),NextendTween.to(this.window,.3,{x:n?2e3:-2e3,onComplete:s,ease:"easeOutCubic"}).play()):s()},n.prototype.trigger=function(t,e){this.$.trigger(t,e)},n.prototype.on=function(t,e){this.$.on(t,e)},n.prototype.one=function(t,e){this.$.one(t,e)},n.prototype.off=function(t,e){this.$.off(t,e)},n.prototype.goBackButton=function(){var t=null;null!==typeof this.goBackArgs&&(t=this.goBackArgs,this.goBackArgs=null),this.goBack(t)},n.prototype.goBack=function(t){this.apply("goBack",t)&&this.loadPane(this.currentPane.back,!0,!1,t)},n.prototype.apply=function(t,e){return"undefined"!=typeof this.currentPane.fn[t]?this.currentPane.fn[t].apply(this,e):!0},n.prototype.createInput=function(e,n){var i="";return 3==arguments.length&&(i=arguments[2]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+n+'" value="" class="n2-h5" autocomplete="off" style="'+i+'"></div></div></div></div>')},n.prototype.createInputUnit=function(e,n,i){var o="";return 4==arguments.length&&(o=arguments[3]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><input type="text" id="'+n+'" value="" class="n2-h5" autocomplete="off" style="'+o+'"><div class="n2-text-unit n2-h5 n2-uc">'+i+"</div></div></div></div></div>")},n.prototype.createInputSub=function(e,n,i){var o="";return 4==arguments.length&&(o=arguments[3]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-text n2-border-radius"><div class="n2-text-sub-label n2-h5 n2-uc">'+i+'</div><input type="text" id="'+n+'" value="" class="n2-h5" autocomplete="off" style="'+o+'"></div></div></div></div>')},n.prototype.createTextarea=function(e,n){var i="";return 3==arguments.length&&(i=arguments[2]),t('<div class="n2-form-element-mixed"><div class="n2-mixed-group"><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-textarea n2-border-radius"><textarea id="'+n+'" class="n2-h5" autocomplete="off" style="resize:none;'+i+'"></textarea></div></div></div></div>')},n.prototype.createSelect=function(e,n,i){var o="";4==arguments.length&&(o=arguments[3]),$group=t('<div class="n2-form-element-mixed"><div class="n2-mixed-group "><div class="n2-mixed-label"><label for="'+n+'">'+e+'</label></div><div class="n2-mixed-element"><div class="n2-form-element-list" style=""><select id="'+n+'" autocomplete="off" style="'+o+'"></select></div></div></div></div>'),$select=$group.find("select");for(var s in i)$select.append('<option value="'+s+'">'+i[s]+"</option>");return $select.prop("selectedIndex",0),$group},n.prototype.createHeading=function(e){return t('<h3 class="n2-h3">'+e+"</h3>")},n.prototype.createSubHeading=function(e){return t('<h3 class="n2-h4">'+e+"</h3>")},n.prototype.createCenteredHeading=function(e){return t('<h3 class="n2-h3 n2-center">'+e+"</h3>")},n.prototype.createCenteredSubHeading=function(e){return t('<h3 class="n2-h4 n2-center">'+e+"</h3>")},n.prototype.createResult=function(){return t('<div class="n2-result"></div>')},n.prototype.createTable=function(e,n){for(var i=t('<table class="n2-table-fancy"/>'),o=0;o<e.length;o++)for(var s=t("<tr />").appendTo(i),r=0;r<e[o].length;r++)s.append(t('<td style="'+n[r]+'"/>').append(e[o][r]));return i},n.prototype.createTableWrap=function(){return t('<div class="n2-table-fancy-wrap" style="overflow:auto;height:196px;" />')},n.prototype.createImageRadio=function(e){for(var n=t('<div class="n2-modal-radio" />'),i=t('<input type="hidden" value="'+e[0].key+'"/>').appendTo(n),o=0;o<e.length;o++)n.append('<div class="n2-modal-radio-option" data-key="'+e[o].key+'" style="background-image: url(\''+nextend.imageHelper.fixed(e[o].image)+'\')"><div class="n2-h4">'+e[o].name+"</div></div>");var e=n.find(".n2-modal-radio-option");return e.eq(0).addClass("n2-active"),e.on("click",function(n){e.removeClass("n2-active");var o=t(n.currentTarget);o.addClass("n2-active"),i.val(o.data("key"))}),n},e.NextendModal=n,e.NextendModalSafeHTML=function(e,i){var o=new n({zero:{fit:!0,size:[1300,700],title:e,content:""}},!0);o.content.removeClass("n2-modal-content").css("padding","0 20px 20px");var s,r=t(i.replace(/document\.write/g,"n2Write"));window.n2Write=t.proxy(function(e){t("<span />").html(e).appendTo(o.content)},this),r.each(t.proxy(function(e,n){s=t(n),s.appendTo(o.content)},this)),delete window.n2Write},e.NextendModalSetting={show:function(t,e){new n({zero:{size:[1300,700],title:t,content:'<iframe src="'+e+'" width="1300" height="640" frameborder="0" style="margin:0 -20px -20px -20px;"></iframe>'}},!0)}},e.NextendModalDocumentation=function(t,e){
2
  new n({zero:{size:[760,700],title:t,content:'<iframe src="'+e+'" width="760" height="640" frameborder="0" style="margin:0 -20px -20px -20px;"></iframe>'}},!0)},e.NextendNewFullWindow=function(t,e){var n=["height="+screen.height,"width="+screen.width,"fullscreen=yes"].join(","),i=window.open(t,e,n);return i.moveTo(0,0),i},i.prototype.resize=function(){this.window.width(this.modal.width()),this.window.height(this.modal.height())},i.prototype.show=function(){t("body").addClass("n2-modal-active"),this.modal.css("display","block"),this.resize(),t(window).on("resize.n2-simple-modal",t.proxy(this.resize,this)),this.notificationStack.enableStack(),NextendEsc.add(t.proxy(function(){return this.hide("esc"),!0},this))},i.prototype.hide=function(e){this.notificationStack.popStack(),arguments.length>0&&"esc"!=e&&NextendEsc.pop(),this.modal.css("display","none"),t("body").removeClass("n2-modal-active"),t(document).off("keyup.n2-esc-modal"),t(window).off(".n2-simple-modal"),this.modal.trigger("ModalHide")},e.NextendSimpleModal=i,e.NextendDeleteModal=o,e.NextendDeleteModalLink=s}(n2,window),function(t,e){function n(){this.stack=[],this.tween=null,nextend.ready(t.proxy(function(){var e=t("#n2-admin").find(".n2-main-top-bar");if(e.length>0){var n=new i(t("#n2-admin").find(".n2-main-top-bar"));n.enableStack()}else{var n=new o(t("#n2-admin"));n.enableStack()}},this))}function i(e){this.messages=[],this.isShow=!1,this.importantOnly=0,this.importantOnlyNode=t('<div class="n2-notification-important n2-h5 '+(this.importantOnly?"n2-active":"")+'"><span>'+n2_("Show only errors")+'</span><div class="n2-checkbox n2-light"><i class="n2-i n2-i-tick"></i></div></div>').on("click",t.proxy(this.changeImportant,this)),t.jStorage.listenKeyChange("ss-important-only",t.proxy(this.importantOnlyChanged,this)),this.importantOnlyChanged(),this._init(e),this.emptyMessage=t('<div class="n2-notification-empty n2-h4">'+n2_("There are no messages to display.")+"</div>")}function o(){i.prototype.constructor.apply(this,arguments)}n.prototype.add=function(t){this.stack.push(t)},n.prototype.popStack=function(){this.stack.pop()},n.prototype.getCurrentStack=function(){return this.stack[this.stack.length-1]},n.prototype.success=function(t,e){this.getCurrentStack().success(t,e)},n.prototype.error=function(t,e){this.getCurrentStack().error(t,e)},n.prototype.notice=function(t,e){this.getCurrentStack().notice(t,e)},window.nextend.notificationCenter=new n,i.prototype._init=function(e){this.showButton=e.find(".n2-notification-button").on("click",t.proxy(this.hideOrShow,this));var n=t('<div class="n2-notification-settings"></div>').append(t('<div class="n2-button n2-button-normal n2-button-s n2-button-blue n2-radius-s n2-h5 n2-uc n2-notification-clear">'+n2_("Got it!")+"</div>").on("click",t.proxy(this.clear,this))).append(this.importantOnlyNode);this.container=this.messageContainer=t('<div class="n2-notification-center n2-border-radius-br n2-border-radius-bl"></div>').append(n).appendTo(e)},i.prototype.enableStack=function(){nextend.notificationCenter.add(this)},i.prototype.popStack=function(){nextend.notificationCenter.popStack()},i.prototype.hideOrShow=function(t){t.preventDefault(),this.isShow?this.hide():this.show()},i.prototype.show=function(){this.isShow||(this.isShow=!0,0==this.messages.length&&this.showEmptyMessage(),this.showButton&&this.showButton.addClass("n2-active"),this.container.addClass("n2-active"),this.container.css("display","block"),this._animateShow())},i.prototype.hide=function(){this.isShow&&(this.showButton&&this.showButton.removeClass("n2-active"),this.container.removeClass("n2-active"),this._animateHide(),this.container.css("display","none"),this.isShow=!1)},i.prototype._animateShow=function(){this.tween&&this.tween.pause(),this.tween=NextendTween.fromTo(this.container,.4,{opacity:0},{opacity:1}).play()},i.prototype._animateHide=function(){this.tween&&this.tween.pause()},i.prototype.success=function(t,e){this._message("success",n2_("success"),t,e)},i.prototype.error=function(t,e){this._message("error",n2_("error"),t,e)},i.prototype.notice=function(t,e){this._message("notice",n2_("notice"),t,e)},i.prototype._message=function(e,n,i,o){this.hideEmptyMessage(),o=t.extend({timeout:!1,remove:!1},o);var s=t("<div></div>");return o.timeout&&setTimeout(t.proxy(function(){this.hideMessage(s,o.remove)},this),1e3*o.timeout),s.addClass("n2-table n2-table-fixed n2-h3 n2-border-radius n2-notification-message n2-notification-message-"+e).append(t('<div class="n2-tr"></div>').append('<div class="n2-td n2-first"><i class="n2-i n2-i-n-'+e+'"/></div>').append('<div class="n2-td n2-message"><h4 class="n2-h4 n2-uc">'+n+'</h4><p class="n2-h4">'+i+"</p></div>")).prependTo(this.messageContainer),this.messages.push(s),this.messages.length>3&&this.messages.shift().remove(),this.importantOnly&&"error"!=e&&"notice"!=e||this.show(),s},i.prototype.hideMessage=function(t,e){e?this.deleteMessage(t):this.hide()},i.prototype.deleteMessage=function(e){var n=t.inArray(e,this.messages);n>-1&&(this.messages.splice(n,1),e.remove()),0==this.messages.length&&this.hide()},i.prototype.clear=function(){for(var t=this.messages.length-1;t>=0;t--)this.messages.pop().remove();this.showEmptyMessage(),this.hide()},i.prototype.changeImportant=function(){this.importantOnly?t.jStorage.set("ss-important-only",0):t.jStorage.set("ss-important-only",1)},i.prototype.importantOnlyChanged=function(){this.importantOnly=parseInt(t.jStorage.get("ss-important-only",0)),this.importantOnly?this.importantOnlyNode.addClass("n2-active"):this.importantOnlyNode.removeClass("n2-active")},i.prototype.showEmptyMessage=function(){this.emptyMessage.prependTo(this.container)},i.prototype.hideEmptyMessage=function(){this.emptyMessage.detach()},e.NextendNotificationCenterStack=i,o.prototype=Object.create(i.prototype),o.prototype.constructor=o,o.prototype._init=function(e){var n=t('<div class="n2-notification-settings"></div>').append(t('<div class="n2-button n2-button-normal n2-button-s n2-button-blue n2-radius-s n2-h5 n2-uc n2-notification-clear">Got it!</div>').on("click",t.proxy(this.clear,this))).append(this.importantOnlyNode);this.messageContainer=t('<div class="n2-notification-center n2-border-radius"></div>').append(n),this.container=t('<div class="n2-notification-center-modal"></div>').append(this.messageContainer).appendTo(e)},o.prototype.show=function(){document.activeElement&&document.activeElement.blur(),NextendEsc.add(t.proxy(function(){return this.clear(),!1},this)),i.prototype.show.apply(this,arguments)},o.prototype.hide=function(){NextendEsc.pop(),i.prototype.hide.apply(this,arguments)},o.prototype._animateShow=function(){},o.prototype._animateHide=function(){},e.NextendNotificationCenterStackModal=o}(n2,window),function(t,e,n){function i(t,e,n){for(var i=[],o=0;o<t.length;o++){var s=p(t[o]),r=s.toHsl().l<.5?"n2-sp-thumb-el n2-sp-thumb-dark":"n2-sp-thumb-el n2-sp-thumb-light";r+=p.equals(e,t[o])?" n2-sp-thumb-active":"";var a=v?"background-color:"+s.toRgbString():"filter:"+s.toFilter();i.push('<span title="'+s.toRgbString()+'" data-color="'+s.toRgbString()+'" class="'+r+'"><span class="n2-sp-thumb-inner" style="'+a+';" /></span>')}return"<div class='n2-sp-cf "+n+"'>"+i.join("")+"</div>"}function o(){for(var t=0;t<m.length;t++)m[t]&&m[t].hide()}function s(t,n){var i=e.extend({},f,t);return i.callbacks={move:h(i.move,n),change:h(i.change,n),show:h(i.show,n),hide:h(i.hide,n),beforeShow:h(i.beforeShow,n)},i}function r(r,l){function h(t){vt.toggleClass("n2-sp-flat",W),vt.toggleClass("n2-sp-input-disabled",!B.showInput),vt.toggleClass("n2-sp-alpha-enabled",B.showAlpha),vt.toggleClass("n2-sp-buttons-disabled",!B.showButtons||W),vt.toggleClass("n2-sp-palette-disabled",!B.showPalette),vt.toggleClass("n2-sp-palette-only",B.showPaletteOnly),vt.toggleClass("n2-sp-initial-disabled",!B.showInitial),vt.addClass(B.className),"undefined"==typeof t&&H()}function f(){function n(t){return t.data&&t.data.ignore?(j(e(this).data("color")),P()):(j(e(this).data("color")),z(!0),P(),M()),!1}g&&vt.find("*:not(input)").attr("unselectable","on");var i=mt.parent().find(".n2-sp-replacer");if(i.length?Nt=i:(Nt=jt?e(y).addClass(V):e([]),jt&&mt.parent().after(Nt)),At=jt?Nt:mt,Pt=Nt.find(".n2-sp-preview-inner"),h(!0),W?mt.parent().after(vt).hide():e(ft).append(vt.hide()),Y&&t.localStorage)try{ut=t.localStorage[Y].split(";")}catch(o){}At.bind("click.spectrum touchstart.spectrum",function(t){gt||D(),t.stopPropagation(),e(t.target).is("input")||t.preventDefault()}),(mt.is(":disabled")||B.disabled===!0)&&J(),vt.click(c),Tt.change(C),Tt.bind("paste",function(){setTimeout(C,1)}),Tt.keydown(function(t){13==t.keyCode&&C()}),Ot.text(B.cancelText),Ot.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),M("cancel")}),Mt.text(B.chooseText),Mt.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),A()&&(z(!0),M())}),u(kt,function(t,e,n){lt=t/nt,n.shiftKey&&(lt=Math.round(10*lt)/10),P()}),u(xt,function(t,e){st=parseFloat(e/tt),P()},_,T),u(yt,function(t,e){rt=parseFloat(t/K),at=parseFloat((Q-e)/Q),P()},_,T),Et?(j(Et),E(),Ht=zt||p(Et).format,x(Et)):E(),W&&O();var s=g?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Ct.delegate(".n2-sp-thumb-el",s,n),Dt.delegate(".n2-sp-thumb-el:nth-child(1)",s,{ignore:!0},n)}function x(n){if(q){var i=p(n).toRgbString();if(-1===e.inArray(i,ut)&&ut.push(i),Y&&t.localStorage)try{t.localStorage[Y]=ut.join(";")}catch(o){}}}function w(){var t,e=[],n=ut,i={};if(B.showPalette){for(var o=0;o<ht.length;o++)for(var s=0;s<ht[o].length;s++)t=p(ht[o][s]).toRgbString(),i[t]=!0;for(o=0;o<n.length;o++)t=p(n[o]).toRgbString(),i.hasOwnProperty(t)||(e.push(n[o]),i[t]=!0)}return e.reverse().slice(0,B.maxSelectionSize)}function S(){var t=N(),n=e.map(ht,function(e,n){return i(e,t,"n2-sp-palette-row n2-sp-palette-row-"+n)});ut&&n.push(i(w(),t,"n2-sp-palette-row n2-sp-palette-row-selection")),Ct.html(n.join(""))}function k(){if(B.showInitial){var t=It,e=N();Dt.html(i([t,e],e,"n2-sp-palette-row-initial"))}}function _(){0!==Q&&0!==K&&0!==tt||H(),vt.addClass(dt)}function T(){vt.removeClass(dt)}function C(){var t=p(Tt.val());t.ok?j(t):Tt.addClass("n2-sp-validation-error")}function D(){G?M():O()}function O(){return G?void H():void(U.beforeShow(N())!==!1&&(o(),G=!0,e(pt).bind("click.spectrum",M),e(t).bind("resize.spectrum",X),Nt.addClass("n2-sp-active"),vt.show(),B.showPalette&&S(),H(),E(),It=N(),k(),U.show(It)))}function M(n){if((!n||"click"!=n.type||2!=n.button)&&G&&!W){G=!1,e(pt).unbind("click.spectrum",M),e(t).unbind("resize.spectrum",X),Nt.removeClass("n2-sp-active"),vt.hide();var i=!p.equals(N(),It);i&&(Rt&&"cancel"!==n?z(!0):F()),U.hide(N())}}function F(){j(It,!0)}function j(t,e){if(!p.equals(t,N())){var n=p(t),i=n.toHsv();st=i.h,rt=i.s,at=i.v,lt=i.a,E(),e||(Ht=zt||n.format)}}function N(){return p.fromRatio({h:st,s:rt,v:at,a:Math.round(100*lt)/100})}function A(){return!Tt.hasClass("n2-sp-validation-error")}function P(){E(),U.move(N())}function E(){Tt.removeClass("n2-sp-validation-error"),I();var t=p({h:st,s:"1.0",v:"1.0"});yt.css("background-color","#"+t.toHexString());var e=Ht;1>lt&&("hex"!==e&&"name"!==e||(e="rgb"));var n=N(),i=n.toHexString(),o=n.toRgbString();if(v||1===n.alpha?Pt.css("background-color",o):(Pt.css("background-color","transparent"),Pt.css("filter",n.toFilter())),B.showAlpha){var s=n.toRgb();s.a=0;var r=p(s).toRgbString(),a="linear-gradient(left, "+r+", "+i+")";g?St.css("filter",p(r).toFilter({gradientType:1},i)):(St.css("background","-webkit-"+a),St.css("background","-moz-"+a),St.css("background","-ms-"+a),St.css("background",a))}B.showInput&&(1>lt&&("hex"!==e&&"name"!==e||(e="rgb")),Tt.val(n.toString(e))),B.showPalette&&S(),k()}function I(){var t=rt,e=at,n=t*K,i=Q-e*Q;n=Math.max(-Z,Math.min(K-Z,n-Z)),i=Math.max(-Z,Math.min(Q-Z,i-Z)),bt.css({top:i,left:n});var o=lt*nt;_t.css({left:o-it/2});var s=st*tt;wt.css({top:s-ot})}function z(t){var e=N();Ft&&mt.val(e.toString(Ht)).change();var n=1;It=e,x(e),t&&n&&U.change(e)}function H(){K=yt.width(),Q=yt.height(),Z=bt.height(),et=xt.width(),tt=xt.height(),ot=wt.height(),nt=kt.width(),it=_t.width(),W||vt.offset(a(vt,At.parent())),I()}function R(){mt.show(),At.unbind("click.spectrum touchstart.spectrum"),vt.remove(),Nt.remove(),m[Lt.id]=null}function L(t,i){return t===n?e.extend({},B):i===n?B[t]:(B[t]=i,void h())}function $(){gt=!1,mt.attr("disabled",!1),At.removeClass("n2-sp-disabled")}function J(){M(),gt=!0,mt.attr("disabled",!0),At.addClass("n2-sp-disabled")}var B=s(l,r),W=B.flat,q=B.showSelectionPalette,Y=B.localStorageKey,V=B.theme,U=B.callbacks,X=d(H,10),G=!1,K=0,Q=0,Z=0,tt=0,et=0,nt=0,it=0,ot=0,st=0,rt=0,at=0,lt=1,ct=B.palette.slice(0),ht=e.isArray(ct[0])?ct:[ct],ut=B.selectionPalette.slice(0),dt="n2-sp-dragging",pt=r.ownerDocument,ft=pt.body,mt=e(r),gt=!1,vt=e(b,pt).addClass(V),yt=vt.find(".n2-sp-color"),bt=vt.find(".n2-sp-dragger"),xt=vt.find(".n2-sp-hue"),wt=vt.find(".n2-sp-slider"),St=vt.find(".n2-sp-alpha-inner"),kt=vt.find(".n2-sp-alpha"),_t=vt.find(".n2-sp-alpha-handle"),Tt=vt.find(".n2-sp-input"),Ct=vt.find(".n2-sp-palette"),Dt=vt.find(".n2-sp-initial"),Ot=vt.find(".n2-sp-cancel"),Mt=vt.find(".n2-sp-choose"),Ft=mt.is("input"),jt=Ft&&!W,Nt=null,At=null,Pt=null,Et=B.color||Ft&&mt.val(),It=!1,zt=B.preferredFormat,Ht=zt,Rt=!B.showButtons||B.clickoutFiresChange;vt.on("mousedown",function(t){nextend.context.setMouseDownArea("colorpicker",t)}),f();var Lt={show:O,hide:M,toggle:D,reflow:H,option:L,enable:$,disable:J,set:function(t){j(t),z()},get:N,destroy:R,container:vt};return Lt.id=m.push(Lt)-1,Lt}function a(t,n){var i=0,o=t.outerWidth(),s=t.outerHeight(),r=n.outerHeight(),a=t[0].ownerDocument,l=a.documentElement,c=l.clientWidth+e(a).scrollLeft(),h=l.clientHeight+e(a).scrollTop(),u=n.offset();return u.top+=r+3,u.left-=Math.min(u.left,u.left+o>c&&c>o?Math.abs(u.left+o-c):0),u.top-=Math.min(u.top,u.top+s>h&&h>s?Math.abs(s+r+6-i):i),u}function l(){}function c(t){t.stopPropagation()}function h(t,e){var n=Array.prototype.slice,i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function u(t,n,i,o){function s(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function r(e){if(h){if(g&&document.documentMode<9&&!e.button)return l();var i=e.originalEvent.touches,o=i?i[0].pageX:e.pageX,r=i?i[0].pageY:e.pageY,a=Math.max(0,Math.min(o-u.left,p)),c=Math.max(0,Math.min(r-u.top,d));f&&s(e),n.apply(t,[a,c,e])}}function a(n){var o=n.which?3==n.which:2==n.button;n.originalEvent.touches;o||h||i.apply(t,arguments)!==!1&&(h=!0,d=e(t).height(),p=e(t).width(),u=e(t).offset(),e(c).bind(m),e(c.body).addClass("n2-sp-dragging"),f||r(n),s(n))}function l(){h&&(e(c).unbind(m),e(c.body).removeClass("n2-sp-dragging"),o.apply(t,arguments)),h=!1}n=n||function(){},i=i||function(){},o=o||function(){};var c=t.ownerDocument||document,h=!1,u={},d=0,p=0,f=!1,m={};m.selectstart=s,m.dragstart=s,m[f?"touchmove":"mousemove"]=r,m[f?"touchend":"mouseup"]=l,e(t).bind(f?"touchstart":"mousedown",a)}function d(t,e,n){var i;return function(){var o=this,s=arguments,r=function(){i=null,t.apply(o,s)};n&&clearTimeout(i),!n&&i||(i=setTimeout(r,e))}}var p=null,f={beforeShow:l,move:l,change:l,show:l,hide:l,color:!1,flat:!1,showInput:!1,showButtons:!0,clickoutFiresChange:!1,showInitial:!1,showPalette:!1,showPaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,maxSelectionSize:7,cancelText:"cancel",chooseText:"choose",preferredFormat:!1,className:"",showAlpha:!1,theme:"n2-sp-light",palette:["fff","000"],selectionPalette:[],disabled:!1},m=[],g=!!/msie/i.exec(t.navigator.userAgent),v=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div"),n=e.style;return n.cssText="background-color:rgba(0,0,0,.5)",t(n.backgroundColor,"rgba")||t(n.backgroundColor,"hsla")}(),y=["<div class='n2-sp-replacer'>","<div class='n2-sp-preview'><div class='n2-sp-preview-inner'></div></div>","<div class='n2-sp-dd'>&#9650;</div>","</div>"].join(""),b=function(){var t="";if(g)for(var e=1;6>=e;e++)t+="<div class='n2-sp-"+e+"'></div>";return["<div class='n2-sp-container'>","<div class='n2-sp-palette-container'>","<div class='n2-sp-palette n2-sp-thumb n2-sp-cf'></div>","</div>","<div class='n2-sp-picker-container'>","<div class='n2-sp-top n2-sp-cf'>","<div class='n2-sp-fill'></div>","<div class='n2-sp-top-inner'>","<div class='n2-sp-color'>","<div class='n2-sp-sat'>","<div class='n2-sp-val'>","<div class='n2-sp-dragger'></div>","</div>","</div>","</div>","<div class='n2-sp-hue'>","<div class='n2-sp-slider'></div>",t,"</div>","</div>","<div class='n2-sp-alpha'><div class='n2-sp-alpha-inner'><div class='n2-sp-alpha-handle'></div></div></div>","</div>","<div class='n2-sp-input-container n2-sp-cf'>","<input class='n2-sp-input' type='text' spellcheck='false' />","</div>","<div class='n2-sp-initial n2-sp-thumb n2-sp-cf'></div>","<div class='n2-sp-button-container n2-sp-cf'>","<a class='n2-sp-cancel' href='#'></a>","<button class='n2-sp-choose'></button>","</div>","</div>","</div>"].join("")}(),x="spectrum.id";e.fn.n2spectrum=function(t,n){if("string"==typeof t){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=m[e(this).data(x)];if(n){var s=n[t];if(!s)throw new Error("Spectrum: no such method: '"+t+"'");"get"==t?i=n.get():"container"==t?i=n.container:"option"==t?i=n.option.apply(n,o):"destroy"==t?(n.destroy(),e(this).removeData(x)):s.apply(n,o)}}),i}return this.n2spectrum("destroy").each(function(){var n=r(this,t);e(this).data(x,n.id)})},e.fn.n2spectrum.load=!0,e.fn.n2spectrum.loadOpts={},e.fn.n2spectrum.draggable=u,e.fn.n2spectrum.defaults=f,e.n2spectrum={},e.n2spectrum.localization={},e.n2spectrum.palettes={},e.fn.n2spectrum.processNativeColorInputs=function(){var t=e("<input type='color' value='!' />")[0],n="color"===t.type&&"!"!=t.value;n||e("input[type=color]").n2spectrum({preferredFormat:"hex6"})},function(t){function e(t){var e={r:0,g:0,b:0},i=1,s=!1,a=!1;return"string"==typeof t&&(t=g(t)),"object"==typeof t&&(t.hasOwnProperty("r")&&t.hasOwnProperty("g")&&t.hasOwnProperty("b")?(e=n(t.r,t.g,t.b),s=!0,a="rgb"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("v")?(e=r(t.h,t.s,t.v),s=!0,a="hsv"):t.hasOwnProperty("h")&&t.hasOwnProperty("s")&&t.hasOwnProperty("l")&&(e=o(t.h,t.s,t.l),s=!0,a="hsl"),t.hasOwnProperty("a")&&(i=t.a)),e.r=S(255,k(e.r,0)),e.g=S(255,k(e.g,0)),e.b=S(255,k(e.b,0)),e.r<1&&(e.r=w(e.r)),e.g<1&&(e.g=w(e.g)),e.b<1&&(e.b=w(e.b)),{ok:s,format:t&&t.format||a,r:e.r,g:e.g,b:e.b,a:i}}function n(t,e,n){return{r:255*c(t,255),g:255*c(e,255),b:255*c(n,255)}}function i(t,e,n){t=c(t,255),e=c(e,255),n=c(n,255);var i,o,s=k(t,e,n),r=S(t,e,n),a=(s+r)/2;if(s==r)i=o=0;else{var l=s-r;switch(o=a>.5?l/(2-s-r):l/(s+r),s){case t:i=(e-n)/l+(n>e?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:o,l:a}}function o(t,e,n){function i(t,e,n){return 0>n&&(n+=1),n>1&&(n-=1),1/6>n?t+6*(e-t)*n:.5>n?e:2/3>n?t+(e-t)*(2/3-n)*6:t}var o,s,r;if(t=c(t,360),e=c(e,100),n=c(n,100),0===e)o=s=r=n;else{var a=.5>n?n*(1+e):n+e-n*e,l=2*n-a;o=i(l,a,t+1/3),s=i(l,a,t),r=i(l,a,t-1/3)}return{r:255*o,g:255*s,b:255*r}}function s(t,e,n){t=c(t,255),e=c(e,255),n=c(n,255);var i,o,s=k(t,e,n),r=S(t,e,n),a=s,l=s-r;if(o=0===s?0:l/s,s==r)i=0;else{switch(s){case t:i=(e-n)/l+(n>e?6:0);break;case e:i=(n-t)/l+2;break;case n:i=(t-e)/l+4}i/=6}return{h:i,s:o,v:a}}function r(t,e,n){t=6*c(t,360),e=c(e,100),n=c(n,100);var i=x.floor(t),o=t-i,s=n*(1-e),r=n*(1-o*e),a=n*(1-(1-o)*e),l=i%6,h=[n,r,s,s,a,n][l],u=[a,n,n,r,s,s][l],d=[s,s,a,n,n,r][l];return{r:255*h,g:255*u,b:255*d}}function a(t,e,n,i){var o=[m(w(t).toString(16)),m(w(e).toString(16)),m(w(n).toString(16))];return i||o[0].charAt(0)!=o[0].charAt(1)||o[1].charAt(0)!=o[1].charAt(1)||o[2].charAt(0)!=o[2].charAt(1)?o.join(""):o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)}function l(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}function c(t,e){d(t)&&(t="100%");var n=f(t);return t=S(e,k(0,T(t))),n&&(t*=e/100),x.abs(t-e)<1e-6?1:t>=1?t%e/T(e):t}function h(t){return S(1,k(0,t))}function u(t){return parseInt(t,16)}function d(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===T(t)}function f(t){return"string"==typeof t&&-1!=t.indexOf("%")}function m(t){return 1==t.length?"0"+t:""+t}function g(t){t=t.replace(v,"").replace(y,"").toLowerCase();var e=!1;if(C[t])t=C[t],e=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0};var n;return(n=O.rgb.exec(t))?{r:n[1],g:n[2],b:n[3]}:(n=O.rgba.exec(t))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=O.hsl.exec(t))?{h:n[1],s:n[2],l:n[3]}:(n=O.hsla.exec(t))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=O.hsv.exec(t))?{h:n[1],s:n[2],v:n[3]}:(n=O.hex6.exec(t))?{r:u(n[1]),g:u(n[2]),b:u(n[3]),format:e?"name":"hex"}:(n=O.hex8.exec(t))?{r:u(n[1]),g:u(n[2]),b:u(n[3]),a:u(n[4])/255,format:e?"name":"hex"}:(n=O.hex3.exec(t))?{r:u(n[1]+""+n[1]),g:u(n[2]+""+n[2]),b:u(n[3]+""+n[3]),format:e?"name":"hex"}:!1}var v=/^[\s,#]+/,y=/\s+$/,b=0,x=Math,w=x.round,S=x.min,k=x.max,_=x.random,T=t.parseFloat;p=function(t,n){if("object"==typeof t&&t.hasOwnProperty("_tc_id"))return t;var o=e(t),r=o.r,l=o.g,c=o.b,h=T(o.a),u=o.format;return{ok:o.ok,format:u,_tc_id:b++,alpha:h,toHsv:function(){var t=s(r,l,c);return{h:t.h,s:t.s,v:t.v,a:h}},toHsvString:function(){var t=s(r,l,c),e=w(360*t.h),n=w(100*t.s),i=w(100*t.v);return 1==h?"hsv("+e+", "+n+"%, "+i+"%)":"hsva("+e+", "+n+"%, "+i+"%, "+h+")"},toHsl:function(){var t=i(r,l,c);return{h:t.h,s:t.s,l:t.l,a:h}},toHslString:function(){var t=i(r,l,c),e=w(360*t.h),n=w(100*t.s),o=w(100*t.l);return 1==h?"hsl("+e+", "+n+"%, "+o+"%)":"hsla("+e+", "+n+"%, "+o+"%, "+h+")"},toHex:function(){return a(r,l,c)},toHexString:function(t){return a(r,l,c,t)},toHexString8:function(){return a(r,l,c,!0)+m(w(255*h).toString(16))},toRgb:function(){return{r:w(r),g:w(l),b:w(c),a:h}},toRgbString:function(){return 1==h?"rgb("+w(r)+", "+w(l)+", "+w(c)+")":"rgba("+w(r)+", "+w(l)+", "+w(c)+", "+h+")"},toName:function(){return D[a(r,l,c)]||!1},toFilter:function(t,e){var n=a(r,l,c,!0),i=n,o=Math.round(255*T(h)).toString(16),s=o,u=t&&t.gradientType?"GradientType = 1, ":"";if(e){var d=p(e);i=d.toHex(),s=Math.round(255*T(d.alpha)).toString(16)}return"progid:DXImageTransform.Microsoft.gradient("+u+"startColorstr=#"+m(o)+n+",endColorstr=#"+m(s)+i+")"},toString:function(t){t=t||this.format;var e=!1;return"rgb"===t&&(e=this.toRgbString()),"hex"===t&&(e=this.toHexString()),"hex6"===t&&(e=this.toHexString(!0)),"hex8"===t&&(e=this.toHexString8()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString(!0)}}},p.fromRatio=function(t){if("object"==typeof t)for(var e in t)1===t[e]&&(t[e]="1.0");return p(t)},p.equals=function(t,e){return t&&e?p(t).toRgbString()==p(e).toRgbString():!1},p.random=function(){return p.fromRatio({r:_(),g:_(),b:_()})},p.desaturate=function(t,e){var n=p(t).toHsl();return n.s-=(e||10)/100,n.s=h(n.s),p(n)},p.saturate=function(t,e){var n=p(t).toHsl();return n.s+=(e||10)/100,n.s=h(n.s),p(n)},p.greyscale=function(t){return p.desaturate(t,100)},p.lighten=function(t,e){var n=p(t).toHsl();return n.l+=(e||10)/100,n.l=h(n.l),p(n)},p.darken=function(t,e){var n=p(t).toHsl();return n.l-=(e||10)/100,n.l=h(n.l),p(n)},p.complement=function(t){var e=p(t).toHsl();return e.h=(e.h+.5)%1,p(e)},p.triad=function(t){var e=p(t).toHsl(),n=360*e.h;return[p(t),p({h:(n+120)%360,s:e.s,l:e.l}),p({h:(n+240)%360,s:e.s,l:e.l})]},p.tetrad=function(t){var e=p(t).toHsl(),n=360*e.h;return[p(t),p({h:(n+90)%360,s:e.s,l:e.l}),p({h:(n+180)%360,s:e.s,l:e.l}),p({h:(n+270)%360,s:e.s,l:e.l})]},p.splitcomplement=function(t){var e=p(t).toHsl(),n=360*e.h;return[p(t),p({h:(n+72)%360,s:e.s,l:e.l}),p({h:(n+216)%360,s:e.s,l:e.l})]},p.analogous=function(t,e,n){e=e||6,n=n||30;var i=p(t).toHsl(),o=360/n,s=[p(t)];for(i.h*=360,i.h=(i.h-(o*e>>1)+720)%360;--e;)i.h=(i.h+o)%360,s.push(p(i));return s},p.monochromatic=function(t,e){e=e||6;for(var n=p(t).toHsv(),i=n.h,o=n.s,s=n.v,r=[],a=1/e;e--;)r.push(p({h:i,s:o,v:s})),s=(s+a)%1;return r},p.readable=function(t,e){var n=p(t).toRgb(),i=p(e).toRgb();return(i.r-n.r)*(i.r-n.r)+(i.g-n.g)*(i.g-n.g)+(i.b-n.b)*(i.b-n.b)>10404};var C=p.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},D=p.hexNames=l(C),O=function(){var t="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",n="(?:"+e+")|(?:"+t+")",i="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",o="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?";return{rgb:new RegExp("rgb"+i),rgba:new RegExp("rgba"+o),hsl:new RegExp("hsl"+i),hsla:new RegExp("hsla"+o),hsv:new RegExp("hsv"+i),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}()}(this),e(function(){e.fn.n2spectrum.load&&e.fn.n2spectrum.processNativeColorInputs()})}(window,n2),function(t,e){function n(e,n){this.app="system",this.key="IsExpert",this.isExpert=0,this.style=t('<div style="display: none;"></div>').appendTo("body"),n?(this.switches=t(".n2-expert-switch").on({mousedown:t.proxy(nextend.context.setMouseDownArea,nextend.context,"expertClicked"),click:t.proxy(this.switchExpert,this,!0)}),this.load(),this.isExpert||this.disable(!1),t.jStorage.listenKeyChange(this.app+this.key,t.proxy(this.load,this))):(this.switches=t(),this.disable(!1))}n.prototype.load=function(){var e=parseInt(t.jStorage.get(this.app+this.key,0));e!=this.isExpert&&this.switchExpert(!1,!1)},n.prototype.set=function(e,n){this.isExpert=e,n&&t.jStorage.set(this.app+this.key,e)},n.prototype.switchExpert=function(t,e){e&&e.preventDefault(),this.isExpert?this.disable(t):this.enable(t)},n.prototype.measureElement=function(){var e=null,n=t(window).scrollTop(),i=n+62,o=n+t(window).height()-100;t(".n2-content-area > .n2-heading-bar,.n2-content-area > .n2-form-tab ,#n2-admin .n2-content-area form > .n2-form > .n2-form-tab").each(function(){var n=t(this);return n.offset().top>i?(n.hasClass("n2-heading-bar")||(e=n),!1):n.offset().top+n.height()>o?(n.hasClass("n2-heading-bar")||(e=n),!1):void 0}),this.measuredElement=e},n.prototype.scrollToMeasured=function(){if(null!==this.measuredElement){for(;this.measuredElement.length&&!this.measuredElement.is(":VISIBLE");)this.measuredElement=this.measuredElement.prev();0!=this.measuredElement.length&&t("html,body").scrollTop(this.measuredElement.offset().top-102)}},n.prototype.enable=function(e){this.measureElement(),this.changeStyle(""),this.set(1,e),this.switches.addClass("n2-active"),t("html").addClass("n2-in-expert"),e&&this.scrollToMeasured()},n.prototype.disable=function(e){this.measureElement(),this.changeStyle(".n2-expert{display: none !important;}"),this.set(0,e),this.switches.removeClass("n2-active"),t("html").removeClass("n2-in-expert"),e&&this.scrollToMeasured()},n.prototype.changeStyle=function(t){this.style.html('<style type="text/css">'+t+"</style>")},e.NextendExpertMode=n}(n2,window),function(t){t(n2)}(function(t){function e(e){var r=e||window.event,a=l.call(arguments,1),c=0,u=0,d=0,p=0,f=0,m=0;if(e=t.event.fix(r),e.type="mousewheel","detail"in r&&(d=-1*r.detail),"wheelDelta"in r&&(d=r.wheelDelta),"wheelDeltaY"in r&&(d=r.wheelDeltaY),"wheelDeltaX"in r&&(u=-1*r.wheelDeltaX),"axis"in r&&r.axis===r.HORIZONTAL_AXIS&&(u=-1*d,d=0),c=0===d?u:d,"deltaY"in r&&(d=-1*r.deltaY,c=d),"deltaX"in r&&(u=r.deltaX,0===d&&(c=-1*u)),0!==d||0!==u){if(1===r.deltaMode){var g=t.data(this,"mousewheel-line-height");c*=g,d*=g,u*=g}else if(2===r.deltaMode){var v=t.data(this,"mousewheel-page-height");c*=v,d*=v,u*=v}if(p=Math.max(Math.abs(d),Math.abs(u)),(!s||s>p)&&(s=p,i(r,p)&&(s/=40)),i(r,p)&&(c/=40,u/=40,d/=40),c=Math[c>=1?"floor":"ceil"](c/s),u=Math[u>=1?"floor":"ceil"](u/s),d=Math[d>=1?"floor":"ceil"](d/s),h.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=e.clientX-y.left,m=e.clientY-y.top}return e.deltaX=u,e.deltaY=d,e.deltaFactor=s,e.offsetX=f,e.offsetY=m,e.deltaMode=0,a.unshift(e,c,u,d),o&&clearTimeout(o),o=setTimeout(n,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function n(){s=null}function i(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var o,s,r=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var c=r.length;c;)t.event.fixHooks[r[--c]]=t.event.mouseHooks;var h=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",h.getLineHeight(this)),t.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),i=n["offsetParent"in t.fn?"offsetParent":"parent"]();return i.length||(i=t("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel");
3
+ },unmousewheel:function(t){return this.unbind("mousewheel",t)}})}),function(t,e){function n(){o||(t(window).on("beforeunload",function(e){if(nextend.askToSave&&o+18e4<t.now()){var n={changed:!1};if(t(window).triggerHandler("n2-before-unload",n),n.changed){var i=n2_("The changes you made will be lost if you navigate away from this page.");return(e||window.event).returnValue=i,i}}}),o=t.now())}function i(e,i,o){this.form=t("#"+e).on("saved",t.proxy(this.onSaved,this)).data("form",this),this.onSaved(),this.url=i,this.values=o,"undefined"!=typeof document.formvalidator&&(document.formvalidator.isValid=function(){return!0}),t(window).on("n2-before-unload",t.proxy(this.onBeforeUnload,this)),n(),t("input, textarea").on("keyup",function(t){27==t.which&&(t.target.blur(),t.stopPropagation())})}var o=!1;i.prototype.onBeforeUnload=function(t,e){!e.changed&&this.isChanged()&&(e.changed=!0)},i.prototype.isChanged=function(){return this.form.triggerHandler("checkChanged"),this.serialized!=this.form.serialize()},i.prototype.onSaved=function(){this.serialized=this.form.serialize()},i.submit=function(t){return nextend.askToSave=!1,setTimeout(function(){n2(t).submit()},300),!1},e.NextendForm=i,t(window).ready(function(){t("input[data-disabled]").on("focus",function(){this.blur()})})}(n2,window),N2Require("FormElement",[],[],function(t,e,n){function i(){this.connectedField=null,this.element.data("field",this)}return i.prototype.triggerOutsideChange=function(){this.element.triggerHandler("outsideChange",this),this.element.triggerHandler("nextendChange",this)},i.prototype.triggerInsideChange=function(){this.element.triggerHandler("insideChange",this),this.element.triggerHandler("nextendChange",this)},i.prototype.focus=function(t){this.connectedField&&this.connectedField.focus(t)},i}),N2Require("FormElementText",["FormElement"],[],function(t,e,n){function i(n){this.element=t("#"+n).on({focus:t.proxy(this._focus,this),blur:t.proxy(this._blur,this),change:t.proxy(this.change,this)}),this.tagName=this.element.prop("tagName"),this.parent=this.element.parent(),e.FormElement.prototype.constructor.apply(this,arguments)}return i.prototype=Object.create(e.FormElement.prototype),i.prototype.constructor=i,i.prototype._focus=function(){this.parent.addClass("focus"),"TEXTAREA"!=this.tagName&&this.element.on("keypress.n2-text",t.proxy(function(t){13==t.which&&(this.element.off("keypress.n2-text"),this.element.trigger("blur"))},this))},i.prototype._blur=function(){this.parent.removeClass("focus")},i.prototype.change=function(){this.triggerOutsideChange()},i