Version Description
- 23. November 2017. =
- Feature: The Youtube and Vimeo layers will stop if you scroll away from them and they will continue when you scroll back
- Feature: The free version's Image layer will have width and height settings too
- Feature: Joomla article generator image variables
- Feature: Base64 removed from async
- Feature: Elementor will auto open the slider selector
- Feature: Beaver Builder 2.0 compatibility
- Fix: Youtube certain configuration settings weren't used
- Fix: Slide's link wasn't clickable over the text bar
- Fix: Search in link
- Fix: PHP7.2 deprecated create_function notice
- Fix: Wordfence compatility
Download this release
Release Info
Developer | nextendweb |
Plugin | Smart Slider 3 |
Version | 3.2.10 |
Comparing to | |
See all releases |
Code changes from version 3.2.9 to 3.2.10
- editor/shortcode.php +4 -1
- includes/integrations/BeaverBuilder.php +0 -36
- includes/integrations/Elementor.php +1 -3
- includes/integrations/beaver-builder/BeaverBuilder.php +98 -0
- includes/integrations/{beaver-builder-module → beaver-builder}/beaver-builder-module.php +0 -0
- includes/integrations/{beaver-builder-module → beaver-builder}/includes/frontend.php +0 -0
- includes/shortcode.php +7 -4
- includes/smartslider3.php +1 -1
- library/media/dist/smartslider-backend.js +47 -41
- library/media/dist/smartslider-backend.min.js +9 -9
- library/media/dist/smartslider-frontend.js +265 -94
- library/media/dist/smartslider-frontend.min.js +5 -4
- library/media/less/clear.n2less +9 -16
- library/media/plugins/widgetbar/horizontal/horizontal/bar.js +2 -2
- library/media/plugins/widgetbar/horizontal/horizontal/bar.min.js +1 -1
- library/smartslider/N2SmartsliderApplicationInfo.php +2 -2
- library/smartslider/backend/helpers/controller/N2SmartSliderController.php +1 -1
- library/smartslider/languages/fi_FI.mo +0 -0
- library/smartslider/languages/it_IT.mo +0 -0
- library/smartslider/libraries/slider/abstract.php +1 -1
- library/smartslider/libraries/slider/features/features.php +33 -0
- library/smartslider/libraries/slider/features/layermode.php +4 -3
- library/smartslider/libraries/slider/slides/slide.php +12 -5
- library/smartslider/libraries/slider/type.php +3 -2
- library/smartslider/libraries/storage.php +2 -2
- library/smartslider/models/License.php +5 -1
- library/smartslider/models/forms/slider.xml +2 -0
- library/smartslider/models/generator.php +19 -2
- library/smartslider/plugins/item/image/image/configuration.xml +5 -0
- library/smartslider/smartslider3.php +8 -4
- nextend/library/applications/system/plugins/nextendfontservices/google/families.csv +846 -0
- nextend/library/applications/system/plugins/nextendfontservices/google/google.php +13 -852
- nextend/library/languages/it_IT.mo +0 -0
- nextend/library/libraries/assets/js/assets.php +1 -1
- nextend/library/libraries/assets/predefined.php +0 -3
- nextend/library/libraries/localization/pomo/entry.php +73 -73
- nextend/library/libraries/localization/pomo/mo.php +309 -288
- nextend/library/libraries/localization/pomo/plural-forms.php +364 -0
- nextend/library/libraries/localization/pomo/streams.php +290 -291
- nextend/library/libraries/localization/pomo/translations.php +318 -315
- nextend/library/libraries/zip/reader.php +3 -0
- nextend/library/nextend.php +3 -2
- nextend/media/css/litebox.css +0 -247
- nextend/media/css/litebox.min.css +0 -1
- nextend/media/dist/nextend-backend.js +34 -1
- nextend/media/dist/nextend-backend.min.js +0 -5
editor/shortcode.php
CHANGED
@@ -86,7 +86,7 @@ class N2SSShortcodeInsert {
|
|
86 |
<?php
|
87 |
$router = N2Base::getApplication('smartslider')->router;
|
88 |
?>
|
89 |
-
<iframe src="<?php echo $router->createUrl(array('sliders/embed')); ?>"></iframe>
|
90 |
</div>
|
91 |
</div>
|
92 |
<script type="text/javascript">
|
@@ -158,6 +158,9 @@ class N2SSShortcodeInsert {
|
|
158 |
|
159 |
window.NextendSmartSliderSelectModal = function ($input) {
|
160 |
callback = function (id) {
|
|
|
|
|
|
|
161 |
$input.val(id).trigger('input').trigger('change');
|
162 |
};
|
163 |
show();
|
86 |
<?php
|
87 |
$router = N2Base::getApplication('smartslider')->router;
|
88 |
?>
|
89 |
+
<iframe style="border: 0;" src="<?php echo $router->createUrl(array('sliders/embed')); ?>"></iframe>
|
90 |
</div>
|
91 |
</div>
|
92 |
<script type="text/javascript">
|
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();
|
includes/integrations/BeaverBuilder.php
DELETED
@@ -1,36 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if (!defined('ABSPATH')) {
|
3 |
-
exit; // Exit if accessed directly
|
4 |
-
}
|
5 |
-
|
6 |
-
function n2_fl_builder_force_iframe() {
|
7 |
-
N2SS3Shortcode::forceIframe('beaverbuilder');
|
8 |
-
}
|
9 |
-
|
10 |
-
add_action('fl_builder_editing_enabled', 'n2_fl_builder_force_iframe');
|
11 |
-
add_action('fl_builder_editing_enabled', "N2SSShortcodeInsert::addForcedFrontend");
|
12 |
-
|
13 |
-
|
14 |
-
add_action('fl_ajax_before_render_new_module', 'n2_fl_builder_force_iframe');
|
15 |
-
add_action('fl_ajax_before_render_layout', 'n2_fl_builder_force_iframe');
|
16 |
-
add_action('fl_ajax_before_render_module_settings', 'n2_fl_builder_force_iframe');
|
17 |
-
add_action('fl_ajax_before_save_settings', 'n2_fl_builder_force_iframe');
|
18 |
-
add_action('fl_ajax_before_copy_module', 'n2_fl_builder_force_iframe');
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Custom modules
|
22 |
-
*/
|
23 |
-
function n2_fl_load_module_smart_slider() {
|
24 |
-
if (class_exists('FLBuilder')) {
|
25 |
-
require_once 'beaver-builder-module/beaver-builder-module.php';
|
26 |
-
}
|
27 |
-
}
|
28 |
-
|
29 |
-
add_action('init', 'n2_fl_load_module_smart_slider');
|
30 |
-
|
31 |
-
function n2_fl_smart_slider_field($name, $value, $field) {
|
32 |
-
echo '<input type="text" class="text" style="width:100px;" name="' . $name . '" value="' . $value . '" />
|
33 |
-
<a style="" href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings(\'input\'));" class="fl-builder-button fl-builder-button-small fl-builder-button-primary" title="Select slider">Select slider</a>';
|
34 |
-
}
|
35 |
-
|
36 |
-
add_action('fl_builder_control_smart-slider', 'n2_fl_smart_slider_field', 1, 3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/integrations/Elementor.php
CHANGED
@@ -117,9 +117,7 @@ add_action('elementor/controls/controls_registered', function ($controls_manager
|
|
117 |
<input type="{{ data.input_type }}" title="{{ data.title }}" data-setting="{{ data.name }}""/>
|
118 |
</div>
|
119 |
</div>
|
120 |
-
<# if
|
121 |
-
<div class="elementor-control-field-description">{{{ data.description }}}</div>
|
122 |
-
<# } #>
|
123 |
<?php
|
124 |
}
|
125 |
|
117 |
<input type="{{ data.input_type }}" title="{{ data.title }}" data-setting="{{ data.name }}""/>
|
118 |
</div>
|
119 |
</div>
|
120 |
+
<# if(data.controlValue == ''){NextendSmartSliderSelectModal(function(){return jQuery('[data-setting="smartsliderid"]')})} #>
|
|
|
|
|
121 |
<?php
|
122 |
}
|
123 |
|
includes/integrations/beaver-builder/BeaverBuilder.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('ABSPATH')) {
|
3 |
+
exit; // Exit if accessed directly
|
4 |
+
}
|
5 |
+
|
6 |
+
function n2_fl_builder_force_iframe() {
|
7 |
+
N2SS3Shortcode::forceIframe('beaverbuilder');
|
8 |
+
}
|
9 |
+
|
10 |
+
add_action('fl_builder_editing_enabled', 'n2_fl_builder_force_iframe');
|
11 |
+
add_action('fl_builder_editing_enabled', "N2SSShortcodeInsert::addForcedFrontend");
|
12 |
+
|
13 |
+
|
14 |
+
add_action('fl_ajax_before_render_new_module', 'n2_fl_builder_force_iframe');
|
15 |
+
add_action('fl_ajax_before_render_layout', 'n2_fl_builder_force_iframe');
|
16 |
+
add_action('fl_ajax_before_render_module_settings', 'n2_fl_builder_force_iframe');
|
17 |
+
add_action('fl_ajax_before_save_settings', 'n2_fl_builder_force_iframe');
|
18 |
+
add_action('fl_ajax_before_copy_module', 'n2_fl_builder_force_iframe');
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Custom modules
|
22 |
+
*/
|
23 |
+
function n2_fl_load_module_smart_slider() {
|
24 |
+
if (class_exists('FLBuilder')) {
|
25 |
+
require_once dirname(__FILE__) . '/beaver-builder-module.php';
|
26 |
+
}
|
27 |
+
}
|
28 |
+
|
29 |
+
add_action('init', 'n2_fl_load_module_smart_slider');
|
30 |
+
|
31 |
+
function n2_fl_smart_slider_field($name, $value, $field) {
|
32 |
+
|
33 |
+
N2base::getApplication('smartslider')
|
34 |
+
->getApplicationType('backend');
|
35 |
+
N2Loader::import("models.Sliders", "smartslider");
|
36 |
+
|
37 |
+
$slidersModel = new N2SmartsliderSlidersModel();
|
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; ?>">
|
62 |
+
<option value=""><?php n2_e('None'); ?></option>
|
63 |
+
<?php
|
64 |
+
foreach ($choices AS $id => $choice) {
|
65 |
+
if (is_array($choice)) {
|
66 |
+
?>
|
67 |
+
<optgroup label="<?php echo $choice['label']; ?>">
|
68 |
+
<?php
|
69 |
+
foreach ($choice['choices'] AS $_id => $_choice) {
|
70 |
+
?>
|
71 |
+
<option <?php if ($_id == $value){ ?>selected <?php } ?>value="<?php echo $_id; ?>"><?php echo $_choice; ?></option>
|
72 |
+
<?php
|
73 |
+
}
|
74 |
+
?>
|
75 |
+
</optgroup>
|
76 |
+
<?php
|
77 |
+
} else {
|
78 |
+
?>
|
79 |
+
<option <?php if ($id == $value){ ?>selected <?php } ?>value="<?php echo $id; ?>"><?php echo $choice; ?></option>
|
80 |
+
<?php
|
81 |
+
}
|
82 |
+
}
|
83 |
+
?>
|
84 |
+
</select>
|
85 |
+
<div style="line-height:2;padding:10px;"><?php n2_e('OR'); ?></div>
|
86 |
+
<a style="" href="#" onclick="return NextendSmartSliderSelectModal(jQuery(this).siblings('select'));" class="fl-builder-smart-slider-select fl-builder-button fl-builder-button-small fl-builder-button-primary" title="Select slider"><?php echo n2_('Select slider'); ?></a>
|
87 |
+
<script type="text/javascript">
|
88 |
+
(function ($) {
|
89 |
+
var value = $('select[name="<?php echo $name; ?>"]').val();
|
90 |
+
if (value == '' || value == '0') {
|
91 |
+
$('.fl-builder-smart-slider-select').trigger('click');
|
92 |
+
}
|
93 |
+
})(jQuery);
|
94 |
+
</script>
|
95 |
+
<?php
|
96 |
+
}
|
97 |
+
|
98 |
+
add_action('fl_builder_control_smart-slider', 'n2_fl_smart_slider_field', 1, 3);
|
includes/integrations/{beaver-builder-module → beaver-builder}/beaver-builder-module.php
RENAMED
File without changes
|
includes/integrations/{beaver-builder-module → beaver-builder}/includes/frontend.php
RENAMED
File without changes
|
includes/shortcode.php
CHANGED
@@ -80,11 +80,14 @@ class N2SS3Shortcode {
|
|
80 |
outerEl = $sourceFrame.parent(),
|
81 |
outerElOffset = outerEl.offset();
|
82 |
$sourceFrame.css("maxWidth", "none");
|
|
|
83 |
if ($("html").attr("dir") == "rtl") {
|
84 |
-
|
85 |
-
|
|
|
86 |
} else {
|
87 |
-
|
|
|
88 |
}
|
89 |
};
|
90 |
resizeFF();
|
@@ -103,7 +106,7 @@ class N2SS3Shortcode {
|
|
103 |
|
104 |
$attributes = array(
|
105 |
'class' => "n2-ss-slider-frame",
|
106 |
-
'style' => 'width:100
|
107 |
'frameborder' => 0,
|
108 |
'src' => site_url() . '?n2prerender=1&n2app=smartslider&n2controller=slider&n2action=iframe&sliderid=' . $sliderID . '&hash=' . md5($sliderID . NONCE_SALT)
|
109 |
);
|
80 |
outerEl = $sourceFrame.parent(),
|
81 |
outerElOffset = outerEl.offset();
|
82 |
$sourceFrame.css("maxWidth", "none");
|
83 |
+
|
84 |
if ($("html").attr("dir") == "rtl") {
|
85 |
+
var bodyMarginRight = parseInt($(document.body).css("marginRight"));
|
86 |
+
outerElOffset.right = $(window).width() - (outerElOffset.left + outerEl.outerWidth()) - bodyMarginRight;
|
87 |
+
$sourceFrame.css("marginRight", -outerElOffset.right - parseInt(outerEl.css("paddingRight")) - parseInt(outerEl.css("borderRightWidth"))).width(windowWidth);
|
88 |
} else {
|
89 |
+
var bodyMarginLeft = parseInt($(document.body).css("marginLeft"));
|
90 |
+
$sourceFrame.css("marginLeft", -outerElOffset.left - parseInt(outerEl.css("paddingLeft")) - parseInt(outerEl.css("borderLeftWidth")) + bodyMarginLeft).width(windowWidth);
|
91 |
}
|
92 |
};
|
93 |
resizeFF();
|
106 |
|
107 |
$attributes = array(
|
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 |
);
|
includes/smartslider3.php
CHANGED
@@ -290,7 +290,7 @@ class SmartSlider3 {
|
|
290 |
}
|
291 |
|
292 |
public static function beaverBuilder() {
|
293 |
-
require_once dirname(__FILE__) . '/integrations/BeaverBuilder.php';
|
294 |
}
|
295 |
|
296 |
public static function tailor() {
|
290 |
}
|
291 |
|
292 |
public static function beaverBuilder() {
|
293 |
+
require_once dirname(__FILE__) . '/integrations/beaver-builder/BeaverBuilder.php';
|
294 |
}
|
295 |
|
296 |
public static function tailor() {
|
library/media/dist/smartslider-backend.js
CHANGED
@@ -295,10 +295,11 @@ N2Require('Zoom', [], [], function ($, scope, undefined) {
|
|
295 |
});
|
296 |
N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
297 |
|
298 |
-
function CreateSlider(groupID, ajaxUrl) {
|
299 |
this.addToGroupModal = null;
|
300 |
this.groupID = groupID;
|
301 |
this.ajaxUrl = ajaxUrl;
|
|
|
302 |
$('.n2-ss-create-slider').click($.proxy(function (e) {
|
303 |
e.preventDefault();
|
304 |
e.stopImmediatePropagation();
|
@@ -490,7 +491,7 @@ N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
|
490 |
});
|
491 |
N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
492 |
|
493 |
-
function ManageSliders(groupID, ajaxUrl) {
|
494 |
this.preventSort = false;
|
495 |
this.groupID = groupID;
|
496 |
this.ajaxUrl = ajaxUrl;
|
@@ -510,7 +511,7 @@ N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
|
510 |
|
511 |
this.initOrderable();
|
512 |
|
513 |
-
this.create = new scope.CreateSlider(groupID, ajaxUrl);
|
514 |
this.initBulk();
|
515 |
}
|
516 |
|
@@ -3764,7 +3765,10 @@ N2Require('Generator', ['SlideAdmin'], ['smartSlider'], function ($, scope, smar
|
|
3764 |
for (var i = 0; i < args.length; i++) {
|
3765 |
args[i] = this.parseVariable(args[i]);
|
3766 |
}
|
3767 |
-
|
|
|
|
|
|
|
3768 |
} else {
|
3769 |
return this.parseVariable(variable);
|
3770 |
}
|
@@ -13193,54 +13197,56 @@ N2Require('Row', ['LayerContainer', 'ComponentAbstract'], ['smartSlider'], funct
|
|
13193 |
}
|
13194 |
|
13195 |
Row.prototype._syncwrapafter = function () {
|
13196 |
-
|
13197 |
-
|
13198 |
-
|
|
|
13199 |
|
13200 |
-
|
13201 |
-
|
13202 |
-
|
|
|
13203 |
}
|
13204 |
-
}
|
13205 |
|
13206 |
-
|
13207 |
|
13208 |
-
|
13209 |
-
|
13210 |
-
|
13211 |
|
13212 |
-
|
13213 |
|
13214 |
-
|
13215 |
|
13216 |
-
|
13217 |
-
|
13218 |
-
|
13219 |
-
|
13220 |
-
|
13221 |
-
|
13222 |
-
|
13223 |
-
|
13224 |
-
|
13225 |
-
|
13226 |
-
|
13227 |
-
|
|
|
13228 |
}
|
13229 |
-
}
|
13230 |
-
} else {
|
13231 |
-
for (var i = 0; i < length; i++) {
|
13232 |
-
columns[i].layer
|
13233 |
-
.removeClass('n2-ss-last-in-row')
|
13234 |
-
.attr('data-r', 0);
|
13235 |
-
}
|
13236 |
-
if (columns.length > 0) {
|
13237 |
-
columns[length - 1].layer.addClass('n2-ss-last-in-row');
|
13238 |
} else {
|
13239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13240 |
}
|
13241 |
-
}
|
13242 |
|
13243 |
-
|
|
|
13244 |
}
|
13245 |
|
13246 |
Row.prototype.getOrderedColumns = function () {
|
295 |
});
|
296 |
N2Require('CreateSlider', [], [], function ($, scope, undefined) {
|
297 |
|
298 |
+
function CreateSlider(groupID, ajaxUrl, shouldSkipLicenseModal) {
|
299 |
this.addToGroupModal = null;
|
300 |
this.groupID = groupID;
|
301 |
this.ajaxUrl = ajaxUrl;
|
302 |
+
this.shouldSkipLicenseModal = shouldSkipLicenseModal;
|
303 |
$('.n2-ss-create-slider').click($.proxy(function (e) {
|
304 |
e.preventDefault();
|
305 |
e.stopImmediatePropagation();
|
491 |
});
|
492 |
N2Require('ManageSliders', [], [], function ($, scope, undefined) {
|
493 |
|
494 |
+
function ManageSliders(groupID, ajaxUrl, shouldSkipLicenseModal) {
|
495 |
this.preventSort = false;
|
496 |
this.groupID = groupID;
|
497 |
this.ajaxUrl = ajaxUrl;
|
511 |
|
512 |
this.initOrderable();
|
513 |
|
514 |
+
this.create = new scope.CreateSlider(groupID, ajaxUrl, shouldSkipLicenseModal);
|
515 |
this.initBulk();
|
516 |
}
|
517 |
|
3765 |
for (var i = 0; i < args.length; i++) {
|
3766 |
args[i] = this.parseVariable(args[i]);
|
3767 |
}
|
3768 |
+
if (typeof this[functionName] === 'function') {
|
3769 |
+
return this[functionName].apply(this, args);
|
3770 |
+
}
|
3771 |
+
return s;
|
3772 |
} else {
|
3773 |
return this.parseVariable(variable);
|
3774 |
}
|
13197 |
}
|
13198 |
|
13199 |
Row.prototype._syncwrapafter = function () {
|
13200 |
+
if (!this.isDeleted && !this.isDeleteStarted) {
|
13201 |
+
var wrapAfter = parseInt(this.getProperty('wrapafter')),
|
13202 |
+
columns = this.getOrderedColumns(),
|
13203 |
+
isWrapped = false;
|
13204 |
|
13205 |
+
for (var i = columns.length - 1; i >= 0; i--) {
|
13206 |
+
if (!columns[i].showsOnCurrent) {
|
13207 |
+
columns.splice(i, 1);
|
13208 |
+
}
|
13209 |
}
|
|
|
13210 |
|
13211 |
+
var length = columns.length;
|
13212 |
|
13213 |
+
if (wrapAfter > 0 && wrapAfter < length) {
|
13214 |
+
isWrapped = true;
|
13215 |
+
}
|
13216 |
|
13217 |
+
this.$row.find('> .n2-ss-row-break').remove();
|
13218 |
|
13219 |
+
this.$row.toggleClass('n2-ss-row-wrapped', isWrapped);
|
13220 |
|
13221 |
+
if (isWrapped) {
|
13222 |
+
for (var i = 0; i < length; i++) {
|
13223 |
+
var row = parseInt(i / wrapAfter);
|
13224 |
+
columns[i].layer.attr('data-r', row);
|
13225 |
+
if ((i + 1) % wrapAfter == 0 || i == length - 1) {
|
13226 |
+
var order = columns[i].getProperty('order');
|
13227 |
+
if (order == 0) order = 10;
|
13228 |
+
$('<div class="n2-ss-row-break"/>')
|
13229 |
+
.css('order', order)
|
13230 |
+
.insertAfter(columns[i].layer.addClass('n2-ss-last-in-row'));
|
13231 |
+
} else {
|
13232 |
+
columns[i].layer.removeClass('n2-ss-last-in-row');
|
13233 |
+
}
|
13234 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13235 |
} else {
|
13236 |
+
for (var i = 0; i < length; i++) {
|
13237 |
+
columns[i].layer
|
13238 |
+
.removeClass('n2-ss-last-in-row')
|
13239 |
+
.attr('data-r', 0);
|
13240 |
+
}
|
13241 |
+
if (columns.length > 0) {
|
13242 |
+
columns[length - 1].layer.addClass('n2-ss-last-in-row');
|
13243 |
+
} else {
|
13244 |
+
console.error('The row does not have col.');
|
13245 |
+
}
|
13246 |
}
|
|
|
13247 |
|
13248 |
+
this.update();
|
13249 |
+
}
|
13250 |
}
|
13251 |
|
13252 |
Row.prototype.getOrderedColumns = function () {
|
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){this.addToGroupModal=null,this.groupID=e,this.ajaxUrl=i,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){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 r=this.slidersContainer.find(".n2-ss-box-slider"),s=0;s<r.length;s++)this.sliders.push(new e.Slider(this,r.eq(s)));this.changed(),this.initMenu(),this.initOrderable(),this.create=new e.CreateSlider(i,n),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",""),this.tabs.eq(2).css("display","none"));
|
2 |
-
},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 this[n].apply(this,o)}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)}for(var s in e)this.deviceProperty[s][t]!==n&&""!==this.deviceProperty[s][t]||(this.deviceProperty[s][t]=e[s]);
|
4 |
-
}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){this.sidebar.css("height",this.lastHeight);var n=this.sidebar[0].getBoundingClientRect();this.detachedPosition.left=n.left,
|
5 |
-
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"),this.layer.setProperty("valign",r,"layer"),this.layer.setProperty("parentalign",e,"layer"),this.layer.setProperty("parentvalign",i,"layer"),
|
6 |
-
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++,window.layers[this.counter]=this,this.self=this,this.originalProperties=o||{},e.LayerDataStorage.prototype.constructor.call(this),this.readyDeferred=t.Deferred(),
|
7 |
-
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=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(),t('[data-tab="item"]').trigger("click"),this.item.itemEditor.focusFirst("dblclick"))},this)})},r.prototype.getContent=function(){var t=this.layer,e=t.data("animatableselector");
|
8 |
-
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])+"% — "+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(){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=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"),bgcolorgradientend:t("#layercontent-background-color-end"),opened:t("#layercontent-opened")},this.forms.component.row={padding:t("#layerrow-padding"),gutter:t("#layerrow-gutter"),fullwidth:t("#layerrow-fullwidth"),
|
9 |
-
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")},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")}}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("#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=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])+"% — "+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=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")},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")},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")}}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
@@ -282,6 +282,65 @@ N2Require('SmartSliderLoad', [], [], function ($, scope, undefined) {
|
|
282 |
|
283 |
return SmartSliderLoad;
|
284 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
N2Require('SmartSliderApi', [], [], function ($, scope, undefined) {
|
286 |
function SmartSliderApi() {
|
287 |
this.sliders = {};
|
@@ -459,6 +518,7 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
459 |
admin: false,
|
460 |
playWhenVisible: 1,
|
461 |
playWhenVisibleAt: 0.5,
|
|
|
462 |
callbacks: '',
|
463 |
autoplay: {},
|
464 |
blockrightclick: false,
|
@@ -629,11 +689,13 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
629 |
universalenter: $.proxy(function (e) {
|
630 |
if (!$(e.target).closest('.n2-full-screen-widget').length) {
|
631 |
this.sliderElement.addClass('n2-hover');
|
|
|
632 |
}
|
633 |
}, this),
|
634 |
universalleave: $.proxy(function (e) {
|
635 |
e.stopPropagation();
|
636 |
this.sliderElement.removeClass('n2-hover');
|
|
|
637 |
}, this)
|
638 |
});
|
639 |
|
@@ -970,30 +1032,22 @@ N2Require('SmartSliderAbstract', [], [], function ($, scope, undefined) {
|
|
970 |
return false;
|
971 |
};
|
972 |
|
973 |
-
var
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
}
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
if (opacity != nextArrowOpacity) {
|
986 |
-
NextendTween.to(nextArrow, 0.4, {opacity: opacity}).play();
|
987 |
-
nextArrowOpacity = opacity;
|
988 |
-
}
|
989 |
-
};
|
990 |
-
|
991 |
-
var hideOrShowArrows = function (i) {
|
992 |
-
changePreviousArrowOpacity(i == 0 ? 0 : 1);
|
993 |
-
changeNextArrowOpacity(i == slidesCount - 1 ? 0 : 1);
|
994 |
-
};
|
995 |
|
996 |
-
|
|
|
|
|
997 |
|
998 |
this.sliderElement.on('sliderSwitchTo', function (e, i) {
|
999 |
hideOrShowArrows(i);
|
@@ -1260,16 +1314,62 @@ N2Require('SmartSliderWidgets', [], [], function ($, scope, undefined) {
|
|
1260 |
this.slider = slider;
|
1261 |
this.sliderElement = slider.sliderElement.on('BeforeVisible', $.proxy(this.onReady, this));
|
1262 |
|
1263 |
-
this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1264 |
}
|
1265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1266 |
SmartSliderWidgets.prototype.onReady = function () {
|
1267 |
this.dimensions = this.slider.dimensions;
|
1268 |
|
1269 |
this.widgets = {
|
1270 |
previous: this.sliderElement.find('.nextend-arrow-previous'),
|
1271 |
next: this.sliderElement.find('.nextend-arrow-next'),
|
1272 |
-
bullet: this.sliderElement.find('.
|
1273 |
autoplay: this.sliderElement.find('.nextend-autoplay'),
|
1274 |
indicator: this.sliderElement.find('.nextend-indicator'),
|
1275 |
bar: this.sliderElement.find('.nextend-bar'),
|
@@ -1279,6 +1379,41 @@ N2Require('SmartSliderWidgets', [], [], function ($, scope, undefined) {
|
|
1279 |
html: this.sliderElement.find('.nextend-widget-html')
|
1280 |
};
|
1281 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1282 |
this.variableElementsDimension = {
|
1283 |
width: this.sliderElement.find('[data-sswidth]'),
|
1284 |
height: this.sliderElement.find('[data-ssheight]')
|
@@ -1297,67 +1432,12 @@ N2Require('SmartSliderWidgets', [], [], function ($, scope, undefined) {
|
|
1297 |
this.onResize(this.slider.responsive.lastRatios);
|
1298 |
}, this));
|
1299 |
|
1300 |
-
//this.slider.ready($.proxy(function () {
|
1301 |
this.onResize(this.slider.responsive.lastRatios);
|
1302 |
-
//}, this));
|
1303 |
-
this.initHover();
|
1304 |
-
};
|
1305 |
-
|
1306 |
-
SmartSliderWidgets.prototype.initHover = function () {
|
1307 |
-
var timeout = null,
|
1308 |
-
widgets = this.sliderElement.find('.n2-ss-widget-hover');
|
1309 |
-
if (widgets.length > 0) {
|
1310 |
-
this.sliderElement.on('universalenter', function (e) {
|
1311 |
-
var slider = $(this);
|
1312 |
-
if (timeout) clearTimeout(timeout);
|
1313 |
-
widgets.css('visibility', 'visible');
|
1314 |
-
setTimeout(function () {
|
1315 |
-
slider.addClass('n2-ss-widget-hover-show');
|
1316 |
-
}, 50);
|
1317 |
-
}).on('universalleave', function () {
|
1318 |
-
var slide = this;
|
1319 |
-
if (timeout) clearTimeout(timeout);
|
1320 |
-
timeout = setTimeout(function () {
|
1321 |
-
$(slide).removeClass('n2-ss-widget-hover-show');
|
1322 |
-
timeout = setTimeout(function () {
|
1323 |
-
widgets.css('visibility', 'hidden');
|
1324 |
-
}, 400);
|
1325 |
-
}, 500);
|
1326 |
-
});
|
1327 |
-
}
|
1328 |
-
};
|
1329 |
|
1330 |
-
|
1331 |
-
var widgets = this.sliderElement.find('.n2-ss-widget[data-exclude-slides]'),
|
1332 |
-
hideOrShow = function (widget, excludedSlides, currentSlideIndex) {
|
1333 |
-
if ($.inArray((currentSlideIndex + 1) + '', excludedSlides) != -1) {
|
1334 |
-
widget.addClass('n2-ss-widget-hidden');
|
1335 |
-
} else {
|
1336 |
-
widget.removeClass('n2-ss-widget-hidden');
|
1337 |
-
}
|
1338 |
-
};
|
1339 |
-
widgets.each($.proxy(function (i, el) {
|
1340 |
-
var widget = $(el),
|
1341 |
-
excludedSlides = widget.attr('data-exclude-slides').split(',');
|
1342 |
-
for (var i = excludedSlides.length - 1; i >= 0; i--) {
|
1343 |
-
var parts = excludedSlides[i].split('-');
|
1344 |
-
if (parts.length == 2 && parseInt(parts[0]) <= parseInt(parts[1])) {
|
1345 |
-
excludedSlides[i] = parts[0];
|
1346 |
-
parts[0] = parseInt(parts[0]);
|
1347 |
-
parts[1] = parseInt(parts[1]);
|
1348 |
-
for (var j = parts[0] + 1; j <= parts[1]; j++) {
|
1349 |
-
excludedSlides.push(j + '');
|
1350 |
-
}
|
1351 |
-
}
|
1352 |
-
}
|
1353 |
-
hideOrShow(widget, excludedSlides, this.slider.currentRealSlide.index);
|
1354 |
-
this.slider.sliderElement
|
1355 |
-
.on('sliderSwitchTo', function (e, targetSlideIndex) {
|
1356 |
-
hideOrShow(widget, excludedSlides, targetSlideIndex);
|
1357 |
-
});
|
1358 |
-
}, this));
|
1359 |
};
|
1360 |
|
|
|
1361 |
SmartSliderWidgets.prototype.onAnimatedResize = function (e, ratios, timeline, duration) {
|
1362 |
for (var key in this.widgets) {
|
1363 |
var el = this.widgets[key],
|
@@ -6263,6 +6343,22 @@ N2Require('SmartSliderResponsiveElement', [], [], function ($, scope, undefined)
|
|
6263 |
return value + 'px';
|
6264 |
};
|
6265 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6266 |
SmartSliderResponsiveElement.prototype.fontSizePrepare = function (value) {
|
6267 |
var mode = this.responsive.getNormalizedModeString();
|
6268 |
if (value < this.helper.fontSize[mode]) {
|
@@ -6300,6 +6396,12 @@ N2Require('SmartSliderResponsiveElement', [], [], function ($, scope, undefined)
|
|
6300 |
N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
6301 |
|
6302 |
function FrontendItemVimeo(slider, id, sliderid, parameters, hasImage, start) {
|
|
|
|
|
|
|
|
|
|
|
|
|
6303 |
this.readyDeferred = $.Deferred();
|
6304 |
|
6305 |
this.slider = slider;
|
@@ -6338,7 +6440,7 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6338 |
}, this));
|
6339 |
}, this));
|
6340 |
}
|
6341 |
-
}
|
6342 |
|
6343 |
FrontendItemVimeo.vimeoDeferred = null;
|
6344 |
|
@@ -6386,13 +6488,20 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6386 |
|
6387 |
this.player.on('pause', $.proxy(function () {
|
6388 |
layer.triggerHandler('n2pause');
|
6389 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
6390 |
|
6391 |
this.player.on('ended', $.proxy(function () {
|
6392 |
if (!this.isStatic) {
|
6393 |
this.slider.sliderElement.trigger('mediaEnded', this.playerId);
|
6394 |
}
|
6395 |
layer.triggerHandler('n2stop');
|
|
|
6396 |
}, this));
|
6397 |
|
6398 |
if (!this.isStatic) {
|
@@ -6401,16 +6510,26 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6401 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) == -1) {
|
6402 |
if (parseInt(this.parameters.reset)) {
|
6403 |
this.reset();
|
6404 |
-
} else {
|
6405 |
-
this.pause();
|
6406 |
}
|
|
|
|
|
|
|
6407 |
}
|
6408 |
}, this));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6409 |
}
|
6410 |
|
6411 |
if (this.parameters.autoplay == 1) {
|
6412 |
this.slider.visible($.proxy(this.initAutoplay, this));
|
6413 |
}
|
|
|
|
|
6414 |
this.readyDeferred.resolve();
|
6415 |
};
|
6416 |
|
@@ -6442,15 +6561,30 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6442 |
//change slide
|
6443 |
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
|
6444 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) >= 0) {
|
6445 |
-
this.play
|
|
|
|
|
|
|
6446 |
}
|
6447 |
}, this));
|
6448 |
|
6449 |
if ($.inArray(this.slide, this.slider.getVisibleSlides()) >= 0) {
|
6450 |
-
this.play
|
|
|
6451 |
}
|
6452 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6453 |
this.play();
|
|
|
|
|
6454 |
}
|
6455 |
};
|
6456 |
|
@@ -6488,6 +6622,12 @@ N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
|
6488 |
N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
6489 |
|
6490 |
function FrontendItemYouTube(slider, id, parameters, hasImage) {
|
|
|
|
|
|
|
|
|
|
|
|
|
6491 |
this.readyDeferred = $.Deferred();
|
6492 |
this.slider = slider;
|
6493 |
this.playerId = id;
|
@@ -6576,8 +6716,8 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6576 |
rel: this.parameters.related,
|
6577 |
vq: this.parameters.vq,
|
6578 |
start: this.parameters.start,
|
6579 |
-
showinfo: this.parameters.
|
6580 |
-
modestbranding: this.parameters.
|
6581 |
};
|
6582 |
|
6583 |
if (this.parameters.center == 1) {
|
@@ -6616,6 +6756,12 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6616 |
break;
|
6617 |
case YT.PlayerState.PAUSED:
|
6618 |
layer.triggerHandler('n2pause');
|
|
|
|
|
|
|
|
|
|
|
|
|
6619 |
break;
|
6620 |
case YT.PlayerState.ENDED:
|
6621 |
if (this.parameters.loop == 1) {
|
@@ -6626,6 +6772,7 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6626 |
this.slider.sliderElement.trigger('mediaEnded', this.playerId);
|
6627 |
}
|
6628 |
layer.triggerHandler('n2stop');
|
|
|
6629 |
}
|
6630 |
break;
|
6631 |
|
@@ -6644,7 +6791,6 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6644 |
|
6645 |
this.slider.sliderElement.on('SliderResize', $.proxy(this.onResize, this))
|
6646 |
}
|
6647 |
-
|
6648 |
};
|
6649 |
|
6650 |
FrontendItemYouTube.prototype.onReady = function () {
|
@@ -6662,7 +6808,9 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6662 |
//pause video when slide changed
|
6663 |
this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex) {
|
6664 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) == -1) {
|
6665 |
-
this.
|
|
|
|
|
6666 |
}
|
6667 |
}, this));
|
6668 |
if (parseInt(this.parameters.reset)) {
|
@@ -6674,6 +6822,13 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6674 |
}
|
6675 |
}
|
6676 |
this.readyDeferred.resolve();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6677 |
};
|
6678 |
|
6679 |
FrontendItemYouTube.prototype.onResize = function () {
|
@@ -6701,18 +6856,34 @@ N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
|
6701 |
FrontendItemYouTube.prototype.initAutoplay = function () {
|
6702 |
|
6703 |
if (!this.isStatic) {
|
|
|
6704 |
//change slide
|
6705 |
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex) {
|
6706 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) >= 0) {
|
6707 |
-
this.play
|
|
|
|
|
|
|
6708 |
}
|
6709 |
}, this));
|
6710 |
|
6711 |
if ($.inArray(this.slide, this.slider.getVisibleSlides()) >= 0) {
|
6712 |
-
this.play
|
|
|
6713 |
}
|
6714 |
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6715 |
this.play();
|
|
|
|
|
6716 |
}
|
6717 |
};
|
6718 |
|
282 |
|
283 |
return SmartSliderLoad;
|
284 |
});
|
285 |
+
N2Require('scrollTracker', [], [], function ($, scope, undefined) {
|
286 |
+
function scrollTracker() {
|
287 |
+
this.started = false;
|
288 |
+
this.items = [];
|
289 |
+
}
|
290 |
+
|
291 |
+
scrollTracker.prototype.add = function ($el, onVisible, onHide) {
|
292 |
+
var item = {
|
293 |
+
$el: $el,
|
294 |
+
onVisible: onVisible,
|
295 |
+
onHide: onHide,
|
296 |
+
state: 'unknown'
|
297 |
+
};
|
298 |
+
this.items.push(item);
|
299 |
+
this._onScroll(item, Math.max(document.documentElement.clientHeight, window.innerHeight));
|
300 |
+
|
301 |
+
if (!this.started) {
|
302 |
+
this.start();
|
303 |
+
}
|
304 |
+
};
|
305 |
+
|
306 |
+
scrollTracker.prototype.start = function () {
|
307 |
+
if (!this.started) {
|
308 |
+
$(window).on('scroll.scrollTracker', $.proxy(this.onScroll, this));
|
309 |
+
this.started = true;
|
310 |
+
}
|
311 |
+
};
|
312 |
+
|
313 |
+
scrollTracker.prototype.onScroll = function (e) {
|
314 |
+
var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
|
315 |
+
|
316 |
+
for (var i = 0; i < this.items.length; i++) {
|
317 |
+
this._onScroll(this.items[i], viewHeight);
|
318 |
+
}
|
319 |
+
};
|
320 |
+
|
321 |
+
scrollTracker.prototype._onScroll = function (item, viewHeight) {
|
322 |
+
var rect = item.$el[0].getBoundingClientRect();
|
323 |
+
var isBigPlayer = rect.height > viewHeight * 0.7;
|
324 |
+
if ((!isBigPlayer && (rect.bottom - rect.height < 0 || rect.top - viewHeight + rect.height >= 0)) || (isBigPlayer && (rect.bottom < 0 || rect.top >= rect.height))) {
|
325 |
+
if (item.state != 'hidden') {
|
326 |
+
if (typeof item.onHide == 'function') {
|
327 |
+
item.onHide();
|
328 |
+
}
|
329 |
+
item.state = 'hidden';
|
330 |
+
}
|
331 |
+
} else {
|
332 |
+
if (item.state != 'visible') {
|
333 |
+
if (typeof item.onVisible == 'function') {
|
334 |
+
item.onVisible();
|
335 |
+
}
|
336 |
+
item.state = 'visible';
|
337 |
+
}
|
338 |
+
}
|
339 |
+
|
340 |
+
};
|
341 |
+
|
342 |
+
nextend.scrollTracker = new scrollTracker();
|
343 |
+
});
|
344 |
N2Require('SmartSliderApi', [], [], function ($, scope, undefined) {
|
345 |
function SmartSliderApi() {
|
346 |
this.sliders = {};
|
518 |
admin: false,
|
519 |
playWhenVisible: 1,
|
520 |
playWhenVisibleAt: 0.5,
|
521 |
+
perspective: 1000,
|
522 |
callbacks: '',
|
523 |
autoplay: {},
|
524 |
blockrightclick: false,
|
689 |
universalenter: $.proxy(function (e) {
|
690 |
if (!$(e.target).closest('.n2-full-screen-widget').length) {
|
691 |
this.sliderElement.addClass('n2-hover');
|
692 |
+
this.widgets.setState('hover', true);
|
693 |
}
|
694 |
}, this),
|
695 |
universalleave: $.proxy(function (e) {
|
696 |
e.stopPropagation();
|
697 |
this.sliderElement.removeClass('n2-hover');
|
698 |
+
this.widgets.setState('hover', false);
|
699 |
}, this)
|
700 |
});
|
701 |
|
1032 |
return false;
|
1033 |
};
|
1034 |
|
1035 |
+
var hideOrShowArrows = $.proxy(function (i) {
|
1036 |
+
if (i == 0) {
|
1037 |
+
this.widgets.setState('nonCarouselFirst', true);
|
1038 |
+
} else {
|
1039 |
+
this.widgets.setState('nonCarouselFirst', false);
|
1040 |
+
}
|
1041 |
+
if (i == this.slides.length - 1) {
|
1042 |
+
this.widgets.setState('nonCarouselLast', true);
|
1043 |
+
} else {
|
1044 |
+
this.widgets.setState('nonCarouselLast', false);
|
1045 |
+
}
|
1046 |
+
}, this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1047 |
|
1048 |
+
this.startedDeferred.done($.proxy(function () {
|
1049 |
+
hideOrShowArrows(this.currentSlide.index);
|
1050 |
+
}, this));
|
1051 |
|
1052 |
this.sliderElement.on('sliderSwitchTo', function (e, i) {
|
1053 |
hideOrShowArrows(i);
|
1314 |
this.slider = slider;
|
1315 |
this.sliderElement = slider.sliderElement.on('BeforeVisible', $.proxy(this.onReady, this));
|
1316 |
|
1317 |
+
this.widgets = {};
|
1318 |
+
this.excludedSlides = {};
|
1319 |
+
this.states = {
|
1320 |
+
hover: false,
|
1321 |
+
nonCarouselFirst: false,
|
1322 |
+
nonCarouselLast: false,
|
1323 |
+
currentSlideIndex: -1
|
1324 |
+
};
|
1325 |
}
|
1326 |
|
1327 |
+
SmartSliderWidgets.prototype.setState = function (name, value) {
|
1328 |
+
if (this.states[name] != value) {
|
1329 |
+
this.states[name] = value;
|
1330 |
+
this.onStateChange();
|
1331 |
+
}
|
1332 |
+
};
|
1333 |
+
|
1334 |
+
SmartSliderWidgets.prototype.onStateChange = function () {
|
1335 |
+
var widgetState = {};
|
1336 |
+
|
1337 |
+
for (var k in this.widgets) {
|
1338 |
+
if (this.widgets[k].hasClass('n2-ss-widget-display-hover')) {
|
1339 |
+
if (this.states.hover) {
|
1340 |
+
widgetState[k] = true;
|
1341 |
+
} else {
|
1342 |
+
widgetState[k] = false;
|
1343 |
+
}
|
1344 |
+
} else {
|
1345 |
+
widgetState[k] = true;
|
1346 |
+
}
|
1347 |
+
if (this.excludedSlides[k] != undefined) {
|
1348 |
+
if ($.inArray(this.states.currentSlideIndex + 1, this.excludedSlides[k]) != -1) {
|
1349 |
+
widgetState[k] = false;
|
1350 |
+
}
|
1351 |
+
}
|
1352 |
+
}
|
1353 |
+
|
1354 |
+
if (this.states.nonCarouselFirst) {
|
1355 |
+
widgetState.previous = false;
|
1356 |
+
}
|
1357 |
+
if (this.states.nonCarouselLast) {
|
1358 |
+
widgetState.next = false;
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
for (var k in this.widgets) {
|
1362 |
+
this.widgets[k].toggleClass('n2-ss-widget-hidden', !widgetState[k]);
|
1363 |
+
}
|
1364 |
+
};
|
1365 |
+
|
1366 |
SmartSliderWidgets.prototype.onReady = function () {
|
1367 |
this.dimensions = this.slider.dimensions;
|
1368 |
|
1369 |
this.widgets = {
|
1370 |
previous: this.sliderElement.find('.nextend-arrow-previous'),
|
1371 |
next: this.sliderElement.find('.nextend-arrow-next'),
|
1372 |
+
bullet: this.sliderElement.find('.n2-ss-control-bullet'),
|
1373 |
autoplay: this.sliderElement.find('.nextend-autoplay'),
|
1374 |
indicator: this.sliderElement.find('.nextend-indicator'),
|
1375 |
bar: this.sliderElement.find('.nextend-bar'),
|
1379 |
html: this.sliderElement.find('.nextend-widget-html')
|
1380 |
};
|
1381 |
|
1382 |
+
var hasExcluded = false
|
1383 |
+
for (var k in this.widgets) {
|
1384 |
+
var exclude = this.widgets[k].attr('data-exclude-slides');
|
1385 |
+
if (exclude != undefined) {
|
1386 |
+
var excludedSlides = exclude.split(',');
|
1387 |
+
for (var i = excludedSlides.length - 1; i >= 0; i--) {
|
1388 |
+
var parts = excludedSlides[i].split('-');
|
1389 |
+
if (parts.length == 2) {
|
1390 |
+
var start = parseInt(parts[0]),
|
1391 |
+
end = parseInt(parts[1]);
|
1392 |
+
if (start <= end) {
|
1393 |
+
for (var j = start; j <= end; j++) {
|
1394 |
+
excludedSlides.push(j);
|
1395 |
+
}
|
1396 |
+
}
|
1397 |
+
} else {
|
1398 |
+
excludedSlides[i] = parseInt(excludedSlides[i]);
|
1399 |
+
}
|
1400 |
+
}
|
1401 |
+
if (excludedSlides.length > 0) {
|
1402 |
+
this.excludedSlides[k] = excludedSlides;
|
1403 |
+
hasExcluded = true;
|
1404 |
+
}
|
1405 |
+
}
|
1406 |
+
}
|
1407 |
+
if (hasExcluded) {
|
1408 |
+
|
1409 |
+
var refreshSlideIndex = $.proxy(function (e, targetSlideIndex) {
|
1410 |
+
this.setState('currentSlideIndex', targetSlideIndex);
|
1411 |
+
}, this);
|
1412 |
+
|
1413 |
+
refreshSlideIndex(null, this.slider.currentRealSlide.index);
|
1414 |
+
this.slider.sliderElement.on('sliderSwitchTo', refreshSlideIndex);
|
1415 |
+
}
|
1416 |
+
|
1417 |
this.variableElementsDimension = {
|
1418 |
width: this.sliderElement.find('[data-sswidth]'),
|
1419 |
height: this.sliderElement.find('[data-ssheight]')
|
1432 |
this.onResize(this.slider.responsive.lastRatios);
|
1433 |
}, this));
|
1434 |
|
|
|
1435 |
this.onResize(this.slider.responsive.lastRatios);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1436 |
|
1437 |
+
this.onStateChange();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1438 |
};
|
1439 |
|
1440 |
+
|
1441 |
SmartSliderWidgets.prototype.onAnimatedResize = function (e, ratios, timeline, duration) {
|
1442 |
for (var key in this.widgets) {
|
1443 |
var el = this.widgets[key],
|
6343 |
return value + 'px';
|
6344 |
};
|
6345 |
|
6346 |
+
SmartSliderResponsiveElement.prototype.borderLeftWidthPrepare = function (value) {
|
6347 |
+
return parseInt(value);
|
6348 |
+
};
|
6349 |
+
|
6350 |
+
SmartSliderResponsiveElement.prototype.borderRightWidthPrepare = function (value) {
|
6351 |
+
return parseInt(value);
|
6352 |
+
};
|
6353 |
+
|
6354 |
+
SmartSliderResponsiveElement.prototype.borderTopWidthPrepare = function (value) {
|
6355 |
+
return parseInt(value);
|
6356 |
+
};
|
6357 |
+
|
6358 |
+
SmartSliderResponsiveElement.prototype.borderBottomWidthPrepare = function (value) {
|
6359 |
+
return parseInt(value);
|
6360 |
+
};
|
6361 |
+
|
6362 |
SmartSliderResponsiveElement.prototype.fontSizePrepare = function (value) {
|
6363 |
var mode = this.responsive.getNormalizedModeString();
|
6364 |
if (value < this.helper.fontSize[mode]) {
|
6396 |
N2Require('FrontendItemVimeo', [], [], function ($, scope, undefined) {
|
6397 |
|
6398 |
function FrontendItemVimeo(slider, id, sliderid, parameters, hasImage, start) {
|
6399 |
+
this.state = {
|
6400 |
+
scroll: false,
|
6401 |
+
slide: true,
|
6402 |
+
play: false,
|
6403 |
+
continuePlay: false
|
6404 |
+
};
|
6405 |
this.readyDeferred = $.Deferred();
|
6406 |
|
6407 |
this.slider = slider;
|
6440 |
}, this));
|
6441 |
}, this));
|
6442 |
}
|
6443 |
+
}
|
6444 |
|
6445 |
FrontendItemVimeo.vimeoDeferred = null;
|
6446 |
|
6488 |
|
6489 |
this.player.on('pause', $.proxy(function () {
|
6490 |
layer.triggerHandler('n2pause');
|
6491 |
+
if (this.state.continuePlay) {
|
6492 |
+
this.state.continuePlay = false;
|
6493 |
+
this.state.play = true;
|
6494 |
+
} else {
|
6495 |
+
this.state.play = false;
|
6496 |
+
}
|
6497 |
+
}, this));
|
6498 |
|
6499 |
this.player.on('ended', $.proxy(function () {
|
6500 |
if (!this.isStatic) {
|
6501 |
this.slider.sliderElement.trigger('mediaEnded', this.playerId);
|
6502 |
}
|
6503 |
layer.triggerHandler('n2stop');
|
6504 |
+
this.state.play = false;
|
6505 |
}, this));
|
6506 |
|
6507 |
if (!this.isStatic) {
|
6510 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) == -1) {
|
6511 |
if (parseInt(this.parameters.reset)) {
|
6512 |
this.reset();
|
|
|
|
|
6513 |
}
|
6514 |
+
this.setState('slide', false);
|
6515 |
+
} else {
|
6516 |
+
this.setState('slide', true);
|
6517 |
}
|
6518 |
}, this));
|
6519 |
+
|
6520 |
+
nextend.scrollTracker.add(this.playerElement, $.proxy(function () {
|
6521 |
+
this.setState('scroll', true);
|
6522 |
+
}, this), $.proxy(function () {
|
6523 |
+
this.state.continuePlay = true;
|
6524 |
+
this.setState('scroll', false);
|
6525 |
+
}, this));
|
6526 |
}
|
6527 |
|
6528 |
if (this.parameters.autoplay == 1) {
|
6529 |
this.slider.visible($.proxy(this.initAutoplay, this));
|
6530 |
}
|
6531 |
+
|
6532 |
+
this.playerElement.parent().css('background', '');
|
6533 |
this.readyDeferred.resolve();
|
6534 |
};
|
6535 |
|
6561 |
//change slide
|
6562 |
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex, isSystem) {
|
6563 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) >= 0) {
|
6564 |
+
this.state.play = true;
|
6565 |
+
this.setState('slide', true);
|
6566 |
+
} else {
|
6567 |
+
this.setState('slide', false);
|
6568 |
}
|
6569 |
}, this));
|
6570 |
|
6571 |
if ($.inArray(this.slide, this.slider.getVisibleSlides()) >= 0) {
|
6572 |
+
this.state.play = true;
|
6573 |
+
this.setState('slide', true);
|
6574 |
}
|
6575 |
} else {
|
6576 |
+
this.state.play = true;
|
6577 |
+
this.setState('slide', true);
|
6578 |
+
}
|
6579 |
+
};
|
6580 |
+
|
6581 |
+
FrontendItemVimeo.prototype.setState = function (name, value) {
|
6582 |
+
this.state[name] = value;
|
6583 |
+
|
6584 |
+
if (this.state.play && this.state.slide && this.state.scroll) {
|
6585 |
this.play();
|
6586 |
+
} else {
|
6587 |
+
this.pause();
|
6588 |
}
|
6589 |
};
|
6590 |
|
6622 |
N2Require('FrontendItemYouTube', [], [], function ($, scope, undefined) {
|
6623 |
|
6624 |
function FrontendItemYouTube(slider, id, parameters, hasImage) {
|
6625 |
+
this.state = {
|
6626 |
+
scroll: false,
|
6627 |
+
slide: true,
|
6628 |
+
play: false,
|
6629 |
+
continuePlay: false
|
6630 |
+
};
|
6631 |
this.readyDeferred = $.Deferred();
|
6632 |
this.slider = slider;
|
6633 |
this.playerId = id;
|
6716 |
rel: this.parameters.related,
|
6717 |
vq: this.parameters.vq,
|
6718 |
start: this.parameters.start,
|
6719 |
+
showinfo: this.parameters.showinfo,
|
6720 |
+
modestbranding: this.parameters.modestbranding
|
6721 |
};
|
6722 |
|
6723 |
if (this.parameters.center == 1) {
|
6756 |
break;
|
6757 |
case YT.PlayerState.PAUSED:
|
6758 |
layer.triggerHandler('n2pause');
|
6759 |
+
if (this.state.continuePlay) {
|
6760 |
+
this.state.continuePlay = false;
|
6761 |
+
this.state.play = true;
|
6762 |
+
} else {
|
6763 |
+
this.state.play = false;
|
6764 |
+
}
|
6765 |
break;
|
6766 |
case YT.PlayerState.ENDED:
|
6767 |
if (this.parameters.loop == 1) {
|
6772 |
this.slider.sliderElement.trigger('mediaEnded', this.playerId);
|
6773 |
}
|
6774 |
layer.triggerHandler('n2stop');
|
6775 |
+
this.state.play = false;
|
6776 |
}
|
6777 |
break;
|
6778 |
|
6791 |
|
6792 |
this.slider.sliderElement.on('SliderResize', $.proxy(this.onResize, this))
|
6793 |
}
|
|
|
6794 |
};
|
6795 |
|
6796 |
FrontendItemYouTube.prototype.onReady = function () {
|
6808 |
//pause video when slide changed
|
6809 |
this.slider.sliderElement.on("mainAnimationStart", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex) {
|
6810 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) == -1) {
|
6811 |
+
this.setState('slide', false);
|
6812 |
+
} else {
|
6813 |
+
this.setState('slide', true);
|
6814 |
}
|
6815 |
}, this));
|
6816 |
if (parseInt(this.parameters.reset)) {
|
6822 |
}
|
6823 |
}
|
6824 |
this.readyDeferred.resolve();
|
6825 |
+
|
6826 |
+
nextend.scrollTracker.add(this.playerElement, $.proxy(function () {
|
6827 |
+
this.setState('scroll', true);
|
6828 |
+
}, this), $.proxy(function () {
|
6829 |
+
this.state.continuePlay = true;
|
6830 |
+
this.setState('scroll', false);
|
6831 |
+
}, this));
|
6832 |
};
|
6833 |
|
6834 |
FrontendItemYouTube.prototype.onResize = function () {
|
6856 |
FrontendItemYouTube.prototype.initAutoplay = function () {
|
6857 |
|
6858 |
if (!this.isStatic) {
|
6859 |
+
this.state.slide = false;
|
6860 |
//change slide
|
6861 |
this.slider.sliderElement.on("mainAnimationComplete", $.proxy(function (e, mainAnimation, previousSlideIndex, currentSlideIndex) {
|
6862 |
if ($.inArray(this.slide, this.slider.getVisibleSlides(this.slider.slides[currentSlideIndex])) >= 0) {
|
6863 |
+
this.state.play = true;
|
6864 |
+
this.setState('slide', true);
|
6865 |
+
} else {
|
6866 |
+
this.setState('slide', false);
|
6867 |
}
|
6868 |
}, this));
|
6869 |
|
6870 |
if ($.inArray(this.slide, this.slider.getVisibleSlides()) >= 0) {
|
6871 |
+
this.state.play = true;
|
6872 |
+
this.setState('slide', true);
|
6873 |
}
|
6874 |
} else {
|
6875 |
+
this.state.play = true;
|
6876 |
+
this.setState('slide', true);
|
6877 |
+
}
|
6878 |
+
};
|
6879 |
+
|
6880 |
+
FrontendItemYouTube.prototype.setState = function (name, value) {
|
6881 |
+
this.state[name] = value;
|
6882 |
+
|
6883 |
+
if (this.state.play && this.state.slide && this.state.scroll) {
|
6884 |
this.play();
|
6885 |
+
} else {
|
6886 |
+
this.pause();
|
6887 |
}
|
6888 |
};
|
6889 |
|
library/media/dist/smartslider-frontend.min.js
CHANGED
@@ -1,4 +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.smartSlider.responsive.ready.done(e.proxy(function(){this._showSlider()},this))},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("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,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&¶meters.responsive.tablet&¶meters.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),universalleave:$.proxy(function(e){e.stopPropagation(),this.sliderElement.removeClass("n2-hover")},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=this.slides.length,t=1,i=this.sliderElement.find(".nextend-arrow-previous"),s=function(e){e!=t&&(NextendTween.to(i,.4,{opacity:e}).play(),t=e)},r=1,n=this.sliderElement.find(".nextend-arrow-next"),o=function(e){e!=r&&(NextendTween.to(n,.4,{opacity:e}).play(),r=e)},a=function(t){s(0==t?0:1),o(t==e-1?0:1)};a(this.currentSlide.index),this.sliderElement.on("sliderSwitchTo",function(e,t){a(t)})},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.initExcludeSlides()}return 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(".nextend-bullet-bar"),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.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.initHover()},SmartSliderWidgets.prototype.initHover=function(){var e=null,t=this.sliderElement.find(".n2-ss-widget-hover");t.length>0&&this.sliderElement.on("universalenter",function(i){var s=$(this);e&&clearTimeout(e),t.css("visibility","visible"),setTimeout(function(){s.addClass("n2-ss-widget-hover-show")},50)}).on("universalleave",function(){var i=this;e&&clearTimeout(e),e=setTimeout(function(){$(i).removeClass("n2-ss-widget-hover-show"),e=setTimeout(function(){t.css("visibility","hidden")},400)},500)})},SmartSliderWidgets.prototype.initExcludeSlides=function(){var e=this.sliderElement.find(".n2-ss-widget[data-exclude-slides]"),t=function(e,t,i){-1!=$.inArray(i+1+"",t)?e.addClass("n2-ss-widget-hidden"):e.removeClass("n2-ss-widget-hidden")};e.each($.proxy(function(e,i){for(var s=$(i),r=s.attr("data-exclude-slides").split(","),e=r.length-1;e>=0;e--){var n=r[e].split("-");if(2==n.length&&parseInt(n[0])<=parseInt(n[1])){r[e]=n[0],n[0]=parseInt(n[0]),n[1]=parseInt(n[1]);for(var o=n[0]+1;o<=n[1];o++)r.push(o+"")}}t(s,r,this.slider.currentRealSlide.index),this.slider.sliderElement.on("sliderSwitchTo",function(e,i){t(s,r,i)})},this))},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))}}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}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({
|
2 |
-
position:"absolute",top:0,left:0}),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()),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()),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",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(){
|
3 |
-
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,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;
|
4 |
-
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();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.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.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.player.on("ended",e.proxy(function(){this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop")},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.pause())},this)),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),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.play():(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.play()},this)),e.inArray(this.slide,this.slider.getVisibleSlides())>=0&&this.play())},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){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:[]},s),(navigator.userAgent.toLowerCase().indexOf("android")>-1||n2const.isIOS)&&(this.parameters.autoplay=0),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.start.showinfo,modestbranding:this.parameters.start.modestbranding};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");break;case YT.PlayerState.ENDED:1==this.parameters.loop?(this.player.seekTo(0),this.player.playVideo()):(this.isStatic||this.slider.sliderElement.trigger("mediaEnded",this.playerId),i.triggerHandler("n2stop"))}},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),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.pause()},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()},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.play():(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.play()},this)),e.inArray(this.slide,this.slider.getVisibleSlides())>=0&&this.play())},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.smartSlider.responsive.ready.done(e.proxy(function(){this._showSlider()},this))},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&¶meters.responsive.tablet&¶meters.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")};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))}}for(var k in this.variableElements)for(var i=0;i<this.variableElements[k].length;i++){
|
2 |
+
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}),this.containerElement.append(this.clonedImages.nextImage)},s.prototype.placeCurrentImage=function(){this.clonedImages.currentImage=this.original.currentImage.clone().css({position:"absolute",top:0,left:0}),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()),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()),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",this.browserSpecific.event="webkitfullscreenchange"):(this.browserSpecific.requestFullscreen="nextendRequestFullscreen",this.browserSpecific.event="nextendfullscreenchange",this.fullParent[0][this.browserSpecific.requestFullscreen]=e.proxy(function(){
|
3 |
+
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,maximumSlideWidthConstrainHeight:0,forceFull:0,forceFullOverflowX:"body",forceFullHorizontalSelector:"",verticalOffsetSelectors:"",focusUser:0,focusAutoplay:0,deviceModes:{desktopLandscape:1,desktopPortrait:0,mobileLandscape:0,
|
4 |
+
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();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){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:[]},s),(navigator.userAgent.toLowerCase().indexOf("android")>-1||n2const.isIOS)&&(this.parameters.autoplay=0),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};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),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),1==this.parameters.autoplay&&this.slider.visible(e.proxy(this.initAutoplay,this)),
|
5 |
+
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
@@ -341,11 +341,15 @@
|
|
341 |
-o-transition: opacity 0.4s ease;
|
342 |
transition: opacity 0.4s ease;
|
343 |
opacity: 1;
|
|
|
|
|
|
|
|
|
|
|
344 |
}
|
345 |
|
346 |
.n2-ss-widget.n2-ss-widget-hidden {
|
347 |
-
opacity: 0
|
348 |
-
z-index: -1;
|
349 |
pointer-events: none;
|
350 |
}
|
351 |
|
@@ -394,18 +398,6 @@
|
|
394 |
-webkit-transform: translate3d(0, 0, 0);
|
395 |
}
|
396 |
|
397 |
-
& div.n2-ss-widget-display-hover {
|
398 |
-
opacity: 0;
|
399 |
-
-webkit-transition: opacity 0.4s ease;
|
400 |
-
-moz-transition: opacity 0.4s ease;
|
401 |
-
-o-transition: opacity 0.4s ease;
|
402 |
-
transition: opacity 0.4s ease;
|
403 |
-
}
|
404 |
-
|
405 |
-
&.n2-hover .n2-ss-widget-display-hover {
|
406 |
-
opacity: 1;
|
407 |
-
}
|
408 |
-
|
409 |
.n2-ss-static-slide {
|
410 |
display: flex;
|
411 |
flex-direction: column;
|
@@ -655,7 +647,7 @@
|
|
655 |
display: block;
|
656 |
}
|
657 |
|
658 |
-
[dir="ltr"] & .n2-ss-layer-row > .n2-ss-layer{
|
659 |
margin-left: 0 !important;
|
660 |
}
|
661 |
|
@@ -667,7 +659,7 @@
|
|
667 |
margin-right: 0;
|
668 |
}
|
669 |
|
670 |
-
[dir="rtl"] & .n2-ss-layer-row > .n2-ss-layer{
|
671 |
margin-right: 0 !important;
|
672 |
}
|
673 |
|
@@ -697,6 +689,7 @@
|
|
697 |
position: relative;
|
698 |
width: 100%;
|
699 |
height: 100%;
|
|
|
700 |
}
|
701 |
|
702 |
.n2-ss-layer[data-type="content"] {
|
341 |
-o-transition: opacity 0.4s ease;
|
342 |
transition: opacity 0.4s ease;
|
343 |
opacity: 1;
|
344 |
+
|
345 |
+
-webkit-transition: opacity 0.4s ease;
|
346 |
+
-moz-transition: opacity 0.4s ease;
|
347 |
+
-o-transition: opacity 0.4s ease;
|
348 |
+
transition: opacity 0.4s ease;
|
349 |
}
|
350 |
|
351 |
.n2-ss-widget.n2-ss-widget-hidden {
|
352 |
+
opacity: 0;
|
|
|
353 |
pointer-events: none;
|
354 |
}
|
355 |
|
398 |
-webkit-transform: translate3d(0, 0, 0);
|
399 |
}
|
400 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
.n2-ss-static-slide {
|
402 |
display: flex;
|
403 |
flex-direction: column;
|
647 |
display: block;
|
648 |
}
|
649 |
|
650 |
+
[dir="ltr"] & .n2-ss-layer-row > .n2-ss-layer {
|
651 |
margin-left: 0 !important;
|
652 |
}
|
653 |
|
659 |
margin-right: 0;
|
660 |
}
|
661 |
|
662 |
+
[dir="rtl"] & .n2-ss-layer-row > .n2-ss-layer {
|
663 |
margin-right: 0 !important;
|
664 |
}
|
665 |
|
689 |
position: relative;
|
690 |
width: 100%;
|
691 |
height: 100%;
|
692 |
+
z-index: 1;
|
693 |
}
|
694 |
|
695 |
.n2-ss-layer[data-type="content"] {
|
library/media/plugins/widgetbar/horizontal/horizontal/bar.js
CHANGED
@@ -5,7 +5,7 @@ N2Require('SmartSliderWidgetBarHorizontal', [], [], function ($, scope, undefine
|
|
5 |
this.slider = window[id];
|
6 |
|
7 |
this.slider.started($.proxy(this.start, this, id, bars, parameters));
|
8 |
-
}
|
9 |
|
10 |
SmartSliderWidgetBarHorizontal.prototype.start = function (id, bars, parameters) {
|
11 |
if (this.slider.sliderElement.data('bar')) {
|
@@ -62,7 +62,7 @@ N2Require('SmartSliderWidgetBarHorizontal', [], [], function ($, scope, undefine
|
|
62 |
}
|
63 |
|
64 |
var event = 'click';
|
65 |
-
if (this.slider.
|
66 |
event = 'n2click';
|
67 |
}
|
68 |
|
5 |
this.slider = window[id];
|
6 |
|
7 |
this.slider.started($.proxy(this.start, this, id, bars, parameters));
|
8 |
+
}
|
9 |
|
10 |
SmartSliderWidgetBarHorizontal.prototype.start = function (id, bars, parameters) {
|
11 |
if (this.slider.sliderElement.data('bar')) {
|
62 |
}
|
63 |
|
64 |
var event = 'click';
|
65 |
+
if (this.slider.hasTouch()) {
|
66 |
event = 'n2click';
|
67 |
}
|
68 |
|
library/media/plugins/widgetbar/horizontal/horizontal/bar.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
N2Require("SmartSliderWidgetBarHorizontal",[],[],function(i,t,e){"use strict";function s(t,e,s){this.slider=window[t],this.slider.started(i.proxy(this.start,this,t,e,s))}return s.prototype.start=function(t,e,s){if(this.slider.sliderElement.data("bar"))return!1;if(this.slider.sliderElement.data("bar",this),this.offset=0,this.tween=null,this.slider.isShuffled){for(var r=[],n=0;n<this.slider.realSlides.length;n++){var o=this.slider.realSlides[n];r.push(e[o.originalIndex])}e=r}if(this.originalBars=this.bars=e,this.bar=this.slider.sliderElement.find(".nextend-bar"),this.innerBar=this.bar.find("> div"),this.slider.sliderElement.on({slideCountChanged:i.proxy(this.onSlideCountChanged,this)}),this.slider.firstSlideReady.done(i.proxy(this.onFirstSlideSet,this)),s.animate?this.slider.sliderElement.on("mainAnimationStart",i.proxy(this.onSliderSwitchToAnimateStart,this)):this.slider.sliderElement.on("sliderSwitchTo",i.proxy(this.onSliderSwitchTo,this)),0==s.overlay){var a=!1;switch(s.area){case 1:a="Top";break;case 12:a="Bottom"}a&&(this.offset=parseFloat(this.bar.data("offset")),this.slider.responsive.addStaticMargin(a,this))}var h="click";
|
1 |
+
N2Require("SmartSliderWidgetBarHorizontal",[],[],function(i,t,e){"use strict";function s(t,e,s){this.slider=window[t],this.slider.started(i.proxy(this.start,this,t,e,s))}return s.prototype.start=function(t,e,s){if(this.slider.sliderElement.data("bar"))return!1;if(this.slider.sliderElement.data("bar",this),this.offset=0,this.tween=null,this.slider.isShuffled){for(var r=[],n=0;n<this.slider.realSlides.length;n++){var o=this.slider.realSlides[n];r.push(e[o.originalIndex])}e=r}if(this.originalBars=this.bars=e,this.bar=this.slider.sliderElement.find(".nextend-bar"),this.innerBar=this.bar.find("> div"),this.slider.sliderElement.on({slideCountChanged:i.proxy(this.onSlideCountChanged,this)}),this.slider.firstSlideReady.done(i.proxy(this.onFirstSlideSet,this)),s.animate?this.slider.sliderElement.on("mainAnimationStart",i.proxy(this.onSliderSwitchToAnimateStart,this)):this.slider.sliderElement.on("sliderSwitchTo",i.proxy(this.onSliderSwitchTo,this)),0==s.overlay){var a=!1;switch(s.area){case 1:a="Top";break;case 12:a="Bottom"}a&&(this.offset=parseFloat(this.bar.data("offset")),this.slider.responsive.addStaticMargin(a,this))}var h="click";this.slider.hasTouch()&&(h="n2click"),this.bar.on("click",i.proxy(function(i){this.slider.sliderElement.find(".n2-ss-slide-active .n2-ss-layers-container").trigger(h)},this))},s.prototype.onFirstSlideSet=function(i){this.onSliderSwitchTo(null,i.index)},s.prototype.onSliderSwitchTo=function(i,t){this.innerBar.html(this.bars[t].html),this.setCursor(this.bars[t].hasLink)},s.prototype.onSliderSwitchToAnimateStart=function(){var t=i.Deferred();this.slider.sliderElement.on("mainAnimationComplete.n2Bar",i.proxy(this.onSliderSwitchToAnimateEnd,this,t)),this.tween&&this.tween.pause(),NextendTween.to(this.innerBar,.3,{opacity:0,onComplete:function(){t.resolve()}}).play()},s.prototype.onSliderSwitchToAnimateEnd=function(t,e,s,r,n){this.slider.sliderElement.off(".n2Bar"),t.done(i.proxy(function(){var i=this.innerBar.clone();this.innerBar.remove(),this.innerBar=i.css("opacity",0).html(this.bars[n].html).appendTo(this.bar),this.setCursor(this.bars[n].hasLink),this.tween=NextendTween.to(this.innerBar,.3,{opacity:1}).play()},this))},s.prototype.setCursor=function(i){i?this.innerBar.css("cursor","pointer"):this.innerBar.css("cursor","inherit")},s.prototype.isVisible=function(){return this.bar.is(":visible")},s.prototype.getSize=function(){return this.bar.height()+this.offset},s.prototype.onSlideCountChanged=function(i,t,e){this.bars=[];for(var s=0;s<this.originalBars.length;s++)s%e==0&&this.bars.push(this.originalBars[s])},s});
|
library/smartslider/N2SmartsliderApplicationInfo.php
CHANGED
@@ -107,7 +107,7 @@ class N2SmartsliderApplicationInfo extends N2ApplicationInfo {
|
|
107 |
size: [
|
108 |
600, 460
|
109 |
],
|
110 |
-
title: n2_(\'' . n2_('Join the
|
111 |
back: false,
|
112 |
close: true,
|
113 |
content: \'<form class="n2-form"></form>\',
|
@@ -117,7 +117,7 @@ class N2SmartsliderApplicationInfo extends N2ApplicationInfo {
|
|
117 |
var form = this.content.find(\'.n2-form\');
|
118 |
|
119 |
form.append(\'<img src="' . N2ImageHelper::fixed('$ss$/admin/images/free/newsletter.jpg') . '" />\');
|
120 |
-
form.append(this.createHeading("Join more than
|
121 |
|
122 |
form.append(\'<div class="n2-input-button"><input type="email" id="EMAIL" name="EMAIL" value="" /><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">Get Free Sliders</a></div>\');
|
123 |
|
107 |
size: [
|
108 |
600, 460
|
109 |
],
|
110 |
+
title: n2_(\'' . n2_('Join the Smart Slider community!') . '\'),
|
111 |
back: false,
|
112 |
close: true,
|
113 |
content: \'<form class="n2-form"></form>\',
|
117 |
var form = this.content.find(\'.n2-form\');
|
118 |
|
119 |
form.append(\'<img src="' . N2ImageHelper::fixed('$ss$/admin/images/free/newsletter.jpg') . '" />\');
|
120 |
+
form.append(this.createHeading("Join more than 15,000 subscribers and get access to the latest Sample Sliders, Tip & tricks and other exclusive contents directly to your inbox!"));
|
121 |
|
122 |
form.append(\'<div class="n2-input-button"><input type="email" id="EMAIL" name="EMAIL" value="" /><a href="#" class="n2-button n2-button-normal n2-button-l n2-radius-s n2-button-green n2-uc n2-h4">Get Free Sliders</a></div>\');
|
123 |
|
library/smartslider/backend/helpers/controller/N2SmartSliderController.php
CHANGED
@@ -16,8 +16,8 @@ class N2SmartSliderController extends N2BackendController {
|
|
16 |
public function loadSliderManager() {
|
17 |
|
18 |
N2SS3::initLicense();
|
|
|
19 |
|
20 |
-
N2JS::addInline("new N2Classes.ManageSliders('" . N2Request::getInt('sliderid', 0) . "', '" . $this->appType->router->createUrl(array('slider/create')) . "');");
|
21 |
|
22 |
N2Localization::addJS(array(
|
23 |
'Create Slider',
|
16 |
public function loadSliderManager() {
|
17 |
|
18 |
N2SS3::initLicense();
|
19 |
+
N2JS::addInline("new N2Classes.ManageSliders('" . N2Request::getInt('sliderid', 0) . "', '" . $this->appType->router->createUrl(array('slider/create')) . "', " . json_encode(N2SS3::shouldSkipLicenseModal()) . ");");
|
20 |
|
|
|
21 |
|
22 |
N2Localization::addJS(array(
|
23 |
'Create Slider',
|
library/smartslider/languages/fi_FI.mo
ADDED
Binary file
|
library/smartslider/languages/it_IT.mo
CHANGED
Binary file
|
library/smartslider/libraries/slider/abstract.php
CHANGED
@@ -287,7 +287,7 @@ abstract class N2SmartSliderAbstract {
|
|
287 |
$slider = '<div class="n2-clear"></div>' . $slider;
|
288 |
}
|
289 |
|
290 |
-
return
|
291 |
}
|
292 |
|
293 |
public function addStaticSlide($slide) {
|
287 |
$slider = '<div class="n2-clear"></div>' . $slider;
|
288 |
}
|
289 |
|
290 |
+
return $slider;
|
291 |
}
|
292 |
|
293 |
public function addStaticSlide($slide) {
|
library/smartslider/libraries/slider/features/features.php
CHANGED
@@ -90,7 +90,40 @@ class N2SmartSliderFeatures {
|
|
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 |
|
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 |
|
library/smartslider/libraries/slider/features/layermode.php
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
class N2SmartSliderFeatureLayerMode
|
4 |
-
{
|
5 |
|
6 |
private $slider;
|
7 |
|
@@ -39,6 +38,9 @@ class N2SmartSliderFeatureLayerMode
|
|
39 |
}
|
40 |
|
41 |
public function makeJavaScriptProperties(&$properties) {
|
|
|
|
|
|
|
42 |
$properties['layerMode'] = array(
|
43 |
'playOnce' => $this->playOnce,
|
44 |
'playFirstLayer' => $this->playFirstLayer,
|
@@ -46,7 +48,6 @@ class N2SmartSliderFeatureLayerMode
|
|
46 |
'inAnimation' => $this->inAnimation
|
47 |
);
|
48 |
|
49 |
-
$params = $this->slider->params;
|
50 |
$properties['parallax'] = array(
|
51 |
'enabled' => intval($params->get('parallax-enabled', 1)),
|
52 |
'mobile' => intval($params->get('parallax-enabled-mobile', 0)),
|
1 |
<?php
|
2 |
|
3 |
+
class N2SmartSliderFeatureLayerMode {
|
|
|
4 |
|
5 |
private $slider;
|
6 |
|
38 |
}
|
39 |
|
40 |
public function makeJavaScriptProperties(&$properties) {
|
41 |
+
$params = $this->slider->params;
|
42 |
+
$properties['perspective'] = max(0, intval($params->get('perspective', 1500)));
|
43 |
+
|
44 |
$properties['layerMode'] = array(
|
45 |
'playOnce' => $this->playOnce,
|
46 |
'playFirstLayer' => $this->playFirstLayer,
|
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)),
|
library/smartslider/libraries/slider/slides/slide.php
CHANGED
@@ -175,13 +175,17 @@ class N2SmartSliderSlide {
|
|
175 |
protected function addSlideLink() {
|
176 |
list($url, $target) = (array)N2Parse::parse($this->parameters->getIfEmpty('link', '|*|'));
|
177 |
|
|
|
|
|
|
|
|
|
178 |
if (!empty($url) && $url != '#') {
|
179 |
|
180 |
if (empty($target)) {
|
181 |
$target = '_self';
|
182 |
}
|
183 |
|
184 |
-
$url = N2ImageHelper::fixed($
|
185 |
|
186 |
$this->containerAttributes['onclick'] = '';
|
187 |
if (strpos($url, 'javascript:') === 0) {
|
@@ -295,11 +299,14 @@ class N2SmartSliderSlide {
|
|
295 |
$args[$i] = $this->parseVariable($args[$i]);
|
296 |
}
|
297 |
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
|
|
|
|
302 |
|
|
|
303 |
} else {
|
304 |
return $this->parseVariable($match[5]);
|
305 |
}
|
175 |
protected function addSlideLink() {
|
176 |
list($url, $target) = (array)N2Parse::parse($this->parameters->getIfEmpty('link', '|*|'));
|
177 |
|
178 |
+
if (!empty($url) && $url != '#') {
|
179 |
+
$url = $this->fill($url);
|
180 |
+
}
|
181 |
+
|
182 |
if (!empty($url) && $url != '#') {
|
183 |
|
184 |
if (empty($target)) {
|
185 |
$target = '_self';
|
186 |
}
|
187 |
|
188 |
+
$url = N2ImageHelper::fixed($url);
|
189 |
|
190 |
$this->containerAttributes['onclick'] = '';
|
191 |
if (strpos($url, 'javascript:') === 0) {
|
299 |
$args[$i] = $this->parseVariable($args[$i]);
|
300 |
}
|
301 |
|
302 |
+
if (method_exists($this, '_' . $match[3])) {
|
303 |
+
return call_user_func_array(array(
|
304 |
+
$this,
|
305 |
+
'_' . $match[3]
|
306 |
+
), $args);
|
307 |
+
}
|
308 |
|
309 |
+
return $match[0];
|
310 |
} else {
|
311 |
return $this->parseVariable($match[5]);
|
312 |
}
|
library/smartslider/libraries/slider/type.php
CHANGED
@@ -43,8 +43,9 @@ abstract class N2SmartSliderType {
|
|
43 |
|
44 |
protected function openSliderElement() {
|
45 |
return N2Html::openTag('div', array(
|
46 |
-
'id'
|
47 |
-
'
|
|
|
48 |
|
49 |
) + $this->getFontSizeAttributes());
|
50 |
}
|
43 |
|
44 |
protected function openSliderElement() {
|
45 |
return N2Html::openTag('div', array(
|
46 |
+
'id' => $this->slider->elementId,
|
47 |
+
'data-creator' => 'Smart Slider 3',
|
48 |
+
'class' => 'n2-ss-slider n2-ow n2-has-hover n2notransition ' . $this->getSliderClasses(),
|
49 |
|
50 |
) + $this->getFontSizeAttributes());
|
51 |
}
|
library/smartslider/libraries/storage.php
CHANGED
@@ -1901,7 +1901,7 @@ class N2SmartSliderStorage {
|
|
1901 |
"id" => 1015,
|
1902 |
'referencekey' => 1000,
|
1903 |
"value" => array(
|
1904 |
-
'name' => n2_('To
|
1905 |
'data' => array(
|
1906 |
'duration' => 5,
|
1907 |
'strength' => array(
|
@@ -1916,7 +1916,7 @@ class N2SmartSliderStorage {
|
|
1916 |
'to' => array(
|
1917 |
'scale' => 1.5,
|
1918 |
'x' => 100,
|
1919 |
-
'y' =>
|
1920 |
)
|
1921 |
)
|
1922 |
)
|
1901 |
"id" => 1015,
|
1902 |
'referencekey' => 1000,
|
1903 |
"value" => array(
|
1904 |
+
'name' => n2_('To top left'),
|
1905 |
'data' => array(
|
1906 |
'duration' => 5,
|
1907 |
'strength' => array(
|
1916 |
'to' => array(
|
1917 |
'scale' => 1.5,
|
1918 |
'x' => 100,
|
1919 |
+
'y' => 100
|
1920 |
)
|
1921 |
)
|
1922 |
)
|
library/smartslider/models/License.php
CHANGED
@@ -5,7 +5,11 @@ class N2SmartsliderLicenseModel {
|
|
5 |
private $key;
|
6 |
|
7 |
public function __construct() {
|
8 |
-
|
|
|
|
|
|
|
|
|
9 |
|
10 |
}
|
11 |
|
5 |
private $key;
|
6 |
|
7 |
public function __construct() {
|
8 |
+
if(defined('SMART_SLIDER_LICENSE')){
|
9 |
+
$this->key = SMART_SLIDER_LICENSE;
|
10 |
+
} else {
|
11 |
+
$this->key = N2Base::getApplication('smartslider')->storage->get('license', 'key');
|
12 |
+
}
|
13 |
|
14 |
}
|
15 |
|
library/smartslider/models/forms/slider.xml
CHANGED
@@ -133,6 +133,8 @@
|
|
133 |
<params name="developer-options" hidetitle="1">
|
134 |
<param name="overflow-hidden-page" type="onoff" label="Hide website's scrollbar" default="0" tip="You won'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't resize correctly, turn this option on." default="0"/>
|
|
|
|
|
136 |
<param type="textarea" name="callbacks" label="JavaScript callbacks" style2="width:600px;height:600px;"/>
|
137 |
</params>
|
138 |
</params>
|
133 |
<params name="developer-options" hidetitle="1">
|
134 |
<param name="overflow-hidden-page" type="onoff" label="Hide website's scrollbar" default="0" tip="You won'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'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'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>
|
library/smartslider/models/generator.php
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
<?php
|
2 |
N2Loader::import("libraries.slider.abstract", "smartslider");
|
3 |
|
4 |
-
class N2SmartsliderGeneratorModel extends N2Model
|
5 |
-
{
|
6 |
|
7 |
private static $layouts = array(
|
8 |
'image' => '{"title":"{title}","description":"","thumbnail":"{thumbnail}","backgroundColor":"ffffff00","backgroundImage":"{image}","backgroundAlt":"","backgroundtitle":"","backgroundMode":"default","backgroundVideoMp4":"","backgroundVideoMuted":"1","backgroundVideoLoop":"1","backgroundVideoMode":"fill","link":"|*|_self","slidedurationin":"0","slidedurationout":"0","slide":[]}',
|
@@ -123,6 +122,22 @@ class N2SmartsliderGeneratorModel extends N2Model
|
|
123 |
));
|
124 |
break;
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
case 'social_post':
|
127 |
$slide->set('title', "{title}")
|
128 |
->set('description', "{description}")
|
@@ -163,6 +178,7 @@ class N2SmartsliderGeneratorModel extends N2Model
|
|
163 |
'published' => 1
|
164 |
);
|
165 |
}
|
|
|
166 |
return $slide->toArray();
|
167 |
}
|
168 |
|
@@ -342,6 +358,7 @@ class N2SmartsliderGeneratorModel extends N2Model
|
|
342 |
public function duplicate($id) {
|
343 |
$generatorRow = $this->get($id);
|
344 |
$generatorId = $this->_create($generatorRow['type'], $generatorRow['group'], $generatorRow['params']);
|
|
|
345 |
return $generatorId;
|
346 |
}
|
347 |
|
1 |
<?php
|
2 |
N2Loader::import("libraries.slider.abstract", "smartslider");
|
3 |
|
4 |
+
class N2SmartsliderGeneratorModel extends N2Model {
|
|
|
5 |
|
6 |
private static $layouts = array(
|
7 |
'image' => '{"title":"{title}","description":"","thumbnail":"{thumbnail}","backgroundColor":"ffffff00","backgroundImage":"{image}","backgroundAlt":"","backgroundtitle":"","backgroundMode":"default","backgroundVideoMp4":"","backgroundVideoMuted":"1","backgroundVideoLoop":"1","backgroundVideoMode":"fill","link":"|*|_self","slidedurationin":"0","slidedurationout":"0","slide":[]}',
|
122 |
));
|
123 |
break;
|
124 |
|
125 |
+
case 'vimeo':
|
126 |
+
$slide->set('title', "{title}")
|
127 |
+
->set('description', "{description}")
|
128 |
+
->set('thumbnail', "{image200x150/1}");
|
129 |
+
|
130 |
+
new N2SmartSliderItemHelper($slide, 'vimeo', array(
|
131 |
+
'desktopportraitwidth' => '100%',
|
132 |
+
'desktopportraitheight' => '100%',
|
133 |
+
'desktopportraitleft' => 0,
|
134 |
+
'desktopportraittop' => 0
|
135 |
+
), array(
|
136 |
+
'vimeourl' => '{url}',
|
137 |
+
'image' => ''
|
138 |
+
));
|
139 |
+
break;
|
140 |
+
|
141 |
case 'social_post':
|
142 |
$slide->set('title', "{title}")
|
143 |
->set('description', "{description}")
|
178 |
'published' => 1
|
179 |
);
|
180 |
}
|
181 |
+
|
182 |
return $slide->toArray();
|
183 |
}
|
184 |
|
358 |
public function duplicate($id) {
|
359 |
$generatorRow = $this->get($id);
|
360 |
$generatorId = $this->_create($generatorRow['type'], $generatorRow['group'], $generatorRow['params']);
|
361 |
+
|
362 |
return $generatorId;
|
363 |
}
|
364 |
|
library/smartslider/plugins/item/image/image/configuration.xml
CHANGED
@@ -18,5 +18,10 @@
|
|
18 |
</param>
|
19 |
<param type="group">
|
20 |
<param name="alt" type="text" label="Alt" style="width:125px;" default=""/></param>
|
|
|
|
|
|
|
|
|
|
|
21 |
</params>
|
22 |
</root>
|
18 |
</param>
|
19 |
<param type="group">
|
20 |
<param name="alt" type="text" label="Alt" style="width:125px;" default=""/></param>
|
21 |
+
<param type="group">
|
22 |
+
<param name="size" type="mixed" default="auto|*|auto">
|
23 |
+
<param type="text" style="width:60px;" label="Width"/>
|
24 |
+
<param type="text" style="width:60px;" label="Height"/></param>
|
25 |
+
</param>
|
26 |
</params>
|
27 |
</root>
|
library/smartslider/smartslider3.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
class N2SS3 {
|
4 |
|
5 |
-
public static $version = '3.2.
|
6 |
|
7 |
public static $plan = 'pro';
|
8 |
|
@@ -12,17 +12,20 @@ class N2SS3 {
|
|
12 |
|
13 |
public static $source = '';
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
public static function applySource(&$params) {
|
16 |
static $isSourceSet = false;
|
17 |
if (!$isSourceSet) {
|
18 |
-
N2SS3::$plan = 'free';
|
19 |
if (defined('SMARTSLIDER3AFFILIATE')) {
|
20 |
N2SS3::$source = SMARTSLIDER3AFFILIATE;
|
21 |
}
|
22 |
N2SS3::$source = apply_filters('smartslider3_hoplink', N2SS3::$source);
|
23 |
|
24 |
|
25 |
-
|
26 |
$isSourceSet = true;
|
27 |
}
|
28 |
|
@@ -127,4 +130,5 @@ class N2SS3 {
|
|
127 |
|
128 |
public static function initLicense() {
|
129 |
}
|
130 |
-
}
|
|
2 |
|
3 |
class N2SS3 {
|
4 |
|
5 |
+
public static $version = '3.2.10';
|
6 |
|
7 |
public static $plan = 'pro';
|
8 |
|
12 |
|
13 |
public static $source = '';
|
14 |
|
15 |
+
public static function shouldSkipLicenseModal() {
|
16 |
+
return true;
|
17 |
+
|
18 |
+
}
|
19 |
+
|
20 |
public static function applySource(&$params) {
|
21 |
static $isSourceSet = false;
|
22 |
if (!$isSourceSet) {
|
|
|
23 |
if (defined('SMARTSLIDER3AFFILIATE')) {
|
24 |
N2SS3::$source = SMARTSLIDER3AFFILIATE;
|
25 |
}
|
26 |
N2SS3::$source = apply_filters('smartslider3_hoplink', N2SS3::$source);
|
27 |
|
28 |
|
|
|
29 |
$isSourceSet = true;
|
30 |
}
|
31 |
|
130 |
|
131 |
public static function initLicense() {
|
132 |
}
|
133 |
+
}
|
134 |
+
N2SS3::$plan = 'free';
|
nextend/library/applications/system/plugins/nextendfontservices/google/families.csv
ADDED
@@ -0,0 +1,846 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
ABeeZee
|
2 |
+
Abel
|
3 |
+
Abhaya Libre
|
4 |
+
Abril Fatface
|
5 |
+
Aclonica
|
6 |
+
Acme
|
7 |
+
Actor
|
8 |
+
Adamina
|
9 |
+
Advent Pro
|
10 |
+
Aguafina Script
|
11 |
+
Akronim
|
12 |
+
Aladin
|
13 |
+
Aldrich
|
14 |
+
Alef
|
15 |
+
Alegreya
|
16 |
+
Alegreya SC
|
17 |
+
Alegreya Sans
|
18 |
+
Alegreya Sans SC
|
19 |
+
Alex Brush
|
20 |
+
Alfa Slab One
|
21 |
+
Alice
|
22 |
+
Alike
|
23 |
+
Alike Angular
|
24 |
+
Allan
|
25 |
+
Allerta
|
26 |
+
Allerta Stencil
|
27 |
+
Allura
|
28 |
+
Almendra
|
29 |
+
Almendra Display
|
30 |
+
Almendra SC
|
31 |
+
Amarante
|
32 |
+
Amaranth
|
33 |
+
Amatic SC
|
34 |
+
Amethysta
|
35 |
+
Amiko
|
36 |
+
Amiri
|
37 |
+
Amita
|
38 |
+
Anaheim
|
39 |
+
Andada
|
40 |
+
Andika
|
41 |
+
Angkor
|
42 |
+
Annie Use Your Telescope
|
43 |
+
Anonymous Pro
|
44 |
+
Antic
|
45 |
+
Antic Didone
|
46 |
+
Antic Slab
|
47 |
+
Anton
|
48 |
+
Arapey
|
49 |
+
Arbutus
|
50 |
+
Arbutus Slab
|
51 |
+
Architects Daughter
|
52 |
+
Archivo
|
53 |
+
Archivo Black
|
54 |
+
Archivo Narrow
|
55 |
+
Aref Ruqaa
|
56 |
+
Arima Madurai
|
57 |
+
Arimo
|
58 |
+
Arizonia
|
59 |
+
Armata
|
60 |
+
Arsenal
|
61 |
+
Artifika
|
62 |
+
Arvo
|
63 |
+
Arya
|
64 |
+
Asap
|
65 |
+
Asap Condensed
|
66 |
+
Asar
|
67 |
+
Asset
|
68 |
+
Assistant
|
69 |
+
Astloch
|
70 |
+
Asul
|
71 |
+
Athiti
|
72 |
+
Atma
|
73 |
+
Atomic Age
|
74 |
+
Aubrey
|
75 |
+
Audiowide
|
76 |
+
Autour One
|
77 |
+
Average
|
78 |
+
Average Sans
|
79 |
+
Averia Gruesa Libre
|
80 |
+
Averia Libre
|
81 |
+
Averia Sans Libre
|
82 |
+
Averia Serif Libre
|
83 |
+
Bad Script
|
84 |
+
Bahiana
|
85 |
+
Baloo
|
86 |
+
Baloo Bhai
|
87 |
+
Baloo Bhaijaan
|
88 |
+
Baloo Bhaina
|
89 |
+
Baloo Chettan
|
90 |
+
Baloo Da
|
91 |
+
Baloo Paaji
|
92 |
+
Baloo Tamma
|
93 |
+
Baloo Tammudu
|
94 |
+
Baloo Thambi
|
95 |
+
Balthazar
|
96 |
+
Bangers
|
97 |
+
Barrio
|
98 |
+
Basic
|
99 |
+
Battambang
|
100 |
+
Baumans
|
101 |
+
Bayon
|
102 |
+
Belgrano
|
103 |
+
Bellefair
|
104 |
+
Belleza
|
105 |
+
BenchNine
|
106 |
+
Bentham
|
107 |
+
Berkshire Swash
|
108 |
+
Bevan
|
109 |
+
Bigelow Rules
|
110 |
+
Bigshot One
|
111 |
+
Bilbo
|
112 |
+
Bilbo Swash Caps
|
113 |
+
BioRhyme
|
114 |
+
BioRhyme Expanded
|
115 |
+
Biryani
|
116 |
+
Bitter
|
117 |
+
Black Ops One
|
118 |
+
Bokor
|
119 |
+
Bonbon
|
120 |
+
Boogaloo
|
121 |
+
Bowlby One
|
122 |
+
Bowlby One SC
|
123 |
+
Brawler
|
124 |
+
Bree Serif
|
125 |
+
Bubblegum Sans
|
126 |
+
Bubbler One
|
127 |
+
Buda
|
128 |
+
Buenard
|
129 |
+
Bungee
|
130 |
+
Bungee Hairline
|
131 |
+
Bungee Inline
|
132 |
+
Bungee Outline
|
133 |
+
Bungee Shade
|
134 |
+
Butcherman
|
135 |
+
Butterfly Kids
|
136 |
+
Cabin
|
137 |
+
Cabin Condensed
|
138 |
+
Cabin Sketch
|
139 |
+
Caesar Dressing
|
140 |
+
Cagliostro
|
141 |
+
Cairo
|
142 |
+
Calligraffitti
|
143 |
+
Cambay
|
144 |
+
Cambo
|
145 |
+
Candal
|
146 |
+
Cantarell
|
147 |
+
Cantata One
|
148 |
+
Cantora One
|
149 |
+
Capriola
|
150 |
+
Cardo
|
151 |
+
Carme
|
152 |
+
Carrois Gothic
|
153 |
+
Carrois Gothic SC
|
154 |
+
Carter One
|
155 |
+
Catamaran
|
156 |
+
Caudex
|
157 |
+
Caveat
|
158 |
+
Caveat Brush
|
159 |
+
Cedarville Cursive
|
160 |
+
Ceviche One
|
161 |
+
Changa
|
162 |
+
Changa One
|
163 |
+
Chango
|
164 |
+
Chathura
|
165 |
+
Chau Philomene One
|
166 |
+
Chela One
|
167 |
+
Chelsea Market
|
168 |
+
Chenla
|
169 |
+
Cherry Cream Soda
|
170 |
+
Cherry Swash
|
171 |
+
Chewy
|
172 |
+
Chicle
|
173 |
+
Chivo
|
174 |
+
Chonburi
|
175 |
+
Cinzel
|
176 |
+
Cinzel Decorative
|
177 |
+
Clicker Script
|
178 |
+
Coda
|
179 |
+
Coda Caption
|
180 |
+
Codystar
|
181 |
+
Coiny
|
182 |
+
Combo
|
183 |
+
Comfortaa
|
184 |
+
Coming Soon
|
185 |
+
Concert One
|
186 |
+
Condiment
|
187 |
+
Content
|
188 |
+
Contrail One
|
189 |
+
Convergence
|
190 |
+
Cookie
|
191 |
+
Copse
|
192 |
+
Corben
|
193 |
+
Cormorant
|
194 |
+
Cormorant Garamond
|
195 |
+
Cormorant Infant
|
196 |
+
Cormorant SC
|
197 |
+
Cormorant Unicase
|
198 |
+
Cormorant Upright
|
199 |
+
Courgette
|
200 |
+
Cousine
|
201 |
+
Coustard
|
202 |
+
Covered By Your Grace
|
203 |
+
Crafty Girls
|
204 |
+
Creepster
|
205 |
+
Crete Round
|
206 |
+
Crimson Text
|
207 |
+
Croissant One
|
208 |
+
Crushed
|
209 |
+
Cuprum
|
210 |
+
Cutive
|
211 |
+
Cutive Mono
|
212 |
+
Damion
|
213 |
+
Dancing Script
|
214 |
+
Dangrek
|
215 |
+
David Libre
|
216 |
+
Dawning of a New Day
|
217 |
+
Days One
|
218 |
+
Dekko
|
219 |
+
Delius
|
220 |
+
Delius Swash Caps
|
221 |
+
Delius Unicase
|
222 |
+
Della Respira
|
223 |
+
Denk One
|
224 |
+
Devonshire
|
225 |
+
Dhurjati
|
226 |
+
Didact Gothic
|
227 |
+
Diplomata
|
228 |
+
Diplomata SC
|
229 |
+
Domine
|
230 |
+
Donegal One
|
231 |
+
Doppio One
|
232 |
+
Dorsa
|
233 |
+
Dosis
|
234 |
+
Dr Sugiyama
|
235 |
+
Droid Sans
|
236 |
+
Droid Sans Mono
|
237 |
+
Droid Serif
|
238 |
+
Duru Sans
|
239 |
+
Dynalight
|
240 |
+
EB Garamond
|
241 |
+
Eagle Lake
|
242 |
+
Eater
|
243 |
+
Economica
|
244 |
+
Eczar
|
245 |
+
El Messiri
|
246 |
+
Electrolize
|
247 |
+
Elsie
|
248 |
+
Elsie Swash Caps
|
249 |
+
Emblema One
|
250 |
+
Emilys Candy
|
251 |
+
Encode Sans
|
252 |
+
Encode Sans Condensed
|
253 |
+
Encode Sans Expanded
|
254 |
+
Encode Sans Semi Condensed
|
255 |
+
Encode Sans Semi Expanded
|
256 |
+
Engagement
|
257 |
+
Englebert
|
258 |
+
Enriqueta
|
259 |
+
Erica One
|
260 |
+
Esteban
|
261 |
+
Euphoria Script
|
262 |
+
Ewert
|
263 |
+
Exo
|
264 |
+
Exo 2
|
265 |
+
Expletus Sans
|
266 |
+
Fanwood Text
|
267 |
+
Farsan
|
268 |
+
Fascinate
|
269 |
+
Fascinate Inline
|
270 |
+
Faster One
|
271 |
+
Fasthand
|
272 |
+
Fauna One
|
273 |
+
Faustina
|
274 |
+
Federant
|
275 |
+
Federo
|
276 |
+
Felipa
|
277 |
+
Fenix
|
278 |
+
Finger Paint
|
279 |
+
Fira Mono
|
280 |
+
Fira Sans
|
281 |
+
Fira Sans Condensed
|
282 |
+
Fira Sans Extra Condensed
|
283 |
+
Fjalla One
|
284 |
+
Fjord One
|
285 |
+
Flamenco
|
286 |
+
Flavors
|
287 |
+
Fondamento
|
288 |
+
Fontdiner Swanky
|
289 |
+
Forum
|
290 |
+
Francois One
|
291 |
+
Frank Ruhl Libre
|
292 |
+
Freckle Face
|
293 |
+
Fredericka the Great
|
294 |
+
Fredoka One
|
295 |
+
Freehand
|
296 |
+
Fresca
|
297 |
+
Frijole
|
298 |
+
Fruktur
|
299 |
+
Fugaz One
|
300 |
+
GFS Didot
|
301 |
+
GFS Neohellenic
|
302 |
+
Gabriela
|
303 |
+
Gafata
|
304 |
+
Galada
|
305 |
+
Galdeano
|
306 |
+
Galindo
|
307 |
+
Gentium Basic
|
308 |
+
Gentium Book Basic
|
309 |
+
Geo
|
310 |
+
Geostar
|
311 |
+
Geostar Fill
|
312 |
+
Germania One
|
313 |
+
Gidugu
|
314 |
+
Gilda Display
|
315 |
+
Give You Glory
|
316 |
+
Glass Antiqua
|
317 |
+
Glegoo
|
318 |
+
Gloria Hallelujah
|
319 |
+
Goblin One
|
320 |
+
Gochi Hand
|
321 |
+
Gorditas
|
322 |
+
Goudy Bookletter 1911
|
323 |
+
Graduate
|
324 |
+
Grand Hotel
|
325 |
+
Gravitas One
|
326 |
+
Great Vibes
|
327 |
+
Griffy
|
328 |
+
Gruppo
|
329 |
+
Gudea
|
330 |
+
Gurajada
|
331 |
+
Habibi
|
332 |
+
Halant
|
333 |
+
Hammersmith One
|
334 |
+
Hanalei
|
335 |
+
Hanalei Fill
|
336 |
+
Handlee
|
337 |
+
Hanuman
|
338 |
+
Happy Monkey
|
339 |
+
Harmattan
|
340 |
+
Headland One
|
341 |
+
Heebo
|
342 |
+
Henny Penny
|
343 |
+
Herr Von Muellerhoff
|
344 |
+
Hind
|
345 |
+
Hind Guntur
|
346 |
+
Hind Madurai
|
347 |
+
Hind Siliguri
|
348 |
+
Hind Vadodara
|
349 |
+
Holtwood One SC
|
350 |
+
Homemade Apple
|
351 |
+
Homenaje
|
352 |
+
IM Fell DW Pica
|
353 |
+
IM Fell DW Pica SC
|
354 |
+
IM Fell Double Pica
|
355 |
+
IM Fell Double Pica SC
|
356 |
+
IM Fell English
|
357 |
+
IM Fell English SC
|
358 |
+
IM Fell French Canon
|
359 |
+
IM Fell French Canon SC
|
360 |
+
IM Fell Great Primer
|
361 |
+
IM Fell Great Primer SC
|
362 |
+
Iceberg
|
363 |
+
Iceland
|
364 |
+
Imprima
|
365 |
+
Inconsolata
|
366 |
+
Inder
|
367 |
+
Indie Flower
|
368 |
+
Inika
|
369 |
+
Inknut Antiqua
|
370 |
+
Irish Grover
|
371 |
+
Istok Web
|
372 |
+
Italiana
|
373 |
+
Italianno
|
374 |
+
Itim
|
375 |
+
Jacques Francois
|
376 |
+
Jacques Francois Shadow
|
377 |
+
Jaldi
|
378 |
+
Jim Nightshade
|
379 |
+
Jockey One
|
380 |
+
Jolly Lodger
|
381 |
+
Jomhuria
|
382 |
+
Josefin Sans
|
383 |
+
Josefin Slab
|
384 |
+
Joti One
|
385 |
+
Judson
|
386 |
+
Julee
|
387 |
+
Julius Sans One
|
388 |
+
Junge
|
389 |
+
Jura
|
390 |
+
Just Another Hand
|
391 |
+
Just Me Again Down Here
|
392 |
+
Kadwa
|
393 |
+
Kalam
|
394 |
+
Kameron
|
395 |
+
Kanit
|
396 |
+
Kantumruy
|
397 |
+
Karla
|
398 |
+
Karma
|
399 |
+
Katibeh
|
400 |
+
Kaushan Script
|
401 |
+
Kavivanar
|
402 |
+
Kavoon
|
403 |
+
Kdam Thmor
|
404 |
+
Keania One
|
405 |
+
Kelly Slab
|
406 |
+
Kenia
|
407 |
+
Khand
|
408 |
+
Khmer
|
409 |
+
Khula
|
410 |
+
Kite One
|
411 |
+
Knewave
|
412 |
+
Kotta One
|
413 |
+
Koulen
|
414 |
+
Kranky
|
415 |
+
Kreon
|
416 |
+
Kristi
|
417 |
+
Krona One
|
418 |
+
Kumar One
|
419 |
+
Kumar One Outline
|
420 |
+
Kurale
|
421 |
+
La Belle Aurore
|
422 |
+
Laila
|
423 |
+
Lakki Reddy
|
424 |
+
Lalezar
|
425 |
+
Lancelot
|
426 |
+
Lateef
|
427 |
+
Lato
|
428 |
+
League Script
|
429 |
+
Leckerli One
|
430 |
+
Ledger
|
431 |
+
Lekton
|
432 |
+
Lemon
|
433 |
+
Lemonada
|
434 |
+
Libre Barcode 128
|
435 |
+
Libre Barcode 128 Text
|
436 |
+
Libre Barcode 39
|
437 |
+
Libre Barcode 39 Extended
|
438 |
+
Libre Barcode 39 Extended Text
|
439 |
+
Libre Barcode 39 Text
|
440 |
+
Libre Baskerville
|
441 |
+
Libre Franklin
|
442 |
+
Life Savers
|
443 |
+
Lilita One
|
444 |
+
Lily Script One
|
445 |
+
Limelight
|
446 |
+
Linden Hill
|
447 |
+
Lobster
|
448 |
+
Lobster Two
|
449 |
+
Londrina Outline
|
450 |
+
Londrina Shadow
|
451 |
+
Londrina Sketch
|
452 |
+
Londrina Solid
|
453 |
+
Lora
|
454 |
+
Love Ya Like A Sister
|
455 |
+
Loved by the King
|
456 |
+
Lovers Quarrel
|
457 |
+
Luckiest Guy
|
458 |
+
Lusitana
|
459 |
+
Lustria
|
460 |
+
Macondo
|
461 |
+
Macondo Swash Caps
|
462 |
+
Mada
|
463 |
+
Magra
|
464 |
+
Maiden Orange
|
465 |
+
Maitree
|
466 |
+
Mako
|
467 |
+
Mallanna
|
468 |
+
Mandali
|
469 |
+
Manuale
|
470 |
+
Marcellus
|
471 |
+
Marcellus SC
|
472 |
+
Marck Script
|
473 |
+
Margarine
|
474 |
+
Marko One
|
475 |
+
Marmelad
|
476 |
+
Martel
|
477 |
+
Martel Sans
|
478 |
+
Marvel
|
479 |
+
Mate
|
480 |
+
Mate SC
|
481 |
+
Maven Pro
|
482 |
+
McLaren
|
483 |
+
Meddon
|
484 |
+
MedievalSharp
|
485 |
+
Medula One
|
486 |
+
Meera Inimai
|
487 |
+
Megrim
|
488 |
+
Meie Script
|
489 |
+
Merienda
|
490 |
+
Merienda One
|
491 |
+
Merriweather
|
492 |
+
Merriweather Sans
|
493 |
+
Metal
|
494 |
+
Metal Mania
|
495 |
+
Metamorphous
|
496 |
+
Metrophobic
|
497 |
+
Michroma
|
498 |
+
Milonga
|
499 |
+
Miltonian
|
500 |
+
Miltonian Tattoo
|
501 |
+
Miniver
|
502 |
+
Miriam Libre
|
503 |
+
Mirza
|
504 |
+
Miss Fajardose
|
505 |
+
Mitr
|
506 |
+
Modak
|
507 |
+
Modern Antiqua
|
508 |
+
Mogra
|
509 |
+
Molengo
|
510 |
+
Molle
|
511 |
+
Monda
|
512 |
+
Monofett
|
513 |
+
Monoton
|
514 |
+
Monsieur La Doulaise
|
515 |
+
Montaga
|
516 |
+
Montez
|
517 |
+
Montserrat
|
518 |
+
Montserrat Alternates
|
519 |
+
Montserrat Subrayada
|
520 |
+
Moul
|
521 |
+
Moulpali
|
522 |
+
Mountains of Christmas
|
523 |
+
Mouse Memoirs
|
524 |
+
Mr Bedfort
|
525 |
+
Mr Dafoe
|
526 |
+
Mr De Haviland
|
527 |
+
Mrs Saint Delafield
|
528 |
+
Mrs Sheppards
|
529 |
+
Mukta
|
530 |
+
Mukta Mahee
|
531 |
+
Mukta Malar
|
532 |
+
Mukta Vaani
|
533 |
+
Muli
|
534 |
+
Mystery Quest
|
535 |
+
NTR
|
536 |
+
Neucha
|
537 |
+
Neuton
|
538 |
+
New Rocker
|
539 |
+
News Cycle
|
540 |
+
Niconne
|
541 |
+
Nixie One
|
542 |
+
Nobile
|
543 |
+
Nokora
|
544 |
+
Norican
|
545 |
+
Nosifer
|
546 |
+
Nothing You Could Do
|
547 |
+
Noticia Text
|
548 |
+
Noto Sans
|
549 |
+
Noto Serif
|
550 |
+
Nova Cut
|
551 |
+
Nova Flat
|
552 |
+
Nova Mono
|
553 |
+
Nova Oval
|
554 |
+
Nova Round
|
555 |
+
Nova Script
|
556 |
+
Nova Slim
|
557 |
+
Nova Square
|
558 |
+
Numans
|
559 |
+
Nunito
|
560 |
+
Nunito Sans
|
561 |
+
Odor Mean Chey
|
562 |
+
Offside
|
563 |
+
Old Standard TT
|
564 |
+
Oldenburg
|
565 |
+
Oleo Script
|
566 |
+
Oleo Script Swash Caps
|
567 |
+
Open Sans
|
568 |
+
Open Sans Condensed
|
569 |
+
Oranienbaum
|
570 |
+
Orbitron
|
571 |
+
Oregano
|
572 |
+
Orienta
|
573 |
+
Original Surfer
|
574 |
+
Oswald
|
575 |
+
Over the Rainbow
|
576 |
+
Overlock
|
577 |
+
Overlock SC
|
578 |
+
Overpass
|
579 |
+
Overpass Mono
|
580 |
+
Ovo
|
581 |
+
Oxygen
|
582 |
+
Oxygen Mono
|
583 |
+
PT Mono
|
584 |
+
PT Sans
|
585 |
+
PT Sans Caption
|
586 |
+
PT Sans Narrow
|
587 |
+
PT Serif
|
588 |
+
PT Serif Caption
|
589 |
+
Pacifico
|
590 |
+
Padauk
|
591 |
+
Palanquin
|
592 |
+
Palanquin Dark
|
593 |
+
Pangolin
|
594 |
+
Paprika
|
595 |
+
Parisienne
|
596 |
+
Passero One
|
597 |
+
Passion One
|
598 |
+
Pathway Gothic One
|
599 |
+
Patrick Hand
|
600 |
+
Patrick Hand SC
|
601 |
+
Pattaya
|
602 |
+
Patua One
|
603 |
+
Pavanam
|
604 |
+
Paytone One
|
605 |
+
Peddana
|
606 |
+
Peralta
|
607 |
+
Permanent Marker
|
608 |
+
Petit Formal Script
|
609 |
+
Petrona
|
610 |
+
Philosopher
|
611 |
+
Piedra
|
612 |
+
Pinyon Script
|
613 |
+
Pirata One
|
614 |
+
Plaster
|
615 |
+
Play
|
616 |
+
Playball
|
617 |
+
Playfair Display
|
618 |
+
Playfair Display SC
|
619 |
+
Podkova
|
620 |
+
Poiret One
|
621 |
+
Poller One
|
622 |
+
Poly
|
623 |
+
Pompiere
|
624 |
+
Pontano Sans
|
625 |
+
Poppins
|
626 |
+
Port Lligat Sans
|
627 |
+
Port Lligat Slab
|
628 |
+
Pragati Narrow
|
629 |
+
Prata
|
630 |
+
Preahvihear
|
631 |
+
Press Start 2P
|
632 |
+
Pridi
|
633 |
+
Princess Sofia
|
634 |
+
Prociono
|
635 |
+
Prompt
|
636 |
+
Prosto One
|
637 |
+
Proza Libre
|
638 |
+
Puritan
|
639 |
+
Purple Purse
|
640 |
+
Quando
|
641 |
+
Quantico
|
642 |
+
Quattrocento
|
643 |
+
Quattrocento Sans
|
644 |
+
Questrial
|
645 |
+
Quicksand
|
646 |
+
Quintessential
|
647 |
+
Qwigley
|
648 |
+
Racing Sans One
|
649 |
+
Radley
|
650 |
+
Rajdhani
|
651 |
+
Rakkas
|
652 |
+
Raleway
|
653 |
+
Raleway Dots
|
654 |
+
Ramabhadra
|
655 |
+
Ramaraja
|
656 |
+
Rambla
|
657 |
+
Rammetto One
|
658 |
+
Ranchers
|
659 |
+
Rancho
|
660 |
+
Ranga
|
661 |
+
Rasa
|
662 |
+
Rationale
|
663 |
+
Ravi Prakash
|
664 |
+
Redressed
|
665 |
+
Reem Kufi
|
666 |
+
Reenie Beanie
|
667 |
+
Revalia
|
668 |
+
Rhodium Libre
|
669 |
+
Ribeye
|
670 |
+
Ribeye Marrow
|
671 |
+
Righteous
|
672 |
+
Risque
|
673 |
+
Roboto
|
674 |
+
Roboto Condensed
|
675 |
+
Roboto Mono
|
676 |
+
Roboto Slab
|
677 |
+
Rochester
|
678 |
+
Rock Salt
|
679 |
+
Rokkitt
|
680 |
+
Romanesco
|
681 |
+
Ropa Sans
|
682 |
+
Rosario
|
683 |
+
Rosarivo
|
684 |
+
Rouge Script
|
685 |
+
Rozha One
|
686 |
+
Rubik
|
687 |
+
Rubik Mono One
|
688 |
+
Ruda
|
689 |
+
Rufina
|
690 |
+
Ruge Boogie
|
691 |
+
Ruluko
|
692 |
+
Rum Raisin
|
693 |
+
Ruslan Display
|
694 |
+
Russo One
|
695 |
+
Ruthie
|
696 |
+
Rye
|
697 |
+
Sacramento
|
698 |
+
Sahitya
|
699 |
+
Sail
|
700 |
+
Saira
|
701 |
+
Saira Condensed
|
702 |
+
Saira Extra Condensed
|
703 |
+
Saira Semi Condensed
|
704 |
+
Salsa
|
705 |
+
Sanchez
|
706 |
+
Sancreek
|
707 |
+
Sansita
|
708 |
+
Sarala
|
709 |
+
Sarina
|
710 |
+
Sarpanch
|
711 |
+
Satisfy
|
712 |
+
Scada
|
713 |
+
Scheherazade
|
714 |
+
Schoolbell
|
715 |
+
Scope One
|
716 |
+
Seaweed Script
|
717 |
+
Secular One
|
718 |
+
Sedgwick Ave
|
719 |
+
Sedgwick Ave Display
|
720 |
+
Sevillana
|
721 |
+
Seymour One
|
722 |
+
Shadows Into Light
|
723 |
+
Shadows Into Light Two
|
724 |
+
Shanti
|
725 |
+
Share
|
726 |
+
Share Tech
|
727 |
+
Share Tech Mono
|
728 |
+
Shojumaru
|
729 |
+
Short Stack
|
730 |
+
Shrikhand
|
731 |
+
Siemreap
|
732 |
+
Sigmar One
|
733 |
+
Signika
|
734 |
+
Signika Negative
|
735 |
+
Simonetta
|
736 |
+
Sintony
|
737 |
+
Sirin Stencil
|
738 |
+
Six Caps
|
739 |
+
Skranji
|
740 |
+
Slabo 13px
|
741 |
+
Slabo 27px
|
742 |
+
Slackey
|
743 |
+
Smokum
|
744 |
+
Smythe
|
745 |
+
Sniglet
|
746 |
+
Snippet
|
747 |
+
Snowburst One
|
748 |
+
Sofadi One
|
749 |
+
Sofia
|
750 |
+
Sonsie One
|
751 |
+
Sorts Mill Goudy
|
752 |
+
Source Code Pro
|
753 |
+
Source Sans Pro
|
754 |
+
Source Serif Pro
|
755 |
+
Space Mono
|
756 |
+
Special Elite
|
757 |
+
Spectral
|
758 |
+
Spicy Rice
|
759 |
+
Spinnaker
|
760 |
+
Spirax
|
761 |
+
Squada One
|
762 |
+
Sree Krushnadevaraya
|
763 |
+
Sriracha
|
764 |
+
Stalemate
|
765 |
+
Stalinist One
|
766 |
+
Stardos Stencil
|
767 |
+
Stint Ultra Condensed
|
768 |
+
Stint Ultra Expanded
|
769 |
+
Stoke
|
770 |
+
Strait
|
771 |
+
Sue Ellen Francisco
|
772 |
+
Suez One
|
773 |
+
Sumana
|
774 |
+
Sunshiney
|
775 |
+
Supermercado One
|
776 |
+
Sura
|
777 |
+
Suranna
|
778 |
+
Suravaram
|
779 |
+
Suwannaphum
|
780 |
+
Swanky and Moo Moo
|
781 |
+
Syncopate
|
782 |
+
Tangerine
|
783 |
+
Taprom
|
784 |
+
Tauri
|
785 |
+
Taviraj
|
786 |
+
Teko
|
787 |
+
Telex
|
788 |
+
Tenali Ramakrishna
|
789 |
+
Tenor Sans
|
790 |
+
Text Me One
|
791 |
+
The Girl Next Door
|
792 |
+
Tienne
|
793 |
+
Tillana
|
794 |
+
Timmana
|
795 |
+
Tinos
|
796 |
+
Titan One
|
797 |
+
Titillium Web
|
798 |
+
Trade Winds
|
799 |
+
Trirong
|
800 |
+
Trocchi
|
801 |
+
Trochut
|
802 |
+
Trykker
|
803 |
+
Tulpen One
|
804 |
+
Ubuntu
|
805 |
+
Ubuntu Condensed
|
806 |
+
Ubuntu Mono
|
807 |
+
Ultra
|
808 |
+
Uncial Antiqua
|
809 |
+
Underdog
|
810 |
+
Unica One
|
811 |
+
UnifrakturCook
|
812 |
+
UnifrakturMaguntia
|
813 |
+
Unkempt
|
814 |
+
Unlock
|
815 |
+
Unna
|
816 |
+
VT323
|
817 |
+
Vampiro One
|
818 |
+
Varela
|
819 |
+
Varela Round
|
820 |
+
Vast Shadow
|
821 |
+
Vesper Libre
|
822 |
+
Vibur
|
823 |
+
Vidaloka
|
824 |
+
Viga
|
825 |
+
Voces
|
826 |
+
Volkhov
|
827 |
+
Vollkorn
|
828 |
+
Voltaire
|
829 |
+
Waiting for the Sunrise
|
830 |
+
Wallpoet
|
831 |
+
Walter Turncoat
|
832 |
+
Warnes
|
833 |
+
Wellfleet
|
834 |
+
Wendy One
|
835 |
+
Wire One
|
836 |
+
Work Sans
|
837 |
+
Yanone Kaffeesatz
|
838 |
+
Yantramanav
|
839 |
+
Yatra One
|
840 |
+
Yellowtail
|
841 |
+
Yeseva One
|
842 |
+
Yesteryear
|
843 |
+
Yrsa
|
844 |
+
Zeyada
|
845 |
+
Zilla Slab
|
846 |
+
Zilla Slab Highlight
|
nextend/library/applications/system/plugins/nextendfontservices/google/google.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
|
3 |
class N2SystemPluginFontServiceGoogle extends N2PluginBase {
|
4 |
|
5 |
-
//<editor-fold desc="Google font list">
|
6 |
/*
|
7 |
jQuery.getJSON('https://www.googleapis.com/webfonts/v1/webfonts?sort=alpha&key=AIzaSyBIzBtder0-ef5a6kX-Ri9IfzVwFu21PGw').done(function(data){
|
8 |
var f = [];
|
@@ -12,861 +11,20 @@ f.push(data.items[i].family);
|
|
12 |
console.log(JSON.stringify(f));
|
13 |
});
|
14 |
*/
|
15 |
-
private static $fonts = array(
|
16 |
-
"ABeeZee",
|
17 |
-
"Abel",
|
18 |
-
"Abhaya Libre",
|
19 |
-
"Abril Fatface",
|
20 |
-
"Aclonica",
|
21 |
-
"Acme",
|
22 |
-
"Actor",
|
23 |
-
"Adamina",
|
24 |
-
"Advent Pro",
|
25 |
-
"Aguafina Script",
|
26 |
-
"Akronim",
|
27 |
-
"Aladin",
|
28 |
-
"Aldrich",
|
29 |
-
"Alef",
|
30 |
-
"Alegreya",
|
31 |
-
"Alegreya SC",
|
32 |
-
"Alegreya Sans",
|
33 |
-
"Alegreya Sans SC",
|
34 |
-
"Alex Brush",
|
35 |
-
"Alfa Slab One",
|
36 |
-
"Alice",
|
37 |
-
"Alike",
|
38 |
-
"Alike Angular",
|
39 |
-
"Allan",
|
40 |
-
"Allerta",
|
41 |
-
"Allerta Stencil",
|
42 |
-
"Allura",
|
43 |
-
"Almendra",
|
44 |
-
"Almendra Display",
|
45 |
-
"Almendra SC",
|
46 |
-
"Amarante",
|
47 |
-
"Amaranth",
|
48 |
-
"Amatic SC",
|
49 |
-
"Amethysta",
|
50 |
-
"Amiko",
|
51 |
-
"Amiri",
|
52 |
-
"Amita",
|
53 |
-
"Anaheim",
|
54 |
-
"Andada",
|
55 |
-
"Andika",
|
56 |
-
"Angkor",
|
57 |
-
"Annie Use Your Telescope",
|
58 |
-
"Anonymous Pro",
|
59 |
-
"Antic",
|
60 |
-
"Antic Didone",
|
61 |
-
"Antic Slab",
|
62 |
-
"Anton",
|
63 |
-
"Arapey",
|
64 |
-
"Arbutus",
|
65 |
-
"Arbutus Slab",
|
66 |
-
"Architects Daughter",
|
67 |
-
"Archivo",
|
68 |
-
"Archivo Black",
|
69 |
-
"Archivo Narrow",
|
70 |
-
"Aref Ruqaa",
|
71 |
-
"Arima Madurai",
|
72 |
-
"Arimo",
|
73 |
-
"Arizonia",
|
74 |
-
"Armata",
|
75 |
-
"Arsenal",
|
76 |
-
"Artifika",
|
77 |
-
"Arvo",
|
78 |
-
"Arya",
|
79 |
-
"Asap",
|
80 |
-
"Asap Condensed",
|
81 |
-
"Asar",
|
82 |
-
"Asset",
|
83 |
-
"Assistant",
|
84 |
-
"Astloch",
|
85 |
-
"Asul",
|
86 |
-
"Athiti",
|
87 |
-
"Atma",
|
88 |
-
"Atomic Age",
|
89 |
-
"Aubrey",
|
90 |
-
"Audiowide",
|
91 |
-
"Autour One",
|
92 |
-
"Average",
|
93 |
-
"Average Sans",
|
94 |
-
"Averia Gruesa Libre",
|
95 |
-
"Averia Libre",
|
96 |
-
"Averia Sans Libre",
|
97 |
-
"Averia Serif Libre",
|
98 |
-
"Bad Script",
|
99 |
-
"Bahiana",
|
100 |
-
"Baloo",
|
101 |
-
"Baloo Bhai",
|
102 |
-
"Baloo Bhaijaan",
|
103 |
-
"Baloo Bhaina",
|
104 |
-
"Baloo Chettan",
|
105 |
-
"Baloo Da",
|
106 |
-
"Baloo Paaji",
|
107 |
-
"Baloo Tamma",
|
108 |
-
"Baloo Tammudu",
|
109 |
-
"Baloo Thambi",
|
110 |
-
"Balthazar",
|
111 |
-
"Bangers",
|
112 |
-
"Barrio",
|
113 |
-
"Basic",
|
114 |
-
"Battambang",
|
115 |
-
"Baumans",
|
116 |
-
"Bayon",
|
117 |
-
"Belgrano",
|
118 |
-
"Bellefair",
|
119 |
-
"Belleza",
|
120 |
-
"BenchNine",
|
121 |
-
"Bentham",
|
122 |
-
"Berkshire Swash",
|
123 |
-
"Bevan",
|
124 |
-
"Bigelow Rules",
|
125 |
-
"Bigshot One",
|
126 |
-
"Bilbo",
|
127 |
-
"Bilbo Swash Caps",
|
128 |
-
"BioRhyme",
|
129 |
-
"BioRhyme Expanded",
|
130 |
-
"Biryani",
|
131 |
-
"Bitter",
|
132 |
-
"Black Ops One",
|
133 |
-
"Bokor",
|
134 |
-
"Bonbon",
|
135 |
-
"Boogaloo",
|
136 |
-
"Bowlby One",
|
137 |
-
"Bowlby One SC",
|
138 |
-
"Brawler",
|
139 |
-
"Bree Serif",
|
140 |
-
"Bubblegum Sans",
|
141 |
-
"Bubbler One",
|
142 |
-
"Buda",
|
143 |
-
"Buenard",
|
144 |
-
"Bungee",
|
145 |
-
"Bungee Hairline",
|
146 |
-
"Bungee Inline",
|
147 |
-
"Bungee Outline",
|
148 |
-
"Bungee Shade",
|
149 |
-
"Butcherman",
|
150 |
-
"Butterfly Kids",
|
151 |
-
"Cabin",
|
152 |
-
"Cabin Condensed",
|
153 |
-
"Cabin Sketch",
|
154 |
-
"Caesar Dressing",
|
155 |
-
"Cagliostro",
|
156 |
-
"Cairo",
|
157 |
-
"Calligraffitti",
|
158 |
-
"Cambay",
|
159 |
-
"Cambo",
|
160 |
-
"Candal",
|
161 |
-
"Cantarell",
|
162 |
-
"Cantata One",
|
163 |
-
"Cantora One",
|
164 |
-
"Capriola",
|
165 |
-
"Cardo",
|
166 |
-
"Carme",
|
167 |
-
"Carrois Gothic",
|
168 |
-
"Carrois Gothic SC",
|
169 |
-
"Carter One",
|
170 |
-
"Catamaran",
|
171 |
-
"Caudex",
|
172 |
-
"Caveat",
|
173 |
-
"Caveat Brush",
|
174 |
-
"Cedarville Cursive",
|
175 |
-
"Ceviche One",
|
176 |
-
"Changa",
|
177 |
-
"Changa One",
|
178 |
-
"Chango",
|
179 |
-
"Chathura",
|
180 |
-
"Chau Philomene One",
|
181 |
-
"Chela One",
|
182 |
-
"Chelsea Market",
|
183 |
-
"Chenla",
|
184 |
-
"Cherry Cream Soda",
|
185 |
-
"Cherry Swash",
|
186 |
-
"Chewy",
|
187 |
-
"Chicle",
|
188 |
-
"Chivo",
|
189 |
-
"Chonburi",
|
190 |
-
"Cinzel",
|
191 |
-
"Cinzel Decorative",
|
192 |
-
"Clicker Script",
|
193 |
-
"Coda",
|
194 |
-
"Coda Caption",
|
195 |
-
"Codystar",
|
196 |
-
"Coiny",
|
197 |
-
"Combo",
|
198 |
-
"Comfortaa",
|
199 |
-
"Coming Soon",
|
200 |
-
"Concert One",
|
201 |
-
"Condiment",
|
202 |
-
"Content",
|
203 |
-
"Contrail One",
|
204 |
-
"Convergence",
|
205 |
-
"Cookie",
|
206 |
-
"Copse",
|
207 |
-
"Corben",
|
208 |
-
"Cormorant",
|
209 |
-
"Cormorant Garamond",
|
210 |
-
"Cormorant Infant",
|
211 |
-
"Cormorant SC",
|
212 |
-
"Cormorant Unicase",
|
213 |
-
"Cormorant Upright",
|
214 |
-
"Courgette",
|
215 |
-
"Cousine",
|
216 |
-
"Coustard",
|
217 |
-
"Covered By Your Grace",
|
218 |
-
"Crafty Girls",
|
219 |
-
"Creepster",
|
220 |
-
"Crete Round",
|
221 |
-
"Crimson Text",
|
222 |
-
"Croissant One",
|
223 |
-
"Crushed",
|
224 |
-
"Cuprum",
|
225 |
-
"Cutive",
|
226 |
-
"Cutive Mono",
|
227 |
-
"Damion",
|
228 |
-
"Dancing Script",
|
229 |
-
"Dangrek",
|
230 |
-
"David Libre",
|
231 |
-
"Dawning of a New Day",
|
232 |
-
"Days One",
|
233 |
-
"Dekko",
|
234 |
-
"Delius",
|
235 |
-
"Delius Swash Caps",
|
236 |
-
"Delius Unicase",
|
237 |
-
"Della Respira",
|
238 |
-
"Denk One",
|
239 |
-
"Devonshire",
|
240 |
-
"Dhurjati",
|
241 |
-
"Didact Gothic",
|
242 |
-
"Diplomata",
|
243 |
-
"Diplomata SC",
|
244 |
-
"Domine",
|
245 |
-
"Donegal One",
|
246 |
-
"Doppio One",
|
247 |
-
"Dorsa",
|
248 |
-
"Dosis",
|
249 |
-
"Dr Sugiyama",
|
250 |
-
"Droid Sans",
|
251 |
-
"Droid Sans Mono",
|
252 |
-
"Droid Serif",
|
253 |
-
"Duru Sans",
|
254 |
-
"Dynalight",
|
255 |
-
"EB Garamond",
|
256 |
-
"Eagle Lake",
|
257 |
-
"Eater",
|
258 |
-
"Economica",
|
259 |
-
"Eczar",
|
260 |
-
"El Messiri",
|
261 |
-
"Electrolize",
|
262 |
-
"Elsie",
|
263 |
-
"Elsie Swash Caps",
|
264 |
-
"Emblema One",
|
265 |
-
"Emilys Candy",
|
266 |
-
"Encode Sans",
|
267 |
-
"Encode Sans Condensed",
|
268 |
-
"Encode Sans Expanded",
|
269 |
-
"Encode Sans Semi Condensed",
|
270 |
-
"Encode Sans Semi Expanded",
|
271 |
-
"Engagement",
|
272 |
-
"Englebert",
|
273 |
-
"Enriqueta",
|
274 |
-
"Erica One",
|
275 |
-
"Esteban",
|
276 |
-
"Euphoria Script",
|
277 |
-
"Ewert",
|
278 |
-
"Exo",
|
279 |
-
"Exo 2",
|
280 |
-
"Expletus Sans",
|
281 |
-
"Fanwood Text",
|
282 |
-
"Farsan",
|
283 |
-
"Fascinate",
|
284 |
-
"Fascinate Inline",
|
285 |
-
"Faster One",
|
286 |
-
"Fasthand",
|
287 |
-
"Fauna One",
|
288 |
-
"Faustina",
|
289 |
-
"Federant",
|
290 |
-
"Federo",
|
291 |
-
"Felipa",
|
292 |
-
"Fenix",
|
293 |
-
"Finger Paint",
|
294 |
-
"Fira Mono",
|
295 |
-
"Fira Sans",
|
296 |
-
"Fira Sans Condensed",
|
297 |
-
"Fira Sans Extra Condensed",
|
298 |
-
"Fjalla One",
|
299 |
-
"Fjord One",
|
300 |
-
"Flamenco",
|
301 |
-
"Flavors",
|
302 |
-
"Fondamento",
|
303 |
-
"Fontdiner Swanky",
|
304 |
-
"Forum",
|
305 |
-
"Francois One",
|
306 |
-
"Frank Ruhl Libre",
|
307 |
-
"Freckle Face",
|
308 |
-
"Fredericka the Great",
|
309 |
-
"Fredoka One",
|
310 |
-
"Freehand",
|
311 |
-
"Fresca",
|
312 |
-
"Frijole",
|
313 |
-
"Fruktur",
|
314 |
-
"Fugaz One",
|
315 |
-
"GFS Didot",
|
316 |
-
"GFS Neohellenic",
|
317 |
-
"Gabriela",
|
318 |
-
"Gafata",
|
319 |
-
"Galada",
|
320 |
-
"Galdeano",
|
321 |
-
"Galindo",
|
322 |
-
"Gentium Basic",
|
323 |
-
"Gentium Book Basic",
|
324 |
-
"Geo",
|
325 |
-
"Geostar",
|
326 |
-
"Geostar Fill",
|
327 |
-
"Germania One",
|
328 |
-
"Gidugu",
|
329 |
-
"Gilda Display",
|
330 |
-
"Give You Glory",
|
331 |
-
"Glass Antiqua",
|
332 |
-
"Glegoo",
|
333 |
-
"Gloria Hallelujah",
|
334 |
-
"Goblin One",
|
335 |
-
"Gochi Hand",
|
336 |
-
"Gorditas",
|
337 |
-
"Goudy Bookletter 1911",
|
338 |
-
"Graduate",
|
339 |
-
"Grand Hotel",
|
340 |
-
"Gravitas One",
|
341 |
-
"Great Vibes",
|
342 |
-
"Griffy",
|
343 |
-
"Gruppo",
|
344 |
-
"Gudea",
|
345 |
-
"Gurajada",
|
346 |
-
"Habibi",
|
347 |
-
"Halant",
|
348 |
-
"Hammersmith One",
|
349 |
-
"Hanalei",
|
350 |
-
"Hanalei Fill",
|
351 |
-
"Handlee",
|
352 |
-
"Hanuman",
|
353 |
-
"Happy Monkey",
|
354 |
-
"Harmattan",
|
355 |
-
"Headland One",
|
356 |
-
"Heebo",
|
357 |
-
"Henny Penny",
|
358 |
-
"Herr Von Muellerhoff",
|
359 |
-
"Hind",
|
360 |
-
"Hind Guntur",
|
361 |
-
"Hind Madurai",
|
362 |
-
"Hind Siliguri",
|
363 |
-
"Hind Vadodara",
|
364 |
-
"Holtwood One SC",
|
365 |
-
"Homemade Apple",
|
366 |
-
"Homenaje",
|
367 |
-
"IM Fell DW Pica",
|
368 |
-
"IM Fell DW Pica SC",
|
369 |
-
"IM Fell Double Pica",
|
370 |
-
"IM Fell Double Pica SC",
|
371 |
-
"IM Fell English",
|
372 |
-
"IM Fell English SC",
|
373 |
-
"IM Fell French Canon",
|
374 |
-
"IM Fell French Canon SC",
|
375 |
-
"IM Fell Great Primer",
|
376 |
-
"IM Fell Great Primer SC",
|
377 |
-
"Iceberg",
|
378 |
-
"Iceland",
|
379 |
-
"Imprima",
|
380 |
-
"Inconsolata",
|
381 |
-
"Inder",
|
382 |
-
"Indie Flower",
|
383 |
-
"Inika",
|
384 |
-
"Inknut Antiqua",
|
385 |
-
"Irish Grover",
|
386 |
-
"Istok Web",
|
387 |
-
"Italiana",
|
388 |
-
"Italianno",
|
389 |
-
"Itim",
|
390 |
-
"Jacques Francois",
|
391 |
-
"Jacques Francois Shadow",
|
392 |
-
"Jaldi",
|
393 |
-
"Jim Nightshade",
|
394 |
-
"Jockey One",
|
395 |
-
"Jolly Lodger",
|
396 |
-
"Jomhuria",
|
397 |
-
"Josefin Sans",
|
398 |
-
"Josefin Slab",
|
399 |
-
"Joti One",
|
400 |
-
"Judson",
|
401 |
-
"Julee",
|
402 |
-
"Julius Sans One",
|
403 |
-
"Junge",
|
404 |
-
"Jura",
|
405 |
-
"Just Another Hand",
|
406 |
-
"Just Me Again Down Here",
|
407 |
-
"Kadwa",
|
408 |
-
"Kalam",
|
409 |
-
"Kameron",
|
410 |
-
"Kanit",
|
411 |
-
"Kantumruy",
|
412 |
-
"Karla",
|
413 |
-
"Karma",
|
414 |
-
"Katibeh",
|
415 |
-
"Kaushan Script",
|
416 |
-
"Kavivanar",
|
417 |
-
"Kavoon",
|
418 |
-
"Kdam Thmor",
|
419 |
-
"Keania One",
|
420 |
-
"Kelly Slab",
|
421 |
-
"Kenia",
|
422 |
-
"Khand",
|
423 |
-
"Khmer",
|
424 |
-
"Khula",
|
425 |
-
"Kite One",
|
426 |
-
"Knewave",
|
427 |
-
"Kotta One",
|
428 |
-
"Koulen",
|
429 |
-
"Kranky",
|
430 |
-
"Kreon",
|
431 |
-
"Kristi",
|
432 |
-
"Krona One",
|
433 |
-
"Kumar One",
|
434 |
-
"Kumar One Outline",
|
435 |
-
"Kurale",
|
436 |
-
"La Belle Aurore",
|
437 |
-
"Laila",
|
438 |
-
"Lakki Reddy",
|
439 |
-
"Lalezar",
|
440 |
-
"Lancelot",
|
441 |
-
"Lateef",
|
442 |
-
"Lato",
|
443 |
-
"League Script",
|
444 |
-
"Leckerli One",
|
445 |
-
"Ledger",
|
446 |
-
"Lekton",
|
447 |
-
"Lemon",
|
448 |
-
"Lemonada",
|
449 |
-
"Libre Barcode 128",
|
450 |
-
"Libre Barcode 128 Text",
|
451 |
-
"Libre Barcode 39",
|
452 |
-
"Libre Barcode 39 Extended",
|
453 |
-
"Libre Barcode 39 Extended Text",
|
454 |
-
"Libre Barcode 39 Text",
|
455 |
-
"Libre Baskerville",
|
456 |
-
"Libre Franklin",
|
457 |
-
"Life Savers",
|
458 |
-
"Lilita One",
|
459 |
-
"Lily Script One",
|
460 |
-
"Limelight",
|
461 |
-
"Linden Hill",
|
462 |
-
"Lobster",
|
463 |
-
"Lobster Two",
|
464 |
-
"Londrina Outline",
|
465 |
-
"Londrina Shadow",
|
466 |
-
"Londrina Sketch",
|
467 |
-
"Londrina Solid",
|
468 |
-
"Lora",
|
469 |
-
"Love Ya Like A Sister",
|
470 |
-
"Loved by the King",
|
471 |
-
"Lovers Quarrel",
|
472 |
-
"Luckiest Guy",
|
473 |
-
"Lusitana",
|
474 |
-
"Lustria",
|
475 |
-
"Macondo",
|
476 |
-
"Macondo Swash Caps",
|
477 |
-
"Mada",
|
478 |
-
"Magra",
|
479 |
-
"Maiden Orange",
|
480 |
-
"Maitree",
|
481 |
-
"Mako",
|
482 |
-
"Mallanna",
|
483 |
-
"Mandali",
|
484 |
-
"Manuale",
|
485 |
-
"Marcellus",
|
486 |
-
"Marcellus SC",
|
487 |
-
"Marck Script",
|
488 |
-
"Margarine",
|
489 |
-
"Marko One",
|
490 |
-
"Marmelad",
|
491 |
-
"Martel",
|
492 |
-
"Martel Sans",
|
493 |
-
"Marvel",
|
494 |
-
"Mate",
|
495 |
-
"Mate SC",
|
496 |
-
"Maven Pro",
|
497 |
-
"McLaren",
|
498 |
-
"Meddon",
|
499 |
-
"MedievalSharp",
|
500 |
-
"Medula One",
|
501 |
-
"Meera Inimai",
|
502 |
-
"Megrim",
|
503 |
-
"Meie Script",
|
504 |
-
"Merienda",
|
505 |
-
"Merienda One",
|
506 |
-
"Merriweather",
|
507 |
-
"Merriweather Sans",
|
508 |
-
"Metal",
|
509 |
-
"Metal Mania",
|
510 |
-
"Metamorphous",
|
511 |
-
"Metrophobic",
|
512 |
-
"Michroma",
|
513 |
-
"Milonga",
|
514 |
-
"Miltonian",
|
515 |
-
"Miltonian Tattoo",
|
516 |
-
"Miniver",
|
517 |
-
"Miriam Libre",
|
518 |
-
"Mirza",
|
519 |
-
"Miss Fajardose",
|
520 |
-
"Mitr",
|
521 |
-
"Modak",
|
522 |
-
"Modern Antiqua",
|
523 |
-
"Mogra",
|
524 |
-
"Molengo",
|
525 |
-
"Molle",
|
526 |
-
"Monda",
|
527 |
-
"Monofett",
|
528 |
-
"Monoton",
|
529 |
-
"Monsieur La Doulaise",
|
530 |
-
"Montaga",
|
531 |
-
"Montez",
|
532 |
-
"Montserrat",
|
533 |
-
"Montserrat Alternates",
|
534 |
-
"Montserrat Subrayada",
|
535 |
-
"Moul",
|
536 |
-
"Moulpali",
|
537 |
-
"Mountains of Christmas",
|
538 |
-
"Mouse Memoirs",
|
539 |
-
"Mr Bedfort",
|
540 |
-
"Mr Dafoe",
|
541 |
-
"Mr De Haviland",
|
542 |
-
"Mrs Saint Delafield",
|
543 |
-
"Mrs Sheppards",
|
544 |
-
"Mukta",
|
545 |
-
"Mukta Mahee",
|
546 |
-
"Mukta Malar",
|
547 |
-
"Mukta Vaani",
|
548 |
-
"Muli",
|
549 |
-
"Mystery Quest",
|
550 |
-
"NTR",
|
551 |
-
"Neucha",
|
552 |
-
"Neuton",
|
553 |
-
"New Rocker",
|
554 |
-
"News Cycle",
|
555 |
-
"Niconne",
|
556 |
-
"Nixie One",
|
557 |
-
"Nobile",
|
558 |
-
"Nokora",
|
559 |
-
"Norican",
|
560 |
-
"Nosifer",
|
561 |
-
"Nothing You Could Do",
|
562 |
-
"Noticia Text",
|
563 |
-
"Noto Sans",
|
564 |
-
"Noto Serif",
|
565 |
-
"Nova Cut",
|
566 |
-
"Nova Flat",
|
567 |
-
"Nova Mono",
|
568 |
-
"Nova Oval",
|
569 |
-
"Nova Round",
|
570 |
-
"Nova Script",
|
571 |
-
"Nova Slim",
|
572 |
-
"Nova Square",
|
573 |
-
"Numans",
|
574 |
-
"Nunito",
|
575 |
-
"Nunito Sans",
|
576 |
-
"Odor Mean Chey",
|
577 |
-
"Offside",
|
578 |
-
"Old Standard TT",
|
579 |
-
"Oldenburg",
|
580 |
-
"Oleo Script",
|
581 |
-
"Oleo Script Swash Caps",
|
582 |
-
"Open Sans",
|
583 |
-
"Open Sans Condensed",
|
584 |
-
"Oranienbaum",
|
585 |
-
"Orbitron",
|
586 |
-
"Oregano",
|
587 |
-
"Orienta",
|
588 |
-
"Original Surfer",
|
589 |
-
"Oswald",
|
590 |
-
"Over the Rainbow",
|
591 |
-
"Overlock",
|
592 |
-
"Overlock SC",
|
593 |
-
"Overpass",
|
594 |
-
"Overpass Mono",
|
595 |
-
"Ovo",
|
596 |
-
"Oxygen",
|
597 |
-
"Oxygen Mono",
|
598 |
-
"PT Mono",
|
599 |
-
"PT Sans",
|
600 |
-
"PT Sans Caption",
|
601 |
-
"PT Sans Narrow",
|
602 |
-
"PT Serif",
|
603 |
-
"PT Serif Caption",
|
604 |
-
"Pacifico",
|
605 |
-
"Padauk",
|
606 |
-
"Palanquin",
|
607 |
-
"Palanquin Dark",
|
608 |
-
"Pangolin",
|
609 |
-
"Paprika",
|
610 |
-
"Parisienne",
|
611 |
-
"Passero One",
|
612 |
-
"Passion One",
|
613 |
-
"Pathway Gothic One",
|
614 |
-
"Patrick Hand",
|
615 |
-
"Patrick Hand SC",
|
616 |
-
"Pattaya",
|
617 |
-
"Patua One",
|
618 |
-
"Pavanam",
|
619 |
-
"Paytone One",
|
620 |
-
"Peddana",
|
621 |
-
"Peralta",
|
622 |
-
"Permanent Marker",
|
623 |
-
"Petit Formal Script",
|
624 |
-
"Petrona",
|
625 |
-
"Philosopher",
|
626 |
-
"Piedra",
|
627 |
-
"Pinyon Script",
|
628 |
-
"Pirata One",
|
629 |
-
"Plaster",
|
630 |
-
"Play",
|
631 |
-
"Playball",
|
632 |
-
"Playfair Display",
|
633 |
-
"Playfair Display SC",
|
634 |
-
"Podkova",
|
635 |
-
"Poiret One",
|
636 |
-
"Poller One",
|
637 |
-
"Poly",
|
638 |
-
"Pompiere",
|
639 |
-
"Pontano Sans",
|
640 |
-
"Poppins",
|
641 |
-
"Port Lligat Sans",
|
642 |
-
"Port Lligat Slab",
|
643 |
-
"Pragati Narrow",
|
644 |
-
"Prata",
|
645 |
-
"Preahvihear",
|
646 |
-
"Press Start 2P",
|
647 |
-
"Pridi",
|
648 |
-
"Princess Sofia",
|
649 |
-
"Prociono",
|
650 |
-
"Prompt",
|
651 |
-
"Prosto One",
|
652 |
-
"Proza Libre",
|
653 |
-
"Puritan",
|
654 |
-
"Purple Purse",
|
655 |
-
"Quando",
|
656 |
-
"Quantico",
|
657 |
-
"Quattrocento",
|
658 |
-
"Quattrocento Sans",
|
659 |
-
"Questrial",
|
660 |
-
"Quicksand",
|
661 |
-
"Quintessential",
|
662 |
-
"Qwigley",
|
663 |
-
"Racing Sans One",
|
664 |
-
"Radley",
|
665 |
-
"Rajdhani",
|
666 |
-
"Rakkas",
|
667 |
-
"Raleway",
|
668 |
-
"Raleway Dots",
|
669 |
-
"Ramabhadra",
|
670 |
-
"Ramaraja",
|
671 |
-
"Rambla",
|
672 |
-
"Rammetto One",
|
673 |
-
"Ranchers",
|
674 |
-
"Rancho",
|
675 |
-
"Ranga",
|
676 |
-
"Rasa",
|
677 |
-
"Rationale",
|
678 |
-
"Ravi Prakash",
|
679 |
-
"Redressed",
|
680 |
-
"Reem Kufi",
|
681 |
-
"Reenie Beanie",
|
682 |
-
"Revalia",
|
683 |
-
"Rhodium Libre",
|
684 |
-
"Ribeye",
|
685 |
-
"Ribeye Marrow",
|
686 |
-
"Righteous",
|
687 |
-
"Risque",
|
688 |
-
"Roboto",
|
689 |
-
"Roboto Condensed",
|
690 |
-
"Roboto Mono",
|
691 |
-
"Roboto Slab",
|
692 |
-
"Rochester",
|
693 |
-
"Rock Salt",
|
694 |
-
"Rokkitt",
|
695 |
-
"Romanesco",
|
696 |
-
"Ropa Sans",
|
697 |
-
"Rosario",
|
698 |
-
"Rosarivo",
|
699 |
-
"Rouge Script",
|
700 |
-
"Rozha One",
|
701 |
-
"Rubik",
|
702 |
-
"Rubik Mono One",
|
703 |
-
"Ruda",
|
704 |
-
"Rufina",
|
705 |
-
"Ruge Boogie",
|
706 |
-
"Ruluko",
|
707 |
-
"Rum Raisin",
|
708 |
-
"Ruslan Display",
|
709 |
-
"Russo One",
|
710 |
-
"Ruthie",
|
711 |
-
"Rye",
|
712 |
-
"Sacramento",
|
713 |
-
"Sahitya",
|
714 |
-
"Sail",
|
715 |
-
"Saira",
|
716 |
-
"Saira Condensed",
|
717 |
-
"Saira Extra Condensed",
|
718 |
-
"Saira Semi Condensed",
|
719 |
-
"Salsa",
|
720 |
-
"Sanchez",
|
721 |
-
"Sancreek",
|
722 |
-
"Sansita",
|
723 |
-
"Sarala",
|
724 |
-
"Sarina",
|
725 |
-
"Sarpanch",
|
726 |
-
"Satisfy",
|
727 |
-
"Scada",
|
728 |
-
"Scheherazade",
|
729 |
-
"Schoolbell",
|
730 |
-
"Scope One",
|
731 |
-
"Seaweed Script",
|
732 |
-
"Secular One",
|
733 |
-
"Sedgwick Ave",
|
734 |
-
"Sedgwick Ave Display",
|
735 |
-
"Sevillana",
|
736 |
-
"Seymour One",
|
737 |
-
"Shadows Into Light",
|
738 |
-
"Shadows Into Light Two",
|
739 |
-
"Shanti",
|
740 |
-
"Share",
|
741 |
-
"Share Tech",
|
742 |
-
"Share Tech Mono",
|
743 |
-
"Shojumaru",
|
744 |
-
"Short Stack",
|
745 |
-
"Shrikhand",
|
746 |
-
"Siemreap",
|
747 |
-
"Sigmar One",
|
748 |
-
"Signika",
|
749 |
-
"Signika Negative",
|
750 |
-
"Simonetta",
|
751 |
-
"Sintony",
|
752 |
-
"Sirin Stencil",
|
753 |
-
"Six Caps",
|
754 |
-
"Skranji",
|
755 |
-
"Slabo 13px",
|
756 |
-
"Slabo 27px",
|
757 |
-
"Slackey",
|
758 |
-
"Smokum",
|
759 |
-
"Smythe",
|
760 |
-
"Sniglet",
|
761 |
-
"Snippet",
|
762 |
-
"Snowburst One",
|
763 |
-
"Sofadi One",
|
764 |
-
"Sofia",
|
765 |
-
"Sonsie One",
|
766 |
-
"Sorts Mill Goudy",
|
767 |
-
"Source Code Pro",
|
768 |
-
"Source Sans Pro",
|
769 |
-
"Source Serif Pro",
|
770 |
-
"Space Mono",
|
771 |
-
"Special Elite",
|
772 |
-
"Spectral",
|
773 |
-
"Spicy Rice",
|
774 |
-
"Spinnaker",
|
775 |
-
"Spirax",
|
776 |
-
"Squada One",
|
777 |
-
"Sree Krushnadevaraya",
|
778 |
-
"Sriracha",
|
779 |
-
"Stalemate",
|
780 |
-
"Stalinist One",
|
781 |
-
"Stardos Stencil",
|
782 |
-
"Stint Ultra Condensed",
|
783 |
-
"Stint Ultra Expanded",
|
784 |
-
"Stoke",
|
785 |
-
"Strait",
|
786 |
-
"Sue Ellen Francisco",
|
787 |
-
"Suez One",
|
788 |
-
"Sumana",
|
789 |
-
"Sunshiney",
|
790 |
-
"Supermercado One",
|
791 |
-
"Sura",
|
792 |
-
"Suranna",
|
793 |
-
"Suravaram",
|
794 |
-
"Suwannaphum",
|
795 |
-
"Swanky and Moo Moo",
|
796 |
-
"Syncopate",
|
797 |
-
"Tangerine",
|
798 |
-
"Taprom",
|
799 |
-
"Tauri",
|
800 |
-
"Taviraj",
|
801 |
-
"Teko",
|
802 |
-
"Telex",
|
803 |
-
"Tenali Ramakrishna",
|
804 |
-
"Tenor Sans",
|
805 |
-
"Text Me One",
|
806 |
-
"The Girl Next Door",
|
807 |
-
"Tienne",
|
808 |
-
"Tillana",
|
809 |
-
"Timmana",
|
810 |
-
"Tinos",
|
811 |
-
"Titan One",
|
812 |
-
"Titillium Web",
|
813 |
-
"Trade Winds",
|
814 |
-
"Trirong",
|
815 |
-
"Trocchi",
|
816 |
-
"Trochut",
|
817 |
-
"Trykker",
|
818 |
-
"Tulpen One",
|
819 |
-
"Ubuntu",
|
820 |
-
"Ubuntu Condensed",
|
821 |
-
"Ubuntu Mono",
|
822 |
-
"Ultra",
|
823 |
-
"Uncial Antiqua",
|
824 |
-
"Underdog",
|
825 |
-
"Unica One",
|
826 |
-
"UnifrakturCook",
|
827 |
-
"UnifrakturMaguntia",
|
828 |
-
"Unkempt",
|
829 |
-
"Unlock",
|
830 |
-
"Unna",
|
831 |
-
"VT323",
|
832 |
-
"Vampiro One",
|
833 |
-
"Varela",
|
834 |
-
"Varela Round",
|
835 |
-
"Vast Shadow",
|
836 |
-
"Vesper Libre",
|
837 |
-
"Vibur",
|
838 |
-
"Vidaloka",
|
839 |
-
"Viga",
|
840 |
-
"Voces",
|
841 |
-
"Volkhov",
|
842 |
-
"Vollkorn",
|
843 |
-
"Voltaire",
|
844 |
-
"Waiting for the Sunrise",
|
845 |
-
"Wallpoet",
|
846 |
-
"Walter Turncoat",
|
847 |
-
"Warnes",
|
848 |
-
"Wellfleet",
|
849 |
-
"Wendy One",
|
850 |
-
"Wire One",
|
851 |
-
"Work Sans",
|
852 |
-
"Yanone Kaffeesatz",
|
853 |
-
"Yantramanav",
|
854 |
-
"Yatra One",
|
855 |
-
"Yellowtail",
|
856 |
-
"Yeseva One",
|
857 |
-
"Yesteryear",
|
858 |
-
"Yrsa",
|
859 |
-
"Zeyada",
|
860 |
-
"Zilla Slab",
|
861 |
-
"Zilla Slab Highlight"
|
862 |
-
);
|
863 |
-
//</editor-fold>
|
864 |
|
865 |
var $_group = 'google';
|
866 |
|
867 |
private static $styles = array();
|
868 |
private static $subsets = array();
|
869 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
870 |
|
871 |
function onFontServices(&$list) {
|
872 |
$list[$this->_group] = array(
|
@@ -953,12 +111,15 @@ console.log(JSON.stringify(f));
|
|
953 |
}
|
954 |
|
955 |
function onFontFamily($family) {
|
956 |
-
|
|
|
957 |
foreach (self::$styles AS $style) {
|
958 |
-
N2GoogleFonts::addFont($family, $style);
|
959 |
}
|
960 |
}
|
961 |
}
|
962 |
}
|
963 |
|
|
|
|
|
964 |
N2Plugin::addPlugin('fontservices', 'N2SystemPluginFontServiceGoogle');
|
2 |
|
3 |
class N2SystemPluginFontServiceGoogle extends N2PluginBase {
|
4 |
|
|
|
5 |
/*
|
6 |
jQuery.getJSON('https://www.googleapis.com/webfonts/v1/webfonts?sort=alpha&key=AIzaSyBIzBtder0-ef5a6kX-Ri9IfzVwFu21PGw').done(function(data){
|
7 |
var f = [];
|
11 |
console.log(JSON.stringify(f));
|
12 |
});
|
13 |
*/
|
14 |
+
private static $fonts = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
var $_group = 'google';
|
17 |
|
18 |
private static $styles = array();
|
19 |
private static $subsets = array();
|
20 |
|
21 |
+
public static function init() {
|
22 |
+
$lines = file(dirname(__FILE__) . '/families.csv', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
|
23 |
+
for ($i = 0; $i < count($lines); $i++) {
|
24 |
+
self::$fonts[strtolower($lines[$i])] = $lines[$i];
|
25 |
+
}
|
26 |
+
}
|
27 |
+
|
28 |
|
29 |
function onFontServices(&$list) {
|
30 |
$list[$this->_group] = array(
|
111 |
}
|
112 |
|
113 |
function onFontFamily($family) {
|
114 |
+
$family = strtolower($family);
|
115 |
+
if (isset(self::$fonts[$family])) {
|
116 |
foreach (self::$styles AS $style) {
|
117 |
+
N2GoogleFonts::addFont(self::$fonts[$family], $style);
|
118 |
}
|
119 |
}
|
120 |
}
|
121 |
}
|
122 |
|
123 |
+
N2SystemPluginFontServiceGoogle::init();
|
124 |
+
|
125 |
N2Plugin::addPlugin('fontservices', 'N2SystemPluginFontServiceGoogle');
|
nextend/library/languages/it_IT.mo
CHANGED
Binary file
|
nextend/library/libraries/assets/js/assets.php
CHANGED
@@ -27,7 +27,7 @@ class N2AssetsJs extends N2AssetsAbstract {
|
|
27 |
$jsCombined = new N2CacheCombine('js', N2Settings::get('minify-js', '0') ? 'N2MinifierJS::minify' : false);
|
28 |
foreach ($this->getFiles() AS $file) {
|
29 |
if (basename($file) == 'n2.js') {
|
30 |
-
$output .= N2Html::script(
|
31 |
} else {
|
32 |
$jsCombined->add($file);
|
33 |
}
|
27 |
$jsCombined = new N2CacheCombine('js', N2Settings::get('minify-js', '0') ? 'N2MinifierJS::minify' : false);
|
28 |
foreach ($this->getFiles() AS $file) {
|
29 |
if (basename($file) == 'n2.js') {
|
30 |
+
$output .= N2Html::script(file_get_contents($file)) . "\n";
|
31 |
} else {
|
32 |
$jsCombined->add($file);
|
33 |
}
|
nextend/library/libraries/assets/predefined.php
CHANGED
@@ -144,8 +144,5 @@ class N2AssetsPredefined {
|
|
144 |
}
|
145 |
|
146 |
public static function loadLiteBox() {
|
147 |
-
N2CSS::addStaticGroup(N2LIBRARYASSETS . '/css/litebox.min.css', 'nextend-litebox');
|
148 |
-
N2JS::addStaticGroup(N2LIBRARYASSETS . '/dist/nextend-litebox.min.js', 'nextend-litebox');
|
149 |
-
|
150 |
}
|
151 |
}
|
144 |
}
|
145 |
|
146 |
public static function loadLiteBox() {
|
|
|
|
|
|
|
147 |
}
|
148 |
}
|
nextend/library/libraries/localization/pomo/entry.php
CHANGED
@@ -8,86 +8,86 @@
|
|
8 |
*/
|
9 |
|
10 |
if ( ! class_exists( 'Translation_Entry', false ) ):
|
11 |
-
/**
|
12 |
-
|
13 |
-
|
14 |
-
class Translation_Entry {
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
|
78 |
-
|
79 |
-
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
|
91 |
-
|
92 |
-
}
|
93 |
endif;
|
8 |
*/
|
9 |
|
10 |
if ( ! class_exists( 'Translation_Entry', false ) ):
|
11 |
+
/**
|
12 |
+
* Translation_Entry class encapsulates a translatable string
|
13 |
+
*/
|
14 |
+
class Translation_Entry {
|
15 |
|
16 |
+
/**
|
17 |
+
* Whether the entry contains a string and its plural form, default is false
|
18 |
+
*
|
19 |
+
* @var boolean
|
20 |
+
*/
|
21 |
+
var $is_plural = false;
|
22 |
|
23 |
+
var $context = null;
|
24 |
+
var $singular = null;
|
25 |
+
var $plural = null;
|
26 |
+
var $translations = array();
|
27 |
+
var $translator_comments = '';
|
28 |
+
var $extracted_comments = '';
|
29 |
+
var $references = array();
|
30 |
+
var $flags = array();
|
31 |
|
32 |
+
/**
|
33 |
+
* @param array $args associative array, support following keys:
|
34 |
+
* - singular (string) -- the string to translate, if omitted and empty entry will be created
|
35 |
+
* - plural (string) -- the plural form of the string, setting this will set {@link $is_plural} to true
|
36 |
+
* - translations (array) -- translations of the string and possibly -- its plural forms
|
37 |
+
* - context (string) -- a string differentiating two equal strings used in different contexts
|
38 |
+
* - translator_comments (string) -- comments left by translators
|
39 |
+
* - extracted_comments (string) -- comments left by developers
|
40 |
+
* - references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
|
41 |
+
* - flags (array) -- flags like php-format
|
42 |
+
*/
|
43 |
+
function __construct( $args = array() ) {
|
44 |
+
// if no singular -- empty object
|
45 |
+
if (!isset($args['singular'])) {
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
// get member variable values from args hash
|
49 |
+
foreach ($args as $varname => $value) {
|
50 |
+
$this->$varname = $value;
|
51 |
+
}
|
52 |
+
if (isset($args['plural']) && $args['plural']) $this->is_plural = true;
|
53 |
+
if (!is_array($this->translations)) $this->translations = array();
|
54 |
+
if (!is_array($this->references)) $this->references = array();
|
55 |
+
if (!is_array($this->flags)) $this->flags = array();
|
56 |
+
}
|
57 |
|
58 |
+
/**
|
59 |
+
* PHP4 constructor.
|
60 |
+
*/
|
61 |
+
public function Translation_Entry( $args = array() ) {
|
62 |
+
self::__construct( $args );
|
63 |
+
}
|
64 |
|
65 |
+
/**
|
66 |
+
* Generates a unique key for this entry
|
67 |
+
*
|
68 |
+
* @return string|bool the key or false if the entry is empty
|
69 |
+
*/
|
70 |
+
function key() {
|
71 |
+
if ( null === $this->singular || '' === $this->singular ) return false;
|
72 |
|
73 |
+
// Prepend context and EOT, like in MO files
|
74 |
+
$key = !$this->context? $this->singular : $this->context.chr(4).$this->singular;
|
75 |
+
// Standardize on \n line endings
|
76 |
+
$key = str_replace( array( "\r\n", "\r" ), "\n", $key );
|
77 |
|
78 |
+
return $key;
|
79 |
+
}
|
80 |
|
81 |
+
/**
|
82 |
+
* @param object $other
|
83 |
+
*/
|
84 |
+
function merge_with(&$other) {
|
85 |
+
$this->flags = array_unique( array_merge( $this->flags, $other->flags ) );
|
86 |
+
$this->references = array_unique( array_merge( $this->references, $other->references ) );
|
87 |
+
if ( $this->extracted_comments != $other->extracted_comments ) {
|
88 |
+
$this->extracted_comments .= $other->extracted_comments;
|
89 |
+
}
|
90 |
|
91 |
+
}
|
92 |
+
}
|
93 |
endif;
|
nextend/library/libraries/localization/pomo/mo.php
CHANGED
@@ -11,292 +11,313 @@ require_once dirname(__FILE__) . '/translations.php';
|
|
11 |
require_once dirname(__FILE__) . '/streams.php';
|
12 |
|
13 |
if ( ! class_exists( 'MO', false ) ):
|
14 |
-
class MO extends Gettext_Translations {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
endif;
|
11 |
require_once dirname(__FILE__) . '/streams.php';
|
12 |
|
13 |
if ( ! class_exists( 'MO', false ) ):
|
14 |
+
class MO extends Gettext_Translations {
|
15 |
+
|
16 |
+
var $_nplurals = 2;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Loaded MO file.
|
20 |
+
*
|
21 |
+
* @var string
|
22 |
+
*/
|
23 |
+
private $filename = '';
|
24 |
+
|
25 |
+
/**
|
26 |
+
* Returns the loaded MO file.
|
27 |
+
*
|
28 |
+
* @return string The loaded MO file.
|
29 |
+
*/
|
30 |
+
public function get_filename() {
|
31 |
+
return $this->filename;
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Fills up with the entries from MO file $filename
|
36 |
+
*
|
37 |
+
* @param string $filename MO file to load
|
38 |
+
*/
|
39 |
+
function import_from_file($filename) {
|
40 |
+
$reader = new POMO_FileReader( $filename );
|
41 |
+
|
42 |
+
if ( ! $reader->is_resource() ) {
|
43 |
+
return false;
|
44 |
+
}
|
45 |
+
|
46 |
+
$this->filename = (string) $filename;
|
47 |
+
|
48 |
+
return $this->import_from_reader( $reader );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param string $filename
|
53 |
+
* @return bool
|
54 |
+
*/
|
55 |
+
function export_to_file($filename) {
|
56 |
+
$fh = fopen($filename, 'wb');
|
57 |
+
if ( !$fh ) return false;
|
58 |
+
$res = $this->export_to_file_handle( $fh );
|
59 |
+
fclose($fh);
|
60 |
+
return $res;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* @return string|false
|
65 |
+
*/
|
66 |
+
function export() {
|
67 |
+
$tmp_fh = fopen("php://temp", 'r+');
|
68 |
+
if ( !$tmp_fh ) return false;
|
69 |
+
$this->export_to_file_handle( $tmp_fh );
|
70 |
+
rewind( $tmp_fh );
|
71 |
+
return stream_get_contents( $tmp_fh );
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* @param Translation_Entry $entry
|
76 |
+
* @return bool
|
77 |
+
*/
|
78 |
+
function is_entry_good_for_export( $entry ) {
|
79 |
+
if ( empty( $entry->translations ) ) {
|
80 |
+
return false;
|
81 |
+
}
|
82 |
+
|
83 |
+
if ( !array_filter( $entry->translations ) ) {
|
84 |
+
return false;
|
85 |
+
}
|
86 |
+
|
87 |
+
return true;
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* @param resource $fh
|
92 |
+
* @return true
|
93 |
+
*/
|
94 |
+
function export_to_file_handle($fh) {
|
95 |
+
$entries = array_filter( $this->entries, array( $this, 'is_entry_good_for_export' ) );
|
96 |
+
ksort($entries);
|
97 |
+
$magic = 0x950412de;
|
98 |
+
$revision = 0;
|
99 |
+
$total = count($entries) + 1; // all the headers are one entry
|
100 |
+
$originals_lenghts_addr = 28;
|
101 |
+
$translations_lenghts_addr = $originals_lenghts_addr + 8 * $total;
|
102 |
+
$size_of_hash = 0;
|
103 |
+
$hash_addr = $translations_lenghts_addr + 8 * $total;
|
104 |
+
$current_addr = $hash_addr;
|
105 |
+
fwrite($fh, pack('V*', $magic, $revision, $total, $originals_lenghts_addr,
|
106 |
+
$translations_lenghts_addr, $size_of_hash, $hash_addr));
|
107 |
+
fseek($fh, $originals_lenghts_addr);
|
108 |
+
|
109 |
+
// headers' msgid is an empty string
|
110 |
+
fwrite($fh, pack('VV', 0, $current_addr));
|
111 |
+
$current_addr++;
|
112 |
+
$originals_table = chr(0);
|
113 |
+
|
114 |
+
$reader = new POMO_Reader();
|
115 |
+
|
116 |
+
foreach($entries as $entry) {
|
117 |
+
$originals_table .= $this->export_original($entry) . chr(0);
|
118 |
+
$length = $reader->strlen($this->export_original($entry));
|
119 |
+
fwrite($fh, pack('VV', $length, $current_addr));
|
120 |
+
$current_addr += $length + 1; // account for the NULL byte after
|
121 |
+
}
|
122 |
+
|
123 |
+
$exported_headers = $this->export_headers();
|
124 |
+
fwrite($fh, pack('VV', $reader->strlen($exported_headers), $current_addr));
|
125 |
+
$current_addr += strlen($exported_headers) + 1;
|
126 |
+
$translations_table = $exported_headers . chr(0);
|
127 |
+
|
128 |
+
foreach($entries as $entry) {
|
129 |
+
$translations_table .= $this->export_translations($entry) . chr(0);
|
130 |
+
$length = $reader->strlen($this->export_translations($entry));
|
131 |
+
fwrite($fh, pack('VV', $length, $current_addr));
|
132 |
+
$current_addr += $length + 1;
|
133 |
+
}
|
134 |
+
|
135 |
+
fwrite($fh, $originals_table);
|
136 |
+
fwrite($fh, $translations_table);
|
137 |
+
return true;
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @param Translation_Entry $entry
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
function export_original($entry) {
|
145 |
+
//TODO: warnings for control characters
|
146 |
+
$exported = $entry->singular;
|
147 |
+
if ($entry->is_plural) $exported .= chr(0).$entry->plural;
|
148 |
+
if ($entry->context) $exported = $entry->context . chr(4) . $exported;
|
149 |
+
return $exported;
|
150 |
+
}
|
151 |
+
|
152 |
+
/**
|
153 |
+
* @param Translation_Entry $entry
|
154 |
+
* @return string
|
155 |
+
*/
|
156 |
+
function export_translations($entry) {
|
157 |
+
//TODO: warnings for control characters
|
158 |
+
return $entry->is_plural ? implode(chr(0), $entry->translations) : $entry->translations[0];
|
159 |
+
}
|
160 |
+
|
161 |
+
/**
|
162 |
+
* @return string
|
163 |
+
*/
|
164 |
+
function export_headers() {
|
165 |
+
$exported = '';
|
166 |
+
foreach($this->headers as $header => $value) {
|
167 |
+
$exported.= "$header: $value\n";
|
168 |
+
}
|
169 |
+
return $exported;
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* @param int $magic
|
174 |
+
* @return string|false
|
175 |
+
*/
|
176 |
+
function get_byteorder($magic) {
|
177 |
+
// The magic is 0x950412de
|
178 |
+
|
179 |
+
// bug in PHP 5.0.2, see https://savannah.nongnu.org/bugs/?func=detailitem&item_id=10565
|
180 |
+
$magic_little = (int) - 1794895138;
|
181 |
+
$magic_little_64 = (int) 2500072158;
|
182 |
+
// 0xde120495
|
183 |
+
$magic_big = ((int) - 569244523) & 0xFFFFFFFF;
|
184 |
+
if ($magic_little == $magic || $magic_little_64 == $magic) {
|
185 |
+
return 'little';
|
186 |
+
} else if ($magic_big == $magic) {
|
187 |
+
return 'big';
|
188 |
+
} else {
|
189 |
+
return false;
|
190 |
+
}
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* @param POMO_FileReader $reader
|
195 |
+
*/
|
196 |
+
function import_from_reader($reader) {
|
197 |
+
$endian_string = MO::get_byteorder($reader->readint32());
|
198 |
+
if (false === $endian_string) {
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
$reader->setEndian($endian_string);
|
202 |
+
|
203 |
+
$endian = ('big' == $endian_string)? 'N' : 'V';
|
204 |
+
|
205 |
+
$header = $reader->read(24);
|
206 |
+
if ($reader->strlen($header) != 24)
|
207 |
+
return false;
|
208 |
+
|
209 |
+
// parse header
|
210 |
+
$header = unpack("{$endian}revision/{$endian}total/{$endian}originals_lenghts_addr/{$endian}translations_lenghts_addr/{$endian}hash_length/{$endian}hash_addr", $header);
|
211 |
+
if (!is_array($header))
|
212 |
+
return false;
|
213 |
+
|
214 |
+
// support revision 0 of MO format specs, only
|
215 |
+
if ( $header['revision'] != 0 ) {
|
216 |
+
return false;
|
217 |
+
}
|
218 |
+
|
219 |
+
// seek to data blocks
|
220 |
+
$reader->seekto( $header['originals_lenghts_addr'] );
|
221 |
+
|
222 |
+
// read originals' indices
|
223 |
+
$originals_lengths_length = $header['translations_lenghts_addr'] - $header['originals_lenghts_addr'];
|
224 |
+
if ( $originals_lengths_length != $header['total'] * 8 ) {
|
225 |
+
return false;
|
226 |
+
}
|
227 |
+
|
228 |
+
$originals = $reader->read($originals_lengths_length);
|
229 |
+
if ( $reader->strlen( $originals ) != $originals_lengths_length ) {
|
230 |
+
return false;
|
231 |
+
}
|
232 |
+
|
233 |
+
// read translations' indices
|
234 |
+
$translations_lenghts_length = $header['hash_addr'] - $header['translations_lenghts_addr'];
|
235 |
+
if ( $translations_lenghts_length != $header['total'] * 8 ) {
|
236 |
+
return false;
|
237 |
+
}
|
238 |
+
|
239 |
+
$translations = $reader->read($translations_lenghts_length);
|
240 |
+
if ( $reader->strlen( $translations ) != $translations_lenghts_length ) {
|
241 |
+
return false;
|
242 |
+
}
|
243 |
+
|
244 |
+
// transform raw data into set of indices
|
245 |
+
$originals = $reader->str_split( $originals, 8 );
|
246 |
+
$translations = $reader->str_split( $translations, 8 );
|
247 |
+
|
248 |
+
// skip hash table
|
249 |
+
$strings_addr = $header['hash_addr'] + $header['hash_length'] * 4;
|
250 |
+
|
251 |
+
$reader->seekto($strings_addr);
|
252 |
+
|
253 |
+
$strings = $reader->read_all();
|
254 |
+
$reader->close();
|
255 |
+
|
256 |
+
for ( $i = 0; $i < $header['total']; $i++ ) {
|
257 |
+
$o = unpack( "{$endian}length/{$endian}pos", $originals[$i] );
|
258 |
+
$t = unpack( "{$endian}length/{$endian}pos", $translations[$i] );
|
259 |
+
if ( !$o || !$t ) return false;
|
260 |
+
|
261 |
+
// adjust offset due to reading strings to separate space before
|
262 |
+
$o['pos'] -= $strings_addr;
|
263 |
+
$t['pos'] -= $strings_addr;
|
264 |
+
|
265 |
+
$original = $reader->substr( $strings, $o['pos'], $o['length'] );
|
266 |
+
$translation = $reader->substr( $strings, $t['pos'], $t['length'] );
|
267 |
+
|
268 |
+
if ('' === $original) {
|
269 |
+
$this->set_headers($this->make_headers($translation));
|
270 |
+
} else {
|
271 |
+
$entry = &$this->make_entry($original, $translation);
|
272 |
+
$this->entries[$entry->key()] = &$entry;
|
273 |
+
}
|
274 |
+
}
|
275 |
+
return true;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Build a Translation_Entry from original string and translation strings,
|
280 |
+
* found in a MO file
|
281 |
+
*
|
282 |
+
* @static
|
283 |
+
* @param string $original original string to translate from MO file. Might contain
|
284 |
+
* 0x04 as context separator or 0x00 as singular/plural separator
|
285 |
+
* @param string $translation translation string from MO file. Might contain
|
286 |
+
* 0x00 as a plural translations separator
|
287 |
+
*/
|
288 |
+
function &make_entry($original, $translation) {
|
289 |
+
$entry = new Translation_Entry();
|
290 |
+
// look for context
|
291 |
+
$parts = explode(chr(4), $original);
|
292 |
+
if (isset($parts[1])) {
|
293 |
+
$original = $parts[1];
|
294 |
+
$entry->context = $parts[0];
|
295 |
+
}
|
296 |
+
// look for plural original
|
297 |
+
$parts = explode(chr(0), $original);
|
298 |
+
$entry->singular = $parts[0];
|
299 |
+
if (isset($parts[1])) {
|
300 |
+
$entry->is_plural = true;
|
301 |
+
$entry->plural = $parts[1];
|
302 |
+
}
|
303 |
+
// plural translations are also separated by \0
|
304 |
+
$entry->translations = explode(chr(0), $translation);
|
305 |
+
return $entry;
|
306 |
+
}
|
307 |
+
|
308 |
+
/**
|
309 |
+
* @param int $count
|
310 |
+
* @return string
|
311 |
+
*/
|
312 |
+
function select_plural_form($count) {
|
313 |
+
return $this->gettext_select_plural_form($count);
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* @return int
|
318 |
+
*/
|
319 |
+
function get_plural_forms_count() {
|
320 |
+
return $this->_nplurals;
|
321 |
+
}
|
322 |
+
}
|
323 |
endif;
|
nextend/library/libraries/localization/pomo/plural-forms.php
ADDED
@@ -0,0 +1,364 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* A gettext Plural-Forms parser.
|
5 |
+
*
|
6 |
+
* @since 4.9.0
|
7 |
+
*/
|
8 |
+
if (!class_exists('Plural_Forms', false)):
|
9 |
+
class Plural_Forms {
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Operator characters.
|
13 |
+
*
|
14 |
+
* @since 4.9.0
|
15 |
+
* @var string OP_CHARS Operator characters.
|
16 |
+
*/
|
17 |
+
const OP_CHARS = '|&><!=%?:';
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Valid number characters.
|
21 |
+
*
|
22 |
+
* @since 4.9.0
|
23 |
+
* @var string NUM_CHARS Valid number characters.
|
24 |
+
*/
|
25 |
+
const NUM_CHARS = '0123456789';
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Operator precedence.
|
29 |
+
*
|
30 |
+
* Operator precedence from highest to lowest. Higher numbers indicate
|
31 |
+
* higher precedence, and are executed first.
|
32 |
+
*
|
33 |
+
* @see https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence
|
34 |
+
*
|
35 |
+
* @since 4.9.0
|
36 |
+
* @var array $op_precedence Operator precedence from highest to lowest.
|
37 |
+
*/
|
38 |
+
protected static $op_precedence = array(
|
39 |
+
'%' => 6,
|
40 |
+
|
41 |
+
'<' => 5,
|
42 |
+
'<=' => 5,
|
43 |
+
'>' => 5,
|
44 |
+
'>=' => 5,
|
45 |
+
|
46 |
+
'==' => 4,
|
47 |
+
'!=' => 4,
|
48 |
+
|
49 |
+
'&&' => 3,
|
50 |
+
|
51 |
+
'||' => 2,
|
52 |
+
|
53 |
+
'?:' => 1,
|
54 |
+
'?' => 1,
|
55 |
+
|
56 |
+
'(' => 0,
|
57 |
+
')' => 0,
|
58 |
+
);
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Tokens generated from the string.
|
62 |
+
*
|
63 |
+
* @since 4.9.0
|
64 |
+
* @var array $tokens List of tokens.
|
65 |
+
*/
|
66 |
+
protected $tokens = array();
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Cache for repeated calls to the function.
|
70 |
+
*
|
71 |
+
* @since 4.9.0
|
72 |
+
* @var array $cache Map of $n => $result
|
73 |
+
*/
|
74 |
+
protected $cache = array();
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Constructor.
|
78 |
+
*
|
79 |
+
* @since 4.9.0
|
80 |
+
*
|
81 |
+
* @param string $str Plural function (just the bit after `plural=` from Plural-Forms)
|
82 |
+
*/
|
83 |
+
public function __construct($str) {
|
84 |
+
$this->parse($str);
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Parse a Plural-Forms string into tokens.
|
89 |
+
*
|
90 |
+
* Uses the shunting-yard algorithm to convert the string to Reverse Polish
|
91 |
+
* Notation tokens.
|
92 |
+
*
|
93 |
+
* @since 4.9.0
|
94 |
+
*
|
95 |
+
* @param string $str String to parse.
|
96 |
+
*/
|
97 |
+
protected function parse($str) {
|
98 |
+
$pos = 0;
|
99 |
+
$len = strlen($str);
|
100 |
+
|
101 |
+
// Convert infix operators to postfix using the shunting-yard algorithm.
|
102 |
+
$output = array();
|
103 |
+
$stack = array();
|
104 |
+
while ($pos < $len) {
|
105 |
+
$next = substr($str, $pos, 1);
|
106 |
+
|
107 |
+
switch ($next) {
|
108 |
+
// Ignore whitespace
|
109 |
+
case ' ':
|
110 |
+
case "\t":
|
111 |
+
$pos++;
|
112 |
+
break;
|
113 |
+
|
114 |
+
// Variable (n)
|
115 |
+
case 'n':
|
116 |
+
$output[] = array('var');
|
117 |
+
$pos++;
|
118 |
+
break;
|
119 |
+
|
120 |
+
// Parentheses
|
121 |
+
case '(':
|
122 |
+
$stack[] = $next;
|
123 |
+
$pos++;
|
124 |
+
break;
|
125 |
+
|
126 |
+
case ')':
|
127 |
+
$found = false;
|
128 |
+
while (!empty($stack)) {
|
129 |
+
$o2 = $stack[count($stack) - 1];
|
130 |
+
if ($o2 !== '(') {
|
131 |
+
$output[] = array(
|
132 |
+
'op',
|
133 |
+
array_pop($stack)
|
134 |
+
);
|
135 |
+
continue;
|
136 |
+
}
|
137 |
+
|
138 |
+
// Discard open paren.
|
139 |
+
array_pop($stack);
|
140 |
+
$found = true;
|
141 |
+
break;
|
142 |
+
}
|
143 |
+
|
144 |
+
if (!$found) {
|
145 |
+
throw new Exception('Mismatched parentheses');
|
146 |
+
}
|
147 |
+
|
148 |
+
$pos++;
|
149 |
+
break;
|
150 |
+
|
151 |
+
// Operators
|
152 |
+
case '|':
|
153 |
+
case '&':
|
154 |
+
case '>':
|
155 |
+
case '<':
|
156 |
+
case '!':
|
157 |
+
case '=':
|
158 |
+
case '%':
|
159 |
+
case '?':
|
160 |
+
$end_operator = strspn($str, self::OP_CHARS, $pos);
|
161 |
+
$operator = substr($str, $pos, $end_operator);
|
162 |
+
if (!array_key_exists($operator, self::$op_precedence)) {
|
163 |
+
throw new Exception(sprintf('Unknown operator "%s"', $operator));
|
164 |
+
}
|
165 |
+
|
166 |
+
while (!empty($stack)) {
|
167 |
+
$o2 = $stack[count($stack) - 1];
|
168 |
+
|
169 |
+
// Ternary is right-associative in C
|
170 |
+
if ($operator === '?:' || $operator === '?') {
|
171 |
+
if (self::$op_precedence[$operator] >= self::$op_precedence[$o2]) {
|
172 |
+
break;
|
173 |
+
}
|
174 |
+
} elseif (self::$op_precedence[$operator] > self::$op_precedence[$o2]) {
|
175 |
+
break;
|
176 |
+
}
|
177 |
+
|
178 |
+
$output[] = array(
|
179 |
+
'op',
|
180 |
+
array_pop($stack)
|
181 |
+
);
|
182 |
+
}
|
183 |
+
$stack[] = $operator;
|
184 |
+
|
185 |
+
$pos += $end_operator;
|
186 |
+
break;
|
187 |
+
|
188 |
+
// Ternary "else"
|
189 |
+
case ':':
|
190 |
+
$found = false;
|
191 |
+
$s_pos = count($stack) - 1;
|
192 |
+
while ($s_pos >= 0) {
|
193 |
+
$o2 = $stack[$s_pos];
|
194 |
+
if ($o2 !== '?') {
|
195 |
+
$output[] = array(
|
196 |
+
'op',
|
197 |
+
array_pop($stack)
|
198 |
+
);
|
199 |
+
$s_pos--;
|
200 |
+
continue;
|
201 |
+
}
|
202 |
+
|
203 |
+
// Replace.
|
204 |
+
$stack[$s_pos] = '?:';
|
205 |
+
$found = true;
|
206 |
+
break;
|
207 |
+
}
|
208 |
+
|
209 |
+
if (!$found) {
|
210 |
+
throw new Exception('Missing starting "?" ternary operator');
|
211 |
+
}
|
212 |
+
$pos++;
|
213 |
+
break;
|
214 |
+
|
215 |
+
// Default - number or invalid
|
216 |
+
default:
|
217 |
+
if ($next >= '0' && $next <= '9') {
|
218 |
+
$span = strspn($str, self::NUM_CHARS, $pos);
|
219 |
+
$output[] = array(
|
220 |
+
'value',
|
221 |
+
intval(substr($str, $pos, $span))
|
222 |
+
);
|
223 |
+
$pos += $span;
|
224 |
+
continue;
|
225 |
+
}
|
226 |
+
|
227 |
+
throw new Exception(sprintf('Unknown symbol "%s"', $next));
|
228 |
+
}
|
229 |
+
}
|
230 |
+
|
231 |
+
while (!empty($stack)) {
|
232 |
+
$o2 = array_pop($stack);
|
233 |
+
if ($o2 === '(' || $o2 === ')') {
|
234 |
+
throw new Exception('Mismatched parentheses');
|
235 |
+
}
|
236 |
+
|
237 |
+
$output[] = array(
|
238 |
+
'op',
|
239 |
+
$o2
|
240 |
+
);
|
241 |
+
}
|
242 |
+
|
243 |
+
$this->tokens = $output;
|
244 |
+
}
|
245 |
+
|
246 |
+
/**
|
247 |
+
* Get the plural form for a number.
|
248 |
+
*
|
249 |
+
* Caches the value for repeated calls.
|
250 |
+
*
|
251 |
+
* @since 4.9.0
|
252 |
+
*
|
253 |
+
* @param int $num Number to get plural form for.
|
254 |
+
*
|
255 |
+
* @return int Plural form value.
|
256 |
+
*/
|
257 |
+
public function get($num) {
|
258 |
+
if (isset($this->cache[$num])) {
|
259 |
+
return $this->cache[$num];
|
260 |
+
}
|
261 |
+
|
262 |
+
return $this->cache[$num] = $this->execute($num);
|
263 |
+
}
|
264 |
+
|
265 |
+
/**
|
266 |
+
* Execute the plural form function.
|
267 |
+
*
|
268 |
+
* @since 4.9.0
|
269 |
+
*
|
270 |
+
* @param int $n Variable "n" to substitute.
|
271 |
+
*
|
272 |
+
* @return int Plural form value.
|
273 |
+
*/
|
274 |
+
public function execute($n) {
|
275 |
+
$stack = array();
|
276 |
+
$i = 0;
|
277 |
+
$total = count($this->tokens);
|
278 |
+
while ($i < $total) {
|
279 |
+
$next = $this->tokens[$i];
|
280 |
+
$i++;
|
281 |
+
if ($next[0] === 'var') {
|
282 |
+
$stack[] = $n;
|
283 |
+
continue;
|
284 |
+
} elseif ($next[0] === 'value') {
|
285 |
+
$stack[] = $next[1];
|
286 |
+
continue;
|
287 |
+
}
|
288 |
+
|
289 |
+
// Only operators left.
|
290 |
+
switch ($next[1]) {
|
291 |
+
case '%':
|
292 |
+
$v2 = array_pop($stack);
|
293 |
+
$v1 = array_pop($stack);
|
294 |
+
$stack[] = $v1 % $v2;
|
295 |
+
break;
|
296 |
+
|
297 |
+
case '||':
|
298 |
+
$v2 = array_pop($stack);
|
299 |
+
$v1 = array_pop($stack);
|
300 |
+
$stack[] = $v1 || $v2;
|
301 |
+
break;
|
302 |
+
|
303 |
+
case '&&':
|
304 |
+
$v2 = array_pop($stack);
|
305 |
+
$v1 = array_pop($stack);
|
306 |
+
$stack[] = $v1 && $v2;
|
307 |
+
break;
|
308 |
+
|
309 |
+
case '<':
|
310 |
+
$v2 = array_pop($stack);
|
311 |
+
$v1 = array_pop($stack);
|
312 |
+
$stack[] = $v1 < $v2;
|
313 |
+
break;
|
314 |
+
|
315 |
+
case '<=':
|
316 |
+
$v2 = array_pop($stack);
|
317 |
+
$v1 = array_pop($stack);
|
318 |
+
$stack[] = $v1 <= $v2;
|
319 |
+
break;
|
320 |
+
|
321 |
+
case '>':
|
322 |
+
$v2 = array_pop($stack);
|
323 |
+
$v1 = array_pop($stack);
|
324 |
+
$stack[] = $v1 > $v2;
|
325 |
+
break;
|
326 |
+
|
327 |
+
case '>=':
|
328 |
+
$v2 = array_pop($stack);
|
329 |
+
$v1 = array_pop($stack);
|
330 |
+
$stack[] = $v1 >= $v2;
|
331 |
+
break;
|
332 |
+
|
333 |
+
case '!=':
|
334 |
+
$v2 = array_pop($stack);
|
335 |
+
$v1 = array_pop($stack);
|
336 |
+
$stack[] = $v1 != $v2;
|
337 |
+
break;
|
338 |
+
|
339 |
+
case '==':
|
340 |
+
$v2 = array_pop($stack);
|
341 |
+
$v1 = array_pop($stack);
|
342 |
+
$stack[] = $v1 == $v2;
|
343 |
+
break;
|
344 |
+
|
345 |
+
case '?:':
|
346 |
+
$v3 = array_pop($stack);
|
347 |
+
$v2 = array_pop($stack);
|
348 |
+
$v1 = array_pop($stack);
|
349 |
+
$stack[] = $v1 ? $v2 : $v3;
|
350 |
+
break;
|
351 |
+
|
352 |
+
default:
|
353 |
+
throw new Exception(sprintf('Unknown operator "%s"', $next[1]));
|
354 |
+
}
|
355 |
+
}
|
356 |
+
|
357 |
+
if (count($stack) !== 1) {
|
358 |
+
throw new Exception('Too many values remaining on the stack');
|
359 |
+
}
|
360 |
+
|
361 |
+
return (int)$stack[0];
|
362 |
+
}
|
363 |
+
}
|
364 |
+
endif;
|
nextend/library/libraries/localization/pomo/streams.php
CHANGED
@@ -9,307 +9,306 @@
|
|
9 |
*/
|
10 |
|
11 |
if ( ! class_exists( 'POMO_Reader', false ) ):
|
12 |
-
class POMO_Reader {
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
}
|
135 |
endif;
|
136 |
|
137 |
if ( ! class_exists( 'POMO_FileReader', false ) ):
|
138 |
-
class POMO_FileReader extends POMO_Reader {
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
}
|
205 |
endif;
|
206 |
|
207 |
if ( ! class_exists( 'POMO_StringReader', false ) ):
|
208 |
-
/**
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
class POMO_StringReader extends POMO_Reader {
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
}
|
268 |
endif;
|
269 |
|
270 |
if ( ! class_exists( 'POMO_CachedFileReader', false ) ):
|
271 |
-
/**
|
272 |
-
|
273 |
-
|
274 |
-
class POMO_CachedFileReader extends POMO_StringReader {
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
}
|
293 |
endif;
|
294 |
|
295 |
if ( ! class_exists( 'POMO_CachedIntFileReader', false ) ):
|
296 |
-
/**
|
297 |
-
|
298 |
-
|
299 |
-
class POMO_CachedIntFileReader extends POMO_CachedFileReader {
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
}
|
314 |
endif;
|
315 |
-
|
9 |
*/
|
10 |
|
11 |
if ( ! class_exists( 'POMO_Reader', false ) ):
|
12 |
+
class POMO_Reader {
|
13 |
+
|
14 |
+
var $endian = 'little';
|
15 |
+
var $_post = '';
|
16 |
+
|
17 |
+
/**
|
18 |
+
* PHP5 constructor.
|
19 |
+
*/
|
20 |
+
function __construct() {
|
21 |
+
$this->is_overloaded = ((ini_get("mbstring.func_overload") & 2) != 0) && function_exists('mb_substr');
|
22 |
+
$this->_pos = 0;
|
23 |
+
}
|
24 |
+
|
25 |
+
/**
|
26 |
+
* PHP4 constructor.
|
27 |
+
*/
|
28 |
+
public function POMO_Reader() {
|
29 |
+
self::__construct();
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Sets the endianness of the file.
|
34 |
+
*
|
35 |
+
* @param $endian string 'big' or 'little'
|
36 |
+
*/
|
37 |
+
function setEndian($endian) {
|
38 |
+
$this->endian = $endian;
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Reads a 32bit Integer from the Stream
|
43 |
+
*
|
44 |
+
* @return mixed The integer, corresponding to the next 32 bits from
|
45 |
+
* the stream of false if there are not enough bytes or on error
|
46 |
+
*/
|
47 |
+
function readint32() {
|
48 |
+
$bytes = $this->read(4);
|
49 |
+
if (4 != $this->strlen($bytes))
|
50 |
+
return false;
|
51 |
+
$endian_letter = ('big' == $this->endian)? 'N' : 'V';
|
52 |
+
$int = unpack($endian_letter, $bytes);
|
53 |
+
return reset( $int );
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Reads an array of 32-bit Integers from the Stream
|
58 |
+
*
|
59 |
+
* @param integer count How many elements should be read
|
60 |
+
* @return mixed Array of integers or false if there isn't
|
61 |
+
* enough data or on error
|
62 |
+
*/
|
63 |
+
function readint32array($count) {
|
64 |
+
$bytes = $this->read(4 * $count);
|
65 |
+
if (4*$count != $this->strlen($bytes))
|
66 |
+
return false;
|
67 |
+
$endian_letter = ('big' == $this->endian)? 'N' : 'V';
|
68 |
+
return unpack($endian_letter.$count, $bytes);
|
69 |
+
}
|
70 |
+
|
71 |
+
/**
|
72 |
+
* @param string $string
|
73 |
+
* @param int $start
|
74 |
+
* @param int $length
|
75 |
+
* @return string
|
76 |
+
*/
|
77 |
+
function substr($string, $start, $length) {
|
78 |
+
if ($this->is_overloaded) {
|
79 |
+
return mb_substr($string, $start, $length, 'ascii');
|
80 |
+
} else {
|
81 |
+
return substr($string, $start, $length);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @param string $string
|
87 |
+
* @return int
|
88 |
+
*/
|
89 |
+
function strlen($string) {
|
90 |
+
if ($this->is_overloaded) {
|
91 |
+
return mb_strlen($string, 'ascii');
|
92 |
+
} else {
|
93 |
+
return strlen($string);
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* @param string $string
|
99 |
+
* @param int $chunk_size
|
100 |
+
* @return array
|
101 |
+
*/
|
102 |
+
function str_split($string, $chunk_size) {
|
103 |
+
if (!function_exists('str_split')) {
|
104 |
+
$length = $this->strlen($string);
|
105 |
+
$out = array();
|
106 |
+
for ($i = 0; $i < $length; $i += $chunk_size)
|
107 |
+
$out[] = $this->substr($string, $i, $chunk_size);
|
108 |
+
return $out;
|
109 |
+
} else {
|
110 |
+
return str_split( $string, $chunk_size );
|
111 |
+
}
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* @return int
|
116 |
+
*/
|
117 |
+
function pos() {
|
118 |
+
return $this->_pos;
|
119 |
+
}
|
120 |
+
|
121 |
+
/**
|
122 |
+
* @return true
|
123 |
+
*/
|
124 |
+
function is_resource() {
|
125 |
+
return true;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* @return true
|
130 |
+
*/
|
131 |
+
function close() {
|
132 |
+
return true;
|
133 |
+
}
|
134 |
+
}
|
135 |
endif;
|
136 |
|
137 |
if ( ! class_exists( 'POMO_FileReader', false ) ):
|
138 |
+
class POMO_FileReader extends POMO_Reader {
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @param string $filename
|
142 |
+
*/
|
143 |
+
function __construct( $filename ) {
|
144 |
+
parent::POMO_Reader();
|
145 |
+
$this->_f = fopen($filename, 'rb');
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* PHP4 constructor.
|
150 |
+
*/
|
151 |
+
public function POMO_FileReader( $filename ) {
|
152 |
+
self::__construct( $filename );
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* @param int $bytes
|
157 |
+
*/
|
158 |
+
function read($bytes) {
|
159 |
+
return fread($this->_f, $bytes);
|
160 |
+
}
|
161 |
+
|
162 |
+
/**
|
163 |
+
* @param int $pos
|
164 |
+
* @return boolean
|
165 |
+
*/
|
166 |
+
function seekto($pos) {
|
167 |
+
if ( -1 == fseek($this->_f, $pos, SEEK_SET)) {
|
168 |
+
return false;
|
169 |
+
}
|
170 |
+
$this->_pos = $pos;
|
171 |
+
return true;
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* @return bool
|
176 |
+
*/
|
177 |
+
function is_resource() {
|
178 |
+
return is_resource($this->_f);
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* @return bool
|
183 |
+
*/
|
184 |
+
function feof() {
|
185 |
+
return feof($this->_f);
|
186 |
+
}
|
187 |
+
|
188 |
+
/**
|
189 |
+
* @return bool
|
190 |
+
*/
|
191 |
+
function close() {
|
192 |
+
return fclose($this->_f);
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* @return string
|
197 |
+
*/
|
198 |
+
function read_all() {
|
199 |
+
$all = '';
|
200 |
+
while ( !$this->feof() )
|
201 |
+
$all .= $this->read(4096);
|
202 |
+
return $all;
|
203 |
+
}
|
204 |
+
}
|
205 |
endif;
|
206 |
|
207 |
if ( ! class_exists( 'POMO_StringReader', false ) ):
|
208 |
+
/**
|
209 |
+
* Provides file-like methods for manipulating a string instead
|
210 |
+
* of a physical file.
|
211 |
+
*/
|
212 |
+
class POMO_StringReader extends POMO_Reader {
|
213 |
+
|
214 |
+
var $_str = '';
|
215 |
+
|
216 |
+
/**
|
217 |
+
* PHP5 constructor.
|
218 |
+
*/
|
219 |
+
function __construct( $str = '' ) {
|
220 |
+
parent::POMO_Reader();
|
221 |
+
$this->_str = $str;
|
222 |
+
$this->_pos = 0;
|
223 |
+
}
|
224 |
+
|
225 |
+
/**
|
226 |
+
* PHP4 constructor.
|
227 |
+
*/
|
228 |
+
public function POMO_StringReader( $str = '' ) {
|
229 |
+
self::__construct( $str );
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* @param string $bytes
|
234 |
+
* @return string
|
235 |
+
*/
|
236 |
+
function read($bytes) {
|
237 |
+
$data = $this->substr($this->_str, $this->_pos, $bytes);
|
238 |
+
$this->_pos += $bytes;
|
239 |
+
if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
|
240 |
+
return $data;
|
241 |
+
}
|
242 |
+
|
243 |
+
/**
|
244 |
+
* @param int $pos
|
245 |
+
* @return int
|
246 |
+
*/
|
247 |
+
function seekto($pos) {
|
248 |
+
$this->_pos = $pos;
|
249 |
+
if ($this->strlen($this->_str) < $this->_pos) $this->_pos = $this->strlen($this->_str);
|
250 |
+
return $this->_pos;
|
251 |
+
}
|
252 |
+
|
253 |
+
/**
|
254 |
+
* @return int
|
255 |
+
*/
|
256 |
+
function length() {
|
257 |
+
return $this->strlen($this->_str);
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* @return string
|
262 |
+
*/
|
263 |
+
function read_all() {
|
264 |
+
return $this->substr($this->_str, $this->_pos, $this->strlen($this->_str));
|
265 |
+
}
|
266 |
+
|
267 |
+
}
|
268 |
endif;
|
269 |
|
270 |
if ( ! class_exists( 'POMO_CachedFileReader', false ) ):
|
271 |
+
/**
|
272 |
+
* Reads the contents of the file in the beginning.
|
273 |
+
*/
|
274 |
+
class POMO_CachedFileReader extends POMO_StringReader {
|
275 |
+
/**
|
276 |
+
* PHP5 constructor.
|
277 |
+
*/
|
278 |
+
function __construct( $filename ) {
|
279 |
+
parent::POMO_StringReader();
|
280 |
+
$this->_str = file_get_contents($filename);
|
281 |
+
if (false === $this->_str)
|
282 |
+
return false;
|
283 |
+
$this->_pos = 0;
|
284 |
+
}
|
285 |
+
|
286 |
+
/**
|
287 |
+
* PHP4 constructor.
|
288 |
+
*/
|
289 |
+
public function POMO_CachedFileReader( $filename ) {
|
290 |
+
self::__construct( $filename );
|
291 |
+
}
|
292 |
+
}
|
293 |
endif;
|
294 |
|
295 |
if ( ! class_exists( 'POMO_CachedIntFileReader', false ) ):
|
296 |
+
/**
|
297 |
+
* Reads the contents of the file in the beginning.
|
298 |
+
*/
|
299 |
+
class POMO_CachedIntFileReader extends POMO_CachedFileReader {
|
300 |
+
/**
|
301 |
+
* PHP5 constructor.
|
302 |
+
*/
|
303 |
+
public function __construct( $filename ) {
|
304 |
+
parent::POMO_CachedFileReader($filename);
|
305 |
+
}
|
306 |
+
|
307 |
+
/**
|
308 |
+
* PHP4 constructor.
|
309 |
+
*/
|
310 |
+
function POMO_CachedIntFileReader( $filename ) {
|
311 |
+
self::__construct( $filename );
|
312 |
+
}
|
313 |
+
}
|
314 |
endif;
|
|
nextend/library/libraries/localization/pomo/translations.php
CHANGED
@@ -7,352 +7,355 @@
|
|
7 |
* @subpackage translations
|
8 |
*/
|
9 |
|
|
|
10 |
require_once dirname(__FILE__) . '/entry.php';
|
11 |
|
12 |
if ( ! class_exists( 'Translations', false ) ):
|
13 |
-
class Translations {
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
}
|
164 |
|
165 |
-
class Gettext_Translations extends Translations {
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
|
|
|
|
210 |
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
}
|
273 |
endif;
|
274 |
|
275 |
if ( ! class_exists( 'NOOP_Translations', false ) ):
|
276 |
-
/**
|
277 |
-
|
278 |
-
|
279 |
-
class NOOP_Translations {
|
280 |
-
|
281 |
-
|
282 |
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
}
|
358 |
-
endif;
|
7 |
* @subpackage translations
|
8 |
*/
|
9 |
|
10 |
+
require_once dirname(__FILE__) . '/plural-forms.php';
|
11 |
require_once dirname(__FILE__) . '/entry.php';
|
12 |
|
13 |
if ( ! class_exists( 'Translations', false ) ):
|
14 |
+
class Translations {
|
15 |
+
var $entries = array();
|
16 |
+
var $headers = array();
|
17 |
|
18 |
+
/**
|
19 |
+
* Add entry to the PO structure
|
20 |
+
*
|
21 |
+
* @param array|Translation_Entry $entry
|
22 |
+
* @return bool true on success, false if the entry doesn't have a key
|
23 |
+
*/
|
24 |
+
function add_entry($entry) {
|
25 |
+
if (is_array($entry)) {
|
26 |
+
$entry = new Translation_Entry($entry);
|
27 |
+
}
|
28 |
+
$key = $entry->key();
|
29 |
+
if (false === $key) return false;
|
30 |
+
$this->entries[$key] = &$entry;
|
31 |
+
return true;
|
32 |
+
}
|
33 |
|
34 |
+
/**
|
35 |
+
* @param array|Translation_Entry $entry
|
36 |
+
* @return bool
|
37 |
+
*/
|
38 |
+
function add_entry_or_merge($entry) {
|
39 |
+
if (is_array($entry)) {
|
40 |
+
$entry = new Translation_Entry($entry);
|
41 |
+
}
|
42 |
+
$key = $entry->key();
|
43 |
+
if (false === $key) return false;
|
44 |
+
if (isset($this->entries[$key]))
|
45 |
+
$this->entries[$key]->merge_with($entry);
|
46 |
+
else
|
47 |
+
$this->entries[$key] = &$entry;
|
48 |
+
return true;
|
49 |
+
}
|
50 |
|
51 |
+
/**
|
52 |
+
* Sets $header PO header to $value
|
53 |
+
*
|
54 |
+
* If the header already exists, it will be overwritten
|
55 |
+
*
|
56 |
+
* TODO: this should be out of this class, it is gettext specific
|
57 |
+
*
|
58 |
+
* @param string $header header name, without trailing :
|
59 |
+
* @param string $value header value, without trailing \n
|
60 |
+
*/
|
61 |
+
function set_header($header, $value) {
|
62 |
+
$this->headers[$header] = $value;
|
63 |
+
}
|
64 |
|
65 |
+
/**
|
66 |
+
* @param array $headers
|
67 |
+
*/
|
68 |
+
function set_headers($headers) {
|
69 |
+
foreach($headers as $header => $value) {
|
70 |
+
$this->set_header($header, $value);
|
71 |
+
}
|
72 |
+
}
|
73 |
|
74 |
+
/**
|
75 |
+
* @param string $header
|
76 |
+
*/
|
77 |
+
function get_header($header) {
|
78 |
+
return isset($this->headers[$header])? $this->headers[$header] : false;
|
79 |
+
}
|
80 |
|
81 |
+
/**
|
82 |
+
* @param Translation_Entry $entry
|
83 |
+
*/
|
84 |
+
function translate_entry(&$entry) {
|
85 |
+
$key = $entry->key();
|
86 |
+
return isset($this->entries[$key])? $this->entries[$key] : false;
|
87 |
+
}
|
88 |
|
89 |
+
/**
|
90 |
+
* @param string $singular
|
91 |
+
* @param string $context
|
92 |
+
* @return string
|
93 |
+
*/
|
94 |
+
function translate($singular, $context=null) {
|
95 |
+
$entry = new Translation_Entry(array('singular' => $singular, 'context' => $context));
|
96 |
+
$translated = $this->translate_entry($entry);
|
97 |
+
return ($translated && !empty($translated->translations))? $translated->translations[0] : $singular;
|
98 |
+
}
|
99 |
|
100 |
+
/**
|
101 |
+
* Given the number of items, returns the 0-based index of the plural form to use
|
102 |
+
*
|
103 |
+
* Here, in the base Translations class, the common logic for English is implemented:
|
104 |
+
* 0 if there is one element, 1 otherwise
|
105 |
+
*
|
106 |
+
* This function should be overridden by the sub-classes. For example MO/PO can derive the logic
|
107 |
+
* from their headers.
|
108 |
+
*
|
109 |
+
* @param integer $count number of items
|
110 |
+
*/
|
111 |
+
function select_plural_form($count) {
|
112 |
+
return 1 == $count? 0 : 1;
|
113 |
+
}
|
114 |
|
115 |
+
/**
|
116 |
+
* @return int
|
117 |
+
*/
|
118 |
+
function get_plural_forms_count() {
|
119 |
+
return 2;
|
120 |
+
}
|
121 |
|
122 |
+
/**
|
123 |
+
* @param string $singular
|
124 |
+
* @param string $plural
|
125 |
+
* @param int $count
|
126 |
+
* @param string $context
|
127 |
+
*/
|
128 |
+
function translate_plural($singular, $plural, $count, $context = null) {
|
129 |
+
$entry = new Translation_Entry(array('singular' => $singular, 'plural' => $plural, 'context' => $context));
|
130 |
+
$translated = $this->translate_entry($entry);
|
131 |
+
$index = $this->select_plural_form($count);
|
132 |
+
$total_plural_forms = $this->get_plural_forms_count();
|
133 |
+
if ($translated && 0 <= $index && $index < $total_plural_forms &&
|
134 |
+
is_array($translated->translations) &&
|
135 |
+
isset($translated->translations[$index]))
|
136 |
+
return $translated->translations[$index];
|
137 |
+
else
|
138 |
+
return 1 == $count? $singular : $plural;
|
139 |
+
}
|
140 |
|
141 |
+
/**
|
142 |
+
* Merge $other in the current object.
|
143 |
+
*
|
144 |
+
* @param Object $other Another Translation object, whose translations will be merged in this one (passed by reference).
|
145 |
+
* @return void
|
146 |
+
**/
|
147 |
+
function merge_with(&$other) {
|
148 |
+
foreach( $other->entries as $entry ) {
|
149 |
+
$this->entries[$entry->key()] = $entry;
|
150 |
+
}
|
151 |
+
}
|
152 |
|
153 |
+
/**
|
154 |
+
* @param object $other
|
155 |
+
*/
|
156 |
+
function merge_originals_with(&$other) {
|
157 |
+
foreach( $other->entries as $entry ) {
|
158 |
+
if ( !isset( $this->entries[$entry->key()] ) )
|
159 |
+
$this->entries[$entry->key()] = $entry;
|
160 |
+
else
|
161 |
+
$this->entries[$entry->key()]->merge_with($entry);
|
162 |
+
}
|
163 |
+
}
|
164 |
+
}
|
165 |
|
166 |
+
class Gettext_Translations extends Translations {
|
167 |
+
/**
|
168 |
+
* The gettext implementation of select_plural_form.
|
169 |
+
*
|
170 |
+
* It lives in this class, because there are more than one descendand, which will use it and
|
171 |
+
* they can't share it effectively.
|
172 |
+
*
|
173 |
+
* @param int $count
|
174 |
+
*/
|
175 |
+
function gettext_select_plural_form($count) {
|
176 |
+
if (!isset($this->_gettext_select_plural_form) || is_null($this->_gettext_select_plural_form)) {
|
177 |
+
list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms'));
|
178 |
+
$this->_nplurals = $nplurals;
|
179 |
+
$this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression);
|
180 |
+
}
|
181 |
+
return call_user_func($this->_gettext_select_plural_form, $count);
|
182 |
+
}
|
183 |
|
184 |
+
/**
|
185 |
+
* @param string $header
|
186 |
+
* @return array
|
187 |
+
*/
|
188 |
+
function nplurals_and_expression_from_header($header) {
|
189 |
+
if (preg_match('/^\s*nplurals\s*=\s*(\d+)\s*;\s+plural\s*=\s*(.+)$/', $header, $matches)) {
|
190 |
+
$nplurals = (int)$matches[1];
|
191 |
+
$expression = trim( $matches[2] );
|
192 |
+
return array($nplurals, $expression);
|
193 |
+
} else {
|
194 |
+
return array(2, 'n != 1');
|
195 |
+
}
|
196 |
+
}
|
197 |
|
198 |
+
/**
|
199 |
+
* Makes a function, which will return the right translation index, according to the
|
200 |
+
* plural forms header
|
201 |
+
* @param int $nplurals
|
202 |
+
* @param string $expression
|
203 |
+
*/
|
204 |
+
function make_plural_form_function($nplurals, $expression) {
|
205 |
+
try {
|
206 |
+
$handler = new Plural_Forms( rtrim( $expression, ';' ) );
|
207 |
+
return array( $handler, 'get' );
|
208 |
+
} catch ( Exception $e ) {
|
209 |
+
// Fall back to default plural-form function.
|
210 |
+
return $this->make_plural_form_function( 2, 'n != 1' );
|
211 |
+
}
|
212 |
+
}
|
213 |
|
214 |
+
/**
|
215 |
+
* Adds parentheses to the inner parts of ternary operators in
|
216 |
+
* plural expressions, because PHP evaluates ternary oerators from left to right
|
217 |
+
*
|
218 |
+
* @param string $expression the expression without parentheses
|
219 |
+
* @return string the expression with parentheses added
|
220 |
+
*/
|
221 |
+
function parenthesize_plural_exression($expression) {
|
222 |
+
$expression .= ';';
|
223 |
+
$res = '';
|
224 |
+
$depth = 0;
|
225 |
+
for ($i = 0; $i < strlen($expression); ++$i) {
|
226 |
+
$char = $expression[$i];
|
227 |
+
switch ($char) {
|
228 |
+
case '?':
|
229 |
+
$res .= ' ? (';
|
230 |
+
$depth++;
|
231 |
+
break;
|
232 |
+
case ':':
|
233 |
+
$res .= ') : (';
|
234 |
+
break;
|
235 |
+
case ';':
|
236 |
+
$res .= str_repeat(')', $depth) . ';';
|
237 |
+
$depth= 0;
|
238 |
+
break;
|
239 |
+
default:
|
240 |
+
$res .= $char;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
return rtrim($res, ';');
|
244 |
+
}
|
245 |
|
246 |
+
/**
|
247 |
+
* @param string $translation
|
248 |
+
* @return array
|
249 |
+
*/
|
250 |
+
function make_headers($translation) {
|
251 |
+
$headers = array();
|
252 |
+
// sometimes \ns are used instead of real new lines
|
253 |
+
$translation = str_replace('\n', "\n", $translation);
|
254 |
+
$lines = explode("\n", $translation);
|
255 |
+
foreach($lines as $line) {
|
256 |
+
$parts = explode(':', $line, 2);
|
257 |
+
if (!isset($parts[1])) continue;
|
258 |
+
$headers[trim($parts[0])] = trim($parts[1]);
|
259 |
+
}
|
260 |
+
return $headers;
|
261 |
+
}
|
262 |
|
263 |
+
/**
|
264 |
+
* @param string $header
|
265 |
+
* @param string $value
|
266 |
+
*/
|
267 |
+
function set_header($header, $value) {
|
268 |
+
parent::set_header($header, $value);
|
269 |
+
if ('Plural-Forms' == $header) {
|
270 |
+
list( $nplurals, $expression ) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms'));
|
271 |
+
$this->_nplurals = $nplurals;
|
272 |
+
$this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression);
|
273 |
+
}
|
274 |
+
}
|
275 |
+
}
|
276 |
endif;
|
277 |
|
278 |
if ( ! class_exists( 'NOOP_Translations', false ) ):
|
279 |
+
/**
|
280 |
+
* Provides the same interface as Translations, but doesn't do anything
|
281 |
+
*/
|
282 |
+
class NOOP_Translations {
|
283 |
+
var $entries = array();
|
284 |
+
var $headers = array();
|
285 |
|
286 |
+
function add_entry($entry) {
|
287 |
+
return true;
|
288 |
+
}
|
289 |
|
290 |
+
/**
|
291 |
+
*
|
292 |
+
* @param string $header
|
293 |
+
* @param string $value
|
294 |
+
*/
|
295 |
+
function set_header($header, $value) {
|
296 |
+
}
|
297 |
|
298 |
+
/**
|
299 |
+
*
|
300 |
+
* @param array $headers
|
301 |
+
*/
|
302 |
+
function set_headers($headers) {
|
303 |
+
}
|
304 |
|
305 |
+
/**
|
306 |
+
* @param string $header
|
307 |
+
* @return false
|
308 |
+
*/
|
309 |
+
function get_header($header) {
|
310 |
+
return false;
|
311 |
+
}
|
312 |
|
313 |
+
/**
|
314 |
+
* @param Translation_Entry $entry
|
315 |
+
* @return false
|
316 |
+
*/
|
317 |
+
function translate_entry(&$entry) {
|
318 |
+
return false;
|
319 |
+
}
|
320 |
|
321 |
+
/**
|
322 |
+
* @param string $singular
|
323 |
+
* @param string $context
|
324 |
+
*/
|
325 |
+
function translate($singular, $context=null) {
|
326 |
+
return $singular;
|
327 |
+
}
|
328 |
|
329 |
+
/**
|
330 |
+
*
|
331 |
+
* @param int $count
|
332 |
+
* @return bool
|
333 |
+
*/
|
334 |
+
function select_plural_form($count) {
|
335 |
+
return 1 == $count? 0 : 1;
|
336 |
+
}
|
337 |
|
338 |
+
/**
|
339 |
+
* @return int
|
340 |
+
*/
|
341 |
+
function get_plural_forms_count() {
|
342 |
+
return 2;
|
343 |
+
}
|
344 |
|
345 |
+
/**
|
346 |
+
* @param string $singular
|
347 |
+
* @param string $plural
|
348 |
+
* @param int $count
|
349 |
+
* @param string $context
|
350 |
+
*/
|
351 |
+
function translate_plural($singular, $plural, $count, $context = null) {
|
352 |
+
return 1 == $count? $singular : $plural;
|
353 |
+
}
|
354 |
|
355 |
+
/**
|
356 |
+
* @param object $other
|
357 |
+
*/
|
358 |
+
function merge_with(&$other) {
|
359 |
+
}
|
360 |
+
}
|
361 |
+
endif;
|
nextend/library/libraries/zip/reader.php
CHANGED
@@ -8,6 +8,9 @@ if (function_exists('zip_open') && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
|
8 |
return array();
|
9 |
}
|
10 |
$data = array();
|
|
|
|
|
|
|
11 |
while ($entry = zip_read($zip)) {
|
12 |
|
13 |
zip_entry_open($zip, $entry, "r");
|
8 |
return array();
|
9 |
}
|
10 |
$data = array();
|
11 |
+
if (!function_exists('zip_read')) {
|
12 |
+
return N2Message::error(n2_('The zip_read() function is not available in the server. Contact your host and ask them to enable it.'));
|
13 |
+
}
|
14 |
while ($entry = zip_read($zip)) {
|
15 |
|
16 |
zip_entry_open($zip, $entry, "r");
|
nextend/library/nextend.php
CHANGED
@@ -31,8 +31,9 @@ class N2 {
|
|
31 |
if (N2Settings::get('curl-clean-proxy', 0)) {
|
32 |
curl_setopt($ch, CURLOPT_PROXY, '');
|
33 |
}
|
34 |
-
$data
|
35 |
-
|
|
|
36 |
curl_setopt($ch, CURLOPT_CAINFO, N2LIBRARY . '/cacert.pem');
|
37 |
$data = curl_exec($ch);
|
38 |
}
|
31 |
if (N2Settings::get('curl-clean-proxy', 0)) {
|
32 |
curl_setopt($ch, CURLOPT_PROXY, '');
|
33 |
}
|
34 |
+
$data = curl_exec($ch);
|
35 |
+
$errorNumber = curl_errno($ch);
|
36 |
+
if ($errorNumber == 60 || $errorNumber == 77) {
|
37 |
curl_setopt($ch, CURLOPT_CAINFO, N2LIBRARY . '/cacert.pem');
|
38 |
$data = curl_exec($ch);
|
39 |
}
|
nextend/media/css/litebox.css
DELETED
@@ -1,247 +0,0 @@
|
|
1 |
-
/* LiteBox v1.3, Copyright 2014, Joe Mottershaw, https://github.com/joemottershaw/
|
2 |
-
// =============================================================================== */
|
3 |
-
|
4 |
-
/* Table of Contents
|
5 |
-
// ==================================================
|
6 |
-
// #Default
|
7 |
-
|
8 |
-
|
9 |
-
/* #Default
|
10 |
-
// ================================================== */
|
11 |
-
|
12 |
-
.litebox-overlay,
|
13 |
-
.litebox-overlay > * {
|
14 |
-
-moz-box-sizing: border-box;
|
15 |
-
-webkit-box-sizing: border-box;
|
16 |
-
box-sizing: border-box;
|
17 |
-
}
|
18 |
-
|
19 |
-
.litebox-overlay {
|
20 |
-
display: none;
|
21 |
-
width: 100%;
|
22 |
-
min-width: 280px;
|
23 |
-
text-align: center;
|
24 |
-
position: fixed;
|
25 |
-
top: 0;
|
26 |
-
left: 0;
|
27 |
-
z-index: 100000;
|
28 |
-
|
29 |
-
-webkit-touch-callout: none;
|
30 |
-
-webkit-user-select: none;
|
31 |
-
-khtml-user-select: none;
|
32 |
-
-moz-user-select: none;
|
33 |
-
-ms-user-select: none;
|
34 |
-
user-select: none;
|
35 |
-
}
|
36 |
-
|
37 |
-
@-webkit-keyframes liteboxLoader {
|
38 |
-
0% {
|
39 |
-
-webkit-transform: rotate(0deg);
|
40 |
-
}
|
41 |
-
100% {
|
42 |
-
-webkit-transform: rotate(360deg);
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
@-moz-keyframes liteboxLoader {
|
47 |
-
0% {
|
48 |
-
-moz-transform: rotate(0deg);
|
49 |
-
}
|
50 |
-
100% {
|
51 |
-
-moz-transform: rotate(360deg);
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
@-ms-keyframes liteboxLoader {
|
56 |
-
0% {
|
57 |
-
-ms-transform: rotate(0deg);
|
58 |
-
}
|
59 |
-
100% {
|
60 |
-
-ms-transform: rotate(360deg);
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
@-o-keyframes liteboxLoader {
|
65 |
-
0% {
|
66 |
-
-o-transform: rotate(0deg);
|
67 |
-
}
|
68 |
-
100% {
|
69 |
-
-o-transform: rotate(360deg);
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
@keyframes liteboxLoader {
|
74 |
-
0% {
|
75 |
-
transform: rotate(0deg);
|
76 |
-
}
|
77 |
-
100% {
|
78 |
-
transform: rotate(360deg);
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
.litebox-overlay .litebox-loader {
|
83 |
-
position: absolute;
|
84 |
-
width: 40px;
|
85 |
-
height: 40px;
|
86 |
-
left: 20px;
|
87 |
-
top: 20px;
|
88 |
-
border: 3px solid #111;
|
89 |
-
border-right-color: #fff;
|
90 |
-
border-radius: 50%;
|
91 |
-
-webkit-animation: liteboxLoader 1s linear infinite;
|
92 |
-
-moz-animation: liteboxLoader 1s linear infinite;
|
93 |
-
-ms-animation: liteboxLoader 1s linear infinite;
|
94 |
-
-o-animation: liteboxLoader 1s linear infinite;
|
95 |
-
animation: liteboxLoader 1s linear infinite;
|
96 |
-
}
|
97 |
-
|
98 |
-
.litebox-overlay .litebox-text {
|
99 |
-
width: 100%;
|
100 |
-
padding: 0 15px;
|
101 |
-
background: rgba(0, 0, 0, 0.5);
|
102 |
-
color: #fff;
|
103 |
-
font-size: 12px;
|
104 |
-
line-height: 50px;
|
105 |
-
position: absolute;
|
106 |
-
bottom: 0;
|
107 |
-
z-index: 2;
|
108 |
-
|
109 |
-
-webkit-opacity: 0;
|
110 |
-
-khtml-opacity: 0;
|
111 |
-
-moz-opacity: 0;
|
112 |
-
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
113 |
-
filter: alpha(opacity=0);
|
114 |
-
opacity: 0;
|
115 |
-
|
116 |
-
-webkit-transition: all .2s ease-in-out;
|
117 |
-
-moz-transition: all .2s ease-in-out;
|
118 |
-
-o-transition: all .2s ease-in-out;
|
119 |
-
-ms-transition: all .2s ease-in-out;
|
120 |
-
transition: all .2s ease-in-out;
|
121 |
-
}
|
122 |
-
|
123 |
-
.litebox-overlay .litebox-text.active {
|
124 |
-
-webkit-opacity: 1;
|
125 |
-
-khtml-opacity: 1;
|
126 |
-
-moz-opacity: 1;
|
127 |
-
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
128 |
-
filter: alpha(opacity=100);
|
129 |
-
opacity: 1;
|
130 |
-
}
|
131 |
-
|
132 |
-
.litebox-overlay .litebox-close {
|
133 |
-
width: 36px;
|
134 |
-
height: 36px;
|
135 |
-
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAABGdBTUEAALGPC/xhBQAAANVQTFRF////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAA////jF9lcQAAAEZ0Uk5TCjk7xdCKoIju7ezPxiPv9ms2WJiZ6ckW+AYbnvAl9RetqzLoCZ8nKJybt7YMDZoV6wfE0fTyOonqbFf5OMj6JBnzCPEdALak5UoAAAGASURBVDjLpZTndoJAEIVNL/ausRdU7ALSiyLc93+kIEUWhJPkZH7tmfPt7rQ7GfsXlvkztJarWr3VqmtVeZ0CGTSHm3G0kQCZbwqwlNSBaQ5UaQkoghmH8lmAmoeX5xSQNaLQeILcYzRaPofJmIQMEcNpPCdzCNEIoekzRkmpj8BOb5CAJzMJMhkIAZTXwSdXkYdu+BCN17RaU1h40IaDn3ux8OUdrO7ZO8zAbVxIxsq/18XFpawzPn3XCrILbSH5HuvoUg5zGfguCVsX0qDaBHW6MqfAo0JzoT12NkmRjL3D3oUUHGySIhn7ACUBOidDke+cv45J35GBX+OxjgmBEyXwYibTC0oQKebJhz9ixXTaMvM8/Xf/Aatwa0vfa4u9AJXW4E7QYNtIHZUH6L1w6Ji0oXsJx5dNHd9MVAjmD0JwJcXE4uKZmKSct1igQ4hz1gFY407mgu7IvFRuttvNcsmRuX4vc8d6dD9cGMVFL231VGoNUdfFRq2y/t8SS7NvNfRFXoyOLJ8AAAAASUVORK5CYII=') no-repeat center;
|
136 |
-
position: absolute;
|
137 |
-
top: 20px;
|
138 |
-
right: 20px;
|
139 |
-
cursor: pointer;
|
140 |
-
}
|
141 |
-
|
142 |
-
.litebox-overlay .litebox-nav {
|
143 |
-
display: none;
|
144 |
-
width: 60px;
|
145 |
-
height: 60px;
|
146 |
-
margin-top: -30px;
|
147 |
-
opacity: .2;
|
148 |
-
position: absolute;
|
149 |
-
top: 50%;
|
150 |
-
z-index: 9999999;
|
151 |
-
-webkit-transition: all 0.2s ease-in-out;
|
152 |
-
-moz-transition: all 0.2s ease-in-out;
|
153 |
-
-o-transition: all 0.2s ease-in-out;
|
154 |
-
-ms-transition: all 0.2s ease-in-out;
|
155 |
-
transition: all 0.2s ease-in-out;
|
156 |
-
}
|
157 |
-
|
158 |
-
.litebox-overlay .litebox-nav:hover {
|
159 |
-
opacity: .5;
|
160 |
-
cursor: pointer;
|
161 |
-
}
|
162 |
-
|
163 |
-
.litebox-overlay .litebox-prev {
|
164 |
-
background: url('../images/litebox-prev.png') no-repeat center;
|
165 |
-
left: 20px;
|
166 |
-
}
|
167 |
-
|
168 |
-
.litebox-overlay .litebox-next {
|
169 |
-
background: url('../images/litebox-next.png') no-repeat center;
|
170 |
-
right: 20px;
|
171 |
-
}
|
172 |
-
|
173 |
-
.litebox-overlay .litebox-container {
|
174 |
-
position: absolute;
|
175 |
-
top: 10%;
|
176 |
-
right: 10%;
|
177 |
-
bottom: 10%;
|
178 |
-
left: 10%;
|
179 |
-
overflow: hidden;
|
180 |
-
}
|
181 |
-
|
182 |
-
.litebox-overlay .litebox-container.litebox-scroll {
|
183 |
-
overflow-y: auto;
|
184 |
-
}
|
185 |
-
|
186 |
-
.litebox-overlay .litebox-container.litebox-iframe-holder {
|
187 |
-
overflow: hidden;
|
188 |
-
-webkit-overflow-scrolling: touch;
|
189 |
-
overflow-y: scroll;
|
190 |
-
}
|
191 |
-
.litebox-overlay .litebox-container.litebox-iframe-holder iframe {
|
192 |
-
overflow-y: hidden !important;
|
193 |
-
}
|
194 |
-
|
195 |
-
.litebox-overlay img,
|
196 |
-
.litebox-overlay iframe {
|
197 |
-
display: inline-block;
|
198 |
-
max-width: 100%;
|
199 |
-
max-height: 100%;
|
200 |
-
margin: 0 auto;
|
201 |
-
vertical-align: middle;
|
202 |
-
overflow-x: hidden;
|
203 |
-
}
|
204 |
-
|
205 |
-
.litebox-overlay iframe {
|
206 |
-
width: 100%;
|
207 |
-
height: 100%;
|
208 |
-
position: relative;
|
209 |
-
z-index: 999999;
|
210 |
-
width: 1px;
|
211 |
-
min-width: 100%;
|
212 |
-
}
|
213 |
-
|
214 |
-
.litebox-overlay .litebox-inline-html {
|
215 |
-
width: 100%;
|
216 |
-
padding: 20px;
|
217 |
-
background: #FFF;
|
218 |
-
line-height: normal;
|
219 |
-
overflow-x: hidden;
|
220 |
-
line-height: normal !important;
|
221 |
-
position: absolute;
|
222 |
-
}
|
223 |
-
|
224 |
-
.litebox-overlay .litebox-error {
|
225 |
-
width: 100%;
|
226 |
-
height: 100%;
|
227 |
-
color: #FFF;
|
228 |
-
text-align: center;
|
229 |
-
line-height: inherit;
|
230 |
-
}
|
231 |
-
|
232 |
-
.litebox-overlay .litebox-error span {
|
233 |
-
background: rgba(0, 0, 0, .9);
|
234 |
-
-webkit-border-radius: 3px;
|
235 |
-
-moz-border-radius: 3px;
|
236 |
-
border-radius: 3px;
|
237 |
-
padding: 20px;
|
238 |
-
color: #FFF;
|
239 |
-
text-shadow: 1px 1px 0 #000;
|
240 |
-
line-height: normal;
|
241 |
-
}
|
242 |
-
|
243 |
-
@media only screen and (max-width: 479px) {
|
244 |
-
.litebox-overlay .litebox-close {
|
245 |
-
display: none;
|
246 |
-
}
|
247 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nextend/media/css/litebox.min.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.litebox-overlay,.litebox-overlay>*{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.litebox-overlay{display:none;width:100%;min-width:280px;text-align:center;position:fixed;top:0;left:0;z-index:100000;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-webkit-keyframes liteboxLoader{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(360deg)}}@-moz-keyframes liteboxLoader{0%{-moz-transform:rotate(0deg)}to{-moz-transform:rotate(360deg)}}@-ms-keyframes liteboxLoader{0%{-ms-transform:rotate(0deg)}to{-ms-transform:rotate(360deg)}}@-o-keyframes liteboxLoader{0%{-o-transform:rotate(0deg)}to{-o-transform:rotate(360deg)}}@keyframes liteboxLoader{0%{transform:rotate(0deg)}to{transform:rotate(360deg)}}.litebox-overlay .litebox-loader{position:absolute;width:40px;height:40px;left:20px;top:20px;border:3px solid #111;border-right-color:#fff;border-radius:50%;-webkit-animation:liteboxLoader 1s linear infinite;-moz-animation:liteboxLoader 1s linear infinite;-ms-animation:liteboxLoader 1s linear infinite;-o-animation:liteboxLoader 1s linear infinite;animation:liteboxLoader 1s linear infinite}.litebox-overlay .litebox-text{width:100%;padding:0 15px;background:rgba(0,0,0,.5);color:#fff;font-size:12px;line-height:50px;position:absolute;bottom:0;z-index:2;-webkit-opacity:0;-khtml-opacity:0;-moz-opacity:0;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);filter:alpha(opacity=0);opacity:0;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.litebox-overlay .litebox-text.active{-webkit-opacity:1;-khtml-opacity:1;-moz-opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);filter:alpha(opacity=100);opacity:1}.litebox-overlay .litebox-close{width:36px;height:36px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAMAAADW3miqAAAABGdBTUEAALGPC/xhBQAAANVQTFRF////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAAA////jF9lcQAAAEZ0Uk5TCjk7xdCKoIju7ezPxiPv9ms2WJiZ6ckW+AYbnvAl9RetqzLoCZ8nKJybt7YMDZoV6wfE0fTyOonqbFf5OMj6JBnzCPEdALak5UoAAAGASURBVDjLpZTndoJAEIVNL/ausRdU7ALSiyLc93+kIEUWhJPkZH7tmfPt7rQ7GfsXlvkztJarWr3VqmtVeZ0CGTSHm3G0kQCZbwqwlNSBaQ5UaQkoghmH8lmAmoeX5xSQNaLQeILcYzRaPofJmIQMEcNpPCdzCNEIoekzRkmpj8BOb5CAJzMJMhkIAZTXwSdXkYdu+BCN17RaU1h40IaDn3ux8OUdrO7ZO8zAbVxIxsq/18XFpawzPn3XCrILbSH5HuvoUg5zGfguCVsX0qDaBHW6MqfAo0JzoT12NkmRjL3D3oUUHGySIhn7ACUBOidDke+cv45J35GBX+OxjgmBEyXwYibTC0oQKebJhz9ixXTaMvM8/Xf/Aatwa0vfa4u9AJXW4E7QYNtIHZUH6L1w6Ji0oXsJx5dNHd9MVAjmD0JwJcXE4uKZmKSct1igQ4hz1gFY407mgu7IvFRuttvNcsmRuX4vc8d6dD9cGMVFL231VGoNUdfFRq2y/t8SS7NvNfRFXoyOLJ8AAAAASUVORK5CYII=) no-repeat center;position:absolute;top:20px;right:20px;cursor:pointer}.litebox-overlay .litebox-nav{display:none;width:60px;height:60px;margin-top:-30px;opacity:.2;position:absolute;top:50%;z-index:9999999;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.litebox-overlay .litebox-nav:hover{opacity:.5;cursor:pointer}.litebox-overlay .litebox-prev{background:url(../images/litebox-prev.png) no-repeat center;left:20px}.litebox-overlay .litebox-next{background:url(../images/litebox-next.png) no-repeat center;right:20px}.litebox-overlay .litebox-container{position:absolute;top:10%;right:10%;bottom:10%;left:10%;overflow:hidden}.litebox-overlay .litebox-container.litebox-scroll{overflow-y:auto}.litebox-overlay .litebox-container.litebox-iframe-holder{overflow:hidden;-webkit-overflow-scrolling:touch;overflow-y:scroll}.litebox-overlay .litebox-container.litebox-iframe-holder iframe{overflow-y:hidden!important}.litebox-overlay iframe,.litebox-overlay img{display:inline-block;max-width:100%;max-height:100%;margin:0 auto;vertical-align:middle;overflow-x:hidden}.litebox-overlay iframe{height:100%;position:relative;z-index:999999;width:1px;min-width:100%}.litebox-overlay .litebox-inline-html{width:100%;padding:20px;background:#fff;overflow-x:hidden;line-height:normal!important;position:absolute}.litebox-overlay .litebox-error{width:100%;height:100%;color:#fff;text-align:center;line-height:inherit}.litebox-overlay .litebox-error span{background:rgba(0,0,0,.9);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;padding:20px;color:#fff;text-shadow:1px 1px 0 #000;line-height:normal}@media only screen and (max-width:479px){.litebox-overlay .litebox-close{display:none}}
|
|
nextend/media/dist/nextend-backend.js
CHANGED
@@ -740,7 +740,14 @@ window.nextend.roundHelper = function (value) {
|
|
740 |
|
741 |
NextendAjaxHelper.notification(response);
|
742 |
} catch (e) {
|
743 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
744 |
}
|
745 |
});
|
746 |
};
|
@@ -2057,6 +2064,32 @@ window.N2Color = {
|
|
2057 |
|
2058 |
scope.NextendModal = NextendModal;
|
2059 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2060 |
|
2061 |
scope.NextendModalSetting = {
|
2062 |
show: function (title, url) {
|
740 |
|
741 |
NextendAjaxHelper.notification(response);
|
742 |
} catch (e) {
|
743 |
+
|
744 |
+
var pattern = /<body[^>]*>((.|[\n\r])*)<\/body>/im,
|
745 |
+
matches = pattern.exec(response.responseText);
|
746 |
+
if (matches.length) {
|
747 |
+
NextendModalSafeHTML(response.status, matches[1]);
|
748 |
+
} else {
|
749 |
+
console.error(response.responseText, response);
|
750 |
+
}
|
751 |
}
|
752 |
});
|
753 |
};
|
2064 |
|
2065 |
scope.NextendModal = NextendModal;
|
2066 |
|
2067 |
+
scope.NextendModalSafeHTML = function (title, html) {
|
2068 |
+
|
2069 |
+
var modal = new NextendModal({
|
2070 |
+
zero: {
|
2071 |
+
fit: true,
|
2072 |
+
size: [
|
2073 |
+
1300,
|
2074 |
+
700
|
2075 |
+
],
|
2076 |
+
title: title,
|
2077 |
+
content: ''
|
2078 |
+
}
|
2079 |
+
}, true);
|
2080 |
+
|
2081 |
+
modal.content.removeClass('n2-modal-content').css('padding', '0 20px 20px');
|
2082 |
+
var $html = $(html.replace(/document\.write/g, 'n2Write')),
|
2083 |
+
$currentNode;
|
2084 |
+
window.n2Write = $.proxy(function (buffer) {
|
2085 |
+
$('<span />').html(buffer).appendTo(modal.content);
|
2086 |
+
}, this);
|
2087 |
+
$html.each($.proxy(function (i, el) {
|
2088 |
+
$currentNode = $(el);
|
2089 |
+
$currentNode.appendTo(modal.content);
|
2090 |
+
}, this));
|
2091 |
+
delete window.n2Write;
|
2092 |
+
};
|
2093 |
|
2094 |
scope.NextendModalSetting = {
|
2095 |
show: function (title, url) {
|
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){console.log(i)}})},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.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){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"),
|
2 |
-
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'>▲</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")},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),
|
3 |
-
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){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()),
|
4 |
-
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={__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];
|
5 |
-
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
|
|
|
|
|
|
|
|
|
|