Version Description
Download this release
Release Info
Developer | averta |
Plugin | Master Slider – Responsive Touch Slider |
Version | 2.4.0 |
Comparing to | |
See all releases |
Code changes from version 2.1.3 to 2.4.0
- README.txt +40 -13
- admin/assets/css/msp-general.css +12 -0
- admin/includes/classes/class-axiom-list-table.php +7 -1
- admin/includes/classes/class-msp-admin-assets.php +3 -0
- admin/includes/classes/class-msp-list-table.php +20 -15
- admin/includes/classes/class-msp-parser.php +34 -5
- admin/includes/classes/class-msp-shortcode-factory.php +20 -1
- admin/includes/msp-admin-functions.php +1 -1
- admin/views/slider-dashboard/preview.php +8 -1
- admin/views/slider-panel/css/featherlight.min.css +8 -0
- admin/views/slider-panel/css/msp-style.css +257 -5
- admin/views/slider-panel/images/check.png +0 -0
- admin/views/slider-panel/images/cross.png +0 -0
- admin/views/slider-panel/images/info.png +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/button-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/templates.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/button-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/templates.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/thumbs/transition-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/transition-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin-area/zoom.png +0 -0
- admin/views/slider-panel/images/pro-features/admin/button-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/templates.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/button-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/style-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/templates.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/thumbs/transition-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/transition-editor.jpg +0 -0
- admin/views/slider-panel/images/pro-features/admin/zoom +0 -0
- admin/views/slider-panel/images/pro-features/dedicated-support.jpg +0 -0
- admin/views/slider-panel/images/pro-features/dynamic-sources.jpg +0 -0
- admin/views/slider-panel/images/pro-features/join.png +0 -0
- admin/views/slider-panel/images/pro-features/key.png +0 -0
- admin/views/slider-panel/images/pro-features/layers.jpg +0 -0
- admin/views/slider-panel/images/pro-features/parallax.jpg +0 -0
- admin/views/slider-panel/images/pro-features/sample-slider.jpg +0 -0
- admin/views/slider-panel/images/pro-features/sample-sliders.jpg +0 -0
- admin/views/slider-panel/images/pro-features/videos.jpg +0 -0
- admin/views/slider-panel/images/saving.gif +0 -0
- admin/views/slider-panel/images/ui-spritesheet.psd +0 -0
- admin/views/slider-panel/index.php +129 -11
- admin/views/slider-panel/js/masterslider.wp.js +4 -4
- admin/views/slider-panel/js/msp.required.js +17 -2
- includes/classes/class-msp-db.php +52 -13
- includes/init/define.php +1 -1
- includes/msp-shortcodes.php +27 -6
- master-slider.php +2 -2
- public/assets/css/masterslider.main.css +87 -1
- public/assets/js/masterslider.js +464 -174
- public/assets/js/masterslider.lite.min.js.map +1 -1
- public/assets/js/masterslider.min.js +5 -6
README.txt
CHANGED
@@ -5,25 +5,23 @@ License: GPLv3
|
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
|
7 |
Requires at least: 4.0
|
8 |
-
Tested up to: 4.
|
9 |
-
Stable tag: 2.
|
10 |
|
11 |
-
The most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
16 |
-
|
17 |
-
* [Master Slider Demo Sliders](http://avt.li/mswftem)
|
18 |
-
* [Master Slider Features](http://avt.li/mswfea)
|
19 |
-
* [Master Slider Manual](http://avt.li/mswfdoc)
|
20 |
|
21 |
|
22 |
= Overview =
|
23 |
|
24 |
Master Slider is a free responsive image and content slider with super smooth hardware accelerated transitions. It supports touch navigation with pure swipe gesture that you have never experienced before. It's a truly responsive and device friendly slider which works perfectly in all major devices.
|
25 |
|
26 |
-
[youtube
|
|
|
|
|
27 |
|
28 |
Master Slider is built using WordPress best practices both on the front and the back end. This results in an efficient, robust and intuitive plugin. It's works with any theme, including the default WordPress themes.
|
29 |
|
@@ -230,7 +228,36 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
|
|
230 |
|
231 |
== Changelog ==
|
232 |
|
233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
- [Fix]: Address an issue with rendering 3D transitions on firefox and mouse wheel
|
235 |
- [New]: French. Special thanks to Thomas:www.thomasgrimaud.fr
|
236 |
- [New]: Brazilian Portuguese. Special thanks to WebPress
|
@@ -347,6 +374,6 @@ Bugs can be reported in our [support forums](http://wordpress.org/tags/master-sl
|
|
347 |
|
348 |
== Upgrade Notice ==
|
349 |
|
350 |
-
= 2.
|
351 |
-
- [
|
352 |
-
- [
|
5 |
License URI: http://www.gnu.org/licenses/gpl.html
|
6 |
Tags: banner rotator, carousel, content slider, gallery, image slider, responsive slider, showcase, slideshow, swipe, touch slider, video gallery, SEO, vertical slide, HTML5 slider, hardware accelerate, best slider, animation, mobile slider, iOS, android, video slider, youtube slider, horizontal slider, vertical slider, fullwidth slider, fullscreen slider, post slider, photo slider, online album, mobile slider, WordPress slider,wpml, ,ultisite, wistia, woocommerce, product slider, woocommerce slider, portfolio, gallery
|
7 |
Requires at least: 4.0
|
8 |
+
Tested up to: 4.2.1
|
9 |
+
Stable tag: 2.4.0
|
10 |
|
11 |
+
The most advanced responsive and HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on desktop and devices.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
>[Demo sliders](http://avt.li/mswftem "Live demos of Master Slider free version") | [Features](http://avt.li/mswfea "All features") | [Documentation](http://avt.li/mswfdoc "Master Slider documentation") | [Video tutorials](http://avt.li/msfvids "Watch all video tutorials") | [Support forum](http://wpbookingcalendar.com/support/ "Free support")
|
|
|
|
|
|
|
|
|
16 |
|
17 |
|
18 |
= Overview =
|
19 |
|
20 |
Master Slider is a free responsive image and content slider with super smooth hardware accelerated transitions. It supports touch navigation with pure swipe gesture that you have never experienced before. It's a truly responsive and device friendly slider which works perfectly in all major devices.
|
21 |
|
22 |
+
[youtube https://www.youtube.com/watch?v=nyjpGEHwOn8]
|
23 |
+
|
24 |
+
[Watch all video tutorials](http://avt.li/msfvids)
|
25 |
|
26 |
Master Slider is built using WordPress best practices both on the front and the back end. This results in an efficient, robust and intuitive plugin. It's works with any theme, including the default WordPress themes.
|
27 |
|
228 |
|
229 |
== Changelog ==
|
230 |
|
231 |
+
|
232 |
+
= Version 2.4.0 / (7.5.2015) =
|
233 |
+
- [New]: Arrows for the thumblist control added.
|
234 |
+
- [New]: Search box for searching through the sliders added.
|
235 |
+
- [New]: New option `minHeight` added which specifies min height value for the slider, it prevents slider to be displayed tiny in small screens.
|
236 |
+
- [New]: New option for thumblist to change the slides while moving mouse cursor over thumbnails.
|
237 |
+
- [New]: Brand new sticky preview and save button with new interface in admin panel.
|
238 |
+
- [Fix]: A conflict with new API changes in WP 4.2 for gallery fixed.
|
239 |
+
- [Fix]: An issue with some special characters in slide info fixed.
|
240 |
+
- [Improvement]: Interface improvement for slider box.
|
241 |
+
- [Improvement]: Improvement in slider performance.
|
242 |
+
- [Fix]: An issue with sorting sliders base on date_modified fixed.
|
243 |
+
- [Fix]: Escaping the brackets for rel attribute on slides.
|
244 |
+
- [Fix]: Addressed an issue while auto hide in controls did not function properly on touch devices.
|
245 |
+
- [Fix]: Addressed an issue while inserting larger numbers than slides number in preload field.
|
246 |
+
- [Fix]: An issue with encoding brackets in custom styles fixed
|
247 |
+
- [Fix]: An issue in calculating thumbnails width fixed.
|
248 |
+
- [Fix]: An issue in aligning thumbnails which doesn't have fillMode option fixed.
|
249 |
+
- [Improvement]: Improvements under the hood.
|
250 |
+
- Master Slider is 100% secure in vulnerability check
|
251 |
+
|
252 |
+
= Version 2.2.1 / (6.4.2015) =
|
253 |
+
- [Fix]: Some minor bugs fixed.
|
254 |
+
|
255 |
+
= Version 2.2.1 / (21.3.2015) =
|
256 |
+
- [New]: Introducing "Start On Hover" feature, to display the slider when it appears in browser viewport.
|
257 |
+
- [Improvement]: API methods updated
|
258 |
+
- [Fix]: Some minor JavaScript errors fixed.
|
259 |
+
|
260 |
+
= Version 2.1.3 / (5.3.2015) =
|
261 |
- [Fix]: Address an issue with rendering 3D transitions on firefox and mouse wheel
|
262 |
- [New]: French. Special thanks to Thomas:www.thomasgrimaud.fr
|
263 |
- [New]: Brazilian Portuguese. Special thanks to WebPress
|
374 |
|
375 |
== Upgrade Notice ==
|
376 |
|
377 |
+
= 2.4.0 =
|
378 |
+
- [New]: Arrows for the thumblist control added.
|
379 |
+
- [New]: Search box for searching through the sliders added.
|
admin/assets/css/msp-general.css
CHANGED
@@ -268,6 +268,18 @@ tbody .latest-updates {
|
|
268 |
line-height:100%;
|
269 |
}
|
270 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
/** slider type selector **/
|
272 |
|
273 |
#msp-slider-type-select {
|
268 |
line-height:100%;
|
269 |
}
|
270 |
|
271 |
+
#msp-header + #ms-search-form .search-box{
|
272 |
+
margin-bottom:10px;
|
273 |
+
}
|
274 |
+
|
275 |
+
#msp-header + #msp-root{
|
276 |
+
margin-top:20px;
|
277 |
+
}
|
278 |
+
|
279 |
+
#wpbody-content #msp-header{
|
280 |
+
margin-bottom:10px;
|
281 |
+
}
|
282 |
+
|
283 |
/** slider type selector **/
|
284 |
|
285 |
#msp-slider-type-select {
|
admin/includes/classes/class-axiom-list-table.php
CHANGED
@@ -135,7 +135,7 @@ class Axiom_List_Table {
|
|
135 |
|
136 |
// redirect if page number is invalid and headers are not already sent
|
137 |
if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
|
138 |
-
wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) );
|
139 |
exit;
|
140 |
}
|
141 |
|
@@ -200,6 +200,8 @@ class Axiom_List_Table {
|
|
200 |
echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
|
201 |
if ( ! empty( $_REQUEST['order'] ) )
|
202 |
echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
|
|
|
|
|
203 |
if ( ! empty( $_REQUEST['post_mime_type'] ) )
|
204 |
echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
|
205 |
if ( ! empty( $_REQUEST['detached'] ) )
|
@@ -760,6 +762,10 @@ class Axiom_List_Table {
|
|
760 |
function display() {
|
761 |
extract( $this->_args );
|
762 |
|
|
|
|
|
|
|
|
|
763 |
$this->display_tablenav( 'top' );
|
764 |
|
765 |
?>
|
135 |
|
136 |
// redirect if page number is invalid and headers are not already sent
|
137 |
if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) {
|
138 |
+
wp_redirect( esc_url_raw( add_query_arg( 'paged', $args['total_pages'] ) ) );
|
139 |
exit;
|
140 |
}
|
141 |
|
200 |
echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
|
201 |
if ( ! empty( $_REQUEST['order'] ) )
|
202 |
echo '<input type="hidden" name="order" value="' . esc_attr( $_REQUEST['order'] ) . '" />';
|
203 |
+
if ( ! empty( $_REQUEST['page'] ) )
|
204 |
+
echo '<input type="hidden" name="page" value="' . esc_attr( $_REQUEST['page'] ) . '" />';
|
205 |
if ( ! empty( $_REQUEST['post_mime_type'] ) )
|
206 |
echo '<input type="hidden" name="post_mime_type" value="' . esc_attr( $_REQUEST['post_mime_type'] ) . '" />';
|
207 |
if ( ! empty( $_REQUEST['detached'] ) )
|
762 |
function display() {
|
763 |
extract( $this->_args );
|
764 |
|
765 |
+
echo '<form method="get" id="ms-search-form">';
|
766 |
+
$this->search_box( __( 'Search slider', 'default' ), 'ms' );
|
767 |
+
echo '</form>';
|
768 |
+
|
769 |
$this->display_tablenav( 'top' );
|
770 |
|
771 |
?>
|
admin/includes/classes/class-msp-admin-assets.php
CHANGED
@@ -341,6 +341,9 @@ class MSP_Admin_Assets {
|
|
341 |
'ui_019' => __( 'Align horizontal center', MSWP_TEXT_DOMAIN ),
|
342 |
'ui_020' => __( 'Align right', MSWP_TEXT_DOMAIN ),
|
343 |
|
|
|
|
|
|
|
344 |
// ApplicationController.js
|
345 |
'ap_001' => __( 'Sending data...', MSWP_TEXT_DOMAIN ),
|
346 |
'ap_002' => __( 'An Error accorded, please try again.', MSWP_TEXT_DOMAIN ),
|
341 |
'ui_019' => __( 'Align horizontal center', MSWP_TEXT_DOMAIN ),
|
342 |
'ui_020' => __( 'Align right', MSWP_TEXT_DOMAIN ),
|
343 |
|
344 |
+
'ui_030' => __( 'Scroll to an element in page :', MSWP_TEXT_DOMAIN ),
|
345 |
+
'ui_031' => __( 'Target element :', MSWP_TEXT_DOMAIN ),
|
346 |
+
|
347 |
// ApplicationController.js
|
348 |
'ap_001' => __( 'Sending data...', MSWP_TEXT_DOMAIN ),
|
349 |
'ap_002' => __( 'An Error accorded, please try again.', MSWP_TEXT_DOMAIN ),
|
admin/includes/classes/class-msp-list-table.php
CHANGED
@@ -17,13 +17,14 @@ class MSP_List_Table extends Axiom_List_Table {
|
|
17 |
|
18 |
function get_columns(){
|
19 |
$columns = array(
|
20 |
-
'ID' => 'ID',
|
21 |
-
'title' => 'Name',
|
22 |
-
'shortcode' => 'Shortcode',
|
23 |
-
'slides_num' => 'Slides',
|
24 |
-
'
|
25 |
-
'
|
26 |
-
'
|
|
|
27 |
);
|
28 |
return $columns;
|
29 |
}
|
@@ -33,8 +34,8 @@ class MSP_List_Table extends Axiom_List_Table {
|
|
33 |
function get_sortable_columns() {
|
34 |
$sortable_columns = array(
|
35 |
'ID' => array('ID',false),
|
36 |
-
'date_created' => array('date_created',false),
|
37 |
-
'date_modified' => array('
|
38 |
);
|
39 |
return $sortable_columns;
|
40 |
}
|
@@ -146,20 +147,24 @@ class MSP_List_Table extends Axiom_List_Table {
|
|
146 |
}
|
147 |
|
148 |
|
149 |
-
function get_records( $perpage = 20, $paged = 1, $orderby = 'ID', $
|
150 |
global $mspdb;
|
151 |
|
152 |
$offset = ( (int)$paged - 1 ) * $perpage;
|
153 |
$orderby = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'ID';
|
154 |
-
$
|
155 |
|
156 |
-
|
|
|
|
|
157 |
}
|
158 |
|
159 |
|
160 |
function get_total_count(){
|
161 |
global $mspdb;
|
162 |
-
|
|
|
|
|
163 |
}
|
164 |
|
165 |
|
@@ -177,11 +182,11 @@ class MSP_List_Table extends Axiom_List_Table {
|
|
177 |
$perpage = (int) apply_filters( 'masterslider_admin_sliders_per_page', 10 );
|
178 |
$current_page = $this->get_pagenum();
|
179 |
$orderby = 'ID';
|
180 |
-
$
|
181 |
$total_items = $this->get_total_count();
|
182 |
|
183 |
|
184 |
-
$this->items = $this->get_records( $perpage, $current_page, $orderby, $
|
185 |
// echo '<pre>'; print_r( $this->items ); echo '</pre>';
|
186 |
|
187 |
// tell the class the total number of items and how many items to show on a page
|
17 |
|
18 |
function get_columns(){
|
19 |
$columns = array(
|
20 |
+
'ID' => __('ID' , MSWP_TEXT_DOMAIN ),
|
21 |
+
'title' => __('Name' , MSWP_TEXT_DOMAIN ),
|
22 |
+
'shortcode' => __('Shortcode', MSWP_TEXT_DOMAIN ),
|
23 |
+
'slides_num' => __('Slides', MSWP_TEXT_DOMAIN ),
|
24 |
+
'type' => __('Type', MSWP_TEXT_DOMAIN ),
|
25 |
+
'date_modified' => __('Last Modify', MSWP_TEXT_DOMAIN ),
|
26 |
+
'date_created' => __('Date Created', MSWP_TEXT_DOMAIN ),
|
27 |
+
'action' => __('Action', MSWP_TEXT_DOMAIN )
|
28 |
);
|
29 |
return $columns;
|
30 |
}
|
34 |
function get_sortable_columns() {
|
35 |
$sortable_columns = array(
|
36 |
'ID' => array('ID',false),
|
37 |
+
'date_created' => array('date_created' ,false),
|
38 |
+
'date_modified' => array('date_modified',false)
|
39 |
);
|
40 |
return $sortable_columns;
|
41 |
}
|
147 |
}
|
148 |
|
149 |
|
150 |
+
function get_records( $perpage = 20, $paged = 1, $orderby = 'ID', $order = 'DESC', $where = "status='published'" ){
|
151 |
global $mspdb;
|
152 |
|
153 |
$offset = ( (int)$paged - 1 ) * $perpage;
|
154 |
$orderby = isset( $_REQUEST['orderby'] ) ? $_REQUEST['orderby'] : 'ID';
|
155 |
+
$order = isset( $_REQUEST['order'] ) ? $_REQUEST['order'] : 'ASC';
|
156 |
|
157 |
+
$search = isset( $_REQUEST['s'] ) ? " AND title LIKE '%%" . $_REQUEST['s'] . "%%'" : '';
|
158 |
+
|
159 |
+
return $mspdb->get_sliders( $perpage, $offset, $orderby, $order, $where.$search );
|
160 |
}
|
161 |
|
162 |
|
163 |
function get_total_count(){
|
164 |
global $mspdb;
|
165 |
+
|
166 |
+
$all_items = $this->get_records( 0 );
|
167 |
+
return count( $all_items );
|
168 |
}
|
169 |
|
170 |
|
182 |
$perpage = (int) apply_filters( 'masterslider_admin_sliders_per_page', 10 );
|
183 |
$current_page = $this->get_pagenum();
|
184 |
$orderby = 'ID';
|
185 |
+
$order = 'DESC';
|
186 |
$total_items = $this->get_total_count();
|
187 |
|
188 |
|
189 |
+
$this->items = $this->get_records( $perpage, $current_page, $orderby, $order );
|
190 |
// echo '<pre>'; print_r( $this->items ); echo '</pre>';
|
191 |
|
192 |
// tell the class the total number of items and how many items to show on a page
|
admin/includes/classes/class-msp-parser.php
CHANGED
@@ -76,7 +76,7 @@ class MSP_Parser {
|
|
76 |
'class' => isset( $setting['className'] ) ? (string) $setting['className'] : '', // a class that adds to slider wrapper
|
77 |
'margin' => 0,
|
78 |
|
79 |
-
'custom_style' => isset( $setting['customStyle'] ) ?
|
80 |
|
81 |
'inline_style' => isset( $setting['inlineStyle'] ) ? esc_attr( $setting['inlineStyle'] ) : '',
|
82 |
'bg_color' => isset( $setting['bgColor'] ) ? (string) $setting['bgColor'] : '',
|
@@ -89,6 +89,7 @@ class MSP_Parser {
|
|
89 |
|
90 |
'width' => isset( $setting['width'] ) ? (int) rtrim($setting['width'] , 'px' ) : 300, // base width of slides. It helps the slider to resize in correct ratio.
|
91 |
'height' => isset( $setting['height'] ) ? (int) rtrim($setting['height'], 'px' ) : 150, // base height of slides, It helps the slider to resize in correct ratio.
|
|
|
92 |
|
93 |
'start' => isset( $setting['start'] ) ? (int) $setting['start'] : 1,
|
94 |
'space' => isset( $setting['space'] ) ? (int) $setting['space'] : 0,
|
@@ -121,7 +122,7 @@ class MSP_Parser {
|
|
121 |
'end_pause' => $this->is_key_true( $setting, 'endPause' , 'false' ),
|
122 |
'over_pause' => $this->is_key_true( $setting, 'overPause', 'false' ),
|
123 |
|
124 |
-
'fill_mode' => apply_filters( 'masterslider_params_default_fill_mode', 'fill' ),
|
125 |
'center_controls'=> $this->is_key_true( $setting, 'centerControls', 'true' ),
|
126 |
|
127 |
'speed' => isset( $setting['speed'] ) ? (int) $setting['speed'] : 17,
|
@@ -136,6 +137,7 @@ class MSP_Parser {
|
|
136 |
|
137 |
'parallax_mode' => isset( $setting['parallaxMode'] ) ? (string) $setting['parallaxMode'] : 'swipe',
|
138 |
|
|
|
139 |
|
140 |
'flickr_key' => isset( $setting['apiKey'] ) ? (string) $setting['apiKey'] : '',
|
141 |
'flickr_id' => $setid,
|
@@ -194,6 +196,9 @@ class MSP_Parser {
|
|
194 |
'thumbs_height' => 80,
|
195 |
'thumbs_space' => 5,
|
196 |
'thumbs_hideunder' => '',
|
|
|
|
|
|
|
197 |
|
198 |
'scroll' => 'false', // display scrollbar?
|
199 |
'scroll_autohide' => 'true', // auto hide scroll?
|
@@ -271,6 +276,8 @@ class MSP_Parser {
|
|
271 |
msp_get_the_resized_image_src( $slide_src, 150, 150, true );
|
272 |
}
|
273 |
|
|
|
|
|
274 |
$thumb = '';
|
275 |
|
276 |
// add thumb just if thumblist is added to controls list
|
@@ -293,12 +300,29 @@ class MSP_Parser {
|
|
293 |
|
294 |
$thumb = msp_get_the_relative_media_url( $thumb );
|
295 |
|
296 |
-
} else {
|
297 |
-
$thumb = '';
|
298 |
}
|
299 |
|
300 |
}
|
301 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
302 |
|
303 |
$slides = array(
|
304 |
|
@@ -337,6 +361,7 @@ class MSP_Parser {
|
|
337 |
|
338 |
'thumb' => $thumb,
|
339 |
'tab' => 'true' == $slider_setting['thumbs'] && 'tabs' == $slider_setting['thumbs_type'] ? str_replace( '"', '"e;', $info ) : '',
|
|
|
340 |
'delay' => isset( $slide['duration'] ) ? (string) $slide['duration'] : '', // data-delay
|
341 |
'bgalign' => isset( $slide['fillMode'] ) ? (string) $slide['fillMode'] : 'fill', // data-fill-mode
|
342 |
'bgcolor' => isset( $slide['bgColor'] ) ? (string) $slide['bgColor'] : '',
|
@@ -557,7 +582,11 @@ class MSP_Parser {
|
|
557 |
'thumbs_height' => isset( $control['height'] ) ? (int) $control['height'] : 80,
|
558 |
'thumbs_space' => isset( $control['space'] ) ? (int) $control['space'] : 5,
|
559 |
'thumbs_hideunder' => isset( $control['hideUnder'] ) ? (int) $control['hideUnder'] : '',
|
560 |
-
'thumbs_fillmode' => isset( $control['fillMode'] ) ? (string) $control['fillMode'] : 'fill'
|
|
|
|
|
|
|
|
|
561 |
);
|
562 |
case 'bullets':
|
563 |
return array(
|
76 |
'class' => isset( $setting['className'] ) ? (string) $setting['className'] : '', // a class that adds to slider wrapper
|
77 |
'margin' => 0,
|
78 |
|
79 |
+
'custom_style' => isset( $setting['customStyle'] ) ? $setting['customStyle'] : '',
|
80 |
|
81 |
'inline_style' => isset( $setting['inlineStyle'] ) ? esc_attr( $setting['inlineStyle'] ) : '',
|
82 |
'bg_color' => isset( $setting['bgColor'] ) ? (string) $setting['bgColor'] : '',
|
89 |
|
90 |
'width' => isset( $setting['width'] ) ? (int) rtrim($setting['width'] , 'px' ) : 300, // base width of slides. It helps the slider to resize in correct ratio.
|
91 |
'height' => isset( $setting['height'] ) ? (int) rtrim($setting['height'], 'px' ) : 150, // base height of slides, It helps the slider to resize in correct ratio.
|
92 |
+
'min_height' => isset( $setting['minHeight'] ) ? (int) rtrim($setting['minHeight'], 'px' ) : 400,
|
93 |
|
94 |
'start' => isset( $setting['start'] ) ? (int) $setting['start'] : 1,
|
95 |
'space' => isset( $setting['space'] ) ? (int) $setting['space'] : 0,
|
122 |
'end_pause' => $this->is_key_true( $setting, 'endPause' , 'false' ),
|
123 |
'over_pause' => $this->is_key_true( $setting, 'overPause', 'false' ),
|
124 |
|
125 |
+
'fill_mode' => apply_filters( 'masterslider_params_default_fill_mode', 'fill' ),
|
126 |
'center_controls'=> $this->is_key_true( $setting, 'centerControls', 'true' ),
|
127 |
|
128 |
'speed' => isset( $setting['speed'] ) ? (int) $setting['speed'] : 17,
|
137 |
|
138 |
'parallax_mode' => isset( $setting['parallaxMode'] ) ? (string) $setting['parallaxMode'] : 'swipe',
|
139 |
|
140 |
+
'start_on_appear' => $this->is_key_true( $setting, 'startOnAppear', 'false' ),
|
141 |
|
142 |
'flickr_key' => isset( $setting['apiKey'] ) ? (string) $setting['apiKey'] : '',
|
143 |
'flickr_id' => $setid,
|
196 |
'thumbs_height' => 80,
|
197 |
'thumbs_space' => 5,
|
198 |
'thumbs_hideunder' => '',
|
199 |
+
'thumbs_arrows' => 'false',
|
200 |
+
'thumbs_in_tab' => 'false',
|
201 |
+
'thumbs_hoverchange'=> 'false',
|
202 |
|
203 |
'scroll' => 'false', // display scrollbar?
|
204 |
'scroll_autohide' => 'true', // auto hide scroll?
|
276 |
msp_get_the_resized_image_src( $slide_src, 150, 150, true );
|
277 |
}
|
278 |
|
279 |
+
|
280 |
+
// stores a URL for thumbnail in thumbnail list
|
281 |
$thumb = '';
|
282 |
|
283 |
// add thumb just if thumblist is added to controls list
|
300 |
|
301 |
$thumb = msp_get_the_relative_media_url( $thumb );
|
302 |
|
|
|
|
|
303 |
}
|
304 |
|
305 |
}
|
306 |
|
307 |
+
// stores a URL for thumbnail in tab
|
308 |
+
$tab_thumb = '';
|
309 |
+
|
310 |
+
// get thumb for tab if thumblist is added to controls list
|
311 |
+
if( ( 'true' == $slider_setting['thumbs'] &&
|
312 |
+
'tabs' == $slider_setting['thumbs_type'] ) &&
|
313 |
+
'true' == $slider_setting['thumbs_in_tab'] ){
|
314 |
+
|
315 |
+
if( isset( $slide['thumb'] ) && ! empty( $slide['thumb'] ) ) {
|
316 |
+
$tab_thumb = $slide['thumb'];
|
317 |
+
$tab_thumb = msp_get_the_relative_media_url( $tab_thumb );
|
318 |
+
|
319 |
+
} elseif( isset( $slide['bg'] ) ) {
|
320 |
+
// generate a square thumb for tab
|
321 |
+
$tab_thumb = msp_get_the_resized_image_src( $slide_src, $slider_setting['thumbs_height'], $slider_setting['thumbs_height'], true );
|
322 |
+
$tab_thumb = msp_get_the_relative_media_url( $tab_thumb );
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
|
327 |
$slides = array(
|
328 |
|
361 |
|
362 |
'thumb' => $thumb,
|
363 |
'tab' => 'true' == $slider_setting['thumbs'] && 'tabs' == $slider_setting['thumbs_type'] ? str_replace( '"', '"e;', $info ) : '',
|
364 |
+
'tab_thumb' => $tab_thumb,
|
365 |
'delay' => isset( $slide['duration'] ) ? (string) $slide['duration'] : '', // data-delay
|
366 |
'bgalign' => isset( $slide['fillMode'] ) ? (string) $slide['fillMode'] : 'fill', // data-fill-mode
|
367 |
'bgcolor' => isset( $slide['bgColor'] ) ? (string) $slide['bgColor'] : '',
|
582 |
'thumbs_height' => isset( $control['height'] ) ? (int) $control['height'] : 80,
|
583 |
'thumbs_space' => isset( $control['space'] ) ? (int) $control['space'] : 5,
|
584 |
'thumbs_hideunder' => isset( $control['hideUnder'] ) ? (int) $control['hideUnder'] : '',
|
585 |
+
'thumbs_fillmode' => isset( $control['fillMode'] ) ? (string) $control['fillMode'] : 'fill',
|
586 |
+
'thumbs_custom_class' => isset( $control['customClass'] ) ? (string) $control['customClass'] : 'ms-tab-thumb',
|
587 |
+
'thumbs_arrows' => $this->is_key_true( $control, 'arrows' , 'false' ),
|
588 |
+
'thumbs_in_tab' => $this->is_key_true( $control, 'insertThumb' , 'false' ),
|
589 |
+
'thumbs_hoverchange' => $this->is_key_true( $control, 'hoverChange' , 'false' )
|
590 |
);
|
591 |
case 'bullets':
|
592 |
return array(
|
admin/includes/classes/class-msp-shortcode-factory.php
CHANGED
@@ -33,9 +33,12 @@ class MSP_Shortcode_Factory {
|
|
33 |
// get the parsed slider setting
|
34 |
$setting = $this->parsed_slider_data['setting'];
|
35 |
|
|
|
|
|
36 |
// create ms_slider shortcode
|
37 |
$attrs = '';
|
38 |
foreach ( $setting as $attr => $attr_value ) {
|
|
|
39 |
$attrs .= sprintf( '%s="%s" ', $attr, esc_attr( $attr_value ) );
|
40 |
}
|
41 |
|
@@ -57,9 +60,14 @@ class MSP_Shortcode_Factory {
|
|
57 |
// stores shortcode attributes
|
58 |
$attrs = '';
|
59 |
|
|
|
|
|
|
|
60 |
foreach ( $slide as $attr => $attr_value ) {
|
61 |
-
|
|
|
62 |
continue;
|
|
|
63 |
|
64 |
if( 'src' == $attr && in_array( $this->parsed_slider_data['setting']['slider_type'], array( "flickr", "facebook", "instagram" ) ) ) {
|
65 |
$attrs .= sprintf( '%s="%s" ', $attr, '{{image}}' );
|
@@ -79,6 +87,17 @@ class MSP_Shortcode_Factory {
|
|
79 |
} elseif( 'thumb' == $attr && ! empty( $attr_value ) && in_array( $this->parsed_slider_data['setting']['slider_type'], array( "flickr", "facebook", "instagram" ) ) ) {
|
80 |
$attrs .= sprintf( '%s="%s" ', $attr, '{{thumb}}' );
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
} else {
|
83 |
$attrs .= sprintf( '%s="%s" ', $attr, esc_attr( $attr_value ) );
|
84 |
}
|
33 |
// get the parsed slider setting
|
34 |
$setting = $this->parsed_slider_data['setting'];
|
35 |
|
36 |
+
$exclude_attrs = array( 'custom_style' );
|
37 |
+
|
38 |
// create ms_slider shortcode
|
39 |
$attrs = '';
|
40 |
foreach ( $setting as $attr => $attr_value ) {
|
41 |
+
if( in_array( $attr, $exclude_attrs ) ){ continue; }
|
42 |
$attrs .= sprintf( '%s="%s" ', $attr, esc_attr( $attr_value ) );
|
43 |
}
|
44 |
|
60 |
// stores shortcode attributes
|
61 |
$attrs = '';
|
62 |
|
63 |
+
// the list of attributes which should be excluded from slide shortcode
|
64 |
+
$exclude_slide_attrs = array( 'layers', 'layer_ids', 'ishide', 'info' );
|
65 |
+
|
66 |
foreach ( $slide as $attr => $attr_value ) {
|
67 |
+
|
68 |
+
if( in_array( $attr, $exclude_slide_attrs ) ){
|
69 |
continue;
|
70 |
+
}
|
71 |
|
72 |
if( 'src' == $attr && in_array( $this->parsed_slider_data['setting']['slider_type'], array( "flickr", "facebook", "instagram" ) ) ) {
|
73 |
$attrs .= sprintf( '%s="%s" ', $attr, '{{image}}' );
|
87 |
} elseif( 'thumb' == $attr && ! empty( $attr_value ) && in_array( $this->parsed_slider_data['setting']['slider_type'], array( "flickr", "facebook", "instagram" ) ) ) {
|
88 |
$attrs .= sprintf( '%s="%s" ', $attr, '{{thumb}}' );
|
89 |
|
90 |
+
} elseif( 'tab' == $attr ) {
|
91 |
+
|
92 |
+
$tab_content = '<div class="ms-tab-context">' . $attr_value . '</div>';
|
93 |
+
|
94 |
+
// if "insert thumb" option was enabled append the thumbnail tag
|
95 |
+
if( 'true' == $this->parsed_slider_data['setting']['thumbs_in_tab'] ) {
|
96 |
+
$thumb_height = $this->parsed_slider_data['setting']['thumbs_height'];
|
97 |
+
$tab_content = sprintf( '{{thumb%s}}', $thumb_height ) . $tab_content;
|
98 |
+
}
|
99 |
+
$attrs .= sprintf( '%s="%s" ', $attr, esc_attr( $tab_content ) );
|
100 |
+
|
101 |
} else {
|
102 |
$attrs .= sprintf( '%s="%s" ', $attr, esc_attr( $attr_value ) );
|
103 |
}
|
admin/includes/msp-admin-functions.php
CHANGED
@@ -26,8 +26,8 @@ function msp_get_sliders_custom_css( $slider_status = 'published' ) {
|
|
26 |
|
27 |
if( $sliders_result ) {
|
28 |
foreach ( $sliders_result as $slider ) {
|
29 |
-
$sliders_custom_css[] = $slider['custom_styles'];
|
30 |
$sliders_custom_css[] = msp_get_slider_background_css( $slider['ID'] );
|
|
|
31 |
}
|
32 |
// remove empty records from array
|
33 |
$sliders_custom_css = array_filter( $sliders_custom_css );
|
26 |
|
27 |
if( $sliders_result ) {
|
28 |
foreach ( $sliders_result as $slider ) {
|
|
|
29 |
$sliders_custom_css[] = msp_get_slider_background_css( $slider['ID'] );
|
30 |
+
$sliders_custom_css[] = $slider['custom_styles'];
|
31 |
}
|
32 |
// remove empty records from array
|
33 |
$sliders_custom_css = array_filter( $sliders_custom_css );
|
admin/views/slider-dashboard/preview.php
CHANGED
@@ -64,7 +64,14 @@ html.wp-toolbar {
|
|
64 |
margin:0;
|
65 |
display:block;
|
66 |
}
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
</style>
|
69 |
<?php
|
70 |
}
|
64 |
margin:0;
|
65 |
display:block;
|
66 |
}
|
67 |
+
#ms-preview-wrapper{
|
68 |
+
width:100%;
|
69 |
+
max-width:100%;
|
70 |
+
min-height: 400px;
|
71 |
+
}
|
72 |
+
#wpcontent {
|
73 |
+
padding-left: 0;
|
74 |
+
}
|
75 |
</style>
|
76 |
<?php
|
77 |
}
|
admin/views/slider-panel/css/featherlight.min.css
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* Featherlight - ultra slim jQuery lightbox
|
3 |
+
* Version 1.2.3 - http://noelboss.github.io/featherlight/
|
4 |
+
*
|
5 |
+
* Copyright 2015, Noël Raoul Bossart (http://www.noelboss.com)
|
6 |
+
* MIT Licensed.
|
7 |
+
**/
|
8 |
+
@media all{.featherlight{display:none;position:fixed;top:0;right:0;bottom:0;left:0;z-index:2147483647;text-align:center;white-space:nowrap;cursor:pointer;background:#333;background:rgba(0,0,0,0)}.featherlight:last-of-type{background:rgba(0,0,0,.8)}.featherlight:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-.25em}.featherlight .featherlight-content{position:relative;text-align:left;vertical-align:middle;display:inline-block;overflow:auto;padding:25px 25px 0;border-bottom:25px solid transparent;min-width:30%;margin-left:5%;margin-right:5%;max-height:95%;background:#fff;cursor:auto;white-space:normal}.featherlight .featherlight-inner{display:block}.featherlight .featherlight-close-icon{position:absolute;z-index:9999;top:0;right:0;line-height:25px;width:25px;cursor:pointer;text-align:center;font:Arial,sans-serif;background:#fff;background:rgba(255,255,255,.3);color:#000}.featherlight .featherlight-image{width:100%}.featherlight-iframe .featherlight-content{border-bottom:0;padding:0}.featherlight iframe{border:0}}@media only screen and (max-width:1024px){.featherlight .featherlight-content{margin-left:10px;margin-right:10px;max-height:98%;padding:10px 10px 0;border-bottom:10px solid transparent}}
|
admin/views/slider-panel/css/msp-style.css
CHANGED
@@ -4,6 +4,9 @@
|
|
4 |
* @version 1.0
|
5 |
* @autor averta
|
6 |
*/
|
|
|
|
|
|
|
7 |
.msp-container{
|
8 |
min-width: 920px;
|
9 |
}
|
@@ -58,6 +61,10 @@
|
|
58 |
background: white;
|
59 |
}
|
60 |
|
|
|
|
|
|
|
|
|
61 |
/* Icons */
|
62 |
.msp-ico { background: url(../images/ui-spritesheet.png) no-repeat; display: inline-block;}
|
63 |
.msp-ico-settings {
|
@@ -227,6 +234,17 @@
|
|
227 |
vertical-align: top !important;
|
228 |
top: -3px;
|
229 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
230 |
/*------------------------------*/
|
231 |
/* Main Navigation */
|
232 |
.msp-main-nav ul {list-style: none; margin:0;padding: 0;}
|
@@ -253,6 +271,156 @@
|
|
253 |
.msp-main-nav ul li.msp-upgrade-btn a:hover {
|
254 |
background-color: #5FC524;
|
255 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
.msp-main-nav ul li a>.msp-ico{
|
257 |
display: inline-block;
|
258 |
margin-left: 10px;
|
@@ -275,6 +443,87 @@
|
|
275 |
.msp-main-nav ul li a.active .msp-ico-posts { background-position: -250px -225px; }
|
276 |
.msp-main-nav ul li a.active .msp-ico-wooc { background-position: -200px -200px; }
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
/* MSP Meta Box */
|
279 |
|
280 |
.msp-metabox {
|
@@ -1134,6 +1383,14 @@ button.msp-img-btn {
|
|
1134 |
float: left;
|
1135 |
overflow: hidden;
|
1136 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1137 |
.msp-tl-frames-cont {
|
1138 |
position: absolute;
|
1139 |
left: 241px;
|
@@ -1594,11 +1851,6 @@ button.msp-img-btn {
|
|
1594 |
top: 10px;
|
1595 |
}
|
1596 |
|
1597 |
-
.msp-save-status {
|
1598 |
-
display: inline-block;
|
1599 |
-
margin-left: 5px;
|
1600 |
-
}
|
1601 |
-
|
1602 |
button.msp-savepreset, button.msp-applystyle, button.msp-applyeffect {
|
1603 |
padding: 13px 0 10px;
|
1604 |
margin-right: 10px !important;
|
4 |
* @version 1.0
|
5 |
* @autor averta
|
6 |
*/
|
7 |
+
|
8 |
+
/* import featherlight css*/
|
9 |
+
@import url(featherlight.min.css);
|
10 |
.msp-container{
|
11 |
min-width: 920px;
|
12 |
}
|
61 |
background: white;
|
62 |
}
|
63 |
|
64 |
+
.msp-save-cont {
|
65 |
+
|
66 |
+
}
|
67 |
+
|
68 |
/* Icons */
|
69 |
.msp-ico { background: url(../images/ui-spritesheet.png) no-repeat; display: inline-block;}
|
70 |
.msp-ico-settings {
|
234 |
vertical-align: top !important;
|
235 |
top: -3px;
|
236 |
}
|
237 |
+
|
238 |
+
.msp-ico.msp-ico-testdrive {
|
239 |
+
width: 42px;
|
240 |
+
height: 25px;
|
241 |
+
background: url(../images/pro-features/key.png) no-repeat;
|
242 |
+
vertical-align: top;
|
243 |
+
top: 10px;
|
244 |
+
display: inline-block;
|
245 |
+
position: relative;
|
246 |
+
}
|
247 |
+
|
248 |
/*------------------------------*/
|
249 |
/* Main Navigation */
|
250 |
.msp-main-nav ul {list-style: none; margin:0;padding: 0;}
|
271 |
.msp-main-nav ul li.msp-upgrade-btn a:hover {
|
272 |
background-color: #5FC524;
|
273 |
}
|
274 |
+
.msp-main-nav ul li.msp-upgrade-btn a.active:hover {
|
275 |
+
background-color: white;
|
276 |
+
}
|
277 |
+
|
278 |
+
.msp-metabox-row.msp-pro-tab {
|
279 |
+
margin: 0;
|
280 |
+
clear: both;
|
281 |
+
text-align: center;
|
282 |
+
}
|
283 |
+
|
284 |
+
.msp-pro-tab h2 {
|
285 |
+
margin: 40px 0 20px 0;
|
286 |
+
font-size: 30px;
|
287 |
+
color: #444;
|
288 |
+
}
|
289 |
+
|
290 |
+
.msp-pro-tab h3 {
|
291 |
+
text-align: center;
|
292 |
+
margin: 35px 0 20px;
|
293 |
+
font-size: 26px;
|
294 |
+
font-weight: 500;
|
295 |
+
}
|
296 |
+
|
297 |
+
.msp-pro-tab p {
|
298 |
+
font-size: 14px;
|
299 |
+
color: #444;
|
300 |
+
}
|
301 |
+
|
302 |
+
.msp-pro-featurs {
|
303 |
+
max-width: 877px;
|
304 |
+
margin: 0 auto;
|
305 |
+
}
|
306 |
+
|
307 |
+
.msp-pf-figure {
|
308 |
+
float: left;
|
309 |
+
margin: 20px 5px 20px 0;
|
310 |
+
}
|
311 |
+
|
312 |
+
.msp-pf-figure h6 {
|
313 |
+
font-size: 15px;
|
314 |
+
color: #444;
|
315 |
+
margin: 15px 0 0;
|
316 |
+
}
|
317 |
+
|
318 |
+
|
319 |
+
.msp-pro-tab.msp-pf-admin-section {
|
320 |
+
background: #e7e7e7;
|
321 |
+
padding: 40px 0;
|
322 |
+
margin-top: 20px;
|
323 |
+
}
|
324 |
+
|
325 |
+
.msp-pf-admin-ss {
|
326 |
+
max-width: 877px;
|
327 |
+
margin: 0 auto;
|
328 |
+
}
|
329 |
+
|
330 |
+
.msp-pf-admin-ss .msp-pf-figure { margin: 0 3px; position: relative;}
|
331 |
+
.msp-pf-admin-ss .msp-pf-figure>img {
|
332 |
+
border: solid 1px #CDCDCD;
|
333 |
+
}
|
334 |
+
|
335 |
+
.msp-pf-thumb-ol {
|
336 |
+
overflow: hidden;
|
337 |
+
width: 100%;
|
338 |
+
height: 100%;
|
339 |
+
position: absolute;
|
340 |
+
background: rgba(0, 0, 0, 0.53);
|
341 |
+
top: 0;
|
342 |
+
opacity: 0;
|
343 |
+
}
|
344 |
+
|
345 |
+
.msp-pf-thumb-ol>img {
|
346 |
+
position: relative;
|
347 |
+
top: 40%;
|
348 |
+
-webkit-transform: scale(2) rotate(80deg);
|
349 |
+
-o-transform: scale(2) rotate(80deg);
|
350 |
+
transform: scale(2) rotate(80deg);
|
351 |
+
}
|
352 |
+
|
353 |
+
.msp-pf-thumb-ol, .msp-pf-thumb-ol>img {
|
354 |
+
-webkit-transition: all 260ms ease-out;
|
355 |
+
-o-transition: all 260ms ease-out;
|
356 |
+
transition: all 260ms ease-out;
|
357 |
+
}
|
358 |
+
|
359 |
+
.msp-pf-thumb-ol:hover{
|
360 |
+
opacity: 1;
|
361 |
+
}
|
362 |
+
|
363 |
+
.msp-pf-thumb-ol:hover >img {
|
364 |
+
-webkit-transform: scale(1) rotate(0);
|
365 |
+
-o-transform: scale(1) rotate(0);
|
366 |
+
transform: scale(1) rotate(0);
|
367 |
+
}
|
368 |
+
|
369 |
+
|
370 |
+
|
371 |
+
a.msp-blue-btn.msp-pf-testdrive{
|
372 |
+
display: inline-block;
|
373 |
+
cursor: pointer;
|
374 |
+
padding: 0 25px;
|
375 |
+
margin-top: 20px;
|
376 |
+
font-weight: 800;
|
377 |
+
font-size: 15px;
|
378 |
+
line-height: 40px;
|
379 |
+
border-bottom: solid 4px #2a95bc;
|
380 |
+
}
|
381 |
+
|
382 |
+
a.msp-blue-btn.msp-pf-testdrive:hover {
|
383 |
+
background: #33AFDB;
|
384 |
+
}
|
385 |
+
|
386 |
+
.msp-pro-tab.msp-pf-join-section {
|
387 |
+
background: #ED686E;
|
388 |
+
padding: 40px 0;
|
389 |
+
margin-bottom: -20px;
|
390 |
+
}
|
391 |
+
|
392 |
+
.msp-pro-tab.msp-pf-join-section p,
|
393 |
+
.msp-pro-tab.msp-pf-join-section h3 {
|
394 |
+
color: white;
|
395 |
+
}
|
396 |
+
|
397 |
+
a.msp-pf-btn {
|
398 |
+
display: inline-block;
|
399 |
+
padding: 0 20px;
|
400 |
+
background: white;
|
401 |
+
color: #6B6B6B;
|
402 |
+
line-height: 34px;
|
403 |
+
margin: 5px 3px;
|
404 |
+
border-bottom: solid 3px #f3f3f3;
|
405 |
+
}
|
406 |
+
|
407 |
+
a.msp-pf-btn.msp-pf-upgrade-btn {
|
408 |
+
background: #444;
|
409 |
+
color: white;
|
410 |
+
border-bottom-color: #222;
|
411 |
+
}
|
412 |
+
|
413 |
+
.msp-pf-btn.msp-pf-upgrade-btn:hover {
|
414 |
+
background: #4C4C4C;
|
415 |
+
}
|
416 |
+
|
417 |
+
a.msp-pf-btn.msp-pf-more-btn:hover {
|
418 |
+
background: #f2f2f2;
|
419 |
+
border-bottom-color: #DBDBDB;
|
420 |
+
}
|
421 |
+
|
422 |
+
|
423 |
+
|
424 |
.msp-main-nav ul li a>.msp-ico{
|
425 |
display: inline-block;
|
426 |
margin-left: 10px;
|
443 |
.msp-main-nav ul li a.active .msp-ico-posts { background-position: -250px -225px; }
|
444 |
.msp-main-nav ul li a.active .msp-ico-wooc { background-position: -200px -200px; }
|
445 |
|
446 |
+
.msp-main-nav ul li a.active .msp-ico-pro { background-position: -250px -252px; }
|
447 |
+
.msp-save-bar-placeholder {
|
448 |
+
height: 35px;
|
449 |
+
}
|
450 |
+
|
451 |
+
.msp-save-bar.msp-sticky-bar{
|
452 |
+
position: fixed;
|
453 |
+
bottom: 0;
|
454 |
+
width: 100%;
|
455 |
+
background: rgba(255, 255, 255, 0.9);
|
456 |
+
z-index: 700;
|
457 |
+
margin-left: -20px;
|
458 |
+
padding: 9px 20px;
|
459 |
+
border-top: solid 1px #DEDEDE;
|
460 |
+
}
|
461 |
+
|
462 |
+
.msp-save-bar.msp-sticky-bar button{
|
463 |
+
padding: 6px 30px 4px;
|
464 |
+
border-bottom-width: 4px;
|
465 |
+
}
|
466 |
+
|
467 |
+
.msp-save-status,
|
468 |
+
.msp-time-ago {
|
469 |
+
display: inline-block;
|
470 |
+
margin-left: 5px;
|
471 |
+
-webkit-transition: opacity 500ms;
|
472 |
+
-o-transition: opacity 500ms;
|
473 |
+
transition: opacity 500ms;
|
474 |
+
opacity: 100;
|
475 |
+
}
|
476 |
+
|
477 |
+
.msp-time-ago{
|
478 |
+
opacity: 0;
|
479 |
+
position: absolute;
|
480 |
+
left: 0;
|
481 |
+
top:1px;
|
482 |
+
}
|
483 |
+
|
484 |
+
.msp-save-status:before,
|
485 |
+
.msp-time-ago:before{
|
486 |
+
content: '';
|
487 |
+
display: inline-block;
|
488 |
+
width: 15px;
|
489 |
+
height: 15px;
|
490 |
+
}
|
491 |
+
|
492 |
+
.msp-time-ago:before{
|
493 |
+
margin: -3px 5px;
|
494 |
+
background: url(../images/info.png);
|
495 |
+
}
|
496 |
+
|
497 |
+
.msp-saving-msg-cont {
|
498 |
+
position: relative;
|
499 |
+
display: inline-block;
|
500 |
+
width: 50%;
|
501 |
+
}
|
502 |
+
|
503 |
+
.msp-save-status.msp-save-hide {
|
504 |
+
opacity: 0;
|
505 |
+
}
|
506 |
+
|
507 |
+
.msp-time-ago.msp-save-hide{
|
508 |
+
opacity: 100;
|
509 |
+
}
|
510 |
+
|
511 |
+
.msp-save-status.msp-saving:before {
|
512 |
+
margin: -2px 5px;
|
513 |
+
background: url(../images/saving.gif);
|
514 |
+
}
|
515 |
+
|
516 |
+
.msp-save-status.msp-save-error:before {
|
517 |
+
margin: -2px 5px;
|
518 |
+
background: url(../images/cross.png);
|
519 |
+
}
|
520 |
+
|
521 |
+
|
522 |
+
.msp-save-status.msp-save-succeed:before {
|
523 |
+
margin: -2px 5px;
|
524 |
+
background: url(../images/check.png);
|
525 |
+
}
|
526 |
+
|
527 |
/* MSP Meta Box */
|
528 |
|
529 |
.msp-metabox {
|
1383 |
float: left;
|
1384 |
overflow: hidden;
|
1385 |
}
|
1386 |
+
|
1387 |
+
.msp-static-notice {
|
1388 |
+
margin: 0;
|
1389 |
+
line-height: 34px;
|
1390 |
+
color: #A8A8A8;
|
1391 |
+
font-style: italic;
|
1392 |
+
}
|
1393 |
+
|
1394 |
.msp-tl-frames-cont {
|
1395 |
position: absolute;
|
1396 |
left: 241px;
|
1851 |
top: 10px;
|
1852 |
}
|
1853 |
|
|
|
|
|
|
|
|
|
|
|
1854 |
button.msp-savepreset, button.msp-applystyle, button.msp-applyeffect {
|
1855 |
padding: 13px 0 10px;
|
1856 |
margin-right: 10px !important;
|
admin/views/slider-panel/images/check.png
ADDED
Binary file
|
admin/views/slider-panel/images/cross.png
ADDED
Binary file
|
admin/views/slider-panel/images/info.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/button-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/layers.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/sample-sliders.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/style-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/templates.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/button-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/layers.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/sample-sliders.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/style-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/templates.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/thumbs/transition-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/transition-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin-area/zoom.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/button-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/layers.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/sample-sliders.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/style-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/templates.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/button-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/layers.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/sample-sliders.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/style-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/templates.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/thumbs/transition-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/transition-editor.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/admin/zoom
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/dedicated-support.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/dynamic-sources.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/join.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/key.png
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/layers.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/parallax.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/sample-slider.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/sample-sliders.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/pro-features/videos.jpg
ADDED
Binary file
|
admin/views/slider-panel/images/saving.gif
ADDED
Binary file
|
admin/views/slider-panel/images/ui-spritesheet.psd
ADDED
Binary file
|
admin/views/slider-panel/index.php
CHANGED
@@ -42,7 +42,7 @@
|
|
42 |
<li>{{#link-to 'slides'}} <?php _e('Slides', MSWP_TEXT_DOMAIN); ?> <span class="msp-ico msp-ico-slides"></span>{{/link-to}}</li>
|
43 |
<li>{{#link-to 'controls'}} <?php _e('Slider Controls', MSWP_TEXT_DOMAIN); ?> <span class="msp-ico msp-ico-controls"></span>{{/link-to}}</li>
|
44 |
<li>{{#link-to 'callbacks'}} <?php _e('Slider Callbacks', MSWP_TEXT_DOMAIN); ?> <span class="msp-ico msp-ico-api"></span>{{/link-to}}</li>
|
45 |
-
<li class="msp-upgrade-btn">
|
46 |
</ul>
|
47 |
</nav>
|
48 |
<div class="clear"></div>
|
@@ -51,16 +51,112 @@
|
|
51 |
<span><?php _e('Shortcode :', MSWP_TEXT_DOMAIN); ?> </span> {{view MSPanel.SimpleCodeBlock value=shortCode width=120}}
|
52 |
<span><?php _e('PHP function :', MSWP_TEXT_DOMAIN); ?> </span> {{view MSPanel.SimpleCodeBlock value=phpFunction width=160}}
|
53 |
</div>
|
54 |
-
<
|
55 |
-
|
56 |
-
<button class="msp-blue-btn msp-save-changes
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
{{/if}}
|
62 |
</script>
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
<!-- Slider Settings Page -->
|
65 |
<script type="text/x-handlebars" id="settings">
|
66 |
|
@@ -95,6 +191,11 @@
|
|
95 |
{{switch-box value=autoHeight}}<label><?php _e('Auto-height slider', MSWP_TEXT_DOMAIN); ?></label>
|
96 |
{{/if}}
|
97 |
</div>
|
|
|
|
|
|
|
|
|
|
|
98 |
{{#if showWrapperWidth}}
|
99 |
<div class="msp-metabox-indented">
|
100 |
<label><?php _e('Slider wrapper width :', MSWP_TEXT_DOMAIN); ?> </label>{{number-input value=wrapperWidth}}
|
@@ -166,6 +267,9 @@
|
|
166 |
<div class="msp-metabox-indented">
|
167 |
{{switch-box value=wheel}}<label><?php _e('Mouse wheel navigation', MSWP_TEXT_DOMAIN); ?></label>
|
168 |
</div>
|
|
|
|
|
|
|
169 |
<h4><?php _e('Slide preloading', MSWP_TEXT_DOMAIN); ?></h4>
|
170 |
<div class="msp-metabox-indented">
|
171 |
{{#view MSPanel.Select value=preloadMethod width="200" }}
|
@@ -620,9 +724,11 @@
|
|
620 |
</div>
|
621 |
<div class="msp-metabox-indented">
|
622 |
{{switch-box value=currentControl.inset}} <label><?php _e('Insert thumblist/tabs inside slider', MSWP_TEXT_DOMAIN); ?></label>
|
623 |
-
|
624 |
-
|
625 |
-
|
|
|
|
|
626 |
</div>
|
627 |
<div class="msp-metabox-indented">
|
628 |
<?php _e('Align control :', MSWP_TEXT_DOMAIN); ?>
|
@@ -652,6 +758,18 @@
|
|
652 |
<option value="v"><?php _e('Vertical', MSWP_TEXT_DOMAIN); ?></option>
|
653 |
{{/dropdwon-List}}
|
654 |
</div>--}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
<div class="msp-metabox-indented">
|
656 |
<label><?php _e('Thumb/Tab width :', MSWP_TEXT_DOMAIN); ?> </label> {{number-input value=currentControl.width}} px
|
657 |
<div class="msp-form-space-med"></div>
|
42 |
<li>{{#link-to 'slides'}} <?php _e('Slides', MSWP_TEXT_DOMAIN); ?> <span class="msp-ico msp-ico-slides"></span>{{/link-to}}</li>
|
43 |
<li>{{#link-to 'controls'}} <?php _e('Slider Controls', MSWP_TEXT_DOMAIN); ?> <span class="msp-ico msp-ico-controls"></span>{{/link-to}}</li>
|
44 |
<li>{{#link-to 'callbacks'}} <?php _e('Slider Callbacks', MSWP_TEXT_DOMAIN); ?> <span class="msp-ico msp-ico-api"></span>{{/link-to}}</li>
|
45 |
+
<li class="msp-upgrade-btn"> {{#link-to 'pro-features'}}Upgrade to PRO <span class="msp-ico msp-ico-pro"></span>{{/link-to}}</li>
|
46 |
</ul>
|
47 |
</nav>
|
48 |
<div class="clear"></div>
|
51 |
<span><?php _e('Shortcode :', MSWP_TEXT_DOMAIN); ?> </span> {{view MSPanel.SimpleCodeBlock value=shortCode width=120}}
|
52 |
<span><?php _e('PHP function :', MSWP_TEXT_DOMAIN); ?> </span> {{view MSPanel.SimpleCodeBlock value=phpFunction width=160}}
|
53 |
</div>
|
54 |
+
<div class="msp-save-bar-placeholder" id="saveBarPlaceHolder"></div>
|
55 |
+
<div class="msp-save-bar" id="saveBar">
|
56 |
+
<button id="msp-preview-btn" {{action showPreview}} class="msp-blue-btn msp-save-changes"> <?php _e('Preview', MSWP_TEXT_DOMAIN); ?></button>
|
57 |
+
{{#if isSending}}
|
58 |
+
<button class="msp-blue-btn msp-save-changes disabled"> <?php _e('Saving...', MSWP_TEXT_DOMAIN); ?></button>
|
59 |
+
{{else}}
|
60 |
+
<button class="msp-blue-btn msp-save-changes" {{action "saveAll"}}> <?php _e('Save Changes', MSWP_TEXT_DOMAIN); ?></button>
|
61 |
+
{{/if}}
|
62 |
+
<div class="msp-saving-msg-cont">
|
63 |
+
<span {{bind-attr class=":msp-save-status savingStatus"}}>{{statusMsg}}</span>
|
64 |
+
<div {{bind-attr class=":msp-time-ago savingStatus"}}><?php _e('Saved', MSWP_TEXT_DOMAIN); ?> <span id="timeAgo"></span>.</div>
|
65 |
+
</div>
|
66 |
+
</div>
|
67 |
{{/if}}
|
68 |
</script>
|
69 |
|
70 |
+
<script type="text/x-handlebars" id="pro-features">
|
71 |
+
{{#meta-box title="Upgrade Master Slider to PRO"}}
|
72 |
+
<div class="msp-metabox-row msp-pro-tab">
|
73 |
+
<div class="msp-pro-featurs">
|
74 |
+
<h2>Add Features to Master Slider</h2>
|
75 |
+
<p>Take your WordPress site to the next level with Master Slider PRO. This plugin crunches all type of content, making it a dead-simple way to display dynamic slides in the exact the way YOU want them to look.
|
76 |
+
Best of all, Master Slider PRO works perfectly with any existing WordPress theme and doesn’t affect overall site performance. Which means, less bloat and more control!</p>
|
77 |
+
<div class="msp-pf-figure">
|
78 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/layers.jpg" alt="Animated layers">
|
79 |
+
<h6>Animated Layers</h6>
|
80 |
+
</div>
|
81 |
+
<div class="msp-pf-figure">
|
82 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/videos.jpg" alt="Videos">
|
83 |
+
<h6>Videos</h6>
|
84 |
+
</div>
|
85 |
+
<div class="msp-pf-figure">
|
86 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/sample-sliders.jpg" alt="Sample sliders">
|
87 |
+
<h6>Sample Sliders</h6>
|
88 |
+
</div>
|
89 |
+
<div class="msp-pf-figure">
|
90 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/dynamic-sources.jpg" alt="Dynamic sources">
|
91 |
+
<h6>Dynamic Sources</h6>
|
92 |
+
</div>
|
93 |
+
<div class="msp-pf-figure">
|
94 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/parallax.jpg" alt="Prallax effect">
|
95 |
+
<h6>Parallax Effect</h6>
|
96 |
+
</div>
|
97 |
+
<div class="msp-pf-figure">
|
98 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/dedicated-support.jpg" alt="Dedicated support">
|
99 |
+
<h6>Dedicated Support</h6>
|
100 |
+
</div>
|
101 |
+
</div>
|
102 |
+
<div class="clear"></div>
|
103 |
+
</div>
|
104 |
+
<div class="msp-metabox-row msp-pro-tab msp-pf-admin-section">
|
105 |
+
<div class="msp-pf-admin-ss">
|
106 |
+
<div class="msp-pf-figure">
|
107 |
+
<a data-featherlight="image" href="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/layers.jpg">
|
108 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/thumbs/layers.jpg" alt="layers">
|
109 |
+
<div class="msp-pf-thumb-ol"><img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/zoom.png" alt="zoom-ico"></div>
|
110 |
+
</a>
|
111 |
+
</div>
|
112 |
+
<div class="msp-pf-figure">
|
113 |
+
<a data-featherlight="image" href="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/sample-sliders.jpg">
|
114 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/thumbs/sample-sliders.jpg" alt="sample sliders">
|
115 |
+
<div class="msp-pf-thumb-ol"><img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/zoom.png" alt="zoom-ico"></div>
|
116 |
+
</a>
|
117 |
+
</div>
|
118 |
+
<div class="msp-pf-figure">
|
119 |
+
<a data-featherlight="image" href="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/templates.jpg">
|
120 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/thumbs/templates.jpg" alt="slider templates">
|
121 |
+
<div class="msp-pf-thumb-ol"><img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/zoom.png" alt="zoom-ico"></div>
|
122 |
+
</a>
|
123 |
+
</div>
|
124 |
+
<div class="msp-pf-figure">
|
125 |
+
<a data-featherlight="image" href="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/transition-editor.jpg">
|
126 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/thumbs/transition-editor.jpg" alt="transition editor">
|
127 |
+
<div class="msp-pf-thumb-ol"><img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/zoom.png" alt="zoom-ico"></div>
|
128 |
+
</a>
|
129 |
+
</div>
|
130 |
+
<div class="msp-pf-figure">
|
131 |
+
<a data-featherlight="image" href="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/style-editor.jpg">
|
132 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/thumbs/style-editor.jpg" alt="style editor">
|
133 |
+
<div class="msp-pf-thumb-ol"><img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/zoom.png" alt="zoom-ico"></div>
|
134 |
+
</a>
|
135 |
+
</div>
|
136 |
+
<div class="msp-pf-figure">
|
137 |
+
<a data-featherlight="image" href="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/button-editor.jpg">
|
138 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/thumbs/button-editor.jpg" alt="style editor">
|
139 |
+
<div class="msp-pf-thumb-ol"><img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/admin-area/zoom.png" alt="zoom-ico"></div>
|
140 |
+
</a>
|
141 |
+
</div>
|
142 |
+
|
143 |
+
<div class="clear"></div>
|
144 |
+
<h3>See It In Action</h3>
|
145 |
+
<p>Want to give it a shot right away? Just give it a test drive and create your own slider, or try some of our ready-made samples!</p>
|
146 |
+
<a class="msp-blue-btn msp-pf-testdrive" href="http://avt.li/msptd" target="_blank"> <span class="msp-ico msp-ico-testdrive"></span> Test Drive Now</a>
|
147 |
+
</div>
|
148 |
+
<div class="clear"></div>
|
149 |
+
</div>
|
150 |
+
<div class="msp-metabox-row msp-pro-tab msp-pf-join-section">
|
151 |
+
<img src="<?php echo MSWP_AVERTA_ADMIN_URL . '/views/slider-panel'; ?>/images/pro-features/join.png" alt="Join the PRO version" class="msp-join-ico">
|
152 |
+
<h3>Join 4600+ PRO Users</h3>
|
153 |
+
<p>Ready to take advantage of all of the amazing features packed into MasterSlider PRO? We hope so!</p>
|
154 |
+
<a class="msp-pf-btn msp-pf-upgrade-btn" href="http://avt.li/mspup" target="_blank">Upgrade Now</a>
|
155 |
+
<a class="msp-pf-btn msp-pf-more-btn" href="http://avt.li/mspt" target="_blank">See All Features</a>
|
156 |
+
<div class="clear"></div>
|
157 |
+
</div>
|
158 |
+
{{/meta-box}}
|
159 |
+
</script>
|
160 |
<!-- Slider Settings Page -->
|
161 |
<script type="text/x-handlebars" id="settings">
|
162 |
|
191 |
{{switch-box value=autoHeight}}<label><?php _e('Auto-height slider', MSWP_TEXT_DOMAIN); ?></label>
|
192 |
{{/if}}
|
193 |
</div>
|
194 |
+
{{#if showMinHeight}}
|
195 |
+
<div class="msp-metabox-indented">
|
196 |
+
<label><?php _e('Minimum height amount :', MSWP_TEXT_DOMAIN); ?> </label>{{number-input value=minHeight}} px
|
197 |
+
</div>
|
198 |
+
{{/if}}
|
199 |
{{#if showWrapperWidth}}
|
200 |
<div class="msp-metabox-indented">
|
201 |
<label><?php _e('Slider wrapper width :', MSWP_TEXT_DOMAIN); ?> </label>{{number-input value=wrapperWidth}}
|
267 |
<div class="msp-metabox-indented">
|
268 |
{{switch-box value=wheel}}<label><?php _e('Mouse wheel navigation', MSWP_TEXT_DOMAIN); ?></label>
|
269 |
</div>
|
270 |
+
<div class="msp-metabox-indented">
|
271 |
+
{{switch-box value=startOnAppear}}<label><?php _e('Start slider when appears in browser window.', MSWP_TEXT_DOMAIN); ?></label>
|
272 |
+
</div>
|
273 |
<h4><?php _e('Slide preloading', MSWP_TEXT_DOMAIN); ?></h4>
|
274 |
<div class="msp-metabox-indented">
|
275 |
{{#view MSPanel.Select value=preloadMethod width="200" }}
|
724 |
</div>
|
725 |
<div class="msp-metabox-indented">
|
726 |
{{switch-box value=currentControl.inset}} <label><?php _e('Insert thumblist/tabs inside slider', MSWP_TEXT_DOMAIN); ?></label>
|
727 |
+
<div class="msp-form-space-med"></div>
|
728 |
+
{{switch-box value=currentControl.arrows}} <label><?php _e('Insert navigation arrows', MSWP_TEXT_DOMAIN); ?></label>
|
729 |
+
</div>
|
730 |
+
<div class="msp-metabox-indented">
|
731 |
+
{{switch-box value=currentControl.hoverChange}} <label><?php _e('Change slides on hovering over thumbs/tabs.', MSWP_TEXT_DOMAIN); ?></label>
|
732 |
</div>
|
733 |
<div class="msp-metabox-indented">
|
734 |
<?php _e('Align control :', MSWP_TEXT_DOMAIN); ?>
|
758 |
<option value="v"><?php _e('Vertical', MSWP_TEXT_DOMAIN); ?></option>
|
759 |
{{/dropdwon-List}}
|
760 |
</div>--}}
|
761 |
+
|
762 |
+
{{#if isTab}}
|
763 |
+
<div class="msp-metabox-indented">
|
764 |
+
{{switch-box value=currentControl.insertThumb}} <?php _e('Insert thumbnail inside tabs', MSWP_TEXT_DOMAIN); ?>
|
765 |
+
</div>
|
766 |
+
{{else}}
|
767 |
+
<div class="msp-metabox-indented">
|
768 |
+
<?php _e('Thumb background fill mode :', MSWP_TEXT_DOMAIN); ?>
|
769 |
+
{{view MSPanel.Fillmode value=currentControl.fillMode}}
|
770 |
+
</div>
|
771 |
+
{{/if}}
|
772 |
+
|
773 |
<div class="msp-metabox-indented">
|
774 |
<label><?php _e('Thumb/Tab width :', MSWP_TEXT_DOMAIN); ?> </label> {{number-input value=currentControl.width}} px
|
775 |
<div class="msp-form-space-med"></div>
|
admin/views/slider-panel/js/masterslider.wp.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
* Copyright © 2015 All Rights Reserved.
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
-
* @version 2.
|
7 |
-
* @date
|
8 |
*/
|
9 |
-
window.MSPanel=Ember.Application.create({rootElement:"#msp-root"}),MSPanel.version="2.0.6",MSPanel.SliderID=parseQueryString(window.location.search).slider_id||__MSP_SLIDER_ID||"100",MSPanel.dependedControllers=[],String.prototype.jfmt=function(){return"".fmt.apply(this.replace(/%s|%d/,"%@"),arguments)},window.$=jQuery.noConflict(),jQuery.ui.dialog.prototype._focusTabbable=function(){},MSPanel.Router.map(function(){this.resource("settings"),this.resource("slides",{path:"/"}),this.resource("controls"),this.resource("callbacks"),this.resource("error")}),MSPanel.Router.reopen({location:"none"}),MSPanel.ApplicationRoute=Ember.Route.extend({model:function(){var setting=MSPanel.Settings.find();0===setting.get("length")&&MSPanel.Settings.create().save()}}),MSPanel.SettingsRoute=Ember.Route.extend({model:function(){return MSPanel.Settings.find(1)},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),MSPanel.SlidesRoute=Ember.Route.extend({model:function(){return MSPanel.Slide.find()},setupController:function(controller,model){controller.set("model",model),controller.set("sliderSettings",MSPanel.Settings.find(1)),controller.setup()}}),MSPanel.ControlsRoute=Ember.Route.extend({model:function(){return MSPanel.Control.find()},setupController:function(controller,model){controller.set("model",model),controller.setup(),this.activate()},activate:function(){var controller=this.get("controller");controller&&controller.set("controlOptions","empty-template")}}),MSPanel.CallbacksRoute=Ember.Route.extend({model:function(){return MSPanel.Callback.find()},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),function(){var attr=Ember.attr,hasMany=Ember.hasMany,belongsTo=Ember.belongsTo,regp=/https\:|http\:/,WPPath={serialize:function(path){return void 0==path?path:regp.test(path)?path.replace(__MS.upload_dir,""):path},deserialize:function(path){return void 0==path?path:regp.test(path)?path:__MS.upload_dir+path}},defaults=window.__MSP_DEF_OPTIONS||{};MSPanel.Settings=Ember.Model.extend({id:attr("number"),snapping:attr("boolean",{defaultValue:!0}),bgImageThumb:attr(WPPath),disableControls:attr("boolean",{defaultValue:!1}),name:attr("string",{defaultValue:__MSP_LAN.sm_001}),width:attr("number",{defaultValue:defaults.width||1e3}),height:attr("number",{defaultValue:defaults.height||500}),wrapperWidth:attr("number"),wrapperWidthUnit:attr("string",{defaultValue:"px"}),autoCrop:attr("boolean",{defaultValue:defaults.autoCrop||!1}),type:attr("string"),sliderId:attr("string"),layout:attr("string",{defaultValue:defaults.layout||"boxed"}),autoHeight:attr("boolean",{defaultValue:defaults.autoHeight||!1}),trView:attr("string",{defaultValue:defaults.transition||"basic"}),speed:attr("number",{defaultValue:defaults.speed||20}),space:attr("number",{defaultValue:defaults.space||0}),start:attr("number",{defaultValue:defaults.start}),grabCursor:attr("boolean",{defaultValue:defaults.grabCursor}),swipe:attr("boolean",{defaultValue:defaults.swipe}),mouse:attr("boolean",{defaultValue:defaults.mouse}),wheel:attr("boolean",{defaultValue:defaults.wheel}),keyboard:attr("boolean",{defaultValue:defaults.keyboard}),autoplay:attr("boolean",{defaultValue:defaults.autoplay}),loop:attr("boolean",{defaultValue:defaults.loop}),shuffle:attr("boolean",{defaultValue:defaults.shuffle}),preload:attr("string",{defaultValue:defaults.preload}),overPause:attr("boolean",{defaultValue:defaults.overPause}),endPause:attr("boolean",{defaultValue:defaults.endPause}),hideLayers:attr("boolean",{defaultValue:defaults.hideLayers}),dir:attr("string",{defaultValue:defaults.dir}),parallaxMode:attr("srting",{defaultValue:defaults.parallaxMode}),useDeepLink:attr("string",{defaultValue:!1}),deepLink:attr("string"),deepLinkType:attr("string",{defaultValue:"path"}),scrollParallax:attr("boolean"),scrollParallaxMove:attr("number",{defaultValue:30}),scrollParallaxBGMove:attr("number",{defaultValue:50}),scrollParallaxFade:attr("boolean",{defaultValue:!0}),centerControls:attr("boolean",{defaultValue:defaults.centerControls}),instantShowLayers:attr("boolean",{defaultValue:defaults.instantShowLayers}),fullscreenMargin:attr("number"),inlineStyle:attr("string"),className:attr("string",{defaultValue:defaults.className}),bgColor:attr("string"),bgImage:attr(WPPath),customStyle:attr("string"),skin:attr("string",{defaultValue:defaults.skin}),msTemplate:attr("string",{defaultValue:"custom"}),msTemplateClass:attr("string",{defaultValue:""}),usedFonts:attr("string"),apiKey:attr("string"),setId:attr("string"),setType:attr("string"),imgCount:attr("number"),thumbSize:attr("srting"),imgSize:attr("string"),postType:attr("string"),postCats:attr(Array),postTags:attr(Array),postCount:attr("number"),postImageType:attr("string"),postOrder:attr("string"),postOrderDir:attr("string"),postExcerptLen:attr("number"),postExcludeIds:attr("string"),postIncludeIds:attr("string"),postOffset:attr("number"),postLinkSlide:attr("boolean"),postLinkTarget:attr("string"),postSlideBg:attr("string"),postSlideBgthumb:attr("string"),wcOnlyInstock:attr("boolean"),wcOnlyFeatured:attr("boolean"),wcOnlyOnsale:attr("boolean")}),MSPanel.Slide=Ember.Model.extend({id:attr("number"),timeline_h:attr("number",{defaultValue:200}),bgThumb:attr(WPPath),thumbOrginal:attr(WPPath),order:attr("number"),ishide:attr("boolean"),bg:attr(WPPath),duration:attr("number",{defaultValue:defaults.duration||3}),fillMode:attr("string",{defaultValue:defaults.slideFillMode||"fill"}),thumb:attr(WPPath),info:attr("string"),link:attr("string"),linkTarget:attr("string"),linkTitle:attr("string"),linkRel:attr("string"),linkClass:attr("string"),linkId:attr("string"),video:attr("string"),bgColor:attr("string"),autoplayVideo:attr("boolean"),pattern:attr("string"),colorOverlay:attr("string"),bgv_mp4:attr("string"),bgv_ogg:attr("string"),bgv_webm:attr("string"),bgv_fillmode:attr("string",{defaultValue:defaults.sliderVideoFillMode||"fill"}),bgv_loop:attr("boolean",{defaultValue:defaults.slideVideoLoop}),bgv_mute:attr("boolean",{defaultValue:defaults.slideVideoMute}),bgv_autopause:attr("boolean",{defaultValue:defaults.slideVideoAutopause}),cssId:attr("string"),cssClass:attr("string"),bgAlt:attr("string"),layers:hasMany("MSPanel.Layer",{key:"layer_ids"})}),MSPanel.Layer=Ember.Model.extend({id:attr("number"),name:attr("string"),isLocked:attr("boolean",{defaultValue:!1}),isHided:attr("boolean",{defaultValue:!1}),isSoloed:attr("boolean",{defaultValue:!1}),slide:belongsTo("MSPanel.Slide",{key:"slide"}),styleModel:belongsTo("MSPanel.Style",{key:"styleModel",embedded:!1}),showEffect:belongsTo("MSPanel.Effect",{key:"showEffect",embedded:!1}),showTransform:attr("string",{defaultValue:""}),showOrigin:attr("string",{defaultValue:""}),showFade:attr("boolean",{defaultValue:!0}),hideEffect:belongsTo("MSPanel.Effect",{key:"hideEffect",embedded:!1}),hideTransform:attr("string",{defaultValue:""}),hideOrigin:attr("string",{defaultValue:""}),hideFade:attr("boolean",{defaultValue:!0}),imgThumb:attr(WPPath),stageOffsetX:attr("number",{defaultValue:0}),stageOffsetY:attr("number",{defaultValue:0}),order:attr("number"),type:attr("string"),cssClass:attr("string"),cssId:attr("string"),title:attr("string"),rel:attr("string"),noSwipe:attr("string",{defaultValue:!1}),content:attr("string",{defaultValue:defaults.layerContent||"Lorem Ipsum"}),img:attr(WPPath),imgAlt:attr("string"),video:attr("string",{defaultValue:"http://player.vimeo.com/video/11721242"}),align:attr("string",{defaultValue:"top"}),useAction:attr("boolean",{defaultValue:!1}),action:attr("string"),toSlide:attr("number"),link:attr("string"),linkTarget:attr("string"),scrollDuration:attr("number",{defaultValue:2}),offsetX:attr("number",{defaultValue:0}),offsetY:attr("number",{defaultValue:0}),width:attr("number"),height:attr("number"),resize:attr("boolean",{defaultValue:!0}),fixed:attr("boolean",{defaultValue:!1}),widthlimit:attr("number",{defaultValue:"0"}),origin:attr("string",{defaultValue:"tl"}),stayHover:attr("boolean",{defaultValue:!0}),className:attr("string"),parallax:attr("string"),showDuration:attr("number",{defaultValue:1}),showDelay:attr("number",{defaultValue:0}),showEase:attr("string",{defaultValue:"easeOutQuint"}),showEffFunc:attr("string"),useHide:attr("boolean",{defaultValue:!1}),hideDuration:attr("number",{defaultValue:1}),hideDelay:attr("number",{defaultValue:1}),hideEase:attr("string",{defaultValue:"easeOutQuint"}),hideEffFunc:attr("string"),btnClass:attr("string",{defaultValue:"ms-btn ms-default-btn"}),autoplayVideo:attr("boolean")}),MSPanel.Style=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),className:attr("string"),backgroundColor:attr("string"),paddingTop:attr("number"),paddingRight:attr("number"),paddingBottom:attr("number"),paddingLeft:attr("number"),borderTop:attr("number"),borderRight:attr("number"),borderBottom:attr("number"),borderLeft:attr("number"),borderColor:attr("string"),borderRadius:attr("number"),borderStyle:attr("string"),fontFamily:attr("string"),fontWeight:attr("string",{defaultValue:"normal"}),fontSize:attr("number"),textAlign:attr("string"),letterSpacing:attr("number"),lineHeight:attr("string",{defaultValue:"normal"}),whiteSpace:attr("string"),color:attr("string"),custom:attr("string")}),MSPanel.PresetStyle=MSPanel.Style.extend({}),MSPanel.Effect=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),fade:attr("boolean",{defaultValue:!0}),translateX:attr("number"),translateY:attr("number"),translateZ:attr("number"),scaleX:attr("number"),scaleY:attr("number"),rotate:attr("number"),rotateX:attr("number"),rotateY:attr("number"),rotateZ:attr("number"),skewX:attr("number"),skewY:attr("number"),originX:attr("number"),originY:attr("number"),originZ:attr("number")}),MSPanel.PresetEffect=MSPanel.Effect.extend({}),MSPanel.Control=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),autoHide:attr("boolean",{defaultValue:!0}),overVideo:attr("boolean",{defaultValue:!0}),cssClass:attr("string"),cssId:attr("string"),margin:attr("number"),dir:attr("string"),color:attr("string"),radius:attr("number"),stroke:attr("number"),speed:attr("number"),space:attr("number"),type:attr("string"),width:attr("number"),height:attr("number"),align:attr("string"),inset:attr("boolean"),size:attr("number"),hideUnder:attr("number"),fillMode:attr("string")}),MSPanel.Callback=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),content:attr("string",{defaultValue:"function(event){\n var api = event.target;\n}"})}),MSPanel.ButtonStyle=Ember.Model.extend({id:attr("number"),className:attr("string"),normal:attr("string"),hover:attr("string"),active:attr("string"),style:attr("string",{defaultValue:"ms-btn-box"}),size:attr("string",{defaultValue:"ms-btn-n"})});var decodeFix=function(str){var decoded=B64.decode(str);return decoded.slice(0,decoded.lastIndexOf("}")+1)};MSPanel.data=__MSP_DATA?JSON.parse(decodeFix(__MSP_DATA)):{meta:{}},MSPanel.PSData=__MSP_PRESET_STYLE?JSON.parse(decodeFix(__MSP_PRESET_STYLE)):{meta:{}},MSPanel.PEData=__MSP_PRESET_EFFECT?JSON.parse(decodeFix(__MSP_PRESET_EFFECT)):{meta:{}},MSPanel.PBData=__MSP_PRESET_BUTTON?JSON.parse(decodeFix(__MSP_PRESET_BUTTON)):{meta:{}},MSPanel.Settings.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Slide.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Layer.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Style.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Effect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Control.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Callback.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.PresetStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PSData}),MSPanel.PresetEffect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PEData}),MSPanel.ButtonStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PBData})}(),MSPanel.SlideFrame=Ember.View.extend({classNames:["msp-slideframe"],classNameBindings:["selected:active"],selected:!1,thumb_src:"",showbtnclass:"msp-ico msp-ico-whitehide",template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}})"></div>{{/if}}</div><span class="msp-frame-slideorder">#{{view.order}}</span><div class="msp-framehandle"><ul><li><a title="'+__MSP_LAN.ui_001+'" href="#" {{action "hideswitch" target=view}}><span {{bind-attr class=view.showbtnclass}}></span></a></li><li><a title="'+__MSP_LAN.ui_002+'" href="#" {{action "duplicate" target=view}}><span class="msp-ico msp-ico-whiteduplicate"></span></a></li><li><a title="'+__MSP_LAN.ui_003+'" href="#" {{action "remove" target=view}}><span class="msp-ico msp-ico-whiteremove"></span></a></li></ul></div>'),click:function(){this.get("controller").send("select",this.get("slide"))},onValueChanged:function(){var hasImg=!Ember.isEmpty(this.get("slide.bg")),hasThumb=!Ember.isEmpty(this.get("slide.thumb"));this.beginPropertyChanges(),this.set("hasImg",hasImg||hasThumb),hasImg?this.set("preview","background-image:url("+this.get("slide.bgThumb")+");"):hasThumb&&this.set("preview","background-image:url("+this.get("slide.thumb")+");"),this.endPropertyChanges()}.observes("slide.bg","slide.thumb").on("didInsertElement"),onSelect:function(){var slide=this.get("slide");this.set("selected",slide===this.get("controller.currentSlide"))}.observes("controller.currentSlide").on("init"),hideChange:function(){this.get("slide.ishide")?this.set("showbtnclass","msp-ico msp-ico-whitehide msp-ico-whiteshow"):this.set("showbtnclass","msp-ico msp-ico-whitehide")}.observes("slide.ishide").on("init"),order:function(){return this.get("slide.order")+1}.property("slide.order"),actions:{duplicate:function(){this.get("controller").duplicateSlide(this.get("slide"))},hideswitch:function(){this.set("slide.ishide",!this.get("slide.ishide"))},remove:function(){confirm(__MSP_LAN.ui_004)&&this.get("controller").removeSlide(this.get("slide"))}}}),MSPanel.SlideList=Ember.View.extend({tagName:"ul",classNames:["msp-slides"],template:Ember.Handlebars.compile('{{#each item in controller}}<li class="msp-slideframe-item" {{bind-attr data-id=item.id}}>{{view MSPanel.SlideFrame slide=item}}</li>{{/each}}<li class="msp-addslide-cont"><div class="msp-addslide" {{action "addSlides"}}><span class="msp-ico msp-ico-grayaddlarge"></span><span class="msp-addslide-label">Add Slide</span></div></li>'),didInsertElement:function(){var that=this;this.$().sortable({placeholder:"msp-frames-srtplaceholder",items:">li:not(.msp-addslide-cont)",delay:100,update:function(){that.updateSort()},create:function(){that.updateSort()}})},updateSort:function(){var indexes={};$(".msp-slideframe-item").each(function(index){indexes[$(this).data("id")]=index}),this.$().sortable("cancel"),this.get("controller").updateSlidesSort(indexes)}}),MSPanel.ImgSelect=Ember.View.extend({classNames:["msp-imgselect"],value:"",hasImg:!1,frame:null,slideBg:!1,template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}})"></div>{{/if}}</div>{{#if view.hasImg}}<button {{action removeImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayremove"></span></button>{{else}}<button {{action addImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayadd"></span></button>{{/if}}'),willDestroyElement:function(){var frame=this.get("frame");frame&&(frame.detach(),frame.remove(),frame=null,this.set("frame",null))},onValueChanged:function(){this.beginPropertyChanges(),this.set("hasImg",!Ember.isEmpty(this.get("value"))),this.set("preview","background-image:url("+this.get("thumb")+");"),this.endPropertyChanges()}.observes("value").on("didInsertElement"),actions:{removeImg:function(){this.beginPropertyChanges(),this.set("value",void 0),this.set("thumb",void 0),this.endPropertyChanges()},addImg:function(){if("undefined"!=typeof wp){var that=this,frame=this.get("frame");if(frame)return void frame.open();var frame=wp.media.frames.frame=wp.media({title:"Select Image",multiple:!1,frame:"select",library:{type:"image"},button:{text:"Add Image"}});frame.on("select",function(){var attachment=frame.state().get("selection").first().toJSON();that.set("thumb",(attachment.sizes.thumbnail||attachment.sizes.full).url),that.set("value",attachment.url)}),frame.open(),this.set("frame",frame)}}}}),MSPanel.Select=Ember.Select.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.URLTarget=MSPanel.Select.extend({onInit:function(){var contents=[{lable:__MSP_LAN.ui_005,value:"_self"},{lable:__MSP_LAN.ui_006,value:"_blank"},{lable:__MSP_LAN.ui_007,value:"_parent"},{lable:__MSP_LAN.ui_008,value:"_top"}];this.set("content",contents),this.set("optionValuePath","content.value"),this.set("optionLabelPath","content.lable"),this.set("width",200)}.on("init")}),MSPanel.Fillmode=Ember.View.extend({classNames:["msp-fill-dd"],type:"slide",value:"fill",index:1,template:Ember.Handlebars.compile("<select>{{#each item in view.contents}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.text}}</option>{{/each}}</select>"),didInsertElement:function(){var that=this,isFirst=!0;this.$("select").ddslick({width:154,onSelected:function(selected){!isFirst&&that.set("value",selected.selectedData.value),isFirst=!1}}),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$(".dd-container").ddslick("select",{index:this.get("valuedic")[this.get("value")]})}.observes("value"),onInit:function(){var contents,valuedic;"slide"===this.get("type")?(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"},{value:"center",text:__MSP_LAN.ui_011,img:__MSP_PATH+"images/center.png"},{value:"stretch",text:__MSP_LAN.ui_012,img:__MSP_PATH+"images/stretch.png"},{value:"tile",text:__MSP_LAN.ui_013,img:__MSP_PATH+"images/tile.png"}],valuedic={fill:0,fit:1,center:2,stretch:3,tile:4}):"video"===this.get("type")&&(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"}],valuedic={fill:0,fit:1,none:2}),this.set("contents",contents),this.set("valuedic",valuedic)}.on("init")}),MSPanel.AddLayer=Ember.View.extend({classNames:["msp-addlayer"],template:Ember.Handlebars.compile('<button {{action newLayer view.value}} class="msp-add-btn msp-addlayer-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-addlayer-dd"><select>{{#each item in view.layertypes}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.lable}}</option>{{/each}}</select></div>'),didInsertElement:function(){var that=this;this.$().find("select").ddslick({width:154,onSelected:function(selected){that.set("value",selected.selectedData.value)}})},onInit:function(){for(var layertypes=[],clt=this.get("controller.layertypes"),i=0,l=clt.length;i!==l;i++)layertypes.push({value:clt[i].value,lable:clt[i].lable,img:__MSP_PATH+"images/layertypes/"+clt[i].value+".png"});this.set("layertypes",layertypes)}.on("init")}),MSPanel.AlignBtns=Ember.View.extend({classNames:["msp-align-btns"],target:null,template:Ember.Handlebars.compile('<button title="'+__MSP_LAN.ui_015+'" {{action "alignLayer" "top" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-altop"></span></button><button title="'+__MSP_LAN.ui_016+'" {{action "alignLayer" "mid" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-almid"></span></button><button title="'+__MSP_LAN.ui_017+'" {{action "alignLayer" "bot" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-albot"></span></button><div class="msp-btn-space"></div><button title="'+__MSP_LAN.ui_018+'" {{action "alignLayer" "left" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alleft"></span></button><button title="'+__MSP_LAN.ui_019+'" {{action "alignLayer" "center" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alcenter"></span></button><button title="'+__MSP_LAN.ui_020+'" {{action "alignLayer" "right" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alright"></span></button>')}),MSPanel.PositionOrigin=Ember.View.extend({classNames:["msp-origin-control"],layer:null,selectedNode:null,template:Ember.Handlebars.compile('<table><tbody><tr><td title="Top left" class="msp-origin-btn msp-origin-tl" data-origin="tl"></td><td title="Top center" class="msp-origin-btn msp-origin-tc" data-origin="tc"></td><td title="Top right" class="msp-origin-btn msp-origin-tr" data-origin="tr"></td></tr><tr><td title="Middle left" class="msp-origin-btn msp-origin-ml" data-origin="ml"></td><td title="Middle center" class="msp-origin-btn msp-origin-mc" data-origin="mc"></td><td title="Middle right" class="msp-origin-btn msp-origin-mr" data-origin="mr"></td></tr><tr><td title="Bottom left" class="msp-origin-btn msp-origin-bl" data-origin="bl"></td><td title="Bottom center" class="msp-origin-btn msp-origin-bc" data-origin="bc"></td><td title="Bottom right" class="msp-origin-btn msp-origin-br" data-origin="br"></td></tr></tbody></table>'),didInsertElement:function(){var that=this;this.$(".msp-origin-btn").click(function(){Ember.isEmpty(that.get("layer"))||that.set("layer.origin",$(this).data("origin"))}),this.onValueChanged()},onValueChanged:function(){var selectedNode=this.get("selectedNode");if(Ember.isEmpty(selectedNode)||selectedNode.removeClass("msp-origin-btn-selected"),Ember.isEmpty(this.get("layer")))return void this.$().addClass("msp-origin-control-disabled");this.$().removeClass("msp-origin-control-disabled");var value=this.get("layer.origin"),newNode=this.$(".msp-origin-"+value).addClass("msp-origin-btn-selected");this.set("selectedNode",newNode)}.observes("layer","layer.origin")}),MSPanel.ButtonsList=Ember.View.extend({classNames:["msp-buttons-container"],layer:null,template:Ember.Handlebars.compile('{{#each button in controller.buttonClasses}}<div class="msp-button-container" {{action "selectButton" button target=view}}><div class="msp-button-cell"><span {{bind-attr class=":ms-btn button.style button.size button.className"}}>Button</span></div></div>{{/each}}'),didInsertElement:function(){this.onValueChanged()},onValueChanged:function(){var className=this.get("layer.btnClass"),lastSelected=this.get("lastSelected");Ember.isEmpty(className)||(className=className.split(" ").pop(),Ember.isEmpty(lastSelected)||this.$("."+lastSelected).parent().removeClass("active"),this.$("."+className).parent().addClass("active"),this.set("lastSelected",className))}.observes("layer","layer.btnClass"),actions:{selectButton:function(button){this.set("layer.btnClass","ms-btn "+button.get("style")+" "+button.get("size")+" "+button.get("className"))}}}),MSPanel.ActionList=Ember.View.extend({classNames:["msp-action-list"],layer:null,showSlideNum:null,showDuration:null,template:Ember.Handlebars.compile('{{#dropdwon-List value=view.layer.action width=180}}<option value="next">'+(__MSP_LAN.ui_021||"Goto next slide")+'</option><option value="previous">'+(__MSP_LAN.ui_022||"Goto previous slide")+'</option><option value="gotoSlide">'+(__MSP_LAN.ui_025||"Goto slide")+'</option><option value="pause">'+(__MSP_LAN.ui_023||"Pause timer")+'</option><option value="resume">'+(__MSP_LAN.ui_024||"Resume timer")+'</option><option value="scrollToEnd">'+(__MSP_LAN.ui_028||"Scroll to bottom of slider")+'</option>{{/dropdwon-List}}{{#if view.showSlideNum}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_026||"Slide number : ")+' {{number-input value=view.layer.toSlide}}{{/if}}{{#if view.showDuration}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_029||"Scroll animation duration : ")+" {{number-input value=view.layer.scrollDuration}} s{{/if}}"),onValueChanged:function(){var value=this.get("layer.action");this.set("showSlideNum","gotoSlide"===value),this.set("showDuration","scrollToEnd"===value)}.observes("layer","layer.action").on("init")}),MSPanel.SimpleCodeBlock=Ember.View.extend({classNames:["msp-shortcode-box"],template:Ember.Handlebars.compile('<input type="text" readonly {{bind-attr value=view.value}}>'),width:150,didInsertElement:function(){this.$("input").on("click",function(){$(this).select()}).width(this.get("width"))}}),MSPanel.SettingsView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.SlidesView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.StageArea=Ember.View.extend({classNames:["msp-stage-area"],template:Ember.Handlebars.compile('{{view MSPanel.Stage}}{{#if noticeMsg}}<div class="msp-stage-msg"><span class="msp-ico msp-ico-notice"></span>{{{noticeMsg}}}</div>{{/if}}')}),MSPanel.Stage=Ember.View.extend({classNames:["msp-slide-stage"],attributeBindings:["style"],template:Ember.Handlebars.compile('<div id="stage-bg" class="msp-stage-bg"></div><div id="overlaybox" {{bind-attr class=":msp-stage-pattern :ms-pattern controller.slide.pattern"}}></div>'),resize:function(){var w=this.get("controller.sliderSettings.width"),h=this.get("controller.sliderSettings.height");this.set("width",w),this.set("height",h),this.$().css({width:w,height:h})}.observes("controller.sliderSettings.width","controller.sliderSettings.height","parentView.zoom").on("didInsertElement"),didInsertElement:function(){var BG=this.$("#stage-bg"),BGImage=$("<img/>");BGImage.css("visibelity","hidden").each($.jqLoadFix);var aligner=new MSAligner(this.get("controller.slide.fillMode"),BG,BGImage);this.set("bgAligner",aligner),this.set("bgImg",BGImage),this.onBGChange()},onBGColorChange:function(){var color=this.get("controller.slide.bgColor");Ember.isEmpty(color)?this.$("#stage-bg").css("background-color",""):this.$("#stage-bg").css("background-color",color)}.observes("controller.slide.bgColor").on("didInsertElement"),onColorOverlayChange:function(){var color=this.get("controller.slide.colorOverlay");Ember.isEmpty(color)?this.$("#overlaybox").css("background-color",""):this.$("#overlaybox").css("background-color",color)}.observes("controller.slide.colorOverlay").on("didInsertElement"),onBGChange:function(){var alinger=this.get("bgAligner");alinger&&alinger.reset();var bg=this.get("controller.slide.bg"),bgImg=this.get("bgImg");if(Ember.isEmpty(bg))bgImg.detach();else{var that=this;bgImg.appendTo(this.$("#stage-bg")),bgImg.preloadImg(bg,function(event){that._onBGLoad(event)}),bgImg.attr("src",bg)}}.observes("controller.slide.bg"),_onBGLoad:function(event){var aligner=this.get("bgAligner");aligner&&(aligner.init(event.width,event.height),aligner.align(),this.get("bgImg").css("visibelity",""))},onFillModeChanged:function(){var aligner=this.get("bgAligner");aligner.changeType(this.get("controller.slide.fillMode"))}.observes("controller.slide.fillMode"),willDestroyElement:function(){$(document).off("keydown",this.moveLayer),this.set("bgAligner",null)}}),MSPanel.ControlBtn=Ember.View.extend({control:null,tagName:"div",active:!1,classNames:["msp-control-btn"],classNameBindings:["active:msp-blue-btn"],template:Ember.Handlebars.compile('<span class="msp-control-label">{{view.control.label}}</span><a href="#" {{action "removeControl" target=view bubbles=false}}><span class="msp-control-removes msp-ico msp-ico-whiteremove"></span></a>'),didInsertElement:function(){},onActiveChange:function(){this.set("active",this.get("controller.currentControl")===this.get("control")),this.get("active")&&this.get("controller").send("showControlOptions")}.observes("controller.currentControl").on("init"),click:function(){this.get("active")||this.set("controller.currentControl",this.get("control"))},actions:{removeControl:function(){confirm('Are you sure want to remove "'+this.get("control.label")+'" control?')&&this.get("controller").send("removeControl",this.get("control"))}}}),function($){function WPEditorTemplate(id){var newEditor=$(hiddenEditor);return newEditor.find("link").remove(),newEditor.html().replace(/msp-hidden/g,id)}MSPanel.MetaBoxComponent=Ember.Component.extend({tagName:"div",classNames:["msp-metabox"],layout:Ember.Handlebars.compile('<div class="msp-metabox-handle"><h3 class="msp-metabox-title">{{title}}</h3><div class="msp-metabox-toggle"></div></div>{{yield}}<div class="clear"> </div>')}),Ember.TEMPLATES["components/tabs-panel"]=Ember.Handlebars.compile("{{yield}}"),MSPanel.TabsPanelComponent=Ember.Component.extend({tagName:"div",attributeBindings:["id"],classNames:["msp-metabox msp-metabox-tabs"],didInsertElement:function(){this.$().avertaLiveTabs()}}),MSPanel.SwitchBoxComponent=Ember.Component.extend({classNames:["msp-switchbox"],offlable:"OFF",onlable:"ON",value:!1,layout:Ember.Handlebars.compile('<div class="msp-switch-cont"><span class="msp-switch-off">{{view.offlable}}</span><div class="msp-switch-handle"></div><span class="msp-switch-on">{{view.onlable}}</span></div>'),click:function(){var that=this;that.set("value",!that.get("value"))},update:function(){this.get("value")?this.$().addClass("switched"):this.$().removeClass("switched")}.observes("value").on("didInsertElement")}),MSPanel.AddDynamicTag=Ember.View.extend({classNames:["msp-add-dynamic-tags"],editorId:null,template:Ember.Handlebars.compile('<button {{action "addTag" target=view}} class="msp-add-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-ddlist"></div>'),didInsertElement:function(){for(var select=$("<select></select>").appendTo(this.$(".msp-ddlist")).width(220),i=0,l=MSPanel.dynamicTags.length;i!==l;i++)select.append('<option value="'+MSPanel.dynamicTags[i].tag+'">'+MSPanel.dynamicTags[i].name+"</option>");this.set("select",select)},actions:{addTag:function(){var id=this.get("editorId");tinymce&&$("#wp-"+id+"-wrap").hasClass("tmce-active")?tinymce.get(id).execCommand("insertHTML",!1,this.get("select").val()):$("#"+id).insertAtCaret(this.get("select").val())}}});var hiddenEditor=jQuery("#mspHiddenEditor")[0].outerHTML,__tmc_msp_id=0;MSPanel.WPEditor=Ember.View.extend({classNames:["msp-wp-editor"],_id:null,template:null,tab:null,tabs:null,onInit:function(){var id="msp-wpeditor-"+__tmc_msp_id;this.set("_id",id),this.set("template",Ember.Handlebars.compile(WPEditorTemplate(id))),__tmc_msp_id++}.on("init"),didInsertElement:function(){var tabs=this.get("tabs");return Ember.isEmpty(tabs)?void this.createEditor():void $("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.createEditor()},createEditor:function(){if(this.get("inited")!==!0){this.set("inited",!0);var id=this.get("_id"),that=this;if(window.tinymce){var settings=$.extend({},window.tinyMCEPreInit.mceInit["msp-hidden"]||{});settings.forced_root_block="",settings.force_br_newlines=!0,settings.force_p_newlines=!1,settings.wpautop=!1,"3"==tinyMCE.majorVersion?(settings.body_class=settings.elements=id,settings.setup=function(ed){ed.onInit.add(function(){that.initEditor(tinyMCE.getInstanceById(id))})},tinymce.init(settings)):"4"==tinyMCE.majorVersion&&(settings.body_class="content post-type-post post-status-auto-draft post-format-standard",settings.selector="#"+id,settings.setup=function(ed){ed.on("init",function(){that.initEditor(tinyMCE.get(id))})},tinymce.init(settings))}var qtags,qtagSettings=$.extend({},window.tinyMCEPreInit.qtInit["msp-hidden"]||{});
|
10 |
-
qtagSettings.id=id,"function"==typeof QTags&&(qtags=quicktags(qtagSettings),QTags.buttonsInitDone=!1,QTags._buttonsInit(),that.set("qtags",qtags),switchEditors.go(id,"html"),this.$("textarea#"+this.get("_id")).on("change keyup paste",function(){that.set("value",$(this).val())}))}},initEditor:function(mce){function internalUpdate(){that.set("internalChange",!0),that.set("value",mce.getContent()),that.set("internalChange",!1)}var id=this.get("_id"),that=(this.get("value"),this);this.$(".wp-editor-wrap").on("mousedown",function(){wpActiveEditor=id}),"3"==tinyMCE.majorVersion?(mce.onChange.add(internalUpdate),mce.onKeyUp.add(internalUpdate)):"4"==tinyMCE.majorVersion&&(mce.on("change",internalUpdate),mce.on("keyup",internalUpdate)),this.$().click(internalUpdate),setTimeout(function(){switchEditors.go(id,"html"),switchEditors.go(id,"tmce")},100),this.set("mce",mce),this.onValueChanged()},onValueChanged:function(){if(this.get("inited")){var value=this.get("value");if(this.$("textarea#"+this.get("_id")).val(value),this.get("internalChange"))return void this.set("internalChange",!1);var mce=this.get("mce");Ember.isEmpty(mce)||null==value?null==value&&mce.setContent(" "):mce.setContent(value)}}.observes("value"),willDestroyElement:function(){if(this.get("inited")){window.tinymce&&tinymce.remove(this.get("_id"));var qtags=this.get("qtags");qtags&&($(qtags.toolbar).remove(),qtags.toolbar=null,qtags=null,QTags.instances[this.get("_id")]&&delete QTags.instances[this.get("_id")],this.$("textarea#"+this.get("_id")).remove());var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor)}}}),jQuery.ui&&jQuery.ui.spinner&&(jQuery.ui.spinner.prototype._events.mousewheel=function(event,delta){if(delta&&this.element.is(":focus")){if(!this.spinning&&!this._start(event))return!1;this._spin((delta>0?1:-1)*this.options.step,event),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(event)},100),event.preventDefault()}}),MSPanel.NumberInputView=Ember.View.extend({step:1,min:0,tagName:"input",attributeBindings:["type"],lastValue:null,type:"text",didInsertElement:function(){var that=this,input=this.$(),updateValue=function(){var value=input.spinner("value");that.set("internalChange",!0),isNaN(value)||null==value?that.set("value",void 0):that.set("value",parseFloat(value))};input.on("change",updateValue).spinner({step:this.get("step"),numberFormat:"n",min:this.get("min"),max:this.get("max"),spin:updateValue,stop:updateValue}).spinner("value",this.get("value"))},onValueChanged:function(){return this.get("internalChange")?void this.set("internalChange",!1):void this.$().spinner("value",this.get("value"))}.observes("value")}),Ember.Handlebars.helper("number-input",MSPanel.NumberInputView),MSPanel.ColorPickerComponent=Ember.Component.extend({tagName:"input",classNames:"msp-color-picker",value:null,didInsertElement:function(){var that=this;this.$().spectrum({color:this.get("value"),allowEmpty:!0,showInput:!0,showAlpha:!0,clickoutFiresChange:!0,preferredFormat:"hex6",change:function(color){null===color?that.set("value",null):that.set("value",color.toString())}})},willDestroyElement:function(){this.$().spectrum("destroy")},onValueChanged:function(){this.$().spectrum("set",this.get("value"))}.observes("value")}),MSPanel.DropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.MultiDropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-ddlist-multiselect"],layout:Ember.Handlebars.compile("<select {{bind-attr size=view.size}} multiple>{{yield}}</select>"),value:null,width:100,size:7,didInsertElement:function(){var that=this;this.$("select").on("change",function(){that.set("value",$(this).val())}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.GoogleFontsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select"],defaultTemplate:Ember.Handlebars.compile('<select><option value="--" selected>Loading fonts..</option></select>'),value:null,variants:null,width:210,didInsertElement:function(){var that=this;GFonts.getList(function(){that.$("select").html('<option value="--" selected>-- select --</option>'+GFonts.generateSelectList()),that.onValueChanged(),that.$("select").trigger("change")}),this.$("select").on("change",function(){var option=that.$("select option:selected");"--"===option.val()?(that.set("value",void 0),that.set("variants",void 0)):(that.set("value",option.attr("value")),that.set("variants",option.attr("data-variants")))}).width(this.get("width")),that.onValueChanged()},onValueChanged:function(){this.$("select").val(Ember.isEmpty(this.get("value"))?"--":this.get("value"))}.observes("value")}),MSPanel.GoogleFontWeightsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select msp-gfonts-weight"],defaultTemplate:Ember.Handlebars.compile("<select></select>"),variants:null,value:null,width:120,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");return 0===option.length?void that.$("select").val("normal"):void("--"===option.val()?that.set("value",null):that.set("value",option.attr("value")))}).width(this.get("width")),that.updateVariants()},updateVariants:function(){var variants=this.get("variants");if(Ember.isEmpty(variants))this.$("select").html("<option>Select font</option>");else{var options="",value=this.get("value");variants=variants.split(",");for(var i=0,l=variants.length;i!==l;i++)-1===variants[i].indexOf("italic")&&(options+="regular"===variants[i]?'<option value="normal"'+("normal"===value?"selected":"")+">Normal</option>":'<option value="'+variants[i]+'"'+(value===variants[i]?"selected":"")+">"+variants[i]+"</option>");this.$("select").html(options).trigger("change")}}.observes("variants")}),MSPanel.CodeMirrorComponent=Ember.Component.extend({classNames:["msp-codemirror"],width:250,height:200,mode:"css",tab:null,tabs:null,layout:Ember.Handlebars.compile("<textarea>{{yield}}</textarea>"),didInsertElement:function(){this.$().width(this.get("width")).height(this.get("height"));var that=this,editor=CodeMirror.fromTextArea(this.$(">textarea")[0],{lineNumbers:!0,mode:this.get("mode")});editor.on("change",function(){that.set("internalChange",!0),that.set("value",editor.getValue())}),this.set("editor",editor);var value=this.get("value");Ember.isEmpty(value)||editor.setValue(value);var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},onValueChanged:function(){return this.get("internalChange")===!0?void this.set("internalChange",!1):(this.get("editor").setValue(this.get("value")),void this.set("internalChange",!1))}.observes("value"),refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.get("editor").refresh()},willDestroyElement:function(){var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor);var editor=this.get("editor");editor.toTextArea(),editor=null,this.set("editor",null)}});for(var patterns='<div class="msp-pattern-prev ms-pattern"></div>',i=1;30>=i;i++)patterns+='<div class="msp-pattern-prev ms-pattern ms-patt-'+i+'" data-pattern="ms-patt-'+i+'" style="'+(i>15?"background-color:black;":"")+'"></div>';MSPanel.PatternPickerComponent=Ember.Component.extend({tagName:"div",classNames:["msp-pattern-picker"],value:null,patternBoxIsOpen:!1,layout:Ember.Handlebars.compile('<div class="msp-pattern-control sp-replacer sp-light"><div {{bind-attr class=":ms-pattern-preview :ms-pattern view.value"}}></div><div class="sp-dd">▼</div></div><div class="msp-patterns-box">'+patterns+"</div>"),didInsertElement:function(){this.$(".msp-pattern-control").on("click",{that:this},this.togglePatternbox),$(document).on("click",{that:this},this.closePatternbox),this.$(".msp-patterns-box").css("display","none").on("click",function(e){e.stopPropagation()}).find(".ms-pattern").on("click",{that:this},this.selectPattern)},togglePatternbox:function(e){var that=e.data.that;e.stopPropagation(),that.get("patternBoxIsOpen")&&that.closePatternbox(e),that.$(".msp-patterns-box").css("display",""),that.set("patternBoxIsOpen",!0)},closePatternbox:function(e){var that=e.data.that;that.get("patternBoxIsOpen")&&(that.$(".msp-patterns-box").css("display","none"),that.set("patternBoxIsOpen",!1))},selectPattern:function(e){e.stopPropagation();var that=e.data.that;that.set("value",$(this).data("pattern"))},willDestroyElement:function(){this.$(".msp-patterns-box").off("click",this.togglePatternbox).find(".ms-pattern").off("click"),$(document).off("click",this.closePatternbox)}})}(jQuery),MSPanel.pushData=null,MSPanel.ApplicationController=Ember.Controller.extend({isFlickr:"flickr"===__MSP_TYPE,isFacebook:"facebook"===__MSP_TYPE,isPost:"post"===__MSP_TYPE,isWcproduct:"wc-product"===__MSP_TYPE,sliderId:MSPanel.SliderID,isSending:!1,statusMsg:"",hasError:!1,onInit:function(){window.$||(window.$=jQuery.noConflict()),MSPanel.Settings.find(),MSPanel.Slide.find(),MSPanel.Layer.find(),MSPanel.Style.find(),MSPanel.Effect.find(),MSPanel.PresetStyle.find(),MSPanel.PresetEffect.find(),MSPanel.Control.find(),MSPanel.Callback.find(),MSPanel.ButtonStyle.find(),this.set("disableControls",MSPanel.Settings.find(0).get("disableControls"));var that=this;MSPanel.pushData=function(){that.prepareData()},MSPanel.createButton=this.createButton,"wc-product"===__MSP_TYPE&&null==__MSP_POST&&null!=__WC_INSTALL_URL&&(this.set("hasError",!0),this.set("errorTemplate","wooc-error"),this.set("wooLink",__WC_INSTALL_URL)),this.generateButtonStyles(),this.set("shortCode",'[masterslider id="'+this.get("sliderId")+'"]'),this.set("phpFunction","<?php masterslider("+this.get("sliderId")+"); ?>"),jQuery("#panelLoading").remove(),window._msp_init_timeout&&clearTimeout(window._msp_init_timeout)}.on("init"),prepareData:function(){var fonts={},font_str="";MSPanel.Style.find().forEach(function(record){var font=record.get("fontFamily"),weight=record.get("fontWeight");Ember.isEmpty(font)||(fonts[font]||(fonts[font]=[]),"normal"===weight&&(weight="regular"),Ember.isEmpty(weight)||-1!==fonts[font].indexOf(weight)||fonts[font].push(weight))});for(var font in fonts)font_str+=font.replace(/\s/,"+")+":"+fonts[font].join(",")+"|";MSPanel.Settings.find(1).set("usedFonts",font_str.slice(0,-1)),this.saveRecords(MSPanel.Settings.find()),this.saveRecords(MSPanel.Slide.find()),this.saveRecords(MSPanel.Layer.find()),this.saveRecords(MSPanel.Style.find()),this.saveRecords(MSPanel.Effect.find()),this.saveRecords(MSPanel.PresetStyle.find()),this.saveRecords(MSPanel.PresetEffect.find()),this.saveRecords(MSPanel.Control.find()),this.saveRecords(MSPanel.Callback.find()),this.saveRecords(MSPanel.ButtonStyle.find())},generateButtonStyles:function(){var styles=MSPanel.ButtonStyle.find(),css="",$styleElement=$("#msp-buttons");styles.forEach(function(style){css+="."+style.get("className")+" {"+style.get("normal")+"}\n."+style.get("className")+":hover {"+style.get("hover")+"}\n."+style.get("className")+":active {"+style.get("active")+"}\n"}),0===$styleElement.length?$styleElement=$('<style id="msp-buttons"></style>').text(css).appendTo($("head")):$styleElement.text(css)},actions:{saveAll:function(){this.prepareData(),this.sendData()},showPreview:function(event){window.lunchMastersliderPreview&&lunchMastersliderPreview(event)}},saveRecords:function(records){records.forEach(function(record){record.save()})},sendData:function(){this.set("statusMsg",__MSP_LAN.ap_001),this.set("isSending",!0);var that=this;jQuery.post(__MS.ajax_url,{action:"msp_panel_handler",nonce:jQuery("#msp-main-wrapper").data("nonce"),msp_data:B64.encode(JSON.stringify(MSPanel.data)),preset_style:B64.encode(JSON.stringify(MSPanel.PSData)),preset_effect:B64.encode(JSON.stringify(MSPanel.PEData)),buttons:B64.encode(JSON.stringify(MSPanel.PBData)),slider_id:MSPanel.SliderID},function(res){that.set("statusMsg",res.message),that.set("isSending",!1)})},createButton:function(normal,hover,active,style,size){var newPreset=MSPanel.ButtonStyle.create({normal:normal,hover:hover,active:active,size:size,style:style});newPreset.save(),newPreset.set("className","msp-preset-btn-"+newPreset.get("id")),newPreset.save()}}),MSPanel.SettingsController=Ember.ObjectController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,sliderSkins:__MSP_SKINS,needs:["application","controls"],showAutoHeight:!1,showNearbyNum:!1,showWrapperWidth:!1,preloadMethod:null,setup:function(){var preload=this.get("preload");"all"===preload||"-1"===preload?this.set("preloadMethod",preload):this.set("preloadMethod","nearby"),this.set("draftMSTemplate",this.get("msTemplate"))},sliderLayoutChanged:function(){var layout=this.get("layout");"fullscreen"===layout||"autofill"===layout?(this.set("showAutoHeight",!1),this.set("autoHeight",!1)):this.set("showAutoHeight",!0),this.set("showWrapperWidth","boxed"===layout||"partialview"===layout),this.set("showFSMargin","fullscreen"===layout)}.observes("layout").on("setup"),preloadSetup:function(){var preloadMethod=this.get("preloadMethod");if("nearby"===preloadMethod){this.set("showNearbyNum",!0);var preload=this.get("preload");("all"===preload||"-1"===preload)&&this.set("preload","0")}else this.set("showNearbyNum",!1),this.set("preload",preloadMethod)}.observes("preloadMethod").on("setup")}),MSPanel.SlidesController=Ember.ArrayController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,_order:-1,bgImgSelector:null,sortProperties:["order"],stylesController:null,effectsController:null,buttonsController:null,layersList:[],layersController:null,mainView:null,isFirst:!0,currentSlide:null,setup:function(){if(Ember.isEmpty(this.get("sliderSettings.type"))&&this.set("sliderSettings.type",__MSP_TYPE),this.set("sliderSettings.sliderId",MSPanel.SliderID),0!==this.get("length")){var slide=this.get("firstObject");this.set("currentSlide",slide),this.updateOrder()}},slide:function(){return this.get("currentSlide")}.property("currentSlide"),duplicateSlide:function(slide){var slideProp=slide.toJSON();delete slideProp.id;var newSlide=MSPanel.Slide.create(slideProp);newSlide.set("order",slide.get("order")+1),this.forEach(function(_slide){var slide_order=_slide.get("order"),nslide_order=newSlide.get("order");slide_order>=nslide_order&&_slide!==newSlide&&_slide.set("order",slide_order+1)}),newSlide.save(),this.updateOrder()},updateSlidesSort:function(indexes){this.beginPropertyChanges(),this.forEach(function(slide){slide.set("order",indexes[slide.get("id")])},this),this.endPropertyChanges(),this.set("_order",this.get("lastObject.order"))},updateOrder:function(){var i=0;this.forEach(function(slide){slide.set("order",i++)}),this.set("_order",i-1)},removeSlide:function(slide){slide.deleteRecord(),0!==this.get("length")&&(this.send("select",this.get("firstObject")),this.updateOrder())},onImageSelect:function(){var uploaderFrame=this.get("uploaderFrame"),selection=uploaderFrame.state().get("selection"),self=this;selection.map(function(attachment){attachment=attachment.toJSON(),self.generateSlide(attachment,attachment.url,(attachment.sizes.thumbnail||attachment.sizes.full).url)}),this.send("select",this.get("lastObject"))},generateSlide:function(attachment,bg,thumb){var slide=MSPanel.Slide.create({order:this.get("_order")+1,bg:bg,bgThumb:thumb,bgAlt:attachment.alt});this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},actions:{addSlides:function(){var uploaderFrame=this.get("uploaderFrame");Ember.isEmpty(uploaderFrame)&&(uploaderFrame=wp.media.frames.frame=wp.media({title:__MSP_LAN.slc_001||"Select background image for new slide. (Multiple selection is available)",multiple:!0,frame:"select",library:{type:"image"},button:{text:__MSP_LAN.slc_002||"Create Slide(s)"}}),uploaderFrame.on("select",$.proxy(this.onImageSelect,this)),this.set("uploaderFrame",uploaderFrame)),uploaderFrame.open()},newSlide:function(){var slide=MSPanel.Slide.create({order:this.get("_order")+1});this.set("currentSlide",slide),this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},select:function(slide){slide!==this.get("currentSlide")&&this.set("currentSlide",slide)}}}),MSPanel.ControlsController=Ember.ArrayController.extend({needs:"application",controls:[{used:!1,label:__MSP_LAN.cc_001,value:"arrows"},{used:!1,label:__MSP_LAN.cc_002,value:"timebar"},{used:!1,label:__MSP_LAN.cc_003,value:"bullets"},{used:!1,label:__MSP_LAN.cc_004,value:"circletimer"},{used:!1,label:__MSP_LAN.cc_005,value:"scrollbar"},{used:!1,label:__MSP_LAN.cc_006,value:"slideinfo"},{used:!1,label:__MSP_LAN.cc_007,value:"thumblist"}],selectedControl:null,availableControls:[],noMore:!1,currentControl:null,setup:function(){var that=this;this.forEach(function(control){that.findControlObj(control.get("name")).used=!0}),this.set("availableControls",this.findAvailableControls())},actions:{addControl:function(){var control,controlName=this.get("selectedControl"),controlObj=this.findControlObj(controlName);control=MSPanel.Control.create(this.getDefaultValues(controlName)),control.set("label",controlObj.label),controlObj.used=!0,this.set("availableControls",this.findAvailableControls()),control.save(),this.set("currentControl",control)},removeControl:function(control){this.findControlObj(control.get("name")).used=!1,this.set("availableControls",this.findAvailableControls()),control.deleteRecord(),this.set("currentControl",this.get("firstObject")),this.send("showControlOptions")},showControlOptions:function(){var currentControl=this.get("currentControl");Ember.isEmpty(currentControl)?this.set("controlOptions","empty-template"):this.set("controlOptions",currentControl.get("name")+"-options")}},findControlObj:function(control){for(var controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)if(controls[i].value===control)return controls[i];return null},findAvailableControls:function(){for(var avc=[],controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)controls[i].used||avc.push(controls[i]);return this.set("noMore",0===avc.length),this.set("selectedControl",avc[0]?avc[0].value:null),avc},getDefaultValues:function(control){var values={name:control};switch(values.inset=!("slideinfo"===control||"thumblist"===control),control){case"timebar":values.align="bottom",values.color="#FFFFFF",values.autoHide=!1,values.width=4;break;case"bullets":values.align="bottom",values.dir="h",values.margin=10,values.space=6;break;case"circletimer":values.color="#A2A2A2",values.stroke=10,values.radius=4,values.autoHide=!1;break;case"scrollbar":values.align="top",values.dir="h",values.color="#3D3D3D",values.margin=10,values.autoHide=!1,values.width=4;break;case"slideinfo":values.align="bottom",values.margin=10,values.autoHide=!1;break;case"thumblist":values.align="bottom",values.space=5,values.width=100,values.height=80,values.margin=10,values.fillMode="fill",values.autoHide=!1}return values}}),MSPanel.CallbacksController=Ember.ArrayController.extend({callbacks:[{used:!1,label:__MSP_LAN.cb_011,value:"INIT"},{used:!1,label:__MSP_LAN.cb_001,value:"CHANGE_START"},{used:!1,label:__MSP_LAN.cb_002,value:"CHANGE_END"},{used:!1,label:__MSP_LAN.cb_003,value:"WAITING"},{used:!1,label:__MSP_LAN.cb_004,value:"RESIZE"},{used:!1,label:__MSP_LAN.cb_005,value:"VIDEO_PLAY"},{used:!1,label:__MSP_LAN.cb_006,value:"VIDEO_CLOSE"},{used:!1,label:__MSP_LAN.cb_007,value:"SWIPE_START"},{used:!1,label:__MSP_LAN.cb_008,value:"SWIPE_MOVE"},{used:!1,label:__MSP_LAN.cb_009,value:"SWIPE_END"}],availableCallbacks:[],noMore:!1,selectedCallback:null,setup:function(){var that=this;this.forEach(function(callback){that.findCallbackObj(callback.get("name")).used=!0}),this.set("availableCallbacks",this.findAvailableCallbacks())},actions:{addCallback:function(){var callback,callbackName=this.get("selectedCallback"),callbackObj=this.findCallbackObj(callbackName);callback=MSPanel.Callback.create({name:callbackObj.value,label:callbackObj.label}),callbackObj.used=!0,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.save()},removeCallback:function(callback){confirm(__MSP_LAN.cb_010.jfmt(callback.get("label")))&&(this.findCallbackObj(callback.get("name")).used=!1,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.deleteRecord())}},findCallbackObj:function(callback){for(var callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)if(callbacks[i].value===callback)return callbacks[i];return null},findAvailableCallbacks:function(){for(var avc=[],callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)callbacks[i].used||avc.push(callbacks[i]);return this.set("noMore",0===avc.length),this.set("selectedCallback",avc[0]?avc[0].value:null),avc}});
|
3 |
* Copyright © 2015 All Rights Reserved.
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
+
* @version 2.5.4
|
7 |
+
* @date May 2015
|
8 |
*/
|
9 |
+
window.MSPanel=Ember.Application.create({rootElement:"#msp-root"}),MSPanel.version="2.5.4",MSPanel.SliderID=parseQueryString(window.location.search).slider_id||__MSP_SLIDER_ID||"100",MSPanel.dependedControllers=[],String.prototype.jfmt=function(){return"".fmt.apply(this.replace(/%s|%d/,"%@"),arguments)},window.$=jQuery.noConflict(),jQuery.ui.dialog.prototype._focusTabbable=function(){},MSPanel.Router.map(function(){this.resource("settings"),this.resource("slides",{path:"/"}),this.resource("controls"),this.resource("callbacks"),this.resource("error"),this.resource("pro-features")}),MSPanel.Router.reopen({location:"none"}),MSPanel.ApplicationRoute=Ember.Route.extend({model:function(){var setting=MSPanel.Settings.find();0===setting.get("length")&&MSPanel.Settings.create().save()}}),MSPanel.SettingsRoute=Ember.Route.extend({model:function(){return MSPanel.Settings.find(1)},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),MSPanel.SlidesRoute=Ember.Route.extend({model:function(){return MSPanel.Slide.find()},setupController:function(controller,model){controller.set("model",model),controller.set("sliderSettings",MSPanel.Settings.find(1)),controller.setup()}}),MSPanel.ControlsRoute=Ember.Route.extend({model:function(){return MSPanel.Control.find()},setupController:function(controller,model){controller.set("model",model),controller.setup(),this.activate()},activate:function(){var controller=this.get("controller");controller&&controller.set("controlOptions","empty-template")}}),MSPanel.CallbacksRoute=Ember.Route.extend({model:function(){return MSPanel.Callback.find()},setupController:function(controller,model){controller.set("model",model),controller.setup()}}),function(){var attr=Ember.attr,hasMany=Ember.hasMany,belongsTo=Ember.belongsTo,regp=/https\:|http\:/,WPPath={serialize:function(path){return void 0==path?path:regp.test(path)?path.replace(__MS.upload_dir,""):path},deserialize:function(path){return void 0==path?path:regp.test(path)?path:__MS.upload_dir+path}},defaults=window.__MSP_DEF_OPTIONS||{};MSPanel.Settings=Ember.Model.extend({id:attr("number"),snapping:attr("boolean",{defaultValue:!0}),bgImageThumb:attr(WPPath),disableControls:attr("boolean",{defaultValue:!1}),name:attr("string",{defaultValue:__MSP_LAN.sm_001}),width:attr("number",{defaultValue:defaults.width||1e3}),height:attr("number",{defaultValue:defaults.height||500}),wrapperWidth:attr("number"),minHeight:attr("number"),wrapperWidthUnit:attr("string",{defaultValue:"px"}),autoCrop:attr("boolean",{defaultValue:defaults.autoCrop||!1}),type:attr("string"),sliderId:attr("string"),autofillTarget:attr("string"),layout:attr("string",{defaultValue:defaults.layout||"boxed"}),autoHeight:attr("boolean",{defaultValue:defaults.autoHeight||!1}),trView:attr("string",{defaultValue:defaults.transition||"basic"}),speed:attr("number",{defaultValue:defaults.speed||20}),space:attr("number",{defaultValue:defaults.space||0}),start:attr("number",{defaultValue:defaults.start}),grabCursor:attr("boolean",{defaultValue:defaults.grabCursor}),swipe:attr("boolean",{defaultValue:defaults.swipe}),mouse:attr("boolean",{defaultValue:defaults.mouse}),wheel:attr("boolean",{defaultValue:defaults.wheel}),keyboard:attr("boolean",{defaultValue:defaults.keyboard}),autoplay:attr("boolean",{defaultValue:defaults.autoplay}),loop:attr("boolean",{defaultValue:defaults.loop}),shuffle:attr("boolean",{defaultValue:defaults.shuffle}),preload:attr("string",{defaultValue:defaults.preload}),overPause:attr("boolean",{defaultValue:defaults.overPause}),endPause:attr("boolean",{defaultValue:defaults.endPause}),hideLayers:attr("boolean",{defaultValue:defaults.hideLayers}),dir:attr("string",{defaultValue:defaults.dir}),parallaxMode:attr("srting",{defaultValue:defaults.parallaxMode}),useDeepLink:attr("string",{defaultValue:!1}),deepLink:attr("string"),deepLinkType:attr("string",{defaultValue:"path"}),startOnAppear:attr("boolean",{defaultValue:defaults.startOnAppear}),scrollParallax:attr("boolean"),scrollParallaxMove:attr("number",{defaultValue:30}),scrollParallaxBGMove:attr("number",{defaultValue:50}),scrollParallaxFade:attr("boolean",{defaultValue:!0}),centerControls:attr("boolean",{defaultValue:defaults.centerControls}),instantShowLayers:attr("boolean",{defaultValue:defaults.instantShowLayers}),fullscreenMargin:attr("number"),inlineStyle:attr("string"),className:attr("string",{defaultValue:defaults.className}),bgColor:attr("string"),bgImage:attr(WPPath),customStyle:attr("string"),skin:attr("string",{defaultValue:defaults.skin}),msTemplate:attr("string",{defaultValue:"custom"}),msTemplateClass:attr("string",{defaultValue:""}),usedFonts:attr("string"),apiKey:attr("string"),setId:attr("string"),setType:attr("string"),imgCount:attr("number"),thumbSize:attr("srting"),imgSize:attr("string"),postType:attr("string"),postCats:attr(Array),postTags:attr(Array),postCount:attr("number"),postImageType:attr("string"),postOrder:attr("string"),postOrderDir:attr("string"),postExcerptLen:attr("number"),postExcludeIds:attr("string"),postIncludeIds:attr("string"),postOffset:attr("number"),postLinkSlide:attr("boolean"),postLinkTarget:attr("string"),postSlideBg:attr("string"),postSlideBgthumb:attr("string"),wcOnlyInstock:attr("boolean"),wcOnlyFeatured:attr("boolean"),wcOnlyOnsale:attr("boolean")}),MSPanel.Slide=Ember.Model.extend({id:attr("number"),timeline_h:attr("number",{defaultValue:200}),bgThumb:attr(WPPath),thumbOrginal:attr(WPPath),order:attr("number"),ishide:attr("boolean"),bg:attr(WPPath),duration:attr("number",{defaultValue:defaults.duration||3}),fillMode:attr("string",{defaultValue:defaults.slideFillMode||"fill"}),thumb:attr(WPPath),info:attr("string"),link:attr("string"),linkTarget:attr("string"),linkTitle:attr("string"),linkRel:attr("string"),linkClass:attr("string"),linkId:attr("string"),video:attr("string"),bgColor:attr("string"),autoplayVideo:attr("boolean"),pattern:attr("string"),colorOverlay:attr("string"),bgv_mp4:attr("string"),bgv_ogg:attr("string"),bgv_webm:attr("string"),bgv_fillmode:attr("string",{defaultValue:defaults.sliderVideoFillMode||"fill"}),bgv_loop:attr("boolean",{defaultValue:defaults.slideVideoLoop}),bgv_mute:attr("boolean",{defaultValue:defaults.slideVideoMute}),bgv_autopause:attr("boolean",{defaultValue:defaults.slideVideoAutopause}),cssId:attr("string"),cssClass:attr("string"),bgAlt:attr("string"),layers:hasMany("MSPanel.Layer",{key:"layer_ids"})}),MSPanel.Layer=Ember.Model.extend({id:attr("number"),name:attr("string"),isLocked:attr("boolean",{defaultValue:!1}),isHided:attr("boolean",{defaultValue:!1}),isSoloed:attr("boolean",{defaultValue:!1}),slide:belongsTo("MSPanel.Slide",{key:"slide"}),styleModel:belongsTo("MSPanel.Style",{key:"styleModel",embedded:!1}),showEffect:belongsTo("MSPanel.Effect",{key:"showEffect",embedded:!1}),showTransform:attr("string",{defaultValue:""}),showOrigin:attr("string",{defaultValue:""}),showFade:attr("boolean",{defaultValue:!0}),hideEffect:belongsTo("MSPanel.Effect",{key:"hideEffect",embedded:!1}),hideTransform:attr("string",{defaultValue:""}),hideOrigin:attr("string",{defaultValue:""}),hideFade:attr("boolean",{defaultValue:!0}),imgThumb:attr(WPPath),stageOffsetX:attr("number",{defaultValue:0}),stageOffsetY:attr("number",{defaultValue:0}),order:attr("number"),type:attr("string"),position:attr("string",{defaultValue:"normal"}),cssClass:attr("string"),cssId:attr("string"),title:attr("string"),rel:attr("string"),noSwipe:attr("string",{defaultValue:!1}),content:attr("string",{defaultValue:defaults.layerContent||"Lorem Ipsum"}),img:attr(WPPath),imgAlt:attr("string"),video:attr("string",{defaultValue:"http://player.vimeo.com/video/11721242"}),align:attr("string",{defaultValue:"top"}),useAction:attr("boolean",{defaultValue:!1}),action:attr("string"),toSlide:attr("number"),link:attr("string"),linkTarget:attr("string"),scrollDuration:attr("number",{defaultValue:2}),scrollTarget:attr("string"),offsetX:attr("number",{defaultValue:0}),offsetY:attr("number",{defaultValue:0}),width:attr("number"),height:attr("number"),resize:attr("boolean",{defaultValue:!0}),fixed:attr("boolean",{defaultValue:!1}),widthlimit:attr("number",{defaultValue:"0"}),origin:attr("string",{defaultValue:"tl"}),stayHover:attr("boolean",{defaultValue:!0}),className:attr("string"),parallax:attr("string"),showDuration:attr("number",{defaultValue:1}),showDelay:attr("number",{defaultValue:0}),showEase:attr("string",{defaultValue:"easeOutQuint"}),showEffFunc:attr("string"),useHide:attr("boolean",{defaultValue:!1}),hideDuration:attr("number",{defaultValue:1}),hideDelay:attr("number",{defaultValue:1}),hideEase:attr("string",{defaultValue:"easeOutQuint"}),hideEffFunc:attr("string"),btnClass:attr("string",{defaultValue:"ms-btn ms-default-btn"}),autoplayVideo:attr("boolean")}),MSPanel.Style=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),className:attr("string"),backgroundColor:attr("string"),paddingTop:attr("number"),paddingRight:attr("number"),paddingBottom:attr("number"),paddingLeft:attr("number"),borderTop:attr("number"),borderRight:attr("number"),borderBottom:attr("number"),borderLeft:attr("number"),borderColor:attr("string"),borderRadius:attr("number"),borderStyle:attr("string"),fontFamily:attr("string"),fontWeight:attr("string",{defaultValue:"normal"}),fontSize:attr("number"),textAlign:attr("string"),letterSpacing:attr("number"),lineHeight:attr("string",{defaultValue:"normal"}),whiteSpace:attr("string"),color:attr("string"),custom:attr("string")}),MSPanel.PresetStyle=MSPanel.Style.extend({}),MSPanel.Effect=Ember.Model.extend({id:attr("number"),name:attr("string"),type:attr("string"),fade:attr("boolean",{defaultValue:!0}),translateX:attr("number"),translateY:attr("number"),translateZ:attr("number"),scaleX:attr("number"),scaleY:attr("number"),rotate:attr("number"),rotateX:attr("number"),rotateY:attr("number"),rotateZ:attr("number"),skewX:attr("number"),skewY:attr("number"),originX:attr("number"),originY:attr("number"),originZ:attr("number")}),MSPanel.PresetEffect=MSPanel.Effect.extend({}),MSPanel.Control=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),autoHide:attr("boolean",{defaultValue:!0}),overVideo:attr("boolean",{defaultValue:!0}),cssClass:attr("string"),cssId:attr("string"),margin:attr("number"),dir:attr("string"),color:attr("string"),radius:attr("number"),stroke:attr("number"),speed:attr("number"),space:attr("number"),type:attr("string"),insertThumb:attr("boolean"),arrows:attr("boolean"),hoverChange:attr("boolean"),width:attr("number"),height:attr("number"),align:attr("string"),inset:attr("boolean"),size:attr("number"),hideUnder:attr("number"),fillMode:attr("string")}),MSPanel.Callback=Ember.Model.extend({id:attr("number"),label:attr("string"),name:attr("string"),content:attr("string",{defaultValue:"function(event){\n var api = event.target;\n}"})}),MSPanel.ButtonStyle=Ember.Model.extend({id:attr("number"),className:attr("string"),normal:attr("string"),hover:attr("string"),active:attr("string"),style:attr("string",{defaultValue:"ms-btn-box"}),size:attr("string",{defaultValue:"ms-btn-n"})});var decodeFix=function(str){var decoded=B64.decode(str);return decoded.slice(0,decoded.lastIndexOf("}")+1)};MSPanel.data=__MSP_DATA?JSON.parse(decodeFix(__MSP_DATA)):{meta:{}},MSPanel.PSData=__MSP_PRESET_STYLE?JSON.parse(decodeFix(__MSP_PRESET_STYLE)):{meta:{}},MSPanel.PEData=__MSP_PRESET_EFFECT?JSON.parse(decodeFix(__MSP_PRESET_EFFECT)):{meta:{}},MSPanel.PBData=__MSP_PRESET_BUTTON?JSON.parse(decodeFix(__MSP_PRESET_BUTTON)):{meta:{}},MSPanel.Settings.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Slide.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Layer.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Style.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Effect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Control.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.Callback.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.data}),MSPanel.PresetStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PSData}),MSPanel.PresetEffect.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PEData}),MSPanel.ButtonStyle.adapter=Ember.OfflineAdapter.create({applicationData:MSPanel.PBData})}(),MSPanel.SlideFrame=Ember.View.extend({classNames:["msp-slideframe"],classNameBindings:["selected:active"],selected:!1,thumb_src:"",showbtnclass:"msp-ico msp-ico-whitehide",template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}}></div>{{/if}}</div><span class="msp-frame-slideorder">#{{view.order}}</span><div class="msp-framehandle"><ul><li><a title="'+__MSP_LAN.ui_001+'" href="#" {{action "hideswitch" target=view}}><span {{bind-attr class=view.showbtnclass}}></span></a></li><li><a title="'+__MSP_LAN.ui_002+'" href="#" {{action "duplicate" target=view}}><span class="msp-ico msp-ico-whiteduplicate"></span></a></li><li><a title="'+__MSP_LAN.ui_003+'" href="#" {{action "remove" target=view}}><span class="msp-ico msp-ico-whiteremove"></span></a></li></ul></div>'),click:function(){this.get("controller").send("select",this.get("slide"))},onValueChanged:function(){var hasImg=!Ember.isEmpty(this.get("slide.bg")),hasThumb=!Ember.isEmpty(this.get("slide.thumb"));this.beginPropertyChanges(),this.set("hasImg",hasImg||hasThumb),hasImg?this.set("preview","background-image:url("+this.get("slide.bgThumb")+");"):hasThumb&&this.set("preview","background-image:url("+this.get("slide.thumb")+");"),this.endPropertyChanges()}.observes("slide.bg","slide.thumb").on("didInsertElement"),onSelect:function(){var slide=this.get("slide");this.set("selected",slide===this.get("controller.currentSlide"))}.observes("controller.currentSlide").on("init"),hideChange:function(){this.get("slide.ishide")?this.set("showbtnclass","msp-ico msp-ico-whitehide msp-ico-whiteshow"):this.set("showbtnclass","msp-ico msp-ico-whitehide")}.observes("slide.ishide").on("init"),order:function(){return this.get("slide.order")+1}.property("slide.order"),actions:{duplicate:function(){this.get("controller").duplicateSlide(this.get("slide"))},hideswitch:function(){this.set("slide.ishide",!this.get("slide.ishide"))},remove:function(){confirm(__MSP_LAN.ui_004)&&this.get("controller").removeSlide(this.get("slide"))}}}),MSPanel.SlideList=Ember.View.extend({tagName:"ul",classNames:["msp-slides"],template:Ember.Handlebars.compile('{{#each item in controller}}<li class="msp-slideframe-item" {{bind-attr data-id=item.id}}>{{view MSPanel.SlideFrame slide=item}}</li>{{/each}}<li class="msp-addslide-cont"><div class="msp-addslide" {{action "addSlides"}}><span class="msp-ico msp-ico-grayaddlarge"></span><span class="msp-addslide-label">Add Slide</span></div></li>'),didInsertElement:function(){var that=this;this.$().sortable({placeholder:"msp-frames-srtplaceholder",items:">li:not(.msp-addslide-cont)",delay:100,update:function(){that.updateSort()},create:function(){that.updateSort()}})},updateSort:function(){var indexes={};$(".msp-slideframe-item").each(function(index){indexes[$(this).data("id")]=index}),this.$().sortable("cancel"),this.get("controller").updateSlidesSort(indexes)}}),MSPanel.ImgSelect=Ember.View.extend({classNames:["msp-imgselect"],value:"",hasImg:!1,frame:null,slideBg:!1,template:Ember.Handlebars.compile('<div class="msp-img-cont">{{#if view.hasImg}}<div class="msp-imgselect-preview" {{bind-attr style=view.preview}})"></div>{{/if}}</div>{{#if view.hasImg}}<button {{action removeImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayremove"></span></button>{{else}}<button {{action addImg target="view"}} class="msp-img-btn"><span class="msp-ico msp-ico-grayadd"></span></button>{{/if}}'),willDestroyElement:function(){var frame=this.get("frame");frame&&(frame.detach(),frame.remove(),frame=null,this.set("frame",null))},onValueChanged:function(){this.beginPropertyChanges(),this.set("hasImg",!Ember.isEmpty(this.get("value"))),this.set("preview","background-image:url("+this.get("thumb")+");"),this.endPropertyChanges()}.observes("value").on("didInsertElement"),actions:{removeImg:function(){this.beginPropertyChanges(),this.set("value",void 0),this.set("thumb",void 0),this.endPropertyChanges()},addImg:function(){if("undefined"!=typeof wp){var that=this,frame=this.get("frame");if(frame)return void frame.open();var frame=wp.media.frames.frame=wp.media({title:"Select Image",multiple:!1,frame:"select",library:{type:"image"},button:{text:"Add Image"}});frame.on("select",function(){var attachment=frame.state().get("selection").first().toJSON();that.set("thumb",(attachment.sizes.thumbnail||attachment.sizes.full).url),that.set("value",attachment.url)}),frame.open(),this.set("frame",frame)}}}}),MSPanel.Select=Ember.Select.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.URLTarget=MSPanel.Select.extend({onInit:function(){var contents=[{lable:__MSP_LAN.ui_005,value:"_self"},{lable:__MSP_LAN.ui_006,value:"_blank"},{lable:__MSP_LAN.ui_007,value:"_parent"},{lable:__MSP_LAN.ui_008,value:"_top"}];this.set("content",contents),this.set("optionValuePath","content.value"),this.set("optionLabelPath","content.lable"),this.set("width",200)}.on("init")}),MSPanel.Fillmode=Ember.View.extend({classNames:["msp-fill-dd"],type:"slide",value:"fill",index:1,template:Ember.Handlebars.compile("<select>{{#each item in view.contents}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.text}}</option>{{/each}}</select>"),didInsertElement:function(){var that=this,isFirst=!0;this.$("select").ddslick({width:154,onSelected:function(selected){!isFirst&&that.set("value",selected.selectedData.value),isFirst=!1}}),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$(".dd-container").ddslick("select",{index:this.get("valuedic")[this.get("value")]})}.observes("value"),onInit:function(){var contents,valuedic;"slide"===this.get("type")?(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"},{value:"center",text:__MSP_LAN.ui_011,img:__MSP_PATH+"images/center.png"},{value:"stretch",text:__MSP_LAN.ui_012,img:__MSP_PATH+"images/stretch.png"},{value:"tile",text:__MSP_LAN.ui_013,img:__MSP_PATH+"images/tile.png"}],valuedic={fill:0,fit:1,center:2,stretch:3,tile:4}):"video"===this.get("type")&&(contents=[{value:"fill",text:__MSP_LAN.ui_009,img:__MSP_PATH+"images/fill.png"},{value:"fit",text:__MSP_LAN.ui_010,img:__MSP_PATH+"images/fit.png"}],valuedic={fill:0,fit:1,none:2}),this.set("contents",contents),this.set("valuedic",valuedic)}.on("init")}),MSPanel.AddLayer=Ember.View.extend({classNames:["msp-addlayer"],template:Ember.Handlebars.compile('<button {{action newLayer view.value}} class="msp-add-btn msp-addlayer-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-addlayer-dd"><select>{{#each item in view.layertypes}}<option {{bind-attr value=item.value data-imagesrc=item.img}}>{{item.lable}}</option>{{/each}}</select></div>'),didInsertElement:function(){var that=this;this.$().find("select").ddslick({width:154,onSelected:function(selected){that.set("value",selected.selectedData.value)}})},onInit:function(){for(var layertypes=[],clt=this.get("controller.layertypes"),i=0,l=clt.length;i!==l;i++)layertypes.push({value:clt[i].value,lable:clt[i].lable,img:__MSP_PATH+"images/layertypes/"+clt[i].value+".png"});this.set("layertypes",layertypes)}.on("init")}),MSPanel.AlignBtns=Ember.View.extend({classNames:["msp-align-btns"],target:null,template:Ember.Handlebars.compile('<button title="'+__MSP_LAN.ui_015+'" {{action "alignLayer" "top" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-altop"></span></button><button title="'+__MSP_LAN.ui_016+'" {{action "alignLayer" "mid" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-almid"></span></button><button title="'+__MSP_LAN.ui_017+'" {{action "alignLayer" "bot" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-albot"></span></button><div class="msp-btn-space"></div><button title="'+__MSP_LAN.ui_018+'" {{action "alignLayer" "left" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alleft"></span></button><button title="'+__MSP_LAN.ui_019+'" {{action "alignLayer" "center" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alcenter"></span></button><button title="'+__MSP_LAN.ui_020+'" {{action "alignLayer" "right" target=view.target}} class="msp-align-btn"><span class="msp-ico msp-ico-alright"></span></button>')}),MSPanel.PositionOrigin=Ember.View.extend({classNames:["msp-origin-control"],layer:null,selectedNode:null,template:Ember.Handlebars.compile('<table><tbody><tr><td title="Top left" class="msp-origin-btn msp-origin-tl" data-origin="tl"></td><td title="Top center" class="msp-origin-btn msp-origin-tc" data-origin="tc"></td><td title="Top right" class="msp-origin-btn msp-origin-tr" data-origin="tr"></td></tr><tr><td title="Middle left" class="msp-origin-btn msp-origin-ml" data-origin="ml"></td><td title="Middle center" class="msp-origin-btn msp-origin-mc" data-origin="mc"></td><td title="Middle right" class="msp-origin-btn msp-origin-mr" data-origin="mr"></td></tr><tr><td title="Bottom left" class="msp-origin-btn msp-origin-bl" data-origin="bl"></td><td title="Bottom center" class="msp-origin-btn msp-origin-bc" data-origin="bc"></td><td title="Bottom right" class="msp-origin-btn msp-origin-br" data-origin="br"></td></tr></tbody></table>'),didInsertElement:function(){var that=this;this.$(".msp-origin-btn").click(function(){Ember.isEmpty(that.get("layer"))||that.set("layer.origin",$(this).data("origin"))}),this.onValueChanged()},onValueChanged:function(){var selectedNode=this.get("selectedNode");if(Ember.isEmpty(selectedNode)||selectedNode.removeClass("msp-origin-btn-selected"),Ember.isEmpty(this.get("layer")))return void this.$().addClass("msp-origin-control-disabled");this.$().removeClass("msp-origin-control-disabled");var value=this.get("layer.origin"),newNode=this.$(".msp-origin-"+value).addClass("msp-origin-btn-selected");this.set("selectedNode",newNode)}.observes("layer","layer.origin")}),MSPanel.ButtonsList=Ember.View.extend({classNames:["msp-buttons-container"],layer:null,template:Ember.Handlebars.compile('{{#each button in controller.buttonClasses}}<div class="msp-button-container" {{action "selectButton" button target=view}}><div class="msp-button-cell"><span {{bind-attr class=":ms-btn button.style button.size button.className"}}>Button</span></div></div>{{/each}}'),didInsertElement:function(){this.onValueChanged()},onValueChanged:function(){var className=this.get("layer.btnClass"),lastSelected=this.get("lastSelected");Ember.isEmpty(className)||(className=className.split(" ").pop(),Ember.isEmpty(lastSelected)||this.$("."+lastSelected).parent().removeClass("active"),this.$("."+className).parent().addClass("active"),this.set("lastSelected",className))}.observes("layer","layer.btnClass"),actions:{selectButton:function(button){this.set("layer.btnClass","ms-btn "+button.get("style")+" "+button.get("size")+" "+button.get("className"))}}}),MSPanel.ActionList=Ember.View.extend({classNames:["msp-action-list"],layer:null,showSlideNum:null,showDuration:null,template:Ember.Handlebars.compile('{{#dropdwon-List value=view.layer.action width=180}}<option value="next">'+(__MSP_LAN.ui_021||"Goto next slide")+'</option><option value="previous">'+(__MSP_LAN.ui_022||"Goto previous slide")+'</option><option value="gotoSlide">'+(__MSP_LAN.ui_025||"Goto slide")+'</option><option value="pause">'+(__MSP_LAN.ui_023||"Pause timer")+'</option><option value="resume">'+(__MSP_LAN.ui_024||"Resume timer")+'</option><option value="scrollToEnd">'+(__MSP_LAN.ui_028||"Scroll to bottom of slider")+'</option><option value="scrollTo">'+(__MSP_LAN.ui_030||"Scroll to an element in page")+'</option>{{/dropdwon-List}}{{#if view.showSlideNum}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_026||"Slide number : ")+' {{number-input value=view.layer.toSlide}}{{/if}}{{#if view.showDuration}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_029||"Scroll animation duration : ")+' {{number-input value=view.layer.scrollDuration}} s{{/if}}{{#if view.showTarget}}<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_029||"Scroll animation duration : ")+' {{number-input value=view.layer.scrollDuration}} s<div class="msp-form-space-med"></div>'+(__MSP_LAN.ui_031||"Target element : ")+" {{input value=view.layer.scrollTarget}}{{/if}}"),onValueChanged:function(){var value=this.get("layer.action");this.set("showSlideNum","gotoSlide"===value),this.set("showDuration","scrollToEnd"===value),this.set("showTarget","scrollTo"===value)}.observes("layer","layer.action").on("init")}),MSPanel.SimpleCodeBlock=Ember.View.extend({classNames:["msp-shortcode-box"],template:Ember.Handlebars.compile('<input type="text" readonly {{bind-attr value=view.value}}>'),width:150,didInsertElement:function(){this.$("input").on("click",function(){$(this).select()}).width(this.get("width"))}}),MSPanel.SettingsView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.SlidesView=Ember.View.extend({didInsertElement:function(){this.set("controller.mainView",this)}}),MSPanel.StageArea=Ember.View.extend({classNames:["msp-stage-area"],template:Ember.Handlebars.compile('{{view MSPanel.Stage}}{{#if noticeMsg}}<div class="msp-stage-msg"><span class="msp-ico msp-ico-notice"></span>{{{noticeMsg}}}</div>{{/if}}')}),MSPanel.Stage=Ember.View.extend({classNames:["msp-slide-stage"],attributeBindings:["style"],template:Ember.Handlebars.compile('<div id="stage-bg" class="msp-stage-bg"></div><div id="overlaybox" {{bind-attr class=":msp-stage-pattern :ms-pattern controller.slide.pattern"}}></div>'),resize:function(){var w=this.get("controller.sliderSettings.width"),h=this.get("controller.sliderSettings.height");this.set("width",w),this.set("height",h),this.$().css({width:w,height:h})}.observes("controller.sliderSettings.width","controller.sliderSettings.height","parentView.zoom").on("didInsertElement"),didInsertElement:function(){var BG=this.$("#stage-bg"),BGImage=$("<img/>");BGImage.css("visibelity","hidden").each($.jqLoadFix);var aligner=new MSAligner(this.get("controller.slide.fillMode"),BG,BGImage);this.set("bgAligner",aligner),this.set("bgImg",BGImage),this.onBGChange()},onBGColorChange:function(){var color=this.get("controller.slide.bgColor");Ember.isEmpty(color)?this.$("#stage-bg").css("background-color",""):this.$("#stage-bg").css("background-color",color)}.observes("controller.slide.bgColor").on("didInsertElement"),onColorOverlayChange:function(){var color=this.get("controller.slide.colorOverlay");Ember.isEmpty(color)?this.$("#overlaybox").css("background-color",""):this.$("#overlaybox").css("background-color",color)}.observes("controller.slide.colorOverlay").on("didInsertElement"),onBGChange:function(){var alinger=this.get("bgAligner");alinger&&alinger.reset();var bg=this.get("controller.slide.bg"),bgImg=this.get("bgImg");if(Ember.isEmpty(bg))bgImg.detach();else{var that=this;bgImg.appendTo(this.$("#stage-bg")),bgImg.preloadImg(bg,function(event){that._onBGLoad(event)}),bgImg.attr("src",bg)}}.observes("controller.slide.bg"),_onBGLoad:function(event){var aligner=this.get("bgAligner");aligner&&(aligner.init(event.width,event.height),aligner.align(),this.get("bgImg").css("visibelity",""))},onFillModeChanged:function(){var aligner=this.get("bgAligner");aligner.changeType(this.get("controller.slide.fillMode"))}.observes("controller.slide.fillMode"),willDestroyElement:function(){$(document).off("keydown",this.moveLayer),this.set("bgAligner",null)}}),MSPanel.ControlBtn=Ember.View.extend({control:null,tagName:"div",active:!1,classNames:["msp-control-btn"],classNameBindings:["active:msp-blue-btn"],template:Ember.Handlebars.compile('<span class="msp-control-label">{{view.control.label}}</span><a href="#" {{action "removeControl" target=view bubbles=false}}><span class="msp-control-removes msp-ico msp-ico-whiteremove"></span></a>'),didInsertElement:function(){},onActiveChange:function(){this.set("active",this.get("controller.currentControl")===this.get("control")),this.get("active")&&this.get("controller").send("showControlOptions")}.observes("controller.currentControl").on("init"),click:function(){this.get("active")||this.set("controller.currentControl",this.get("control"))},actions:{removeControl:function(){confirm('Are you sure want to remove "'+this.get("control.label")+'" control?')&&this.get("controller").send("removeControl",this.get("control"))}}}),function($){function WPEditorTemplate(id){var newEditor=$(hiddenEditor);return newEditor.find("link").remove(),newEditor.html().replace(/msp-hidden/g,id)}MSPanel.MetaBoxComponent=Ember.Component.extend({tagName:"div",classNames:["msp-metabox"],layout:Ember.Handlebars.compile('<div class="msp-metabox-handle"><h3 class="msp-metabox-title">{{title}}</h3><div class="msp-metabox-toggle"></div></div>{{yield}}<div class="clear"> </div>')}),Ember.TEMPLATES["components/tabs-panel"]=Ember.Handlebars.compile("{{yield}}"),MSPanel.TabsPanelComponent=Ember.Component.extend({tagName:"div",attributeBindings:["id"],classNames:["msp-metabox msp-metabox-tabs"],didInsertElement:function(){this.$().avertaLiveTabs()}}),MSPanel.SwitchBoxComponent=Ember.Component.extend({classNames:["msp-switchbox"],offlable:"OFF",onlable:"ON",value:!1,layout:Ember.Handlebars.compile('<div class="msp-switch-cont"><span class="msp-switch-off">{{view.offlable}}</span><div class="msp-switch-handle"></div><span class="msp-switch-on">{{view.onlable}}</span></div>'),click:function(){var that=this;that.set("value",!that.get("value"))},update:function(){this.get("value")?this.$().addClass("switched"):this.$().removeClass("switched")}.observes("value").on("didInsertElement")}),MSPanel.AddDynamicTag=Ember.View.extend({classNames:["msp-add-dynamic-tags"],editorId:null,template:Ember.Handlebars.compile('<button {{action "addTag" target=view}} class="msp-add-btn"><span class="msp-ico msp-ico-whiteadd"></span></button><div class="msp-ddlist"></div>'),didInsertElement:function(){for(var select=$("<select></select>").appendTo(this.$(".msp-ddlist")).width(220),i=0,l=MSPanel.dynamicTags.length;i!==l;i++)select.append('<option value="'+MSPanel.dynamicTags[i].tag+'">'+MSPanel.dynamicTags[i].name+"</option>");this.set("select",select)},actions:{addTag:function(){var id=this.get("editorId");tinymce&&$("#wp-"+id+"-wrap").hasClass("tmce-active")?tinymce.get(id).execCommand("insertHTML",!1,this.get("select").val()):$("#"+id).insertAtCaret(this.get("select").val())}}});var hiddenEditor=jQuery("#mspHiddenEditor")[0].outerHTML,__tmc_msp_id=0;MSPanel.WPEditor=Ember.View.extend({classNames:["msp-wp-editor"],_id:null,template:null,tab:null,tabs:null,onInit:function(){var id="msp-wpeditor-"+__tmc_msp_id;this.set("_id",id),this.set("template",Ember.Handlebars.compile(WPEditorTemplate(id))),__tmc_msp_id++}.on("init"),didInsertElement:function(){var tabs=this.get("tabs");return Ember.isEmpty(tabs)?void this.createEditor():void $("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.createEditor()},createEditor:function(){if(this.get("inited")!==!0){this.set("inited",!0);var id=this.get("_id"),that=this;
|
10 |
+
if(window.tinymce){var settings=$.extend({},window.tinyMCEPreInit.mceInit["msp-hidden"]||{});settings.forced_root_block="",settings.force_br_newlines=!0,settings.force_p_newlines=!1,settings.wpautop=!1,"3"==tinyMCE.majorVersion?(settings.body_class=settings.elements=id,settings.setup=function(ed){ed.onInit.add(function(){that.initEditor(tinyMCE.getInstanceById(id))})},tinymce.init(settings)):"4"==tinyMCE.majorVersion&&(settings.body_class="content post-type-post post-status-auto-draft post-format-standard",settings.selector="#"+id,settings.setup=function(ed){ed.on("init",function(){that.initEditor(tinyMCE.get(id))})},tinymce.init(settings))}var qtags,qtagSettings=$.extend({},window.tinyMCEPreInit.qtInit["msp-hidden"]||{});qtagSettings.id=id,"function"==typeof QTags&&(qtags=quicktags(qtagSettings),QTags.buttonsInitDone=!1,QTags._buttonsInit(),that.set("qtags",qtags),window.tinymce?switchEditors.go(id,"html"):this.onValueChanged(),this.$("textarea#"+this.get("_id")).on("change keyup paste",function(){that.set("value",$(this).val())}))}},initEditor:function(mce){function internalUpdate(){that.set("internalChange",!0),that.set("value",mce.getContent()),that.set("internalChange",!1)}var id=this.get("_id"),that=(this.get("value"),this);this.$(".wp-editor-wrap").on("mousedown",function(){wpActiveEditor=id}),"3"==tinyMCE.majorVersion?(mce.onChange.add(internalUpdate),mce.onKeyUp.add(internalUpdate)):"4"==tinyMCE.majorVersion&&(mce.on("change",internalUpdate),mce.on("keyup",internalUpdate)),this.$().click(internalUpdate),setTimeout(function(){switchEditors.go(id,"html"),switchEditors.go(id,"tmce")},100),this.set("mce",mce),this.onValueChanged()},onValueChanged:function(){if(this.get("inited")){var value=this.get("value");if(this.$("textarea#"+this.get("_id")).val(value),this.get("internalChange"))return void this.set("internalChange",!1);if(window.tinymce){var mce=this.get("mce");Ember.isEmpty(mce)||null==value?null==value&&mce.setContent(" "):mce.setContent(value)}}}.observes("value"),willDestroyElement:function(){if(this.get("inited")){window.tinymce&&tinymce.remove(this.get("_id"));var qtags=this.get("qtags");qtags&&($(qtags.toolbar).remove(),qtags.toolbar=null,qtags=null,QTags.instances[this.get("_id")]&&delete QTags.instances[this.get("_id")],this.$("textarea#"+this.get("_id")).remove());var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor)}}}),jQuery.ui&&jQuery.ui.spinner&&(jQuery.ui.spinner.prototype._events.mousewheel=function(event,delta){if(delta&&this.element.is(":focus")){if(!this.spinning&&!this._start(event))return!1;this._spin((delta>0?1:-1)*this.options.step,event),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(event)},100),event.preventDefault()}}),MSPanel.NumberInputView=Ember.View.extend({step:1,min:0,tagName:"input",attributeBindings:["type"],lastValue:null,type:"text",didInsertElement:function(){var that=this,input=this.$(),updateValue=function(){var value=input.spinner("value");that.set("internalChange",!0),isNaN(value)||null==value?that.set("value",void 0):that.set("value",parseFloat(value))};input.on("change",updateValue).spinner({step:this.get("step"),numberFormat:"n",min:this.get("min"),max:this.get("max"),spin:updateValue,stop:updateValue}).spinner("value",this.get("value"))},onValueChanged:function(){this.get("internalChange")&&this.set("internalChange",!1),this.$().spinner("value",this.get("value"))}.observes("value")}),Ember.Handlebars.helper("number-input",MSPanel.NumberInputView),MSPanel.ColorPickerComponent=Ember.Component.extend({tagName:"input",classNames:"msp-color-picker",value:null,didInsertElement:function(){var that=this;this.$().spectrum({color:this.get("value"),allowEmpty:!0,showInput:!0,showAlpha:!0,clickoutFiresChange:!0,preferredFormat:"hex6",change:function(color){null===color?that.set("value",null):that.set("value",color.toString())}})},willDestroyElement:function(){this.$().spectrum("destroy")},onValueChanged:function(){this.$().spectrum("set",this.get("value"))}.observes("value")}),MSPanel.DropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist"],layout:Ember.Handlebars.compile("<select>{{yield}}</select>"),value:null,width:100,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");that.set("value",option.attr("value"))}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.MultiDropdwonListComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-ddlist-multiselect"],layout:Ember.Handlebars.compile("<select {{bind-attr size=view.size}} multiple>{{yield}}</select>"),value:null,width:100,size:7,didInsertElement:function(){var that=this;this.$("select").on("change",function(){that.set("value",$(this).val())}).width(this.get("width")),this.onValueChanged()},onValueChanged:function(){Ember.isEmpty(this.get("value"))||this.$("select").val(this.get("value"))}.observes("value")}),MSPanel.GoogleFontsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select"],defaultTemplate:Ember.Handlebars.compile('<select><option value="--" selected>Loading fonts..</option></select>'),value:null,variants:null,width:210,didInsertElement:function(){var that=this;GFonts.getList(function(){that.$("select").html('<option value="--" selected>-- select --</option>'+GFonts.generateSelectList()),that.onValueChanged(),that.$("select").trigger("change")}),this.$("select").on("change",function(){var option=that.$("select option:selected");"--"===option.val()?(that.set("value",void 0),that.set("variants",void 0)):(that.set("value",option.attr("value")),that.set("variants",option.attr("data-variants")))}).width(this.get("width")),that.onValueChanged()},onValueChanged:function(){this.$("select").val(Ember.isEmpty(this.get("value"))?"--":this.get("value"))}.observes("value")}),MSPanel.GoogleFontWeightsComponent=Ember.Component.extend({tagName:"div",classNames:["msp-ddlist","msp-gfonts-select msp-gfonts-weight"],defaultTemplate:Ember.Handlebars.compile("<select></select>"),variants:null,value:null,width:120,didInsertElement:function(){var that=this;this.$("select").on("change",function(){var option=that.$("select option:selected");return 0===option.length?void that.$("select").val("normal"):void("--"===option.val()?that.set("value",null):that.set("value",option.attr("value")))}).width(this.get("width")),that.updateVariants()},updateVariants:function(){var variants=this.get("variants");if(Ember.isEmpty(variants))this.$("select").html("<option>Select font</option>");else{var options="",value=this.get("value");variants=variants.split(",");for(var i=0,l=variants.length;i!==l;i++)-1===variants[i].indexOf("italic")&&(options+="regular"===variants[i]?'<option value="normal"'+("normal"===value?"selected":"")+">Normal</option>":'<option value="'+variants[i]+'"'+(value===variants[i]?"selected":"")+">"+variants[i]+"</option>");this.$("select").html(options).trigger("change")}}.observes("variants")}),MSPanel.CodeMirrorComponent=Ember.Component.extend({classNames:["msp-codemirror"],width:250,height:200,mode:"css",tab:null,tabs:null,layout:Ember.Handlebars.compile("<textarea>{{yield}}</textarea>"),didInsertElement:function(){this.$().width(this.get("width")).height(this.get("height"));var that=this,editor=CodeMirror.fromTextArea(this.$(">textarea")[0],{lineNumbers:!0,mode:this.get("mode")});editor.on("change",function(){that.set("internalChange",!0),that.set("value",editor.getValue())}),this.set("editor",editor);var value=this.get("value");Ember.isEmpty(value)||editor.setValue(value);var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).bind("avtTabChange",{that:this},this.refreshEditor)},onValueChanged:function(){return this.get("internalChange")===!0?void this.set("internalChange",!1):(this.get("editor").setValue(this.get("value")),void this.set("internalChange",!1))}.observes("value"),refreshEditor:function(event,tab){var that=event.data.that;that.get("tab")===tab&&that.get("editor").refresh()},willDestroyElement:function(){var tabs=this.get("tabs");Ember.isEmpty(tabs)||$("#"+tabs).unbind("avtTabChange",this.refreshEditor);var editor=this.get("editor");editor.toTextArea(),editor=null,this.set("editor",null)}});for(var patterns='<div class="msp-pattern-prev ms-pattern"></div>',i=1;30>=i;i++)patterns+='<div class="msp-pattern-prev ms-pattern ms-patt-'+i+'" data-pattern="ms-patt-'+i+'" style="'+(i>15?"background-color:black;":"")+'"></div>';MSPanel.PatternPickerComponent=Ember.Component.extend({tagName:"div",classNames:["msp-pattern-picker"],value:null,patternBoxIsOpen:!1,layout:Ember.Handlebars.compile('<div class="msp-pattern-control sp-replacer sp-light"><div {{bind-attr class=":ms-pattern-preview :ms-pattern view.value"}}></div><div class="sp-dd">▼</div></div><div class="msp-patterns-box">'+patterns+"</div>"),didInsertElement:function(){this.$(".msp-pattern-control").on("click",{that:this},this.togglePatternbox),$(document).on("click",{that:this},this.closePatternbox),this.$(".msp-patterns-box").css("display","none").on("click",function(e){e.stopPropagation()}).find(".ms-pattern").on("click",{that:this},this.selectPattern)},togglePatternbox:function(e){var that=e.data.that;e.stopPropagation(),that.get("patternBoxIsOpen")&&that.closePatternbox(e),that.$(".msp-patterns-box").css("display",""),that.set("patternBoxIsOpen",!0)},closePatternbox:function(e){var that=e.data.that;that.get("patternBoxIsOpen")&&(that.$(".msp-patterns-box").css("display","none"),that.set("patternBoxIsOpen",!1))},selectPattern:function(e){e.stopPropagation();var that=e.data.that;that.set("value",$(this).data("pattern"))},willDestroyElement:function(){this.$(".msp-patterns-box").off("click",this.togglePatternbox).find(".ms-pattern").off("click"),$(document).off("click",this.closePatternbox)}})}(jQuery),MSPanel.pushData=null,MSPanel.ApplicationController=Ember.Controller.extend({isFlickr:"flickr"===__MSP_TYPE,isFacebook:"facebook"===__MSP_TYPE,isPost:"post"===__MSP_TYPE,isWcproduct:"wc-product"===__MSP_TYPE,sliderId:MSPanel.SliderID,isSending:!1,statusMsg:"",hasError:!1,onInit:function(){window.$||(window.$=jQuery.noConflict()),MSPanel.Settings.find(),MSPanel.Slide.find(),MSPanel.Layer.find(),MSPanel.Style.find(),MSPanel.Effect.find(),MSPanel.PresetStyle.find(),MSPanel.PresetEffect.find(),MSPanel.Control.find(),MSPanel.Callback.find(),MSPanel.ButtonStyle.find(),this.set("disableControls",MSPanel.Settings.find(0).get("disableControls"));var that=this;MSPanel.pushData=function(){that.prepareData()},MSPanel.createButton=this.createButton,"wc-product"===__MSP_TYPE&&null==__MSP_POST&&null!=__WC_INSTALL_URL&&(this.set("hasError",!0),this.set("errorTemplate","wooc-error"),this.set("wooLink",__WC_INSTALL_URL)),this.generateButtonStyles(),this.set("shortCode",'[masterslider id="'+this.get("sliderId")+'"]'),this.set("phpFunction","<?php masterslider("+this.get("sliderId")+"); ?>"),jQuery("#panelLoading").remove(),window._msp_init_timeout&&clearTimeout(window._msp_init_timeout),$(window).scroll(function(){$(window).scrollTop()+$(window).height()>=$(document).height()-45?($("#saveBar").removeClass("msp-sticky-bar"),$("#saveBarPlaceHolder").css("display","none")):($("#saveBar").addClass("msp-sticky-bar"),$("#saveBarPlaceHolder").css("display",""))}).trigger("scroll"),$("#timeAgo").timeago(),setInterval($.proxy(this.updateSavedTime,this),3e4)}.on("init"),prepareData:function(){var fonts={},font_str="";MSPanel.Style.find().forEach(function(record){var font=record.get("fontFamily"),weight=record.get("fontWeight");Ember.isEmpty(font)||(fonts[font]||(fonts[font]=[]),"normal"===weight&&(weight="regular"),Ember.isEmpty(weight)||-1!==fonts[font].indexOf(weight)||fonts[font].push(weight))});for(var font in fonts)font_str+=font.replace(/\s/,"+")+":"+fonts[font].join(",")+"|";MSPanel.Settings.find(1).set("usedFonts",font_str.slice(0,-1)),this.saveRecords(MSPanel.Settings.find()),this.saveRecords(MSPanel.Slide.find()),this.saveRecords(MSPanel.Layer.find()),this.saveRecords(MSPanel.Style.find()),this.saveRecords(MSPanel.Effect.find()),this.saveRecords(MSPanel.PresetStyle.find()),this.saveRecords(MSPanel.PresetEffect.find()),this.saveRecords(MSPanel.Control.find()),this.saveRecords(MSPanel.Callback.find()),this.saveRecords(MSPanel.ButtonStyle.find())},generateButtonStyles:function(){var styles=MSPanel.ButtonStyle.find(),css="",$styleElement=$("#msp-buttons");styles.forEach(function(style){css+="."+style.get("className")+" {"+style.get("normal")+"}\n."+style.get("className")+":hover {"+style.get("hover")+"}\n."+style.get("className")+":active {"+style.get("active")+"}\n"}),0===$styleElement.length?$styleElement=$('<style id="msp-buttons"></style>').text(css).appendTo($("head")):$styleElement.text(css)},actions:{saveAll:function(){this.prepareData(),this.sendData()},showPreview:function(event){window.lunchMastersliderPreview&&lunchMastersliderPreview(event)}},saveRecords:function(records){records.forEach(function(record){record.save()})},sendData:function(){this.set("statusMsg",__MSP_LAN.ap_001),this.set("isSending",!0),this.set("savingStatus","msp-saving");var that=this;jQuery.post(__MS.ajax_url,{action:"msp_panel_handler",nonce:jQuery("#msp-main-wrapper").data("nonce"),msp_data:B64.encode(JSON.stringify(MSPanel.data)),preset_style:B64.encode(JSON.stringify(MSPanel.PSData)),preset_effect:B64.encode(JSON.stringify(MSPanel.PEData)),buttons:B64.encode(JSON.stringify(MSPanel.PBData)),slider_id:MSPanel.SliderID},function(res){that.set("statusMsg",res.message),that.set("isSending",!1),res.success===!0?(that.set("savingStatus","msp-save-succeed"),that.startAutoHideMsg()):that.set("savingStatus","msp-save-error")})},startAutoHideMsg:function(){var timeout=this.get("msgTimeout"),that=this;Ember.isEmpty(timeout)||clearTimeout(timeout),this.set("timeout",setTimeout(function(){that.set("savingStatus","msp-save-hide msp-save-succeed"),$("#timeAgo").attr("title",(new Date).toISOString()),that.updateSavedTime()},2e3))},updateSavedTime:function(){var timeEle=$("#timeAgo");timeEle.attr("title")&&$("#timeAgo").timeago("updateFromDOM")},createButton:function(normal,hover,active,style,size){var newPreset=MSPanel.ButtonStyle.create({normal:normal,hover:hover,active:active,size:size,style:style});newPreset.save(),newPreset.set("className","msp-preset-btn-"+newPreset.get("id")),newPreset.save()}}),MSPanel.SettingsController=Ember.ObjectController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,sliderSkins:__MSP_SKINS,needs:["application","controls"],showAutoHeight:!1,showNearbyNum:!1,showWrapperWidth:!1,preloadMethod:null,setup:function(){var preload=this.get("preload");"all"===preload||"-1"===preload?this.set("preloadMethod",preload):this.set("preloadMethod","nearby"),this.set("draftMSTemplate",this.get("msTemplate"))},sliderLayoutChanged:function(){var layout=this.get("layout");"fullscreen"===layout||"autofill"===layout?(this.set("showAutoHeight",!1),this.set("autoHeight",!1)):this.set("showAutoHeight",!0),this.set("showWrapperWidth","boxed"===layout||"partialview"===layout),this.set("showAutoFillTarget","autofill"===layout),this.set("showMinHeight","fullscreen"!==layout&&"autofill"!==layout&&!this.get("autoHeight")),this.set("showFSMargin","fullscreen"===layout)}.observes("layout","autoHeight").on("setup"),preloadSetup:function(){var preloadMethod=this.get("preloadMethod");if("nearby"===preloadMethod){this.set("showNearbyNum",!0);var preload=this.get("preload");("all"===preload||"-1"===preload)&&this.set("preload","0")}else this.set("showNearbyNum",!1),this.set("preload",preloadMethod)}.observes("preloadMethod").on("setup")}),MSPanel.SlidesController=Ember.ArrayController.extend({customSlider:window.__MSP_TYPE&&"custom"===window.__MSP_TYPE,_order:-1,bgImgSelector:null,sortProperties:["order"],stylesController:null,effectsController:null,buttonsController:null,layersList:[],layersController:null,mainView:null,isFirst:!0,currentSlide:null,setup:function(){if(Ember.isEmpty(this.get("sliderSettings.type"))&&this.set("sliderSettings.type",__MSP_TYPE),this.set("sliderSettings.sliderId",MSPanel.SliderID),0!==this.get("length")){var slide=this.get("firstObject");this.set("currentSlide",slide),this.updateOrder()}},slide:function(){return this.get("currentSlide")}.property("currentSlide"),duplicateSlide:function(slide){var slideProp=slide.toJSON();delete slideProp.id;var newSlide=MSPanel.Slide.create(slideProp);newSlide.set("order",slide.get("order")+1),this.forEach(function(_slide){var slide_order=_slide.get("order"),nslide_order=newSlide.get("order");slide_order>=nslide_order&&_slide!==newSlide&&_slide.set("order",slide_order+1)}),newSlide.save(),this.updateOrder()},updateSlidesSort:function(indexes){this.beginPropertyChanges(),this.forEach(function(slide){slide.set("order",indexes[slide.get("id")])},this),this.endPropertyChanges(),this.set("_order",this.get("lastObject.order"))},updateOrder:function(){var i=0;this.forEach(function(slide){slide.set("order",i++)}),this.set("_order",i-1)},removeSlide:function(slide){slide.deleteRecord(),0!==this.get("length")&&(this.send("select",this.get("firstObject")),this.updateOrder())},onImageSelect:function(){var uploaderFrame=this.get("uploaderFrame"),selection=uploaderFrame.state().get("selection"),self=this;selection.map(function(attachment){attachment=attachment.toJSON(),self.generateSlide(attachment,attachment.url,(attachment.sizes.thumbnail||attachment.sizes.full).url)}),this.send("select",this.get("lastObject"))},generateSlide:function(attachment,bg,thumb){var slide=MSPanel.Slide.create({order:this.get("_order")+1,bg:bg,bgThumb:thumb,bgAlt:attachment.alt});this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},actions:{addSlides:function(){var uploaderFrame=this.get("uploaderFrame");Ember.isEmpty(uploaderFrame)&&(uploaderFrame=wp.media.frames.frame=wp.media({title:__MSP_LAN.slc_001||"Select background image for new slide. (Multiple selection is available)",multiple:!0,frame:"select",library:{type:"image"},button:{text:__MSP_LAN.slc_002||"Create Slide(s)"}}),uploaderFrame.on("select",$.proxy(this.onImageSelect,this)),this.set("uploaderFrame",uploaderFrame)),uploaderFrame.open()},newSlide:function(){var slide=MSPanel.Slide.create({order:this.get("_order")+1});this.set("currentSlide",slide),this.set("_order",this.get("_order")+1),slide.save(),this.updateOrder()},select:function(slide){slide!==this.get("currentSlide")&&this.set("currentSlide",slide)}}}),MSPanel.ControlsController=Ember.ArrayController.extend({needs:"application",controls:[{used:!1,label:__MSP_LAN.cc_001,value:"arrows"},{used:!1,label:__MSP_LAN.cc_002,value:"timebar"},{used:!1,label:__MSP_LAN.cc_003,value:"bullets"},{used:!1,label:__MSP_LAN.cc_004,value:"circletimer"},{used:!1,label:__MSP_LAN.cc_005,value:"scrollbar"},{used:!1,label:__MSP_LAN.cc_006,value:"slideinfo"},{used:!1,label:__MSP_LAN.cc_007,value:"thumblist"}],selectedControl:null,availableControls:[],noMore:!1,currentControl:null,setup:function(){var that=this;this.forEach(function(control){that.findControlObj(control.get("name")).used=!0}),this.set("availableControls",this.findAvailableControls())},onInsertThumb:function(){var ctr=this.get("currentControl");Ember.isEmpty(ctr)||("tabs"===this.get("currentControl.type")?this.set("isTab",!0):this.set("isTab",!1))}.observes("currentControl.type").on("didInsertElement"),actions:{addControl:function(){var control,controlName=this.get("selectedControl"),controlObj=this.findControlObj(controlName);control=MSPanel.Control.create(this.getDefaultValues(controlName)),control.set("label",controlObj.label),controlObj.used=!0,this.set("availableControls",this.findAvailableControls()),control.save(),this.set("currentControl",control)},removeControl:function(control){this.findControlObj(control.get("name")).used=!1,this.set("availableControls",this.findAvailableControls()),control.deleteRecord(),this.set("currentControl",this.get("firstObject")),this.send("showControlOptions")},showControlOptions:function(){var currentControl=this.get("currentControl");Ember.isEmpty(currentControl)?this.set("controlOptions","empty-template"):this.set("controlOptions",currentControl.get("name")+"-options")}},findControlObj:function(control){for(var controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)if(controls[i].value===control)return controls[i];return null},findAvailableControls:function(){for(var avc=[],controls=this.get("controls"),i=0,l=controls.length;i!==l;i++)controls[i].used||avc.push(controls[i]);return this.set("noMore",0===avc.length),this.set("selectedControl",avc[0]?avc[0].value:null),avc},getDefaultValues:function(control){var values={name:control};switch(values.inset=!("slideinfo"===control||"thumblist"===control),control){case"timebar":values.align="bottom",values.color="#FFFFFF",values.autoHide=!1,values.width=4;break;case"bullets":values.align="bottom",values.dir="h",values.margin=10,values.space=6;break;case"circletimer":values.color="#A2A2A2",values.stroke=10,values.radius=4,values.autoHide=!1;break;case"scrollbar":values.align="top",values.dir="h",values.color="#3D3D3D",values.margin=10,values.autoHide=!1,values.width=4;break;case"slideinfo":values.align="bottom",values.margin=10,values.autoHide=!1;break;case"thumblist":values.align="bottom",values.space=5,values.width=100,values.height=80,values.margin=10,values.fillMode="fill",values.autoHide=!1}return values}}),MSPanel.CallbacksController=Ember.ArrayController.extend({callbacks:[{used:!1,label:__MSP_LAN.cb_011,value:"INIT"},{used:!1,label:__MSP_LAN.cb_001,value:"CHANGE_START"},{used:!1,label:__MSP_LAN.cb_002,value:"CHANGE_END"},{used:!1,label:__MSP_LAN.cb_003,value:"WAITING"},{used:!1,label:__MSP_LAN.cb_004,value:"RESIZE"},{used:!1,label:__MSP_LAN.cb_005,value:"VIDEO_PLAY"},{used:!1,label:__MSP_LAN.cb_006,value:"VIDEO_CLOSE"},{used:!1,label:__MSP_LAN.cb_007,value:"SWIPE_START"},{used:!1,label:__MSP_LAN.cb_008,value:"SWIPE_MOVE"},{used:!1,label:__MSP_LAN.cb_009,value:"SWIPE_END"}],availableCallbacks:[],noMore:!1,selectedCallback:null,setup:function(){var that=this;this.forEach(function(callback){that.findCallbackObj(callback.get("name")).used=!0}),this.set("availableCallbacks",this.findAvailableCallbacks())},actions:{addCallback:function(){var callback,callbackName=this.get("selectedCallback"),callbackObj=this.findCallbackObj(callbackName);callback=MSPanel.Callback.create({name:callbackObj.value,label:callbackObj.label}),callbackObj.used=!0,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.save()},removeCallback:function(callback){confirm(__MSP_LAN.cb_010.jfmt(callback.get("label")))&&(this.findCallbackObj(callback.get("name")).used=!1,this.set("availableCallbacks",this.findAvailableCallbacks()),callback.deleteRecord())}},findCallbackObj:function(callback){for(var callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)if(callbacks[i].value===callback)return callbacks[i];return null},findAvailableCallbacks:function(){for(var avc=[],callbacks=this.get("callbacks"),i=0,l=callbacks.length;i!==l;i++)callbacks[i].used||avc.push(callbacks[i]);return this.set("noMore",0===avc.length),this.set("selectedCallback",avc[0]?avc[0].value:null),avc}});
|
admin/views/slider-panel/js/msp.required.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Panel - Required JS Modules
|
3 |
-
* @date
|
4 |
*/
|
5 |
/*!
|
6 |
* @overview Averta JavaScript Libraries
|
@@ -20,7 +20,22 @@ var rebased=[];linkedDocs(doc,function(doc,sharedHist){sharedHist||-1!=indexOf(r
|
|
20 |
}}function buildTokenSplitSpaces(inner){function split(old){for(var out=" ",i=0;i<old.length-2;++i)out+=i%2?" ":" ";return out+=" "}return function(builder,text,style,startStyle,endStyle,title){inner(builder,text.replace(/ {3,}/g,split),style,startStyle,endStyle,title)}}function buildTokenBadBidi(inner,order){return function(builder,text,style,startStyle,endStyle,title){style=style?style+" cm-force-border":"cm-force-border";for(var start=builder.pos,end=start+text.length;;){for(var i=0;i<order.length;i++){var part=order[i];if(part.to>start&&part.from<=start)break}if(part.to>=end)return inner(builder,text,style,startStyle,endStyle,title);inner(builder,text.slice(0,part.to-start),style,startStyle,null,title),startStyle=null,text=text.slice(part.to-start),start=part.to}}}function buildCollapsedSpan(builder,size,marker,ignoreWidget){var widget=!ignoreWidget&&marker.widgetNode;widget&&(builder.map.push(builder.pos,builder.pos+size,widget),builder.content.appendChild(widget)),builder.pos+=size}function insertLineContent(line,builder,styles){var spans=line.markedSpans,allText=line.text,at=0;if(spans)for(var style,spanStyle,spanEndStyle,spanStartStyle,title,collapsed,len=allText.length,pos=0,i=1,text="",nextChange=0;;){if(nextChange==pos){spanStyle=spanEndStyle=spanStartStyle=title="",collapsed=null,nextChange=1/0;for(var foundBookmarks=[],j=0;j<spans.length;++j){var sp=spans[j],m=sp.marker;sp.from<=pos&&(null==sp.to||sp.to>pos)?(null!=sp.to&&nextChange>sp.to&&(nextChange=sp.to,spanEndStyle=""),m.className&&(spanStyle+=" "+m.className),m.startStyle&&sp.from==pos&&(spanStartStyle+=" "+m.startStyle),m.endStyle&&sp.to==nextChange&&(spanEndStyle+=" "+m.endStyle),m.title&&!title&&(title=m.title),m.collapsed&&(!collapsed||compareCollapsedMarkers(collapsed.marker,m)<0)&&(collapsed=sp)):sp.from>pos&&nextChange>sp.from&&(nextChange=sp.from),"bookmark"==m.type&&sp.from==pos&&m.widgetNode&&foundBookmarks.push(m)}if(collapsed&&(collapsed.from||0)==pos&&(buildCollapsedSpan(builder,(null==collapsed.to?len+1:collapsed.to)-pos,collapsed.marker,null==collapsed.from),null==collapsed.to))return;if(!collapsed&&foundBookmarks.length)for(var j=0;j<foundBookmarks.length;++j)buildCollapsedSpan(builder,0,foundBookmarks[j])}if(pos>=len)break;for(var upto=Math.min(len,nextChange);;){if(text){var end=pos+text.length;if(!collapsed){var tokenText=end>upto?text.slice(0,upto-pos):text;builder.addToken(builder,tokenText,style?style+spanStyle:spanStyle,spanStartStyle,pos+tokenText.length==nextChange?spanEndStyle:"",title)}if(end>=upto){text=text.slice(upto-pos),pos=upto;break}pos=end,spanStartStyle=""}text=allText.slice(at,at=styles[i++]),style=interpretTokenStyle(styles[i++],builder.cm.options)}}else for(var i=1;i<styles.length;i+=2)builder.addToken(builder,allText.slice(at,at=styles[i]),interpretTokenStyle(styles[i+1],builder.cm.options))}function isWholeLineUpdate(doc,change){return 0==change.from.ch&&0==change.to.ch&&""==lst(change.text)&&(!doc.cm||doc.cm.options.wholeLineUpdateBefore)}function updateDoc(doc,change,markedSpans,estimateHeight){function spansFor(n){return markedSpans?markedSpans[n]:null}function update(line,text,spans){updateLine(line,text,spans,estimateHeight),signalLater(line,"change",line,change)}var from=change.from,to=change.to,text=change.text,firstLine=getLine(doc,from.line),lastLine=getLine(doc,to.line),lastText=lst(text),lastSpans=spansFor(text.length-1),nlines=to.line-from.line;if(isWholeLineUpdate(doc,change)){for(var i=0,added=[];i<text.length-1;++i)added.push(new Line(text[i],spansFor(i),estimateHeight));update(lastLine,lastLine.text,lastSpans),nlines&&doc.remove(from.line,nlines),added.length&&doc.insert(from.line,added)}else if(firstLine==lastLine)if(1==text.length)update(firstLine,firstLine.text.slice(0,from.ch)+lastText+firstLine.text.slice(to.ch),lastSpans);else{for(var added=[],i=1;i<text.length-1;++i)added.push(new Line(text[i],spansFor(i),estimateHeight));added.push(new Line(lastText+firstLine.text.slice(to.ch),lastSpans,estimateHeight)),update(firstLine,firstLine.text.slice(0,from.ch)+text[0],spansFor(0)),doc.insert(from.line+1,added)}else if(1==text.length)update(firstLine,firstLine.text.slice(0,from.ch)+text[0]+lastLine.text.slice(to.ch),spansFor(0)),doc.remove(from.line+1,nlines);else{update(firstLine,firstLine.text.slice(0,from.ch)+text[0],spansFor(0)),update(lastLine,lastText+lastLine.text.slice(to.ch),lastSpans);for(var i=1,added=[];i<text.length-1;++i)added.push(new Line(text[i],spansFor(i),estimateHeight));nlines>1&&doc.remove(from.line+1,nlines-1),doc.insert(from.line+1,added)}signalLater(doc,"change",doc,change)}function LeafChunk(lines){this.lines=lines,this.parent=null;for(var i=0,height=0;i<lines.length;++i)lines[i].parent=this,height+=lines[i].height;this.height=height}function BranchChunk(children){this.children=children;for(var size=0,height=0,i=0;i<children.length;++i){var ch=children[i];size+=ch.chunkSize(),height+=ch.height,ch.parent=this}this.size=size,this.height=height,this.parent=null}function linkedDocs(doc,f,sharedHistOnly){function propagate(doc,skip,sharedHist){if(doc.linked)for(var i=0;i<doc.linked.length;++i){var rel=doc.linked[i];if(rel.doc!=skip){var shared=sharedHist&&rel.sharedHist;(!sharedHistOnly||shared)&&(f(rel.doc,shared),propagate(rel.doc,doc,shared))}}}propagate(doc,null,!0)}function attachDoc(cm,doc){if(doc.cm)throw new Error("This document is already in use.");cm.doc=doc,doc.cm=cm,estimateLineHeights(cm),loadMode(cm),cm.options.lineWrapping||findMaxLine(cm),cm.options.mode=doc.modeOption,regChange(cm)}function getLine(doc,n){if(n-=doc.first,0>n||n>=doc.size)throw new Error("There is no line "+(n+doc.first)+" in the document.");for(var chunk=doc;!chunk.lines;)for(var i=0;;++i){var child=chunk.children[i],sz=child.chunkSize();if(sz>n){chunk=child;break}n-=sz}return chunk.lines[n]}function getBetween(doc,start,end){var out=[],n=start.line;return doc.iter(start.line,end.line+1,function(line){var text=line.text;n==end.line&&(text=text.slice(0,end.ch)),n==start.line&&(text=text.slice(start.ch)),out.push(text),++n}),out}function getLines(doc,from,to){var out=[];return doc.iter(from,to,function(line){out.push(line.text)}),out}function updateLineHeight(line,height){var diff=height-line.height;if(diff)for(var n=line;n;n=n.parent)n.height+=diff}function lineNo(line){if(null==line.parent)return null;for(var cur=line.parent,no=indexOf(cur.lines,line),chunk=cur.parent;chunk;cur=chunk,chunk=chunk.parent)for(var i=0;chunk.children[i]!=cur;++i)no+=chunk.children[i].chunkSize();return no+cur.first}function lineAtHeight(chunk,h){var n=chunk.first;outer:do{for(var i=0;i<chunk.children.length;++i){var child=chunk.children[i],ch=child.height;if(ch>h){chunk=child;continue outer}h-=ch,n+=child.chunkSize()}return n}while(!chunk.lines);for(var i=0;i<chunk.lines.length;++i){var line=chunk.lines[i],lh=line.height;if(lh>h)break;h-=lh}return n+i}function heightAtLine(lineObj){lineObj=visualLine(lineObj);for(var h=0,chunk=lineObj.parent,i=0;i<chunk.lines.length;++i){var line=chunk.lines[i];if(line==lineObj)break;h+=line.height}for(var p=chunk.parent;p;chunk=p,p=chunk.parent)for(var i=0;i<p.children.length;++i){var cur=p.children[i];if(cur==chunk)break;h+=cur.height}return h}function getOrder(line){var order=line.order;return null==order&&(order=line.order=bidiOrdering(line.text)),order}function History(startGen){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=startGen||1}function historyChangeFromChange(doc,change){var histChange={from:copyPos(change.from),to:changeEnd(change),text:getBetween(doc,change.from,change.to)};return attachLocalSpans(doc,histChange,change.from.line,change.to.line+1),linkedDocs(doc,function(doc){attachLocalSpans(doc,histChange,change.from.line,change.to.line+1)},!0),histChange}function clearSelectionEvents(array){for(;array.length;){var last=lst(array);if(!last.ranges)break;array.pop()}}function lastChangeEvent(hist,force){return force?(clearSelectionEvents(hist.done),lst(hist.done)):hist.done.length&&!lst(hist.done).ranges?lst(hist.done):hist.done.length>1&&!hist.done[hist.done.length-2].ranges?(hist.done.pop(),lst(hist.done)):void 0}function addChangeToHistory(doc,change,selAfter,opId){var hist=doc.history;hist.undone.length=0;var cur,time=+new Date;if((hist.lastOp==opId||hist.lastOrigin==change.origin&&change.origin&&("+"==change.origin.charAt(0)&&doc.cm&&hist.lastModTime>time-doc.cm.options.historyEventDelay||"*"==change.origin.charAt(0)))&&(cur=lastChangeEvent(hist,hist.lastOp==opId))){var last=lst(cur.changes);0==cmp(change.from,change.to)&&0==cmp(change.from,last.to)?last.to=changeEnd(change):cur.changes.push(historyChangeFromChange(doc,change))}else{var before=lst(hist.done);for(before&&before.ranges||pushSelectionToHistory(doc.sel,hist.done),cur={changes:[historyChangeFromChange(doc,change)],generation:hist.generation},hist.done.push(cur);hist.done.length>hist.undoDepth;)hist.done.shift(),hist.done[0].ranges||hist.done.shift()}hist.done.push(selAfter),hist.generation=++hist.maxGeneration,hist.lastModTime=hist.lastSelTime=time,hist.lastOp=hist.lastSelOp=opId,hist.lastOrigin=hist.lastSelOrigin=change.origin,last||signal(doc,"historyAdded")}function selectionEventCanBeMerged(doc,origin,prev,sel){var ch=origin.charAt(0);return"*"==ch||"+"==ch&&prev.ranges.length==sel.ranges.length&&prev.somethingSelected()==sel.somethingSelected()&&new Date-doc.history.lastSelTime<=(doc.cm?doc.cm.options.historyEventDelay:500)}function addSelectionToHistory(doc,sel,opId,options){var hist=doc.history,origin=options&&options.origin;opId==hist.lastSelOp||origin&&hist.lastSelOrigin==origin&&(hist.lastModTime==hist.lastSelTime&&hist.lastOrigin==origin||selectionEventCanBeMerged(doc,origin,lst(hist.done),sel))?hist.done[hist.done.length-1]=sel:pushSelectionToHistory(sel,hist.done),hist.lastSelTime=+new Date,hist.lastSelOrigin=origin,hist.lastSelOp=opId,options&&options.clearRedo!==!1&&clearSelectionEvents(hist.undone)}function pushSelectionToHistory(sel,dest){var top=lst(dest);top&&top.ranges&&top.equals(sel)||dest.push(sel)}function attachLocalSpans(doc,change,from,to){var existing=change["spans_"+doc.id],n=0;doc.iter(Math.max(doc.first,from),Math.min(doc.first+doc.size,to),function(line){line.markedSpans&&((existing||(existing=change["spans_"+doc.id]={}))[n]=line.markedSpans),++n})}function removeClearedSpans(spans){if(!spans)return null;for(var out,i=0;i<spans.length;++i)spans[i].marker.explicitlyCleared?out||(out=spans.slice(0,i)):out&&out.push(spans[i]);return out?out.length?out:null:spans}function getOldSpans(doc,change){var found=change["spans_"+doc.id];if(!found)return null;for(var i=0,nw=[];i<change.text.length;++i)nw.push(removeClearedSpans(found[i]));return nw}function copyHistoryArray(events,newGroup,instantiateSel){for(var i=0,copy=[];i<events.length;++i){var event=events[i];if(event.ranges)copy.push(instantiateSel?Selection.prototype.deepCopy.call(event):event);else{var changes=event.changes,newChanges=[];copy.push({changes:newChanges});for(var j=0;j<changes.length;++j){var m,change=changes[j];if(newChanges.push({from:change.from,to:change.to,text:change.text}),newGroup)for(var prop in change)(m=prop.match(/^spans_(\d+)$/))&&indexOf(newGroup,Number(m[1]))>-1&&(lst(newChanges)[prop]=change[prop],delete change[prop])}}}return copy}function rebaseHistSelSingle(pos,from,to,diff){to<pos.line?pos.line+=diff:from<pos.line&&(pos.line=from,pos.ch=0)}function rebaseHistArray(array,from,to,diff){for(var i=0;i<array.length;++i){var sub=array[i],ok=!0;if(sub.ranges){sub.copied||(sub=array[i]=sub.deepCopy(),sub.copied=!0);for(var j=0;j<sub.ranges.length;j++)rebaseHistSelSingle(sub.ranges[j].anchor,from,to,diff),rebaseHistSelSingle(sub.ranges[j].head,from,to,diff)}else{for(var j=0;j<sub.changes.length;++j){var cur=sub.changes[j];if(to<cur.from.line)cur.from=Pos(cur.from.line+diff,cur.from.ch),cur.to=Pos(cur.to.line+diff,cur.to.ch);else if(from<=cur.to.line){ok=!1;break}}ok||(array.splice(0,i+1),i=0)}}}function rebaseHist(hist,change){var from=change.from.line,to=change.to.line,diff=change.text.length-(to-from)-1;rebaseHistArray(hist.done,from,to,diff),rebaseHistArray(hist.undone,from,to,diff)}function e_defaultPrevented(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function e_target(e){return e.target||e.srcElement}function e_button(e){var b=e.which;return null==b&&(1&e.button?b=1:2&e.button?b=3:4&e.button&&(b=2)),mac&&e.ctrlKey&&1==b&&(b=3),b}function signalLater(emitter,type){function bnd(f){return function(){f.apply(null,args)}}var arr=emitter._handlers&&emitter._handlers[type];if(arr){var list,args=Array.prototype.slice.call(arguments,2);operationGroup?list=operationGroup.delayedCallbacks:orphanDelayedCallbacks?list=orphanDelayedCallbacks:(list=orphanDelayedCallbacks=[],setTimeout(fireOrphanDelayed,0));for(var i=0;i<arr.length;++i)list.push(bnd(arr[i]))}}function fireOrphanDelayed(){var delayed=orphanDelayedCallbacks;orphanDelayedCallbacks=null;for(var i=0;i<delayed.length;++i)delayed[i]()}function signalDOMEvent(cm,e,override){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),signal(cm,override||e.type,cm,e),e_defaultPrevented(e)||e.codemirrorIgnore}function signalCursorActivity(cm){var arr=cm._handlers&&cm._handlers.cursorActivity;if(arr)for(var set=cm.curOp.cursorActivityHandlers||(cm.curOp.cursorActivityHandlers=[]),i=0;i<arr.length;++i)-1==indexOf(set,arr[i])&&set.push(arr[i])}function hasHandler(emitter,type){var arr=emitter._handlers&&emitter._handlers[type];return arr&&arr.length>0}function eventMixin(ctor){ctor.prototype.on=function(type,f){on(this,type,f)},ctor.prototype.off=function(type,f){off(this,type,f)}}function Delayed(){this.id=null}function findColumn(string,goal,tabSize){for(var pos=0,col=0;;){var nextTab=string.indexOf(" ",pos);-1==nextTab&&(nextTab=string.length);var skipped=nextTab-pos;if(nextTab==string.length||col+skipped>=goal)return pos+Math.min(skipped,goal-col);if(col+=nextTab-pos,col+=tabSize-col%tabSize,pos=nextTab+1,col>=goal)return pos}}function spaceStr(n){for(;spaceStrs.length<=n;)spaceStrs.push(lst(spaceStrs)+" ");return spaceStrs[n]}function lst(arr){return arr[arr.length-1]}function indexOf(array,elt){for(var i=0;i<array.length;++i)if(array[i]==elt)return i;return-1}function map(array,f){for(var out=[],i=0;i<array.length;i++)out[i]=f(array[i],i);return out}function createObj(base,props){var inst;if(Object.create)inst=Object.create(base);else{var ctor=function(){};ctor.prototype=base,inst=new ctor}return props&©Obj(props,inst),inst}function copyObj(obj,target,overwrite){target||(target={});for(var prop in obj)!obj.hasOwnProperty(prop)||overwrite===!1&&target.hasOwnProperty(prop)||(target[prop]=obj[prop]);return target}function bind(f){var args=Array.prototype.slice.call(arguments,1);return function(){return f.apply(null,args)}}function isWordChar(ch,helper){return helper?helper.source.indexOf("\\w")>-1&&isWordCharBasic(ch)?!0:helper.test(ch):isWordCharBasic(ch)}function isEmpty(obj){for(var n in obj)if(obj.hasOwnProperty(n)&&obj[n])return!1;return!0}function isExtendingChar(ch){return ch.charCodeAt(0)>=768&&extendingChars.test(ch)}function elt(tag,content,className,style){var e=document.createElement(tag);if(className&&(e.className=className),style&&(e.style.cssText=style),"string"==typeof content)e.appendChild(document.createTextNode(content));else if(content)for(var i=0;i<content.length;++i)e.appendChild(content[i]);return e}function removeChildren(e){for(var count=e.childNodes.length;count>0;--count)e.removeChild(e.firstChild);return e}function removeChildrenAndAdd(parent,e){return removeChildren(parent).appendChild(e)}function contains(parent,child){if(parent.contains)return parent.contains(child);for(;child=child.parentNode;)if(child==parent)return!0}function activeElt(){return document.activeElement}function classTest(cls){return new RegExp("(^|\\s)"+cls+"(?:$|\\s)\\s*")}function joinClasses(a,b){for(var as=a.split(" "),i=0;i<as.length;i++)as[i]&&!classTest(as[i]).test(b)&&(b+=" "+as[i]);return b}function forEachCodeMirror(f){if(document.body.getElementsByClassName)for(var byClass=document.body.getElementsByClassName("CodeMirror"),i=0;i<byClass.length;i++){var cm=byClass[i].CodeMirror;cm&&f(cm)}}function ensureGlobalHandlers(){globalsRegistered||(registerGlobalHandlers(),globalsRegistered=!0)}function registerGlobalHandlers(){var resizeTimer;on(window,"resize",function(){null==resizeTimer&&(resizeTimer=setTimeout(function(){resizeTimer=null,knownScrollbarWidth=null,forEachCodeMirror(onResize)},100))}),on(window,"blur",function(){forEachCodeMirror(onBlur)})}function scrollbarWidth(measure){if(null!=knownScrollbarWidth)return knownScrollbarWidth;var test=elt("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return removeChildrenAndAdd(measure,test),test.offsetWidth&&(knownScrollbarWidth=test.offsetHeight-test.clientHeight),knownScrollbarWidth||0}function zeroWidthElement(measure){if(null==zwspSupported){var test=elt("span","");removeChildrenAndAdd(measure,elt("span",[test,document.createTextNode("x")])),0!=measure.firstChild.offsetHeight&&(zwspSupported=test.offsetWidth<=1&&test.offsetHeight>2&&!(ie&&8>ie_version))}return zwspSupported?elt("span",""):elt("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function hasBadBidiRects(measure){if(null!=badBidiRects)return badBidiRects;var txt=removeChildrenAndAdd(measure,document.createTextNode("AخA")),r0=range(txt,0,1).getBoundingClientRect();if(!r0||r0.left==r0.right)return!1;var r1=range(txt,1,2).getBoundingClientRect();return badBidiRects=r1.right-r0.right<3}function hasBadZoomedRects(measure){if(null!=badZoomedRects)return badZoomedRects;var node=removeChildrenAndAdd(measure,elt("span","x")),normal=node.getBoundingClientRect(),fromRange=range(node,0,1).getBoundingClientRect();return badZoomedRects=Math.abs(normal.left-fromRange.left)>1}function iterateBidiSections(order,from,to,f){if(!order)return f(from,to,"ltr");for(var found=!1,i=0;i<order.length;++i){var part=order[i];(part.from<to&&part.to>from||from==to&&part.to==from)&&(f(Math.max(part.from,from),Math.min(part.to,to),1==part.level?"rtl":"ltr"),found=!0)}found||f(from,to,"ltr")}function bidiLeft(part){return part.level%2?part.to:part.from}function bidiRight(part){return part.level%2?part.from:part.to}function lineLeft(line){var order=getOrder(line);return order?bidiLeft(order[0]):0}function lineRight(line){var order=getOrder(line);return order?bidiRight(lst(order)):line.text.length}function lineStart(cm,lineN){var line=getLine(cm.doc,lineN),visual=visualLine(line);visual!=line&&(lineN=lineNo(visual));var order=getOrder(visual),ch=order?order[0].level%2?lineRight(visual):lineLeft(visual):0;return Pos(lineN,ch)}function lineEnd(cm,lineN){for(var merged,line=getLine(cm.doc,lineN);merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line,lineN=null;var order=getOrder(line),ch=order?order[0].level%2?lineLeft(line):lineRight(line):line.text.length;return Pos(null==lineN?lineNo(line):lineN,ch)}function lineStartSmart(cm,pos){var start=lineStart(cm,pos.line),line=getLine(cm.doc,start.line),order=getOrder(line);if(!order||0==order[0].level){var firstNonWS=Math.max(0,line.text.search(/\S/)),inWS=pos.line==start.line&&pos.ch<=firstNonWS&&pos.ch;return Pos(start.line,inWS?0:firstNonWS)}return start}function compareBidiLevel(order,a,b){var linedir=order[0].level;return a==linedir?!0:b==linedir?!1:b>a}function getBidiPartAt(order,pos){bidiOther=null;for(var found,i=0;i<order.length;++i){var cur=order[i];if(cur.from<pos&&cur.to>pos)return i;if(cur.from==pos||cur.to==pos){if(null!=found)return compareBidiLevel(order,cur.level,order[found].level)?(cur.from!=cur.to&&(bidiOther=found),i):(cur.from!=cur.to&&(bidiOther=i),found);found=i}}return found}function moveInLine(line,pos,dir,byUnit){if(!byUnit)return pos+dir;do pos+=dir;while(pos>0&&isExtendingChar(line.text.charAt(pos)));return pos}function moveVisually(line,start,dir,byUnit){var bidi=getOrder(line);if(!bidi)return moveLogically(line,start,dir,byUnit);for(var pos=getBidiPartAt(bidi,start),part=bidi[pos],target=moveInLine(line,start,part.level%2?-dir:dir,byUnit);;){if(target>part.from&&target<part.to)return target;if(target==part.from||target==part.to)return getBidiPartAt(bidi,target)==pos?target:(part=bidi[pos+=dir],dir>0==part.level%2?part.to:part.from);if(part=bidi[pos+=dir],!part)return null;target=dir>0==part.level%2?moveInLine(line,part.to,-1,byUnit):moveInLine(line,part.from,1,byUnit)}}function moveLogically(line,start,dir,byUnit){var target=start+dir;if(byUnit)for(;target>0&&isExtendingChar(line.text.charAt(target));)target+=dir;return 0>target||target>line.text.length?null:target}var gecko=/gecko\/\d/i.test(navigator.userAgent),ie_upto10=/MSIE \d/.test(navigator.userAgent),ie_11up=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ie=ie_upto10||ie_11up,ie_version=ie&&(ie_upto10?document.documentMode||6:ie_11up[1]),webkit=/WebKit\//.test(navigator.userAgent),qtwebkit=webkit&&/Qt\/\d+\.\d+/.test(navigator.userAgent),chrome=/Chrome\//.test(navigator.userAgent),presto=/Opera\//.test(navigator.userAgent),safari=/Apple Computer/.test(navigator.vendor),khtml=/KHTML\//.test(navigator.userAgent),mac_geMountainLion=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),phantom=/PhantomJS/.test(navigator.userAgent),ios=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),mobile=ios||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),mac=ios||/Mac/.test(navigator.platform),windows=/win/i.test(navigator.platform),presto_version=presto&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);presto_version&&(presto_version=Number(presto_version[1])),presto_version&&presto_version>=15&&(presto=!1,webkit=!0);var flipCtrlCmd=mac&&(qtwebkit||presto&&(null==presto_version||12.11>presto_version)),captureRightClick=gecko||ie&&ie_version>=9,sawReadOnlySpans=!1,sawCollapsedSpans=!1,Pos=CodeMirror.Pos=function(line,ch){return this instanceof Pos?(this.line=line,void(this.ch=ch)):new Pos(line,ch)},cmp=CodeMirror.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch};Selection.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(other){if(other==this)return!0;if(other.primIndex!=this.primIndex||other.ranges.length!=this.ranges.length)return!1;for(var i=0;i<this.ranges.length;i++){var here=this.ranges[i],there=other.ranges[i];if(0!=cmp(here.anchor,there.anchor)||0!=cmp(here.head,there.head))return!1}return!0},deepCopy:function(){for(var out=[],i=0;i<this.ranges.length;i++)out[i]=new Range(copyPos(this.ranges[i].anchor),copyPos(this.ranges[i].head));return new Selection(out,this.primIndex)},somethingSelected:function(){for(var i=0;i<this.ranges.length;i++)if(!this.ranges[i].empty())return!0;return!1},contains:function(pos,end){end||(end=pos);for(var i=0;i<this.ranges.length;i++){var range=this.ranges[i];if(cmp(end,range.from())>=0&&cmp(pos,range.to())<=0)return i}return-1}},Range.prototype={from:function(){return minPos(this.anchor,this.head)},to:function(){return maxPos(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var measureText,lastClick,lastDoubleClick,nullRect={left:0,right:0,top:0,bottom:0},operationGroup=null,nextOpId=0,lastCopied=null,lastDrop=0,wheelSamples=0,wheelPixelsPerUnit=null;ie?wheelPixelsPerUnit=-.53:gecko?wheelPixelsPerUnit=15:chrome?wheelPixelsPerUnit=-.7:safari&&(wheelPixelsPerUnit=-1/3);var stopSeq=new Delayed,lastStoppedKey=null,changeEnd=CodeMirror.changeEnd=function(change){return change.text?Pos(change.from.line+change.text.length-1,lst(change.text).length+(1==change.text.length?change.from.ch:0)):change.to};CodeMirror.prototype={constructor:CodeMirror,focus:function(){window.focus(),focusInput(this),fastPoll(this)},setOption:function(option,value){var options=this.options,old=options[option];(options[option]!=value||"mode"==option)&&(options[option]=value,optionHandlers.hasOwnProperty(option)&&operation(this,optionHandlers[option])(this,value,old))},getOption:function(option){return this.options[option]},getDoc:function(){return this.doc},addKeyMap:function(map,bottom){this.state.keyMaps[bottom?"push":"unshift"](getKeyMap(map))},removeKeyMap:function(map){for(var maps=this.state.keyMaps,i=0;i<maps.length;++i)if(maps[i]==map||maps[i].name==map)return maps.splice(i,1),!0},addOverlay:methodOp(function(spec,options){var mode=spec.token?spec:CodeMirror.getMode(this.options,spec);if(mode.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:mode,modeSpec:spec,opaque:options&&options.opaque}),this.state.modeGen++,regChange(this)}),removeOverlay:methodOp(function(spec){for(var overlays=this.state.overlays,i=0;i<overlays.length;++i){var cur=overlays[i].modeSpec;if(cur==spec||"string"==typeof spec&&cur.name==spec)return overlays.splice(i,1),this.state.modeGen++,void regChange(this)}}),indentLine:methodOp(function(n,dir,aggressive){"string"!=typeof dir&&"number"!=typeof dir&&(dir=null==dir?this.options.smartIndent?"smart":"prev":dir?"add":"subtract"),isLine(this.doc,n)&&indentLine(this,n,dir,aggressive)}),indentSelection:methodOp(function(how){for(var ranges=this.doc.sel.ranges,end=-1,i=0;i<ranges.length;i++){var range=ranges[i];if(range.empty())range.head.line>end&&(indentLine(this,range.head.line,how,!0),end=range.head.line,i==this.doc.sel.primIndex&&ensureCursorVisible(this));else{var from=range.from(),to=range.to(),start=Math.max(end,from.line);end=Math.min(this.lastLine(),to.line-(to.ch?0:1))+1;for(var j=start;end>j;++j)indentLine(this,j,how);var newRanges=this.doc.sel.ranges;0==from.ch&&ranges.length==newRanges.length&&newRanges[i].from().ch>0&&replaceOneSelection(this.doc,i,new Range(from,newRanges[i].to()),sel_dontScroll)}}}),getTokenAt:function(pos,precise){return takeToken(this,pos,precise)},getLineTokens:function(line,precise){return takeToken(this,Pos(line),precise,!0)},getTokenTypeAt:function(pos){pos=clipPos(this.doc,pos);var type,styles=getLineStyles(this,getLine(this.doc,pos.line)),before=0,after=(styles.length-1)/2,ch=pos.ch;if(0==ch)type=styles[2];else for(;;){var mid=before+after>>1;if((mid?styles[2*mid-1]:0)>=ch)after=mid;else{if(!(styles[2*mid+1]<ch)){type=styles[2*mid+2];break}before=mid+1}}var cut=type?type.indexOf("cm-overlay "):-1;return 0>cut?type:0==cut?null:type.slice(0,cut-1)},getModeAt:function(pos){var mode=this.doc.mode;return mode.innerMode?CodeMirror.innerMode(mode,this.getTokenAt(pos).state).mode:mode},getHelper:function(pos,type){return this.getHelpers(pos,type)[0]},getHelpers:function(pos,type){var found=[];if(!helpers.hasOwnProperty(type))return helpers;var help=helpers[type],mode=this.getModeAt(pos);if("string"==typeof mode[type])help[mode[type]]&&found.push(help[mode[type]]);else if(mode[type])for(var i=0;i<mode[type].length;i++){var val=help[mode[type][i]];val&&found.push(val)}else mode.helperType&&help[mode.helperType]?found.push(help[mode.helperType]):help[mode.name]&&found.push(help[mode.name]);for(var i=0;i<help._global.length;i++){var cur=help._global[i];cur.pred(mode,this)&&-1==indexOf(found,cur.val)&&found.push(cur.val)}return found},getStateAfter:function(line,precise){var doc=this.doc;return line=clipLine(doc,null==line?doc.first+doc.size-1:line),getStateBefore(this,line+1,precise)},cursorCoords:function(start,mode){var pos,range=this.doc.sel.primary();return pos=null==start?range.head:"object"==typeof start?clipPos(this.doc,start):start?range.from():range.to(),cursorCoords(this,pos,mode||"page")},charCoords:function(pos,mode){return charCoords(this,clipPos(this.doc,pos),mode||"page")},coordsChar:function(coords,mode){return coords=fromCoordSystem(this,coords,mode||"page"),coordsChar(this,coords.left,coords.top)},lineAtHeight:function(height,mode){return height=fromCoordSystem(this,{top:height,left:0},mode||"page").top,lineAtHeight(this.doc,height+this.display.viewOffset)},heightAtLine:function(line,mode){var end=!1,last=this.doc.first+this.doc.size-1;line<this.doc.first?line=this.doc.first:line>last&&(line=last,end=!0);var lineObj=getLine(this.doc,line);return intoCoordSystem(this,lineObj,{top:0,left:0},mode||"page").top+(end?this.doc.height-heightAtLine(lineObj):0)},defaultTextHeight:function(){return textHeight(this.display)},defaultCharWidth:function(){return charWidth(this.display)},setGutterMarker:methodOp(function(line,gutterID,value){return changeLine(this.doc,line,"gutter",function(line){var markers=line.gutterMarkers||(line.gutterMarkers={});return markers[gutterID]=value,!value&&isEmpty(markers)&&(line.gutterMarkers=null),!0})}),clearGutter:methodOp(function(gutterID){var cm=this,doc=cm.doc,i=doc.first;doc.iter(function(line){line.gutterMarkers&&line.gutterMarkers[gutterID]&&(line.gutterMarkers[gutterID]=null,regLineChange(cm,i,"gutter"),isEmpty(line.gutterMarkers)&&(line.gutterMarkers=null)),++i})}),addLineWidget:methodOp(function(handle,node,options){return addLineWidget(this,handle,node,options)}),removeLineWidget:function(widget){widget.clear()},lineInfo:function(line){if("number"==typeof line){if(!isLine(this.doc,line))return null;var n=line;if(line=getLine(this.doc,line),!line)return null}else{var n=lineNo(line);if(null==n)return null}return{line:n,handle:line,text:line.text,gutterMarkers:line.gutterMarkers,textClass:line.textClass,bgClass:line.bgClass,wrapClass:line.wrapClass,widgets:line.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(pos,node,scroll,vert,horiz){var display=this.display;pos=cursorCoords(this,clipPos(this.doc,pos));var top=pos.bottom,left=pos.left;if(node.style.position="absolute",display.sizer.appendChild(node),"over"==vert)top=pos.top;else if("above"==vert||"near"==vert){var vspace=Math.max(display.wrapper.clientHeight,this.doc.height),hspace=Math.max(display.sizer.clientWidth,display.lineSpace.clientWidth);("above"==vert||pos.bottom+node.offsetHeight>vspace)&&pos.top>node.offsetHeight?top=pos.top-node.offsetHeight:pos.bottom+node.offsetHeight<=vspace&&(top=pos.bottom),left+node.offsetWidth>hspace&&(left=hspace-node.offsetWidth)}node.style.top=top+"px",node.style.left=node.style.right="","right"==horiz?(left=display.sizer.clientWidth-node.offsetWidth,node.style.right="0px"):("left"==horiz?left=0:"middle"==horiz&&(left=(display.sizer.clientWidth-node.offsetWidth)/2),node.style.left=left+"px"),scroll&&scrollIntoView(this,left,top,left+node.offsetWidth,top+node.offsetHeight)},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,execCommand:function(cmd){return commands.hasOwnProperty(cmd)?commands[cmd](this):void 0},findPosH:function(from,amount,unit,visually){var dir=1;0>amount&&(dir=-1,amount=-amount);for(var i=0,cur=clipPos(this.doc,from);amount>i&&(cur=findPosH(this.doc,cur,dir,unit,visually),!cur.hitSide);++i);return cur},moveH:methodOp(function(dir,unit){var cm=this;cm.extendSelectionsBy(function(range){return cm.display.shift||cm.doc.extend||range.empty()?findPosH(cm.doc,range.head,dir,unit,cm.options.rtlMoveVisually):0>dir?range.from():range.to()},sel_move)}),deleteH:methodOp(function(dir,unit){var sel=this.doc.sel,doc=this.doc;sel.somethingSelected()?doc.replaceSelection("",null,"+delete"):deleteNearSelection(this,function(range){var other=findPosH(doc,range.head,dir,unit,!1);return 0>dir?{from:other,to:range.head}:{from:range.head,to:other}})}),findPosV:function(from,amount,unit,goalColumn){var dir=1,x=goalColumn;0>amount&&(dir=-1,amount=-amount);for(var i=0,cur=clipPos(this.doc,from);amount>i;++i){var coords=cursorCoords(this,cur,"div");if(null==x?x=coords.left:coords.left=x,cur=findPosV(this,coords,dir,unit),cur.hitSide)break}return cur},moveV:methodOp(function(dir,unit){var cm=this,doc=this.doc,goals=[],collapse=!cm.display.shift&&!doc.extend&&doc.sel.somethingSelected();
|
21 |
if(doc.extendSelectionsBy(function(range){if(collapse)return 0>dir?range.from():range.to();var headPos=cursorCoords(cm,range.head,"div");null!=range.goalColumn&&(headPos.left=range.goalColumn),goals.push(headPos.left);var pos=findPosV(cm,headPos,dir,unit);return"page"==unit&&range==doc.sel.primary()&&addToScrollPos(cm,null,charCoords(cm,pos,"div").top-headPos.top),pos},sel_move),goals.length)for(var i=0;i<doc.sel.ranges.length;i++)doc.sel.ranges[i].goalColumn=goals[i]}),findWordAt:function(pos){var doc=this.doc,line=getLine(doc,pos.line).text,start=pos.ch,end=pos.ch;if(line){var helper=this.getHelper(pos,"wordChars");(pos.xRel<0||end==line.length)&&start?--start:++end;for(var startChar=line.charAt(start),check=isWordChar(startChar,helper)?function(ch){return isWordChar(ch,helper)}:/\s/.test(startChar)?function(ch){return/\s/.test(ch)}:function(ch){return!/\s/.test(ch)&&!isWordChar(ch)};start>0&&check(line.charAt(start-1));)--start;for(;end<line.length&&check(line.charAt(end));)++end}return new Range(Pos(pos.line,start),Pos(pos.line,end))},toggleOverwrite:function(value){(null==value||value!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?addClass(this.display.cursorDiv,"CodeMirror-overwrite"):rmClass(this.display.cursorDiv,"CodeMirror-overwrite"),signal(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return activeElt()==this.display.input},scrollTo:methodOp(function(x,y){(null!=x||null!=y)&&resolveScrollToPos(this),null!=x&&(this.curOp.scrollLeft=x),null!=y&&(this.curOp.scrollTop=y)}),getScrollInfo:function(){var scroller=this.display.scroller,co=scrollerCutOff;return{left:scroller.scrollLeft,top:scroller.scrollTop,height:scroller.scrollHeight-co,width:scroller.scrollWidth-co,clientHeight:scroller.clientHeight-co,clientWidth:scroller.clientWidth-co}},scrollIntoView:methodOp(function(range,margin){if(null==range?(range={from:this.doc.sel.primary().head,to:null},null==margin&&(margin=this.options.cursorScrollMargin)):"number"==typeof range?range={from:Pos(range,0),to:null}:null==range.from&&(range={from:range,to:null}),range.to||(range.to=range.from),range.margin=margin||0,null!=range.from.line)resolveScrollToPos(this),this.curOp.scrollToPos=range;else{var sPos=calculateScrollPos(this,Math.min(range.from.left,range.to.left),Math.min(range.from.top,range.to.top)-range.margin,Math.max(range.from.right,range.to.right),Math.max(range.from.bottom,range.to.bottom)+range.margin);this.scrollTo(sPos.scrollLeft,sPos.scrollTop)}}),setSize:methodOp(function(width,height){function interpret(val){return"number"==typeof val||/^\d+$/.test(String(val))?val+"px":val}var cm=this;null!=width&&(cm.display.wrapper.style.width=interpret(width)),null!=height&&(cm.display.wrapper.style.height=interpret(height)),cm.options.lineWrapping&&clearLineMeasurementCache(this);var lineNo=cm.display.viewFrom;cm.doc.iter(lineNo,cm.display.viewTo,function(line){if(line.widgets)for(var i=0;i<line.widgets.length;i++)if(line.widgets[i].noHScroll){regLineChange(cm,lineNo,"widget");break}++lineNo}),cm.curOp.forceUpdate=!0,signal(cm,"refresh",this)}),operation:function(f){return runInOp(this,f)},refresh:methodOp(function(){var oldHeight=this.display.cachedTextHeight;regChange(this),this.curOp.forceUpdate=!0,clearCaches(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),updateGutterSpace(this),(null==oldHeight||Math.abs(oldHeight-textHeight(this.display))>.5)&&estimateLineHeights(this),signal(this,"refresh",this)}),swapDoc:methodOp(function(doc){var old=this.doc;return old.cm=null,attachDoc(this,doc),clearCaches(this),resetInput(this),this.scrollTo(doc.scrollLeft,doc.scrollTop),this.curOp.forceScroll=!0,signalLater(this,"swapDoc",this,old),old}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},eventMixin(CodeMirror);var defaults=CodeMirror.defaults={},optionHandlers=CodeMirror.optionHandlers={},Init=CodeMirror.Init={toString:function(){return"CodeMirror.Init"}};option("value","",function(cm,val){cm.setValue(val)},!0),option("mode",null,function(cm,val){cm.doc.modeOption=val,loadMode(cm)},!0),option("indentUnit",2,loadMode,!0),option("indentWithTabs",!1),option("smartIndent",!0),option("tabSize",4,function(cm){resetModeState(cm),clearCaches(cm),regChange(cm)},!0),option("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(cm,val){cm.options.specialChars=new RegExp(val.source+(val.test(" ")?"":"| "),"g"),cm.refresh()},!0),option("specialCharPlaceholder",defaultSpecialCharPlaceholder,function(cm){cm.refresh()},!0),option("electricChars",!0),option("rtlMoveVisually",!windows),option("wholeLineUpdateBefore",!0),option("theme","default",function(cm){themeChanged(cm),guttersChanged(cm)},!0),option("keyMap","default",function(cm,val,old){var next=getKeyMap(val),prev=old!=CodeMirror.Init&&getKeyMap(old);prev&&prev.detach&&prev.detach(cm,next),next.attach&&next.attach(cm,prev||null)}),option("extraKeys",null),option("lineWrapping",!1,wrappingChanged,!0),option("gutters",[],function(cm){setGuttersForLineNumbers(cm.options),guttersChanged(cm)},!0),option("fixedGutter",!0,function(cm,val){cm.display.gutters.style.left=val?compensateForHScroll(cm.display)+"px":"0",cm.refresh()},!0),option("coverGutterNextToScrollbar",!1,updateScrollbars,!0),option("lineNumbers",!1,function(cm){setGuttersForLineNumbers(cm.options),guttersChanged(cm)},!0),option("firstLineNumber",1,guttersChanged,!0),option("lineNumberFormatter",function(integer){return integer},guttersChanged,!0),option("showCursorWhenSelecting",!1,updateSelection,!0),option("resetSelectionOnContextMenu",!0),option("readOnly",!1,function(cm,val){"nocursor"==val?(onBlur(cm),cm.display.input.blur(),cm.display.disabled=!0):(cm.display.disabled=!1,val||resetInput(cm))}),option("disableInput",!1,function(cm,val){val||resetInput(cm)},!0),option("dragDrop",!0),option("cursorBlinkRate",530),option("cursorScrollMargin",0),option("cursorHeight",1,updateSelection,!0),option("singleCursorHeightPerLine",!0,updateSelection,!0),option("workTime",100),option("workDelay",100),option("flattenSpans",!0,resetModeState,!0),option("addModeClass",!1,resetModeState,!0),option("pollInterval",100),option("undoDepth",200,function(cm,val){cm.doc.history.undoDepth=val}),option("historyEventDelay",1250),option("viewportMargin",10,function(cm){cm.refresh()},!0),option("maxHighlightLength",1e4,resetModeState,!0),option("moveInputWithCursor",!0,function(cm,val){val||(cm.display.inputDiv.style.top=cm.display.inputDiv.style.left=0)}),option("tabindex",null,function(cm,val){cm.display.input.tabIndex=val||""}),option("autofocus",null);var modes=CodeMirror.modes={},mimeModes=CodeMirror.mimeModes={};CodeMirror.defineMode=function(name,mode){CodeMirror.defaults.mode||"null"==name||(CodeMirror.defaults.mode=name),arguments.length>2&&(mode.dependencies=Array.prototype.slice.call(arguments,2)),modes[name]=mode},CodeMirror.defineMIME=function(mime,spec){mimeModes[mime]=spec},CodeMirror.resolveMode=function(spec){if("string"==typeof spec&&mimeModes.hasOwnProperty(spec))spec=mimeModes[spec];else if(spec&&"string"==typeof spec.name&&mimeModes.hasOwnProperty(spec.name)){var found=mimeModes[spec.name];"string"==typeof found&&(found={name:found}),spec=createObj(found,spec),spec.name=found.name}else if("string"==typeof spec&&/^[\w\-]+\/[\w\-]+\+xml$/.test(spec))return CodeMirror.resolveMode("application/xml");return"string"==typeof spec?{name:spec}:spec||{name:"null"}},CodeMirror.getMode=function(options,spec){var spec=CodeMirror.resolveMode(spec),mfactory=modes[spec.name];if(!mfactory)return CodeMirror.getMode(options,"text/plain");var modeObj=mfactory(options,spec);if(modeExtensions.hasOwnProperty(spec.name)){var exts=modeExtensions[spec.name];for(var prop in exts)exts.hasOwnProperty(prop)&&(modeObj.hasOwnProperty(prop)&&(modeObj["_"+prop]=modeObj[prop]),modeObj[prop]=exts[prop])}if(modeObj.name=spec.name,spec.helperType&&(modeObj.helperType=spec.helperType),spec.modeProps)for(var prop in spec.modeProps)modeObj[prop]=spec.modeProps[prop];return modeObj},CodeMirror.defineMode("null",function(){return{token:function(stream){stream.skipToEnd()}}}),CodeMirror.defineMIME("text/plain","null");var modeExtensions=CodeMirror.modeExtensions={};CodeMirror.extendMode=function(mode,properties){var exts=modeExtensions.hasOwnProperty(mode)?modeExtensions[mode]:modeExtensions[mode]={};copyObj(properties,exts)},CodeMirror.defineExtension=function(name,func){CodeMirror.prototype[name]=func},CodeMirror.defineDocExtension=function(name,func){Doc.prototype[name]=func},CodeMirror.defineOption=option;var initHooks=[];CodeMirror.defineInitHook=function(f){initHooks.push(f)};var helpers=CodeMirror.helpers={};CodeMirror.registerHelper=function(type,name,value){helpers.hasOwnProperty(type)||(helpers[type]=CodeMirror[type]={_global:[]}),helpers[type][name]=value},CodeMirror.registerGlobalHelper=function(type,name,predicate,value){CodeMirror.registerHelper(type,name,value),helpers[type]._global.push({pred:predicate,val:value})};var copyState=CodeMirror.copyState=function(mode,state){if(state===!0)return state;if(mode.copyState)return mode.copyState(state);var nstate={};for(var n in state){var val=state[n];val instanceof Array&&(val=val.concat([])),nstate[n]=val}return nstate},startState=CodeMirror.startState=function(mode,a1,a2){return mode.startState?mode.startState(a1,a2):!0};CodeMirror.innerMode=function(mode,state){for(;mode.innerMode;){var info=mode.innerMode(state);if(!info||info.mode==mode)break;state=info.state,mode=info.mode}return info||{mode:mode,state:state}};var commands=CodeMirror.commands={selectAll:function(cm){cm.setSelection(Pos(cm.firstLine(),0),Pos(cm.lastLine()),sel_dontScroll)},singleSelection:function(cm){cm.setSelection(cm.getCursor("anchor"),cm.getCursor("head"),sel_dontScroll)},killLine:function(cm){deleteNearSelection(cm,function(range){if(range.empty()){var len=getLine(cm.doc,range.head.line).text.length;return range.head.ch==len&&range.head.line<cm.lastLine()?{from:range.head,to:Pos(range.head.line+1,0)}:{from:range.head,to:Pos(range.head.line,len)}}return{from:range.from(),to:range.to()}})},deleteLine:function(cm){deleteNearSelection(cm,function(range){return{from:Pos(range.from().line,0),to:clipPos(cm.doc,Pos(range.to().line+1,0))}})},delLineLeft:function(cm){deleteNearSelection(cm,function(range){return{from:Pos(range.from().line,0),to:range.from()}})},delWrappedLineLeft:function(cm){deleteNearSelection(cm,function(range){var top=cm.charCoords(range.head,"div").top+5,leftPos=cm.coordsChar({left:0,top:top},"div");return{from:leftPos,to:range.from()}})},delWrappedLineRight:function(cm){deleteNearSelection(cm,function(range){var top=cm.charCoords(range.head,"div").top+5,rightPos=cm.coordsChar({left:cm.display.lineDiv.offsetWidth+100,top:top},"div");return{from:range.from(),to:rightPos}})},undo:function(cm){cm.undo()},redo:function(cm){cm.redo()},undoSelection:function(cm){cm.undoSelection()},redoSelection:function(cm){cm.redoSelection()},goDocStart:function(cm){cm.extendSelection(Pos(cm.firstLine(),0))},goDocEnd:function(cm){cm.extendSelection(Pos(cm.lastLine()))},goLineStart:function(cm){cm.extendSelectionsBy(function(range){return lineStart(cm,range.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(cm){cm.extendSelectionsBy(function(range){return lineStartSmart(cm,range.head)},{origin:"+move",bias:1})},goLineEnd:function(cm){cm.extendSelectionsBy(function(range){return lineEnd(cm,range.head.line)},{origin:"+move",bias:-1})},goLineRight:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5;return cm.coordsChar({left:cm.display.lineDiv.offsetWidth+100,top:top},"div")},sel_move)},goLineLeft:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5;return cm.coordsChar({left:0,top:top},"div")},sel_move)},goLineLeftSmart:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5,pos=cm.coordsChar({left:0,top:top},"div");return pos.ch<cm.getLine(pos.line).search(/\S/)?lineStartSmart(cm,range.head):pos},sel_move)},goLineUp:function(cm){cm.moveV(-1,"line")},goLineDown:function(cm){cm.moveV(1,"line")},goPageUp:function(cm){cm.moveV(-1,"page")},goPageDown:function(cm){cm.moveV(1,"page")},goCharLeft:function(cm){cm.moveH(-1,"char")},goCharRight:function(cm){cm.moveH(1,"char")},goColumnLeft:function(cm){cm.moveH(-1,"column")},goColumnRight:function(cm){cm.moveH(1,"column")},goWordLeft:function(cm){cm.moveH(-1,"word")},goGroupRight:function(cm){cm.moveH(1,"group")},goGroupLeft:function(cm){cm.moveH(-1,"group")},goWordRight:function(cm){cm.moveH(1,"word")},delCharBefore:function(cm){cm.deleteH(-1,"char")},delCharAfter:function(cm){cm.deleteH(1,"char")},delWordBefore:function(cm){cm.deleteH(-1,"word")},delWordAfter:function(cm){cm.deleteH(1,"word")},delGroupBefore:function(cm){cm.deleteH(-1,"group")},delGroupAfter:function(cm){cm.deleteH(1,"group")},indentAuto:function(cm){cm.indentSelection("smart")},indentMore:function(cm){cm.indentSelection("add")},indentLess:function(cm){cm.indentSelection("subtract")},insertTab:function(cm){cm.replaceSelection(" ")},insertSoftTab:function(cm){for(var spaces=[],ranges=cm.listSelections(),tabSize=cm.options.tabSize,i=0;i<ranges.length;i++){var pos=ranges[i].from(),col=countColumn(cm.getLine(pos.line),pos.ch,tabSize);spaces.push(new Array(tabSize-col%tabSize+1).join(" "))}cm.replaceSelections(spaces)},defaultTab:function(cm){cm.somethingSelected()?cm.indentSelection("add"):cm.execCommand("insertTab")},transposeChars:function(cm){runInOp(cm,function(){for(var ranges=cm.listSelections(),newSel=[],i=0;i<ranges.length;i++){var cur=ranges[i].head,line=getLine(cm.doc,cur.line).text;if(line)if(cur.ch==line.length&&(cur=new Pos(cur.line,cur.ch-1)),cur.ch>0)cur=new Pos(cur.line,cur.ch+1),cm.replaceRange(line.charAt(cur.ch-1)+line.charAt(cur.ch-2),Pos(cur.line,cur.ch-2),cur,"+transpose");else if(cur.line>cm.doc.first){var prev=getLine(cm.doc,cur.line-1).text;prev&&cm.replaceRange(line.charAt(0)+"\n"+prev.charAt(prev.length-1),Pos(cur.line-1,prev.length-1),Pos(cur.line,1),"+transpose")}newSel.push(new Range(cur,cur))}cm.setSelections(newSel)})},newlineAndIndent:function(cm){runInOp(cm,function(){for(var len=cm.listSelections().length,i=0;len>i;i++){var range=cm.listSelections()[i];cm.replaceRange("\n",range.anchor,range.head,"+input"),cm.indentLine(range.from().line+1,null,!0),ensureCursorVisible(cm)}})},toggleOverwrite:function(cm){cm.toggleOverwrite()}},keyMap=CodeMirror.keyMap={};keyMap.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},keyMap.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},keyMap.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},keyMap.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},keyMap["default"]=mac?keyMap.macDefault:keyMap.pcDefault,CodeMirror.normalizeKeyMap=function(keymap){var copy={};for(var keyname in keymap)if(keymap.hasOwnProperty(keyname)){var value=keymap[keyname];if(/^(name|fallthrough|(de|at)tach)$/.test(keyname))continue;if("..."==value){delete keymap[keyname];continue}for(var keys=map(keyname.split(" "),normalizeKeyName),i=0;i<keys.length;i++){var val,name;i==keys.length-1?(name=keyname,val=value):(name=keys.slice(0,i+1).join(" "),val="...");var prev=copy[name];if(prev){if(prev!=val)throw new Error("Inconsistent bindings for "+name)}else copy[name]=val}delete keymap[keyname]}for(var prop in copy)keymap[prop]=copy[prop];return keymap};var lookupKey=CodeMirror.lookupKey=function(key,map,handle){map=getKeyMap(map);var found=map.call?map.call(key):map[key];if(found===!1)return"nothing";if("..."===found)return"multi";if(null!=found&&handle(found))return"handled";if(map.fallthrough){if("[object Array]"!=Object.prototype.toString.call(map.fallthrough))return lookupKey(key,map.fallthrough,handle);for(var i=0;i<map.fallthrough.length;i++){var result=lookupKey(key,map.fallthrough[i],handle);if(result)return result}}},isModifierKey=CodeMirror.isModifierKey=function(value){var name="string"==typeof value?value:keyNames[value.keyCode];return"Ctrl"==name||"Alt"==name||"Shift"==name||"Mod"==name},keyName=CodeMirror.keyName=function(event,noShift){if(presto&&34==event.keyCode&&event["char"])return!1;var base=keyNames[event.keyCode],name=base;return null==name||event.altGraphKey?!1:(event.altKey&&"Alt"!=base&&(name="Alt-"+name),(flipCtrlCmd?event.metaKey:event.ctrlKey)&&"Ctrl"!=base&&(name="Ctrl-"+name),(flipCtrlCmd?event.ctrlKey:event.metaKey)&&"Cmd"!=base&&(name="Cmd-"+name),!noShift&&event.shiftKey&&"Shift"!=base&&(name="Shift-"+name),name)};CodeMirror.fromTextArea=function(textarea,options){function save(){textarea.value=cm.getValue()}if(options||(options={}),options.value=textarea.value,!options.tabindex&&textarea.tabindex&&(options.tabindex=textarea.tabindex),!options.placeholder&&textarea.placeholder&&(options.placeholder=textarea.placeholder),null==options.autofocus){var hasFocus=activeElt();options.autofocus=hasFocus==textarea||null!=textarea.getAttribute("autofocus")&&hasFocus==document.body}if(textarea.form&&(on(textarea.form,"submit",save),!options.leaveSubmitMethodAlone)){var form=textarea.form,realSubmit=form.submit;try{var wrappedSubmit=form.submit=function(){save(),form.submit=realSubmit,form.submit(),form.submit=wrappedSubmit}}catch(e){}}textarea.style.display="none";var cm=CodeMirror(function(node){textarea.parentNode.insertBefore(node,textarea.nextSibling)},options);return cm.save=save,cm.getTextArea=function(){return textarea},cm.toTextArea=function(){cm.toTextArea=isNaN,save(),textarea.parentNode.removeChild(cm.getWrapperElement()),textarea.style.display="",textarea.form&&(off(textarea.form,"submit",save),"function"==typeof textarea.form.submit&&(textarea.form.submit=realSubmit))},cm};var StringStream=CodeMirror.StringStream=function(string,tabSize){this.pos=this.start=0,this.string=string,this.tabSize=tabSize||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(match){var ch=this.string.charAt(this.pos);if("string"==typeof match)var ok=ch==match;else var ok=ch&&(match.test?match.test(ch):match(ch));return ok?(++this.pos,ch):void 0},eatWhile:function(match){for(var start=this.pos;this.eat(match););return this.pos>start},eatSpace:function(){for(var start=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>start},skipToEnd:function(){this.pos=this.string.length},skipTo:function(ch){var found=this.string.indexOf(ch,this.pos);return found>-1?(this.pos=found,!0):void 0},backUp:function(n){this.pos-=n},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},match:function(pattern,consume,caseInsensitive){if("string"!=typeof pattern){var match=this.string.slice(this.pos).match(pattern);return match&&match.index>0?null:(match&&consume!==!1&&(this.pos+=match[0].length),match)}var cased=function(str){return caseInsensitive?str.toLowerCase():str},substr=this.string.substr(this.pos,pattern.length);return cased(substr)==cased(pattern)?(consume!==!1&&(this.pos+=pattern.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(n,inner){this.lineStart+=n;try{return inner()}finally{this.lineStart-=n}}};var TextMarker=CodeMirror.TextMarker=function(doc,type){this.lines=[],this.type=type,this.doc=doc};eventMixin(TextMarker),TextMarker.prototype.clear=function(){if(!this.explicitlyCleared){var cm=this.doc.cm,withOp=cm&&!cm.curOp;if(withOp&&startOperation(cm),hasHandler(this,"clear")){var found=this.find();found&&signalLater(this,"clear",found.from,found.to)}for(var min=null,max=null,i=0;i<this.lines.length;++i){var line=this.lines[i],span=getMarkedSpanFor(line.markedSpans,this);cm&&!this.collapsed?regLineChange(cm,lineNo(line),"text"):cm&&(null!=span.to&&(max=lineNo(line)),null!=span.from&&(min=lineNo(line))),line.markedSpans=removeMarkedSpan(line.markedSpans,span),null==span.from&&this.collapsed&&!lineIsHidden(this.doc,line)&&cm&&updateLineHeight(line,textHeight(cm.display))}if(cm&&this.collapsed&&!cm.options.lineWrapping)for(var i=0;i<this.lines.length;++i){var visual=visualLine(this.lines[i]),len=lineLength(visual);len>cm.display.maxLineLength&&(cm.display.maxLine=visual,cm.display.maxLineLength=len,cm.display.maxLineChanged=!0)}null!=min&&cm&&this.collapsed&®Change(cm,min,max+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,cm&&reCheckSelection(cm.doc)),cm&&signalLater(cm,"markerCleared",cm,this),withOp&&endOperation(cm),this.parent&&this.parent.clear()}},TextMarker.prototype.find=function(side,lineObj){null==side&&"bookmark"==this.type&&(side=1);for(var from,to,i=0;i<this.lines.length;++i){var line=this.lines[i],span=getMarkedSpanFor(line.markedSpans,this);if(null!=span.from&&(from=Pos(lineObj?line:lineNo(line),span.from),-1==side))return from;if(null!=span.to&&(to=Pos(lineObj?line:lineNo(line),span.to),1==side))return to}return from&&{from:from,to:to}},TextMarker.prototype.changed=function(){var pos=this.find(-1,!0),widget=this,cm=this.doc.cm;pos&&cm&&runInOp(cm,function(){var line=pos.line,lineN=lineNo(pos.line),view=findViewForLine(cm,lineN);if(view&&(clearLineMeasurementCacheFor(view),cm.curOp.selectionChanged=cm.curOp.forceUpdate=!0),cm.curOp.updateMaxLine=!0,!lineIsHidden(widget.doc,line)&&null!=widget.height){var oldHeight=widget.height;widget.height=null;var dHeight=widgetHeight(widget)-oldHeight;dHeight&&updateLineHeight(line,line.height+dHeight)}})},TextMarker.prototype.attachLine=function(line){if(!this.lines.length&&this.doc.cm){var op=this.doc.cm.curOp;op.maybeHiddenMarkers&&-1!=indexOf(op.maybeHiddenMarkers,this)||(op.maybeUnhiddenMarkers||(op.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(line)},TextMarker.prototype.detachLine=function(line){if(this.lines.splice(indexOf(this.lines,line),1),!this.lines.length&&this.doc.cm){var op=this.doc.cm.curOp;(op.maybeHiddenMarkers||(op.maybeHiddenMarkers=[])).push(this)}};var nextMarkerId=0,SharedTextMarker=CodeMirror.SharedTextMarker=function(markers,primary){this.markers=markers,this.primary=primary;for(var i=0;i<markers.length;++i)markers[i].parent=this};eventMixin(SharedTextMarker),SharedTextMarker.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var i=0;i<this.markers.length;++i)this.markers[i].clear();signalLater(this,"clear")}},SharedTextMarker.prototype.find=function(side,lineObj){return this.primary.find(side,lineObj)};var LineWidget=CodeMirror.LineWidget=function(cm,node,options){if(options)for(var opt in options)options.hasOwnProperty(opt)&&(this[opt]=options[opt]);this.cm=cm,this.node=node};eventMixin(LineWidget),LineWidget.prototype.clear=function(){var cm=this.cm,ws=this.line.widgets,line=this.line,no=lineNo(line);if(null!=no&&ws){for(var i=0;i<ws.length;++i)ws[i]==this&&ws.splice(i--,1);ws.length||(line.widgets=null);var height=widgetHeight(this);runInOp(cm,function(){adjustScrollWhenAboveVisible(cm,line,-height),regLineChange(cm,no,"widget"),updateLineHeight(line,Math.max(0,line.height-height))})}},LineWidget.prototype.changed=function(){var oldH=this.height,cm=this.cm,line=this.line;this.height=null;var diff=widgetHeight(this)-oldH;diff&&runInOp(cm,function(){cm.curOp.forceUpdate=!0,adjustScrollWhenAboveVisible(cm,line,diff),updateLineHeight(line,line.height+diff)})};var Line=CodeMirror.Line=function(text,markedSpans,estimateHeight){this.text=text,attachMarkedSpans(this,markedSpans),this.height=estimateHeight?estimateHeight(this):1};eventMixin(Line),Line.prototype.lineNo=function(){return lineNo(this)};var styleToClassCache={},styleToClassCacheWithMode={};LeafChunk.prototype={chunkSize:function(){return this.lines.length},removeInner:function(at,n){for(var i=at,e=at+n;e>i;++i){var line=this.lines[i];this.height-=line.height,cleanUpLine(line),signalLater(line,"delete")}this.lines.splice(at,n)},collapse:function(lines){lines.push.apply(lines,this.lines)},insertInner:function(at,lines,height){this.height+=height,this.lines=this.lines.slice(0,at).concat(lines).concat(this.lines.slice(at));for(var i=0;i<lines.length;++i)lines[i].parent=this},iterN:function(at,n,op){for(var e=at+n;e>at;++at)if(op(this.lines[at]))return!0}},BranchChunk.prototype={chunkSize:function(){return this.size},removeInner:function(at,n){this.size-=n;for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>at){var rm=Math.min(n,sz-at),oldHeight=child.height;if(child.removeInner(at,rm),this.height-=oldHeight-child.height,sz==rm&&(this.children.splice(i--,1),child.parent=null),0==(n-=rm))break;at=0}else at-=sz}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof LeafChunk))){var lines=[];this.collapse(lines),this.children=[new LeafChunk(lines)],this.children[0].parent=this}},collapse:function(lines){for(var i=0;i<this.children.length;++i)this.children[i].collapse(lines)},insertInner:function(at,lines,height){this.size+=lines.length,this.height+=height;for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>=at){if(child.insertInner(at,lines,height),child.lines&&child.lines.length>50){for(;child.lines.length>50;){var spilled=child.lines.splice(child.lines.length-25,25),newleaf=new LeafChunk(spilled);child.height-=newleaf.height,this.children.splice(i+1,0,newleaf),newleaf.parent=this}this.maybeSpill()}break}at-=sz}},maybeSpill:function(){if(!(this.children.length<=10)){var me=this;do{var spilled=me.children.splice(me.children.length-5,5),sibling=new BranchChunk(spilled);if(me.parent){me.size-=sibling.size,me.height-=sibling.height;var myIndex=indexOf(me.parent.children,me);me.parent.children.splice(myIndex+1,0,sibling)}else{var copy=new BranchChunk(me.children);copy.parent=me,me.children=[copy,sibling],me=copy}sibling.parent=me.parent}while(me.children.length>10);me.parent.maybeSpill()}},iterN:function(at,n,op){for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>at){var used=Math.min(n,sz-at);if(child.iterN(at,used,op))return!0;if(0==(n-=used))break;at=0}else at-=sz}}};var nextDocId=0,Doc=CodeMirror.Doc=function(text,mode,firstLine){if(!(this instanceof Doc))return new Doc(text,mode,firstLine);null==firstLine&&(firstLine=0),BranchChunk.call(this,[new LeafChunk([new Line("",null)])]),this.first=firstLine,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=firstLine;var start=Pos(firstLine,0);this.sel=simpleSelection(start),this.history=new History(null),this.id=++nextDocId,this.modeOption=mode,"string"==typeof text&&(text=splitLines(text)),updateDoc(this,{from:start,to:start,text:text}),setSelection(this,simpleSelection(start),sel_dontScroll)};Doc.prototype=createObj(BranchChunk.prototype,{constructor:Doc,iter:function(from,to,op){op?this.iterN(from-this.first,to-from,op):this.iterN(this.first,this.first+this.size,from)},insert:function(at,lines){for(var height=0,i=0;i<lines.length;++i)height+=lines[i].height;this.insertInner(at-this.first,lines,height)},remove:function(at,n){this.removeInner(at-this.first,n)},getValue:function(lineSep){var lines=getLines(this,this.first,this.first+this.size);return lineSep===!1?lines:lines.join(lineSep||"\n")},setValue:docMethodOp(function(code){var top=Pos(this.first,0),last=this.first+this.size-1;makeChange(this,{from:top,to:Pos(last,getLine(this,last).text.length),text:splitLines(code),origin:"setValue"},!0),setSelection(this,simpleSelection(top))}),replaceRange:function(code,from,to,origin){from=clipPos(this,from),to=to?clipPos(this,to):from,replaceRange(this,code,from,to,origin)},getRange:function(from,to,lineSep){var lines=getBetween(this,clipPos(this,from),clipPos(this,to));return lineSep===!1?lines:lines.join(lineSep||"\n")},getLine:function(line){var l=this.getLineHandle(line);return l&&l.text},getLineHandle:function(line){return isLine(this,line)?getLine(this,line):void 0},getLineNumber:function(line){return lineNo(line)},getLineHandleVisualStart:function(line){return"number"==typeof line&&(line=getLine(this,line)),visualLine(line)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(pos){return clipPos(this,pos)},getCursor:function(start){var pos,range=this.sel.primary();return pos=null==start||"head"==start?range.head:"anchor"==start?range.anchor:"end"==start||"to"==start||start===!1?range.to():range.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:docMethodOp(function(line,ch,options){setSimpleSelection(this,clipPos(this,"number"==typeof line?Pos(line,ch||0):line),null,options)}),setSelection:docMethodOp(function(anchor,head,options){setSimpleSelection(this,clipPos(this,anchor),clipPos(this,head||anchor),options)}),extendSelection:docMethodOp(function(head,other,options){extendSelection(this,clipPos(this,head),other&&clipPos(this,other),options)}),extendSelections:docMethodOp(function(heads,options){extendSelections(this,clipPosArray(this,heads,options))}),extendSelectionsBy:docMethodOp(function(f,options){extendSelections(this,map(this.sel.ranges,f),options)}),setSelections:docMethodOp(function(ranges,primary,options){if(ranges.length){for(var i=0,out=[];i<ranges.length;i++)out[i]=new Range(clipPos(this,ranges[i].anchor),clipPos(this,ranges[i].head));
|
22 |
null==primary&&(primary=Math.min(ranges.length-1,this.sel.primIndex)),setSelection(this,normalizeSelection(out,primary),options)}}),addSelection:docMethodOp(function(anchor,head,options){var ranges=this.sel.ranges.slice(0);ranges.push(new Range(clipPos(this,anchor),clipPos(this,head||anchor))),setSelection(this,normalizeSelection(ranges,ranges.length-1),options)}),getSelection:function(lineSep){for(var lines,ranges=this.sel.ranges,i=0;i<ranges.length;i++){var sel=getBetween(this,ranges[i].from(),ranges[i].to());lines=lines?lines.concat(sel):sel}return lineSep===!1?lines:lines.join(lineSep||"\n")},getSelections:function(lineSep){for(var parts=[],ranges=this.sel.ranges,i=0;i<ranges.length;i++){var sel=getBetween(this,ranges[i].from(),ranges[i].to());lineSep!==!1&&(sel=sel.join(lineSep||"\n")),parts[i]=sel}return parts},replaceSelection:function(code,collapse,origin){for(var dup=[],i=0;i<this.sel.ranges.length;i++)dup[i]=code;this.replaceSelections(dup,collapse,origin||"+input")},replaceSelections:docMethodOp(function(code,collapse,origin){for(var changes=[],sel=this.sel,i=0;i<sel.ranges.length;i++){var range=sel.ranges[i];changes[i]={from:range.from(),to:range.to(),text:splitLines(code[i]),origin:origin}}for(var newSel=collapse&&"end"!=collapse&&computeReplacedSel(this,changes,collapse),i=changes.length-1;i>=0;i--)makeChange(this,changes[i]);newSel?setSelectionReplaceHistory(this,newSel):this.cm&&ensureCursorVisible(this.cm)}),undo:docMethodOp(function(){makeChangeFromHistory(this,"undo")}),redo:docMethodOp(function(){makeChangeFromHistory(this,"redo")}),undoSelection:docMethodOp(function(){makeChangeFromHistory(this,"undo",!0)}),redoSelection:docMethodOp(function(){makeChangeFromHistory(this,"redo",!0)}),setExtending:function(val){this.extend=val},getExtending:function(){return this.extend},historySize:function(){for(var hist=this.history,done=0,undone=0,i=0;i<hist.done.length;i++)hist.done[i].ranges||++done;for(var i=0;i<hist.undone.length;i++)hist.undone[i].ranges||++undone;return{undo:done,redo:undone}},clearHistory:function(){this.history=new History(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(forceSplit){return forceSplit&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(gen){return this.history.generation==(gen||this.cleanGeneration)},getHistory:function(){return{done:copyHistoryArray(this.history.done),undone:copyHistoryArray(this.history.undone)}},setHistory:function(histData){var hist=this.history=new History(this.history.maxGeneration);hist.done=copyHistoryArray(histData.done.slice(0),null,!0),hist.undone=copyHistoryArray(histData.undone.slice(0),null,!0)},addLineClass:docMethodOp(function(handle,where,cls){return changeLine(this,handle,"gutter"==where?"gutter":"class",function(line){var prop="text"==where?"textClass":"background"==where?"bgClass":"gutter"==where?"gutterClass":"wrapClass";if(line[prop]){if(classTest(cls).test(line[prop]))return!1;line[prop]+=" "+cls}else line[prop]=cls;return!0})}),removeLineClass:docMethodOp(function(handle,where,cls){return changeLine(this,handle,"class",function(line){var prop="text"==where?"textClass":"background"==where?"bgClass":"gutter"==where?"gutterClass":"wrapClass",cur=line[prop];if(!cur)return!1;if(null==cls)line[prop]=null;else{var found=cur.match(classTest(cls));if(!found)return!1;var end=found.index+found[0].length;line[prop]=cur.slice(0,found.index)+(found.index&&end!=cur.length?" ":"")+cur.slice(end)||null}return!0})}),markText:function(from,to,options){return markText(this,clipPos(this,from),clipPos(this,to),options,"range")},setBookmark:function(pos,options){var realOpts={replacedWith:options&&(null==options.nodeType?options.widget:options),insertLeft:options&&options.insertLeft,clearWhenEmpty:!1,shared:options&&options.shared};return pos=clipPos(this,pos),markText(this,pos,pos,realOpts,"bookmark")},findMarksAt:function(pos){pos=clipPos(this,pos);var markers=[],spans=getLine(this,pos.line).markedSpans;if(spans)for(var i=0;i<spans.length;++i){var span=spans[i];(null==span.from||span.from<=pos.ch)&&(null==span.to||span.to>=pos.ch)&&markers.push(span.marker.parent||span.marker)}return markers},findMarks:function(from,to,filter){from=clipPos(this,from),to=clipPos(this,to);var found=[],lineNo=from.line;return this.iter(from.line,to.line+1,function(line){var spans=line.markedSpans;if(spans)for(var i=0;i<spans.length;i++){var span=spans[i];lineNo==from.line&&from.ch>span.to||null==span.from&&lineNo!=from.line||lineNo==to.line&&span.from>to.ch||filter&&!filter(span.marker)||found.push(span.marker.parent||span.marker)}++lineNo}),found},getAllMarks:function(){var markers=[];return this.iter(function(line){var sps=line.markedSpans;if(sps)for(var i=0;i<sps.length;++i)null!=sps[i].from&&markers.push(sps[i].marker)}),markers},posFromIndex:function(off){var ch,lineNo=this.first;return this.iter(function(line){var sz=line.text.length+1;return sz>off?(ch=off,!0):(off-=sz,void++lineNo)}),clipPos(this,Pos(lineNo,ch))},indexFromPos:function(coords){coords=clipPos(this,coords);var index=coords.ch;return coords.line<this.first||coords.ch<0?0:(this.iter(this.first,coords.line,function(line){index+=line.text.length+1}),index)},copy:function(copyHistory){var doc=new Doc(getLines(this,this.first,this.first+this.size),this.modeOption,this.first);return doc.scrollTop=this.scrollTop,doc.scrollLeft=this.scrollLeft,doc.sel=this.sel,doc.extend=!1,copyHistory&&(doc.history.undoDepth=this.history.undoDepth,doc.setHistory(this.getHistory())),doc},linkedDoc:function(options){options||(options={});var from=this.first,to=this.first+this.size;null!=options.from&&options.from>from&&(from=options.from),null!=options.to&&options.to<to&&(to=options.to);var copy=new Doc(getLines(this,from,to),options.mode||this.modeOption,from);return options.sharedHist&&(copy.history=this.history),(this.linked||(this.linked=[])).push({doc:copy,sharedHist:options.sharedHist}),copy.linked=[{doc:this,isParent:!0,sharedHist:options.sharedHist}],copySharedMarkers(copy,findSharedMarkers(this)),copy},unlinkDoc:function(other){if(other instanceof CodeMirror&&(other=other.doc),this.linked)for(var i=0;i<this.linked.length;++i){var link=this.linked[i];if(link.doc==other){this.linked.splice(i,1),other.unlinkDoc(this),detachSharedMarkers(findSharedMarkers(this));break}}if(other.history==this.history){var splitIds=[other.id];linkedDocs(other,function(doc){splitIds.push(doc.id)},!0),other.history=new History(null),other.history.done=copyHistoryArray(this.history.done,splitIds),other.history.undone=copyHistoryArray(this.history.undone,splitIds)}},iterLinkedDocs:function(f){linkedDocs(this,f)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),Doc.prototype.eachLine=Doc.prototype.iter;var dontDelegate="iter insert remove copy getEditor".split(" ");for(var prop in Doc.prototype)Doc.prototype.hasOwnProperty(prop)&&indexOf(dontDelegate,prop)<0&&(CodeMirror.prototype[prop]=function(method){return function(){return method.apply(this.doc,arguments)}}(Doc.prototype[prop]));eventMixin(Doc);var e_preventDefault=CodeMirror.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},e_stopPropagation=CodeMirror.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},e_stop=CodeMirror.e_stop=function(e){e_preventDefault(e),e_stopPropagation(e)},on=CodeMirror.on=function(emitter,type,f){if(emitter.addEventListener)emitter.addEventListener(type,f,!1);else if(emitter.attachEvent)emitter.attachEvent("on"+type,f);else{var map=emitter._handlers||(emitter._handlers={}),arr=map[type]||(map[type]=[]);arr.push(f)}},off=CodeMirror.off=function(emitter,type,f){if(emitter.removeEventListener)emitter.removeEventListener(type,f,!1);else if(emitter.detachEvent)emitter.detachEvent("on"+type,f);else{var arr=emitter._handlers&&emitter._handlers[type];if(!arr)return;for(var i=0;i<arr.length;++i)if(arr[i]==f){arr.splice(i,1);break}}},signal=CodeMirror.signal=function(emitter,type){var arr=emitter._handlers&&emitter._handlers[type];if(arr)for(var args=Array.prototype.slice.call(arguments,2),i=0;i<arr.length;++i)arr[i].apply(null,args)},orphanDelayedCallbacks=null,scrollerCutOff=30,Pass=CodeMirror.Pass={toString:function(){return"CodeMirror.Pass"}},sel_dontScroll={scroll:!1},sel_mouse={origin:"*mouse"},sel_move={origin:"+move"};Delayed.prototype.set=function(ms,f){clearTimeout(this.id),this.id=setTimeout(f,ms)};var countColumn=CodeMirror.countColumn=function(string,end,tabSize,startIndex,startValue){null==end&&(end=string.search(/[^\s\u00a0]/),-1==end&&(end=string.length));for(var i=startIndex||0,n=startValue||0;;){var nextTab=string.indexOf(" ",i);if(0>nextTab||nextTab>=end)return n+(end-i);n+=nextTab-i,n+=tabSize-n%tabSize,i=nextTab+1}},spaceStrs=[""],selectInput=function(node){node.select()};ios?selectInput=function(node){node.selectionStart=0,node.selectionEnd=node.value.length}:ie&&(selectInput=function(node){try{node.select()}catch(_e){}}),[].indexOf&&(indexOf=function(array,elt){return array.indexOf(elt)}),[].map&&(map=function(array,f){return array.map(f)});var range,nonASCIISingleCaseWordChar=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,isWordCharBasic=CodeMirror.isWordChar=function(ch){return/\w/.test(ch)||ch>""&&(ch.toUpperCase()!=ch.toLowerCase()||nonASCIISingleCaseWordChar.test(ch))},extendingChars=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;range=document.createRange?function(node,start,end){var r=document.createRange();return r.setEnd(node,end),r.setStart(node,start),r}:function(node,start,end){var r=document.body.createTextRange();try{r.moveToElementText(node.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",end),r.moveStart("character",start),r},ie&&11>ie_version&&(activeElt=function(){try{return document.activeElement}catch(e){return document.body}});var knownScrollbarWidth,zwspSupported,badBidiRects,rmClass=CodeMirror.rmClass=function(node,cls){var current=node.className,match=classTest(cls).exec(current);if(match){var after=current.slice(match.index+match[0].length);node.className=current.slice(0,match.index)+(after?match[1]+after:"")}},addClass=CodeMirror.addClass=function(node,cls){var current=node.className;classTest(cls).test(current)||(node.className+=(current?" ":"")+cls)},globalsRegistered=!1,dragAndDrop=function(){if(ie&&9>ie_version)return!1;var div=elt("div");return"draggable"in div||"dragDrop"in div}(),splitLines=CodeMirror.splitLines=3!="\n\nb".split(/\n/).length?function(string){for(var pos=0,result=[],l=string.length;l>=pos;){var nl=string.indexOf("\n",pos);-1==nl&&(nl=string.length);var line=string.slice(pos,"\r"==string.charAt(nl-1)?nl-1:nl),rt=line.indexOf("\r");-1!=rt?(result.push(line.slice(0,rt)),pos+=rt+1):(result.push(line),pos=nl+1)}return result}:function(string){return string.split(/\r\n?|\n/)},hasSelection=window.getSelection?function(te){try{return te.selectionStart!=te.selectionEnd}catch(e){return!1}}:function(te){try{var range=te.ownerDocument.selection.createRange()}catch(e){}return range&&range.parentElement()==te?0!=range.compareEndPoints("StartToEnd",range):!1},hasCopyEvent=function(){var e=elt("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),badZoomedRects=null,keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};CodeMirror.keyNames=keyNames,function(){for(var i=0;10>i;i++)keyNames[i+48]=keyNames[i+96]=String(i);for(var i=65;90>=i;i++)keyNames[i]=String.fromCharCode(i);for(var i=1;12>=i;i++)keyNames[i+111]=keyNames[i+63235]="F"+i}();var bidiOther,bidiOrdering=function(){function charType(code){return 247>=code?lowTypes.charAt(code):code>=1424&&1524>=code?"R":code>=1536&&1773>=code?arabicTypes.charAt(code-1536):code>=1774&&2220>=code?"r":code>=8192&&8203>=code?"w":8204==code?"b":"L"}function BidiSpan(level,from,to){this.level=level,this.from=from,this.to=to}var lowTypes="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",arabicTypes="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",bidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,isNeutral=/[stwN]/,isStrong=/[LRr]/,countsAsLeft=/[Lb1n]/,countsAsNum=/[1n]/,outerType="L";return function(str){if(!bidiRE.test(str))return!1;for(var type,len=str.length,types=[],i=0;len>i;++i)types.push(type=charType(str.charCodeAt(i)));for(var i=0,prev=outerType;len>i;++i){var type=types[i];"m"==type?types[i]=prev:prev=type}for(var i=0,cur=outerType;len>i;++i){var type=types[i];"1"==type&&"r"==cur?types[i]="n":isStrong.test(type)&&(cur=type,"r"==type&&(types[i]="R"))}for(var i=1,prev=types[0];len-1>i;++i){var type=types[i];"+"==type&&"1"==prev&&"1"==types[i+1]?types[i]="1":","!=type||prev!=types[i+1]||"1"!=prev&&"n"!=prev||(types[i]=prev),prev=type}for(var i=0;len>i;++i){var type=types[i];if(","==type)types[i]="N";else if("%"==type){for(var end=i+1;len>end&&"%"==types[end];++end);for(var replace=i&&"!"==types[i-1]||len>end&&"1"==types[end]?"1":"N",j=i;end>j;++j)types[j]=replace;i=end-1}}for(var i=0,cur=outerType;len>i;++i){var type=types[i];"L"==cur&&"1"==type?types[i]="L":isStrong.test(type)&&(cur=type)}for(var i=0;len>i;++i)if(isNeutral.test(types[i])){for(var end=i+1;len>end&&isNeutral.test(types[end]);++end);for(var before="L"==(i?types[i-1]:outerType),after="L"==(len>end?types[end]:outerType),replace=before||after?"L":"R",j=i;end>j;++j)types[j]=replace;i=end-1}for(var m,order=[],i=0;len>i;)if(countsAsLeft.test(types[i])){var start=i;for(++i;len>i&&countsAsLeft.test(types[i]);++i);order.push(new BidiSpan(0,start,i))}else{var pos=i,at=order.length;for(++i;len>i&&"L"!=types[i];++i);for(var j=pos;i>j;)if(countsAsNum.test(types[j])){j>pos&&order.splice(at,0,new BidiSpan(1,pos,j));var nstart=j;for(++j;i>j&&countsAsNum.test(types[j]);++j);order.splice(at,0,new BidiSpan(2,nstart,j)),pos=j}else++j;i>pos&&order.splice(at,0,new BidiSpan(1,pos,i))}return 1==order[0].level&&(m=str.match(/^\s+/))&&(order[0].from=m[0].length,order.unshift(new BidiSpan(0,0,m[0].length))),1==lst(order).level&&(m=str.match(/\s+$/))&&(lst(order).to-=m[0].length,order.push(new BidiSpan(0,len-m[0].length,len))),order[0].level!=lst(order).level&&order.push(new BidiSpan(order[0].level,len,len)),order}}();return CodeMirror.version="4.8.0",CodeMirror}),function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";function keySet(array){for(var keys={},i=0;i<array.length;++i)keys[array[i]]=!0;return keys}function tokenCComment(stream,state){for(var ch,maybeEnd=!1;null!=(ch=stream.next());){if(maybeEnd&&"/"==ch){state.tokenize=null;break}maybeEnd="*"==ch}return["comment","comment"]}function tokenSGMLComment(stream,state){return stream.skipTo("-->")?(stream.match("-->"),state.tokenize=null):stream.skipToEnd(),["comment","comment"]}CodeMirror.defineMode("css",function(config,parserConfig){function ret(style,tp){return type=tp,style}function tokenBase(stream,state){var ch=stream.next();if(tokenHooks[ch]){var result=tokenHooks[ch](stream,state);if(result!==!1)return result}return"@"==ch?(stream.eatWhile(/[\w\\\-]/),ret("def",stream.current())):"="==ch||("~"==ch||"|"==ch)&&stream.eat("=")?ret(null,"compare"):'"'==ch||"'"==ch?(state.tokenize=tokenString(ch),state.tokenize(stream,state)):"#"==ch?(stream.eatWhile(/[\w\\\-]/),ret("atom","hash")):"!"==ch?(stream.match(/^\s*\w*/),ret("keyword","important")):/\d/.test(ch)||"."==ch&&stream.eat(/\d/)?(stream.eatWhile(/[\w.%]/),ret("number","unit")):"-"!==ch?/[,+>*\/]/.test(ch)?ret(null,"select-op"):"."==ch&&stream.match(/^-?[_a-z][_a-z0-9-]*/i)?ret("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(ch)?ret(null,ch):"u"==ch&&stream.match("rl(")?(stream.backUp(1),state.tokenize=tokenParenthesized,ret("property","word")):/[\w\\\-]/.test(ch)?(stream.eatWhile(/[\w\\\-]/),ret("property","word")):ret(null,null):/[\d.]/.test(stream.peek())?(stream.eatWhile(/[\w.%]/),ret("number","unit")):stream.match(/^\w+-/)?ret("meta","meta"):void 0}function tokenString(quote){return function(stream,state){for(var ch,escaped=!1;null!=(ch=stream.next());){if(ch==quote&&!escaped){")"==quote&&stream.backUp(1);break}escaped=!escaped&&"\\"==ch}return(ch==quote||!escaped&&")"!=quote)&&(state.tokenize=null),ret("string","string")}}function tokenParenthesized(stream,state){return stream.next(),state.tokenize=stream.match(/\s*[\"\')]/,!1)?null:tokenString(")"),ret(null,"(")}function Context(type,indent,prev){this.type=type,this.indent=indent,this.prev=prev}function pushContext(state,stream,type){return state.context=new Context(type,stream.indentation()+indentUnit,state.context),type}function popContext(state){return state.context=state.context.prev,state.context.type}function pass(type,stream,state){return states[state.context.type](type,stream,state)}function popAndPass(type,stream,state,n){for(var i=n||1;i>0;i--)state.context=state.context.prev;return pass(type,stream,state)}function wordAsValue(stream){var word=stream.current().toLowerCase();override=valueKeywords.hasOwnProperty(word)?"atom":colorKeywords.hasOwnProperty(word)?"keyword":"variable"}parserConfig.propertyKeywords||(parserConfig=CodeMirror.resolveMode("text/css"));var type,override,indentUnit=config.indentUnit,tokenHooks=parserConfig.tokenHooks,mediaTypes=parserConfig.mediaTypes||{},mediaFeatures=parserConfig.mediaFeatures||{},propertyKeywords=parserConfig.propertyKeywords||{},nonStandardPropertyKeywords=parserConfig.nonStandardPropertyKeywords||{},colorKeywords=parserConfig.colorKeywords||{},valueKeywords=parserConfig.valueKeywords||{},fontProperties=parserConfig.fontProperties||{},allowNested=parserConfig.allowNested,states={};return states.top=function(type,stream,state){if("{"==type)return pushContext(state,stream,"block");if("}"==type&&state.context.prev)return popContext(state);if("@media"==type)return pushContext(state,stream,"media");if("@font-face"==type)return"font_face_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type))return"keyframes";if(type&&"@"==type.charAt(0))return pushContext(state,stream,"at");if("hash"==type)override="builtin";else if("word"==type)override="tag";else{if("variable-definition"==type)return"maybeprop";if("interpolation"==type)return pushContext(state,stream,"interpolation");if(":"==type)return"pseudo";if(allowNested&&"("==type)return pushContext(state,stream,"parens")}return state.context.type},states.block=function(type,stream,state){if("word"==type){var word=stream.current().toLowerCase();return propertyKeywords.hasOwnProperty(word)?(override="property","maybeprop"):nonStandardPropertyKeywords.hasOwnProperty(word)?(override="string-2","maybeprop"):allowNested?(override=stream.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(override+=" error","maybeprop")}return"meta"==type?"block":allowNested||"hash"!=type&&"qualifier"!=type?states.top(type,stream,state):(override="error","block")},states.maybeprop=function(type,stream,state){return":"==type?pushContext(state,stream,"prop"):pass(type,stream,state)},states.prop=function(type,stream,state){if(";"==type)return popContext(state);if("{"==type&&allowNested)return pushContext(state,stream,"propBlock");if("}"==type||"{"==type)return popAndPass(type,stream,state);if("("==type)return pushContext(state,stream,"parens");if("hash"!=type||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())){if("word"==type)wordAsValue(stream);else if("interpolation"==type)return pushContext(state,stream,"interpolation")}else override+=" error";return"prop"},states.propBlock=function(type,_stream,state){return"}"==type?popContext(state):"word"==type?(override="property","maybeprop"):state.context.type},states.parens=function(type,stream,state){return"{"==type||"}"==type?popAndPass(type,stream,state):")"==type?popContext(state):"("==type?pushContext(state,stream,"parens"):("word"==type&&wordAsValue(stream),"parens")},states.pseudo=function(type,stream,state){return"word"==type?(override="variable-3",state.context.type):pass(type,stream,state)},states.media=function(type,stream,state){if("("==type)return pushContext(state,stream,"media_parens");if("}"==type)return popAndPass(type,stream,state);if("{"==type)return popContext(state)&&pushContext(state,stream,allowNested?"block":"top");if("word"==type){var word=stream.current().toLowerCase();override="only"==word||"not"==word||"and"==word?"keyword":mediaTypes.hasOwnProperty(word)?"attribute":mediaFeatures.hasOwnProperty(word)?"property":"error"}return state.context.type},states.media_parens=function(type,stream,state){return")"==type?popContext(state):"{"==type||"}"==type?popAndPass(type,stream,state,2):states.media(type,stream,state)},states.font_face_before=function(type,stream,state){return"{"==type?pushContext(state,stream,"font_face"):pass(type,stream,state)},states.font_face=function(type,stream,state){return"}"==type?popContext(state):"word"==type?(override=fontProperties.hasOwnProperty(stream.current().toLowerCase())?"property":"error","maybeprop"):"font_face"},states.keyframes=function(type,stream,state){return"word"==type?(override="variable","keyframes"):"{"==type?pushContext(state,stream,"top"):pass(type,stream,state)},states.at=function(type,stream,state){return";"==type?popContext(state):"{"==type||"}"==type?popAndPass(type,stream,state):("word"==type?override="tag":"hash"==type&&(override="builtin"),"at")},states.interpolation=function(type,stream,state){return"}"==type?popContext(state):"{"==type||";"==type?popAndPass(type,stream,state):("variable"!=type&&(override="error"),"interpolation")},{startState:function(base){return{tokenize:null,state:"top",context:new Context("top",base||0,null)}},token:function(stream,state){if(!state.tokenize&&stream.eatSpace())return null;var style=(state.tokenize||tokenBase)(stream,state);return style&&"object"==typeof style&&(type=style[1],style=style[0]),override=style,state.state=states[state.state](type,stream,state),override},indent:function(state,textAfter){var cx=state.context,ch=textAfter&&textAfter.charAt(0),indent=cx.indent;return"prop"!=cx.type||"}"!=ch&&")"!=ch||(cx=cx.prev),!cx.prev||("}"!=ch||"block"!=cx.type&&"top"!=cx.type&&"interpolation"!=cx.type&&"font_face"!=cx.type)&&(")"!=ch||"parens"!=cx.type&&"media_parens"!=cx.type)&&("{"!=ch||"at"!=cx.type&&"media"!=cx.type)||(indent=cx.indent-indentUnit,cx=cx.prev),indent},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var mediaTypes_=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],mediaTypes=keySet(mediaTypes_),mediaFeatures_=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],mediaFeatures=keySet(mediaFeatures_),propertyKeywords_=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],propertyKeywords=keySet(propertyKeywords_),nonStandardPropertyKeywords_=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],nonStandardPropertyKeywords=keySet(nonStandardPropertyKeywords_),colorKeywords_=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],colorKeywords=keySet(colorKeywords_),valueKeywords_=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],valueKeywords=keySet(valueKeywords_),fontProperties_=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],fontProperties=keySet(fontProperties_),allWords=mediaTypes_.concat(mediaFeatures_).concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_).concat(valueKeywords_);
|
23 |
-
CodeMirror.registerHelper("hintWords","css",allWords),CodeMirror.defineMIME("text/css",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,tokenHooks:{"<":function(stream,state){return stream.match("!--")?(state.tokenize=tokenSGMLComment,tokenSGMLComment(stream,state)):!1},"/":function(stream,state){return stream.eat("*")?(state.tokenize=tokenCComment,tokenCComment(stream,state)):!1}},name:"css"}),CodeMirror.defineMIME("text/x-scss",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,allowNested:!0,tokenHooks:{"/":function(stream,state){return stream.eat("/")?(stream.skipToEnd(),["comment","comment"]):stream.eat("*")?(state.tokenize=tokenCComment,tokenCComment(stream,state)):["operator","operator"]},":":function(stream){return stream.match(/\s*\{/)?[null,"{"]:!1},$:function(stream){return stream.match(/^[\w-]+/),stream.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(stream){return stream.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),CodeMirror.defineMIME("text/x-less",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,allowNested:!0,tokenHooks:{"/":function(stream,state){return stream.eat("/")?(stream.skipToEnd(),["comment","comment"]):stream.eat("*")?(state.tokenize=tokenCComment,tokenCComment(stream,state)):["operator","operator"]},"@":function(stream){return stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(stream.eatWhile(/[\w\\\-]/),stream.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";CodeMirror.defineMode("javascript",function(config,parserConfig){function readRegexp(stream){for(var next,escaped=!1,inSet=!1;null!=(next=stream.next());){if(!escaped){if("/"==next&&!inSet)return;"["==next?inSet=!0:inSet&&"]"==next&&(inSet=!1)}escaped=!escaped&&"\\"==next}}function ret(tp,style,cont){return type=tp,content=cont,style}function tokenBase(stream,state){var ch=stream.next();if('"'==ch||"'"==ch)return state.tokenize=tokenString(ch),state.tokenize(stream,state);if("."==ch&&stream.match(/^\d+(?:[eE][+\-]?\d+)?/))return ret("number","number");if("."==ch&&stream.match(".."))return ret("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ch))return ret(ch);if("="==ch&&stream.eat(">"))return ret("=>","operator");if("0"==ch&&stream.eat(/x/i))return stream.eatWhile(/[\da-f]/i),ret("number","number");if(/\d/.test(ch))return stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),ret("number","number");if("/"==ch)return stream.eat("*")?(state.tokenize=tokenComment,tokenComment(stream,state)):stream.eat("/")?(stream.skipToEnd(),ret("comment","comment")):"operator"==state.lastType||"keyword c"==state.lastType||"sof"==state.lastType||/^[\[{}\(,;:]$/.test(state.lastType)?(readRegexp(stream),stream.eatWhile(/[gimy]/),ret("regexp","string-2")):(stream.eatWhile(isOperatorChar),ret("operator","operator",stream.current()));if("`"==ch)return state.tokenize=tokenQuasi,tokenQuasi(stream,state);if("#"==ch)return stream.skipToEnd(),ret("error","error");if(isOperatorChar.test(ch))return stream.eatWhile(isOperatorChar),ret("operator","operator",stream.current());if(wordRE.test(ch)){stream.eatWhile(wordRE);var word=stream.current(),known=keywords.propertyIsEnumerable(word)&&keywords[word];return known&&"."!=state.lastType?ret(known.type,known.style,word):ret("variable","variable",word)}}function tokenString(quote){return function(stream,state){var next,escaped=!1;if(jsonldMode&&"@"==stream.peek()&&stream.match(isJsonldKeyword))return state.tokenize=tokenBase,ret("jsonld-keyword","meta");for(;null!=(next=stream.next())&&(next!=quote||escaped);)escaped=!escaped&&"\\"==next;return escaped||(state.tokenize=tokenBase),ret("string","string")}}function tokenComment(stream,state){for(var ch,maybeEnd=!1;ch=stream.next();){if("/"==ch&&maybeEnd){state.tokenize=tokenBase;break}maybeEnd="*"==ch}return ret("comment","comment")}function tokenQuasi(stream,state){for(var next,escaped=!1;null!=(next=stream.next());){if(!escaped&&("`"==next||"$"==next&&stream.eat("{"))){state.tokenize=tokenBase;break}escaped=!escaped&&"\\"==next}return ret("quasi","string-2",stream.current())}function findFatArrow(stream,state){state.fatArrowAt&&(state.fatArrowAt=null);var arrow=stream.string.indexOf("=>",stream.start);if(!(0>arrow)){for(var depth=0,sawSomething=!1,pos=arrow-1;pos>=0;--pos){var ch=stream.string.charAt(pos),bracket=brackets.indexOf(ch);if(bracket>=0&&3>bracket){if(!depth){++pos;break}if(0==--depth)break}else if(bracket>=3&&6>bracket)++depth;else if(wordRE.test(ch))sawSomething=!0;else if(sawSomething&&!depth){++pos;break}}sawSomething&&!depth&&(state.fatArrowAt=pos)}}function JSLexical(indented,column,type,align,prev,info){this.indented=indented,this.column=column,this.type=type,this.prev=prev,this.info=info,null!=align&&(this.align=align)}function inScope(state,varname){for(var v=state.localVars;v;v=v.next)if(v.name==varname)return!0;for(var cx=state.context;cx;cx=cx.prev)for(var v=cx.vars;v;v=v.next)if(v.name==varname)return!0}function parseJS(state,style,type,content,stream){var cc=state.cc;for(cx.state=state,cx.stream=stream,cx.marked=null,cx.cc=cc,cx.style=style,state.lexical.hasOwnProperty("align")||(state.lexical.align=!0);;){var combinator=cc.length?cc.pop():jsonMode?expression:statement;if(combinator(type,content)){for(;cc.length&&cc[cc.length-1].lex;)cc.pop()();return cx.marked?cx.marked:"variable"==type&&inScope(state,content)?"variable-2":style}}}function pass(){for(var i=arguments.length-1;i>=0;i--)cx.cc.push(arguments[i])}function cont(){return pass.apply(null,arguments),!0}function register(varname){function inList(list){for(var v=list;v;v=v.next)if(v.name==varname)return!0;return!1}var state=cx.state;if(state.context){if(cx.marked="def",inList(state.localVars))return;state.localVars={name:varname,next:state.localVars}}else{if(inList(state.globalVars))return;parserConfig.globalVars&&(state.globalVars={name:varname,next:state.globalVars})}}function pushcontext(){cx.state.context={prev:cx.state.context,vars:cx.state.localVars},cx.state.localVars=defaultVars}function popcontext(){cx.state.localVars=cx.state.context.vars,cx.state.context=cx.state.context.prev}function pushlex(type,info){var result=function(){var state=cx.state,indent=state.indented;if("stat"==state.lexical.type)indent=state.lexical.indented;else for(var outer=state.lexical;outer&&")"==outer.type&&outer.align;outer=outer.prev)indent=outer.indented;state.lexical=new JSLexical(indent,cx.stream.column(),type,null,state.lexical,info)};return result.lex=!0,result}function poplex(){var state=cx.state;state.lexical.prev&&(")"==state.lexical.type&&(state.indented=state.lexical.indented),state.lexical=state.lexical.prev)}function expect(wanted){function exp(type){return type==wanted?cont():";"==wanted?pass():cont(exp)}return exp}function statement(type,value){return"var"==type?cont(pushlex("vardef",value.length),vardef,expect(";"),poplex):"keyword a"==type?cont(pushlex("form"),expression,statement,poplex):"keyword b"==type?cont(pushlex("form"),statement,poplex):"{"==type?cont(pushlex("}"),block,poplex):";"==type?cont():"if"==type?("else"==cx.state.lexical.info&&cx.state.cc[cx.state.cc.length-1]==poplex&&cx.state.cc.pop()(),cont(pushlex("form"),expression,statement,poplex,maybeelse)):"function"==type?cont(functiondef):"for"==type?cont(pushlex("form"),forspec,statement,poplex):"variable"==type?cont(pushlex("stat"),maybelabel):"switch"==type?cont(pushlex("form"),expression,pushlex("}","switch"),expect("{"),block,poplex,poplex):"case"==type?cont(expression,expect(":")):"default"==type?cont(expect(":")):"catch"==type?cont(pushlex("form"),pushcontext,expect("("),funarg,expect(")"),statement,poplex,popcontext):"module"==type?cont(pushlex("form"),pushcontext,afterModule,popcontext,poplex):"class"==type?cont(pushlex("form"),className,poplex):"export"==type?cont(pushlex("form"),afterExport,poplex):"import"==type?cont(pushlex("form"),afterImport,poplex):pass(pushlex("stat"),expression,expect(";"),poplex)}function expression(type){return expressionInner(type,!1)}function expressionNoComma(type){return expressionInner(type,!0)}function expressionInner(type,noComma){if(cx.state.fatArrowAt==cx.stream.start){var body=noComma?arrowBodyNoComma:arrowBody;if("("==type)return cont(pushcontext,pushlex(")"),commasep(pattern,")"),poplex,expect("=>"),body,popcontext);if("variable"==type)return pass(pushcontext,pattern,expect("=>"),body,popcontext)}var maybeop=noComma?maybeoperatorNoComma:maybeoperatorComma;return atomicTypes.hasOwnProperty(type)?cont(maybeop):"function"==type?cont(functiondef,maybeop):"keyword c"==type?cont(noComma?maybeexpressionNoComma:maybeexpression):"("==type?cont(pushlex(")"),maybeexpression,comprehension,expect(")"),poplex,maybeop):"operator"==type||"spread"==type?cont(noComma?expressionNoComma:expression):"["==type?cont(pushlex("]"),arrayLiteral,poplex,maybeop):"{"==type?contCommasep(objprop,"}",null,maybeop):"quasi"==type?pass(quasi,maybeop):cont()}function maybeexpression(type){return type.match(/[;\}\)\],]/)?pass():pass(expression)}function maybeexpressionNoComma(type){return type.match(/[;\}\)\],]/)?pass():pass(expressionNoComma)}function maybeoperatorComma(type,value){return","==type?cont(expression):maybeoperatorNoComma(type,value,!1)}function maybeoperatorNoComma(type,value,noComma){var me=0==noComma?maybeoperatorComma:maybeoperatorNoComma,expr=0==noComma?expression:expressionNoComma;return"=>"==type?cont(pushcontext,noComma?arrowBodyNoComma:arrowBody,popcontext):"operator"==type?/\+\+|--/.test(value)?cont(me):"?"==value?cont(expression,expect(":"),expr):cont(expr):"quasi"==type?pass(quasi,me):";"!=type?"("==type?contCommasep(expressionNoComma,")","call",me):"."==type?cont(property,me):"["==type?cont(pushlex("]"),maybeexpression,expect("]"),poplex,me):void 0:void 0}function quasi(type,value){return"quasi"!=type?pass():"${"!=value.slice(value.length-2)?cont(quasi):cont(expression,continueQuasi)}function continueQuasi(type){return"}"==type?(cx.marked="string-2",cx.state.tokenize=tokenQuasi,cont(quasi)):void 0}function arrowBody(type){return findFatArrow(cx.stream,cx.state),pass("{"==type?statement:expression)}function arrowBodyNoComma(type){return findFatArrow(cx.stream,cx.state),pass("{"==type?statement:expressionNoComma)}function maybelabel(type){return":"==type?cont(poplex,statement):pass(maybeoperatorComma,expect(";"),poplex)}function property(type){return"variable"==type?(cx.marked="property",cont()):void 0}function objprop(type,value){return"variable"==type||"keyword"==cx.style?(cx.marked="property",cont("get"==value||"set"==value?getterSetter:afterprop)):"number"==type||"string"==type?(cx.marked=jsonldMode?"property":cx.style+" property",cont(afterprop)):"jsonld-keyword"==type?cont(afterprop):"["==type?cont(expression,expect("]"),afterprop):void 0}function getterSetter(type){return"variable"!=type?pass(afterprop):(cx.marked="property",cont(functiondef))}function afterprop(type){return":"==type?cont(expressionNoComma):"("==type?pass(functiondef):void 0}function commasep(what,end){function proceed(type){if(","==type){var lex=cx.state.lexical;return"call"==lex.info&&(lex.pos=(lex.pos||0)+1),cont(what,proceed)}return type==end?cont():cont(expect(end))}return function(type){return type==end?cont():pass(what,proceed)}}function contCommasep(what,end,info){for(var i=3;i<arguments.length;i++)cx.cc.push(arguments[i]);return cont(pushlex(end,info),commasep(what,end),poplex)}function block(type){return"}"==type?cont():pass(statement,block)}function maybetype(type){return isTS&&":"==type?cont(typedef):void 0}function typedef(type){return"variable"==type?(cx.marked="variable-3",cont()):void 0}function vardef(){return pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(type,value){return"variable"==type?(register(value),cont()):"["==type?contCommasep(pattern,"]"):"{"==type?contCommasep(proppattern,"}"):void 0}function proppattern(type,value){return"variable"!=type||cx.stream.match(/^\s*:/,!1)?("variable"==type&&(cx.marked="property"),cont(expect(":"),pattern,maybeAssign)):(register(value),cont(maybeAssign))}function maybeAssign(_type,value){return"="==value?cont(expressionNoComma):void 0}function vardefCont(type){return","==type?cont(vardef):void 0}function maybeelse(type,value){return"keyword b"==type&&"else"==value?cont(pushlex("form","else"),statement,poplex):void 0}function forspec(type){return"("==type?cont(pushlex(")"),forspec1,expect(")"),poplex):void 0}function forspec1(type){return"var"==type?cont(vardef,expect(";"),forspec2):";"==type?cont(forspec2):"variable"==type?cont(formaybeinof):pass(expression,expect(";"),forspec2)}function formaybeinof(_type,value){return"in"==value||"of"==value?(cx.marked="keyword",cont(expression)):cont(maybeoperatorComma,forspec2)}function forspec2(type,value){return";"==type?cont(forspec3):"in"==value||"of"==value?(cx.marked="keyword",cont(expression)):pass(expression,expect(";"),forspec3)}function forspec3(type){")"!=type&&cont(expression)}function functiondef(type,value){return"*"==value?(cx.marked="keyword",cont(functiondef)):"variable"==type?(register(value),cont(functiondef)):"("==type?cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,statement,popcontext):void 0}function funarg(type){return"spread"==type?cont(funarg):pass(pattern,maybetype)}function className(type,value){return"variable"==type?(register(value),cont(classNameAfter)):void 0}function classNameAfter(type,value){return"extends"==value?cont(expression,classNameAfter):"{"==type?cont(pushlex("}"),classBody,poplex):void 0}function classBody(type,value){return"variable"==type||"keyword"==cx.style?(cx.marked="property","get"==value||"set"==value?cont(classGetterSetter,functiondef,classBody):cont(functiondef,classBody)):"*"==value?(cx.marked="keyword",cont(classBody)):";"==type?cont(classBody):"}"==type?cont():void 0}function classGetterSetter(type){return"variable"!=type?pass():(cx.marked="property",cont())}function afterModule(type,value){return"string"==type?cont(statement):"variable"==type?(register(value),cont(maybeFrom)):void 0}function afterExport(_type,value){return"*"==value?(cx.marked="keyword",cont(maybeFrom,expect(";"))):"default"==value?(cx.marked="keyword",cont(expression,expect(";"))):pass(statement)}function afterImport(type){return"string"==type?cont():pass(importSpec,maybeFrom)}function importSpec(type,value){return"{"==type?contCommasep(importSpec,"}"):("variable"==type&®ister(value),cont())}function maybeFrom(_type,value){return"from"==value?(cx.marked="keyword",cont(expression)):void 0}function arrayLiteral(type){return"]"==type?cont():pass(expressionNoComma,maybeArrayComprehension)}function maybeArrayComprehension(type){return"for"==type?pass(comprehension,expect("]")):","==type?cont(commasep(maybeexpressionNoComma,"]")):pass(commasep(expressionNoComma,"]"))}function comprehension(type){return"for"==type?cont(forspec,comprehension):"if"==type?cont(expression,comprehension):void 0}var type,content,indentUnit=config.indentUnit,statementIndent=parserConfig.statementIndent,jsonldMode=parserConfig.jsonld,jsonMode=parserConfig.json||jsonldMode,isTS=parserConfig.typescript,wordRE=parserConfig.wordCharacters||/[\w$\xa1-\uffff]/,keywords=function(){function kw(type){return{type:type,style:"keyword"}}var A=kw("keyword a"),B=kw("keyword b"),C=kw("keyword c"),operator=kw("operator"),atom={type:"atom",style:"atom"},jsKeywords={"if":kw("if"),"while":A,"with":A,"else":B,"do":B,"try":B,"finally":B,"return":C,"break":C,"continue":C,"new":C,"delete":C,"throw":C,"debugger":C,"var":kw("var"),"const":kw("var"),let:kw("var"),"function":kw("function"),"catch":kw("catch"),"for":kw("for"),"switch":kw("switch"),"case":kw("case"),"default":kw("default"),"in":operator,"typeof":operator,"instanceof":operator,"true":atom,"false":atom,"null":atom,undefined:atom,NaN:atom,Infinity:atom,"this":kw("this"),module:kw("module"),"class":kw("class"),"super":kw("atom"),"yield":C,"export":kw("export"),"import":kw("import"),"extends":C};if(isTS){var type={type:"variable",style:"variable-3"},tsKeywords={"interface":kw("interface"),"extends":kw("extends"),constructor:kw("constructor"),"public":kw("public"),"private":kw("private"),"protected":kw("protected"),"static":kw("static"),string:type,number:type,bool:type,any:type};for(var attr in tsKeywords)jsKeywords[attr]=tsKeywords[attr]}return jsKeywords}(),isOperatorChar=/[+\-*&%=<>!?|~^]/,isJsonldKeyword=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,brackets="([{}])",atomicTypes={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},cx={state:null,column:null,marked:null,cc:null},defaultVars={name:"this",next:{name:"arguments"}};return poplex.lex=!0,{startState:function(basecolumn){var state={tokenize:tokenBase,lastType:"sof",cc:[],lexical:new JSLexical((basecolumn||0)-indentUnit,0,"block",!1),localVars:parserConfig.localVars,context:parserConfig.localVars&&{vars:parserConfig.localVars},indented:0};return parserConfig.globalVars&&"object"==typeof parserConfig.globalVars&&(state.globalVars=parserConfig.globalVars),state},token:function(stream,state){if(stream.sol()&&(state.lexical.hasOwnProperty("align")||(state.lexical.align=!1),state.indented=stream.indentation(),findFatArrow(stream,state)),state.tokenize!=tokenComment&&stream.eatSpace())return null;var style=state.tokenize(stream,state);return"comment"==type?style:(state.lastType="operator"!=type||"++"!=content&&"--"!=content?type:"incdec",parseJS(state,style,type,content,stream))},indent:function(state,textAfter){if(state.tokenize==tokenComment)return CodeMirror.Pass;if(state.tokenize!=tokenBase)return 0;var firstChar=textAfter&&textAfter.charAt(0),lexical=state.lexical;if(!/^\s*else\b/.test(textAfter))for(var i=state.cc.length-1;i>=0;--i){var c=state.cc[i];if(c==poplex)lexical=lexical.prev;else if(c!=maybeelse)break}"stat"==lexical.type&&"}"==firstChar&&(lexical=lexical.prev),statementIndent&&")"==lexical.type&&"stat"==lexical.prev.type&&(lexical=lexical.prev);var type=lexical.type,closing=firstChar==type;return"vardef"==type?lexical.indented+("operator"==state.lastType||","==state.lastType?lexical.info+1:0):"form"==type&&"{"==firstChar?lexical.indented:"form"==type?lexical.indented+indentUnit:"stat"==type?lexical.indented+("operator"==state.lastType||","==state.lastType?statementIndent||indentUnit:0):"switch"!=lexical.info||closing||0==parserConfig.doubleIndentSwitch?lexical.align?lexical.column+(closing?0:1):lexical.indented+(closing?0:indentUnit):lexical.indented+(/^(?:case|default)\b/.test(textAfter)?indentUnit:2*indentUnit)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:jsonMode?null:"/*",blockCommentEnd:jsonMode?null:"*/",lineComment:jsonMode?null:"//",fold:"brace",helperType:jsonMode?"json":"javascript",jsonldMode:jsonldMode,jsonMode:jsonMode}}),CodeMirror.registerHelper("wordChars","javascript",/[\w$]/),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/x-javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function(){function classToString(klass){return klass.toString().split(".")[1]}var Promise=Ember.RSVP.Promise;Ember.OfflineAdapter=Ember.Adapter.extend({find:function(record,id){var data=this._getItem(record.constructor,id);return new Promise(function(resolve,reject){data?(record.load(id,data),resolve(record)):reject(record)})},findAll:function(klass,records){var self=this,applicationData=this.applicationData;return new Promise(function(resolve){var ids=applicationData.meta[classToString(klass)+"!ids"],data=[];if(ids){ids=ids.split(",");for(var i=0,l=ids.length;l>i;i++)data.push(self._getItem(klass,ids[i]))}records.load(klass,data),resolve(records)})},createRecord:function(record){var self=this,klass=record.constructor,applicationData=this.applicationData;return new Promise(function(resolve){var newId=applicationData.meta[classToString(klass)+"!nextId"]||"1";record.set(klass.primaryKey,newId);var data=record.toJSON();self._setItem(klass,newId,data),self._updateIds(klass,newId),applicationData.meta[classToString(klass)+"!nextId"]=parseInt(newId,10)+1,record.load(newId,data),record.didCreateRecord(),resolve(record)})},saveRecord:function(record){var self=this,klass=record.constructor;return new Promise(function(resolve){self._setItem(klass,record.get(klass.primaryKey),record.toJSON()),record.didSaveRecord(),resolve(record)})},deleteRecord:function(record){var self=this,klass=record.constructor;return new Promise(function(resolve){self._deleteItem(klass,record.get(klass.primaryKey)),record.didDeleteRecord(),resolve(record)})},_getItem:function(klass,id){var value=this.applicationData[klass][id];return value&&JSON.parse(value)},_setItem:function(klass,id,data){this.applicationData[klass]||(this.applicationData[klass]={}),this.applicationData[klass][id]=JSON.stringify(data)},_deleteItem:function(klass,id){delete this.applicationData[klass][id];for(var idsKey=classToString(klass)+"!ids",ids=this.applicationData.meta[idsKey].split(","),i=0,l=ids.length;l>i;i++)if(ids[i]===""+id){ids.splice(i,1);break}this.applicationData.meta[idsKey]=ids.join(",")},_updateIds:function(klass,newId){newId=String(newId);var key=classToString(klass)+"!ids",currentIds=this.applicationData.meta[key];currentIds?this.applicationData.meta[key]+=","+newId:this.applicationData.meta[key]=newId}})}();/*!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
Copyright Vassilis Petroulias [DRDigit]
|
25 |
|
26 |
Licensed under the Apache License, Version 2.0 (the "License");
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Panel - Required JS Modules
|
3 |
+
* @date May 2015
|
4 |
*/
|
5 |
/*!
|
6 |
* @overview Averta JavaScript Libraries
|
20 |
}}function buildTokenSplitSpaces(inner){function split(old){for(var out=" ",i=0;i<old.length-2;++i)out+=i%2?" ":" ";return out+=" "}return function(builder,text,style,startStyle,endStyle,title){inner(builder,text.replace(/ {3,}/g,split),style,startStyle,endStyle,title)}}function buildTokenBadBidi(inner,order){return function(builder,text,style,startStyle,endStyle,title){style=style?style+" cm-force-border":"cm-force-border";for(var start=builder.pos,end=start+text.length;;){for(var i=0;i<order.length;i++){var part=order[i];if(part.to>start&&part.from<=start)break}if(part.to>=end)return inner(builder,text,style,startStyle,endStyle,title);inner(builder,text.slice(0,part.to-start),style,startStyle,null,title),startStyle=null,text=text.slice(part.to-start),start=part.to}}}function buildCollapsedSpan(builder,size,marker,ignoreWidget){var widget=!ignoreWidget&&marker.widgetNode;widget&&(builder.map.push(builder.pos,builder.pos+size,widget),builder.content.appendChild(widget)),builder.pos+=size}function insertLineContent(line,builder,styles){var spans=line.markedSpans,allText=line.text,at=0;if(spans)for(var style,spanStyle,spanEndStyle,spanStartStyle,title,collapsed,len=allText.length,pos=0,i=1,text="",nextChange=0;;){if(nextChange==pos){spanStyle=spanEndStyle=spanStartStyle=title="",collapsed=null,nextChange=1/0;for(var foundBookmarks=[],j=0;j<spans.length;++j){var sp=spans[j],m=sp.marker;sp.from<=pos&&(null==sp.to||sp.to>pos)?(null!=sp.to&&nextChange>sp.to&&(nextChange=sp.to,spanEndStyle=""),m.className&&(spanStyle+=" "+m.className),m.startStyle&&sp.from==pos&&(spanStartStyle+=" "+m.startStyle),m.endStyle&&sp.to==nextChange&&(spanEndStyle+=" "+m.endStyle),m.title&&!title&&(title=m.title),m.collapsed&&(!collapsed||compareCollapsedMarkers(collapsed.marker,m)<0)&&(collapsed=sp)):sp.from>pos&&nextChange>sp.from&&(nextChange=sp.from),"bookmark"==m.type&&sp.from==pos&&m.widgetNode&&foundBookmarks.push(m)}if(collapsed&&(collapsed.from||0)==pos&&(buildCollapsedSpan(builder,(null==collapsed.to?len+1:collapsed.to)-pos,collapsed.marker,null==collapsed.from),null==collapsed.to))return;if(!collapsed&&foundBookmarks.length)for(var j=0;j<foundBookmarks.length;++j)buildCollapsedSpan(builder,0,foundBookmarks[j])}if(pos>=len)break;for(var upto=Math.min(len,nextChange);;){if(text){var end=pos+text.length;if(!collapsed){var tokenText=end>upto?text.slice(0,upto-pos):text;builder.addToken(builder,tokenText,style?style+spanStyle:spanStyle,spanStartStyle,pos+tokenText.length==nextChange?spanEndStyle:"",title)}if(end>=upto){text=text.slice(upto-pos),pos=upto;break}pos=end,spanStartStyle=""}text=allText.slice(at,at=styles[i++]),style=interpretTokenStyle(styles[i++],builder.cm.options)}}else for(var i=1;i<styles.length;i+=2)builder.addToken(builder,allText.slice(at,at=styles[i]),interpretTokenStyle(styles[i+1],builder.cm.options))}function isWholeLineUpdate(doc,change){return 0==change.from.ch&&0==change.to.ch&&""==lst(change.text)&&(!doc.cm||doc.cm.options.wholeLineUpdateBefore)}function updateDoc(doc,change,markedSpans,estimateHeight){function spansFor(n){return markedSpans?markedSpans[n]:null}function update(line,text,spans){updateLine(line,text,spans,estimateHeight),signalLater(line,"change",line,change)}var from=change.from,to=change.to,text=change.text,firstLine=getLine(doc,from.line),lastLine=getLine(doc,to.line),lastText=lst(text),lastSpans=spansFor(text.length-1),nlines=to.line-from.line;if(isWholeLineUpdate(doc,change)){for(var i=0,added=[];i<text.length-1;++i)added.push(new Line(text[i],spansFor(i),estimateHeight));update(lastLine,lastLine.text,lastSpans),nlines&&doc.remove(from.line,nlines),added.length&&doc.insert(from.line,added)}else if(firstLine==lastLine)if(1==text.length)update(firstLine,firstLine.text.slice(0,from.ch)+lastText+firstLine.text.slice(to.ch),lastSpans);else{for(var added=[],i=1;i<text.length-1;++i)added.push(new Line(text[i],spansFor(i),estimateHeight));added.push(new Line(lastText+firstLine.text.slice(to.ch),lastSpans,estimateHeight)),update(firstLine,firstLine.text.slice(0,from.ch)+text[0],spansFor(0)),doc.insert(from.line+1,added)}else if(1==text.length)update(firstLine,firstLine.text.slice(0,from.ch)+text[0]+lastLine.text.slice(to.ch),spansFor(0)),doc.remove(from.line+1,nlines);else{update(firstLine,firstLine.text.slice(0,from.ch)+text[0],spansFor(0)),update(lastLine,lastText+lastLine.text.slice(to.ch),lastSpans);for(var i=1,added=[];i<text.length-1;++i)added.push(new Line(text[i],spansFor(i),estimateHeight));nlines>1&&doc.remove(from.line+1,nlines-1),doc.insert(from.line+1,added)}signalLater(doc,"change",doc,change)}function LeafChunk(lines){this.lines=lines,this.parent=null;for(var i=0,height=0;i<lines.length;++i)lines[i].parent=this,height+=lines[i].height;this.height=height}function BranchChunk(children){this.children=children;for(var size=0,height=0,i=0;i<children.length;++i){var ch=children[i];size+=ch.chunkSize(),height+=ch.height,ch.parent=this}this.size=size,this.height=height,this.parent=null}function linkedDocs(doc,f,sharedHistOnly){function propagate(doc,skip,sharedHist){if(doc.linked)for(var i=0;i<doc.linked.length;++i){var rel=doc.linked[i];if(rel.doc!=skip){var shared=sharedHist&&rel.sharedHist;(!sharedHistOnly||shared)&&(f(rel.doc,shared),propagate(rel.doc,doc,shared))}}}propagate(doc,null,!0)}function attachDoc(cm,doc){if(doc.cm)throw new Error("This document is already in use.");cm.doc=doc,doc.cm=cm,estimateLineHeights(cm),loadMode(cm),cm.options.lineWrapping||findMaxLine(cm),cm.options.mode=doc.modeOption,regChange(cm)}function getLine(doc,n){if(n-=doc.first,0>n||n>=doc.size)throw new Error("There is no line "+(n+doc.first)+" in the document.");for(var chunk=doc;!chunk.lines;)for(var i=0;;++i){var child=chunk.children[i],sz=child.chunkSize();if(sz>n){chunk=child;break}n-=sz}return chunk.lines[n]}function getBetween(doc,start,end){var out=[],n=start.line;return doc.iter(start.line,end.line+1,function(line){var text=line.text;n==end.line&&(text=text.slice(0,end.ch)),n==start.line&&(text=text.slice(start.ch)),out.push(text),++n}),out}function getLines(doc,from,to){var out=[];return doc.iter(from,to,function(line){out.push(line.text)}),out}function updateLineHeight(line,height){var diff=height-line.height;if(diff)for(var n=line;n;n=n.parent)n.height+=diff}function lineNo(line){if(null==line.parent)return null;for(var cur=line.parent,no=indexOf(cur.lines,line),chunk=cur.parent;chunk;cur=chunk,chunk=chunk.parent)for(var i=0;chunk.children[i]!=cur;++i)no+=chunk.children[i].chunkSize();return no+cur.first}function lineAtHeight(chunk,h){var n=chunk.first;outer:do{for(var i=0;i<chunk.children.length;++i){var child=chunk.children[i],ch=child.height;if(ch>h){chunk=child;continue outer}h-=ch,n+=child.chunkSize()}return n}while(!chunk.lines);for(var i=0;i<chunk.lines.length;++i){var line=chunk.lines[i],lh=line.height;if(lh>h)break;h-=lh}return n+i}function heightAtLine(lineObj){lineObj=visualLine(lineObj);for(var h=0,chunk=lineObj.parent,i=0;i<chunk.lines.length;++i){var line=chunk.lines[i];if(line==lineObj)break;h+=line.height}for(var p=chunk.parent;p;chunk=p,p=chunk.parent)for(var i=0;i<p.children.length;++i){var cur=p.children[i];if(cur==chunk)break;h+=cur.height}return h}function getOrder(line){var order=line.order;return null==order&&(order=line.order=bidiOrdering(line.text)),order}function History(startGen){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=startGen||1}function historyChangeFromChange(doc,change){var histChange={from:copyPos(change.from),to:changeEnd(change),text:getBetween(doc,change.from,change.to)};return attachLocalSpans(doc,histChange,change.from.line,change.to.line+1),linkedDocs(doc,function(doc){attachLocalSpans(doc,histChange,change.from.line,change.to.line+1)},!0),histChange}function clearSelectionEvents(array){for(;array.length;){var last=lst(array);if(!last.ranges)break;array.pop()}}function lastChangeEvent(hist,force){return force?(clearSelectionEvents(hist.done),lst(hist.done)):hist.done.length&&!lst(hist.done).ranges?lst(hist.done):hist.done.length>1&&!hist.done[hist.done.length-2].ranges?(hist.done.pop(),lst(hist.done)):void 0}function addChangeToHistory(doc,change,selAfter,opId){var hist=doc.history;hist.undone.length=0;var cur,time=+new Date;if((hist.lastOp==opId||hist.lastOrigin==change.origin&&change.origin&&("+"==change.origin.charAt(0)&&doc.cm&&hist.lastModTime>time-doc.cm.options.historyEventDelay||"*"==change.origin.charAt(0)))&&(cur=lastChangeEvent(hist,hist.lastOp==opId))){var last=lst(cur.changes);0==cmp(change.from,change.to)&&0==cmp(change.from,last.to)?last.to=changeEnd(change):cur.changes.push(historyChangeFromChange(doc,change))}else{var before=lst(hist.done);for(before&&before.ranges||pushSelectionToHistory(doc.sel,hist.done),cur={changes:[historyChangeFromChange(doc,change)],generation:hist.generation},hist.done.push(cur);hist.done.length>hist.undoDepth;)hist.done.shift(),hist.done[0].ranges||hist.done.shift()}hist.done.push(selAfter),hist.generation=++hist.maxGeneration,hist.lastModTime=hist.lastSelTime=time,hist.lastOp=hist.lastSelOp=opId,hist.lastOrigin=hist.lastSelOrigin=change.origin,last||signal(doc,"historyAdded")}function selectionEventCanBeMerged(doc,origin,prev,sel){var ch=origin.charAt(0);return"*"==ch||"+"==ch&&prev.ranges.length==sel.ranges.length&&prev.somethingSelected()==sel.somethingSelected()&&new Date-doc.history.lastSelTime<=(doc.cm?doc.cm.options.historyEventDelay:500)}function addSelectionToHistory(doc,sel,opId,options){var hist=doc.history,origin=options&&options.origin;opId==hist.lastSelOp||origin&&hist.lastSelOrigin==origin&&(hist.lastModTime==hist.lastSelTime&&hist.lastOrigin==origin||selectionEventCanBeMerged(doc,origin,lst(hist.done),sel))?hist.done[hist.done.length-1]=sel:pushSelectionToHistory(sel,hist.done),hist.lastSelTime=+new Date,hist.lastSelOrigin=origin,hist.lastSelOp=opId,options&&options.clearRedo!==!1&&clearSelectionEvents(hist.undone)}function pushSelectionToHistory(sel,dest){var top=lst(dest);top&&top.ranges&&top.equals(sel)||dest.push(sel)}function attachLocalSpans(doc,change,from,to){var existing=change["spans_"+doc.id],n=0;doc.iter(Math.max(doc.first,from),Math.min(doc.first+doc.size,to),function(line){line.markedSpans&&((existing||(existing=change["spans_"+doc.id]={}))[n]=line.markedSpans),++n})}function removeClearedSpans(spans){if(!spans)return null;for(var out,i=0;i<spans.length;++i)spans[i].marker.explicitlyCleared?out||(out=spans.slice(0,i)):out&&out.push(spans[i]);return out?out.length?out:null:spans}function getOldSpans(doc,change){var found=change["spans_"+doc.id];if(!found)return null;for(var i=0,nw=[];i<change.text.length;++i)nw.push(removeClearedSpans(found[i]));return nw}function copyHistoryArray(events,newGroup,instantiateSel){for(var i=0,copy=[];i<events.length;++i){var event=events[i];if(event.ranges)copy.push(instantiateSel?Selection.prototype.deepCopy.call(event):event);else{var changes=event.changes,newChanges=[];copy.push({changes:newChanges});for(var j=0;j<changes.length;++j){var m,change=changes[j];if(newChanges.push({from:change.from,to:change.to,text:change.text}),newGroup)for(var prop in change)(m=prop.match(/^spans_(\d+)$/))&&indexOf(newGroup,Number(m[1]))>-1&&(lst(newChanges)[prop]=change[prop],delete change[prop])}}}return copy}function rebaseHistSelSingle(pos,from,to,diff){to<pos.line?pos.line+=diff:from<pos.line&&(pos.line=from,pos.ch=0)}function rebaseHistArray(array,from,to,diff){for(var i=0;i<array.length;++i){var sub=array[i],ok=!0;if(sub.ranges){sub.copied||(sub=array[i]=sub.deepCopy(),sub.copied=!0);for(var j=0;j<sub.ranges.length;j++)rebaseHistSelSingle(sub.ranges[j].anchor,from,to,diff),rebaseHistSelSingle(sub.ranges[j].head,from,to,diff)}else{for(var j=0;j<sub.changes.length;++j){var cur=sub.changes[j];if(to<cur.from.line)cur.from=Pos(cur.from.line+diff,cur.from.ch),cur.to=Pos(cur.to.line+diff,cur.to.ch);else if(from<=cur.to.line){ok=!1;break}}ok||(array.splice(0,i+1),i=0)}}}function rebaseHist(hist,change){var from=change.from.line,to=change.to.line,diff=change.text.length-(to-from)-1;rebaseHistArray(hist.done,from,to,diff),rebaseHistArray(hist.undone,from,to,diff)}function e_defaultPrevented(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function e_target(e){return e.target||e.srcElement}function e_button(e){var b=e.which;return null==b&&(1&e.button?b=1:2&e.button?b=3:4&e.button&&(b=2)),mac&&e.ctrlKey&&1==b&&(b=3),b}function signalLater(emitter,type){function bnd(f){return function(){f.apply(null,args)}}var arr=emitter._handlers&&emitter._handlers[type];if(arr){var list,args=Array.prototype.slice.call(arguments,2);operationGroup?list=operationGroup.delayedCallbacks:orphanDelayedCallbacks?list=orphanDelayedCallbacks:(list=orphanDelayedCallbacks=[],setTimeout(fireOrphanDelayed,0));for(var i=0;i<arr.length;++i)list.push(bnd(arr[i]))}}function fireOrphanDelayed(){var delayed=orphanDelayedCallbacks;orphanDelayedCallbacks=null;for(var i=0;i<delayed.length;++i)delayed[i]()}function signalDOMEvent(cm,e,override){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),signal(cm,override||e.type,cm,e),e_defaultPrevented(e)||e.codemirrorIgnore}function signalCursorActivity(cm){var arr=cm._handlers&&cm._handlers.cursorActivity;if(arr)for(var set=cm.curOp.cursorActivityHandlers||(cm.curOp.cursorActivityHandlers=[]),i=0;i<arr.length;++i)-1==indexOf(set,arr[i])&&set.push(arr[i])}function hasHandler(emitter,type){var arr=emitter._handlers&&emitter._handlers[type];return arr&&arr.length>0}function eventMixin(ctor){ctor.prototype.on=function(type,f){on(this,type,f)},ctor.prototype.off=function(type,f){off(this,type,f)}}function Delayed(){this.id=null}function findColumn(string,goal,tabSize){for(var pos=0,col=0;;){var nextTab=string.indexOf(" ",pos);-1==nextTab&&(nextTab=string.length);var skipped=nextTab-pos;if(nextTab==string.length||col+skipped>=goal)return pos+Math.min(skipped,goal-col);if(col+=nextTab-pos,col+=tabSize-col%tabSize,pos=nextTab+1,col>=goal)return pos}}function spaceStr(n){for(;spaceStrs.length<=n;)spaceStrs.push(lst(spaceStrs)+" ");return spaceStrs[n]}function lst(arr){return arr[arr.length-1]}function indexOf(array,elt){for(var i=0;i<array.length;++i)if(array[i]==elt)return i;return-1}function map(array,f){for(var out=[],i=0;i<array.length;i++)out[i]=f(array[i],i);return out}function createObj(base,props){var inst;if(Object.create)inst=Object.create(base);else{var ctor=function(){};ctor.prototype=base,inst=new ctor}return props&©Obj(props,inst),inst}function copyObj(obj,target,overwrite){target||(target={});for(var prop in obj)!obj.hasOwnProperty(prop)||overwrite===!1&&target.hasOwnProperty(prop)||(target[prop]=obj[prop]);return target}function bind(f){var args=Array.prototype.slice.call(arguments,1);return function(){return f.apply(null,args)}}function isWordChar(ch,helper){return helper?helper.source.indexOf("\\w")>-1&&isWordCharBasic(ch)?!0:helper.test(ch):isWordCharBasic(ch)}function isEmpty(obj){for(var n in obj)if(obj.hasOwnProperty(n)&&obj[n])return!1;return!0}function isExtendingChar(ch){return ch.charCodeAt(0)>=768&&extendingChars.test(ch)}function elt(tag,content,className,style){var e=document.createElement(tag);if(className&&(e.className=className),style&&(e.style.cssText=style),"string"==typeof content)e.appendChild(document.createTextNode(content));else if(content)for(var i=0;i<content.length;++i)e.appendChild(content[i]);return e}function removeChildren(e){for(var count=e.childNodes.length;count>0;--count)e.removeChild(e.firstChild);return e}function removeChildrenAndAdd(parent,e){return removeChildren(parent).appendChild(e)}function contains(parent,child){if(parent.contains)return parent.contains(child);for(;child=child.parentNode;)if(child==parent)return!0}function activeElt(){return document.activeElement}function classTest(cls){return new RegExp("(^|\\s)"+cls+"(?:$|\\s)\\s*")}function joinClasses(a,b){for(var as=a.split(" "),i=0;i<as.length;i++)as[i]&&!classTest(as[i]).test(b)&&(b+=" "+as[i]);return b}function forEachCodeMirror(f){if(document.body.getElementsByClassName)for(var byClass=document.body.getElementsByClassName("CodeMirror"),i=0;i<byClass.length;i++){var cm=byClass[i].CodeMirror;cm&&f(cm)}}function ensureGlobalHandlers(){globalsRegistered||(registerGlobalHandlers(),globalsRegistered=!0)}function registerGlobalHandlers(){var resizeTimer;on(window,"resize",function(){null==resizeTimer&&(resizeTimer=setTimeout(function(){resizeTimer=null,knownScrollbarWidth=null,forEachCodeMirror(onResize)},100))}),on(window,"blur",function(){forEachCodeMirror(onBlur)})}function scrollbarWidth(measure){if(null!=knownScrollbarWidth)return knownScrollbarWidth;var test=elt("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return removeChildrenAndAdd(measure,test),test.offsetWidth&&(knownScrollbarWidth=test.offsetHeight-test.clientHeight),knownScrollbarWidth||0}function zeroWidthElement(measure){if(null==zwspSupported){var test=elt("span","");removeChildrenAndAdd(measure,elt("span",[test,document.createTextNode("x")])),0!=measure.firstChild.offsetHeight&&(zwspSupported=test.offsetWidth<=1&&test.offsetHeight>2&&!(ie&&8>ie_version))}return zwspSupported?elt("span",""):elt("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function hasBadBidiRects(measure){if(null!=badBidiRects)return badBidiRects;var txt=removeChildrenAndAdd(measure,document.createTextNode("AخA")),r0=range(txt,0,1).getBoundingClientRect();if(!r0||r0.left==r0.right)return!1;var r1=range(txt,1,2).getBoundingClientRect();return badBidiRects=r1.right-r0.right<3}function hasBadZoomedRects(measure){if(null!=badZoomedRects)return badZoomedRects;var node=removeChildrenAndAdd(measure,elt("span","x")),normal=node.getBoundingClientRect(),fromRange=range(node,0,1).getBoundingClientRect();return badZoomedRects=Math.abs(normal.left-fromRange.left)>1}function iterateBidiSections(order,from,to,f){if(!order)return f(from,to,"ltr");for(var found=!1,i=0;i<order.length;++i){var part=order[i];(part.from<to&&part.to>from||from==to&&part.to==from)&&(f(Math.max(part.from,from),Math.min(part.to,to),1==part.level?"rtl":"ltr"),found=!0)}found||f(from,to,"ltr")}function bidiLeft(part){return part.level%2?part.to:part.from}function bidiRight(part){return part.level%2?part.from:part.to}function lineLeft(line){var order=getOrder(line);return order?bidiLeft(order[0]):0}function lineRight(line){var order=getOrder(line);return order?bidiRight(lst(order)):line.text.length}function lineStart(cm,lineN){var line=getLine(cm.doc,lineN),visual=visualLine(line);visual!=line&&(lineN=lineNo(visual));var order=getOrder(visual),ch=order?order[0].level%2?lineRight(visual):lineLeft(visual):0;return Pos(lineN,ch)}function lineEnd(cm,lineN){for(var merged,line=getLine(cm.doc,lineN);merged=collapsedSpanAtEnd(line);)line=merged.find(1,!0).line,lineN=null;var order=getOrder(line),ch=order?order[0].level%2?lineLeft(line):lineRight(line):line.text.length;return Pos(null==lineN?lineNo(line):lineN,ch)}function lineStartSmart(cm,pos){var start=lineStart(cm,pos.line),line=getLine(cm.doc,start.line),order=getOrder(line);if(!order||0==order[0].level){var firstNonWS=Math.max(0,line.text.search(/\S/)),inWS=pos.line==start.line&&pos.ch<=firstNonWS&&pos.ch;return Pos(start.line,inWS?0:firstNonWS)}return start}function compareBidiLevel(order,a,b){var linedir=order[0].level;return a==linedir?!0:b==linedir?!1:b>a}function getBidiPartAt(order,pos){bidiOther=null;for(var found,i=0;i<order.length;++i){var cur=order[i];if(cur.from<pos&&cur.to>pos)return i;if(cur.from==pos||cur.to==pos){if(null!=found)return compareBidiLevel(order,cur.level,order[found].level)?(cur.from!=cur.to&&(bidiOther=found),i):(cur.from!=cur.to&&(bidiOther=i),found);found=i}}return found}function moveInLine(line,pos,dir,byUnit){if(!byUnit)return pos+dir;do pos+=dir;while(pos>0&&isExtendingChar(line.text.charAt(pos)));return pos}function moveVisually(line,start,dir,byUnit){var bidi=getOrder(line);if(!bidi)return moveLogically(line,start,dir,byUnit);for(var pos=getBidiPartAt(bidi,start),part=bidi[pos],target=moveInLine(line,start,part.level%2?-dir:dir,byUnit);;){if(target>part.from&&target<part.to)return target;if(target==part.from||target==part.to)return getBidiPartAt(bidi,target)==pos?target:(part=bidi[pos+=dir],dir>0==part.level%2?part.to:part.from);if(part=bidi[pos+=dir],!part)return null;target=dir>0==part.level%2?moveInLine(line,part.to,-1,byUnit):moveInLine(line,part.from,1,byUnit)}}function moveLogically(line,start,dir,byUnit){var target=start+dir;if(byUnit)for(;target>0&&isExtendingChar(line.text.charAt(target));)target+=dir;return 0>target||target>line.text.length?null:target}var gecko=/gecko\/\d/i.test(navigator.userAgent),ie_upto10=/MSIE \d/.test(navigator.userAgent),ie_11up=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ie=ie_upto10||ie_11up,ie_version=ie&&(ie_upto10?document.documentMode||6:ie_11up[1]),webkit=/WebKit\//.test(navigator.userAgent),qtwebkit=webkit&&/Qt\/\d+\.\d+/.test(navigator.userAgent),chrome=/Chrome\//.test(navigator.userAgent),presto=/Opera\//.test(navigator.userAgent),safari=/Apple Computer/.test(navigator.vendor),khtml=/KHTML\//.test(navigator.userAgent),mac_geMountainLion=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),phantom=/PhantomJS/.test(navigator.userAgent),ios=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),mobile=ios||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),mac=ios||/Mac/.test(navigator.platform),windows=/win/i.test(navigator.platform),presto_version=presto&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);presto_version&&(presto_version=Number(presto_version[1])),presto_version&&presto_version>=15&&(presto=!1,webkit=!0);var flipCtrlCmd=mac&&(qtwebkit||presto&&(null==presto_version||12.11>presto_version)),captureRightClick=gecko||ie&&ie_version>=9,sawReadOnlySpans=!1,sawCollapsedSpans=!1,Pos=CodeMirror.Pos=function(line,ch){return this instanceof Pos?(this.line=line,void(this.ch=ch)):new Pos(line,ch)},cmp=CodeMirror.cmpPos=function(a,b){return a.line-b.line||a.ch-b.ch};Selection.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(other){if(other==this)return!0;if(other.primIndex!=this.primIndex||other.ranges.length!=this.ranges.length)return!1;for(var i=0;i<this.ranges.length;i++){var here=this.ranges[i],there=other.ranges[i];if(0!=cmp(here.anchor,there.anchor)||0!=cmp(here.head,there.head))return!1}return!0},deepCopy:function(){for(var out=[],i=0;i<this.ranges.length;i++)out[i]=new Range(copyPos(this.ranges[i].anchor),copyPos(this.ranges[i].head));return new Selection(out,this.primIndex)},somethingSelected:function(){for(var i=0;i<this.ranges.length;i++)if(!this.ranges[i].empty())return!0;return!1},contains:function(pos,end){end||(end=pos);for(var i=0;i<this.ranges.length;i++){var range=this.ranges[i];if(cmp(end,range.from())>=0&&cmp(pos,range.to())<=0)return i}return-1}},Range.prototype={from:function(){return minPos(this.anchor,this.head)},to:function(){return maxPos(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};var measureText,lastClick,lastDoubleClick,nullRect={left:0,right:0,top:0,bottom:0},operationGroup=null,nextOpId=0,lastCopied=null,lastDrop=0,wheelSamples=0,wheelPixelsPerUnit=null;ie?wheelPixelsPerUnit=-.53:gecko?wheelPixelsPerUnit=15:chrome?wheelPixelsPerUnit=-.7:safari&&(wheelPixelsPerUnit=-1/3);var stopSeq=new Delayed,lastStoppedKey=null,changeEnd=CodeMirror.changeEnd=function(change){return change.text?Pos(change.from.line+change.text.length-1,lst(change.text).length+(1==change.text.length?change.from.ch:0)):change.to};CodeMirror.prototype={constructor:CodeMirror,focus:function(){window.focus(),focusInput(this),fastPoll(this)},setOption:function(option,value){var options=this.options,old=options[option];(options[option]!=value||"mode"==option)&&(options[option]=value,optionHandlers.hasOwnProperty(option)&&operation(this,optionHandlers[option])(this,value,old))},getOption:function(option){return this.options[option]},getDoc:function(){return this.doc},addKeyMap:function(map,bottom){this.state.keyMaps[bottom?"push":"unshift"](getKeyMap(map))},removeKeyMap:function(map){for(var maps=this.state.keyMaps,i=0;i<maps.length;++i)if(maps[i]==map||maps[i].name==map)return maps.splice(i,1),!0},addOverlay:methodOp(function(spec,options){var mode=spec.token?spec:CodeMirror.getMode(this.options,spec);if(mode.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:mode,modeSpec:spec,opaque:options&&options.opaque}),this.state.modeGen++,regChange(this)}),removeOverlay:methodOp(function(spec){for(var overlays=this.state.overlays,i=0;i<overlays.length;++i){var cur=overlays[i].modeSpec;if(cur==spec||"string"==typeof spec&&cur.name==spec)return overlays.splice(i,1),this.state.modeGen++,void regChange(this)}}),indentLine:methodOp(function(n,dir,aggressive){"string"!=typeof dir&&"number"!=typeof dir&&(dir=null==dir?this.options.smartIndent?"smart":"prev":dir?"add":"subtract"),isLine(this.doc,n)&&indentLine(this,n,dir,aggressive)}),indentSelection:methodOp(function(how){for(var ranges=this.doc.sel.ranges,end=-1,i=0;i<ranges.length;i++){var range=ranges[i];if(range.empty())range.head.line>end&&(indentLine(this,range.head.line,how,!0),end=range.head.line,i==this.doc.sel.primIndex&&ensureCursorVisible(this));else{var from=range.from(),to=range.to(),start=Math.max(end,from.line);end=Math.min(this.lastLine(),to.line-(to.ch?0:1))+1;for(var j=start;end>j;++j)indentLine(this,j,how);var newRanges=this.doc.sel.ranges;0==from.ch&&ranges.length==newRanges.length&&newRanges[i].from().ch>0&&replaceOneSelection(this.doc,i,new Range(from,newRanges[i].to()),sel_dontScroll)}}}),getTokenAt:function(pos,precise){return takeToken(this,pos,precise)},getLineTokens:function(line,precise){return takeToken(this,Pos(line),precise,!0)},getTokenTypeAt:function(pos){pos=clipPos(this.doc,pos);var type,styles=getLineStyles(this,getLine(this.doc,pos.line)),before=0,after=(styles.length-1)/2,ch=pos.ch;if(0==ch)type=styles[2];else for(;;){var mid=before+after>>1;if((mid?styles[2*mid-1]:0)>=ch)after=mid;else{if(!(styles[2*mid+1]<ch)){type=styles[2*mid+2];break}before=mid+1}}var cut=type?type.indexOf("cm-overlay "):-1;return 0>cut?type:0==cut?null:type.slice(0,cut-1)},getModeAt:function(pos){var mode=this.doc.mode;return mode.innerMode?CodeMirror.innerMode(mode,this.getTokenAt(pos).state).mode:mode},getHelper:function(pos,type){return this.getHelpers(pos,type)[0]},getHelpers:function(pos,type){var found=[];if(!helpers.hasOwnProperty(type))return helpers;var help=helpers[type],mode=this.getModeAt(pos);if("string"==typeof mode[type])help[mode[type]]&&found.push(help[mode[type]]);else if(mode[type])for(var i=0;i<mode[type].length;i++){var val=help[mode[type][i]];val&&found.push(val)}else mode.helperType&&help[mode.helperType]?found.push(help[mode.helperType]):help[mode.name]&&found.push(help[mode.name]);for(var i=0;i<help._global.length;i++){var cur=help._global[i];cur.pred(mode,this)&&-1==indexOf(found,cur.val)&&found.push(cur.val)}return found},getStateAfter:function(line,precise){var doc=this.doc;return line=clipLine(doc,null==line?doc.first+doc.size-1:line),getStateBefore(this,line+1,precise)},cursorCoords:function(start,mode){var pos,range=this.doc.sel.primary();return pos=null==start?range.head:"object"==typeof start?clipPos(this.doc,start):start?range.from():range.to(),cursorCoords(this,pos,mode||"page")},charCoords:function(pos,mode){return charCoords(this,clipPos(this.doc,pos),mode||"page")},coordsChar:function(coords,mode){return coords=fromCoordSystem(this,coords,mode||"page"),coordsChar(this,coords.left,coords.top)},lineAtHeight:function(height,mode){return height=fromCoordSystem(this,{top:height,left:0},mode||"page").top,lineAtHeight(this.doc,height+this.display.viewOffset)},heightAtLine:function(line,mode){var end=!1,last=this.doc.first+this.doc.size-1;line<this.doc.first?line=this.doc.first:line>last&&(line=last,end=!0);var lineObj=getLine(this.doc,line);return intoCoordSystem(this,lineObj,{top:0,left:0},mode||"page").top+(end?this.doc.height-heightAtLine(lineObj):0)},defaultTextHeight:function(){return textHeight(this.display)},defaultCharWidth:function(){return charWidth(this.display)},setGutterMarker:methodOp(function(line,gutterID,value){return changeLine(this.doc,line,"gutter",function(line){var markers=line.gutterMarkers||(line.gutterMarkers={});return markers[gutterID]=value,!value&&isEmpty(markers)&&(line.gutterMarkers=null),!0})}),clearGutter:methodOp(function(gutterID){var cm=this,doc=cm.doc,i=doc.first;doc.iter(function(line){line.gutterMarkers&&line.gutterMarkers[gutterID]&&(line.gutterMarkers[gutterID]=null,regLineChange(cm,i,"gutter"),isEmpty(line.gutterMarkers)&&(line.gutterMarkers=null)),++i})}),addLineWidget:methodOp(function(handle,node,options){return addLineWidget(this,handle,node,options)}),removeLineWidget:function(widget){widget.clear()},lineInfo:function(line){if("number"==typeof line){if(!isLine(this.doc,line))return null;var n=line;if(line=getLine(this.doc,line),!line)return null}else{var n=lineNo(line);if(null==n)return null}return{line:n,handle:line,text:line.text,gutterMarkers:line.gutterMarkers,textClass:line.textClass,bgClass:line.bgClass,wrapClass:line.wrapClass,widgets:line.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(pos,node,scroll,vert,horiz){var display=this.display;pos=cursorCoords(this,clipPos(this.doc,pos));var top=pos.bottom,left=pos.left;if(node.style.position="absolute",display.sizer.appendChild(node),"over"==vert)top=pos.top;else if("above"==vert||"near"==vert){var vspace=Math.max(display.wrapper.clientHeight,this.doc.height),hspace=Math.max(display.sizer.clientWidth,display.lineSpace.clientWidth);("above"==vert||pos.bottom+node.offsetHeight>vspace)&&pos.top>node.offsetHeight?top=pos.top-node.offsetHeight:pos.bottom+node.offsetHeight<=vspace&&(top=pos.bottom),left+node.offsetWidth>hspace&&(left=hspace-node.offsetWidth)}node.style.top=top+"px",node.style.left=node.style.right="","right"==horiz?(left=display.sizer.clientWidth-node.offsetWidth,node.style.right="0px"):("left"==horiz?left=0:"middle"==horiz&&(left=(display.sizer.clientWidth-node.offsetWidth)/2),node.style.left=left+"px"),scroll&&scrollIntoView(this,left,top,left+node.offsetWidth,top+node.offsetHeight)},triggerOnKeyDown:methodOp(onKeyDown),triggerOnKeyPress:methodOp(onKeyPress),triggerOnKeyUp:onKeyUp,execCommand:function(cmd){return commands.hasOwnProperty(cmd)?commands[cmd](this):void 0},findPosH:function(from,amount,unit,visually){var dir=1;0>amount&&(dir=-1,amount=-amount);for(var i=0,cur=clipPos(this.doc,from);amount>i&&(cur=findPosH(this.doc,cur,dir,unit,visually),!cur.hitSide);++i);return cur},moveH:methodOp(function(dir,unit){var cm=this;cm.extendSelectionsBy(function(range){return cm.display.shift||cm.doc.extend||range.empty()?findPosH(cm.doc,range.head,dir,unit,cm.options.rtlMoveVisually):0>dir?range.from():range.to()},sel_move)}),deleteH:methodOp(function(dir,unit){var sel=this.doc.sel,doc=this.doc;sel.somethingSelected()?doc.replaceSelection("",null,"+delete"):deleteNearSelection(this,function(range){var other=findPosH(doc,range.head,dir,unit,!1);return 0>dir?{from:other,to:range.head}:{from:range.head,to:other}})}),findPosV:function(from,amount,unit,goalColumn){var dir=1,x=goalColumn;0>amount&&(dir=-1,amount=-amount);for(var i=0,cur=clipPos(this.doc,from);amount>i;++i){var coords=cursorCoords(this,cur,"div");if(null==x?x=coords.left:coords.left=x,cur=findPosV(this,coords,dir,unit),cur.hitSide)break}return cur},moveV:methodOp(function(dir,unit){var cm=this,doc=this.doc,goals=[],collapse=!cm.display.shift&&!doc.extend&&doc.sel.somethingSelected();
|
21 |
if(doc.extendSelectionsBy(function(range){if(collapse)return 0>dir?range.from():range.to();var headPos=cursorCoords(cm,range.head,"div");null!=range.goalColumn&&(headPos.left=range.goalColumn),goals.push(headPos.left);var pos=findPosV(cm,headPos,dir,unit);return"page"==unit&&range==doc.sel.primary()&&addToScrollPos(cm,null,charCoords(cm,pos,"div").top-headPos.top),pos},sel_move),goals.length)for(var i=0;i<doc.sel.ranges.length;i++)doc.sel.ranges[i].goalColumn=goals[i]}),findWordAt:function(pos){var doc=this.doc,line=getLine(doc,pos.line).text,start=pos.ch,end=pos.ch;if(line){var helper=this.getHelper(pos,"wordChars");(pos.xRel<0||end==line.length)&&start?--start:++end;for(var startChar=line.charAt(start),check=isWordChar(startChar,helper)?function(ch){return isWordChar(ch,helper)}:/\s/.test(startChar)?function(ch){return/\s/.test(ch)}:function(ch){return!/\s/.test(ch)&&!isWordChar(ch)};start>0&&check(line.charAt(start-1));)--start;for(;end<line.length&&check(line.charAt(end));)++end}return new Range(Pos(pos.line,start),Pos(pos.line,end))},toggleOverwrite:function(value){(null==value||value!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?addClass(this.display.cursorDiv,"CodeMirror-overwrite"):rmClass(this.display.cursorDiv,"CodeMirror-overwrite"),signal(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return activeElt()==this.display.input},scrollTo:methodOp(function(x,y){(null!=x||null!=y)&&resolveScrollToPos(this),null!=x&&(this.curOp.scrollLeft=x),null!=y&&(this.curOp.scrollTop=y)}),getScrollInfo:function(){var scroller=this.display.scroller,co=scrollerCutOff;return{left:scroller.scrollLeft,top:scroller.scrollTop,height:scroller.scrollHeight-co,width:scroller.scrollWidth-co,clientHeight:scroller.clientHeight-co,clientWidth:scroller.clientWidth-co}},scrollIntoView:methodOp(function(range,margin){if(null==range?(range={from:this.doc.sel.primary().head,to:null},null==margin&&(margin=this.options.cursorScrollMargin)):"number"==typeof range?range={from:Pos(range,0),to:null}:null==range.from&&(range={from:range,to:null}),range.to||(range.to=range.from),range.margin=margin||0,null!=range.from.line)resolveScrollToPos(this),this.curOp.scrollToPos=range;else{var sPos=calculateScrollPos(this,Math.min(range.from.left,range.to.left),Math.min(range.from.top,range.to.top)-range.margin,Math.max(range.from.right,range.to.right),Math.max(range.from.bottom,range.to.bottom)+range.margin);this.scrollTo(sPos.scrollLeft,sPos.scrollTop)}}),setSize:methodOp(function(width,height){function interpret(val){return"number"==typeof val||/^\d+$/.test(String(val))?val+"px":val}var cm=this;null!=width&&(cm.display.wrapper.style.width=interpret(width)),null!=height&&(cm.display.wrapper.style.height=interpret(height)),cm.options.lineWrapping&&clearLineMeasurementCache(this);var lineNo=cm.display.viewFrom;cm.doc.iter(lineNo,cm.display.viewTo,function(line){if(line.widgets)for(var i=0;i<line.widgets.length;i++)if(line.widgets[i].noHScroll){regLineChange(cm,lineNo,"widget");break}++lineNo}),cm.curOp.forceUpdate=!0,signal(cm,"refresh",this)}),operation:function(f){return runInOp(this,f)},refresh:methodOp(function(){var oldHeight=this.display.cachedTextHeight;regChange(this),this.curOp.forceUpdate=!0,clearCaches(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),updateGutterSpace(this),(null==oldHeight||Math.abs(oldHeight-textHeight(this.display))>.5)&&estimateLineHeights(this),signal(this,"refresh",this)}),swapDoc:methodOp(function(doc){var old=this.doc;return old.cm=null,attachDoc(this,doc),clearCaches(this),resetInput(this),this.scrollTo(doc.scrollLeft,doc.scrollTop),this.curOp.forceScroll=!0,signalLater(this,"swapDoc",this,old),old}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},eventMixin(CodeMirror);var defaults=CodeMirror.defaults={},optionHandlers=CodeMirror.optionHandlers={},Init=CodeMirror.Init={toString:function(){return"CodeMirror.Init"}};option("value","",function(cm,val){cm.setValue(val)},!0),option("mode",null,function(cm,val){cm.doc.modeOption=val,loadMode(cm)},!0),option("indentUnit",2,loadMode,!0),option("indentWithTabs",!1),option("smartIndent",!0),option("tabSize",4,function(cm){resetModeState(cm),clearCaches(cm),regChange(cm)},!0),option("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(cm,val){cm.options.specialChars=new RegExp(val.source+(val.test(" ")?"":"| "),"g"),cm.refresh()},!0),option("specialCharPlaceholder",defaultSpecialCharPlaceholder,function(cm){cm.refresh()},!0),option("electricChars",!0),option("rtlMoveVisually",!windows),option("wholeLineUpdateBefore",!0),option("theme","default",function(cm){themeChanged(cm),guttersChanged(cm)},!0),option("keyMap","default",function(cm,val,old){var next=getKeyMap(val),prev=old!=CodeMirror.Init&&getKeyMap(old);prev&&prev.detach&&prev.detach(cm,next),next.attach&&next.attach(cm,prev||null)}),option("extraKeys",null),option("lineWrapping",!1,wrappingChanged,!0),option("gutters",[],function(cm){setGuttersForLineNumbers(cm.options),guttersChanged(cm)},!0),option("fixedGutter",!0,function(cm,val){cm.display.gutters.style.left=val?compensateForHScroll(cm.display)+"px":"0",cm.refresh()},!0),option("coverGutterNextToScrollbar",!1,updateScrollbars,!0),option("lineNumbers",!1,function(cm){setGuttersForLineNumbers(cm.options),guttersChanged(cm)},!0),option("firstLineNumber",1,guttersChanged,!0),option("lineNumberFormatter",function(integer){return integer},guttersChanged,!0),option("showCursorWhenSelecting",!1,updateSelection,!0),option("resetSelectionOnContextMenu",!0),option("readOnly",!1,function(cm,val){"nocursor"==val?(onBlur(cm),cm.display.input.blur(),cm.display.disabled=!0):(cm.display.disabled=!1,val||resetInput(cm))}),option("disableInput",!1,function(cm,val){val||resetInput(cm)},!0),option("dragDrop",!0),option("cursorBlinkRate",530),option("cursorScrollMargin",0),option("cursorHeight",1,updateSelection,!0),option("singleCursorHeightPerLine",!0,updateSelection,!0),option("workTime",100),option("workDelay",100),option("flattenSpans",!0,resetModeState,!0),option("addModeClass",!1,resetModeState,!0),option("pollInterval",100),option("undoDepth",200,function(cm,val){cm.doc.history.undoDepth=val}),option("historyEventDelay",1250),option("viewportMargin",10,function(cm){cm.refresh()},!0),option("maxHighlightLength",1e4,resetModeState,!0),option("moveInputWithCursor",!0,function(cm,val){val||(cm.display.inputDiv.style.top=cm.display.inputDiv.style.left=0)}),option("tabindex",null,function(cm,val){cm.display.input.tabIndex=val||""}),option("autofocus",null);var modes=CodeMirror.modes={},mimeModes=CodeMirror.mimeModes={};CodeMirror.defineMode=function(name,mode){CodeMirror.defaults.mode||"null"==name||(CodeMirror.defaults.mode=name),arguments.length>2&&(mode.dependencies=Array.prototype.slice.call(arguments,2)),modes[name]=mode},CodeMirror.defineMIME=function(mime,spec){mimeModes[mime]=spec},CodeMirror.resolveMode=function(spec){if("string"==typeof spec&&mimeModes.hasOwnProperty(spec))spec=mimeModes[spec];else if(spec&&"string"==typeof spec.name&&mimeModes.hasOwnProperty(spec.name)){var found=mimeModes[spec.name];"string"==typeof found&&(found={name:found}),spec=createObj(found,spec),spec.name=found.name}else if("string"==typeof spec&&/^[\w\-]+\/[\w\-]+\+xml$/.test(spec))return CodeMirror.resolveMode("application/xml");return"string"==typeof spec?{name:spec}:spec||{name:"null"}},CodeMirror.getMode=function(options,spec){var spec=CodeMirror.resolveMode(spec),mfactory=modes[spec.name];if(!mfactory)return CodeMirror.getMode(options,"text/plain");var modeObj=mfactory(options,spec);if(modeExtensions.hasOwnProperty(spec.name)){var exts=modeExtensions[spec.name];for(var prop in exts)exts.hasOwnProperty(prop)&&(modeObj.hasOwnProperty(prop)&&(modeObj["_"+prop]=modeObj[prop]),modeObj[prop]=exts[prop])}if(modeObj.name=spec.name,spec.helperType&&(modeObj.helperType=spec.helperType),spec.modeProps)for(var prop in spec.modeProps)modeObj[prop]=spec.modeProps[prop];return modeObj},CodeMirror.defineMode("null",function(){return{token:function(stream){stream.skipToEnd()}}}),CodeMirror.defineMIME("text/plain","null");var modeExtensions=CodeMirror.modeExtensions={};CodeMirror.extendMode=function(mode,properties){var exts=modeExtensions.hasOwnProperty(mode)?modeExtensions[mode]:modeExtensions[mode]={};copyObj(properties,exts)},CodeMirror.defineExtension=function(name,func){CodeMirror.prototype[name]=func},CodeMirror.defineDocExtension=function(name,func){Doc.prototype[name]=func},CodeMirror.defineOption=option;var initHooks=[];CodeMirror.defineInitHook=function(f){initHooks.push(f)};var helpers=CodeMirror.helpers={};CodeMirror.registerHelper=function(type,name,value){helpers.hasOwnProperty(type)||(helpers[type]=CodeMirror[type]={_global:[]}),helpers[type][name]=value},CodeMirror.registerGlobalHelper=function(type,name,predicate,value){CodeMirror.registerHelper(type,name,value),helpers[type]._global.push({pred:predicate,val:value})};var copyState=CodeMirror.copyState=function(mode,state){if(state===!0)return state;if(mode.copyState)return mode.copyState(state);var nstate={};for(var n in state){var val=state[n];val instanceof Array&&(val=val.concat([])),nstate[n]=val}return nstate},startState=CodeMirror.startState=function(mode,a1,a2){return mode.startState?mode.startState(a1,a2):!0};CodeMirror.innerMode=function(mode,state){for(;mode.innerMode;){var info=mode.innerMode(state);if(!info||info.mode==mode)break;state=info.state,mode=info.mode}return info||{mode:mode,state:state}};var commands=CodeMirror.commands={selectAll:function(cm){cm.setSelection(Pos(cm.firstLine(),0),Pos(cm.lastLine()),sel_dontScroll)},singleSelection:function(cm){cm.setSelection(cm.getCursor("anchor"),cm.getCursor("head"),sel_dontScroll)},killLine:function(cm){deleteNearSelection(cm,function(range){if(range.empty()){var len=getLine(cm.doc,range.head.line).text.length;return range.head.ch==len&&range.head.line<cm.lastLine()?{from:range.head,to:Pos(range.head.line+1,0)}:{from:range.head,to:Pos(range.head.line,len)}}return{from:range.from(),to:range.to()}})},deleteLine:function(cm){deleteNearSelection(cm,function(range){return{from:Pos(range.from().line,0),to:clipPos(cm.doc,Pos(range.to().line+1,0))}})},delLineLeft:function(cm){deleteNearSelection(cm,function(range){return{from:Pos(range.from().line,0),to:range.from()}})},delWrappedLineLeft:function(cm){deleteNearSelection(cm,function(range){var top=cm.charCoords(range.head,"div").top+5,leftPos=cm.coordsChar({left:0,top:top},"div");return{from:leftPos,to:range.from()}})},delWrappedLineRight:function(cm){deleteNearSelection(cm,function(range){var top=cm.charCoords(range.head,"div").top+5,rightPos=cm.coordsChar({left:cm.display.lineDiv.offsetWidth+100,top:top},"div");return{from:range.from(),to:rightPos}})},undo:function(cm){cm.undo()},redo:function(cm){cm.redo()},undoSelection:function(cm){cm.undoSelection()},redoSelection:function(cm){cm.redoSelection()},goDocStart:function(cm){cm.extendSelection(Pos(cm.firstLine(),0))},goDocEnd:function(cm){cm.extendSelection(Pos(cm.lastLine()))},goLineStart:function(cm){cm.extendSelectionsBy(function(range){return lineStart(cm,range.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(cm){cm.extendSelectionsBy(function(range){return lineStartSmart(cm,range.head)},{origin:"+move",bias:1})},goLineEnd:function(cm){cm.extendSelectionsBy(function(range){return lineEnd(cm,range.head.line)},{origin:"+move",bias:-1})},goLineRight:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5;return cm.coordsChar({left:cm.display.lineDiv.offsetWidth+100,top:top},"div")},sel_move)},goLineLeft:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5;return cm.coordsChar({left:0,top:top},"div")},sel_move)},goLineLeftSmart:function(cm){cm.extendSelectionsBy(function(range){var top=cm.charCoords(range.head,"div").top+5,pos=cm.coordsChar({left:0,top:top},"div");return pos.ch<cm.getLine(pos.line).search(/\S/)?lineStartSmart(cm,range.head):pos},sel_move)},goLineUp:function(cm){cm.moveV(-1,"line")},goLineDown:function(cm){cm.moveV(1,"line")},goPageUp:function(cm){cm.moveV(-1,"page")},goPageDown:function(cm){cm.moveV(1,"page")},goCharLeft:function(cm){cm.moveH(-1,"char")},goCharRight:function(cm){cm.moveH(1,"char")},goColumnLeft:function(cm){cm.moveH(-1,"column")},goColumnRight:function(cm){cm.moveH(1,"column")},goWordLeft:function(cm){cm.moveH(-1,"word")},goGroupRight:function(cm){cm.moveH(1,"group")},goGroupLeft:function(cm){cm.moveH(-1,"group")},goWordRight:function(cm){cm.moveH(1,"word")},delCharBefore:function(cm){cm.deleteH(-1,"char")},delCharAfter:function(cm){cm.deleteH(1,"char")},delWordBefore:function(cm){cm.deleteH(-1,"word")},delWordAfter:function(cm){cm.deleteH(1,"word")},delGroupBefore:function(cm){cm.deleteH(-1,"group")},delGroupAfter:function(cm){cm.deleteH(1,"group")},indentAuto:function(cm){cm.indentSelection("smart")},indentMore:function(cm){cm.indentSelection("add")},indentLess:function(cm){cm.indentSelection("subtract")},insertTab:function(cm){cm.replaceSelection(" ")},insertSoftTab:function(cm){for(var spaces=[],ranges=cm.listSelections(),tabSize=cm.options.tabSize,i=0;i<ranges.length;i++){var pos=ranges[i].from(),col=countColumn(cm.getLine(pos.line),pos.ch,tabSize);spaces.push(new Array(tabSize-col%tabSize+1).join(" "))}cm.replaceSelections(spaces)},defaultTab:function(cm){cm.somethingSelected()?cm.indentSelection("add"):cm.execCommand("insertTab")},transposeChars:function(cm){runInOp(cm,function(){for(var ranges=cm.listSelections(),newSel=[],i=0;i<ranges.length;i++){var cur=ranges[i].head,line=getLine(cm.doc,cur.line).text;if(line)if(cur.ch==line.length&&(cur=new Pos(cur.line,cur.ch-1)),cur.ch>0)cur=new Pos(cur.line,cur.ch+1),cm.replaceRange(line.charAt(cur.ch-1)+line.charAt(cur.ch-2),Pos(cur.line,cur.ch-2),cur,"+transpose");else if(cur.line>cm.doc.first){var prev=getLine(cm.doc,cur.line-1).text;prev&&cm.replaceRange(line.charAt(0)+"\n"+prev.charAt(prev.length-1),Pos(cur.line-1,prev.length-1),Pos(cur.line,1),"+transpose")}newSel.push(new Range(cur,cur))}cm.setSelections(newSel)})},newlineAndIndent:function(cm){runInOp(cm,function(){for(var len=cm.listSelections().length,i=0;len>i;i++){var range=cm.listSelections()[i];cm.replaceRange("\n",range.anchor,range.head,"+input"),cm.indentLine(range.from().line+1,null,!0),ensureCursorVisible(cm)}})},toggleOverwrite:function(cm){cm.toggleOverwrite()}},keyMap=CodeMirror.keyMap={};keyMap.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},keyMap.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},keyMap.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},keyMap.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},keyMap["default"]=mac?keyMap.macDefault:keyMap.pcDefault,CodeMirror.normalizeKeyMap=function(keymap){var copy={};for(var keyname in keymap)if(keymap.hasOwnProperty(keyname)){var value=keymap[keyname];if(/^(name|fallthrough|(de|at)tach)$/.test(keyname))continue;if("..."==value){delete keymap[keyname];continue}for(var keys=map(keyname.split(" "),normalizeKeyName),i=0;i<keys.length;i++){var val,name;i==keys.length-1?(name=keyname,val=value):(name=keys.slice(0,i+1).join(" "),val="...");var prev=copy[name];if(prev){if(prev!=val)throw new Error("Inconsistent bindings for "+name)}else copy[name]=val}delete keymap[keyname]}for(var prop in copy)keymap[prop]=copy[prop];return keymap};var lookupKey=CodeMirror.lookupKey=function(key,map,handle){map=getKeyMap(map);var found=map.call?map.call(key):map[key];if(found===!1)return"nothing";if("..."===found)return"multi";if(null!=found&&handle(found))return"handled";if(map.fallthrough){if("[object Array]"!=Object.prototype.toString.call(map.fallthrough))return lookupKey(key,map.fallthrough,handle);for(var i=0;i<map.fallthrough.length;i++){var result=lookupKey(key,map.fallthrough[i],handle);if(result)return result}}},isModifierKey=CodeMirror.isModifierKey=function(value){var name="string"==typeof value?value:keyNames[value.keyCode];return"Ctrl"==name||"Alt"==name||"Shift"==name||"Mod"==name},keyName=CodeMirror.keyName=function(event,noShift){if(presto&&34==event.keyCode&&event["char"])return!1;var base=keyNames[event.keyCode],name=base;return null==name||event.altGraphKey?!1:(event.altKey&&"Alt"!=base&&(name="Alt-"+name),(flipCtrlCmd?event.metaKey:event.ctrlKey)&&"Ctrl"!=base&&(name="Ctrl-"+name),(flipCtrlCmd?event.ctrlKey:event.metaKey)&&"Cmd"!=base&&(name="Cmd-"+name),!noShift&&event.shiftKey&&"Shift"!=base&&(name="Shift-"+name),name)};CodeMirror.fromTextArea=function(textarea,options){function save(){textarea.value=cm.getValue()}if(options||(options={}),options.value=textarea.value,!options.tabindex&&textarea.tabindex&&(options.tabindex=textarea.tabindex),!options.placeholder&&textarea.placeholder&&(options.placeholder=textarea.placeholder),null==options.autofocus){var hasFocus=activeElt();options.autofocus=hasFocus==textarea||null!=textarea.getAttribute("autofocus")&&hasFocus==document.body}if(textarea.form&&(on(textarea.form,"submit",save),!options.leaveSubmitMethodAlone)){var form=textarea.form,realSubmit=form.submit;try{var wrappedSubmit=form.submit=function(){save(),form.submit=realSubmit,form.submit(),form.submit=wrappedSubmit}}catch(e){}}textarea.style.display="none";var cm=CodeMirror(function(node){textarea.parentNode.insertBefore(node,textarea.nextSibling)},options);return cm.save=save,cm.getTextArea=function(){return textarea},cm.toTextArea=function(){cm.toTextArea=isNaN,save(),textarea.parentNode.removeChild(cm.getWrapperElement()),textarea.style.display="",textarea.form&&(off(textarea.form,"submit",save),"function"==typeof textarea.form.submit&&(textarea.form.submit=realSubmit))},cm};var StringStream=CodeMirror.StringStream=function(string,tabSize){this.pos=this.start=0,this.string=string,this.tabSize=tabSize||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};StringStream.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(match){var ch=this.string.charAt(this.pos);if("string"==typeof match)var ok=ch==match;else var ok=ch&&(match.test?match.test(ch):match(ch));return ok?(++this.pos,ch):void 0},eatWhile:function(match){for(var start=this.pos;this.eat(match););return this.pos>start},eatSpace:function(){for(var start=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>start},skipToEnd:function(){this.pos=this.string.length},skipTo:function(ch){var found=this.string.indexOf(ch,this.pos);return found>-1?(this.pos=found,!0):void 0},backUp:function(n){this.pos-=n},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=countColumn(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return countColumn(this.string,null,this.tabSize)-(this.lineStart?countColumn(this.string,this.lineStart,this.tabSize):0)},match:function(pattern,consume,caseInsensitive){if("string"!=typeof pattern){var match=this.string.slice(this.pos).match(pattern);return match&&match.index>0?null:(match&&consume!==!1&&(this.pos+=match[0].length),match)}var cased=function(str){return caseInsensitive?str.toLowerCase():str},substr=this.string.substr(this.pos,pattern.length);return cased(substr)==cased(pattern)?(consume!==!1&&(this.pos+=pattern.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(n,inner){this.lineStart+=n;try{return inner()}finally{this.lineStart-=n}}};var TextMarker=CodeMirror.TextMarker=function(doc,type){this.lines=[],this.type=type,this.doc=doc};eventMixin(TextMarker),TextMarker.prototype.clear=function(){if(!this.explicitlyCleared){var cm=this.doc.cm,withOp=cm&&!cm.curOp;if(withOp&&startOperation(cm),hasHandler(this,"clear")){var found=this.find();found&&signalLater(this,"clear",found.from,found.to)}for(var min=null,max=null,i=0;i<this.lines.length;++i){var line=this.lines[i],span=getMarkedSpanFor(line.markedSpans,this);cm&&!this.collapsed?regLineChange(cm,lineNo(line),"text"):cm&&(null!=span.to&&(max=lineNo(line)),null!=span.from&&(min=lineNo(line))),line.markedSpans=removeMarkedSpan(line.markedSpans,span),null==span.from&&this.collapsed&&!lineIsHidden(this.doc,line)&&cm&&updateLineHeight(line,textHeight(cm.display))}if(cm&&this.collapsed&&!cm.options.lineWrapping)for(var i=0;i<this.lines.length;++i){var visual=visualLine(this.lines[i]),len=lineLength(visual);len>cm.display.maxLineLength&&(cm.display.maxLine=visual,cm.display.maxLineLength=len,cm.display.maxLineChanged=!0)}null!=min&&cm&&this.collapsed&®Change(cm,min,max+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,cm&&reCheckSelection(cm.doc)),cm&&signalLater(cm,"markerCleared",cm,this),withOp&&endOperation(cm),this.parent&&this.parent.clear()}},TextMarker.prototype.find=function(side,lineObj){null==side&&"bookmark"==this.type&&(side=1);for(var from,to,i=0;i<this.lines.length;++i){var line=this.lines[i],span=getMarkedSpanFor(line.markedSpans,this);if(null!=span.from&&(from=Pos(lineObj?line:lineNo(line),span.from),-1==side))return from;if(null!=span.to&&(to=Pos(lineObj?line:lineNo(line),span.to),1==side))return to}return from&&{from:from,to:to}},TextMarker.prototype.changed=function(){var pos=this.find(-1,!0),widget=this,cm=this.doc.cm;pos&&cm&&runInOp(cm,function(){var line=pos.line,lineN=lineNo(pos.line),view=findViewForLine(cm,lineN);if(view&&(clearLineMeasurementCacheFor(view),cm.curOp.selectionChanged=cm.curOp.forceUpdate=!0),cm.curOp.updateMaxLine=!0,!lineIsHidden(widget.doc,line)&&null!=widget.height){var oldHeight=widget.height;widget.height=null;var dHeight=widgetHeight(widget)-oldHeight;dHeight&&updateLineHeight(line,line.height+dHeight)}})},TextMarker.prototype.attachLine=function(line){if(!this.lines.length&&this.doc.cm){var op=this.doc.cm.curOp;op.maybeHiddenMarkers&&-1!=indexOf(op.maybeHiddenMarkers,this)||(op.maybeUnhiddenMarkers||(op.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(line)},TextMarker.prototype.detachLine=function(line){if(this.lines.splice(indexOf(this.lines,line),1),!this.lines.length&&this.doc.cm){var op=this.doc.cm.curOp;(op.maybeHiddenMarkers||(op.maybeHiddenMarkers=[])).push(this)}};var nextMarkerId=0,SharedTextMarker=CodeMirror.SharedTextMarker=function(markers,primary){this.markers=markers,this.primary=primary;for(var i=0;i<markers.length;++i)markers[i].parent=this};eventMixin(SharedTextMarker),SharedTextMarker.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var i=0;i<this.markers.length;++i)this.markers[i].clear();signalLater(this,"clear")}},SharedTextMarker.prototype.find=function(side,lineObj){return this.primary.find(side,lineObj)};var LineWidget=CodeMirror.LineWidget=function(cm,node,options){if(options)for(var opt in options)options.hasOwnProperty(opt)&&(this[opt]=options[opt]);this.cm=cm,this.node=node};eventMixin(LineWidget),LineWidget.prototype.clear=function(){var cm=this.cm,ws=this.line.widgets,line=this.line,no=lineNo(line);if(null!=no&&ws){for(var i=0;i<ws.length;++i)ws[i]==this&&ws.splice(i--,1);ws.length||(line.widgets=null);var height=widgetHeight(this);runInOp(cm,function(){adjustScrollWhenAboveVisible(cm,line,-height),regLineChange(cm,no,"widget"),updateLineHeight(line,Math.max(0,line.height-height))})}},LineWidget.prototype.changed=function(){var oldH=this.height,cm=this.cm,line=this.line;this.height=null;var diff=widgetHeight(this)-oldH;diff&&runInOp(cm,function(){cm.curOp.forceUpdate=!0,adjustScrollWhenAboveVisible(cm,line,diff),updateLineHeight(line,line.height+diff)})};var Line=CodeMirror.Line=function(text,markedSpans,estimateHeight){this.text=text,attachMarkedSpans(this,markedSpans),this.height=estimateHeight?estimateHeight(this):1};eventMixin(Line),Line.prototype.lineNo=function(){return lineNo(this)};var styleToClassCache={},styleToClassCacheWithMode={};LeafChunk.prototype={chunkSize:function(){return this.lines.length},removeInner:function(at,n){for(var i=at,e=at+n;e>i;++i){var line=this.lines[i];this.height-=line.height,cleanUpLine(line),signalLater(line,"delete")}this.lines.splice(at,n)},collapse:function(lines){lines.push.apply(lines,this.lines)},insertInner:function(at,lines,height){this.height+=height,this.lines=this.lines.slice(0,at).concat(lines).concat(this.lines.slice(at));for(var i=0;i<lines.length;++i)lines[i].parent=this},iterN:function(at,n,op){for(var e=at+n;e>at;++at)if(op(this.lines[at]))return!0}},BranchChunk.prototype={chunkSize:function(){return this.size},removeInner:function(at,n){this.size-=n;for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>at){var rm=Math.min(n,sz-at),oldHeight=child.height;if(child.removeInner(at,rm),this.height-=oldHeight-child.height,sz==rm&&(this.children.splice(i--,1),child.parent=null),0==(n-=rm))break;at=0}else at-=sz}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof LeafChunk))){var lines=[];this.collapse(lines),this.children=[new LeafChunk(lines)],this.children[0].parent=this}},collapse:function(lines){for(var i=0;i<this.children.length;++i)this.children[i].collapse(lines)},insertInner:function(at,lines,height){this.size+=lines.length,this.height+=height;for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>=at){if(child.insertInner(at,lines,height),child.lines&&child.lines.length>50){for(;child.lines.length>50;){var spilled=child.lines.splice(child.lines.length-25,25),newleaf=new LeafChunk(spilled);child.height-=newleaf.height,this.children.splice(i+1,0,newleaf),newleaf.parent=this}this.maybeSpill()}break}at-=sz}},maybeSpill:function(){if(!(this.children.length<=10)){var me=this;do{var spilled=me.children.splice(me.children.length-5,5),sibling=new BranchChunk(spilled);if(me.parent){me.size-=sibling.size,me.height-=sibling.height;var myIndex=indexOf(me.parent.children,me);me.parent.children.splice(myIndex+1,0,sibling)}else{var copy=new BranchChunk(me.children);copy.parent=me,me.children=[copy,sibling],me=copy}sibling.parent=me.parent}while(me.children.length>10);me.parent.maybeSpill()}},iterN:function(at,n,op){for(var i=0;i<this.children.length;++i){var child=this.children[i],sz=child.chunkSize();if(sz>at){var used=Math.min(n,sz-at);if(child.iterN(at,used,op))return!0;if(0==(n-=used))break;at=0}else at-=sz}}};var nextDocId=0,Doc=CodeMirror.Doc=function(text,mode,firstLine){if(!(this instanceof Doc))return new Doc(text,mode,firstLine);null==firstLine&&(firstLine=0),BranchChunk.call(this,[new LeafChunk([new Line("",null)])]),this.first=firstLine,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=firstLine;var start=Pos(firstLine,0);this.sel=simpleSelection(start),this.history=new History(null),this.id=++nextDocId,this.modeOption=mode,"string"==typeof text&&(text=splitLines(text)),updateDoc(this,{from:start,to:start,text:text}),setSelection(this,simpleSelection(start),sel_dontScroll)};Doc.prototype=createObj(BranchChunk.prototype,{constructor:Doc,iter:function(from,to,op){op?this.iterN(from-this.first,to-from,op):this.iterN(this.first,this.first+this.size,from)},insert:function(at,lines){for(var height=0,i=0;i<lines.length;++i)height+=lines[i].height;this.insertInner(at-this.first,lines,height)},remove:function(at,n){this.removeInner(at-this.first,n)},getValue:function(lineSep){var lines=getLines(this,this.first,this.first+this.size);return lineSep===!1?lines:lines.join(lineSep||"\n")},setValue:docMethodOp(function(code){var top=Pos(this.first,0),last=this.first+this.size-1;makeChange(this,{from:top,to:Pos(last,getLine(this,last).text.length),text:splitLines(code),origin:"setValue"},!0),setSelection(this,simpleSelection(top))}),replaceRange:function(code,from,to,origin){from=clipPos(this,from),to=to?clipPos(this,to):from,replaceRange(this,code,from,to,origin)},getRange:function(from,to,lineSep){var lines=getBetween(this,clipPos(this,from),clipPos(this,to));return lineSep===!1?lines:lines.join(lineSep||"\n")},getLine:function(line){var l=this.getLineHandle(line);return l&&l.text},getLineHandle:function(line){return isLine(this,line)?getLine(this,line):void 0},getLineNumber:function(line){return lineNo(line)},getLineHandleVisualStart:function(line){return"number"==typeof line&&(line=getLine(this,line)),visualLine(line)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(pos){return clipPos(this,pos)},getCursor:function(start){var pos,range=this.sel.primary();return pos=null==start||"head"==start?range.head:"anchor"==start?range.anchor:"end"==start||"to"==start||start===!1?range.to():range.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:docMethodOp(function(line,ch,options){setSimpleSelection(this,clipPos(this,"number"==typeof line?Pos(line,ch||0):line),null,options)}),setSelection:docMethodOp(function(anchor,head,options){setSimpleSelection(this,clipPos(this,anchor),clipPos(this,head||anchor),options)}),extendSelection:docMethodOp(function(head,other,options){extendSelection(this,clipPos(this,head),other&&clipPos(this,other),options)}),extendSelections:docMethodOp(function(heads,options){extendSelections(this,clipPosArray(this,heads,options))}),extendSelectionsBy:docMethodOp(function(f,options){extendSelections(this,map(this.sel.ranges,f),options)}),setSelections:docMethodOp(function(ranges,primary,options){if(ranges.length){for(var i=0,out=[];i<ranges.length;i++)out[i]=new Range(clipPos(this,ranges[i].anchor),clipPos(this,ranges[i].head));
|
22 |
null==primary&&(primary=Math.min(ranges.length-1,this.sel.primIndex)),setSelection(this,normalizeSelection(out,primary),options)}}),addSelection:docMethodOp(function(anchor,head,options){var ranges=this.sel.ranges.slice(0);ranges.push(new Range(clipPos(this,anchor),clipPos(this,head||anchor))),setSelection(this,normalizeSelection(ranges,ranges.length-1),options)}),getSelection:function(lineSep){for(var lines,ranges=this.sel.ranges,i=0;i<ranges.length;i++){var sel=getBetween(this,ranges[i].from(),ranges[i].to());lines=lines?lines.concat(sel):sel}return lineSep===!1?lines:lines.join(lineSep||"\n")},getSelections:function(lineSep){for(var parts=[],ranges=this.sel.ranges,i=0;i<ranges.length;i++){var sel=getBetween(this,ranges[i].from(),ranges[i].to());lineSep!==!1&&(sel=sel.join(lineSep||"\n")),parts[i]=sel}return parts},replaceSelection:function(code,collapse,origin){for(var dup=[],i=0;i<this.sel.ranges.length;i++)dup[i]=code;this.replaceSelections(dup,collapse,origin||"+input")},replaceSelections:docMethodOp(function(code,collapse,origin){for(var changes=[],sel=this.sel,i=0;i<sel.ranges.length;i++){var range=sel.ranges[i];changes[i]={from:range.from(),to:range.to(),text:splitLines(code[i]),origin:origin}}for(var newSel=collapse&&"end"!=collapse&&computeReplacedSel(this,changes,collapse),i=changes.length-1;i>=0;i--)makeChange(this,changes[i]);newSel?setSelectionReplaceHistory(this,newSel):this.cm&&ensureCursorVisible(this.cm)}),undo:docMethodOp(function(){makeChangeFromHistory(this,"undo")}),redo:docMethodOp(function(){makeChangeFromHistory(this,"redo")}),undoSelection:docMethodOp(function(){makeChangeFromHistory(this,"undo",!0)}),redoSelection:docMethodOp(function(){makeChangeFromHistory(this,"redo",!0)}),setExtending:function(val){this.extend=val},getExtending:function(){return this.extend},historySize:function(){for(var hist=this.history,done=0,undone=0,i=0;i<hist.done.length;i++)hist.done[i].ranges||++done;for(var i=0;i<hist.undone.length;i++)hist.undone[i].ranges||++undone;return{undo:done,redo:undone}},clearHistory:function(){this.history=new History(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(forceSplit){return forceSplit&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(gen){return this.history.generation==(gen||this.cleanGeneration)},getHistory:function(){return{done:copyHistoryArray(this.history.done),undone:copyHistoryArray(this.history.undone)}},setHistory:function(histData){var hist=this.history=new History(this.history.maxGeneration);hist.done=copyHistoryArray(histData.done.slice(0),null,!0),hist.undone=copyHistoryArray(histData.undone.slice(0),null,!0)},addLineClass:docMethodOp(function(handle,where,cls){return changeLine(this,handle,"gutter"==where?"gutter":"class",function(line){var prop="text"==where?"textClass":"background"==where?"bgClass":"gutter"==where?"gutterClass":"wrapClass";if(line[prop]){if(classTest(cls).test(line[prop]))return!1;line[prop]+=" "+cls}else line[prop]=cls;return!0})}),removeLineClass:docMethodOp(function(handle,where,cls){return changeLine(this,handle,"class",function(line){var prop="text"==where?"textClass":"background"==where?"bgClass":"gutter"==where?"gutterClass":"wrapClass",cur=line[prop];if(!cur)return!1;if(null==cls)line[prop]=null;else{var found=cur.match(classTest(cls));if(!found)return!1;var end=found.index+found[0].length;line[prop]=cur.slice(0,found.index)+(found.index&&end!=cur.length?" ":"")+cur.slice(end)||null}return!0})}),markText:function(from,to,options){return markText(this,clipPos(this,from),clipPos(this,to),options,"range")},setBookmark:function(pos,options){var realOpts={replacedWith:options&&(null==options.nodeType?options.widget:options),insertLeft:options&&options.insertLeft,clearWhenEmpty:!1,shared:options&&options.shared};return pos=clipPos(this,pos),markText(this,pos,pos,realOpts,"bookmark")},findMarksAt:function(pos){pos=clipPos(this,pos);var markers=[],spans=getLine(this,pos.line).markedSpans;if(spans)for(var i=0;i<spans.length;++i){var span=spans[i];(null==span.from||span.from<=pos.ch)&&(null==span.to||span.to>=pos.ch)&&markers.push(span.marker.parent||span.marker)}return markers},findMarks:function(from,to,filter){from=clipPos(this,from),to=clipPos(this,to);var found=[],lineNo=from.line;return this.iter(from.line,to.line+1,function(line){var spans=line.markedSpans;if(spans)for(var i=0;i<spans.length;i++){var span=spans[i];lineNo==from.line&&from.ch>span.to||null==span.from&&lineNo!=from.line||lineNo==to.line&&span.from>to.ch||filter&&!filter(span.marker)||found.push(span.marker.parent||span.marker)}++lineNo}),found},getAllMarks:function(){var markers=[];return this.iter(function(line){var sps=line.markedSpans;if(sps)for(var i=0;i<sps.length;++i)null!=sps[i].from&&markers.push(sps[i].marker)}),markers},posFromIndex:function(off){var ch,lineNo=this.first;return this.iter(function(line){var sz=line.text.length+1;return sz>off?(ch=off,!0):(off-=sz,void++lineNo)}),clipPos(this,Pos(lineNo,ch))},indexFromPos:function(coords){coords=clipPos(this,coords);var index=coords.ch;return coords.line<this.first||coords.ch<0?0:(this.iter(this.first,coords.line,function(line){index+=line.text.length+1}),index)},copy:function(copyHistory){var doc=new Doc(getLines(this,this.first,this.first+this.size),this.modeOption,this.first);return doc.scrollTop=this.scrollTop,doc.scrollLeft=this.scrollLeft,doc.sel=this.sel,doc.extend=!1,copyHistory&&(doc.history.undoDepth=this.history.undoDepth,doc.setHistory(this.getHistory())),doc},linkedDoc:function(options){options||(options={});var from=this.first,to=this.first+this.size;null!=options.from&&options.from>from&&(from=options.from),null!=options.to&&options.to<to&&(to=options.to);var copy=new Doc(getLines(this,from,to),options.mode||this.modeOption,from);return options.sharedHist&&(copy.history=this.history),(this.linked||(this.linked=[])).push({doc:copy,sharedHist:options.sharedHist}),copy.linked=[{doc:this,isParent:!0,sharedHist:options.sharedHist}],copySharedMarkers(copy,findSharedMarkers(this)),copy},unlinkDoc:function(other){if(other instanceof CodeMirror&&(other=other.doc),this.linked)for(var i=0;i<this.linked.length;++i){var link=this.linked[i];if(link.doc==other){this.linked.splice(i,1),other.unlinkDoc(this),detachSharedMarkers(findSharedMarkers(this));break}}if(other.history==this.history){var splitIds=[other.id];linkedDocs(other,function(doc){splitIds.push(doc.id)},!0),other.history=new History(null),other.history.done=copyHistoryArray(this.history.done,splitIds),other.history.undone=copyHistoryArray(this.history.undone,splitIds)}},iterLinkedDocs:function(f){linkedDocs(this,f)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),Doc.prototype.eachLine=Doc.prototype.iter;var dontDelegate="iter insert remove copy getEditor".split(" ");for(var prop in Doc.prototype)Doc.prototype.hasOwnProperty(prop)&&indexOf(dontDelegate,prop)<0&&(CodeMirror.prototype[prop]=function(method){return function(){return method.apply(this.doc,arguments)}}(Doc.prototype[prop]));eventMixin(Doc);var e_preventDefault=CodeMirror.e_preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},e_stopPropagation=CodeMirror.e_stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},e_stop=CodeMirror.e_stop=function(e){e_preventDefault(e),e_stopPropagation(e)},on=CodeMirror.on=function(emitter,type,f){if(emitter.addEventListener)emitter.addEventListener(type,f,!1);else if(emitter.attachEvent)emitter.attachEvent("on"+type,f);else{var map=emitter._handlers||(emitter._handlers={}),arr=map[type]||(map[type]=[]);arr.push(f)}},off=CodeMirror.off=function(emitter,type,f){if(emitter.removeEventListener)emitter.removeEventListener(type,f,!1);else if(emitter.detachEvent)emitter.detachEvent("on"+type,f);else{var arr=emitter._handlers&&emitter._handlers[type];if(!arr)return;for(var i=0;i<arr.length;++i)if(arr[i]==f){arr.splice(i,1);break}}},signal=CodeMirror.signal=function(emitter,type){var arr=emitter._handlers&&emitter._handlers[type];if(arr)for(var args=Array.prototype.slice.call(arguments,2),i=0;i<arr.length;++i)arr[i].apply(null,args)},orphanDelayedCallbacks=null,scrollerCutOff=30,Pass=CodeMirror.Pass={toString:function(){return"CodeMirror.Pass"}},sel_dontScroll={scroll:!1},sel_mouse={origin:"*mouse"},sel_move={origin:"+move"};Delayed.prototype.set=function(ms,f){clearTimeout(this.id),this.id=setTimeout(f,ms)};var countColumn=CodeMirror.countColumn=function(string,end,tabSize,startIndex,startValue){null==end&&(end=string.search(/[^\s\u00a0]/),-1==end&&(end=string.length));for(var i=startIndex||0,n=startValue||0;;){var nextTab=string.indexOf(" ",i);if(0>nextTab||nextTab>=end)return n+(end-i);n+=nextTab-i,n+=tabSize-n%tabSize,i=nextTab+1}},spaceStrs=[""],selectInput=function(node){node.select()};ios?selectInput=function(node){node.selectionStart=0,node.selectionEnd=node.value.length}:ie&&(selectInput=function(node){try{node.select()}catch(_e){}}),[].indexOf&&(indexOf=function(array,elt){return array.indexOf(elt)}),[].map&&(map=function(array,f){return array.map(f)});var range,nonASCIISingleCaseWordChar=/[\u00df\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,isWordCharBasic=CodeMirror.isWordChar=function(ch){return/\w/.test(ch)||ch>""&&(ch.toUpperCase()!=ch.toLowerCase()||nonASCIISingleCaseWordChar.test(ch))},extendingChars=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;range=document.createRange?function(node,start,end){var r=document.createRange();return r.setEnd(node,end),r.setStart(node,start),r}:function(node,start,end){var r=document.body.createTextRange();try{r.moveToElementText(node.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",end),r.moveStart("character",start),r},ie&&11>ie_version&&(activeElt=function(){try{return document.activeElement}catch(e){return document.body}});var knownScrollbarWidth,zwspSupported,badBidiRects,rmClass=CodeMirror.rmClass=function(node,cls){var current=node.className,match=classTest(cls).exec(current);if(match){var after=current.slice(match.index+match[0].length);node.className=current.slice(0,match.index)+(after?match[1]+after:"")}},addClass=CodeMirror.addClass=function(node,cls){var current=node.className;classTest(cls).test(current)||(node.className+=(current?" ":"")+cls)},globalsRegistered=!1,dragAndDrop=function(){if(ie&&9>ie_version)return!1;var div=elt("div");return"draggable"in div||"dragDrop"in div}(),splitLines=CodeMirror.splitLines=3!="\n\nb".split(/\n/).length?function(string){for(var pos=0,result=[],l=string.length;l>=pos;){var nl=string.indexOf("\n",pos);-1==nl&&(nl=string.length);var line=string.slice(pos,"\r"==string.charAt(nl-1)?nl-1:nl),rt=line.indexOf("\r");-1!=rt?(result.push(line.slice(0,rt)),pos+=rt+1):(result.push(line),pos=nl+1)}return result}:function(string){return string.split(/\r\n?|\n/)},hasSelection=window.getSelection?function(te){try{return te.selectionStart!=te.selectionEnd}catch(e){return!1}}:function(te){try{var range=te.ownerDocument.selection.createRange()}catch(e){}return range&&range.parentElement()==te?0!=range.compareEndPoints("StartToEnd",range):!1},hasCopyEvent=function(){var e=elt("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),badZoomedRects=null,keyNames={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};CodeMirror.keyNames=keyNames,function(){for(var i=0;10>i;i++)keyNames[i+48]=keyNames[i+96]=String(i);for(var i=65;90>=i;i++)keyNames[i]=String.fromCharCode(i);for(var i=1;12>=i;i++)keyNames[i+111]=keyNames[i+63235]="F"+i}();var bidiOther,bidiOrdering=function(){function charType(code){return 247>=code?lowTypes.charAt(code):code>=1424&&1524>=code?"R":code>=1536&&1773>=code?arabicTypes.charAt(code-1536):code>=1774&&2220>=code?"r":code>=8192&&8203>=code?"w":8204==code?"b":"L"}function BidiSpan(level,from,to){this.level=level,this.from=from,this.to=to}var lowTypes="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",arabicTypes="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",bidiRE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,isNeutral=/[stwN]/,isStrong=/[LRr]/,countsAsLeft=/[Lb1n]/,countsAsNum=/[1n]/,outerType="L";return function(str){if(!bidiRE.test(str))return!1;for(var type,len=str.length,types=[],i=0;len>i;++i)types.push(type=charType(str.charCodeAt(i)));for(var i=0,prev=outerType;len>i;++i){var type=types[i];"m"==type?types[i]=prev:prev=type}for(var i=0,cur=outerType;len>i;++i){var type=types[i];"1"==type&&"r"==cur?types[i]="n":isStrong.test(type)&&(cur=type,"r"==type&&(types[i]="R"))}for(var i=1,prev=types[0];len-1>i;++i){var type=types[i];"+"==type&&"1"==prev&&"1"==types[i+1]?types[i]="1":","!=type||prev!=types[i+1]||"1"!=prev&&"n"!=prev||(types[i]=prev),prev=type}for(var i=0;len>i;++i){var type=types[i];if(","==type)types[i]="N";else if("%"==type){for(var end=i+1;len>end&&"%"==types[end];++end);for(var replace=i&&"!"==types[i-1]||len>end&&"1"==types[end]?"1":"N",j=i;end>j;++j)types[j]=replace;i=end-1}}for(var i=0,cur=outerType;len>i;++i){var type=types[i];"L"==cur&&"1"==type?types[i]="L":isStrong.test(type)&&(cur=type)}for(var i=0;len>i;++i)if(isNeutral.test(types[i])){for(var end=i+1;len>end&&isNeutral.test(types[end]);++end);for(var before="L"==(i?types[i-1]:outerType),after="L"==(len>end?types[end]:outerType),replace=before||after?"L":"R",j=i;end>j;++j)types[j]=replace;i=end-1}for(var m,order=[],i=0;len>i;)if(countsAsLeft.test(types[i])){var start=i;for(++i;len>i&&countsAsLeft.test(types[i]);++i);order.push(new BidiSpan(0,start,i))}else{var pos=i,at=order.length;for(++i;len>i&&"L"!=types[i];++i);for(var j=pos;i>j;)if(countsAsNum.test(types[j])){j>pos&&order.splice(at,0,new BidiSpan(1,pos,j));var nstart=j;for(++j;i>j&&countsAsNum.test(types[j]);++j);order.splice(at,0,new BidiSpan(2,nstart,j)),pos=j}else++j;i>pos&&order.splice(at,0,new BidiSpan(1,pos,i))}return 1==order[0].level&&(m=str.match(/^\s+/))&&(order[0].from=m[0].length,order.unshift(new BidiSpan(0,0,m[0].length))),1==lst(order).level&&(m=str.match(/\s+$/))&&(lst(order).to-=m[0].length,order.push(new BidiSpan(0,len-m[0].length,len))),order[0].level!=lst(order).level&&order.push(new BidiSpan(order[0].level,len,len)),order}}();return CodeMirror.version="4.8.0",CodeMirror}),function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";function keySet(array){for(var keys={},i=0;i<array.length;++i)keys[array[i]]=!0;return keys}function tokenCComment(stream,state){for(var ch,maybeEnd=!1;null!=(ch=stream.next());){if(maybeEnd&&"/"==ch){state.tokenize=null;break}maybeEnd="*"==ch}return["comment","comment"]}function tokenSGMLComment(stream,state){return stream.skipTo("-->")?(stream.match("-->"),state.tokenize=null):stream.skipToEnd(),["comment","comment"]}CodeMirror.defineMode("css",function(config,parserConfig){function ret(style,tp){return type=tp,style}function tokenBase(stream,state){var ch=stream.next();if(tokenHooks[ch]){var result=tokenHooks[ch](stream,state);if(result!==!1)return result}return"@"==ch?(stream.eatWhile(/[\w\\\-]/),ret("def",stream.current())):"="==ch||("~"==ch||"|"==ch)&&stream.eat("=")?ret(null,"compare"):'"'==ch||"'"==ch?(state.tokenize=tokenString(ch),state.tokenize(stream,state)):"#"==ch?(stream.eatWhile(/[\w\\\-]/),ret("atom","hash")):"!"==ch?(stream.match(/^\s*\w*/),ret("keyword","important")):/\d/.test(ch)||"."==ch&&stream.eat(/\d/)?(stream.eatWhile(/[\w.%]/),ret("number","unit")):"-"!==ch?/[,+>*\/]/.test(ch)?ret(null,"select-op"):"."==ch&&stream.match(/^-?[_a-z][_a-z0-9-]*/i)?ret("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(ch)?ret(null,ch):"u"==ch&&stream.match("rl(")?(stream.backUp(1),state.tokenize=tokenParenthesized,ret("property","word")):/[\w\\\-]/.test(ch)?(stream.eatWhile(/[\w\\\-]/),ret("property","word")):ret(null,null):/[\d.]/.test(stream.peek())?(stream.eatWhile(/[\w.%]/),ret("number","unit")):stream.match(/^\w+-/)?ret("meta","meta"):void 0}function tokenString(quote){return function(stream,state){for(var ch,escaped=!1;null!=(ch=stream.next());){if(ch==quote&&!escaped){")"==quote&&stream.backUp(1);break}escaped=!escaped&&"\\"==ch}return(ch==quote||!escaped&&")"!=quote)&&(state.tokenize=null),ret("string","string")}}function tokenParenthesized(stream,state){return stream.next(),state.tokenize=stream.match(/\s*[\"\')]/,!1)?null:tokenString(")"),ret(null,"(")}function Context(type,indent,prev){this.type=type,this.indent=indent,this.prev=prev}function pushContext(state,stream,type){return state.context=new Context(type,stream.indentation()+indentUnit,state.context),type}function popContext(state){return state.context=state.context.prev,state.context.type}function pass(type,stream,state){return states[state.context.type](type,stream,state)}function popAndPass(type,stream,state,n){for(var i=n||1;i>0;i--)state.context=state.context.prev;return pass(type,stream,state)}function wordAsValue(stream){var word=stream.current().toLowerCase();override=valueKeywords.hasOwnProperty(word)?"atom":colorKeywords.hasOwnProperty(word)?"keyword":"variable"}parserConfig.propertyKeywords||(parserConfig=CodeMirror.resolveMode("text/css"));var type,override,indentUnit=config.indentUnit,tokenHooks=parserConfig.tokenHooks,mediaTypes=parserConfig.mediaTypes||{},mediaFeatures=parserConfig.mediaFeatures||{},propertyKeywords=parserConfig.propertyKeywords||{},nonStandardPropertyKeywords=parserConfig.nonStandardPropertyKeywords||{},colorKeywords=parserConfig.colorKeywords||{},valueKeywords=parserConfig.valueKeywords||{},fontProperties=parserConfig.fontProperties||{},allowNested=parserConfig.allowNested,states={};return states.top=function(type,stream,state){if("{"==type)return pushContext(state,stream,"block");if("}"==type&&state.context.prev)return popContext(state);if("@media"==type)return pushContext(state,stream,"media");if("@font-face"==type)return"font_face_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(type))return"keyframes";if(type&&"@"==type.charAt(0))return pushContext(state,stream,"at");if("hash"==type)override="builtin";else if("word"==type)override="tag";else{if("variable-definition"==type)return"maybeprop";if("interpolation"==type)return pushContext(state,stream,"interpolation");if(":"==type)return"pseudo";if(allowNested&&"("==type)return pushContext(state,stream,"parens")}return state.context.type},states.block=function(type,stream,state){if("word"==type){var word=stream.current().toLowerCase();return propertyKeywords.hasOwnProperty(word)?(override="property","maybeprop"):nonStandardPropertyKeywords.hasOwnProperty(word)?(override="string-2","maybeprop"):allowNested?(override=stream.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(override+=" error","maybeprop")}return"meta"==type?"block":allowNested||"hash"!=type&&"qualifier"!=type?states.top(type,stream,state):(override="error","block")},states.maybeprop=function(type,stream,state){return":"==type?pushContext(state,stream,"prop"):pass(type,stream,state)},states.prop=function(type,stream,state){if(";"==type)return popContext(state);if("{"==type&&allowNested)return pushContext(state,stream,"propBlock");if("}"==type||"{"==type)return popAndPass(type,stream,state);if("("==type)return pushContext(state,stream,"parens");if("hash"!=type||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())){if("word"==type)wordAsValue(stream);else if("interpolation"==type)return pushContext(state,stream,"interpolation")}else override+=" error";return"prop"},states.propBlock=function(type,_stream,state){return"}"==type?popContext(state):"word"==type?(override="property","maybeprop"):state.context.type},states.parens=function(type,stream,state){return"{"==type||"}"==type?popAndPass(type,stream,state):")"==type?popContext(state):"("==type?pushContext(state,stream,"parens"):("word"==type&&wordAsValue(stream),"parens")},states.pseudo=function(type,stream,state){return"word"==type?(override="variable-3",state.context.type):pass(type,stream,state)},states.media=function(type,stream,state){if("("==type)return pushContext(state,stream,"media_parens");if("}"==type)return popAndPass(type,stream,state);if("{"==type)return popContext(state)&&pushContext(state,stream,allowNested?"block":"top");if("word"==type){var word=stream.current().toLowerCase();override="only"==word||"not"==word||"and"==word?"keyword":mediaTypes.hasOwnProperty(word)?"attribute":mediaFeatures.hasOwnProperty(word)?"property":"error"}return state.context.type},states.media_parens=function(type,stream,state){return")"==type?popContext(state):"{"==type||"}"==type?popAndPass(type,stream,state,2):states.media(type,stream,state)},states.font_face_before=function(type,stream,state){return"{"==type?pushContext(state,stream,"font_face"):pass(type,stream,state)},states.font_face=function(type,stream,state){return"}"==type?popContext(state):"word"==type?(override=fontProperties.hasOwnProperty(stream.current().toLowerCase())?"property":"error","maybeprop"):"font_face"},states.keyframes=function(type,stream,state){return"word"==type?(override="variable","keyframes"):"{"==type?pushContext(state,stream,"top"):pass(type,stream,state)},states.at=function(type,stream,state){return";"==type?popContext(state):"{"==type||"}"==type?popAndPass(type,stream,state):("word"==type?override="tag":"hash"==type&&(override="builtin"),"at")},states.interpolation=function(type,stream,state){return"}"==type?popContext(state):"{"==type||";"==type?popAndPass(type,stream,state):("variable"!=type&&(override="error"),"interpolation")},{startState:function(base){return{tokenize:null,state:"top",context:new Context("top",base||0,null)}},token:function(stream,state){if(!state.tokenize&&stream.eatSpace())return null;var style=(state.tokenize||tokenBase)(stream,state);return style&&"object"==typeof style&&(type=style[1],style=style[0]),override=style,state.state=states[state.state](type,stream,state),override},indent:function(state,textAfter){var cx=state.context,ch=textAfter&&textAfter.charAt(0),indent=cx.indent;return"prop"!=cx.type||"}"!=ch&&")"!=ch||(cx=cx.prev),!cx.prev||("}"!=ch||"block"!=cx.type&&"top"!=cx.type&&"interpolation"!=cx.type&&"font_face"!=cx.type)&&(")"!=ch||"parens"!=cx.type&&"media_parens"!=cx.type)&&("{"!=ch||"at"!=cx.type&&"media"!=cx.type)||(indent=cx.indent-indentUnit,cx=cx.prev),indent},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});var mediaTypes_=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],mediaTypes=keySet(mediaTypes_),mediaFeatures_=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],mediaFeatures=keySet(mediaFeatures_),propertyKeywords_=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],propertyKeywords=keySet(propertyKeywords_),nonStandardPropertyKeywords_=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],nonStandardPropertyKeywords=keySet(nonStandardPropertyKeywords_),colorKeywords_=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],colorKeywords=keySet(colorKeywords_),valueKeywords_=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],valueKeywords=keySet(valueKeywords_),fontProperties_=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],fontProperties=keySet(fontProperties_),allWords=mediaTypes_.concat(mediaFeatures_).concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_).concat(valueKeywords_);
|
23 |
+
CodeMirror.registerHelper("hintWords","css",allWords),CodeMirror.defineMIME("text/css",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,tokenHooks:{"<":function(stream,state){return stream.match("!--")?(state.tokenize=tokenSGMLComment,tokenSGMLComment(stream,state)):!1},"/":function(stream,state){return stream.eat("*")?(state.tokenize=tokenCComment,tokenCComment(stream,state)):!1}},name:"css"}),CodeMirror.defineMIME("text/x-scss",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,allowNested:!0,tokenHooks:{"/":function(stream,state){return stream.eat("/")?(stream.skipToEnd(),["comment","comment"]):stream.eat("*")?(state.tokenize=tokenCComment,tokenCComment(stream,state)):["operator","operator"]},":":function(stream){return stream.match(/\s*\{/)?[null,"{"]:!1},$:function(stream){return stream.match(/^[\w-]+/),stream.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(stream){return stream.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),CodeMirror.defineMIME("text/x-less",{mediaTypes:mediaTypes,mediaFeatures:mediaFeatures,propertyKeywords:propertyKeywords,nonStandardPropertyKeywords:nonStandardPropertyKeywords,colorKeywords:colorKeywords,valueKeywords:valueKeywords,fontProperties:fontProperties,allowNested:!0,tokenHooks:{"/":function(stream,state){return stream.eat("/")?(stream.skipToEnd(),["comment","comment"]):stream.eat("*")?(state.tokenize=tokenCComment,tokenCComment(stream,state)):["operator","operator"]},"@":function(stream){return stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)?!1:(stream.eatWhile(/[\w\\\-]/),stream.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}),function(mod){"object"==typeof exports&&"object"==typeof module?mod(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],mod):mod(CodeMirror)}(function(CodeMirror){"use strict";CodeMirror.defineMode("javascript",function(config,parserConfig){function readRegexp(stream){for(var next,escaped=!1,inSet=!1;null!=(next=stream.next());){if(!escaped){if("/"==next&&!inSet)return;"["==next?inSet=!0:inSet&&"]"==next&&(inSet=!1)}escaped=!escaped&&"\\"==next}}function ret(tp,style,cont){return type=tp,content=cont,style}function tokenBase(stream,state){var ch=stream.next();if('"'==ch||"'"==ch)return state.tokenize=tokenString(ch),state.tokenize(stream,state);if("."==ch&&stream.match(/^\d+(?:[eE][+\-]?\d+)?/))return ret("number","number");if("."==ch&&stream.match(".."))return ret("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(ch))return ret(ch);if("="==ch&&stream.eat(">"))return ret("=>","operator");if("0"==ch&&stream.eat(/x/i))return stream.eatWhile(/[\da-f]/i),ret("number","number");if(/\d/.test(ch))return stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),ret("number","number");if("/"==ch)return stream.eat("*")?(state.tokenize=tokenComment,tokenComment(stream,state)):stream.eat("/")?(stream.skipToEnd(),ret("comment","comment")):"operator"==state.lastType||"keyword c"==state.lastType||"sof"==state.lastType||/^[\[{}\(,;:]$/.test(state.lastType)?(readRegexp(stream),stream.eatWhile(/[gimy]/),ret("regexp","string-2")):(stream.eatWhile(isOperatorChar),ret("operator","operator",stream.current()));if("`"==ch)return state.tokenize=tokenQuasi,tokenQuasi(stream,state);if("#"==ch)return stream.skipToEnd(),ret("error","error");if(isOperatorChar.test(ch))return stream.eatWhile(isOperatorChar),ret("operator","operator",stream.current());if(wordRE.test(ch)){stream.eatWhile(wordRE);var word=stream.current(),known=keywords.propertyIsEnumerable(word)&&keywords[word];return known&&"."!=state.lastType?ret(known.type,known.style,word):ret("variable","variable",word)}}function tokenString(quote){return function(stream,state){var next,escaped=!1;if(jsonldMode&&"@"==stream.peek()&&stream.match(isJsonldKeyword))return state.tokenize=tokenBase,ret("jsonld-keyword","meta");for(;null!=(next=stream.next())&&(next!=quote||escaped);)escaped=!escaped&&"\\"==next;return escaped||(state.tokenize=tokenBase),ret("string","string")}}function tokenComment(stream,state){for(var ch,maybeEnd=!1;ch=stream.next();){if("/"==ch&&maybeEnd){state.tokenize=tokenBase;break}maybeEnd="*"==ch}return ret("comment","comment")}function tokenQuasi(stream,state){for(var next,escaped=!1;null!=(next=stream.next());){if(!escaped&&("`"==next||"$"==next&&stream.eat("{"))){state.tokenize=tokenBase;break}escaped=!escaped&&"\\"==next}return ret("quasi","string-2",stream.current())}function findFatArrow(stream,state){state.fatArrowAt&&(state.fatArrowAt=null);var arrow=stream.string.indexOf("=>",stream.start);if(!(0>arrow)){for(var depth=0,sawSomething=!1,pos=arrow-1;pos>=0;--pos){var ch=stream.string.charAt(pos),bracket=brackets.indexOf(ch);if(bracket>=0&&3>bracket){if(!depth){++pos;break}if(0==--depth)break}else if(bracket>=3&&6>bracket)++depth;else if(wordRE.test(ch))sawSomething=!0;else if(sawSomething&&!depth){++pos;break}}sawSomething&&!depth&&(state.fatArrowAt=pos)}}function JSLexical(indented,column,type,align,prev,info){this.indented=indented,this.column=column,this.type=type,this.prev=prev,this.info=info,null!=align&&(this.align=align)}function inScope(state,varname){for(var v=state.localVars;v;v=v.next)if(v.name==varname)return!0;for(var cx=state.context;cx;cx=cx.prev)for(var v=cx.vars;v;v=v.next)if(v.name==varname)return!0}function parseJS(state,style,type,content,stream){var cc=state.cc;for(cx.state=state,cx.stream=stream,cx.marked=null,cx.cc=cc,cx.style=style,state.lexical.hasOwnProperty("align")||(state.lexical.align=!0);;){var combinator=cc.length?cc.pop():jsonMode?expression:statement;if(combinator(type,content)){for(;cc.length&&cc[cc.length-1].lex;)cc.pop()();return cx.marked?cx.marked:"variable"==type&&inScope(state,content)?"variable-2":style}}}function pass(){for(var i=arguments.length-1;i>=0;i--)cx.cc.push(arguments[i])}function cont(){return pass.apply(null,arguments),!0}function register(varname){function inList(list){for(var v=list;v;v=v.next)if(v.name==varname)return!0;return!1}var state=cx.state;if(state.context){if(cx.marked="def",inList(state.localVars))return;state.localVars={name:varname,next:state.localVars}}else{if(inList(state.globalVars))return;parserConfig.globalVars&&(state.globalVars={name:varname,next:state.globalVars})}}function pushcontext(){cx.state.context={prev:cx.state.context,vars:cx.state.localVars},cx.state.localVars=defaultVars}function popcontext(){cx.state.localVars=cx.state.context.vars,cx.state.context=cx.state.context.prev}function pushlex(type,info){var result=function(){var state=cx.state,indent=state.indented;if("stat"==state.lexical.type)indent=state.lexical.indented;else for(var outer=state.lexical;outer&&")"==outer.type&&outer.align;outer=outer.prev)indent=outer.indented;state.lexical=new JSLexical(indent,cx.stream.column(),type,null,state.lexical,info)};return result.lex=!0,result}function poplex(){var state=cx.state;state.lexical.prev&&(")"==state.lexical.type&&(state.indented=state.lexical.indented),state.lexical=state.lexical.prev)}function expect(wanted){function exp(type){return type==wanted?cont():";"==wanted?pass():cont(exp)}return exp}function statement(type,value){return"var"==type?cont(pushlex("vardef",value.length),vardef,expect(";"),poplex):"keyword a"==type?cont(pushlex("form"),expression,statement,poplex):"keyword b"==type?cont(pushlex("form"),statement,poplex):"{"==type?cont(pushlex("}"),block,poplex):";"==type?cont():"if"==type?("else"==cx.state.lexical.info&&cx.state.cc[cx.state.cc.length-1]==poplex&&cx.state.cc.pop()(),cont(pushlex("form"),expression,statement,poplex,maybeelse)):"function"==type?cont(functiondef):"for"==type?cont(pushlex("form"),forspec,statement,poplex):"variable"==type?cont(pushlex("stat"),maybelabel):"switch"==type?cont(pushlex("form"),expression,pushlex("}","switch"),expect("{"),block,poplex,poplex):"case"==type?cont(expression,expect(":")):"default"==type?cont(expect(":")):"catch"==type?cont(pushlex("form"),pushcontext,expect("("),funarg,expect(")"),statement,poplex,popcontext):"module"==type?cont(pushlex("form"),pushcontext,afterModule,popcontext,poplex):"class"==type?cont(pushlex("form"),className,poplex):"export"==type?cont(pushlex("form"),afterExport,poplex):"import"==type?cont(pushlex("form"),afterImport,poplex):pass(pushlex("stat"),expression,expect(";"),poplex)}function expression(type){return expressionInner(type,!1)}function expressionNoComma(type){return expressionInner(type,!0)}function expressionInner(type,noComma){if(cx.state.fatArrowAt==cx.stream.start){var body=noComma?arrowBodyNoComma:arrowBody;if("("==type)return cont(pushcontext,pushlex(")"),commasep(pattern,")"),poplex,expect("=>"),body,popcontext);if("variable"==type)return pass(pushcontext,pattern,expect("=>"),body,popcontext)}var maybeop=noComma?maybeoperatorNoComma:maybeoperatorComma;return atomicTypes.hasOwnProperty(type)?cont(maybeop):"function"==type?cont(functiondef,maybeop):"keyword c"==type?cont(noComma?maybeexpressionNoComma:maybeexpression):"("==type?cont(pushlex(")"),maybeexpression,comprehension,expect(")"),poplex,maybeop):"operator"==type||"spread"==type?cont(noComma?expressionNoComma:expression):"["==type?cont(pushlex("]"),arrayLiteral,poplex,maybeop):"{"==type?contCommasep(objprop,"}",null,maybeop):"quasi"==type?pass(quasi,maybeop):cont()}function maybeexpression(type){return type.match(/[;\}\)\],]/)?pass():pass(expression)}function maybeexpressionNoComma(type){return type.match(/[;\}\)\],]/)?pass():pass(expressionNoComma)}function maybeoperatorComma(type,value){return","==type?cont(expression):maybeoperatorNoComma(type,value,!1)}function maybeoperatorNoComma(type,value,noComma){var me=0==noComma?maybeoperatorComma:maybeoperatorNoComma,expr=0==noComma?expression:expressionNoComma;return"=>"==type?cont(pushcontext,noComma?arrowBodyNoComma:arrowBody,popcontext):"operator"==type?/\+\+|--/.test(value)?cont(me):"?"==value?cont(expression,expect(":"),expr):cont(expr):"quasi"==type?pass(quasi,me):";"!=type?"("==type?contCommasep(expressionNoComma,")","call",me):"."==type?cont(property,me):"["==type?cont(pushlex("]"),maybeexpression,expect("]"),poplex,me):void 0:void 0}function quasi(type,value){return"quasi"!=type?pass():"${"!=value.slice(value.length-2)?cont(quasi):cont(expression,continueQuasi)}function continueQuasi(type){return"}"==type?(cx.marked="string-2",cx.state.tokenize=tokenQuasi,cont(quasi)):void 0}function arrowBody(type){return findFatArrow(cx.stream,cx.state),pass("{"==type?statement:expression)}function arrowBodyNoComma(type){return findFatArrow(cx.stream,cx.state),pass("{"==type?statement:expressionNoComma)}function maybelabel(type){return":"==type?cont(poplex,statement):pass(maybeoperatorComma,expect(";"),poplex)}function property(type){return"variable"==type?(cx.marked="property",cont()):void 0}function objprop(type,value){return"variable"==type||"keyword"==cx.style?(cx.marked="property",cont("get"==value||"set"==value?getterSetter:afterprop)):"number"==type||"string"==type?(cx.marked=jsonldMode?"property":cx.style+" property",cont(afterprop)):"jsonld-keyword"==type?cont(afterprop):"["==type?cont(expression,expect("]"),afterprop):void 0}function getterSetter(type){return"variable"!=type?pass(afterprop):(cx.marked="property",cont(functiondef))}function afterprop(type){return":"==type?cont(expressionNoComma):"("==type?pass(functiondef):void 0}function commasep(what,end){function proceed(type){if(","==type){var lex=cx.state.lexical;return"call"==lex.info&&(lex.pos=(lex.pos||0)+1),cont(what,proceed)}return type==end?cont():cont(expect(end))}return function(type){return type==end?cont():pass(what,proceed)}}function contCommasep(what,end,info){for(var i=3;i<arguments.length;i++)cx.cc.push(arguments[i]);return cont(pushlex(end,info),commasep(what,end),poplex)}function block(type){return"}"==type?cont():pass(statement,block)}function maybetype(type){return isTS&&":"==type?cont(typedef):void 0}function typedef(type){return"variable"==type?(cx.marked="variable-3",cont()):void 0}function vardef(){return pass(pattern,maybetype,maybeAssign,vardefCont)}function pattern(type,value){return"variable"==type?(register(value),cont()):"["==type?contCommasep(pattern,"]"):"{"==type?contCommasep(proppattern,"}"):void 0}function proppattern(type,value){return"variable"!=type||cx.stream.match(/^\s*:/,!1)?("variable"==type&&(cx.marked="property"),cont(expect(":"),pattern,maybeAssign)):(register(value),cont(maybeAssign))}function maybeAssign(_type,value){return"="==value?cont(expressionNoComma):void 0}function vardefCont(type){return","==type?cont(vardef):void 0}function maybeelse(type,value){return"keyword b"==type&&"else"==value?cont(pushlex("form","else"),statement,poplex):void 0}function forspec(type){return"("==type?cont(pushlex(")"),forspec1,expect(")"),poplex):void 0}function forspec1(type){return"var"==type?cont(vardef,expect(";"),forspec2):";"==type?cont(forspec2):"variable"==type?cont(formaybeinof):pass(expression,expect(";"),forspec2)}function formaybeinof(_type,value){return"in"==value||"of"==value?(cx.marked="keyword",cont(expression)):cont(maybeoperatorComma,forspec2)}function forspec2(type,value){return";"==type?cont(forspec3):"in"==value||"of"==value?(cx.marked="keyword",cont(expression)):pass(expression,expect(";"),forspec3)}function forspec3(type){")"!=type&&cont(expression)}function functiondef(type,value){return"*"==value?(cx.marked="keyword",cont(functiondef)):"variable"==type?(register(value),cont(functiondef)):"("==type?cont(pushcontext,pushlex(")"),commasep(funarg,")"),poplex,statement,popcontext):void 0}function funarg(type){return"spread"==type?cont(funarg):pass(pattern,maybetype)}function className(type,value){return"variable"==type?(register(value),cont(classNameAfter)):void 0}function classNameAfter(type,value){return"extends"==value?cont(expression,classNameAfter):"{"==type?cont(pushlex("}"),classBody,poplex):void 0}function classBody(type,value){return"variable"==type||"keyword"==cx.style?(cx.marked="property","get"==value||"set"==value?cont(classGetterSetter,functiondef,classBody):cont(functiondef,classBody)):"*"==value?(cx.marked="keyword",cont(classBody)):";"==type?cont(classBody):"}"==type?cont():void 0}function classGetterSetter(type){return"variable"!=type?pass():(cx.marked="property",cont())}function afterModule(type,value){return"string"==type?cont(statement):"variable"==type?(register(value),cont(maybeFrom)):void 0}function afterExport(_type,value){return"*"==value?(cx.marked="keyword",cont(maybeFrom,expect(";"))):"default"==value?(cx.marked="keyword",cont(expression,expect(";"))):pass(statement)}function afterImport(type){return"string"==type?cont():pass(importSpec,maybeFrom)}function importSpec(type,value){return"{"==type?contCommasep(importSpec,"}"):("variable"==type&®ister(value),cont())}function maybeFrom(_type,value){return"from"==value?(cx.marked="keyword",cont(expression)):void 0}function arrayLiteral(type){return"]"==type?cont():pass(expressionNoComma,maybeArrayComprehension)}function maybeArrayComprehension(type){return"for"==type?pass(comprehension,expect("]")):","==type?cont(commasep(maybeexpressionNoComma,"]")):pass(commasep(expressionNoComma,"]"))}function comprehension(type){return"for"==type?cont(forspec,comprehension):"if"==type?cont(expression,comprehension):void 0}var type,content,indentUnit=config.indentUnit,statementIndent=parserConfig.statementIndent,jsonldMode=parserConfig.jsonld,jsonMode=parserConfig.json||jsonldMode,isTS=parserConfig.typescript,wordRE=parserConfig.wordCharacters||/[\w$\xa1-\uffff]/,keywords=function(){function kw(type){return{type:type,style:"keyword"}}var A=kw("keyword a"),B=kw("keyword b"),C=kw("keyword c"),operator=kw("operator"),atom={type:"atom",style:"atom"},jsKeywords={"if":kw("if"),"while":A,"with":A,"else":B,"do":B,"try":B,"finally":B,"return":C,"break":C,"continue":C,"new":C,"delete":C,"throw":C,"debugger":C,"var":kw("var"),"const":kw("var"),let:kw("var"),"function":kw("function"),"catch":kw("catch"),"for":kw("for"),"switch":kw("switch"),"case":kw("case"),"default":kw("default"),"in":operator,"typeof":operator,"instanceof":operator,"true":atom,"false":atom,"null":atom,undefined:atom,NaN:atom,Infinity:atom,"this":kw("this"),module:kw("module"),"class":kw("class"),"super":kw("atom"),"yield":C,"export":kw("export"),"import":kw("import"),"extends":C};if(isTS){var type={type:"variable",style:"variable-3"},tsKeywords={"interface":kw("interface"),"extends":kw("extends"),constructor:kw("constructor"),"public":kw("public"),"private":kw("private"),"protected":kw("protected"),"static":kw("static"),string:type,number:type,bool:type,any:type};for(var attr in tsKeywords)jsKeywords[attr]=tsKeywords[attr]}return jsKeywords}(),isOperatorChar=/[+\-*&%=<>!?|~^]/,isJsonldKeyword=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,brackets="([{}])",atomicTypes={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},cx={state:null,column:null,marked:null,cc:null},defaultVars={name:"this",next:{name:"arguments"}};return poplex.lex=!0,{startState:function(basecolumn){var state={tokenize:tokenBase,lastType:"sof",cc:[],lexical:new JSLexical((basecolumn||0)-indentUnit,0,"block",!1),localVars:parserConfig.localVars,context:parserConfig.localVars&&{vars:parserConfig.localVars},indented:0};return parserConfig.globalVars&&"object"==typeof parserConfig.globalVars&&(state.globalVars=parserConfig.globalVars),state},token:function(stream,state){if(stream.sol()&&(state.lexical.hasOwnProperty("align")||(state.lexical.align=!1),state.indented=stream.indentation(),findFatArrow(stream,state)),state.tokenize!=tokenComment&&stream.eatSpace())return null;var style=state.tokenize(stream,state);return"comment"==type?style:(state.lastType="operator"!=type||"++"!=content&&"--"!=content?type:"incdec",parseJS(state,style,type,content,stream))},indent:function(state,textAfter){if(state.tokenize==tokenComment)return CodeMirror.Pass;if(state.tokenize!=tokenBase)return 0;var firstChar=textAfter&&textAfter.charAt(0),lexical=state.lexical;if(!/^\s*else\b/.test(textAfter))for(var i=state.cc.length-1;i>=0;--i){var c=state.cc[i];if(c==poplex)lexical=lexical.prev;else if(c!=maybeelse)break}"stat"==lexical.type&&"}"==firstChar&&(lexical=lexical.prev),statementIndent&&")"==lexical.type&&"stat"==lexical.prev.type&&(lexical=lexical.prev);var type=lexical.type,closing=firstChar==type;return"vardef"==type?lexical.indented+("operator"==state.lastType||","==state.lastType?lexical.info+1:0):"form"==type&&"{"==firstChar?lexical.indented:"form"==type?lexical.indented+indentUnit:"stat"==type?lexical.indented+("operator"==state.lastType||","==state.lastType?statementIndent||indentUnit:0):"switch"!=lexical.info||closing||0==parserConfig.doubleIndentSwitch?lexical.align?lexical.column+(closing?0:1):lexical.indented+(closing?0:indentUnit):lexical.indented+(/^(?:case|default)\b/.test(textAfter)?indentUnit:2*indentUnit)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:jsonMode?null:"/*",blockCommentEnd:jsonMode?null:"*/",lineComment:jsonMode?null:"//",fold:"brace",helperType:jsonMode?"json":"javascript",jsonldMode:jsonldMode,jsonMode:jsonMode}}),CodeMirror.registerHelper("wordChars","javascript",/[\w$]/),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/x-javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0})}),function($){"use strict";function Featherlight($content,config){if(!(this instanceof Featherlight)){var fl=new Featherlight($content,config);return fl.open(),fl}this.id=Featherlight.id++,this.setup($content,config),this.chainCallbacks(Featherlight._callbackChain)}if("undefined"==typeof $)return void("console"in window&&window.console.info("Too much lightness, Featherlight needs jQuery."));var opened=[],pruneOpened=function(remove){return opened=$.grep(opened,function(fl){return fl!==remove&&fl.$instance.closest("body").length>0})},structure=function(obj,prefix){var result={},regex=new RegExp("^"+prefix+"([A-Z])(.*)");for(var key in obj){var match=key.match(regex);if(match){var dasherized=(match[1]+match[2].replace(/([A-Z])/g,"-$1")).toLowerCase();result[dasherized]=obj[key]}}return result},eventMap={keyup:"onKeyUp",resize:"onResize"},globalEventHandler=function(event){$.each(Featherlight.opened().reverse(),function(){return event.isDefaultPrevented()||!1!==this[eventMap[event.type]](event)?void 0:(event.preventDefault(),event.stopPropagation(),!1)})},toggleGlobalEvents=function(set){if(set!==Featherlight._globalHandlerInstalled){Featherlight._globalHandlerInstalled=set;var events=$.map(eventMap,function(_,name){return name+"."+Featherlight.prototype.namespace}).join(" ");$(window)[set?"on":"off"](events,globalEventHandler)}};Featherlight.prototype={constructor:Featherlight,namespace:"featherlight",targetAttr:"data-featherlight",variant:null,resetCss:!1,background:null,openTrigger:"click",closeTrigger:"click",filter:null,root:"body",openSpeed:250,closeSpeed:250,closeOnClick:"background",closeOnEsc:!0,closeIcon:"✕",loading:"",otherClose:null,beforeOpen:$.noop,beforeContent:$.noop,beforeClose:$.noop,afterOpen:$.noop,afterContent:$.noop,afterClose:$.noop,onKeyUp:$.noop,onResize:$.noop,type:null,contentFilters:["jquery","image","html","ajax","iframe","text"],setup:function(target,config){"object"!=typeof target||target instanceof $!=!1||config||(config=target,target=void 0);var self=$.extend(this,config,{target:target}),css=self.resetCss?self.namespace+"-reset":self.namespace,$background=$(self.background||['<div class="'+css+"-loading "+css+'">','<div class="'+css+'-content">','<span class="'+css+"-close-icon "+self.namespace+'-close">',self.closeIcon,"</span>",'<div class="'+self.namespace+'-inner">'+self.loading+"</div>","</div>","</div>"].join("")),closeButtonSelector="."+self.namespace+"-close"+(self.otherClose?","+self.otherClose:"");return self.$instance=$background.clone().addClass(self.variant),self.$instance.on(self.closeTrigger+"."+self.namespace,function(event){var $target=$(event.target);("background"===self.closeOnClick&&$target.is("."+self.namespace)||"anywhere"===self.closeOnClick||$target.closest(closeButtonSelector).length)&&(event.preventDefault(),self.close())}),this},getContent:function(){var self=this,filters=this.constructor.contentFilters,readTargetAttr=function(name){return self.$currentTarget&&self.$currentTarget.attr(name)},targetValue=readTargetAttr(self.targetAttr),data=self.target||targetValue||"",filter=filters[self.type];if(!filter&&data in filters&&(filter=filters[data],data=self.target&&targetValue),data=data||readTargetAttr("href")||"",!filter)for(var filterName in filters)self[filterName]&&(filter=filters[filterName],data=self[filterName]);if(!filter){var target=data;if(data=null,$.each(self.contentFilters,function(){return filter=filters[this],filter.test&&(data=filter.test(target)),!data&&filter.regex&&target.match&&target.match(filter.regex)&&(data=target),!data}),!data)return"console"in window&&window.console.error("Featherlight: no content filter found "+(target?' for "'+target+'"':" (no target specified)")),!1}return filter.process.call(self,data)},setContent:function($content){var self=this;return($content.is("iframe")||$("iframe",$content).length>0)&&self.$instance.addClass(self.namespace+"-iframe"),self.$instance.removeClass(self.namespace+"-loading"),self.$instance.find("."+self.namespace+"-inner").slice(1).remove().end().replaceWith($.contains(self.$instance[0],$content[0])?"":$content),self.$content=$content.addClass(self.namespace+"-inner"),self},open:function(event){var self=this;if(self.$instance.hide().appendTo(self.root),!(event&&event.isDefaultPrevented()||self.beforeOpen(event)===!1)){event&&event.preventDefault();var $content=self.getContent();if($content)return opened.push(self),toggleGlobalEvents(!0),self.$instance.fadeIn(self.openSpeed),self.beforeContent(event),$.when($content).always(function($content){self.setContent($content),self.afterContent(event)}).then(self.$instance.promise()).done(function(){self.afterOpen(event)})}return self.$instance.detach(),$.Deferred().reject().promise()},close:function(event){var self=this,deferred=$.Deferred();return self.beforeClose(event)===!1?deferred.reject():(0===pruneOpened(self).length&&toggleGlobalEvents(!1),self.$instance.fadeOut(self.closeSpeed,function(){self.$instance.detach(),self.afterClose(event),deferred.resolve()})),deferred.promise()},chainCallbacks:function(chain){for(var name in chain)this[name]=$.proxy(chain[name],this,$.proxy(this[name],this))}},$.extend(Featherlight,{id:0,autoBind:"[data-featherlight]",defaults:Featherlight.prototype,contentFilters:{jquery:{regex:/^[#.]\w/,test:function(elem){return elem instanceof $&&elem},process:function(elem){return $(elem).clone(!0)}},image:{regex:/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,process:function(url){var self=this,deferred=$.Deferred(),img=new Image,$img=$('<img src="'+url+'" alt="" class="'+self.namespace+'-image" />');return img.onload=function(){$img.naturalWidth=img.width,$img.naturalHeight=img.height,deferred.resolve($img)},img.onerror=function(){deferred.reject($img)},img.src=url,deferred.promise()}},html:{regex:/^\s*<[\w!][^<]*>/,process:function(html){return $(html)}},ajax:{regex:/./,process:function(url){var deferred=$.Deferred(),$container=$("<div></div>").load(url,function(response,status){"error"!==status&&deferred.resolve($container.contents()),deferred.fail()});return deferred.promise()}},iframe:{process:function(url){var deferred=new $.Deferred,$content=$("<iframe/>").hide().attr("src",url).css(structure(this,"iframe")).on("load",function(){deferred.resolve($content.show())}).appendTo(this.$instance.find("."+this.namespace+"-content"));return deferred.promise()}},text:{process:function(text){return $("<div>",{text:text})}}},functionAttributes:["beforeOpen","afterOpen","beforeContent","afterContent","beforeClose","afterClose"],readElementConfig:function(element,namespace){var Klass=this,regexp=new RegExp("^data-"+namespace+"-(.*)"),config={};return element&&element.attributes&&$.each(element.attributes,function(){var match=this.name.match(regexp);if(match){var val=this.value,name=$.camelCase(match[1]);if($.inArray(name,Klass.functionAttributes)>=0)val=new Function(val);else try{val=$.parseJSON(val)}catch(e){}config[name]=val}}),config},extend:function(child,defaults){var Ctor=function(){this.constructor=child};return Ctor.prototype=this.prototype,child.prototype=new Ctor,child.__super__=this.prototype,$.extend(child,this,defaults),child.defaults=child.prototype,child},attach:function($source,$content,config){var Klass=this;"object"!=typeof $content||$content instanceof $!=!1||config||(config=$content,$content=void 0),config=$.extend({},config);var namespace=config.namespace||Klass.defaults.namespace,tempConfig=$.extend({},Klass.defaults,Klass.readElementConfig($source[0],namespace),config);return $source.on(tempConfig.openTrigger+"."+tempConfig.namespace,tempConfig.filter,function(event){var elemConfig=$.extend({$source:$source,$currentTarget:$(this)},Klass.readElementConfig($source[0],tempConfig.namespace),Klass.readElementConfig(this,tempConfig.namespace),config);new Klass($content,elemConfig).open(event)}),$source},current:function(){var all=this.opened();return all[all.length-1]||null},opened:function(){var klass=this;return pruneOpened(),$.grep(opened,function(fl){return fl instanceof klass})},close:function(){var cur=this.current();return cur?cur.close():void 0},_onReady:function(){var Klass=this;Klass.autoBind&&(Klass.attach($(document),{filter:Klass.autoBind}),$(Klass.autoBind).filter("[data-featherlight-filter]").each(function(){Klass.attach($(this))}))},_callbackChain:{onKeyUp:function(_super,event){return 27===event.keyCode?(this.closeOnEsc&&this.$instance.find("."+this.namespace+"-close:first").click(),!1):_super(event)},onResize:function(_super,event){if(this.$content.naturalWidth){var w=this.$content.naturalWidth,h=this.$content.naturalHeight;this.$content.css("width","").css("height","");var ratio=Math.max(w/parseInt(this.$content.parent().css("width"),10),h/parseInt(this.$content.parent().css("height"),10));ratio>1&&this.$content.css("width",""+w/ratio+"px").css("height",""+h/ratio+"px")}return _super(event)},afterContent:function(_super,event){var r=_super(event);return this.onResize(event),r}}}),$.featherlight=Featherlight,$.fn.featherlight=function($content,config){return Featherlight.attach(this,$content,config)},$(document).ready(function(){Featherlight._onReady()})}(jQuery),/**
|
24 |
+
* Timeago is a jQuery plugin that makes it easy to support automatically
|
25 |
+
* updating fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago").
|
26 |
+
*
|
27 |
+
* @name timeago
|
28 |
+
* @version 1.4.1
|
29 |
+
* @requires jQuery v1.2.3+
|
30 |
+
* @author Ryan McGeary
|
31 |
+
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
|
32 |
+
*
|
33 |
+
* For usage and examples, visit:
|
34 |
+
* http://timeago.yarp.com/
|
35 |
+
*
|
36 |
+
* Copyright (c) 2008-2013, Ryan McGeary (ryan -[at]- mcgeary [*dot*] org)
|
37 |
+
*/
|
38 |
+
function(factory){"function"==typeof define&&define.amd?define(["jquery"],factory):factory(jQuery)}(function($){function refresh(){var data=prepareData(this),$s=$t.settings;return isNaN(data.datetime)||(0==$s.cutoff||Math.abs(distance(data.datetime))<$s.cutoff)&&$(this).text(inWords(data.datetime)),this}function prepareData(element){if(element=$(element),!element.data("timeago")){element.data("timeago",{datetime:$t.datetime(element)});var text=$.trim(element.text());$t.settings.localeTitle?element.attr("title",element.data("timeago").datetime.toLocaleString()):!(text.length>0)||$t.isTime(element)&&element.attr("title")||element.attr("title",text)}return element.data("timeago")}function inWords(date){return $t.inWords(distance(date))}function distance(date){return(new Date).getTime()-date.getTime()}$.timeago=function(timestamp){return inWords(timestamp instanceof Date?timestamp:"string"==typeof timestamp?$.timeago.parse(timestamp):"number"==typeof timestamp?new Date(timestamp):$.timeago.datetime(timestamp))};var $t=$.timeago;$.extend($.timeago,{settings:{refreshMillis:6e4,allowPast:!0,allowFuture:!1,localeTitle:!1,cutoff:0,strings:{prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",inPast:"any moment now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]}},inWords:function(distanceMillis){function substitute(stringOrFunction,number){var string=$.isFunction(stringOrFunction)?stringOrFunction(number,distanceMillis):stringOrFunction,value=$l.numbers&&$l.numbers[number]||number;return string.replace(/%d/i,value)}if(!this.settings.allowPast&&!this.settings.allowFuture)throw"timeago allowPast and allowFuture settings can not both be set to false.";var $l=this.settings.strings,prefix=$l.prefixAgo,suffix=$l.suffixAgo;if(this.settings.allowFuture&&0>distanceMillis&&(prefix=$l.prefixFromNow,suffix=$l.suffixFromNow),!this.settings.allowPast&&distanceMillis>=0)return this.settings.strings.inPast;var seconds=Math.abs(distanceMillis)/1e3,minutes=seconds/60,hours=minutes/60,days=hours/24,years=days/365,words=45>seconds&&substitute($l.seconds,Math.round(seconds))||90>seconds&&substitute($l.minute,1)||45>minutes&&substitute($l.minutes,Math.round(minutes))||90>minutes&&substitute($l.hour,1)||24>hours&&substitute($l.hours,Math.round(hours))||42>hours&&substitute($l.day,1)||30>days&&substitute($l.days,Math.round(days))||45>days&&substitute($l.month,1)||365>days&&substitute($l.months,Math.round(days/30))||1.5>years&&substitute($l.year,1)||substitute($l.years,Math.round(years)),separator=$l.wordSeparator||"";return void 0===$l.wordSeparator&&(separator=" "),$.trim([prefix,words,suffix].join(separator))},parse:function(iso8601){var s=$.trim(iso8601);return s=s.replace(/\.\d+/,""),s=s.replace(/-/,"/").replace(/-/,"/"),s=s.replace(/T/," ").replace(/Z/," UTC"),s=s.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),s=s.replace(/([\+\-]\d\d)$/," $100"),new Date(s)},datetime:function(elem){var iso8601=$(elem).attr($t.isTime(elem)?"datetime":"title");return $t.parse(iso8601)},isTime:function(elem){return"time"===$(elem).get(0).tagName.toLowerCase()}});var functions={init:function(){var refresh_el=$.proxy(refresh,this);refresh_el();var $s=$t.settings;$s.refreshMillis>0&&(this._timeagoInterval=setInterval(refresh_el,$s.refreshMillis))},update:function(time){var parsedTime=$t.parse(time);$(this).data("timeago",{datetime:parsedTime}),$t.settings.localeTitle&&$(this).attr("title",parsedTime.toLocaleString()),refresh.apply(this)},updateFromDOM:function(){$(this).data("timeago",{datetime:$t.parse($(this).attr($t.isTime(this)?"datetime":"title"))}),refresh.apply(this)},dispose:function(){this._timeagoInterval&&(window.clearInterval(this._timeagoInterval),this._timeagoInterval=null)}};$.fn.timeago=function(action,options){var fn=action?functions[action]:functions.init;if(!fn)throw new Error("Unknown function name '"+action+"' for timeago");return this.each(function(){fn.call(this,options)}),this},document.createElement("abbr"),document.createElement("time")}),function(){function classToString(klass){return klass.toString().split(".")[1]}var Promise=Ember.RSVP.Promise;Ember.OfflineAdapter=Ember.Adapter.extend({find:function(record,id){var data=this._getItem(record.constructor,id);return new Promise(function(resolve,reject){data?(record.load(id,data),resolve(record)):reject(record)})},findAll:function(klass,records){var self=this,applicationData=this.applicationData;return new Promise(function(resolve){var ids=applicationData.meta[classToString(klass)+"!ids"],data=[];if(ids){ids=ids.split(",");for(var i=0,l=ids.length;l>i;i++)data.push(self._getItem(klass,ids[i]))}records.load(klass,data),resolve(records)})},createRecord:function(record){var self=this,klass=record.constructor,applicationData=this.applicationData;return new Promise(function(resolve){var newId=applicationData.meta[classToString(klass)+"!nextId"]||"1";record.set(klass.primaryKey,newId);var data=record.toJSON();self._setItem(klass,newId,data),self._updateIds(klass,newId),applicationData.meta[classToString(klass)+"!nextId"]=parseInt(newId,10)+1,record.load(newId,data),record.didCreateRecord(),resolve(record)})},saveRecord:function(record){var self=this,klass=record.constructor;return new Promise(function(resolve){self._setItem(klass,record.get(klass.primaryKey),record.toJSON()),record.didSaveRecord(),resolve(record)})},deleteRecord:function(record){var self=this,klass=record.constructor;return new Promise(function(resolve){self._deleteItem(klass,record.get(klass.primaryKey)),record.didDeleteRecord(),resolve(record)})},_getItem:function(klass,id){var value=this.applicationData[klass][id];return value&&JSON.parse(value)},_setItem:function(klass,id,data){this.applicationData[klass]||(this.applicationData[klass]={}),this.applicationData[klass][id]=JSON.stringify(data)},_deleteItem:function(klass,id){delete this.applicationData[klass][id];for(var idsKey=classToString(klass)+"!ids",ids=this.applicationData.meta[idsKey].split(","),i=0,l=ids.length;l>i;i++)if(ids[i]===""+id){ids.splice(i,1);break}this.applicationData.meta[idsKey]=ids.join(",")},_updateIds:function(klass,newId){newId=String(newId);var key=classToString(klass)+"!ids",currentIds=this.applicationData.meta[key];currentIds?this.applicationData.meta[key]+=","+newId:this.applicationData.meta[key]=newId}})}();/*!
|
39 |
Copyright Vassilis Petroulias [DRDigit]
|
40 |
|
41 |
Licensed under the Apache License, Version 2.0 (the "License");
|
includes/classes/class-msp-db.php
CHANGED
@@ -458,36 +458,50 @@ class MSP_DB {
|
|
458 |
/**
|
459 |
* Get an array containing row results (serialized) from sliders table
|
460 |
*
|
461 |
-
* @param int $
|
462 |
-
* @param int $offset The offset of the first row to return
|
463 |
-
* @param string $orderby The field name to order results by
|
464 |
-
* @param string $sort The sort type. 'DESC' or 'ASC'
|
465 |
-
* @param string $where The sql filter to get results by
|
466 |
* @return array|null Sliders data in an array or null if no result found
|
467 |
*/
|
468 |
-
public function
|
469 |
global $wpdb;
|
470 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
// convert perpage type to number
|
472 |
-
$
|
473 |
|
474 |
// convert offset type to number
|
475 |
-
$
|
476 |
|
477 |
// remove limit if limit number is set to 0
|
478 |
-
$limit
|
479 |
|
480 |
// remove offect if offset number is set to 0
|
481 |
-
$offset = ( 0 == $
|
|
|
|
|
|
|
|
|
|
|
482 |
|
483 |
// sanitize sort type
|
484 |
-
$
|
|
|
485 |
|
486 |
$sql = "
|
487 |
SELECT *
|
488 |
FROM {$this->sliders}
|
489 |
-
|
490 |
-
ORDER BY $orderby $
|
491 |
$limit
|
492 |
$offset
|
493 |
";
|
@@ -495,6 +509,31 @@ class MSP_DB {
|
|
495 |
return $wpdb->get_results( $sql, ARRAY_A );
|
496 |
}
|
497 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
498 |
|
499 |
|
500 |
/**
|
458 |
/**
|
459 |
* Get an array containing row results (serialized) from sliders table
|
460 |
*
|
461 |
+
* @param int $args The query args
|
|
|
|
|
|
|
|
|
462 |
* @return array|null Sliders data in an array or null if no result found
|
463 |
*/
|
464 |
+
public function ms_query( $args = array() ) {
|
465 |
global $wpdb;
|
466 |
|
467 |
+
$default_args = array(
|
468 |
+
'perpage' => 0,
|
469 |
+
'offset' => 0,
|
470 |
+
'orderby' => 'ID',
|
471 |
+
'order' => 'DESC',
|
472 |
+
'where' => "status='published'",
|
473 |
+
'like' => ''
|
474 |
+
);
|
475 |
+
|
476 |
+
$args = wp_parse_args( $args, $default_args );
|
477 |
+
|
478 |
+
|
479 |
// convert perpage type to number
|
480 |
+
$limit_num = (int) $args['perpage'];
|
481 |
|
482 |
// convert offset type to number
|
483 |
+
$offset_num = (int) $args['offset'];
|
484 |
|
485 |
// remove limit if limit number is set to 0
|
486 |
+
$limit = ( 1 > $limit_num ) ? '' : 'LIMIT '. $limit_num;
|
487 |
|
488 |
// remove offect if offset number is set to 0
|
489 |
+
$offset = ( 0 == $offset_num )? '' : 'OFFSET '. $offset_num;
|
490 |
+
|
491 |
+
// add LIKE if defined
|
492 |
+
$like = empty( $args['like'] ) ? '' : 'LIKE '. $args['like'];
|
493 |
+
|
494 |
+
$where = empty( $args['where'] ) ? '' : 'WHERE '. $args['where'];
|
495 |
|
496 |
// sanitize sort type
|
497 |
+
$order = strtolower( $args['order'] ) === 'desc' ? 'DESC' : 'ASC';
|
498 |
+
$orderby = $args['orderby'];
|
499 |
|
500 |
$sql = "
|
501 |
SELECT *
|
502 |
FROM {$this->sliders}
|
503 |
+
$where
|
504 |
+
ORDER BY $orderby $order
|
505 |
$limit
|
506 |
$offset
|
507 |
";
|
509 |
return $wpdb->get_results( $sql, ARRAY_A );
|
510 |
}
|
511 |
|
512 |
+
|
513 |
+
/**
|
514 |
+
* Get an array containing row results (serialized) from sliders table
|
515 |
+
*
|
516 |
+
* @param int $perpage Maximum number of rows to return - 0 means no limit
|
517 |
+
* @param int $offset The offset of the first row to return
|
518 |
+
* @param string $orderby The field name to order results by
|
519 |
+
* @param string $order The sort type. 'DESC' or 'ASC'
|
520 |
+
* @param string $where The sql filter to get results by
|
521 |
+
* @return array|null Sliders data in an array or null if no result found
|
522 |
+
*/
|
523 |
+
public function get_sliders_list( $perpage = 0, $offset = 0, $orderby = 'ID', $order = 'DESC', $where = "status='published'" ) {
|
524 |
+
global $wpdb;
|
525 |
+
|
526 |
+
$args = array(
|
527 |
+
'perpage' => $perpage,
|
528 |
+
'offset' => $offset,
|
529 |
+
'orderby' => $orderby,
|
530 |
+
'order' => $order,
|
531 |
+
'where' => $where
|
532 |
+
);
|
533 |
+
|
534 |
+
return $this->ms_query( $args );
|
535 |
+
}
|
536 |
+
|
537 |
|
538 |
|
539 |
/**
|
includes/init/define.php
CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') ) {
|
|
5 |
die();
|
6 |
}
|
7 |
|
8 |
-
define( 'MSWP_AVERTA_VERSION' , '2.
|
9 |
|
10 |
define( 'MSWP_SLUG' , 'master-slider' );
|
11 |
define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
|
5 |
die();
|
6 |
}
|
7 |
|
8 |
+
define( 'MSWP_AVERTA_VERSION' , '2.4.0' );
|
9 |
|
10 |
define( 'MSWP_SLUG' , 'master-slider' );
|
11 |
define( 'MSWP_TEXT_DOMAIN' , 'masterslider' );
|
includes/msp-shortcodes.php
CHANGED
@@ -72,6 +72,7 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
|
|
72 |
|
73 |
'width' => 300, // base width of slides. It helps the slider to resize in correct ratio.
|
74 |
'height' => 150, // base height of slides, It helps the slider to resize in correct ratio.
|
|
|
75 |
|
76 |
'start' => 1,
|
77 |
'space' => 0,
|
@@ -127,6 +128,8 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
|
|
127 |
|
128 |
'parallax_mode' => 'swipe',
|
129 |
|
|
|
|
|
130 |
'flickr_key' => '',
|
131 |
'flickr_id' => '',
|
132 |
'flickr_count' => 10,
|
@@ -183,6 +186,9 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
|
|
183 |
'thumbs_space' => 5,
|
184 |
'thumbs_hideunder' => '',
|
185 |
'thumbs_fillmode' => 'fill',
|
|
|
|
|
|
|
186 |
|
187 |
'scroll' => 'false', // display scrollbar?
|
188 |
'scroll_autohide' => 'true', // auto hide scroll?
|
@@ -434,14 +440,19 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
|
|
434 |
$bullets_hideunder
|
435 |
);
|
436 |
} ?>
|
|
|
437 |
<?php if($thumbs == 'true'){
|
438 |
-
|
|
|
439 |
'thumblist',
|
440 |
-
msp_is_true($thumbs_autohide ),
|
441 |
-
msp_is_true($thumbs_overvideo ),
|
442 |
$thumbs_direction,
|
443 |
(int)$thumbs_speed,
|
444 |
-
msp_is_true($thumbs_inset ),
|
|
|
|
|
|
|
445 |
$thumbs_align,
|
446 |
$thumbs_type,
|
447 |
(int)$thumbs_margin,
|
@@ -451,6 +462,8 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
|
|
451 |
$thumbs_fillmode,
|
452 |
$thumbs_hideunder
|
453 |
);
|
|
|
|
|
454 |
} ?>
|
455 |
<?php if($scroll == 'true'){
|
456 |
printf( "\t\t\t\t$instance_name.control('%s' ,{ autohide:%s, overVideo:%s, dir:'%s', inset:%s, align:'%s', color:'%s' %s %s %s });\n",
|
@@ -506,6 +519,7 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
|
|
506 |
<?php echo $instance_name; ?>.setup("<?php echo $uid; ?>", {
|
507 |
width : <?php echo (int)$width; ?>,
|
508 |
height : <?php echo (int) $height; ?>,
|
|
|
509 |
space : <?php echo (int) $space; ?>,
|
510 |
start : <?php echo (int) $start; ?>,
|
511 |
grabCursor : <?php msp_is_true_e($grab_cursor); ?>,
|
@@ -525,6 +539,7 @@ function msp_masterslider_wrapper_shortcode( $atts, $content = null ) {
|
|
525 |
overPause : <?php msp_is_true_e($over_pause); ?>,
|
526 |
fillMode : "<?php echo $fill_mode; ?>",
|
527 |
centerControls : <?php msp_is_true_e($center_controls); ?>,
|
|
|
528 |
layersMode : "<?php echo $layers_mode; ?>",
|
529 |
hideLayers : <?php msp_is_true_e($hide_layers); ?>,
|
530 |
fullscreenMargin: <?php echo (int) $fullscreen_margin; ?>,
|
@@ -655,6 +670,7 @@ function msp_masterslider_slide_shortcode( $atts, $content = null ) {
|
|
655 |
|
656 |
'thumb' => '',
|
657 |
'tab' => '',
|
|
|
658 |
'delay' => '', // data-delay
|
659 |
'bgalign' => '', // data-fill-mode
|
660 |
'bgcolor' => '',
|
@@ -695,6 +711,7 @@ function msp_masterslider_slide_shortcode( $atts, $content = null ) {
|
|
695 |
$title = str_replace( array( "%5B", "%5D" ), array('[', ']'), $title );
|
696 |
$alt = str_replace( array( "%5B", "%5D" ), array('[', ']'), $alt );
|
697 |
$link_title = str_replace( array( "%5B", "%5D" ), array('[', ']'), $link_title );
|
|
|
698 |
|
699 |
// main image markup
|
700 |
if( ! empty( $src ) ) {
|
@@ -756,9 +773,13 @@ function msp_masterslider_slide_shortcode( $atts, $content = null ) {
|
|
756 |
$slide_content .= "\t".sprintf('<img class="ms-thumb" src="%s" alt="%s" />', $thumb, $alt )."\n";
|
757 |
}
|
758 |
|
|
|
|
|
|
|
|
|
759 |
// tab markup
|
760 |
-
if( ! empty( $
|
761 |
-
$slide_content .= "\t".sprintf('<div class="ms-thumb" >%s</div>',
|
762 |
}
|
763 |
|
764 |
// video markup
|
72 |
|
73 |
'width' => 300, // base width of slides. It helps the slider to resize in correct ratio.
|
74 |
'height' => 150, // base height of slides, It helps the slider to resize in correct ratio.
|
75 |
+
'min_height' => 400,
|
76 |
|
77 |
'start' => 1,
|
78 |
'space' => 0,
|
128 |
|
129 |
'parallax_mode' => 'swipe',
|
130 |
|
131 |
+
'start_on_appear'=> 'false',
|
132 |
+
|
133 |
'flickr_key' => '',
|
134 |
'flickr_id' => '',
|
135 |
'flickr_count' => 10,
|
186 |
'thumbs_space' => 5,
|
187 |
'thumbs_hideunder' => '',
|
188 |
'thumbs_fillmode' => 'fill',
|
189 |
+
'thumbs_arrows' => 'false',
|
190 |
+
'thumbs_in_tab' => 'false',
|
191 |
+
'thumbs_hoverchange'=> 'false',
|
192 |
|
193 |
'scroll' => 'false', // display scrollbar?
|
194 |
'scroll_autohide' => 'true', // auto hide scroll?
|
440 |
$bullets_hideunder
|
441 |
);
|
442 |
} ?>
|
443 |
+
|
444 |
<?php if($thumbs == 'true'){
|
445 |
+
$thumbs_custom_class = 'true' == $thumbs_in_tab ? 'ms-has-thumb' : '';
|
446 |
+
printf( "\t\t\t\t$instance_name.control('%s' ,{ autohide:%s, overVideo:%s, dir:'%s', speed:%d, inset:%s, arrows:%s, hover:%s, customClass:'%s', align:'%s',type:'%s', margin:%d, width:%d, height:%d, space:%d, fillMode:'%s' %s });\n",
|
447 |
'thumblist',
|
448 |
+
msp_is_true( $thumbs_autohide ),
|
449 |
+
msp_is_true( $thumbs_overvideo ),
|
450 |
$thumbs_direction,
|
451 |
(int)$thumbs_speed,
|
452 |
+
msp_is_true( $thumbs_inset ),
|
453 |
+
msp_is_true( $thumbs_arrows ),
|
454 |
+
msp_is_true( $thumbs_hoverchange ),
|
455 |
+
$thumbs_custom_class,
|
456 |
$thumbs_align,
|
457 |
$thumbs_type,
|
458 |
(int)$thumbs_margin,
|
462 |
$thumbs_fillmode,
|
463 |
$thumbs_hideunder
|
464 |
);
|
465 |
+
|
466 |
+
|
467 |
} ?>
|
468 |
<?php if($scroll == 'true'){
|
469 |
printf( "\t\t\t\t$instance_name.control('%s' ,{ autohide:%s, overVideo:%s, dir:'%s', inset:%s, align:'%s', color:'%s' %s %s %s });\n",
|
519 |
<?php echo $instance_name; ?>.setup("<?php echo $uid; ?>", {
|
520 |
width : <?php echo (int)$width; ?>,
|
521 |
height : <?php echo (int) $height; ?>,
|
522 |
+
minHeight : <?php echo (int) $min_height; ?>,
|
523 |
space : <?php echo (int) $space; ?>,
|
524 |
start : <?php echo (int) $start; ?>,
|
525 |
grabCursor : <?php msp_is_true_e($grab_cursor); ?>,
|
539 |
overPause : <?php msp_is_true_e($over_pause); ?>,
|
540 |
fillMode : "<?php echo $fill_mode; ?>",
|
541 |
centerControls : <?php msp_is_true_e($center_controls); ?>,
|
542 |
+
startOnAppear : <?php msp_is_true_e($start_on_appear); ?>,
|
543 |
layersMode : "<?php echo $layers_mode; ?>",
|
544 |
hideLayers : <?php msp_is_true_e($hide_layers); ?>,
|
545 |
fullscreenMargin: <?php echo (int) $fullscreen_margin; ?>,
|
670 |
|
671 |
'thumb' => '',
|
672 |
'tab' => '',
|
673 |
+
'tab_thumb' => '',
|
674 |
'delay' => '', // data-delay
|
675 |
'bgalign' => '', // data-fill-mode
|
676 |
'bgcolor' => '',
|
711 |
$title = str_replace( array( "%5B", "%5D" ), array('[', ']'), $title );
|
712 |
$alt = str_replace( array( "%5B", "%5D" ), array('[', ']'), $alt );
|
713 |
$link_title = str_replace( array( "%5B", "%5D" ), array('[', ']'), $link_title );
|
714 |
+
$link_rel = str_replace( array( "%5B", "%5D" ), array('[', ']'), $link_rel );
|
715 |
|
716 |
// main image markup
|
717 |
if( ! empty( $src ) ) {
|
773 |
$slide_content .= "\t".sprintf('<img class="ms-thumb" src="%s" alt="%s" />', $thumb, $alt )."\n";
|
774 |
}
|
775 |
|
776 |
+
// markup for thumb in tab
|
777 |
+
$tab_image = empty( $tab_thumb ) ? '' : sprintf('<img class="ms-tab-thumb" src="%s" alt="%s" />', msp_get_the_absolute_media_url( $tab_thumb ), $alt )."\n";
|
778 |
+
$tab_context = empty( $tab ) ? '' : sprintf('<div class="ms-tab-context">%s</div>', str_replace( '"e;', '"', wp_specialchars_decode( $tab ) ), $alt )."\n";
|
779 |
+
|
780 |
// tab markup
|
781 |
+
if( ! empty( $tab_image ) || ! empty( $tab_context ) ) {
|
782 |
+
$slide_content .= "\t".sprintf( '<div class="ms-thumb" >%s%s</div>', $tab_image, $tab_context)."\n";
|
783 |
}
|
784 |
|
785 |
// video markup
|
master-slider.php
CHANGED
@@ -11,13 +11,13 @@
|
|
11 |
* Plugin Name: Master Slider
|
12 |
* Plugin URI: https://wordpress.org/plugins/master-slider/
|
13 |
* Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
|
14 |
-
* Version: 2.
|
15 |
* Author: averta
|
16 |
* Author URI: http://averta.net
|
17 |
* Text Domain: master-slider
|
18 |
* License URI: license.txt
|
19 |
* Domain Path: /languages
|
20 |
-
* Tested up to: 4.1
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
11 |
* Plugin Name: Master Slider
|
12 |
* Plugin URI: https://wordpress.org/plugins/master-slider/
|
13 |
* Description: Master Slider is the most advanced responsive HTML5 WordPress slider plugin with touch swipe navigation that works smoothly on devices too.
|
14 |
+
* Version: 2.4.0
|
15 |
* Author: averta
|
16 |
* Author URI: http://averta.net
|
17 |
* Text Domain: master-slider
|
18 |
* License URI: license.txt
|
19 |
* Domain Path: /languages
|
20 |
+
* Tested up to: 4.2.1
|
21 |
*/
|
22 |
|
23 |
// If this file is called directly, abort.
|
public/assets/css/masterslider.main.css
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Main CSS File
|
3 |
-
* @date
|
4 |
*/
|
5 |
|
6 |
|
@@ -22,6 +22,12 @@
|
|
22 |
transition: none;
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
.ms-ie img{border:none;}
|
26 |
.ms-ie8 * {opacity:inherit;filter:inherit;}
|
27 |
.ms-ie7 {zoom:1;}
|
@@ -278,6 +284,7 @@
|
|
278 |
transition: all 300ms ease-out;
|
279 |
}
|
280 |
|
|
|
281 |
.ms-tabs.ms-dir-h .ms-thumb-frame {margin-top: 12px;}
|
282 |
.ms-tabs.ms-dir-v .ms-thumb-frame {margin-left: 12px;}
|
283 |
.ms-tabs.ms-dir-v.ms-align-left .ms-thumb-frame {margin-left: 0px;}
|
@@ -358,6 +365,85 @@
|
|
358 |
font-weight: 600;
|
359 |
}
|
360 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
.ms-bullet{cursor:pointer;float: left;}
|
362 |
.ms-bullets.ms-dir-h {
|
363 |
position: absolute;
|
1 |
/*!
|
2 |
* Master Slider WordPress Lite Main CSS File
|
3 |
+
* @date May 2015
|
4 |
*/
|
5 |
|
6 |
|
22 |
transition: none;
|
23 |
}
|
24 |
|
25 |
+
.master-slider a,
|
26 |
+
.master-slider a:hover {
|
27 |
+
background-color: inherit;
|
28 |
+
color: inherit;
|
29 |
+
}
|
30 |
+
|
31 |
.ms-ie img{border:none;}
|
32 |
.ms-ie8 * {opacity:inherit;filter:inherit;}
|
33 |
.ms-ie7 {zoom:1;}
|
284 |
transition: all 300ms ease-out;
|
285 |
}
|
286 |
|
287 |
+
.ms-tabs.ms-has-thumb .ms-tab-thumb{ width:auto; }
|
288 |
.ms-tabs.ms-dir-h .ms-thumb-frame {margin-top: 12px;}
|
289 |
.ms-tabs.ms-dir-v .ms-thumb-frame {margin-left: 12px;}
|
290 |
.ms-tabs.ms-dir-v.ms-align-left .ms-thumb-frame {margin-left: 0px;}
|
365 |
font-weight: 600;
|
366 |
}
|
367 |
|
368 |
+
/* horizontal thumblist arrows*/
|
369 |
+
.ms-thumb-list.ms-dir-h .ms-thumblist-fwd, .ms-thumb-list.ms-dir-h .ms-thumblist-bwd {
|
370 |
+
height: 100%;
|
371 |
+
width: 20px;
|
372 |
+
position: absolute;
|
373 |
+
left: 0;
|
374 |
+
cursor: pointer;
|
375 |
+
background: rgba(128, 128, 128, 0.5);
|
376 |
+
text-align: center;
|
377 |
+
color: white;
|
378 |
+
}
|
379 |
+
|
380 |
+
.ms-thumb-list.ms-dir-h .ms-thumblist-bwd {
|
381 |
+
right: 0;
|
382 |
+
left: auto;
|
383 |
+
}
|
384 |
+
|
385 |
+
.ms-thumb-list.ms-dir-h .ms-thumblist-fwd:after, .ms-thumb-list.ms-dir-h .ms-thumblist-bwd:after {
|
386 |
+
content: close-quote;
|
387 |
+
top: 43%;
|
388 |
+
position: relative;
|
389 |
+
border: solid rgba(0, 0, 0, 0);
|
390 |
+
border-width: 5px 5px 5px 0px;
|
391 |
+
display: block;
|
392 |
+
border-right-color: #FFF;
|
393 |
+
width: 6px;
|
394 |
+
height: 1px;
|
395 |
+
}
|
396 |
+
|
397 |
+
.ms-thumb-list.ms-dir-h .ms-thumblist-bwd:after {
|
398 |
+
border-width: 5px 0px 5px 5px;
|
399 |
+
border-left-color: #FFF;
|
400 |
+
left: 7px;
|
401 |
+
}
|
402 |
+
|
403 |
+
/* vertical thumblist arrows */
|
404 |
+
.ms-thumb-list.ms-dir-v .ms-thumblist-fwd, .ms-thumb-list.ms-dir-v .ms-thumblist-bwd {
|
405 |
+
width: 100%;
|
406 |
+
height: 20px;
|
407 |
+
position: absolute;
|
408 |
+
top: 0;
|
409 |
+
cursor: pointer;
|
410 |
+
background: rgba(128, 128, 128, 0.5);
|
411 |
+
text-align: center;
|
412 |
+
color: white;
|
413 |
+
}
|
414 |
+
|
415 |
+
.ms-thumb-list.ms-dir-v .ms-thumblist-bwd {
|
416 |
+
bottom: 0;
|
417 |
+
top: auto;
|
418 |
+
}
|
419 |
+
|
420 |
+
.ms-thumb-list.ms-dir-v .ms-thumblist-fwd:after, .ms-thumb-list.ms-dir-v .ms-thumblist-bwd:after {
|
421 |
+
content: close-quote;
|
422 |
+
left: 43%;
|
423 |
+
position: relative;
|
424 |
+
border: solid rgba(0, 0, 0, 0);
|
425 |
+
border-width: 0px 5px 5px 5px;
|
426 |
+
display: block;
|
427 |
+
border-bottom-color: #FFF;
|
428 |
+
height: 1px;
|
429 |
+
top: 5px;
|
430 |
+
width: 0;
|
431 |
+
}
|
432 |
+
|
433 |
+
.ms-thumb-list.ms-dir-v .ms-thumblist-bwd:after {
|
434 |
+
border-width: 5px 5px 0px 5px;
|
435 |
+
border-top-color: #FFF;
|
436 |
+
top: 7px;
|
437 |
+
}
|
438 |
+
|
439 |
+
/* Thumb in tab styles */
|
440 |
+
.ms-tabs.ms-dir-v.ms-has-thumb .ms-thumbs-cont{ top:0 !important; }
|
441 |
+
.ms-tabs.ms-has-thumb .ms-thumb-frame{ height: auto !important; }
|
442 |
+
.ms-tabs.ms-has-thumb .ms-thumb{ padding:0; }
|
443 |
+
.ms-tabs.ms-has-thumb .ms-tab-context{ padding:20px; }
|
444 |
+
.ms-tabs.ms-align-left .ms-tab-thumb{ float:left; margin-right:20px; }
|
445 |
+
.ms-tabs.ms-align-right .ms-tab-thumb{ float:right; margin-left: 20px; }
|
446 |
+
|
447 |
.ms-bullet{cursor:pointer;float: left;}
|
448 |
.ms-bullets.ms-dir-h {
|
449 |
position: absolute;
|
public/assets/js/masterslider.js
CHANGED
@@ -3,8 +3,8 @@
|
|
3 |
* Copyright © 2015 All Rights Reserved.
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
-
* @version 2.
|
7 |
-
* @date
|
8 |
*/
|
9 |
|
10 |
|
@@ -205,6 +205,58 @@ window.averta = {};
|
|
205 |
return -1;
|
206 |
};
|
207 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
if(jQuery){
|
210 |
$.jqLoadFix = function(){
|
@@ -1433,7 +1485,7 @@ window.averta = {};
|
|
1433 |
self._deceleration = false;
|
1434 |
self.__isout = false;
|
1435 |
|
1436 |
-
if(
|
1437 |
self.value = self._checkLimits(self.end_loc + self.__extraMove);
|
1438 |
}else{
|
1439 |
self.value = Math.round(self.value);
|
@@ -1451,7 +1503,7 @@ window.averta = {};
|
|
1451 |
|
1452 |
})();
|
1453 |
|
1454 |
-
/* ================== bin-debug/js/lite/SliderEvent.js =================== */
|
1455 |
window.MSSliderEvent = function (type){
|
1456 |
this.type = type;
|
1457 |
};
|
@@ -1463,29 +1515,32 @@ MSSliderEvent.AUTOPLAY_CHANGE = 'ms_autoplaychange';
|
|
1463 |
MSSliderEvent.VIDEO_PLAY = 'ms_videoPlay';
|
1464 |
MSSliderEvent.VIDEO_CLOSE = 'ms_videoclose';
|
1465 |
MSSliderEvent.INIT = 'ms_init';
|
|
|
1466 |
MSSliderEvent.RESIZE = 'ms_resize';
|
1467 |
MSSliderEvent.RESERVED_SPACE_CHANGE = 'ms_rsc'; // internal use
|
1468 |
MSSliderEvent.DESTROY = 'ms_destroy';
|
1469 |
|
1470 |
-
/* ================== bin-debug/js/lite/Slide.js =================== */
|
1471 |
-
|
|
|
|
|
|
|
|
|
|
|
1472 |
|
1473 |
"use strict";
|
1474 |
|
1475 |
window.MSSlide = function(){
|
1476 |
|
1477 |
this.$element = null;
|
1478 |
-
|
1479 |
this.$loading = $('<div></div>').addClass('ms-slide-loading');
|
1480 |
-
|
1481 |
this.view = null;
|
1482 |
this.index = -1;
|
1483 |
|
1484 |
this.__width = 0;
|
1485 |
this.__height = 0;
|
1486 |
|
1487 |
-
this.preloadCount = 0;
|
1488 |
-
|
1489 |
this.fillMode = 'fill'; // fill , fit , stretch , tile , center
|
1490 |
|
1491 |
this.selected = false;
|
@@ -1497,65 +1552,74 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1497 |
};
|
1498 |
|
1499 |
var p = MSSlide.prototype;
|
1500 |
-
|
1501 |
-
|
1502 |
-
|
1503 |
-
|
1504 |
-
/* -----------------------------------------------------
|
1505 |
-
* Slide Swipe Reaction
|
1506 |
-
-----------------------------------------------------*/
|
1507 |
p.onSwipeStart = function(){
|
1508 |
//this.$layers.css(window._csspfx + 'transition-duration' , '0ms');
|
1509 |
-
if(this.link)
|
1510 |
-
|
|
|
|
|
|
|
|
|
|
|
1511 |
};
|
1512 |
|
|
|
|
|
|
|
1513 |
p.onSwipeMove = function (e) {
|
1514 |
var move = Math.max(Math.abs(e.data.distanceX), Math.abs(e.data.distanceY));
|
1515 |
this.swipeMoved = move > 4;
|
1516 |
};
|
1517 |
-
|
|
|
|
|
|
|
1518 |
p.onSwipeCancel = function(e){
|
1519 |
-
//console.log(e.data)
|
1520 |
if ( this.swipeMoved ) {
|
1521 |
this.swipeMoved = false;
|
1522 |
return;
|
1523 |
}
|
1524 |
|
1525 |
-
if(this.link)
|
1526 |
-
|
|
|
|
|
|
|
|
|
|
|
1527 |
//this.$layers.css(window._csspfx + 'transition-duration' , this.view.__slideDuration + 'ms');
|
1528 |
};
|
1529 |
|
1530 |
-
|
1531 |
-
|
|
|
|
|
1532 |
this.ready = true;
|
1533 |
this.slider.api._startTimer();
|
1534 |
|
1535 |
-
if(!this.isSleeping)
|
1536 |
-
this.
|
|
|
1537 |
|
1538 |
CTween.fadeOut(this.$loading , 300 , true);
|
1539 |
|
1540 |
//sequence loading
|
1541 |
-
if((this.slider.options.preload === 0 || this.slider.options.preload === 'all') && this.index < this.view.slideList.length - 1){
|
1542 |
this.view.slideList[this.index + 1].loadImages();
|
1543 |
-
}
|
1544 |
-
else if(this.slider.options.preload === 'all' && this.index === this.view.slideList.length - 1)
|
1545 |
this.slider._removeLoading();
|
|
|
1546 |
|
1547 |
};
|
1548 |
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
var value = -parseInt(this.$element.css('left')) - this.view.__contPos;
|
1554 |
-
|
1555 |
-
this.$layers[0].style.opacity = (1 - Math.abs(value / this.__width));
|
1556 |
-
//this.$layers.css('opacity' , 1 - Math.abs(value / this.__width));
|
1557 |
-
};
|
1558 |
-
*/
|
1559 |
p.setBG = function(img){
|
1560 |
this.hasBG = true;
|
1561 |
var that = this;
|
@@ -1571,66 +1635,110 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1571 |
this.bgAligner = new MSAligner(that.fillMode , that.$imgcont, that.$bg_img );
|
1572 |
this.bgAligner.widthOnly = this.slider.options.autoHeight;
|
1573 |
|
1574 |
-
if(that.slider.options.autoHeight && (that.pselected || that.selected))
|
1575 |
-
|
|
|
1576 |
|
1577 |
-
if(this.$bg_img.data('src') !== undefined){
|
1578 |
this.bg_src = this.$bg_img.data('src');
|
1579 |
this.$bg_img.removeAttr('data-src');
|
1580 |
-
}else{
|
1581 |
this.$bg_img.one('load', function(event) {that._onBGLoad(event);})
|
1582 |
.each($.jqLoadFix);
|
1583 |
}
|
1584 |
|
1585 |
-
this.preloadCount++;
|
1586 |
};
|
1587 |
-
|
1588 |
-
p._onBGLoad = function(event){
|
1589 |
-
this.bgNatrualWidth = event.width;
|
1590 |
-
this.bgNatrualHeight = event.height;
|
1591 |
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
this.
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1601 |
}
|
|
|
1602 |
};
|
|
|
|
|
1603 |
|
|
|
|
|
|
|
1604 |
p.loadImages = function(){
|
1605 |
-
if(this.ls)
|
|
|
|
|
1606 |
|
1607 |
this.ls = true;
|
1608 |
|
1609 |
-
|
1610 |
-
// There is nothing to preload? so slide is ready to show.
|
1611 |
-
if( this.preloadCount === 0 ){
|
1612 |
-
this.___onlayersReady();
|
1613 |
-
}
|
1614 |
-
|
1615 |
-
if(this.hasBG && this.bg_src){
|
1616 |
var that = this;
|
1617 |
this.$bg_img.preloadImg(this.bg_src , function(event) {that._onBGLoad(event);});
|
1618 |
}
|
1619 |
|
|
|
|
|
|
|
|
|
|
|
1620 |
};
|
1621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1622 |
/* -----------------------------------------------------*/
|
1623 |
|
1624 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1625 |
|
1626 |
this.__width = width;
|
1627 |
|
1628 |
-
if(this.slider.options.autoHeight){
|
1629 |
-
if(this.bgLoaded){
|
1630 |
this.ratio = this.__width / this.bgWidth;
|
1631 |
height = Math.floor(this.ratio * this.bgHeight);
|
1632 |
this.$imgcont.height(height);
|
1633 |
-
}else{
|
1634 |
this.ratio = width / this.slider.options.width;
|
1635 |
height = this.slider.options.height * this.ratio;
|
1636 |
}
|
@@ -1643,21 +1751,38 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1643 |
|
1644 |
};
|
1645 |
|
1646 |
-
|
|
|
|
|
|
|
1647 |
p.getHeight = function(){
|
1648 |
-
|
|
|
|
|
|
|
|
|
1649 |
return Math.max(this.$element[0].clientHeight, this.slider.options.height * this.ratio);
|
1650 |
};
|
1651 |
|
1652 |
/* -----------------------------------------------------*/
|
1653 |
// YouTube and Vimeo videos
|
1654 |
-
|
1655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1656 |
this.vplayed = true;
|
1657 |
-
|
|
|
1658 |
this.slider.api.pause();
|
1659 |
this.roc = true; // resume on close;
|
1660 |
}
|
|
|
1661 |
this.vcbtn.css('display' , '');
|
1662 |
CTween.fadeOut(this.vpbtn , 500 , false);
|
1663 |
CTween.fadeIn(this.vcbtn , 500);
|
@@ -1673,11 +1798,21 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1673 |
this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_PLAY));
|
1674 |
};
|
1675 |
|
|
|
|
|
|
|
1676 |
p.__closeVideo = function(){
|
1677 |
-
|
|
|
|
|
|
|
|
|
1678 |
this.vplayed = false;
|
1679 |
-
|
|
|
1680 |
this.slider.api.resume();
|
|
|
|
|
1681 |
var that = this;
|
1682 |
|
1683 |
CTween.fadeIn(this.vpbtn , 500);
|
@@ -1695,10 +1830,14 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1695 |
|
1696 |
/* -----------------------------------------------------*/
|
1697 |
|
|
|
|
|
|
|
1698 |
p.create = function(){
|
1699 |
var that = this;
|
1700 |
|
1701 |
-
|
|
|
1702 |
this.link.addClass('ms-slide-link').html('').click(function(e){
|
1703 |
if ( that.linkdis ) {
|
1704 |
e.preventDefault();
|
@@ -1709,9 +1848,12 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1709 |
// .click(function(){ if(!that.linkdis) window.open(that.link , that.link_targ || '_self'); });
|
1710 |
}
|
1711 |
|
1712 |
-
if(this.video){
|
|
|
|
|
|
|
|
|
1713 |
|
1714 |
-
if(this.video.indexOf('?') === -1) this.video += '?';
|
1715 |
this.vframe = $('<iframe></iframe>')
|
1716 |
.addClass('ms-slide-video')
|
1717 |
.css({width:'100%' , height:'100%' , display:'none'})
|
@@ -1730,7 +1872,7 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1730 |
.appendTo(this.$element)
|
1731 |
.css('display','none');
|
1732 |
|
1733 |
-
if(window._touch){
|
1734 |
this.vcbtn.removeClass('ms-slide-vcbtn')
|
1735 |
.addClass('ms-slide-vcbtn-mobile')
|
1736 |
.append('<div class="ms-vcbtn-txt">Close video</div>')
|
@@ -1738,60 +1880,41 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1738 |
}
|
1739 |
}
|
1740 |
|
1741 |
-
if(!this.slider.options.autoHeight && this.hasBG){
|
1742 |
this.$imgcont.css('height' , '100%');
|
1743 |
|
1744 |
-
if(this.fillMode === 'center' || this.fillMode === 'stretch')
|
1745 |
this.fillMode = 'fill';
|
|
|
1746 |
}
|
1747 |
|
1748 |
-
if( this.slider.options.autoHeight ) {
|
1749 |
this.$element.addClass('ms-slide-auto-height');
|
1750 |
}
|
1751 |
|
1752 |
-
|
1753 |
this.sleep(true);
|
1754 |
};
|
1755 |
|
1756 |
-
|
|
|
|
|
1757 |
p.destroy = function(){
|
1758 |
this.$element.remove();
|
1759 |
this.$element = null;
|
1760 |
};
|
1761 |
|
1762 |
-
|
1763 |
-
|
1764 |
-
|
1765 |
-
//this.isSettedup = true;
|
1766 |
-
|
1767 |
-
if(!this.initBG && this.bgLoaded){
|
1768 |
-
this.initBG = true;
|
1769 |
-
this.$bg_img.css('visibility' , '');
|
1770 |
-
this.bgWidth = this.bgNatrualWidth || this.$bg_img.width();
|
1771 |
-
this.bgHeight = this.bgNatrualHeight || this.$bg_img.height();
|
1772 |
-
|
1773 |
-
CTween.fadeIn(this.$imgcont , 300);
|
1774 |
-
|
1775 |
-
if(this.slider.options.autoHeight){
|
1776 |
-
this.$imgcont.height(this.bgHeight * this.ratio);
|
1777 |
-
}
|
1778 |
-
|
1779 |
-
this.bgAligner.init(this.bgWidth , this.bgHeight);
|
1780 |
-
this.setSize(this.__width , this.__height);
|
1781 |
-
|
1782 |
-
if(this.slider.options.autoHeight && (this.pselected || this.selected))
|
1783 |
-
this.slider.setHeight(this.getHeight());
|
1784 |
-
}
|
1785 |
-
|
1786 |
-
};
|
1787 |
-
|
1788 |
p.prepareToSelect = function(){
|
1789 |
|
|
|
|
|
|
|
1790 |
|
1791 |
-
if(this.pselected || this.selected) return;
|
1792 |
this.pselected = true;
|
1793 |
|
1794 |
-
if(this.link || this.video){
|
1795 |
this.view.addEventListener(MSViewEvents.SWIPE_START , this.onSwipeStart , this);
|
1796 |
this.view.addEventListener(MSViewEvents.SWIPE_MOVE , this.onSwipeMove , this);
|
1797 |
this.view.addEventListener(MSViewEvents.SWIPE_CANCEL , this.onSwipeCancel , this);
|
@@ -1815,8 +1938,14 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1815 |
|
1816 |
};*/
|
1817 |
|
|
|
|
|
|
|
1818 |
p.select = function(){
|
1819 |
-
if(this.selected)
|
|
|
|
|
|
|
1820 |
this.selected = true;
|
1821 |
this.pselected = false;
|
1822 |
this.$element.addClass('ms-sl-selected');
|
@@ -1831,19 +1960,27 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1831 |
|
1832 |
};
|
1833 |
|
|
|
|
|
|
|
1834 |
p.unselect = function(){
|
1835 |
this.pselected = false;
|
1836 |
-
|
|
|
1837 |
this.$element.css('margin-top' , '0.1px');
|
|
|
1838 |
|
1839 |
-
if(this.link || this.video){
|
1840 |
this.view.removeEventListener(MSViewEvents.SWIPE_START , this.onSwipeStart , this);
|
1841 |
this.view.removeEventListener(MSViewEvents.SWIPE_MOVE , this.onSwipeMove , this);
|
1842 |
this.view.removeEventListener(MSViewEvents.SWIPE_CANCEL , this.onSwipeCancel , this);
|
1843 |
}
|
1844 |
|
1845 |
|
1846 |
-
if(!this.selected)
|
|
|
|
|
|
|
1847 |
this.selected = false;
|
1848 |
|
1849 |
this.$element.removeClass('ms-sl-selected');
|
@@ -1854,33 +1991,58 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
1854 |
|
1855 |
};
|
1856 |
|
|
|
|
|
|
|
1857 |
p.sleep = function(force){
|
1858 |
-
if(this.isSleeping && !force)
|
|
|
|
|
|
|
1859 |
this.isSleeping = true;
|
1860 |
-
|
|
|
1861 |
this.$element.detach();
|
|
|
|
|
|
|
|
|
|
|
1862 |
};
|
1863 |
|
|
|
|
|
|
|
1864 |
p.wakeup = function(){
|
1865 |
-
if(!this.isSleeping)
|
|
|
|
|
|
|
1866 |
this.isSleeping = false;
|
1867 |
|
1868 |
-
if(this.autoAppend)
|
1869 |
this.view.$slideCont.append(this.$element);
|
|
|
1870 |
|
1871 |
-
if(this.moz)
|
1872 |
this.$element.css('margin-top' , '0.1px');
|
|
|
1873 |
|
1874 |
-
this.
|
1875 |
|
1876 |
// aling bg
|
1877 |
-
if(this.hasBG)
|
1878 |
this.bgAligner.align();
|
|
|
|
|
|
|
|
|
|
|
1879 |
};
|
1880 |
|
1881 |
-
})(jQuery);
|
1882 |
|
1883 |
-
/* ================== bin-debug/js/lite/SlideController.js =================== */
|
1884 |
;(function($){
|
1885 |
|
1886 |
"use strict";
|
@@ -2008,7 +2170,7 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2008 |
this.currentSlide.select();
|
2009 |
|
2010 |
if(this.so.preload > 1){
|
2011 |
-
var loc ,i , l = this.so.preload - 1;
|
2012 |
|
2013 |
// next slides
|
2014 |
for(i=1;i<=l;++i){
|
@@ -2022,7 +2184,12 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2022 |
continue;
|
2023 |
}
|
2024 |
}
|
2025 |
-
|
|
|
|
|
|
|
|
|
|
|
2026 |
}
|
2027 |
|
2028 |
// previous slides
|
@@ -2041,7 +2208,12 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2041 |
continue;
|
2042 |
}
|
2043 |
}
|
2044 |
-
|
|
|
|
|
|
|
|
|
|
|
2045 |
}
|
2046 |
}
|
2047 |
|
@@ -2071,7 +2243,10 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2071 |
this._delayProgress = this._timer.getTime() / (this.view.currentSlide.delay * 10);
|
2072 |
|
2073 |
if(this.so.hideLayers && !this.hideCalled && this.view.currentSlide.delay * 1000 - this._timer.getTime() <= 300){
|
2074 |
-
this.view.currentSlide
|
|
|
|
|
|
|
2075 |
this.hideCalled = true;
|
2076 |
}
|
2077 |
|
@@ -2163,7 +2338,7 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2163 |
this.currentSlide.setSize(this.width , null , hard);
|
2164 |
this.view.setSize(this.width , this.currentSlide.getHeight() , hard);
|
2165 |
} else {
|
2166 |
-
this.view.setSize(this.width , (this.so.heightLimit ? Math.min(this.height , this.so.height) :
|
2167 |
}
|
2168 |
|
2169 |
if(this.slider.$controlsCont){
|
@@ -2338,6 +2513,11 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2338 |
if(this.slider.init_safemode && hard)
|
2339 |
this.slider.init_safemode = false;
|
2340 |
this.__resize(hard);
|
|
|
|
|
|
|
|
|
|
|
2341 |
};
|
2342 |
|
2343 |
p.locate = function(){
|
@@ -2366,8 +2546,6 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2366 |
/* ================== bin-debug/js/lite/MasterSlider.js =================== */
|
2367 |
/**
|
2368 |
* Master Slider Main JavaScript File
|
2369 |
-
* @version 2.2.0
|
2370 |
-
* @author Averta Ltd.
|
2371 |
*/
|
2372 |
|
2373 |
;(function($){
|
@@ -2394,6 +2572,7 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2394 |
heightLimit : true, // It force the slide to use max height value as its base specified height value.
|
2395 |
smoothHeight : true, // Whether the slider uses smooth animation while its height changes.
|
2396 |
autoHeight : false, // Whether the slider adapts its height to each slide height or not. It overrides heightLimit option.
|
|
|
2397 |
fullwidth : false, // It enables the slider to adapt width to its parent element. It's very useful for creating full-width sliders. In default it takes max width as its base width value.
|
2398 |
fullheight : false, // It enables the slider to adapt height to its parent element.
|
2399 |
autofill : false, // It enables the slider to adapt width and height to its parent element, It's very useful for creating fullscreen or fullwindow slider.
|
@@ -2408,7 +2587,8 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2408 |
preload : 0, // Specifies number of slides which will be loaded by slider. 0 value means the slider loads slides in sequence.
|
2409 |
wheel : false, // Whether slider uses mouse wheel for navigation.
|
2410 |
layout : 'boxed', // It accepts 'fullwidth', 'fullscreen', 'fillwidth', 'autofill', 'partialview', 'boxed'. It overrides 'fullwidth' and 'autofill' (added in v1.5.6)
|
2411 |
-
|
|
|
2412 |
instantStartLayers : false, // @since 1.5.0, Whether instantly shows slide layers.
|
2413 |
parallaxMode : 'mouse', // @since 1.6.0, Specifies mode of parallax effect accepts: "mouse", "mouse:x-only", "mouse:y-only" and "swipe"
|
2414 |
rtl : false, // @since 1.8.0, Whether Right-to-left direction slider.
|
@@ -2430,6 +2610,9 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2430 |
this.rightSpace = 0;
|
2431 |
this.bottomSpace = 0;
|
2432 |
|
|
|
|
|
|
|
2433 |
var that = this;
|
2434 |
this.resize_listener = function(){that._resize();};
|
2435 |
$(window).bind('resize', this.resize_listener);
|
@@ -2437,8 +2620,8 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2437 |
};
|
2438 |
|
2439 |
MasterSlider.author = 'Averta Ltd. (www.averta.net)';
|
2440 |
-
MasterSlider.version = '2.
|
2441 |
-
MasterSlider.releaseDate = '
|
2442 |
|
2443 |
// Master Slider plugins.
|
2444 |
MasterSlider._plugins = []
|
@@ -2462,7 +2645,7 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2462 |
var that = this,
|
2463 |
new_slide,
|
2464 |
ind = 0;
|
2465 |
-
|
2466 |
this.$element.children('.ms-slide').each(function(index) {
|
2467 |
|
2468 |
var $slide_ele = $(this);
|
@@ -2576,7 +2759,7 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2576 |
if( lo !== 'boxed' && lo !== 'partialview' ){
|
2577 |
this.options.fullwidth = true; // enable slider fullscreen for fullwidth, fillwidth, autofill and fullscreen layouts.
|
2578 |
}
|
2579 |
-
if( lo === 'fullscreen' || lo === 'fullwidth' ){
|
2580 |
$(window).bind('resize', {that:this}, this._updateLayout);
|
2581 |
this._updateLayout();
|
2582 |
}
|
@@ -2593,11 +2776,11 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2593 |
p._updateLayout = function(event){
|
2594 |
var that = event? event.data.that : this,
|
2595 |
lo = that.options.layout,
|
2596 |
-
$element = that.$element
|
|
|
2597 |
|
2598 |
-
|
2599 |
// width
|
2600 |
-
$element.width($
|
2601 |
var margin = -$element.offset().left + that.leftSpace + that.lastMargin;
|
2602 |
$element.css('margin-left', margin );
|
2603 |
that.lastMargin = margin;
|
@@ -2607,13 +2790,15 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2607 |
|
2608 |
/**
|
2609 |
* initialize the slider, called by document ready
|
2610 |
-
* <code>
|
2611 |
* @since 1.0
|
2612 |
* @protected
|
2613 |
*/
|
2614 |
p._init = function(){
|
2615 |
-
|
2616 |
-
if(this.
|
|
|
|
|
2617 |
|
2618 |
this.initialized = true;
|
2619 |
|
@@ -2766,7 +2951,25 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2766 |
|
2767 |
return this;
|
2768 |
};
|
2769 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2770 |
/**
|
2771 |
* setup slider
|
2772 |
* @param {String|jQuery object} id
|
@@ -2848,7 +3051,10 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2848 |
}
|
2849 |
}
|
2850 |
|
2851 |
-
$(document).ready(function(){
|
|
|
|
|
|
|
2852 |
|
2853 |
return this;
|
2854 |
};
|
@@ -2862,12 +3068,12 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2862 |
p.destroy = function(insertMarkup){
|
2863 |
|
2864 |
// destroy active plugins
|
2865 |
-
for ( var
|
2866 |
this.activePlugins[i].destroy();
|
2867 |
}
|
2868 |
-
|
2869 |
if(this.controls){
|
2870 |
-
for(
|
2871 |
this.controls[i].destroy();
|
2872 |
}
|
2873 |
|
@@ -2875,10 +3081,11 @@ MSSliderEvent.DESTROY = 'ms_destroy';
|
|
2875 |
|
2876 |
if(this.$loading) this.$loading.remove();
|
2877 |
|
2878 |
-
if(insertMarkup)
|
2879 |
this.$element.html(this.setupMarkup).css('visibility' , 'hidden');
|
2880 |
-
else
|
2881 |
this.$element.remove();
|
|
|
2882 |
|
2883 |
var lo = this.options.layout;
|
2884 |
if( lo === 'fullscreen' || lo === 'fullwidth' ){
|
@@ -3016,13 +3223,13 @@ window.MSViewEvents = function (type, data){
|
|
3016 |
this.data = data;
|
3017 |
};
|
3018 |
|
3019 |
-
MSViewEvents.SWIPE_START
|
3020 |
-
MSViewEvents.SWIPE_END
|
3021 |
-
MSViewEvents.SWIPE_MOVE
|
3022 |
-
MSViewEvents.SWIPE_CANCEL
|
3023 |
-
MSViewEvents.SCROLL
|
3024 |
-
MSViewEvents.CHANGE_START
|
3025 |
-
MSViewEvents.CHANGE_END
|
3026 |
|
3027 |
/* ================== bin-debug/js/lite/views/BasicView.js =================== */
|
3028 |
;(function($){
|
@@ -3140,7 +3347,11 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3140 |
var new_slide = this.slideList[this.index];
|
3141 |
if(new_slide === this.currentSlide)return;
|
3142 |
this.currentSlide = new_slide;
|
3143 |
-
|
|
|
|
|
|
|
|
|
3144 |
this.slideChanged = true;
|
3145 |
this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START));
|
3146 |
};
|
@@ -3332,9 +3543,7 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3332 |
// @since 1.7.0
|
3333 |
// adds z-index to slides
|
3334 |
p.__updateSlidesZindex = function(){
|
3335 |
-
|
3336 |
-
return;
|
3337 |
-
}
|
3338 |
|
3339 |
var slide,
|
3340 |
l = this.viewSlidesList.length,
|
@@ -3395,7 +3604,11 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3395 |
if(target_slide === this.currentSlide) return;
|
3396 |
this.slideChanged = true;
|
3397 |
this.currentSlide = target_slide;
|
3398 |
-
|
|
|
|
|
|
|
|
|
3399 |
this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START));
|
3400 |
if(fast)this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END));
|
3401 |
};
|
@@ -3656,7 +3869,8 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3656 |
this.options = {
|
3657 |
prefix:'ms-',
|
3658 |
autohide:true,
|
3659 |
-
overVideo:true
|
|
|
3660 |
};
|
3661 |
};
|
3662 |
|
@@ -3672,9 +3886,6 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3672 |
this.cont = this.options.insertTo ? $(this.options.insertTo) : this.slider.$controlsCont;
|
3673 |
if(!this.options.overVideo) this._hideOnvideoStarts();
|
3674 |
|
3675 |
-
|
3676 |
-
|
3677 |
-
|
3678 |
};
|
3679 |
|
3680 |
p.checkHideUnder = function(){
|
@@ -3708,7 +3919,7 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3708 |
|
3709 |
p.create = function(){
|
3710 |
var that = this;
|
3711 |
-
if(this.options.autohide
|
3712 |
|
3713 |
this.hide(true);
|
3714 |
|
@@ -3728,6 +3939,11 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3728 |
if ( this.options.align ) {
|
3729 |
this.$element.addClass('ms-align-' + this.options.align);
|
3730 |
}
|
|
|
|
|
|
|
|
|
|
|
3731 |
};
|
3732 |
|
3733 |
/**
|
@@ -3928,7 +4144,7 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3928 |
// default options
|
3929 |
this.options.dir = 'h';
|
3930 |
this.options.wheel = options.dir === 'v';
|
3931 |
-
this.options.arrows =
|
3932 |
this.options.speed = 17;
|
3933 |
this.options.align = null;
|
3934 |
this.options.inset = false;
|
@@ -3937,6 +4153,7 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
3937 |
this.options.width = 100;
|
3938 |
this.options.height = 100;
|
3939 |
this.options.type = 'thumbs'; // tabs
|
|
|
3940 |
|
3941 |
|
3942 |
$.extend(this.options , options);
|
@@ -4034,16 +4251,16 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
4034 |
};
|
4035 |
|
4036 |
p.slideAction = function(slide){
|
4037 |
-
var thumb_ele =
|
4038 |
var that = this;
|
4039 |
var thumb_frame = $('<div></div>')
|
4040 |
.addClass('ms-thumb-frame')
|
4041 |
.append(thumb_ele)
|
4042 |
.append($('<div class="ms-thumb-ol"></div>'))
|
4043 |
-
.bind('click' , function(){that.changeSlide(thumb_frame);});
|
4044 |
|
4045 |
if( this.options.align ){
|
4046 |
-
thumb_frame.width(this.options.width - (this.options.dir === 'v' ? 12 : 0)) // less arrow size 12px
|
4047 |
.height(this.options.height)
|
4048 |
.css('margin-'+(this.options.dir === 'v' ? 'bottom' : 'right'), this.options.space);
|
4049 |
}
|
@@ -4108,6 +4325,7 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
4108 |
}
|
4109 |
|
4110 |
this.slider.api.addEventListener(MSSliderEvent.CHANGE_START , this.update , this);
|
|
|
4111 |
this.cindex = this.slider.api.index();
|
4112 |
this.select(this.thumbs[this.cindex]);
|
4113 |
|
@@ -4191,6 +4409,14 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
4191 |
if(!this.dTouch)this.updateThumbscroll();
|
4192 |
};
|
4193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4194 |
p.updateThumbscroll = function(){
|
4195 |
var thumb_size;
|
4196 |
|
@@ -4947,6 +5173,70 @@ MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
|
4947 |
|
4948 |
MSSlideController.registerControl('slideinfo' , MSSlideInfo);
|
4949 |
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4950 |
/**
|
4951 |
* Addon file, it will be appended to master slider front-end main js file.
|
4952 |
*/
|
3 |
* Copyright © 2015 All Rights Reserved.
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
+
* @version 2.9.4
|
7 |
+
* @date Apr 2015
|
8 |
*/
|
9 |
|
10 |
|
205 |
return -1;
|
206 |
};
|
207 |
}
|
208 |
+
|
209 |
+
|
210 |
+
/**
|
211 |
+
* check ie browser
|
212 |
+
* @param {Number | string} version
|
213 |
+
* @return {Boolean}
|
214 |
+
*/
|
215 |
+
window.isMSIE = function ( version ) {
|
216 |
+
if ( !$.browser.msie ) {
|
217 |
+
return false;
|
218 |
+
} else if ( !version ) {
|
219 |
+
return true;
|
220 |
+
}
|
221 |
+
var ieVer = $.browser.version.slice(0 , $.browser.version.indexOf('.'));
|
222 |
+
if ( typeof version === 'string' ) {
|
223 |
+
if ( version.indexOf('<') !== -1 || version.indexOf('>') !== -1) {
|
224 |
+
return eval( ieVer + version );
|
225 |
+
} else {
|
226 |
+
return eval( version + '==' + ieVer );
|
227 |
+
}
|
228 |
+
} else {
|
229 |
+
return version == ieVer;
|
230 |
+
}
|
231 |
+
}
|
232 |
+
|
233 |
+
$.removeDataAttrs = function($target, exclude) {
|
234 |
+
var i,
|
235 |
+
attrName,
|
236 |
+
dataAttrsToDelete = [],
|
237 |
+
dataAttrs = $target[0].attributes,
|
238 |
+
dataAttrsLen = dataAttrs.length;
|
239 |
+
|
240 |
+
exclude = exclude || [];
|
241 |
+
|
242 |
+
// loop through attributes and make a list of those
|
243 |
+
// that begin with 'data-'
|
244 |
+
for (i=0; i<dataAttrsLen; i++) {
|
245 |
+
attrName = dataAttrs[i].name;
|
246 |
+
if ( 'data-' === attrName.substring(0,5) && exclude.indexOf(attrName) === -1 ) {
|
247 |
+
// Why don't you just delete the attributes here?
|
248 |
+
// Deleting an attribute changes the indices of the
|
249 |
+
// others wreaking havoc on the loop we are inside
|
250 |
+
// b/c dataAttrs is a NamedNodeMap (not an array or obj)
|
251 |
+
dataAttrsToDelete.push(dataAttrs[i].name);
|
252 |
+
}
|
253 |
+
}
|
254 |
+
// delete each of the attributes we found above
|
255 |
+
// i.e. those that start with "data-"
|
256 |
+
$.each( dataAttrsToDelete, function( index, attrName ) {
|
257 |
+
$target.removeAttr( attrName );
|
258 |
+
})
|
259 |
+
};
|
260 |
|
261 |
if(jQuery){
|
262 |
$.jqLoadFix = function(){
|
1485 |
self._deceleration = false;
|
1486 |
self.__isout = false;
|
1487 |
|
1488 |
+
if(self.__needsSnap && self.options.snapping && !self.options.paging){
|
1489 |
self.value = self._checkLimits(self.end_loc + self.__extraMove);
|
1490 |
}else{
|
1491 |
self.value = Math.round(self.value);
|
1503 |
|
1504 |
})();
|
1505 |
|
1506 |
+
/* ================== bin-debug/js/lite/controls/SliderEvent.js =================== */
|
1507 |
window.MSSliderEvent = function (type){
|
1508 |
this.type = type;
|
1509 |
};
|
1515 |
MSSliderEvent.VIDEO_PLAY = 'ms_videoPlay';
|
1516 |
MSSliderEvent.VIDEO_CLOSE = 'ms_videoclose';
|
1517 |
MSSliderEvent.INIT = 'ms_init';
|
1518 |
+
MSSliderEvent.HARD_UPDATE = 'ms_hard_update';
|
1519 |
MSSliderEvent.RESIZE = 'ms_resize';
|
1520 |
MSSliderEvent.RESERVED_SPACE_CHANGE = 'ms_rsc'; // internal use
|
1521 |
MSSliderEvent.DESTROY = 'ms_destroy';
|
1522 |
|
1523 |
+
/* ================== bin-debug/js/lite/controls/Slide.js =================== */
|
1524 |
+
/**
|
1525 |
+
* Master Slider Slide Class
|
1526 |
+
* @author averta
|
1527 |
+
* @package Master Slider jQuery
|
1528 |
+
*/
|
1529 |
+
;(function(window, document, $){
|
1530 |
|
1531 |
"use strict";
|
1532 |
|
1533 |
window.MSSlide = function(){
|
1534 |
|
1535 |
this.$element = null;
|
|
|
1536 |
this.$loading = $('<div></div>').addClass('ms-slide-loading');
|
1537 |
+
|
1538 |
this.view = null;
|
1539 |
this.index = -1;
|
1540 |
|
1541 |
this.__width = 0;
|
1542 |
this.__height = 0;
|
1543 |
|
|
|
|
|
1544 |
this.fillMode = 'fill'; // fill , fit , stretch , tile , center
|
1545 |
|
1546 |
this.selected = false;
|
1552 |
};
|
1553 |
|
1554 |
var p = MSSlide.prototype;
|
1555 |
+
|
1556 |
+
/**
|
1557 |
+
* on swipe start handler
|
1558 |
+
*/
|
|
|
|
|
|
|
1559 |
p.onSwipeStart = function(){
|
1560 |
//this.$layers.css(window._csspfx + 'transition-duration' , '0ms');
|
1561 |
+
if ( this.link ) {
|
1562 |
+
this.linkdis = true;
|
1563 |
+
}
|
1564 |
+
|
1565 |
+
if ( this.video ) {
|
1566 |
+
this.videodis = true;
|
1567 |
+
}
|
1568 |
};
|
1569 |
|
1570 |
+
/**
|
1571 |
+
* on swipe move handler
|
1572 |
+
*/
|
1573 |
p.onSwipeMove = function (e) {
|
1574 |
var move = Math.max(Math.abs(e.data.distanceX), Math.abs(e.data.distanceY));
|
1575 |
this.swipeMoved = move > 4;
|
1576 |
};
|
1577 |
+
|
1578 |
+
/**
|
1579 |
+
* on swipe cancel handler
|
1580 |
+
*/
|
1581 |
p.onSwipeCancel = function(e){
|
|
|
1582 |
if ( this.swipeMoved ) {
|
1583 |
this.swipeMoved = false;
|
1584 |
return;
|
1585 |
}
|
1586 |
|
1587 |
+
if ( this.link ) {
|
1588 |
+
this.linkdis = false;
|
1589 |
+
}
|
1590 |
+
|
1591 |
+
if ( this.video ) {
|
1592 |
+
this.videodis = false;
|
1593 |
+
}
|
1594 |
//this.$layers.css(window._csspfx + 'transition-duration' , this.view.__slideDuration + 'ms');
|
1595 |
};
|
1596 |
|
1597 |
+
/**
|
1598 |
+
* this method called after loading all assets related to this slide
|
1599 |
+
*/
|
1600 |
+
p.assetsLoaded = function(){
|
1601 |
this.ready = true;
|
1602 |
this.slider.api._startTimer();
|
1603 |
|
1604 |
+
if ( !this.isSleeping ) {
|
1605 |
+
this.setupBG();
|
1606 |
+
}
|
1607 |
|
1608 |
CTween.fadeOut(this.$loading , 300 , true);
|
1609 |
|
1610 |
//sequence loading
|
1611 |
+
if ( (this.slider.options.preload === 0 || this.slider.options.preload === 'all') && this.index < this.view.slideList.length - 1 ) {
|
1612 |
this.view.slideList[this.index + 1].loadImages();
|
1613 |
+
} else if ( this.slider.options.preload === 'all' && this.index === this.view.slideList.length - 1 ){
|
|
|
1614 |
this.slider._removeLoading();
|
1615 |
+
}
|
1616 |
|
1617 |
};
|
1618 |
|
1619 |
+
/**
|
1620 |
+
* adds backgroun image to the slider
|
1621 |
+
* @param {Element} img slide image element
|
1622 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
1623 |
p.setBG = function(img){
|
1624 |
this.hasBG = true;
|
1625 |
var that = this;
|
1635 |
this.bgAligner = new MSAligner(that.fillMode , that.$imgcont, that.$bg_img );
|
1636 |
this.bgAligner.widthOnly = this.slider.options.autoHeight;
|
1637 |
|
1638 |
+
if ( that.slider.options.autoHeight && (that.pselected || that.selected) ) {
|
1639 |
+
that.slider.setHeight(that.slider.options.height);
|
1640 |
+
}
|
1641 |
|
1642 |
+
if ( this.$bg_img.data('src') !== undefined ) {
|
1643 |
this.bg_src = this.$bg_img.data('src');
|
1644 |
this.$bg_img.removeAttr('data-src');
|
1645 |
+
} else {
|
1646 |
this.$bg_img.one('load', function(event) {that._onBGLoad(event);})
|
1647 |
.each($.jqLoadFix);
|
1648 |
}
|
1649 |
|
|
|
1650 |
};
|
|
|
|
|
|
|
|
|
1651 |
|
1652 |
+
/**
|
1653 |
+
* align and resize backgrund image over slide
|
1654 |
+
*/
|
1655 |
+
p.setupBG = function(){
|
1656 |
+
|
1657 |
+
//if(this.isSettedup) return;
|
1658 |
+
//this.isSettedup = true;
|
1659 |
+
|
1660 |
+
if ( !this.initBG && this.bgLoaded ) {
|
1661 |
+
this.initBG = true;
|
1662 |
+
this.$bg_img.css('visibility' , '');
|
1663 |
+
this.bgWidth = this.bgNatrualWidth || this.$bg_img.width();
|
1664 |
+
this.bgHeight = this.bgNatrualHeight || this.$bg_img.height();
|
1665 |
+
|
1666 |
+
CTween.fadeIn(this.$imgcont , 300);
|
1667 |
+
|
1668 |
+
if(this.slider.options.autoHeight){
|
1669 |
+
this.$imgcont.height(this.bgHeight * this.ratio);
|
1670 |
+
}
|
1671 |
+
|
1672 |
+
this.bgAligner.init(this.bgWidth , this.bgHeight);
|
1673 |
+
this.setSize(this.__width , this.__height);
|
1674 |
+
|
1675 |
+
if(this.slider.options.autoHeight && (this.pselected || this.selected))
|
1676 |
+
this.slider.setHeight(this.getHeight());
|
1677 |
}
|
1678 |
+
|
1679 |
};
|
1680 |
+
|
1681 |
+
|
1682 |
|
1683 |
+
/**
|
1684 |
+
* start loading images
|
1685 |
+
*/
|
1686 |
p.loadImages = function(){
|
1687 |
+
if ( this.ls ) {
|
1688 |
+
return;
|
1689 |
+
}
|
1690 |
|
1691 |
this.ls = true;
|
1692 |
|
1693 |
+
if ( this.hasBG && this.bg_src ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
1694 |
var that = this;
|
1695 |
this.$bg_img.preloadImg(this.bg_src , function(event) {that._onBGLoad(event);});
|
1696 |
}
|
1697 |
|
1698 |
+
// There is nothing to preload? so slide is ready to show.
|
1699 |
+
if( !this.hasBG && !this.hasLayers ) {
|
1700 |
+
this.assetsLoaded();
|
1701 |
+
}
|
1702 |
+
|
1703 |
};
|
1704 |
+
|
1705 |
+
/**
|
1706 |
+
* on background image loaded
|
1707 |
+
* @param {Event} event
|
1708 |
+
*/
|
1709 |
+
p._onBGLoad = function(event){
|
1710 |
+
this.bgNatrualWidth = event.width;
|
1711 |
+
this.bgNatrualHeight = event.height;
|
1712 |
+
|
1713 |
+
this.bgLoaded = true;
|
1714 |
+
|
1715 |
+
if ( $.browser.msie ) {
|
1716 |
+
this.$bg_img.on('dragstart', function(event) { event.preventDefault(); }); // disables native dragging
|
1717 |
+
}
|
1718 |
+
|
1719 |
+
if ( !this.hasLayers || this.layerController.ready ) {
|
1720 |
+
this.assetsLoaded();
|
1721 |
+
}
|
1722 |
+
};
|
1723 |
+
|
1724 |
/* -----------------------------------------------------*/
|
1725 |
|
1726 |
+
/**
|
1727 |
+
* resize slide
|
1728 |
+
* @param {Number} width
|
1729 |
+
* @param {Number} height
|
1730 |
+
* @param {Boolean} hard after resizing reinitializes layers
|
1731 |
+
*/
|
1732 |
+
p.setSize = function(width, height, hard) {
|
1733 |
|
1734 |
this.__width = width;
|
1735 |
|
1736 |
+
if ( this.slider.options.autoHeight ) {
|
1737 |
+
if ( this.bgLoaded ) {
|
1738 |
this.ratio = this.__width / this.bgWidth;
|
1739 |
height = Math.floor(this.ratio * this.bgHeight);
|
1740 |
this.$imgcont.height(height);
|
1741 |
+
} else {
|
1742 |
this.ratio = width / this.slider.options.width;
|
1743 |
height = this.slider.options.height * this.ratio;
|
1744 |
}
|
1751 |
|
1752 |
};
|
1753 |
|
1754 |
+
/**
|
1755 |
+
* calculates slide height
|
1756 |
+
* @return {Number} slide height
|
1757 |
+
*/
|
1758 |
p.getHeight = function(){
|
1759 |
+
|
1760 |
+
if ( this.hasBG && this.bgLoaded ) {
|
1761 |
+
return this.bgHeight * this.ratio;
|
1762 |
+
}
|
1763 |
+
|
1764 |
return Math.max(this.$element[0].clientHeight, this.slider.options.height * this.ratio);
|
1765 |
};
|
1766 |
|
1767 |
/* -----------------------------------------------------*/
|
1768 |
// YouTube and Vimeo videos
|
1769 |
+
|
1770 |
+
/**
|
1771 |
+
* playe embeded video
|
1772 |
+
*/
|
1773 |
+
p.__playVideo = function (){
|
1774 |
+
|
1775 |
+
if ( this.vplayed || this.videodis ) {
|
1776 |
+
return;
|
1777 |
+
}
|
1778 |
+
|
1779 |
this.vplayed = true;
|
1780 |
+
|
1781 |
+
if ( !this.slider.api.paused ) {
|
1782 |
this.slider.api.pause();
|
1783 |
this.roc = true; // resume on close;
|
1784 |
}
|
1785 |
+
|
1786 |
this.vcbtn.css('display' , '');
|
1787 |
CTween.fadeOut(this.vpbtn , 500 , false);
|
1788 |
CTween.fadeIn(this.vcbtn , 500);
|
1798 |
this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_PLAY));
|
1799 |
};
|
1800 |
|
1801 |
+
/**
|
1802 |
+
* close embeded video
|
1803 |
+
*/
|
1804 |
p.__closeVideo = function(){
|
1805 |
+
|
1806 |
+
if ( !this.vplayed ) {
|
1807 |
+
return;
|
1808 |
+
}
|
1809 |
+
|
1810 |
this.vplayed = false;
|
1811 |
+
|
1812 |
+
if(this.roc){
|
1813 |
this.slider.api.resume();
|
1814 |
+
}
|
1815 |
+
|
1816 |
var that = this;
|
1817 |
|
1818 |
CTween.fadeIn(this.vpbtn , 500);
|
1830 |
|
1831 |
/* -----------------------------------------------------*/
|
1832 |
|
1833 |
+
/**
|
1834 |
+
* create slide - it adds requierd elements over slide
|
1835 |
+
*/
|
1836 |
p.create = function(){
|
1837 |
var that = this;
|
1838 |
|
1839 |
+
|
1840 |
+
if ( this.link ) {
|
1841 |
this.link.addClass('ms-slide-link').html('').click(function(e){
|
1842 |
if ( that.linkdis ) {
|
1843 |
e.preventDefault();
|
1848 |
// .click(function(){ if(!that.linkdis) window.open(that.link , that.link_targ || '_self'); });
|
1849 |
}
|
1850 |
|
1851 |
+
if ( this.video ) {
|
1852 |
+
|
1853 |
+
if ( this.video.indexOf('?') === -1 ) {
|
1854 |
+
this.video += '?';
|
1855 |
+
}
|
1856 |
|
|
|
1857 |
this.vframe = $('<iframe></iframe>')
|
1858 |
.addClass('ms-slide-video')
|
1859 |
.css({width:'100%' , height:'100%' , display:'none'})
|
1872 |
.appendTo(this.$element)
|
1873 |
.css('display','none');
|
1874 |
|
1875 |
+
if ( window._touch ) {
|
1876 |
this.vcbtn.removeClass('ms-slide-vcbtn')
|
1877 |
.addClass('ms-slide-vcbtn-mobile')
|
1878 |
.append('<div class="ms-vcbtn-txt">Close video</div>')
|
1880 |
}
|
1881 |
}
|
1882 |
|
1883 |
+
if ( !this.slider.options.autoHeight && this.hasBG ) {
|
1884 |
this.$imgcont.css('height' , '100%');
|
1885 |
|
1886 |
+
if ( this.fillMode === 'center' || this.fillMode === 'stretch' ){
|
1887 |
this.fillMode = 'fill';
|
1888 |
+
}
|
1889 |
}
|
1890 |
|
1891 |
+
if ( this.slider.options.autoHeight ) {
|
1892 |
this.$element.addClass('ms-slide-auto-height');
|
1893 |
}
|
1894 |
|
|
|
1895 |
this.sleep(true);
|
1896 |
};
|
1897 |
|
1898 |
+
/**
|
1899 |
+
* destory the slide
|
1900 |
+
*/
|
1901 |
p.destroy = function(){
|
1902 |
this.$element.remove();
|
1903 |
this.$element = null;
|
1904 |
};
|
1905 |
|
1906 |
+
/**
|
1907 |
+
* everything require to do before selecting slide
|
1908 |
+
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1909 |
p.prepareToSelect = function(){
|
1910 |
|
1911 |
+
if ( this.pselected || this.selected ) {
|
1912 |
+
return;
|
1913 |
+
}
|
1914 |
|
|
|
1915 |
this.pselected = true;
|
1916 |
|
1917 |
+
if ( this.link || this.video ) {
|
1918 |
this.view.addEventListener(MSViewEvents.SWIPE_START , this.onSwipeStart , this);
|
1919 |
this.view.addEventListener(MSViewEvents.SWIPE_MOVE , this.onSwipeMove , this);
|
1920 |
this.view.addEventListener(MSViewEvents.SWIPE_CANCEL , this.onSwipeCancel , this);
|
1938 |
|
1939 |
};*/
|
1940 |
|
1941 |
+
/**
|
1942 |
+
* select slide
|
1943 |
+
*/
|
1944 |
p.select = function(){
|
1945 |
+
if ( this.selected ) {
|
1946 |
+
return;
|
1947 |
+
}
|
1948 |
+
|
1949 |
this.selected = true;
|
1950 |
this.pselected = false;
|
1951 |
this.$element.addClass('ms-sl-selected');
|
1960 |
|
1961 |
};
|
1962 |
|
1963 |
+
/**
|
1964 |
+
* remove selected status
|
1965 |
+
*/
|
1966 |
p.unselect = function(){
|
1967 |
this.pselected = false;
|
1968 |
+
|
1969 |
+
if ( this.moz ) {
|
1970 |
this.$element.css('margin-top' , '0.1px');
|
1971 |
+
}
|
1972 |
|
1973 |
+
if ( this.link || this.video ) {
|
1974 |
this.view.removeEventListener(MSViewEvents.SWIPE_START , this.onSwipeStart , this);
|
1975 |
this.view.removeEventListener(MSViewEvents.SWIPE_MOVE , this.onSwipeMove , this);
|
1976 |
this.view.removeEventListener(MSViewEvents.SWIPE_CANCEL , this.onSwipeCancel , this);
|
1977 |
}
|
1978 |
|
1979 |
|
1980 |
+
if ( !this.selected ) {
|
1981 |
+
return;
|
1982 |
+
}
|
1983 |
+
|
1984 |
this.selected = false;
|
1985 |
|
1986 |
this.$element.removeClass('ms-sl-selected');
|
1991 |
|
1992 |
};
|
1993 |
|
1994 |
+
/**
|
1995 |
+
* remove slide from DOM
|
1996 |
+
*/
|
1997 |
p.sleep = function(force){
|
1998 |
+
if ( this.isSleeping && !force ) {
|
1999 |
+
return;
|
2000 |
+
}
|
2001 |
+
|
2002 |
this.isSleeping = true;
|
2003 |
+
|
2004 |
+
if ( this.autoAppend ) {
|
2005 |
this.$element.detach();
|
2006 |
+
}
|
2007 |
+
|
2008 |
+
if ( this.hasLayers ) {
|
2009 |
+
this.layerController.onSlideSleep();
|
2010 |
+
}
|
2011 |
};
|
2012 |
|
2013 |
+
/**
|
2014 |
+
* add slide to the DOM
|
2015 |
+
*/
|
2016 |
p.wakeup = function(){
|
2017 |
+
if ( !this.isSleeping ) {
|
2018 |
+
return;
|
2019 |
+
}
|
2020 |
+
|
2021 |
this.isSleeping = false;
|
2022 |
|
2023 |
+
if ( this.autoAppend ) {
|
2024 |
this.view.$slideCont.append(this.$element);
|
2025 |
+
}
|
2026 |
|
2027 |
+
if ( this.moz ){
|
2028 |
this.$element.css('margin-top' , '0.1px');
|
2029 |
+
}
|
2030 |
|
2031 |
+
this.setupBG();
|
2032 |
|
2033 |
// aling bg
|
2034 |
+
if ( this.hasBG ){
|
2035 |
this.bgAligner.align();
|
2036 |
+
}
|
2037 |
+
|
2038 |
+
if ( this.hasLayers ) {
|
2039 |
+
this.layerController.onSlideWakeup();
|
2040 |
+
}
|
2041 |
};
|
2042 |
|
2043 |
+
})(window, document, jQuery);
|
2044 |
|
2045 |
+
/* ================== bin-debug/js/lite/controls/SlideController.js =================== */
|
2046 |
;(function($){
|
2047 |
|
2048 |
"use strict";
|
2170 |
this.currentSlide.select();
|
2171 |
|
2172 |
if(this.so.preload > 1){
|
2173 |
+
var loc ,i , l = this.so.preload - 1, slide;
|
2174 |
|
2175 |
// next slides
|
2176 |
for(i=1;i<=l;++i){
|
2184 |
continue;
|
2185 |
}
|
2186 |
}
|
2187 |
+
|
2188 |
+
slide = this.view.slideList[loc];
|
2189 |
+
if ( slide ) {
|
2190 |
+
slide.loadImages();
|
2191 |
+
}
|
2192 |
+
|
2193 |
}
|
2194 |
|
2195 |
// previous slides
|
2208 |
continue;
|
2209 |
}
|
2210 |
}
|
2211 |
+
|
2212 |
+
slide = this.view.slideList[loc];
|
2213 |
+
if ( slide ) {
|
2214 |
+
slide.loadImages();
|
2215 |
+
}
|
2216 |
+
|
2217 |
}
|
2218 |
}
|
2219 |
|
2243 |
this._delayProgress = this._timer.getTime() / (this.view.currentSlide.delay * 10);
|
2244 |
|
2245 |
if(this.so.hideLayers && !this.hideCalled && this.view.currentSlide.delay * 1000 - this._timer.getTime() <= 300){
|
2246 |
+
var currentSlide = this.view.currentSlide;
|
2247 |
+
if ( currentSlide.hasLayers ) {
|
2248 |
+
currentSlide.layerController.animHideLayers();
|
2249 |
+
}
|
2250 |
this.hideCalled = true;
|
2251 |
}
|
2252 |
|
2338 |
this.currentSlide.setSize(this.width , null , hard);
|
2339 |
this.view.setSize(this.width , this.currentSlide.getHeight() , hard);
|
2340 |
} else {
|
2341 |
+
this.view.setSize(this.width , ( Math.max( this.so.minHeight, ( this.so.heightLimit ? Math.min(this.height , this.so.height) : this.height ) ) ) , hard);
|
2342 |
}
|
2343 |
|
2344 |
if(this.slider.$controlsCont){
|
2513 |
if(this.slider.init_safemode && hard)
|
2514 |
this.slider.init_safemode = false;
|
2515 |
this.__resize(hard);
|
2516 |
+
|
2517 |
+
if ( hard ) {
|
2518 |
+
this.dispatchEvent(new MSSliderEvent(MSSliderEvent.HARD_UPDATE));
|
2519 |
+
}
|
2520 |
+
|
2521 |
};
|
2522 |
|
2523 |
p.locate = function(){
|
2546 |
/* ================== bin-debug/js/lite/MasterSlider.js =================== */
|
2547 |
/**
|
2548 |
* Master Slider Main JavaScript File
|
|
|
|
|
2549 |
*/
|
2550 |
|
2551 |
;(function($){
|
2572 |
heightLimit : true, // It force the slide to use max height value as its base specified height value.
|
2573 |
smoothHeight : true, // Whether the slider uses smooth animation while its height changes.
|
2574 |
autoHeight : false, // Whether the slider adapts its height to each slide height or not. It overrides heightLimit option.
|
2575 |
+
minHeight : -1, // @since 2.13.0, Specifies min height value for the slider, it prevents slider to shows too narrow in small screens.
|
2576 |
fullwidth : false, // It enables the slider to adapt width to its parent element. It's very useful for creating full-width sliders. In default it takes max width as its base width value.
|
2577 |
fullheight : false, // It enables the slider to adapt height to its parent element.
|
2578 |
autofill : false, // It enables the slider to adapt width and height to its parent element, It's very useful for creating fullscreen or fullwindow slider.
|
2587 |
preload : 0, // Specifies number of slides which will be loaded by slider. 0 value means the slider loads slides in sequence.
|
2588 |
wheel : false, // Whether slider uses mouse wheel for navigation.
|
2589 |
layout : 'boxed', // It accepts 'fullwidth', 'fullscreen', 'fillwidth', 'autofill', 'partialview', 'boxed'. It overrides 'fullwidth' and 'autofill' (added in v1.5.6)
|
2590 |
+
autofillTarget : null, // @since 2.13.0, Specifies the parent element of slider width jQuery selector, it used for sizing slider with autofill layout. Default value is the first parent element of slider.
|
2591 |
+
fullscreenMargin : 0, // Specifies margin amount to the bottom of slider, it's only effective on fullscreen slider.
|
2592 |
instantStartLayers : false, // @since 1.5.0, Whether instantly shows slide layers.
|
2593 |
parallaxMode : 'mouse', // @since 1.6.0, Specifies mode of parallax effect accepts: "mouse", "mouse:x-only", "mouse:y-only" and "swipe"
|
2594 |
rtl : false, // @since 1.8.0, Whether Right-to-left direction slider.
|
2610 |
this.rightSpace = 0;
|
2611 |
this.bottomSpace = 0;
|
2612 |
|
2613 |
+
// hold on stack
|
2614 |
+
this._holdOn = 0;
|
2615 |
+
|
2616 |
var that = this;
|
2617 |
this.resize_listener = function(){that._resize();};
|
2618 |
$(window).bind('resize', this.resize_listener);
|
2620 |
};
|
2621 |
|
2622 |
MasterSlider.author = 'Averta Ltd. (www.averta.net)';
|
2623 |
+
MasterSlider.version = '2.9.4';
|
2624 |
+
MasterSlider.releaseDate = 'Apr 2015';
|
2625 |
|
2626 |
// Master Slider plugins.
|
2627 |
MasterSlider._plugins = []
|
2645 |
var that = this,
|
2646 |
new_slide,
|
2647 |
ind = 0;
|
2648 |
+
|
2649 |
this.$element.children('.ms-slide').each(function(index) {
|
2650 |
|
2651 |
var $slide_ele = $(this);
|
2759 |
if( lo !== 'boxed' && lo !== 'partialview' ){
|
2760 |
this.options.fullwidth = true; // enable slider fullscreen for fullwidth, fillwidth, autofill and fullscreen layouts.
|
2761 |
}
|
2762 |
+
if( lo === 'fullscreen' || lo === 'fullwidth' || lo === 'autofill' ){
|
2763 |
$(window).bind('resize', {that:this}, this._updateLayout);
|
2764 |
this._updateLayout();
|
2765 |
}
|
2776 |
p._updateLayout = function(event){
|
2777 |
var that = event? event.data.that : this,
|
2778 |
lo = that.options.layout,
|
2779 |
+
$element = that.$element,
|
2780 |
+
$win = $(window);
|
2781 |
|
|
|
2782 |
// width
|
2783 |
+
$element.width($win.width() - that.leftSpace - that.rightSpace);
|
2784 |
var margin = -$element.offset().left + that.leftSpace + that.lastMargin;
|
2785 |
$element.css('margin-left', margin );
|
2786 |
that.lastMargin = margin;
|
2790 |
|
2791 |
/**
|
2792 |
* initialize the slider, called by document ready
|
2793 |
+
* <code>holdOn</code> property prevents auto initialize slider after document ready it used by plugins of slider like Flickr
|
2794 |
* @since 1.0
|
2795 |
* @protected
|
2796 |
*/
|
2797 |
p._init = function(){
|
2798 |
+
|
2799 |
+
if ( this._holdOn > 0 || !this._docReady ) {
|
2800 |
+
return;
|
2801 |
+
}
|
2802 |
|
2803 |
this.initialized = true;
|
2804 |
|
2951 |
|
2952 |
return this;
|
2953 |
};
|
2954 |
+
|
2955 |
+
/**
|
2956 |
+
* Hold on slider from initialization
|
2957 |
+
* @since 2.9.6
|
2958 |
+
* @public
|
2959 |
+
*/
|
2960 |
+
p.holdOn = function () {
|
2961 |
+
this._holdOn ++;
|
2962 |
+
};
|
2963 |
+
|
2964 |
+
/**
|
2965 |
+
* Let the slider to initialize
|
2966 |
+
* @since 2.9.6
|
2967 |
+
*/
|
2968 |
+
p.release = function () {
|
2969 |
+
this._holdOn --;
|
2970 |
+
this._init();
|
2971 |
+
};
|
2972 |
+
|
2973 |
/**
|
2974 |
* setup slider
|
2975 |
* @param {String|jQuery object} id
|
3051 |
}
|
3052 |
}
|
3053 |
|
3054 |
+
$(document).ready(function(){
|
3055 |
+
that._docReady = true;
|
3056 |
+
that._init();
|
3057 |
+
});
|
3058 |
|
3059 |
return this;
|
3060 |
};
|
3068 |
p.destroy = function(insertMarkup){
|
3069 |
|
3070 |
// destroy active plugins
|
3071 |
+
for ( var i = 0, l = this.activePlugins.length; i !== l; i++ ) {
|
3072 |
this.activePlugins[i].destroy();
|
3073 |
}
|
3074 |
+
|
3075 |
if(this.controls){
|
3076 |
+
for( i = 0, l = this.controls.length; i !== l; i++ )
|
3077 |
this.controls[i].destroy();
|
3078 |
}
|
3079 |
|
3081 |
|
3082 |
if(this.$loading) this.$loading.remove();
|
3083 |
|
3084 |
+
if ( insertMarkup ) {
|
3085 |
this.$element.html(this.setupMarkup).css('visibility' , 'hidden');
|
3086 |
+
} else {
|
3087 |
this.$element.remove();
|
3088 |
+
}
|
3089 |
|
3090 |
var lo = this.options.layout;
|
3091 |
if( lo === 'fullscreen' || lo === 'fullwidth' ){
|
3223 |
this.data = data;
|
3224 |
};
|
3225 |
|
3226 |
+
MSViewEvents.SWIPE_START = 'swipeStart';
|
3227 |
+
MSViewEvents.SWIPE_END = 'swipeEnd';
|
3228 |
+
MSViewEvents.SWIPE_MOVE = 'swipeMove';
|
3229 |
+
MSViewEvents.SWIPE_CANCEL = 'swipeCancel';
|
3230 |
+
MSViewEvents.SCROLL = 'scroll';
|
3231 |
+
MSViewEvents.CHANGE_START = 'slideChangeStart';
|
3232 |
+
MSViewEvents.CHANGE_END = 'slideChangeEnd';
|
3233 |
|
3234 |
/* ================== bin-debug/js/lite/views/BasicView.js =================== */
|
3235 |
;(function($){
|
3347 |
var new_slide = this.slideList[this.index];
|
3348 |
if(new_slide === this.currentSlide)return;
|
3349 |
this.currentSlide = new_slide;
|
3350 |
+
|
3351 |
+
if ( this.autoUpdateZIndex ) {
|
3352 |
+
this.__updateSlidesZindex();
|
3353 |
+
}
|
3354 |
+
|
3355 |
this.slideChanged = true;
|
3356 |
this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START));
|
3357 |
};
|
3543 |
// @since 1.7.0
|
3544 |
// adds z-index to slides
|
3545 |
p.__updateSlidesZindex = function(){
|
3546 |
+
|
|
|
|
|
3547 |
|
3548 |
var slide,
|
3549 |
l = this.viewSlidesList.length,
|
3604 |
if(target_slide === this.currentSlide) return;
|
3605 |
this.slideChanged = true;
|
3606 |
this.currentSlide = target_slide;
|
3607 |
+
|
3608 |
+
if ( this.autoUpdateZIndex ) {
|
3609 |
+
this.__updateSlidesZindex();
|
3610 |
+
}
|
3611 |
+
|
3612 |
this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START));
|
3613 |
if(fast)this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END));
|
3614 |
};
|
3869 |
this.options = {
|
3870 |
prefix:'ms-',
|
3871 |
autohide:true,
|
3872 |
+
overVideo:true,
|
3873 |
+
customClass: null
|
3874 |
};
|
3875 |
};
|
3876 |
|
3886 |
this.cont = this.options.insertTo ? $(this.options.insertTo) : this.slider.$controlsCont;
|
3887 |
if(!this.options.overVideo) this._hideOnvideoStarts();
|
3888 |
|
|
|
|
|
|
|
3889 |
};
|
3890 |
|
3891 |
p.checkHideUnder = function(){
|
3919 |
|
3920 |
p.create = function(){
|
3921 |
var that = this;
|
3922 |
+
if(this.options.autohide ){
|
3923 |
|
3924 |
this.hide(true);
|
3925 |
|
3939 |
if ( this.options.align ) {
|
3940 |
this.$element.addClass('ms-align-' + this.options.align);
|
3941 |
}
|
3942 |
+
|
3943 |
+
// add custom class to control
|
3944 |
+
if ( this.options.customClass && this.$element ) {
|
3945 |
+
this.$element.addClass(this.options.customClass);
|
3946 |
+
}
|
3947 |
};
|
3948 |
|
3949 |
/**
|
4144 |
// default options
|
4145 |
this.options.dir = 'h';
|
4146 |
this.options.wheel = options.dir === 'v';
|
4147 |
+
this.options.arrows = false;
|
4148 |
this.options.speed = 17;
|
4149 |
this.options.align = null;
|
4150 |
this.options.inset = false;
|
4153 |
this.options.width = 100;
|
4154 |
this.options.height = 100;
|
4155 |
this.options.type = 'thumbs'; // tabs
|
4156 |
+
this.options.hover = false;
|
4157 |
|
4158 |
|
4159 |
$.extend(this.options , options);
|
4251 |
};
|
4252 |
|
4253 |
p.slideAction = function(slide){
|
4254 |
+
var thumb_ele = slide.$element.find('.ms-thumb');
|
4255 |
var that = this;
|
4256 |
var thumb_frame = $('<div></div>')
|
4257 |
.addClass('ms-thumb-frame')
|
4258 |
.append(thumb_ele)
|
4259 |
.append($('<div class="ms-thumb-ol"></div>'))
|
4260 |
+
.bind(this.options.hover? 'hover' : 'click' , function(){that.changeSlide(thumb_frame);});
|
4261 |
|
4262 |
if( this.options.align ){
|
4263 |
+
thumb_frame.width(this.options.width - (this.options.dir === 'v' && this.options.type === 'tabs' ? 12 : 0)) // less arrow size 12px
|
4264 |
.height(this.options.height)
|
4265 |
.css('margin-'+(this.options.dir === 'v' ? 'bottom' : 'right'), this.options.space);
|
4266 |
}
|
4325 |
}
|
4326 |
|
4327 |
this.slider.api.addEventListener(MSSliderEvent.CHANGE_START , this.update , this);
|
4328 |
+
this.slider.api.addEventListener(MSSliderEvent.HARD_UPDATE, this.realignThumbs, this);
|
4329 |
this.cindex = this.slider.api.index();
|
4330 |
this.select(this.thumbs[this.cindex]);
|
4331 |
|
4409 |
if(!this.dTouch)this.updateThumbscroll();
|
4410 |
};
|
4411 |
|
4412 |
+
p.realignThumbs = function () {
|
4413 |
+
this.$element.find('.ms-thumb').each( function (index, thumb) {
|
4414 |
+
if ( thumb.aligner ) {
|
4415 |
+
thumb.aligner.align();
|
4416 |
+
}
|
4417 |
+
} );
|
4418 |
+
};
|
4419 |
+
|
4420 |
p.updateThumbscroll = function(){
|
4421 |
var thumb_size;
|
4422 |
|
5173 |
|
5174 |
MSSlideController.registerControl('slideinfo' , MSSlideInfo);
|
5175 |
})(jQuery);
|
5176 |
+
|
5177 |
+
/* ================== bin-debug/js/pro/plugins/MSStartOnAppear.js =================== */
|
5178 |
+
/**
|
5179 |
+
* Start on appear plugin for Master Slider.
|
5180 |
+
*
|
5181 |
+
* @description This plugin prevents slider automatically initialization and inits slider when it appears inside of the browser window.
|
5182 |
+
* @version 1.0.0
|
5183 |
+
* @author Averta
|
5184 |
+
* @package MasterSlider jQuery
|
5185 |
+
*/
|
5186 |
+
|
5187 |
+
;(function($, document, window){
|
5188 |
+
var PId = 0,
|
5189 |
+
$window = $(window),
|
5190 |
+
$doc = $(document);
|
5191 |
+
|
5192 |
+
// check if master slider is available
|
5193 |
+
if ( !window.MasterSlider ) {
|
5194 |
+
return;
|
5195 |
+
}
|
5196 |
+
|
5197 |
+
var StartOnAppear = function ( slider ) {
|
5198 |
+
this.PId = PId++;
|
5199 |
+
this.slider = slider;
|
5200 |
+
this.$slider = slider.$element;
|
5201 |
+
|
5202 |
+
if ( this.slider.options.startOnAppear ) {
|
5203 |
+
// hold on slider
|
5204 |
+
slider.holdOn();
|
5205 |
+
$doc.ready($.proxy(this.init, this));
|
5206 |
+
}
|
5207 |
+
};
|
5208 |
+
|
5209 |
+
StartOnAppear.name = 'MSStartOnAppear';
|
5210 |
+
var p = StartOnAppear.prototype;
|
5211 |
+
|
5212 |
+
/**
|
5213 |
+
* initiate the plugin
|
5214 |
+
*/
|
5215 |
+
p.init = function (){
|
5216 |
+
var api = this.slider.api;
|
5217 |
+
$window.on('scroll.soa' + this.PId , $.proxy(this._onScroll, this)).trigger('scroll');
|
5218 |
+
};
|
5219 |
+
|
5220 |
+
p._onScroll = function () {
|
5221 |
+
// check slider position
|
5222 |
+
var vpBottom = $window.scrollTop() + $window.height(),
|
5223 |
+
top = this.$slider.offset().top ;
|
5224 |
+
|
5225 |
+
if ( top < vpBottom ) {
|
5226 |
+
$window.off('scroll.soa' + this.PId);
|
5227 |
+
this.slider.release();
|
5228 |
+
}
|
5229 |
+
};
|
5230 |
+
|
5231 |
+
/**
|
5232 |
+
* destroy the plugin
|
5233 |
+
*/
|
5234 |
+
p.destroy = function(){};
|
5235 |
+
|
5236 |
+
// install plugin to master slider
|
5237 |
+
MasterSlider.registerPlugin( StartOnAppear );
|
5238 |
+
|
5239 |
+
})(jQuery, document, window);
|
5240 |
/**
|
5241 |
* Addon file, it will be appended to master slider front-end main js file.
|
5242 |
*/
|
public/assets/js/masterslider.lite.min.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"file":"masterslider.lite.min.js","sources":["masterslider.lite.js"],"names":["window","averta","$","getVendorPrefix","arguments","callee","result","regex","someScript","document","getElementsByTagName","prop","style","test","match","checkStyleValue","b","body","documentElement","s","p","v","charAt","toUpperCase","substr","i","length","supportsTransitions","supportsTransforms","supports3DTransforms","has3d","el","createElement","transforms","WebkitTransform","OTransform","MSTransform","msTransform","MozTransform","Transform","transform","display","insertBefore","t","undefined","getComputedStyle","getPropertyValue","removeChild","name","extend","target","object","key","Function","prototype","superclass","constructor","this","trans","Moz","Webkit","Khtml","O","ms","Icab","_mobile","navigator","userAgent","_touch","ready","_jcsspfx","_csspfx","_cssanim","_css3d","_css2d","parseQueryString","url","queryString","replace","RegExp","$0","$1","$2","$3","fps60","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","callback","setTimeout","re","currentStyle","Array","indexOf","elt","len","from","Number","Math","ceil","floor","jQuery","jqLoadFix","complete","that","load","uaMatch","ua","toLowerCase","exec","browser","version","matched","chrome","webkit","safari","isIE11","msie","mozilla","fn","preloadImg","src","_event","each","$this","self","img","Image","onload","event","attr","width","height","data","call","EventDispatcher","listeners","_proto","instance","addEventListener","listener","ref","push","removeEventListener","splice","dispatchEvent","type","l","isTouch","isPointer","pointerEnabled","isMSPoiner","msPointerEnabled","usePointer","ev_start","ev_move","ev_end","ev_cancel","TouchSwipe","$element","enabled","bind","__touchStart","swipe","onSwipe","swipeType","noSwipeSelector","lastStatus","getDirection","new_x","new_y","start_x","start_y","abs","priventDefultEvent","dx","dy","horiz","createStatusObject","evt","temp_x","temp_y","status_data","distanceX","distanceY","pageX","pageY","moveX","moveY","distance","parseInt","sqrt","pow","duration","Date","getTime","start_time","direction","__reset","jqevt","reset","touches","closest","originalEvent","css","error","touchStarted","__touchEnd","__touchMove","__touchCancel","status","phase","preventDefault","clearTimeout","timo","priventEvt","unbind","speed","enable","disable","Ticker","st","list","__stopped","add","start","remove","stop","__tick","item","now","Timer","delay","autoStart","currentCount","paused","onTimer","refrence","lastTime","update","CSSTween","element","ease","to","to_cb","to_cb_target","fr_cb","fr_cb_target","onComplete","oc_fb","oc_fb_target","chain","csstween","chained_tween","start_to","end_to","fresh","onTransComplete","transProperty","transPos","properties","x","y","posx","posy","CTween","setPos","pos","animate","options","tween","EaseDic","onCl","fadeOut","opacity","fadeIn","linear","easeIn","easeOut","easeInOut","easeInCubic","easeOutCubic","easeInOutCubic","easeInCirc","easeOutCirc","easeInOutCirc","easeInExpo","easeOutExpo","easeInOutExpo","easeInQuad","easeOutQuad","easeInOutQuad","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInBack","easeOutBack","easeInOutBack","MSAligner","$container","$img","widthOnly","heightOnly","init","w","h","baseWidth","baseHeight","imgRatio","imgRatio2","backgroundPosition","backgroundRepeat","needAlign","align","cont_w","cont_h","contRatio","setMargin","offsetHeight","offsetWidth","_options","bouncing","snapping","snapsize","friction","outFriction","outAcceleration","minValidDist","snappingMinSpeed","paging","endless","maxSpeed","Controller","min","max","Error","_max_value","_min_value","value","end_loc","current_snap","getSnapNum","__extrStep","__extraMove","__animID","changeTo","snap_num","dispatch","stopped","_internalStop","_checkLimits","_callsnapChange","animating","active_id","amplitude","timeStep","targetPosition","animFrict","timeconst","tick","dis","_callrenderer","_callonComplete","exp","drag","move","start_drag","drag_start_loc","_deceleration","__isout","cancel","__speed","__startSpeed","_calculateEnd","snap_loc","end_snap","gotoSnap","__needsSnap","_calculateExtraMove","_startDecelaration","bounce","renderCallback","__renderHook","fun","snappingCallback","__snapHook","snapCompleteCallback","__compHook","nextSnap","curr_snap","prevSnap","destroy","m","step","temp_speed","temp_value","targetSnap","_computeDeceleration","xtr_move","out_value","round","MSSliderEvent","CHANGE_START","CHANGE_END","WAITING","AUTOPLAY_CHANGE","VIDEO_PLAY","VIDEO_CLOSE","INIT","RESIZE","RESERVED_SPACE_CHANGE","DESTROY","MSSlide","$loading","addClass","view","index","__width","__height","preloadCount","fillMode","selected","pselected","autoAppend","isSleeping","moz","onSwipeStart","link","linkdis","video","videodis","onSwipeMove","e","swipeMoved","onSwipeCancel","___onlayersReady","slider","api","_startTimer","setup","preload","slideList","loadImages","_removeLoading","setBG","hasBG","$imgcont","append","$bg_img","bgAligner","autoHeight","setHeight","bg_src","removeAttr","one","_onBGLoad","bgNatrualWidth","bgNatrualHeight","bgLoaded","on","ls","setSize","ratio","bgWidth","bgHeight","getHeight","clientHeight","__playVideo","vplayed","pause","roc","vcbtn","vpbtn","vframe","swipeControl","slideController","__closeVideo","resume","removeClass","create","html","click","appendTo","parent","sleep","initBG","prepareToSelect","MSViewEvents","SWIPE_START","SWIPE_MOVE","SWIPE_CANCEL","select","videoAutoPlay","trigger","unselect","force","detach","wakeup","$slideCont","SliderViewList","MSSlideController","_delayProgress","_timer","currentSlide","so","registerView","_class","SliderControlList","registerControl","setupView","resize_listener","__resize","viewOptions","spacing","space","mouseSwipe","mouse","loop","dir","viewNum","inView","critMargin","heightLimit","viewClass","MSBasicView","_3dreq","_fallback","overPause","mouseenter","is_over","_stopTimer","mouseleave","onChangeStart","change_started","endPause","slides","skipTimer","deepLink","__updateWindowHash","onChangeEnd","loc","next","hideCalled","hideLayers","__appendSlides","slide","detached","appendSlide","hard","created","clientWidth","fullwidth","aspect","$controlsCont","centerControls","__dispatchInit","autoplay","startSlide","scroller","controller","wheel","last_time","wheellistener","orginalEvent","current_time","delta","detail","wheelDelta","scrollThreshold","previous","init_safemode","count","slidesCount","checkLoop","gotoSlide","_destroy","runAction","action","actionParams","temp","slice","split","apply","console","locate","currentTime","MasterSlider","grabCursor","smoothHeight","fullheight","autofill","layersMode","shuffle","layout","fullscreenMargin","instantStartLayers","parallaxMode","rtl","deepLinkType","disablePlugins","activePlugins","lastMargin","leftSpace","topSpace","rightSpace","bottomSpace","_resize","author","releaseDate","_plugins","MS","registerPlugin","plugin","__setupSlides","new_slide","ind","children","$slide_ele","slide_img","controls","slideAction","getAttribute","hasClass","addSlide","_shuffleSlides","r","random","_setupSliderLayout","_updateSideMargins","lo","_updateLayout","margin","offset","left","_init","preventInit","initialized","prepend","$msContainer","prependTo","$view","mousedown","ms_grabbing_curosr","cursor","mouseup","ms_grab_curosr","htween","reserveSpace","side","sideSpace","_realignControls","control","ins","eq","setupMarkup","isAndroid","insertMarkup","j","l2","MasterSliderPlugin","settings","defaults","_defaults","_name","pluginName","_slider","_superDispatch","args","returns","SWIPE_END","SCROLL","minSlideSpeed","__cssProb","__offset","__dimension","__translate_end","viewSlidesList","css3","start_buffer","firstslide_snap","slideChanged","_horizUpdate","_vertiUpdate","__snapUpdate","__snapCompelet","__locateSlides","snap","change","target_index","updateLoop","_checkCritMargins","marginTop","__updateSlidesZindex","normalMode","hlf","size","cm","__contPos","top","__updateViewList","currentSlideLoc","unshift","position","__createLoopList","return_arr","before_count","after_count","__getSteps","right","__pushEnd","first_slide","shift","last_slide","__pushStart","pop","autoUpdateZIndex","beforeNum","steps","fast","target_slide","setupSwipe","horizSwipeMove","vertSwipeMove","cont_size","lastWidth","lastHeight","__created","lastSnap","MSFadeView","__update","_super","cont_scroll","__updateSlides","fadeTo","BaseControl","prefix","autohide","overVideo","cont","insertTo","_hideOnvideoStarts","checkHideUnder","hideUnder","needsRealign","insetTo","inset","onResize","innerWidth","hide","onDetach","visible","onAppend","proxy","_onMouseEnter","_onMouseLeave","_onMouseDown","_onMouseUp","_disableAH","mdown","mleave","hideTo","MSArrows","$next","$prev","MSThumblist","arrows","thumbs","index_count","__dimen","__alignsize","__jdimen","__pos","click_enable","$thumbscont","$fwd","$bwd","margin-bottom","margin-top","thumb_ele","find","thumb_frame","changeSlide","is","aligner","_hMove","_vMove","thumbSize","cindex","dTouch","nindex","updateThumbscroll","NaN","first_snap","thumb","ele","MSBulltes","bullets","$bullet_cont","bullet","outerWidth","outerHeight","MSScrollbar","color","__translate_start","$bar","bottom","_update","vdimen","bar_dimen","lvalue","hto","MSTimerbar","MSCircleTimer","stroke","radius","$canvas","getContext","ctx","prog","__w","_draw","clearRect","beginPath","arc","PI","strokeStyle","lineWidth","MSSlideInfo","data_list","fadeDuratation","info_ele","switchEle","current_ele","__show","tou"],"mappings":";;;;;;;;AAWAA,OAAOC,UAEN,SAAUC,GA6CV,QAASC,mBAER,GAAG,UAAYC,WAAUC,OAAQ,MAAOD,WAAUC,OAAOC,MAEzD,IAAIC,OAAQ,yCAERC,WAAaC,SAASC,qBAAqB,UAAU,EAEzD,KAAI,GAAIC,QAAQH,YAAWI,MAC1B,GAAGL,MAAMM,KAAKF,MACb,MAAOP,WAAUC,OAAOC,OAASK,KAAKG,MAAMP,OAAO,EAIrD,OAA+CH,WAAUC,OAAOC,OAA7D,iBAAmBE,YAAWI,MAAwC,SACtE,gBAAkBJ,YAAWI,MAAwC,QAEvC,GAgBlC,QAASG,iBAAgBJ,MACvB,GAAIK,GAAIP,SAASQ,MAAQR,SAASS,gBAC5BC,EAAIH,EAAEJ,MACNQ,EAAIT,IACR,IAAkB,gBAARQ,GAAEC,GAAiB,OAAO,CAGpCC,IAAK,MAAO,SAAU,QAAS,IAAK,MACpCD,EAAIA,EAAEE,OAAO,GAAGC,cAAgBH,EAAEI,OAAO,EACzC,KAAI,GAAIC,GAAE,EAAGA,EAAEJ,EAAEK,OAAQD,IACvB,GAAyB,gBAAfN,GAAEE,EAAEI,GAAKL,GAAkB,OAAO,CAE9C,QAAO,EAGX,QAASO,uBACN,MAAOZ,iBAAgB,cAG1B,QAASa,sBACN,MAAOb,iBAAgB,aAG1B,QAASc,wBACR,IAAID,qBAAsB,OAAO,CAC9B,IACAE,OADIC,GAAKtB,SAASuB,cAAc,KAEhCC,YACIC,gBAAkB,oBAClBC,WAAa,eACbC,YAAc,gBACdC,YAAc,gBACdC,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OAAOG,QAAQrN,KAAK+wB,YAAcL,YAAYE,gBAAmBjjB,QAAQ,IAAM3K,SAAS,WACnHhD,KAAK+b,SACL/b,KAAK,GAAGuN,MAAQ,KAChBkhB,IAAIplB,IAAI,WAAY,aACjB5J,OAAOO,KAAK+wB,cAGhBtC,IAAIplB,IAAI,WAAY,YAGrBrJ,KAAKgxB,OAAOvC,MAGb9wB,EAAEqzB,OAAS,SAASvC,KACnBA,IAAIxT,SAASjb,KAAKwG,UAAU6C,IAAI,UAAU,KAGrCrJ,KAAK+wB,aACTtC,IAAI5pB,OAAQlC,KAAKkP,IAAK4c,IAAI5pB,SAAU7E,KAAK+wB,YAAYlsB,WAGtDiF,aAAa9J,KAAKixB,KAClBjxB,KAAKixB,IAAM/uB,WAAW,WACrBgL,OAAOU,OAAO6gB,IAAMiC,YAAYE,gBAChCnC,IAAIplB,IAAI,SAAU,KAChBqnB,YAAYE,gBAGZnC,IAAI,GAAGlhB,OAAMkhB,IAAI,GAAGlhB,MAAM3C,MAAK,GAClC5K,KAAK+wB,YAActC,KAGpB9wB,EAAE2X,QAAU,WACXmV,OAAOnV,UACPxL,aAAa9J,KAAKixB,KACfjxB,KAAK+wB,aAAe/wB,KAAK+wB,YAAY,GAAGxjB,OAC1CvN,KAAK+wB,YAAY,GAAGxjB,MAAM3C,KAAK,QAEhC5K,KAAKwG,SAASmE,SACd3K,KAAKmY,OAAOC,IAAI5S,oBAAoBwQ,cAAcS,sBAAuBzW,KAAKwQ,MAAOxQ,MACrFA,KAAKmY,OAAOC,IAAI5S,oBAAoBwQ,cAAcC,aAAejW,KAAKwL,OAASxL,OAGhFmc,kBAAkBQ,gBAAgB,YAAc+T,cAC9C5tB"}
|
1 |
+
{"version":3,"file":"masterslider.lite.min.js","sources":["masterslider.lite.js"],"names":["window","averta","$","getVendorPrefix","arguments","callee","result","regex","someScript","document","getElementsByTagName","prop","style","test","match","checkStyleValue","b","body","documentElement","s","p","v","charAt","toUpperCase","substr","i","length","supportsTransitions","supportsTransforms","supports3DTransforms","has3d","el","createElement","transforms","WebkitTransform","OTransform","MSTransform","msTransform","MozTransform","Transform","transform","display","insertBefore","t","undefined","getComputedStyle","getPropertyValue","removeChild","name","extend","target","object","key","Function","prototype","superclass","constructor","this","trans","Moz","Webkit","Khtml","O","ms","Icab","_mobile","navigator","userAgent","_touch","ready","_jcsspfx","_csspfx","_cssanim","_css3d","_css2d","parseQueryString","url","queryString","replace","RegExp","$0","$1","$2","$3","fps60","requestAnimationFrame","webkitRequestAnimationFrame","mozRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","callback","setTimeout","re","currentStyle","Array","indexOf","elt","len","from","Number","Math","ceil","floor","isMSIE","version","browser","msie","ieVer","slice","eval","removeDataAttrs","$target","exclude","attrName","dataAttrsToDelete","dataAttrs","attributes","dataAttrsLen","substring","push","each","index","removeAttr","jQuery","jqLoadFix","complete","that","load","uaMatch","ua","toLowerCase","exec","matched","chrome","webkit","safari","isIE11","mozilla","fn","preloadImg","src","_event","$this","self","img","Image","onload","event","attr","width","height","data","call","EventDispatcher","listeners","_proto","instance","addEventListener","listener","ref","removeEventListener","splice","dispatchEvent","type","l","isTouch","isPointer","pointerEnabled","isMSPoiner","msPointerEnabled","usePointer","ev_start","ev_move","ev_end","ev_cancel","TouchSwipe","$element","enabled","bind","__touchStart","swipe","onSwipe","swipeType","noSwipeSelector","lastStatus","getDirection","new_x","new_y","start_x","start_y","abs","priventDefultEvent","dx","dy","horiz","createStatusObject","evt","temp_x","temp_y","status_data","distanceX","distanceY","pageX","pageY","moveX","moveY","distance","parseInt","sqrt","pow","duration","Date","getTime","start_time","direction","__reset","jqevt","reset","touches","closest","originalEvent","css","error","touchStarted","__touchEnd","__touchMove","__touchCancel","status","phase","preventDefault","clearTimeout","timo","priventEvt","unbind","speed","enable","disable","Ticker","st","list","__stopped","add","start","remove","stop","__tick","item","now","Timer","delay","autoStart","currentCount","paused","onTimer","refrence","lastTime","update","CSSTween","element","ease","to","to_cb","to_cb_target","fr_cb","fr_cb_target","onComplete","oc_fb","oc_fb_target","chain","csstween","chained_tween","start_to","end_to","fresh","onTransComplete","transProperty","transPos","properties","x","y","posx","posy","CTween","setPos","pos","animate","options","tween","EaseDic","onCl","fadeOut","opacity","fadeIn","linear","easeIn","easeOut","easeInOut","easeInCubic","easeOutCubic","easeInOutCubic","easeInCirc","easeOutCirc","easeInOutCirc","easeInExpo","easeOutExpo","easeInOutExpo","easeInQuad","easeOutQuad","easeInOutQuad","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInBack","easeOutBack","easeInOutBack","MSAligner","$container","$img","widthOnly","heightOnly","init","w","h","baseWidth","baseHeight","imgRatio","imgRatio2","backgroundPosition","backgroundRepeat","needAlign","align","cont_w","cont_h","contRatio","setMargin","offsetHeight","offsetWidth","_options","bouncing","snapping","snapsize","friction","outFriction","outAcceleration","minValidDist","snappingMinSpeed","paging","endless","maxSpeed","Controller","min","max","Error","_max_value","_min_value","value","end_loc","current_snap","getSnapNum","__extrStep","__extraMove","__animID","changeTo","snap_num","dispatch","stopped","_internalStop","_checkLimits","_callsnapChange","animating","active_id","amplitude","timeStep","targetPosition","animFrict","timeconst","tick","dis","_callrenderer","_callonComplete","exp","drag","move","start_drag","drag_start_loc","_deceleration","__isout","cancel","__speed","__startSpeed","_calculateEnd","snap_loc","end_snap","gotoSnap","__needsSnap","_calculateExtraMove","_startDecelaration","bounce","renderCallback","__renderHook","fun","snappingCallback","__snapHook","snapCompleteCallback","__compHook","nextSnap","curr_snap","prevSnap","destroy","m","step","temp_speed","temp_value","targetSnap","_computeDeceleration","xtr_move","out_value","round","MSSliderEvent","CHANGE_START","CHANGE_END","WAITING","AUTOPLAY_CHANGE","VIDEO_PLAY","VIDEO_CLOSE","INIT","HARD_UPDATE","RESIZE","RESERVED_SPACE_CHANGE","DESTROY","MSSlide","$loading","addClass","view","__width","__height","fillMode","selected","pselected","autoAppend","isSleeping","moz","onSwipeStart","link","linkdis","video","videodis","onSwipeMove","e","swipeMoved","onSwipeCancel","assetsLoaded","slider","api","_startTimer","setupBG","preload","slideList","loadImages","_removeLoading","setBG","hasBG","$imgcont","append","$bg_img","bgAligner","autoHeight","setHeight","bg_src","one","_onBGLoad","initBG","bgLoaded","bgWidth","bgNatrualWidth","bgHeight","bgNatrualHeight","ratio","setSize","getHeight","ls","hasLayers","on","layerController","clientHeight","__playVideo","vplayed","pause","roc","vcbtn","vpbtn","vframe","swipeControl","slideController","__closeVideo","resume","removeClass","create","html","click","appendTo","parent","sleep","prepareToSelect","MSViewEvents","SWIPE_START","SWIPE_MOVE","SWIPE_CANCEL","select","videoAutoPlay","trigger","unselect","force","detach","onSlideSleep","wakeup","$slideCont","onSlideWakeup","SliderViewList","MSSlideController","_delayProgress","_timer","currentSlide","so","registerView","_class","SliderControlList","registerControl","setupView","resize_listener","__resize","viewOptions","spacing","space","mouseSwipe","mouse","loop","dir","viewNum","inView","critMargin","heightLimit","viewClass","MSBasicView","_3dreq","_fallback","overPause","mouseenter","is_over","_stopTimer","mouseleave","onChangeStart","change_started","endPause","slides","skipTimer","deepLink","__updateWindowHash","onChangeEnd","loc","slide","next","hideCalled","hideLayers","animHideLayers","__appendSlides","detached","appendSlide","hard","created","clientWidth","fullwidth","aspect","minHeight","$controlsCont","centerControls","__dispatchInit","setup","autoplay","startSlide","scroller","controller","wheel","last_time","wheellistener","orginalEvent","current_time","delta","detail","wheelDelta","scrollThreshold","previous","init_safemode","count","slidesCount","checkLoop","gotoSlide","_destroy","runAction","action","actionParams","temp","split","apply","console","locate","currentTime","MasterSlider","grabCursor","smoothHeight","fullheight","autofill","layersMode","shuffle","layout","autofillTarget","fullscreenMargin","instantStartLayers","parallaxMode","rtl","deepLinkType","disablePlugins","activePlugins","lastMargin","leftSpace","topSpace","rightSpace","bottomSpace","_holdOn","_resize","author","releaseDate","_plugins","MS","registerPlugin","plugin","__setupSlides","new_slide","ind","children","$slide_ele","slide_img","controls","slideAction","getAttribute","hasClass","addSlide","_shuffleSlides","r","random","_setupSliderLayout","_updateSideMargins","lo","_updateLayout","$win","margin","offset","left","_init","_docReady","initialized","prepend","$msContainer","prependTo","$view","mousedown","ms_grabbing_curosr","cursor","mouseup","ms_grab_curosr","htween","reserveSpace","side","sideSpace","_realignControls","control","ins","holdOn","release","eq","setupMarkup","isAndroid","insertMarkup","MasterSliderPlugin","settings","defaults","_defaults","_name","pluginName","_slider","_superDispatch","args","returns","SWIPE_END","SCROLL","minSlideSpeed","__cssProb","__offset","__dimension","__translate_end","viewSlidesList","css3","start_buffer","firstslide_snap","slideChanged","_horizUpdate","_vertiUpdate","__snapUpdate","__snapCompelet","__locateSlides","snap","change","target_index","updateLoop","_checkCritMargins","marginTop","autoUpdateZIndex","__updateSlidesZindex","normalMode","hlf","size","cm","__contPos","top","__updateViewList","currentSlideLoc","unshift","position","__createLoopList","return_arr","before_count","after_count","__getSteps","right","__pushEnd","first_slide","shift","last_slide","__pushStart","pop","beforeNum","steps","fast","target_slide","setupSwipe","horizSwipeMove","vertSwipeMove","cont_size","lastWidth","lastHeight","__created","lastSnap","MSFadeView","__update","_super","cont_scroll","__updateSlides","fadeTo","BaseControl","prefix","autohide","overVideo","customClass","cont","insertTo","_hideOnvideoStarts","checkHideUnder","hideUnder","needsRealign","insetTo","inset","onResize","innerWidth","hide","onDetach","visible","onAppend","proxy","_onMouseEnter","_onMouseLeave","_onMouseDown","_onMouseUp","_disableAH","mdown","mleave","hideTo","MSArrows","$next","$prev","MSThumblist","arrows","hover","thumbs","index_count","__dimen","__alignsize","__jdimen","__pos","click_enable","$thumbscont","$fwd","$bwd","margin-bottom","margin-top","thumb_ele","find","thumb_frame","changeSlide","is","aligner","_hMove","_vMove","thumbSize","realignThumbs","cindex","dTouch","nindex","updateThumbscroll","thumb","NaN","first_snap","ele","MSBulltes","bullets","$bullet_cont","bullet","outerWidth","outerHeight","MSScrollbar","color","__translate_start","$bar","bottom","_update","vdimen","bar_dimen","lvalue","hto","MSTimerbar","MSCircleTimer","stroke","radius","$canvas","getContext","ctx","prog","__w","_draw","clearRect","beginPath","arc","PI","strokeStyle","lineWidth","MSSlideInfo","data_list","fadeDuratation","info_ele","switchEle","current_ele","__show","tou","PId","$window","$doc","StartOnAppear","$slider","startOnAppear","_onScroll","vpBottom","scrollTop","off"],"mappings":";;;;;;;;AAWAA,OAAOC,UAEN,SAAUC,GA6CV,QAASC,mBAER,GAAG,UAAYC,WAAUC,OAAQ,MAAOD,WAAUC,OAAOC,MAEzD,IAAIC,OAAQ,yCAERC,WAAaC,SAASC,qBAAqB,UAAU,EAEzD,KAAI,GAAIC,QAAQH,YAAWI,MAC1B,GAAGL,MAAMM,KAAKF,MACb,MAAOP,WAAUC,OAAOC,OAASK,KAAKG,MAAMP,OAAO,EAIrD,OAA+CH,WAAUC,OAAOC,OAA7D,iBAAmBE,YAAWI,MAAwC,SACtE,gBAAkBJ,YAAWI,MAAwC,QAEvC,GAgBlC,QAASG,iBAAgBJ,MACvB,GAAIK,GAAIP,SAASQ,MAAQR,SAASS,gBAC5BC,EAAIH,EAAEJ,MACNQ,EAAIT,IACR,IAAkB,gBAARQ,GAAEC,GAAiB,OAAO,CAGpCC,IAAK,MAAO,SAAU,QAAS,IAAK,MACpCD,EAAIA,EAAEE,OAAO,GAAGC,cAAgBH,EAAEI,OAAO,EACzC,KAAI,GAAIC,GAAE,EAAGA,EAAEJ,EAAEK,OAAQD,IACvB,GAAyB,gBAAfN,GAAEE,EAAEI,GAAKL,GAAkB,OAAO,CAE9C,QAAO,EAGX,QAASO,uBACN,MAAOZ,iBAAgB,cAG1B,QAASa,sBACN,MAAOb,iBAAgB,aAG1B,QAASc,wBACR,IAAID,qBAAsB,OAAO,CAC9B,IACAE,OADIC,GAAKtB,SAASuB,cAAc,KAEhCC,YACIC,gBAAkB,oBAClBC,WAAa,eACbC,YAAc,gBACdC,YAAc,gBACdC,aAAe,iBACfC,UAAY,YACZC,UAAY,YAGnBT,IAAG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,GAElBkJ,UAANlJ,MACJ4I,QAAQQ,IAAI,aAAepzB,KAAK2yB,KAChC3yB,KAAKiZ,OAAOkO,YAOdxpB,EAAE0Y,QAAU,aAGZuM,aAAa2B,eAAgBuO,iBAE3B5uB,OAAQlH,SAAUT"}
|
public/assets/js/masterslider.min.js
CHANGED
@@ -3,10 +3,9 @@
|
|
3 |
* Copyright © 2015 All Rights Reserved.
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
-
* @version 2.
|
7 |
-
* @date
|
8 |
*/
|
9 |
-
window.averta={},function($){function getVendorPrefix(){if("result"in arguments.callee)return arguments.callee.result;var regex=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,someScript=document.getElementsByTagName("script")[0];for(var prop in someScript.style)if(regex.test(prop))return arguments.callee.result=prop.match(regex)[0];return arguments.callee.result="WebkitOpacity"in someScript.style?"Webkit":"KhtmlOpacity"in someScript.style?"Khtml":""}function checkStyleValue(prop){var b=document.body||document.documentElement,s=b.style,p=prop;if("string"==typeof s[p])return!0;v=["Moz","Webkit","Khtml","O","ms"],p=p.charAt(0).toUpperCase()+p.substr(1);for(var i=0;i<v.length;i++)if("string"==typeof s[v[i]+p])return!0;return!1}function supportsTransitions(){return checkStyleValue("transition")}function supportsTransforms(){return checkStyleValue("transform")}function supports3DTransforms(){if(!supportsTransforms())return!1;var has3d,el=document.createElement("i"),transforms={WebkitTransform:"-webkit-transform",OTransform:"-o-transform",MSTransform:"-ms-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",Transform:"transform",transform:"transform"};el.style.display="block",document.body.insertBefore(el,null);for(var t in transforms)void 0!==el.style[t]&&(el.style[t]="translate3d(1px,1px,1px)",has3d=window.getComputedStyle(el).getPropertyValue(transforms[t]));return document.body.removeChild(el),null!=has3d&&has3d.length>0&&"none"!==has3d}window["package"]=function(name){window[name]||(window[name]={})};var extend=function(target,object){for(var key in object)target[key]=object[key]};Function.prototype.extend=function(superclass){"function"==typeof superclass.prototype.constructor?(extend(this.prototype,superclass.prototype),this.prototype.constructor=this):(this.prototype.extend(superclass),this.prototype.constructor=this)};var trans={Moz:"-moz-",Webkit:"-webkit-",Khtml:"-khtml-",O:"-o-",ms:"-ms-",Icab:"-icab-"};window._mobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),window._touch="ontouchstart"in document,$(document).ready(function(){window._jcsspfx=getVendorPrefix(),window._csspfx=trans[window._jcsspfx],window._cssanim=supportsTransitions(),window._css3d=supports3DTransforms(),window._css2d=supportsTransforms()}),window.parseQueryString=function(url){var queryString={};return url.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function($0,$1,$2,$3){queryString[$1]=$3}),queryString};var fps60=50/3;if(window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,fps60)}}()),window.getComputedStyle||(window.getComputedStyle=function(el){return this.el=el,this.getPropertyValue=function(prop){var re=/(\-([a-z]){1})/g;return"float"==prop&&(prop="styleFloat"),re.test(prop)&&(prop=prop.replace(re,function(){return arguments[2].toUpperCase()})),el.currentStyle[prop]?el.currentStyle[prop]:null},el.currentStyle}),Array.prototype.indexOf||(Array.prototype.indexOf=function(elt){var len=this.length>>>0,from=Number(arguments[1])||0;for(from=0>from?Math.ceil(from):Math.floor(from),0>from&&(from+=len);len>from;from++)if(from in this&&this[from]===elt)return from;return-1}),jQuery){$.jqLoadFix=function(){if(this.complete){var that=this;setTimeout(function(){$(that).load()},1)}},jQuery.uaMatch=jQuery.uaMatch||function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}},matched=jQuery.uaMatch(navigator.userAgent),browser={},matched.browser&&(browser[matched.browser]=!0,browser.version=matched.version),browser.chrome?browser.webkit=!0:browser.webkit&&(browser.safari=!0);var isIE11=!!navigator.userAgent.match(/Trident\/7\./);isIE11&&(browser.msie="true",delete browser.mozilla),jQuery.browser=browser,$.fn.preloadImg=function(src,_event){return this.each(function(){var $this=$(this),self=this,img=new Image;img.onload=function(event){null==event&&(event={}),$this.attr("src",src),event.width=img.width,event.height=img.height,$this.data("width",img.width),$this.data("height",img.height),setTimeout(function(){_event.call(self,event)},50),img=null},img.src=src}),this}}}(jQuery),function(){"use strict";averta.EventDispatcher=function(){this.listeners={}},averta.EventDispatcher.extend=function(_proto){var instance=new averta.EventDispatcher;for(var key in instance)"constructor"!=key&&(_proto[key]=averta.EventDispatcher.prototype[key])},averta.EventDispatcher.prototype={constructor:averta.EventDispatcher,addEventListener:function(event,listener,ref){this.listeners[event]||(this.listeners[event]=[]),this.listeners[event].push({listener:listener,ref:ref})},removeEventListener:function(event,listener,ref){if(this.listeners[event]){for(var i=0;i<this.listeners[event].length;++i)listener===this.listeners[event][i].listener&&ref===this.listeners[event][i].ref&&this.listeners[event].splice(i--,1);0===this.listeners[event].length&&(this.listeners[event]=null)}},dispatchEvent:function(event){if(event.target=this,this.listeners[event.type])for(var i=0,l=this.listeners[event.type].length;l>i;++i)this.listeners[event.type][i].listener.call(this.listeners[event.type][i].ref,event)}}}(),function($){"use strict";var isTouch="ontouchstart"in document,isPointer=window.navigator.pointerEnabled,isMSPoiner=!isPointer&&window.navigator.msPointerEnabled,usePointer=isPointer||isMSPoiner,ev_start=(isPointer?"pointerdown ":"")+(isMSPoiner?"MSPointerDown ":"")+(isTouch?"touchstart ":"")+"mousedown",ev_move=(isPointer?"pointermove ":"")+(isMSPoiner?"MSPointerMove ":"")+(isTouch?"touchmove ":"")+"mousemove",ev_end=(isPointer?"pointerup ":"")+(isMSPoiner?"MSPointerUp ":"")+(isTouch?"touchend ":"")+"mouseup",ev_cancel=(isPointer?"pointercancel ":"")+(isMSPoiner?"MSPointerCancel ":"")+"touchcancel";averta.TouchSwipe=function($element){this.$element=$element,this.enabled=!0,$element.bind(ev_start,{target:this},this.__touchStart),$element[0].swipe=this,this.onSwipe=null,this.swipeType="horizontal",this.noSwipeSelector="input, textarea, button, .no-swipe, .ms-no-swipe",this.lastStatus={}};var p=averta.TouchSwipe.prototype;p.getDirection=function(new_x,new_y){switch(this.swipeType){case"horizontal":return new_x<=this.start_x?"left":"right";case"vertical":return new_y<=this.start_y?"up":"down";case"all":return Math.abs(new_x-this.start_x)>Math.abs(new_y-this.start_y)?new_x<=this.start_x?"left":"right":new_y<=this.start_y?"up":"down"}},p.priventDefultEvent=function(new_x,new_y){var dx=Math.abs(new_x-this.start_x),dy=Math.abs(new_y-this.start_y),horiz=dx>dy;return"horizontal"===this.swipeType&&horiz||"vertical"===this.swipeType&&!horiz},p.createStatusObject=function(evt){var temp_x,temp_y,status_data={};return temp_x=this.lastStatus.distanceX||0,temp_y=this.lastStatus.distanceY||0,status_data.distanceX=evt.pageX-this.start_x,status_data.distanceY=evt.pageY-this.start_y,status_data.moveX=status_data.distanceX-temp_x,status_data.moveY=status_data.distanceY-temp_y,status_data.distance=parseInt(Math.sqrt(Math.pow(status_data.distanceX,2)+Math.pow(status_data.distanceY,2))),status_data.duration=(new Date).getTime()-this.start_time,status_data.direction=this.getDirection(evt.pageX,evt.pageY),status_data},p.__reset=function(event,jqevt){this.reset=!1,this.lastStatus={},this.start_time=(new Date).getTime(),this.start_x=isTouch?event.touches[0].pageX:usePointer?event.pageX:jqevt.pageX,this.start_y=isTouch?event.touches[0].pageY:usePointer?event.pageY:jqevt.pageY},p.__touchStart=function(event){var swipe=event.data.target,jqevt=event;if(swipe.enabled&&!($(event.target).closest(swipe.noSwipeSelector,swipe.$element).length>0)){if(event=event.originalEvent,usePointer&&$(this).css("-ms-touch-action","horizontal"===swipe.swipeType?"pan-y":"pan-x"),!swipe.onSwipe)return void $.error("Swipe listener is undefined");if(!swipe.touchStarted){swipe.start_x=isTouch?event.touches[0].pageX:usePointer?event.pageX:jqevt.pageX,swipe.start_y=isTouch?event.touches[0].pageY:usePointer?event.pageY:jqevt.pageY,swipe.start_time=(new Date).getTime(),$(document).bind(ev_end,{target:swipe},swipe.__touchEnd).bind(ev_move,{target:swipe},swipe.__touchMove).bind(ev_cancel,{target:swipe},swipe.__touchCancel);var evt=isTouch?event.touches[0]:usePointer?event:jqevt,status=swipe.createStatusObject(evt);status.phase="start",swipe.onSwipe.call(null,status),isTouch||jqevt.preventDefault(),swipe.lastStatus=status,swipe.touchStarted=!0}}},p.__touchMove=function(event){var swipe=event.data.target,jqevt=event;if(event=event.originalEvent,swipe.touchStarted){clearTimeout(swipe.timo),swipe.timo=setTimeout(function(){swipe.__reset(event,jqevt)},60);var evt=isTouch?event.touches[0]:usePointer?event:jqevt,status=swipe.createStatusObject(evt);swipe.priventDefultEvent(evt.pageX,evt.pageY)&&jqevt.preventDefault(),status.phase="move",swipe.lastStatus=status,swipe.onSwipe.call(null,status)}},p.__touchEnd=function(event){var swipe=event.data.target,jqevt=event;event=event.originalEvent,clearTimeout(swipe.timo);var status=(isTouch?event.touches[0]:usePointer?event:jqevt,swipe.lastStatus);isTouch||jqevt.preventDefault(),status.phase="end",swipe.touchStarted=!1,swipe.priventEvt=null,$(document).unbind(ev_end,swipe.__touchEnd).unbind(ev_move,swipe.__touchMove).unbind(ev_cancel,swipe.__touchCancel),status.speed=status.distance/status.duration,swipe.onSwipe.call(null,status)},p.__touchCancel=function(event){var swipe=event.data.target;swipe.__touchEnd(event)},p.enable=function(){this.enabled||(this.enabled=!0)},p.disable=function(){this.enabled&&(this.enabled=!1)}}(jQuery),function(){"use strict";averta.Ticker=function(){};var st=averta.Ticker,list=[],len=0,__stopped=!0;st.add=function(listener,ref){return list.push([listener,ref]),1===list.length&&st.start(),len=list.length},st.remove=function(listener,ref){for(var i=0,l=list.length;l>i;++i)list[i]&&list[i][0]===listener&&list[i][1]===ref&&list.splice(i,1);len=list.length,0===len&&st.stop()},st.start=function(){__stopped&&(__stopped=!1,__tick())},st.stop=function(){__stopped=!0};var __tick=function(){if(!st.__stopped){for(var item,i=0;i!==len;i++)item=list[i],item[0].call(item[1]);requestAnimationFrame(__tick)}}}(),function(){"use strict";Date.now||(Date.now=function(){return(new Date).getTime()}),averta.Timer=function(delay,autoStart){this.delay=delay,this.currentCount=0,this.paused=!1,this.onTimer=null,this.refrence=null,autoStart&&this.start()},averta.Timer.prototype={constructor:averta.Timer,start:function(){this.paused=!1,this.lastTime=Date.now(),averta.Ticker.add(this.update,this)},stop:function(){this.paused=!0,averta.Ticker.remove(this.update,this)},reset:function(){this.currentCount=0,this.paused=!0,this.lastTime=Date.now()},update:function(){this.paused||Date.now()-this.lastTime<this.delay||(this.currentCount++,this.lastTime=Date.now(),this.onTimer&&this.onTimer.call(this.refrence,this.getTime()))},getTime:function(){return this.delay*this.currentCount}}}(),function(){"use strict";window.CSSTween=function(element,duration,delay,ease){this.$element=element,this.duration=duration||1e3,this.delay=delay||0,this.ease=ease||"linear"};var p=CSSTween.prototype;p.to=function(callback,target){return this.to_cb=callback,this.to_cb_target=target,this},p.from=function(callback,target){return this.fr_cb=callback,this.fr_cb_target=target,this},p.onComplete=function(callback,target){return this.oc_fb=callback,this.oc_fb_target=target,this},p.chain=function(csstween){return this.chained_tween=csstween,this},p.reset=function(){clearTimeout(this.start_to),clearTimeout(this.end_to)},p.start=function(){var element=this.$element[0];clearTimeout(this.start_to),clearTimeout(this.end_to),this.fresh=!0,this.fr_cb&&(element.style[window._jcsspfx+"TransitionDuration"]="0ms",this.fr_cb.call(this.fr_cb_target));var that=this;return this.onTransComplete=function(){that.fresh&&(that.reset(),element.style[window._jcsspfx+"TransitionDuration"]="",element.style[window._jcsspfx+"TransitionProperty"]="",element.style[window._jcsspfx+"TransitionTimingFunction"]="",element.style[window._jcsspfx+"TransitionDelay"]="",that.fresh=!1,that.chained_tween&&that.chained_tween.start(),that.oc_fb&&that.oc_fb.call(that.oc_fb_target))},this.start_to=setTimeout(function(){that.$element&&(element.style[window._jcsspfx+"TransitionDuration"]=that.duration+"ms",element.style[window._jcsspfx+"TransitionProperty"]=that.transProperty||"all",element.style[window._jcsspfx+"TransitionDelay"]=that.delay>0?that.delay+"ms":"",element.style[window._jcsspfx+"TransitionTimingFunction"]=that.ease,that.to_cb&&that.to_cb.call(that.to_cb_target),that.end_to=setTimeout(function(){that.onTransComplete()},that.duration+(that.delay||0)))},100),this}}(),function(){"use strict";function transPos(element,properties){if(void 0!==properties.x||void 0!==properties.y)if(_cssanim){var trans=window._jcsspfx+"Transform";void 0!==properties.x&&(properties[trans]=(properties[trans]||"")+" translateX("+properties.x+"px)",delete properties.x),void 0!==properties.y&&(properties[trans]=(properties[trans]||"")+" translateY("+properties.y+"px)",delete properties.y)}else{if(void 0!==properties.x){var posx="auto"!==element.css("right")?"right":"left";properties[posx]=properties.x+"px",delete properties.x}if(void 0!==properties.y){var posy="auto"!==element.css("bottom")?"bottom":"top";properties[posy]=properties.y+"px",delete properties.y}}return properties}var _cssanim=null;window.CTween={},CTween.setPos=function(element,pos){element.css(transPos(element,pos))},CTween.animate=function(element,duration,properties,options){if(null==_cssanim&&(_cssanim=window._cssanim),options=options||{},transPos(element,properties),_cssanim){var tween=new CSSTween(element,duration,options.delay,EaseDic[options.ease]);return options.transProperty&&(tween.transProperty=options.transProperty),tween.to(function(){element.css(properties)}),options.complete&&tween.onComplete(options.complete,options.target),tween.start(),tween.stop=tween.reset,tween}var onCl;return options.delay&&element.delay(options.delay),options.complete&&(onCl=function(){options.complete.call(options.target)}),element.stop(!0).animate(properties,duration,options.ease||"linear",onCl),element},CTween.fadeOut=function(target,duration,remove){var options={};remove===!0?options.complete=function(){target.remove()}:2===remove&&(options.complete=function(){target.css("display","none")}),CTween.animate(target,duration||1e3,{opacity:0},options)},CTween.fadeIn=function(target,duration,reset){reset!==!1&&target.css("opacity",0).css("display",""),CTween.animate(target,duration||1e3,{opacity:1})}}(),function(){window.EaseDic={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",easeInCubic:"cubic-bezier(.55,.055,.675,.19)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"}}(),function(){"use strict";window.MSAligner=function(type,$container,$img){this.$container=$container,this.$img=$img,this.type=type||"stretch",this.widthOnly=!1,this.heightOnly=!1};var p=MSAligner.prototype;p.init=function(w,h){switch(this.baseWidth=w,this.baseHeight=h,this.imgRatio=w/h,this.imgRatio2=h/w,this.type){case"tile":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$img.remove();break;case"center":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$container.css({backgroundPosition:"center center",backgroundRepeat:"no-repeat"}),this.$img.remove();break;case"stretch":this.$img.css({width:"100%",height:"100%"});break;case"fill":case"fit":this.needAlign=!0,this.align()}},p.align=function(){if(this.needAlign){var cont_w=this.$container.width(),cont_h=this.$container.height(),contRatio=cont_w/cont_h;"fill"==this.type?this.imgRatio<contRatio?(this.$img.width(cont_w),this.$img.height(cont_w*this.imgRatio2)):(this.$img.height(cont_h),this.$img.width(cont_h*this.imgRatio)):"fit"==this.type&&(this.imgRatio<contRatio?(this.$img.height(cont_h),this.$img.width(cont_h*this.imgRatio)):(this.$img.width(cont_w),this.$img.height(cont_w*this.imgRatio2))),this.setMargin()}},p.setMargin=function(){var cont_w=this.$container.width(),cont_h=this.$container.height();this.$img.css("margin-top",(cont_h-this.$img[0].offsetHeight)/2+"px"),this.$img.css("margin-left",(cont_w-this.$img[0].offsetWidth)/2+"px")}}(),function(){"use strict";var _options={bouncing:!0,snapping:!1,snapsize:null,friction:.05,outFriction:.05,outAcceleration:.09,minValidDist:.3,snappingMinSpeed:2,paging:!1,endless:!1,maxSpeed:160},Controller=function(min,max,options){if(null===max||null===min)throw new Error("Max and Min values are required.");this.options=options||{};for(var key in _options)key in this.options||(this.options[key]=_options[key]);this._max_value=max,this._min_value=min,this.value=min,this.end_loc=min,this.current_snap=this.getSnapNum(min),this.__extrStep=0,this.__extraMove=0,this.__animID=-1},p=Controller.prototype;p.changeTo=function(value,animate,speed,snap_num,dispatch){if(this.stopped=!1,this._internalStop(),value=this._checkLimits(value),speed=Math.abs(speed||0),this.options.snapping&&(snap_num=snap_num||this.getSnapNum(value),dispatch!==!1&&this._callsnapChange(snap_num),this.current_snap=snap_num),animate){this.animating=!0;var self=this,active_id=++self.__animID,amplitude=value-self.value,timeStep=0,targetPosition=value,animFrict=1-self.options.friction,timeconst=animFrict+(speed-20)*animFrict*1.3/self.options.maxSpeed,tick=function(){if(active_id===self.__animID){var dis=value-self.value;if(!(Math.abs(dis)>self.options.minValidDist&&self.animating))return self.animating&&(self.value=value,self._callrenderer()),self.animating=!1,active_id!==self.__animID&&(self.__animID=-1),void self._callonComplete("anim");window.requestAnimationFrame(tick),self.value=targetPosition-amplitude*Math.exp(-++timeStep*timeconst),self._callrenderer()}};return void tick()}this.value=value,this._callrenderer()},p.drag=function(move){this.start_drag&&(this.drag_start_loc=this.value,this.start_drag=!1),this.animating=!1,this._deceleration=!1,this.value-=move,!this.options.endless&&(this.value>this._max_value||this.value<0)?this.options.bouncing?(this.__isout=!0,this.value+=.6*move):this.value=this.value>this._max_value?this._max_value:0:!this.options.endless&&this.options.bouncing&&(this.__isout=!1),this._callrenderer()},p.push=function(speed){if(this.stopped=!1,this.options.snapping&&Math.abs(speed)<=this.options.snappingMinSpeed)return void this.cancel();if(this.__speed=speed,this.__startSpeed=speed,this.end_loc=this._calculateEnd(),this.options.snapping){var snap_loc=this.getSnapNum(this.value),end_snap=this.getSnapNum(this.end_loc);if(this.options.paging)return snap_loc=this.getSnapNum(this.drag_start_loc),this.__isout=!1,void(speed>0?this.gotoSnap(snap_loc+1,!0,speed):this.gotoSnap(snap_loc-1,!0,speed));if(snap_loc===end_snap)return void this.cancel();this._callsnapChange(end_snap),this.current_snap=end_snap}this.animating=!1,this.__needsSnap=this.options.endless||this.end_loc>this._min_value&&this.end_loc<this._max_value,this.options.snapping&&this.__needsSnap&&(this.__extraMove=this._calculateExtraMove(this.end_loc)),this._startDecelaration()},p.bounce=function(speed){this.animating||(this.stopped=!1,this.animating=!1,this.__speed=speed,this.__startSpeed=speed,this.end_loc=this._calculateEnd(),this._startDecelaration())},p.stop=function(){this.stopped=!0,this._internalStop()},p.cancel=function(){this.start_drag=!0,this.__isout?(this.__speed=4e-4,this._startDecelaration()):this.options.snapping&&this.gotoSnap(this.getSnapNum(this.value),!0)},p.renderCallback=function(listener,ref){this.__renderHook={fun:listener,ref:ref}},p.snappingCallback=function(listener,ref){this.__snapHook={fun:listener,ref:ref}},p.snapCompleteCallback=function(listener,ref){this.__compHook={fun:listener,ref:ref}},p.getSnapNum=function(value){return Math.floor((value+this.options.snapsize/2)/this.options.snapsize)},p.nextSnap=function(){this._internalStop();var curr_snap=this.getSnapNum(this.value);!this.options.endless&&(curr_snap+1)*this.options.snapsize>this._max_value?(this.__speed=8,this.__needsSnap=!1,this._startDecelaration()):this.gotoSnap(curr_snap+1,!0)},p.prevSnap=function(){this._internalStop();var curr_snap=this.getSnapNum(this.value);!this.options.endless&&(curr_snap-1)*this.options.snapsize<this._min_value?(this.__speed=-8,this.__needsSnap=!1,this._startDecelaration()):this.gotoSnap(curr_snap-1,!0)},p.gotoSnap=function(snap_num,animate,speed){this.changeTo(snap_num*this.options.snapsize,animate,speed,snap_num)},p.destroy=function(){this._internalStop(),this.__renderHook=null,this.__snapHook=null,this.__compHook=null},p._internalStop=function(){this.start_drag=!0,this.animating=!1,this._deceleration=!1,this.__extrStep=0},p._calculateExtraMove=function(value){var m=value%this.options.snapsize;return m<this.options.snapsize/2?-m:this.options.snapsize-m},p._calculateEnd=function(step){for(var temp_speed=this.__speed,temp_value=this.value,i=0;Math.abs(temp_speed)>this.options.minValidDist;)temp_value+=temp_speed,temp_speed*=this.options.friction,i++;return step?i:temp_value},p._checkLimits=function(value){return this.options.endless?value:value<this._min_value?this._min_value:value>this._max_value?this._max_value:value},p._callrenderer=function(){this.__renderHook&&this.__renderHook.fun.call(this.__renderHook.ref,this,this.value)},p._callsnapChange=function(targetSnap){this.__snapHook&&targetSnap!==this.current_snap&&this.__snapHook.fun.call(this.__snapHook.ref,this,targetSnap,targetSnap-this.current_snap)},p._callonComplete=function(type){this.__compHook&&!this.stopped&&this.__compHook.fun.call(this.__compHook.ref,this,this.current_snap,type)},p._computeDeceleration=function(){if(this.options.snapping&&this.__needsSnap){var xtr_move=(this.__startSpeed-this.__speed)/this.__startSpeed*this.__extraMove;this.value+=this.__speed+xtr_move-this.__extrStep,this.__extrStep=xtr_move}else this.value+=this.__speed;if(this.__speed*=this.options.friction,this.options.endless||this.options.bouncing||(this.value<=this._min_value?(this.value=this._min_value,this.__speed=0):this.value>=this._max_value&&(this.value=this._max_value,this.__speed=0)),this._callrenderer(),!this.options.endless&&this.options.bouncing){var out_value=0;this.value<this._min_value?out_value=this._min_value-this.value:this.value>this._max_value&&(out_value=this._max_value-this.value),this.__isout=Math.abs(out_value)>=this.options.minValidDist,this.__isout&&(this.__speed*out_value<=0?this.__speed+=out_value*this.options.outFriction:this.__speed=out_value*this.options.outAcceleration)}},p._startDecelaration=function(){if(!this._deceleration){this._deceleration=!0;var self=this,tick=function(){self._deceleration&&(self._computeDeceleration(),Math.abs(self.__speed)>self.options.minValidDist||self.__isout?window.requestAnimationFrame(tick):(self._deceleration=!1,self.__isout=!1,self.value=this.__needsSnap&&self.options.snapping&&!self.options.paging?self._checkLimits(self.end_loc+self.__extraMove):Math.round(self.value),self._callrenderer(),self._callonComplete("decel")))};tick()}},window.Controller=Controller}(),window.MSSliderEvent=function(type){this.type=type},MSSliderEvent.CHANGE_START="ms_changestart",MSSliderEvent.CHANGE_END="ms_changeend",MSSliderEvent.WAITING="ms_waiting",MSSliderEvent.AUTOPLAY_CHANGE="ms_autoplaychange",MSSliderEvent.VIDEO_PLAY="ms_videoPlay",MSSliderEvent.VIDEO_CLOSE="ms_videoclose",MSSliderEvent.INIT="ms_init",MSSliderEvent.RESIZE="ms_resize",MSSliderEvent.RESERVED_SPACE_CHANGE="ms_rsc",MSSliderEvent.DESTROY="ms_destroy",function($){"use strict";window.MSSlide=function(){this.$element=null,this.$loading=$("<div></div>").addClass("ms-slide-loading"),this.view=null,this.index=-1,this.__width=0,this.__height=0,this.preloadCount=0,this.fillMode="fill",this.selected=!1,this.pselected=!1,this.autoAppend=!0,this.isSleeping=!0,this.moz=$.browser.mozilla};var p=MSSlide.prototype;p.onSwipeStart=function(){this.link&&(this.linkdis=!0),this.video&&(this.videodis=!0)},p.onSwipeMove=function(e){var move=Math.max(Math.abs(e.data.distanceX),Math.abs(e.data.distanceY));this.swipeMoved=move>4},p.onSwipeCancel=function(){return this.swipeMoved?void(this.swipeMoved=!1):(this.link&&(this.linkdis=!1),void(this.video&&(this.videodis=!1)))},p.___onlayersReady=function(){this.ready=!0,this.slider.api._startTimer(),this.isSleeping||this.setup(),CTween.fadeOut(this.$loading,300,!0),(0===this.slider.options.preload||"all"===this.slider.options.preload)&&this.index<this.view.slideList.length-1?this.view.slideList[this.index+1].loadImages():"all"===this.slider.options.preload&&this.index===this.view.slideList.length-1&&this.slider._removeLoading()},p.setBG=function(img){this.hasBG=!0;var that=this;this.$imgcont=$("<div></div>").addClass("ms-slide-bgcont"),this.$element.append(this.$loading).append(this.$imgcont),this.$bg_img=$(img).css("visibility","hidden"),this.$imgcont.append(this.$bg_img),this.bgAligner=new MSAligner(that.fillMode,that.$imgcont,that.$bg_img),this.bgAligner.widthOnly=this.slider.options.autoHeight,that.slider.options.autoHeight&&(that.pselected||that.selected)&&that.slider.setHeight(that.slider.options.height),void 0!==this.$bg_img.data("src")?(this.bg_src=this.$bg_img.data("src"),this.$bg_img.removeAttr("data-src")):this.$bg_img.one("load",function(event){that._onBGLoad(event)}).each($.jqLoadFix),this.preloadCount++},p._onBGLoad=function(event){this.bgNatrualWidth=event.width,this.bgNatrualHeight=event.height,this.bgLoaded=!0,$.browser.msie&&this.$bg_img.on("dragstart",function(event){event.preventDefault()}),this.preloadCount--,0===this.preloadCount&&this.___onlayersReady()},p.loadImages=function(){if(!this.ls&&(this.ls=!0,0===this.preloadCount&&this.___onlayersReady(),this.hasBG&&this.bg_src)){var that=this;this.$bg_img.preloadImg(this.bg_src,function(event){that._onBGLoad(event)})}},p.setSize=function(width,height){this.__width=width,this.slider.options.autoHeight&&(this.bgLoaded?(this.ratio=this.__width/this.bgWidth,height=Math.floor(this.ratio*this.bgHeight),this.$imgcont.height(height)):(this.ratio=width/this.slider.options.width,height=this.slider.options.height*this.ratio)),this.__height=height,this.$element.width(width).height(height),this.hasBG&&this.bgLoaded&&this.bgAligner.align()},p.getHeight=function(){return this.hasBG&&this.bgLoaded?this.bgHeight*this.ratio:Math.max(this.$element[0].clientHeight,this.slider.options.height*this.ratio)},p.__playVideo=function(){this.vplayed||this.videodis||(this.vplayed=!0,this.slider.api.paused||(this.slider.api.pause(),this.roc=!0),this.vcbtn.css("display",""),CTween.fadeOut(this.vpbtn,500,!1),CTween.fadeIn(this.vcbtn,500),CTween.fadeIn(this.vframe,500),this.vframe.css("display","block").attr("src",this.video+"&autoplay=1"),this.view.$element.addClass("ms-def-cursor"),this.view.swipeControl&&this.view.swipeControl.disable(),this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_PLAY)))},p.__closeVideo=function(){if(this.vplayed){this.vplayed=!1,this.roc&&this.slider.api.resume();var that=this;CTween.fadeIn(this.vpbtn,500),CTween.animate(this.vcbtn,500,{opacity:0},{complete:function(){that.vcbtn.css("display","none")}}),CTween.animate(this.vframe,500,{opacity:0},{complete:function(){that.vframe.attr("src","about:blank").css("display","none")}}),this.view.swipeControl&&this.view.swipeControl.enable(),this.view.$element.removeClass("ms-def-cursor"),this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_CLOSE))}},p.create=function(){var that=this;this.link&&this.link.addClass("ms-slide-link").html("").click(function(e){that.linkdis&&e.preventDefault()}),this.video&&(-1===this.video.indexOf("?")&&(this.video+="?"),this.vframe=$("<iframe></iframe>").addClass("ms-slide-video").css({width:"100%",height:"100%",display:"none"}).attr("src","about:blank").attr("allowfullscreen","true").appendTo(this.$element),this.vpbtn=$("<div></div>").addClass("ms-slide-vpbtn").click(function(){that.__playVideo()}).appendTo(this.$element),this.vcbtn=$("<div></div>").addClass("ms-slide-vcbtn").click(function(){that.__closeVideo()}).appendTo(this.$element).css("display","none"),window._touch&&this.vcbtn.removeClass("ms-slide-vcbtn").addClass("ms-slide-vcbtn-mobile").append('<div class="ms-vcbtn-txt">Close video</div>').appendTo(this.view.$element.parent())),!this.slider.options.autoHeight&&this.hasBG&&(this.$imgcont.css("height","100%"),("center"===this.fillMode||"stretch"===this.fillMode)&&(this.fillMode="fill")),this.slider.options.autoHeight&&this.$element.addClass("ms-slide-auto-height"),this.sleep(!0)},p.destroy=function(){this.$element.remove(),this.$element=null},p.setup=function(){!this.initBG&&this.bgLoaded&&(this.initBG=!0,this.$bg_img.css("visibility",""),this.bgWidth=this.bgNatrualWidth||this.$bg_img.width(),this.bgHeight=this.bgNatrualHeight||this.$bg_img.height(),CTween.fadeIn(this.$imgcont,300),this.slider.options.autoHeight&&this.$imgcont.height(this.bgHeight*this.ratio),this.bgAligner.init(this.bgWidth,this.bgHeight),this.setSize(this.__width,this.__height),this.slider.options.autoHeight&&(this.pselected||this.selected)&&this.slider.setHeight(this.getHeight()))},p.prepareToSelect=function(){this.pselected||this.selected||(this.pselected=!0,(this.link||this.video)&&(this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.view.addEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this),this.view.addEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this),this.linkdis=!1,this.swipeMoved=!1),this.loadImages(),this.moz&&this.$element.css("margin-top",""))},p.select=function(){this.selected||(this.selected=!0,this.pselected=!1,this.$element.addClass("ms-sl-selected"),this.videoAutoPlay&&(this.videodis=!1,this.vpbtn.trigger("click")))},p.unselect=function(){this.pselected=!1,this.moz&&this.$element.css("margin-top","0.1px"),(this.link||this.video)&&(this.view.removeEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.view.removeEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this),this.view.removeEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this)),this.selected&&(this.selected=!1,this.$element.removeClass("ms-sl-selected"),this.video&&this.vplayed&&(this.__closeVideo(),this.roc=!1))},p.sleep=function(force){(!this.isSleeping||force)&&(this.isSleeping=!0,this.autoAppend&&this.$element.detach())},p.wakeup=function(){this.isSleeping&&(this.isSleeping=!1,this.autoAppend&&this.view.$slideCont.append(this.$element),this.moz&&this.$element.css("margin-top","0.1px"),this.setup(),this.hasBG&&this.bgAligner.align())}}(jQuery),function($){"use strict";var SliderViewList={};
|
10 |
-
window.MSSlideController=function(slider){this._delayProgress=0,this._timer=new averta.Timer(100),this._timer.onTimer=this.onTimer,this._timer.refrence=this,this.currentSlide=null,this.slider=slider,this.so=slider.options,averta.EventDispatcher.call(this)},MSSlideController.registerView=function(name,_class){if(name in SliderViewList)throw new Error(name+", is already registered.");SliderViewList[name]=_class},MSSlideController.SliderControlList={},MSSlideController.registerControl=function(name,_class){if(name in MSSlideController.SliderControlList)throw new Error(name+", is already registered.");MSSlideController.SliderControlList[name]=_class};var p=MSSlideController.prototype;p.setupView=function(){var that=this;this.resize_listener=function(){that.__resize()};var viewOptions={spacing:this.so.space,mouseSwipe:this.so.mouse,loop:this.so.loop,autoHeight:this.so.autoHeight,swipe:this.so.swipe,speed:this.so.speed,dir:this.so.dir,viewNum:this.so.inView,critMargin:this.so.critMargin};this.so.viewOptions&&$.extend(viewOptions,this.so.viewOptions),this.so.autoHeight&&(this.so.heightLimit=!1);var viewClass=SliderViewList[this.slider.options.view]||MSBasicView;if(!viewClass._3dreq||window._css3d&&!$.browser.msie||(viewClass=viewClass._fallback||MSBasicView),this.view=new viewClass(viewOptions),this.so.overPause){var that=this;this.slider.$element.mouseenter(function(){that.is_over=!0,that._stopTimer()}).mouseleave(function(){that.is_over=!1,that._startTimer()})}},p.onChangeStart=function(){this.change_started=!0,this.currentSlide&&this.currentSlide.unselect(),this.currentSlide=this.view.currentSlide,this.currentSlide.prepareToSelect(),this.so.endPause&&this.currentSlide.index===this.slider.slides.length-1&&(this.pause(),this.skipTimer()),this.so.autoHeight&&this.slider.setHeight(this.currentSlide.getHeight()),this.so.deepLink&&this.__updateWindowHash(),this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_START))},p.onChangeEnd=function(){if(this.change_started=!1,this._startTimer(),this.currentSlide.select(),this.so.preload>1){var loc,i,l=this.so.preload-1;for(i=1;l>=i;++i){if(loc=this.view.index+i,loc>=this.view.slideList.length){if(!this.so.loop){i=l;continue}loc-=this.view.slideList.length}this.view.slideList[loc].loadImages()}for(l>this.view.slideList.length/2&&(l=Math.floor(this.view.slideList.length/2)),i=1;l>=i;++i){if(loc=this.view.index-i,0>loc){if(!this.so.loop){i=l;continue}loc=this.view.slideList.length+loc}this.view.slideList[loc].loadImages()}}this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_END))},p.onSwipeStart=function(){this.skipTimer()},p.skipTimer=function(){this._timer.reset(),this._delayProgress=0,this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))},p.onTimer=function(){this._timer.getTime()>=1e3*this.view.currentSlide.delay&&(this.skipTimer(),this.view.next(),this.hideCalled=!1),this._delayProgress=this._timer.getTime()/(10*this.view.currentSlide.delay),this.so.hideLayers&&!this.hideCalled&&1e3*this.view.currentSlide.delay-this._timer.getTime()<=300&&(this.view.currentSlide.hideLayers(),this.hideCalled=!0),this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))},p._stopTimer=function(){this._timer&&this._timer.stop()},p._startTimer=function(){this.paused||this.is_over||!this.currentSlide||!this.currentSlide.ready||this.change_started||this._timer.start()},p.__appendSlides=function(){var slide,loc,i=0,l=this.view.slideList.length-1;for(i;l>i;++i)slide=this.view.slideList[i],slide.detached||(slide.$element.detach(),slide.detached=!0);for(this.view.appendSlide(this.view.slideList[this.view.index]),l=3,i=1;l>=i;++i){if(loc=this.view.index+i,loc>=this.view.slideList.length){if(!this.so.loop){i=l;continue}loc-=this.view.slideList.length}slide=this.view.slideList[loc],slide.detached=!1,this.view.appendSlide(slide)}for(l>this.view.slideList.length/2&&(l=Math.floor(this.view.slideList.length/2)),i=1;l>=i;++i){if(loc=this.view.index-i,0>loc){if(!this.so.loop){i=l;continue}loc=this.view.slideList.length+loc}slide=this.view.slideList[loc],slide.detached=!1,this.view.appendSlide(slide)}},p.__resize=function(hard){this.created&&(this.width=this.slider.$element[0].clientWidth||this.so.width,this.so.fullwidth||(this.width=Math.min(this.width,this.so.width)),this.height=this.width/this.slider.aspect,this.so.autoHeight?(this.currentSlide.setSize(this.width,null,hard),this.view.setSize(this.width,this.currentSlide.getHeight(),hard)):this.view.setSize(this.width,this.so.heightLimit?Math.min(this.height,this.so.height):this.height,hard),this.slider.$controlsCont&&this.so.centerControls&&this.so.fullwidth&&this.view.$element.css("left",Math.min(0,-(this.slider.$element[0].clientWidth-this.so.width)/2)+"px"),this.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESIZE)))},p.__dispatchInit=function(){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.INIT))},p.setup=function(){this.created=!0,this.paused=!this.so.autoplay,this.view.addEventListener(MSViewEvents.CHANGE_START,this.onChangeStart,this),this.view.addEventListener(MSViewEvents.CHANGE_END,this.onChangeEnd,this),this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.currentSlide=this.view.slideList[this.so.start-1],this.__resize();var startSlide=this.so.start-1;if(this.view.create(startSlide),0===this.so.preload&&this.view.slideList[0].loadImages(),this.scroller=this.view.controller,this.so.wheel){var that=this,last_time=(new Date).getTime();this.wheellistener=function(event){var e=window.event||event.orginalEvent||event;e.preventDefault();var current_time=(new Date).getTime();if(!(400>current_time-last_time)){last_time=current_time;var delta=Math.abs(e.detail||e.wheelDelta);$.browser.mozilla&&(delta*=100);var scrollThreshold=15;return e.detail<0||e.wheelDelta>0?delta>=scrollThreshold&&that.previous(!0):delta>=scrollThreshold&&that.next(!0),!1}},$.browser.mozilla?this.slider.$element[0].addEventListener("DOMMouseScroll",this.wheellistener):this.slider.$element.bind("mousewheel",this.wheellistener)}0===this.slider.$element[0].clientWidth&&(this.slider.init_safemode=!0),this.__resize()},p.index=function(){return this.view.index},p.count=function(){return this.view.slidesCount},p.next=function(checkLoop){this.skipTimer(),this.view.next(checkLoop)},p.previous=function(checkLoop){this.skipTimer(),this.view.previous(checkLoop)},p.gotoSlide=function(index){index=Math.min(index,this.count()-1),this.skipTimer(),this.view.gotoSlide(index)},p.destroy=function(reset){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.DESTROY)),this.slider.destroy(reset)},p._destroy=function(){this._timer.reset(),this._timer=null,$(window).unbind("resize",this.resize_listener),this.view.destroy(),this.view=null,this.so.wheel&&($.browser.mozilla?this.slider.$element[0].removeEventListener("DOMMouseScroll",this.wheellistener):this.slider.$element.unbind("mousewheel",this.wheellistener),this.wheellistener=null),this.so=null},p.runAction=function(action){var actionParams=[];if(-1!==action.indexOf("(")){var temp=action.slice(0,action.indexOf("("));actionParams=action.slice(action.indexOf("(")+1,-1).replace(/\"|\'|\s/g,"").split(","),action=temp}action in this?this[action].apply(this,actionParams):console},p.update=function(hard){this.slider.init_safemode&&hard&&(this.slider.init_safemode=!1),this.__resize(hard)},p.locate=function(){this.__resize()},p.resume=function(){this.paused&&(this.paused=!1,this._startTimer())},p.pause=function(){this.paused||(this.paused=!0,this._stopTimer())},p.currentTime=function(){return this._delayProgress},averta.EventDispatcher.extend(p)}(jQuery),function($){"use strict";window.MasterSlider=function(){this.options={autoplay:!1,loop:!1,mouse:!0,swipe:!0,grabCursor:!0,space:0,fillMode:"fill",start:1,view:"basic",width:300,height:150,inView:15,critMargin:1,heightLimit:!0,smoothHeight:!0,autoHeight:!1,fullwidth:!1,fullheight:!1,autofill:!1,layersMode:"center",hideLayers:!1,endPause:!1,centerControls:!0,overPause:!0,shuffle:!1,speed:17,dir:"h",preload:0,wheel:!1,layout:"boxed",fullscreenMargin:0,instantStartLayers:!1,parallaxMode:"mouse",rtl:!1,deepLink:null,deepLinkType:"path",disablePlugins:[]},this.slides=[],this.activePlugins=[],this.$element=null,this.lastMargin=0,this.leftSpace=0,this.topSpace=0,this.rightSpace=0,this.bottomSpace=0;var that=this;this.resize_listener=function(){that._resize()},$(window).bind("resize",this.resize_listener)},MasterSlider.author="Averta Ltd. (www.averta.net)",MasterSlider.version="2.0.5",MasterSlider.releaseDate="Mar 2015",MasterSlider._plugins=[];var MS=MasterSlider;MS.registerPlugin=function(plugin){-1===MS._plugins.indexOf(plugin)&&MS._plugins.push(plugin)};var p=MasterSlider.prototype;p.__setupSlides=function(){var new_slide,that=this,ind=0;this.$element.children(".ms-slide").each(function(){var $slide_ele=$(this);new_slide=new MSSlide,new_slide.$element=$slide_ele,new_slide.slider=that,new_slide.delay=void 0!==$slide_ele.data("delay")?$slide_ele.data("delay"):3,new_slide.fillMode=void 0!==$slide_ele.data("fill-mode")?$slide_ele.data("fill-mode"):that.options.fillMode,new_slide.index=ind++;var slide_img=$slide_ele.children("img:not(.ms-layer)");if(slide_img.length>0&&new_slide.setBG(slide_img[0]),that.controls)for(var i=0,l=that.controls.length;l>i;++i)that.controls[i].slideAction(new_slide);$slide_ele.children("a").each(function(){var $this=$(this);"video"===this.getAttribute("data-type")?(new_slide.video=this.getAttribute("href"),new_slide.videoAutoPlay=$this.data("autoplay"),$this.remove()):$this.hasClass("ms-layer")||(new_slide.link=$(this))});that.slides.push(new_slide),that.slideController.view.addSlide(new_slide)})},p._removeLoading=function(){$(window).unbind("resize",this.resize_listener),this.$element.removeClass("before-init").css("visibility","visible").css("height","").css("opacity",0),CTween.fadeIn(this.$element),this.$loading.remove(),this.slideController&&this.slideController.__resize()},p._resize=function(){if(this.$loading){var h=this.$loading[0].clientWidth/this.aspect;h=this.options.heightLimit?Math.min(h,this.options.height):h,this.$loading.height(h),this.$element.height(h)}},p._shuffleSlides=function(){for(var r,slides=this.$element.children(".ms-slide"),i=0,l=slides.length;l>i;++i)r=Math.floor(Math.random()*(l-1)),i!=r&&(this.$element[0].insertBefore(slides[i],slides[r]),slides=this.$element.children(".ms-slide"))},p._setupSliderLayout=function(){this._updateSideMargins(),this.lastMargin=this.leftSpace;var lo=this.options.layout;"boxed"!==lo&&"partialview"!==lo&&(this.options.fullwidth=!0),("fullscreen"===lo||"fullwidth"===lo)&&($(window).bind("resize",{that:this},this._updateLayout),this._updateLayout()),$(window).bind("resize",this.slideController.resize_listener)},p._updateLayout=function(event){var that=event?event.data.that:this,$element=(that.options.layout,that.$element);$element.width($("body").width()-that.leftSpace-that.rightSpace);var margin=-$element.offset().left+that.leftSpace+that.lastMargin;$element.css("margin-left",margin),that.lastMargin=margin},p._init=function(){if(!this.preventInit){if(this.initialized=!0,"all"!==this.options.preload&&this._removeLoading(),this.options.shuffle&&this._shuffleSlides(),this.slideController.setupView(),this.view=this.slideController.view,this.$controlsCont=$("<div></div>").addClass("ms-inner-controls-cont"),this.options.centerControls&&this.$controlsCont.css("max-width",this.options.width+"px"),this.$controlsCont.prepend(this.view.$element),this.$msContainer=$("<div></div>").addClass("ms-container").prependTo(this.$element).append(this.$controlsCont),this.controls)for(var i=0,l=this.controls.length;l>i;++i)this.controls[i].setup();if(this._setupSliderLayout(),this.__setupSlides(),this.slideController.setup(),this.controls)for(i=0,l=this.controls.length;l>i;++i)this.controls[i].create();if(this.options.autoHeight&&this.slideController.view.$element.height(this.slideController.currentSlide.getHeight()),this.options.swipe&&!window._touch&&this.options.grabCursor&&this.options.mouse){var $view=this.view.$element;$view.mousedown(function(){$view.removeClass("ms-grab-cursor"),$view.addClass("ms-grabbing-cursor"),$.browser.msie&&window.ms_grabbing_curosr&&($view[0].style.cursor="url("+window.ms_grabbing_curosr+"), move")}).addClass("ms-grab-cursor"),$(document).mouseup(function(){$view.removeClass("ms-grabbing-cursor"),$view.addClass("ms-grab-cursor"),$.browser.msie&&window.ms_grab_curosr&&($view[0].style.cursor="url("+window.ms_grab_curosr+"), move")})}this.slideController.__dispatchInit()}},p.setHeight=function(value){this.options.smoothHeight?(this.htween&&(this.htween.reset?this.htween.reset():this.htween.stop(!0)),this.htween=CTween.animate(this.slideController.view.$element,500,{height:value},{ease:"easeOutQuart"})):this.slideController.view.$element.height(value)},p.reserveSpace=function(side,space){var sideSpace=side+"Space",pos=this[sideSpace];return this[sideSpace]+=space,this._updateSideMargins(),pos},p._updateSideMargins=function(){this.$element.css("margin",this.topSpace+"px "+this.rightSpace+"px "+this.bottomSpace+"px "+this.leftSpace+"px")},p._realignControls=function(){this.rightSpace=this.leftSpace=this.topSpace=this.bottomSpace=0,this._updateSideMargins(),this.api.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESERVED_SPACE_CHANGE))},p.control=function(control,options){if(control in MSSlideController.SliderControlList){this.controls||(this.controls=[]);var ins=new MSSlideController.SliderControlList[control](options);return ins.slider=this,this.controls.push(ins),this}},p.setup=function(target,options){if(this.$element="string"==typeof target?$("#"+target):target.eq(0),this.setupMarkup=this.$element.html(),0!==this.$element.length){this.$element.addClass("master-slider").addClass("before-init"),$.browser.msie?this.$element.addClass("ms-ie").addClass("ms-ie"+$.browser.version.slice(0,$.browser.version.indexOf("."))):$.browser.webkit?this.$element.addClass("ms-wk"):$.browser.mozilla&&this.$element.addClass("ms-moz");var ua=navigator.userAgent.toLowerCase(),isAndroid=ua.indexOf("android")>-1;isAndroid&&this.$element.addClass("ms-android");var that=this;$.extend(this.options,options),this.aspect=this.options.width/this.options.height,this.$loading=$("<div></div>").addClass("ms-loading-container").insertBefore(this.$element).append($("<div></div>").addClass("ms-loading")),this.$loading.parent().css("position","relative"),this.options.autofill&&(this.options.fullwidth=!0,this.options.fullheight=!0),this.options.fullheight&&this.$element.addClass("ms-fullheight"),this._resize(),this.slideController=new MSSlideController(this),this.api=this.slideController;for(var i=0,l=MS._plugins.length;i!==l;i++){var plugin=MS._plugins[i];-1===this.options.disablePlugins.indexOf(plugin.name)&&this.activePlugins.push(new plugin(this))}return $(document).ready(function(){that._init()}),this}},p.destroy=function(insertMarkup){for(var j=0,l2=this.activePlugins.length;j!==l2;j++)this.activePlugins[i].destroy();if(this.controls)for(var i=0,l=this.controls.length;i!==l;i++)this.controls[i].destroy();this.slideController&&this.slideController._destroy(),this.$loading&&this.$loading.remove(),insertMarkup?this.$element.html(this.setupMarkup).css("visibility","hidden"):this.$element.remove();var lo=this.options.layout;("fullscreen"===lo||"fullwidth"===lo)&&$(window).unbind("resize",this._updateLayout),this.view=null,this.slides=null,this.options=null,this.slideController=null,this.api=null,this.resize_listener=null,this.activePlugins=null}}(jQuery),function($,window,document,undefined){function MasterSliderPlugin(element,options){this.element=element,this.$element=$(element),this.settings=$.extend({},defaults,options),this._defaults=defaults,this._name=pluginName,this.init()}var pluginName="masterslider",defaults={controls:{}};$.extend(MasterSliderPlugin.prototype,{init:function(){var self=this;this._slider=new MasterSlider;for(var control in this.settings.controls)this._slider.control(control,this.settings.controls[control]);this._slider.setup(this.$element,this.settings);var _superDispatch=this._slider.api.dispatchEvent;this._slider.api.dispatchEvent=function(event){self.$element.trigger(event.type),_superDispatch.call(this,event)}},api:function(){return this._slider.api},slider:function(){return this._slider}}),$.fn[pluginName]=function(options){var args=arguments,plugin="plugin_"+pluginName;if(options===undefined||"object"==typeof options)return this.each(function(){$.data(this,plugin)||$.data(this,plugin,new MasterSliderPlugin(this,options))});if("string"==typeof options&&"_"!==options[0]&&"init"!==options){var returns;return this.each(function(){var instance=$.data(this,plugin);instance instanceof MasterSliderPlugin&&"function"==typeof instance[options]&&(returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))),instance instanceof MasterSliderPlugin&&"function"==typeof instance._slider.api[options]&&(returns=instance._slider.api[options].apply(instance._slider.api,Array.prototype.slice.call(args,1))),"destroy"===options&&$.data(this,plugin,null)}),returns!==undefined?returns:this}}}(jQuery,window,document),window.MSViewEvents=function(type,data){this.type=type,this.data=data},MSViewEvents.SWIPE_START="swipeStart",MSViewEvents.SWIPE_END="swipeEnd",MSViewEvents.SWIPE_MOVE="swipeMove",MSViewEvents.SWIPE_CANCEL="swipeCancel",MSViewEvents.SCROLL="scoll",MSViewEvents.CHANGE_START="slideChangeStart",MSViewEvents.CHANGE_END="slideChangeEnd",function($){"use strict";window.MSBasicView=function(options){this.options={loop:!1,dir:"h",autoHeight:!1,spacing:5,mouseSwipe:!0,swipe:!0,speed:17,minSlideSpeed:2,viewNum:20,critMargin:1},$.extend(this.options,options),this.dir=this.options.dir,this.loop=this.options.loop,this.spacing=this.options.spacing,this.__width=0,this.__height=0,this.__cssProb="h"===this.dir?"left":"top",this.__offset="h"===this.dir?"offsetLeft":"offsetTop",this.__dimension="h"===this.dir?"__width":"__height",this.__translate_end=window._css3d?" translateZ(0px)":"",this.$slideCont=$("<div></div>").addClass("ms-slide-container"),this.$element=$("<div></div>").addClass("ms-view").addClass("ms-basic-view").append(this.$slideCont),this.currentSlide=null,this.index=-1,this.slidesCount=0,this.slides=[],this.slideList=[],this.viewSlidesList=[],this.css3=window._cssanim,this.start_buffer=0,this.firstslide_snap=0,this.slideChanged=!1,this.controller=new Controller(0,0,{snapping:!0,snapsize:100,paging:!0,snappingMinSpeed:this.options.minSlideSpeed,friction:(100-.5*this.options.speed)/100,endless:this.loop}),this.controller.renderCallback("h"===this.dir?this._horizUpdate:this._vertiUpdate,this),this.controller.snappingCallback(this.__snapUpdate,this),this.controller.snapCompleteCallback(this.__snapCompelet,this),averta.EventDispatcher.call(this)};var p=MSBasicView.prototype;p.__snapCompelet=function(){this.slideChanged&&(this.slideChanged=!1,this.__locateSlides(),this.start_buffer=0,this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END)))},p.__snapUpdate=function(controller,snap,change){if(this.loop){var target_index=this.index+change;this.updateLoop(target_index),target_index>=this.slidesCount&&(target_index-=this.slidesCount),0>target_index&&(target_index=this.slidesCount+target_index),this.index=target_index}else{if(0>snap||snap>=this.slidesCount)return;this.index=snap}this._checkCritMargins(),$.browser.mozilla&&(this.slideList[this.index].$element[0].style.marginTop="0.1px",this.currentSlide&&(this.currentSlide.$element[0].style.marginTop=""));var new_slide=this.slideList[this.index];new_slide!==this.currentSlide&&(this.currentSlide=new_slide,this.__updateSlidesZindex(),this.slideChanged=!0,this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START)))},p._checkCritMargins=function(){if(!this.normalMode){var hlf=Math.floor(this.options.viewNum/2),inView=this.viewSlidesList.indexOf(this.slideList[this.index]),size=this[this.__dimension]+this.spacing,cm=this.options.critMargin;return this.loop?void((cm>=inView||inView>=this.viewSlidesList.length-cm)&&(size*=inView-hlf,this.__locateSlides(!1,size+this.start_buffer),this.start_buffer+=size)):void((cm>inView&&this.index>=cm||inView>=this.viewSlidesList.length-cm&&this.index<this.slidesCount-cm)&&this.__locateSlides(!1))}},p._vertiUpdate=function(controller,value){return this.__contPos=value,this.dispatchEvent(new MSViewEvents(MSViewEvents.SCROLL)),this.css3?void(this.$slideCont[0].style[window._jcsspfx+"Transform"]="translateY("+-value+"px)"+this.__translate_end):void(this.$slideCont[0].style.top=-value+"px")},p._horizUpdate=function(controller,value){return this.__contPos=value,this.dispatchEvent(new MSViewEvents(MSViewEvents.SCROLL)),this.css3?void(this.$slideCont[0].style[window._jcsspfx+"Transform"]="translateX("+-value+"px)"+this.__translate_end):void(this.$slideCont[0].style.left=-value+"px")},p.__updateViewList=function(){if(this.normalMode)return void(this.viewSlidesList=this.slides);var temp=this.viewSlidesList.slice();this.viewSlidesList=[];var l,i=0,hlf=Math.floor(this.options.viewNum/2);if(this.loop)for(;i!==this.options.viewNum;i++)this.viewSlidesList.push(this.slides[this.currentSlideLoc-hlf+i]);else{for(i=0;i!==hlf&&this.index-i!==-1;i++)this.viewSlidesList.unshift(this.slideList[this.index-i]);for(i=1;i!==hlf&&this.index+i!==this.slidesCount;i++)this.viewSlidesList.push(this.slideList[this.index+i])}for(i=0,l=temp.length;i!==l;i++)-1===this.viewSlidesList.indexOf(temp[i])&&temp[i].sleep();temp=null,this.currentSlide&&this.__updateSlidesZindex()},p.__locateSlides=function(move,start){this.__updateViewList(),start=this.loop?start||0:this.slides.indexOf(this.viewSlidesList[0])*(this[this.__dimension]+this.spacing);for(var slide,l=this.viewSlidesList.length,i=0;i!==l;i++){var pos=start+i*(this[this.__dimension]+this.spacing);slide=this.viewSlidesList[i],slide.wakeup(),slide.position=pos,slide.$element[0].style[this.__cssProb]=pos+"px"}move!==!1&&this.controller.changeTo(this.slideList[this.index].position,!1,null,null,!1)},p.__createLoopList=function(){var return_arr=[],i=0,count=this.slidesCount/2,before_count=this.slidesCount%2===0?count-1:Math.floor(count),after_count=this.slidesCount%2===0?count:Math.floor(count);for(this.currentSlideLoc=before_count,i=1;before_count>=i;++i)return_arr.unshift(this.slideList[this.index-i<0?this.slidesCount-i+this.index:this.index-i]);for(return_arr.push(this.slideList[this.index]),i=1;after_count>=i;++i)return_arr.push(this.slideList[this.index+i>=this.slidesCount?this.index+i-this.slidesCount:this.index+i]);return return_arr},p.__getSteps=function(index,target){var right=index>target?this.slidesCount-index+target:target-index,left=Math.abs(this.slidesCount-right);return left>right?right:-left},p.__pushEnd=function(){var first_slide=this.slides.shift(),last_slide=this.slides[this.slidesCount-2];if(this.slides.push(first_slide),this.normalMode){var pos=last_slide.$element[0][this.__offset]+this.spacing+this[this.__dimension];first_slide.$element[0].style[this.__cssProb]=pos+"px",first_slide.position=pos}},p.__pushStart=function(){var last_slide=this.slides.pop(),first_slide=this.slides[0];if(this.slides.unshift(last_slide),this.normalMode){var pos=first_slide.$element[0][this.__offset]-this.spacing-this[this.__dimension];last_slide.$element[0].style[this.__cssProb]=pos+"px",last_slide.position=pos}},p.__updateSlidesZindex=function(){if(this.autoUpdateZIndex){{var slide,l=this.viewSlidesList.length;Math.floor(l/2)}if(this.loop)for(var loc=this.viewSlidesList.indexOf(this.currentSlide),i=0;i!==l;i++)slide=this.viewSlidesList[i],this.viewSlidesList[i].$element.css("z-index",loc>=i?i+1:l-i);else{for(var beforeNum=this.currentSlide.index-this.viewSlidesList[0].index,i=0;i!==l;i++)this.viewSlidesList[i].$element.css("z-index",beforeNum>=i?i+1:l-i);this.currentSlide.$element.css("z-index",l)}}},p.addSlide=function(slide){slide.view=this,this.slides.push(slide),this.slideList.push(slide),this.slidesCount++},p.appendSlide=function(slide){this.$slideCont.append(slide.$element)},p.updateLoop=function(index){if(this.loop)for(var steps=this.__getSteps(this.index,index),i=0,l=Math.abs(steps);l>i;++i)0>steps?this.__pushStart():this.__pushEnd()},p.gotoSlide=function(index,fast){this.updateLoop(index),this.index=index;var target_slide=this.slideList[index];this._checkCritMargins(),this.controller.changeTo(target_slide.position,!fast,null,null,!1),target_slide!==this.currentSlide&&(this.slideChanged=!0,this.currentSlide=target_slide,this.__updateSlidesZindex(),this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START)),fast&&this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END)))},p.next=function(checkLoop){return checkLoop&&!this.loop&&this.index+1>=this.slidesCount?void this.controller.bounce(10):void this.gotoSlide(this.index+1>=this.slidesCount?0:this.index+1)},p.previous=function(checkLoop){return checkLoop&&!this.loop&&this.index-1<0?void this.controller.bounce(-10):void this.gotoSlide(this.index-1<0?this.slidesCount-1:this.index-1)},p.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element),this.swipeControl.swipeType="h"===this.dir?"horizontal":"vertical";var that=this;this.swipeControl.onSwipe="h"===this.dir?function(status){that.horizSwipeMove(status)}:function(status){that.vertSwipeMove(status)}},p.vertSwipeMove=function(status){var phase=status.phase;if("start"===phase)this.controller.stop(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,status));else if("move"===phase&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+status.moveY)<this.cont_size/2))this.controller.drag(status.moveY),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_MOVE,status));else if("end"===phase||"cancel"===phase){var speed=status.distanceY/status.duration*50/3;Math.abs(speed)>.1?(this.controller.push(-speed),speed>this.controller.options.snappingMinSpeed&&this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,status))):(this.controller.cancel(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,status)))}},p.horizSwipeMove=function(status){var phase=status.phase;if("start"===phase)this.controller.stop(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,status));else if("move"===phase&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+status.moveX)<this.cont_size/2))this.controller.drag(status.moveX),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_MOVE,status));else if("end"===phase||"cancel"===phase){var speed=status.distanceX/status.duration*50/3;Math.abs(speed)>.1?(this.controller.push(-speed),speed>this.controller.options.snappingMinSpeed&&this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,status))):(this.controller.cancel(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,status)))}},p.setSize=function(width,height,hard){if(this.lastWidth!==width||height!==this.lastHeight||hard){this.$element.width(width).height(height);for(var i=0;i<this.slidesCount;++i)this.slides[i].setSize(width,height,hard);this.__width=width,this.__height=height,this.__created&&(this.__locateSlides(),this.cont_size=(this.slidesCount-1)*(this[this.__dimension]+this.spacing),this.loop||(this.controller._max_value=this.cont_size),this.controller.options.snapsize=this[this.__dimension]+this.spacing,this.controller.changeTo(this.currentSlide.position,!1,null,null,!1),this.controller.cancel(),this.lastWidth=width,this.lastHeight=height)}},p.create=function(index){this.__created=!0,this.index=Math.min(index||0,this.slidesCount-1),this.lastSnap=this.index,this.loop&&(this.slides=this.__createLoopList()),this.normalMode=this.slidesCount<=this.options.viewNum;for(var i=0;i<this.slidesCount;++i)this.slides[i].create();this.__locateSlides(),this.controller.options.snapsize=this[this.__dimension]+this.spacing,this.loop||(this.controller._max_value=(this.slidesCount-1)*(this[this.__dimension]+this.spacing)),this.gotoSlide(this.index,!0),this.options.swipe&&(window._touch||this.options.mouseSwipe)&&this.setupSwipe()},p.destroy=function(){if(this.__created){for(var i=0;i<this.slidesCount;++i)this.slides[i].destroy();this.slides=null,this.slideList=null,this.$element.remove(),this.controller.destroy(),this.controller=null}},averta.EventDispatcher.extend(p),MSSlideController.registerView("basic",MSBasicView)}(jQuery),function(){"use strict";window.MSFadeView=function(options){MSBasicView.call(this,options),this.$element.removeClass("ms-basic-view").addClass("ms-fade-view"),this.controller.renderCallback(this.__update,this)},MSFadeView.extend(MSBasicView);var p=MSFadeView.prototype,_super=MSBasicView.prototype;p.__update=function(controller,value){for(var slide,distance,cont_scroll=-value,i=0;i<this.slidesCount;++i)slide=this.slideList[i],distance=-cont_scroll-slide.position,this.__updateSlides(slide,distance)},p.__updateSlides=function(slide,distance){var value=Math.abs(distance/this[this.__dimension]);0>=1-value?slide.$element.fadeTo(0,0).css("visibility","hidden"):slide.$element.fadeTo(0,1-value).css("visibility","")},p.__locateSlides=function(move,start){this.__updateViewList(),start=this.loop?start||0:this.slides.indexOf(this.viewSlidesList[0])*(this[this.__dimension]+this.spacing);for(var slide,l=this.viewSlidesList.length,i=0;i!==l;i++){var pos=start+i*this[this.__dimension];slide=this.viewSlidesList[i],slide.wakeup(),slide.position=pos}move!==!1&&this.controller.changeTo(this.slideList[this.index].position,!1,null,null,!1)},p.__pushEnd=function(){var first_slide=this.slides.shift(),last_slide=this.slides[this.slidesCount-2];this.slides.push(first_slide),first_slide.position=last_slide.position+this[this.__dimension]},p.__pushStart=function(){var last_slide=this.slides.pop(),first_slide=this.slides[0];this.slides.unshift(last_slide),last_slide.position=first_slide.position-this[this.__dimension]},p.create=function(index){_super.create.call(this,index),this.spacing=0,this.controller.options.minValidDist=10},MSSlideController.registerView("fade",MSFadeView)}(jQuery),function($){"use strict";var BaseControl=function(){this.options={prefix:"ms-",autohide:!0,overVideo:!0}},p=BaseControl.prototype;p.slideAction=function(){},p.setup=function(){this.cont=this.options.insertTo?$(this.options.insertTo):this.slider.$controlsCont,this.options.overVideo||this._hideOnvideoStarts()},p.checkHideUnder=function(){this.options.hideUnder&&(this.needsRealign=!this.options.insetTo&&("left"===this.options.align||"right"===this.options.align)&&this.options.inset===!1,$(window).bind("resize",{that:this},this.onResize),this.onResize())},p.onResize=function(event){var that=event&&event.data.that||this,w=window.innerWidth;w<=that.options.hideUnder&&!that.detached?(that.hide(!0),that.detached=!0,that.onDetach()):w>=that.options.hideUnder&&that.detached&&(that.detached=!1,that.visible(),that.onAppend())},p.create=function(){this.options.autohide&&!window._touch&&(this.hide(!0),this.slider.$controlsCont.mouseenter($.proxy(this._onMouseEnter,this)).mouseleave($.proxy(this._onMouseLeave,this)).mousedown($.proxy(this._onMouseDown,this)),this.$element&&this.$element.mouseenter($.proxy(this._onMouseEnter,this)).mouseleave($.proxy(this._onMouseLeave,this)).mousedown($.proxy(this._onMouseDown,this)),$(document).mouseup($.proxy(this._onMouseUp,this))),this.options.align&&this.$element.addClass("ms-align-"+this.options.align)},p._onMouseEnter=function(){this._disableAH||this.mdown||this.visible(),this.mleave=!1},p._onMouseLeave=function(){this.mdown||this.hide(),this.mleave=!0},p._onMouseDown=function(){this.mdown=!0},p._onMouseUp=function(){this.mdown&&this.mleave&&this.hide(),this.mdown=!1},p.onAppend=function(){this.needsRealign&&this.slider._realignControls()},p.onDetach=function(){this.needsRealign&&this.slider._realignControls()},p._hideOnvideoStarts=function(){var that=this;this.slider.api.addEventListener(MSSliderEvent.VIDEO_PLAY,function(){that._disableAH=!0,that.hide()}),this.slider.api.addEventListener(MSSliderEvent.VIDEO_CLOSE,function(){that._disableAH=!1,that.visible()
|
11 |
-
})},p.hide=function(fast){if(fast)this.$element.css("opacity",0),this.$element.css("display","none");else{clearTimeout(this.hideTo);var $element=this.$element;this.hideTo=setTimeout(function(){CTween.fadeOut($element,400,!1)},20)}this.$element.addClass("ms-ctrl-hide")},p.visible=function(){this.detached||(clearTimeout(this.hideTo),this.$element.css("display",""),CTween.fadeIn(this.$element,400,!1),this.$element.removeClass("ms-ctrl-hide"))},p.destroy=function(){this.options&&this.options.hideUnder&&$(window).unbind("resize",this.onResize)},window.BaseControl=BaseControl}(jQuery),function($){"use strict";var MSArrows=function(options){BaseControl.call(this),$.extend(this.options,options)};MSArrows.extend(BaseControl);var p=MSArrows.prototype,_super=BaseControl.prototype;p.setup=function(){var that=this;this.$next=$("<div></div>").addClass(this.options.prefix+"nav-next").bind("click",function(){that.slider.api.next(!0)}),this.$prev=$("<div></div>").addClass(this.options.prefix+"nav-prev").bind("click",function(){that.slider.api.previous(!0)}),_super.setup.call(this),this.cont.append(this.$next),this.cont.append(this.$prev),this.checkHideUnder()},p.hide=function(fast){return fast?(this.$prev.css("opacity",0).css("display","none"),void this.$next.css("opacity",0).css("display","none")):(CTween.fadeOut(this.$prev,400,!1),CTween.fadeOut(this.$next,400,!1),this.$prev.addClass("ms-ctrl-hide"),void this.$next.addClass("ms-ctrl-hide"))},p.visible=function(){this.detached||(CTween.fadeIn(this.$prev,400),CTween.fadeIn(this.$next,400),this.$prev.removeClass("ms-ctrl-hide").css("display",""),this.$next.removeClass("ms-ctrl-hide").css("display",""))},p.destroy=function(){_super.destroy(),this.$next.remove(),this.$prev.remove()},window.MSArrows=MSArrows,MSSlideController.registerControl("arrows",MSArrows)}(jQuery),function($){"use strict";var MSThumblist=function(options){BaseControl.call(this),this.options.dir="h",this.options.wheel="v"===options.dir,this.options.arrows=!0,this.options.speed=17,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.space=10,this.options.width=100,this.options.height=100,this.options.type="thumbs",$.extend(this.options,options),this.thumbs=[],this.index_count=0,this.__dimen="h"===this.options.dir?"width":"height",this.__alignsize="h"===this.options.dir?"height":"width",this.__jdimen="h"===this.options.dir?"outerWidth":"outerHeight",this.__pos="h"===this.options.dir?"left":"top",this.click_enable=!0};MSThumblist.extend(BaseControl);var p=MSThumblist.prototype,_super=BaseControl.prototype;p.setup=function(){if(this.$element=$("<div></div>").addClass(this.options.prefix+"thumb-list"),"tabs"===this.options.type&&this.$element.addClass(this.options.prefix+"tabs"),this.$element.addClass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),this.$thumbscont=$("<div></div>").addClass("ms-thumbs-cont").appendTo(this.$element),this.options.arrows){var that=this;this.$fwd=$("<div></div>").addClass("ms-thumblist-fwd").appendTo(this.$element).click(function(){that.controller.push(-15)}),this.$bwd=$("<div></div>").addClass("ms-thumblist-bwd").appendTo(this.$element).click(function(){that.controller.push(15)})}if(!this.options.insetTo&&this.options.align){var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.detach().prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.width):this.$element.height(this.options.height)}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,this.options[this.__alignsize]+2*this.options.margin);this.$element.css(align,-pos-this.options[this.__alignsize]-this.options.margin)}},p.slideAction=function(slide){var thumb_ele=$(slide.$element.find(".ms-thumb")),that=this,thumb_frame=$("<div></div>").addClass("ms-thumb-frame").append(thumb_ele).append($('<div class="ms-thumb-ol"></div>')).bind("click",function(){that.changeSlide(thumb_frame)});if(this.options.align&&thumb_frame.width(this.options.width-("v"===this.options.dir?12:0)).height(this.options.height).css("margin-"+("v"===this.options.dir?"bottom":"right"),this.options.space),thumb_frame[0].index=this.index_count++,this.$thumbscont.append(thumb_frame),this.options.fillMode&&thumb_ele.is("img")){var aligner=new window.MSAligner(this.options.fillMode,thumb_frame,thumb_ele);thumb_ele[0].aligner=aligner,thumb_ele.one("load",function(){var $this=$(this);$this[0].aligner.init($this.width(),$this.height()),$this[0].aligner.align()}).each($.jqLoadFix)}$.browser.msie&&thumb_ele.on("dragstart",function(event){event.preventDefault()}),this.thumbs.push(thumb_frame)},p.create=function(){_super.create.call(this),this.__translate_end=window._css3d?" translateZ(0px)":"",this.controller=new Controller(0,0,{snappingMinSpeed:2,friction:(100-.5*this.options.speed)/100}),this.controller.renderCallback("h"===this.options.dir?this._hMove:this._vMove,this);var that=this;this.resize_listener=function(){that.__resize()},$(window).bind("resize",this.resize_listener),this.thumbSize=this.thumbs[0][this.__jdimen](!0),this.setupSwipe(),this.__resize();var that=this;this.options.wheel&&(this.wheellistener=function(event){var e=window.event||event.orginalEvent||event,delta=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));return that.controller.push(10*-delta),!1},$.browser.mozilla?this.$element[0].addEventListener("DOMMouseScroll",this.wheellistener):this.$element.bind("mousewheel",this.wheellistener)),this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.cindex=this.slider.api.index(),this.select(this.thumbs[this.cindex])},p._hMove=function(controller,value){return this.__contPos=value,window._cssanim?void(this.$thumbscont[0].style[window._jcsspfx+"Transform"]="translateX("+-value+"px)"+this.__translate_end):void(this.$thumbscont[0].style.left=-value+"px")},p._vMove=function(controller,value){return this.__contPos=value,window._cssanim?void(this.$thumbscont[0].style[window._jcsspfx+"Transform"]="translateY("+-value+"px)"+this.__translate_end):void(this.$thumbscont[0].style.top=-value+"px")},p.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element),this.swipeControl.swipeType="h"===this.options.dir?"horizontal":"vertical";var that=this;this.swipeControl.onSwipe="h"===this.options.dir?function(status){that.horizSwipeMove(status)}:function(status){that.vertSwipeMove(status)}},p.vertSwipeMove=function(status){if(!this.dTouch){var phase=status.phase;if("start"===phase)this.controller.stop();else if("move"===phase)this.controller.drag(status.moveY);else if("end"===phase||"cancel"===phase){var speed=Math.abs(status.distanceY/status.duration*50/3);speed>.1?this.controller.push(-status.distanceY/status.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},p.horizSwipeMove=function(status){if(!this.dTouch){var phase=status.phase;if("start"===phase)this.controller.stop(),this.click_enable=!1;else if("move"===phase)this.controller.drag(status.moveX);else if("end"===phase||"cancel"===phase){var speed=Math.abs(status.distanceX/status.duration*50/3);speed>.1?this.controller.push(-status.distanceX/status.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},p.update=function(){var nindex=this.slider.api.index();this.cindex!==nindex&&(null!=this.cindex&&this.unselect(this.thumbs[this.cindex]),this.cindex=nindex,this.select(this.thumbs[this.cindex]),this.dTouch||this.updateThumbscroll())},p.updateThumbscroll=function(){var pos=this.thumbSize*this.cindex;if(0/0==this.controller.value&&(this.controller.value=0),pos-this.controller.value<0)return void this.controller.gotoSnap(this.cindex,!0);if(pos+this.thumbSize-this.controller.value>this.$element[this.__dimen]()){var first_snap=this.cindex-Math.floor(this.$element[this.__dimen]()/this.thumbSize)+1;return void this.controller.gotoSnap(first_snap,!0)}},p.changeSlide=function(thumb){this.click_enable&&this.cindex!==thumb[0].index&&this.slider.api.gotoSlide(thumb[0].index)},p.unselect=function(ele){ele.removeClass("ms-thumb-frame-selected")},p.select=function(ele){ele.addClass("ms-thumb-frame-selected")},p.__resize=function(){var size=this.$element[this.__dimen]();if(this.ls!==size){this.ls=size,this.thumbSize=this.thumbs[0][this.__jdimen](!0);var len=this.slider.api.count()*this.thumbSize;this.$thumbscont[0].style[this.__dimen]=len+"px",size>=len?(this.dTouch=!0,this.controller.stop(),this.$thumbscont[0].style[this.__pos]=.5*(size-len)+"px",this.$thumbscont[0].style[window._jcsspfx+"Transform"]=""):(this.dTouch=!1,this.click_enable=!0,this.$thumbscont[0].style[this.__pos]="",this.controller._max_value=len-size,this.controller.options.snapsize=this.thumbSize,this.updateThumbscroll())}},p.destroy=function(){_super.destroy(),this.options.wheel&&($.browser.mozilla?this.$element[0].removeEventListener("DOMMouseScroll",this.wheellistener):this.$element.unbind("mousewheel",this.wheellistener),this.wheellistener=null),$(window).unbind("resize",this.resize_listener),this.$element.remove(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)},window.MSThumblist=MSThumblist,MSSlideController.registerControl("thumblist",MSThumblist)}(jQuery),function($){"use strict";var MSBulltes=function(options){BaseControl.call(this),this.options.dir="h",this.options.inset=!0,this.options.margin=10,this.options.space=10,$.extend(this.options,options),this.bullets=[]};MSBulltes.extend(BaseControl);var p=MSBulltes.prototype,_super=BaseControl.prototype;p.setup=function(){if(_super.setup.call(this),this.$element=$("<div></div>").addClass(this.options.prefix+"bullets").addClass("ms-dir-"+this.options.dir).appendTo(this.cont),this.$bullet_cont=$("<div></div>").addClass("ms-bullets-count").appendTo(this.$element),!this.options.insetTo&&this.options.align){var align=this.options.align;this.options.inset&&this.$element.css(align,this.options.margin)}this.checkHideUnder()},p.create=function(){_super.create.call(this);var that=this;this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.cindex=this.slider.api.index();for(var i=0;i<this.slider.api.count();++i){var bullet=$("<div></div>").addClass("ms-bullet");bullet[0].index=i,bullet.on("click",function(){that.changeSlide(this.index)}),this.$bullet_cont.append(bullet),this.bullets.push(bullet),"h"===this.options.dir?bullet.css("margin",this.options.space/2):bullet.css("margin",this.options.space)}"h"===this.options.dir?this.$element.width(bullet.outerWidth(!0)*this.slider.api.count()):this.$element.css("margin-top",-this.$element.outerHeight(!0)/2),this.select(this.bullets[this.cindex])},p.update=function(){var nindex=this.slider.api.index();this.cindex!==nindex&&(null!=this.cindex&&this.unselect(this.bullets[this.cindex]),this.cindex=nindex,this.select(this.bullets[this.cindex]))},p.changeSlide=function(index){this.cindex!==index&&this.slider.api.gotoSlide(index)},p.unselect=function(ele){ele.removeClass("ms-bullet-selected")},p.select=function(ele){ele.addClass("ms-bullet-selected")},p.destroy=function(){_super.destroy(),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.$element.remove()},window.MSBulltes=MSBulltes,MSSlideController.registerControl("bullets",MSBulltes)}(jQuery),function($){"use strict";var MSScrollbar=function(options){BaseControl.call(this),this.options.dir="h",this.options.autohide=!0,this.options.width=4,this.options.color="#3D3D3D",this.options.margin=10,$.extend(this.options,options),this.__dimen="h"===this.options.dir?"width":"height",this.__jdimen="h"===this.options.dir?"outerWidth":"outerHeight",this.__pos="h"===this.options.dir?"left":"top",this.__translate_end=window._css3d?" translateZ(0px)":"",this.__translate_start="h"===this.options.dir?" translateX(":"translateY("};MSScrollbar.extend(BaseControl);var p=MSScrollbar.prototype,_super=BaseControl.prototype;p.setup=function(){if(this.$element=$("<div></div>").addClass(this.options.prefix+"sbar").addClass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),this.$bar=$("<div></div>").addClass(this.options.prefix+"bar").appendTo(this.$element),this.slider.options.loop&&(this.disable=!0,this.$element.remove()),"v"===this.options.dir?this.$bar.width(this.options.width):this.$bar.height(this.options.width),this.$bar.css("background-color",this.options.color),!this.options.insetTo&&this.options.align){this.$element.css("v"===this.options.dir?{right:"auto",left:"auto"}:{top:"auto",bottom:"auto"});var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align())}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,2*this.options.margin+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)}},p.create=function(){if(!this.disable){this.scroller=this.slider.api.scroller,this.slider.api.view.addEventListener(MSViewEvents.SCROLL,this._update,this),this.slider.api.addEventListener(MSSliderEvent.RESIZE,this._resize,this),this._resize(),this.options.autohide&&this.$bar.css("opacity","0")}},p._resize=function(){this.vdimen=this.$element[this.__dimen](),this.bar_dimen=this.slider.api.view["__"+this.__dimen]*this.vdimen/this.scroller._max_value,this.$bar[this.__dimen](this.bar_dimen)},p._update=function(){var value=this.scroller.value*(this.vdimen-this.bar_dimen)/this.scroller._max_value;if(this.lvalue!==value){if(this.lvalue=value,this.options.autohide){clearTimeout(this.hto),this.$bar.css("opacity","1");var that=this;this.hto=setTimeout(function(){that.$bar.css("opacity","0")},150)}return 0>value?void(this.$bar[0].style[this.__dimen]=this.bar_dimen+value+"px"):(value>this.vdimen-this.bar_dimen&&(this.$bar[0].style[this.__dimen]=this.vdimen-value+"px"),window._cssanim?void(this.$bar[0].style[window._jcsspfx+"Transform"]=this.__translate_start+value+"px)"+this.__translate_end):void(this.$bar[0].style[this.__pos]=value+"px"))}},p.destroy=function(){_super.destroy(),this.slider.api.view.removeEventListener(MSViewEvents.SCROLL,this._update,this),this.slider.api.removeEventListener(MSSliderEvent.RESIZE,this._resize,this),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.$element.remove()},window.MSScrollbar=MSScrollbar,MSSlideController.registerControl("scrollbar",MSScrollbar)}(jQuery),function($){"use strict";var MSTimerbar=function(options){BaseControl.call(this),this.options.autohide=!1,this.options.width=4,this.options.color="#FFFFFF",this.options.inset=!0,this.options.margin=0,$.extend(this.options,options)};MSTimerbar.extend(BaseControl);var p=MSTimerbar.prototype,_super=BaseControl.prototype;p.setup=function(){if(_super.setup.call(this),this.$element=$("<div></div>").addClass(this.options.prefix+"timerbar"),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),this.$bar=$("<div></div>").addClass("ms-time-bar").appendTo(this.$element),"v"===this.options.dir?(this.$bar.width(this.options.width),this.$element.width(this.options.width)):(this.$bar.height(this.options.width),this.$element.height(this.options.width)),this.$bar.css("background-color",this.options.color),!this.options.insetTo&&this.options.align){this.$element.css({top:"auto",bottom:"auto"});var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align())}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,2*this.options.margin+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)}},p.create=function(){_super.create.call(this),this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this),this._update()},p._update=function(){this.$bar[0].style.width=this.slider.api._delayProgress+"%"},p.destroy=function(){_super.destroy(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this),this.$element.remove()},window.MSTimerbar=MSTimerbar,MSSlideController.registerControl("timebar",MSTimerbar)}(jQuery),function($){"use strict";var MSCircleTimer=function(options){BaseControl.call(this),this.options.color="#A2A2A2",this.options.stroke=10,this.options.radius=4,this.options.autohide=!1,$.extend(this.options,options)};MSCircleTimer.extend(BaseControl);var p=MSCircleTimer.prototype,_super=BaseControl.prototype;p.setup=function(){return _super.setup.call(this),this.$element=$("<div></div>").addClass(this.options.prefix+"ctimer").appendTo(this.cont),this.$canvas=$("<canvas></canvas>").addClass("ms-ctimer-canvas").appendTo(this.$element),this.$bar=$("<div></div>").addClass("ms-ctimer-bullet").appendTo(this.$element),this.$canvas[0].getContext?(this.ctx=this.$canvas[0].getContext("2d"),this.prog=0,this.__w=2*(this.options.radius+this.options.stroke/2),this.$canvas[0].width=this.__w,this.$canvas[0].height=this.__w,void this.checkHideUnder()):(this.destroy(),void(this.disable=!0))},p.create=function(){if(!this.disable){_super.create.call(this),this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this);var that=this;this.$element.click(function(){that.slider.api.paused?that.slider.api.resume():that.slider.api.pause()}),this._update()}},p._update=function(){var that=this;$(this).stop(!0).animate({prog:.01*this.slider.api._delayProgress},{duration:200,step:function(){that._draw()}})},p._draw=function(){this.ctx.clearRect(0,0,this.__w,this.__w),this.ctx.beginPath(),this.ctx.arc(.5*this.__w,.5*this.__w,this.options.radius,1.5*Math.PI,1.5*Math.PI+2*Math.PI*this.prog,!1),this.ctx.strokeStyle=this.options.color,this.ctx.lineWidth=this.options.stroke,this.ctx.stroke()},p.destroy=function(){_super.destroy(),this.disable||($(this).stop(!0),this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this),this.$element.remove())},window.MSCircleTimer=MSCircleTimer,MSSlideController.registerControl("circletimer",MSCircleTimer)}(jQuery),function($){"use strict";window.MSSlideInfo=function(options){BaseControl.call(this,options),this.options.autohide=!1,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.size=100,this.options.dir="h",$.extend(this.options,options),this.data_list=[]},MSSlideInfo.fadeDuratation=400,MSSlideInfo.extend(BaseControl);var p=MSSlideInfo.prototype,_super=BaseControl.prototype;p.setup=function(){if(this.$element=$("<div></div>").addClass(this.options.prefix+"slide-info").addClass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),!this.options.insetTo&&this.options.align){var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.size):this.$element.css("min-height",this.options.size)}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,this.options.size+2*this.options.margin);this.$element.css(align,-pos-this.options.size-this.options.margin)}},p.slideAction=function(slide){var info_ele=$(slide.$element.find(".ms-info"));info_ele.detach(),this.data_list[slide.index]=info_ele},p.create=function(){_super.create.call(this),this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.cindex=this.slider.api.index(),this.switchEle(this.data_list[this.cindex])},p.update=function(){var nindex=this.slider.api.index();this.switchEle(this.data_list[nindex]),this.cindex=nindex},p.switchEle=function(ele){if(this.current_ele){this.current_ele[0].tween&&this.current_ele[0].tween.stop(!0),this.current_ele[0].tween=CTween.animate(this.current_ele,MSSlideInfo.fadeDuratation,{opacity:0},{complete:function(){this.detach(),this[0].tween=null,ele.css("position","relative")},target:this.current_ele}),ele.css("position","absolute")}this.__show(ele)},p.__show=function(ele){ele.appendTo(this.$element).css("opacity","0"),this.current_ele&&ele.height(Math.max(ele.height(),this.current_ele.height())),clearTimeout(this.tou),this.tou=setTimeout(function(){CTween.fadeIn(ele,MSSlideInfo.fadeDuratation),ele.css("height","")},MSSlideInfo.fadeDuratation),ele[0].tween&&ele[0].tween.stop(!0),this.current_ele=ele},p.destroy=function(){_super.destroy(),clearTimeout(this.tou),this.current_ele&&this.current_ele[0].tween&&this.current_ele[0].tween.stop("true"),this.$element.remove(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)},MSSlideController.registerControl("slideinfo",MSSlideInfo)}(jQuery);
|
12 |
-
//# sourceMappingURL=masterslider.lite.min.js.map
|
3 |
* Copyright © 2015 All Rights Reserved.
|
4 |
*
|
5 |
* @author Averta [www.averta.net]
|
6 |
+
* @version 2.9.4
|
7 |
+
* @date Apr 2015
|
8 |
*/
|
9 |
+
window.averta={},function($){function getVendorPrefix(){if("result"in arguments.callee)return arguments.callee.result;var regex=/^(Moz|Webkit|Khtml|O|ms|Icab)(?=[A-Z])/,someScript=document.getElementsByTagName("script")[0];for(var prop in someScript.style)if(regex.test(prop))return arguments.callee.result=prop.match(regex)[0];return arguments.callee.result="WebkitOpacity"in someScript.style?"Webkit":"KhtmlOpacity"in someScript.style?"Khtml":""}function checkStyleValue(prop){var b=document.body||document.documentElement,s=b.style,p=prop;if("string"==typeof s[p])return!0;v=["Moz","Webkit","Khtml","O","ms"],p=p.charAt(0).toUpperCase()+p.substr(1);for(var i=0;i<v.length;i++)if("string"==typeof s[v[i]+p])return!0;return!1}function supportsTransitions(){return checkStyleValue("transition")}function supportsTransforms(){return checkStyleValue("transform")}function supports3DTransforms(){if(!supportsTransforms())return!1;var has3d,el=document.createElement("i"),transforms={WebkitTransform:"-webkit-transform",OTransform:"-o-transform",MSTransform:"-ms-transform",msTransform:"-ms-transform",MozTransform:"-moz-transform",Transform:"transform",transform:"transform"};el.style.display="block",document.body.insertBefore(el,null);for(var t in transforms)void 0!==el.style[t]&&(el.style[t]="translate3d(1px,1px,1px)",has3d=window.getComputedStyle(el).getPropertyValue(transforms[t]));return document.body.removeChild(el),null!=has3d&&has3d.length>0&&"none"!==has3d}window["package"]=function(name){window[name]||(window[name]={})};var extend=function(target,object){for(var key in object)target[key]=object[key]};Function.prototype.extend=function(superclass){"function"==typeof superclass.prototype.constructor?(extend(this.prototype,superclass.prototype),this.prototype.constructor=this):(this.prototype.extend(superclass),this.prototype.constructor=this)};var trans={Moz:"-moz-",Webkit:"-webkit-",Khtml:"-khtml-",O:"-o-",ms:"-ms-",Icab:"-icab-"};window._mobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),window._touch="ontouchstart"in document,$(document).ready(function(){window._jcsspfx=getVendorPrefix(),window._csspfx=trans[window._jcsspfx],window._cssanim=supportsTransitions(),window._css3d=supports3DTransforms(),window._css2d=supportsTransforms()}),window.parseQueryString=function(url){var queryString={};return url.replace(new RegExp("([^?=&]+)(=([^&]*))?","g"),function($0,$1,$2,$3){queryString[$1]=$3}),queryString};var fps60=50/3;if(window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,fps60)}}()),window.getComputedStyle||(window.getComputedStyle=function(el){return this.el=el,this.getPropertyValue=function(prop){var re=/(\-([a-z]){1})/g;return"float"==prop&&(prop="styleFloat"),re.test(prop)&&(prop=prop.replace(re,function(){return arguments[2].toUpperCase()})),el.currentStyle[prop]?el.currentStyle[prop]:null},el.currentStyle}),Array.prototype.indexOf||(Array.prototype.indexOf=function(elt){var len=this.length>>>0,from=Number(arguments[1])||0;for(from=0>from?Math.ceil(from):Math.floor(from),0>from&&(from+=len);len>from;from++)if(from in this&&this[from]===elt)return from;return-1}),window.isMSIE=function(version){if(!$.browser.msie)return!1;if(!version)return!0;var ieVer=$.browser.version.slice(0,$.browser.version.indexOf("."));return"string"==typeof version?eval(-1!==version.indexOf("<")||-1!==version.indexOf(">")?ieVer+version:version+"=="+ieVer):version==ieVer},$.removeDataAttrs=function($target,exclude){var i,attrName,dataAttrsToDelete=[],dataAttrs=$target[0].attributes,dataAttrsLen=dataAttrs.length;for(exclude=exclude||[],i=0;dataAttrsLen>i;i++)attrName=dataAttrs[i].name,"data-"===attrName.substring(0,5)&&-1===exclude.indexOf(attrName)&&dataAttrsToDelete.push(dataAttrs[i].name);$.each(dataAttrsToDelete,function(index,attrName){$target.removeAttr(attrName)})},jQuery){$.jqLoadFix=function(){if(this.complete){var that=this;setTimeout(function(){$(that).load()},1)}},jQuery.uaMatch=jQuery.uaMatch||function(ua){ua=ua.toLowerCase();var match=/(chrome)[ \/]([\w.]+)/.exec(ua)||/(webkit)[ \/]([\w.]+)/.exec(ua)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua)||/(msie) ([\w.]+)/.exec(ua)||ua.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua)||[];return{browser:match[1]||"",version:match[2]||"0"}},matched=jQuery.uaMatch(navigator.userAgent),browser={},matched.browser&&(browser[matched.browser]=!0,browser.version=matched.version),browser.chrome?browser.webkit=!0:browser.webkit&&(browser.safari=!0);var isIE11=!!navigator.userAgent.match(/Trident\/7\./);isIE11&&(browser.msie="true",delete browser.mozilla),jQuery.browser=browser,$.fn.preloadImg=function(src,_event){return this.each(function(){var $this=$(this),self=this,img=new Image;img.onload=function(event){null==event&&(event={}),$this.attr("src",src),event.width=img.width,event.height=img.height,$this.data("width",img.width),$this.data("height",img.height),setTimeout(function(){_event.call(self,event)},50),img=null},img.src=src}),this}}}(jQuery),function(){"use strict";averta.EventDispatcher=function(){this.listeners={}},averta.EventDispatcher.extend=function(_proto){var instance=new averta.EventDispatcher;for(var key in instance)"constructor"!=key&&(_proto[key]=averta.EventDispatcher.prototype[key])},averta.EventDispatcher.prototype={constructor:averta.EventDispatcher,addEventListener:function(event,listener,ref){this.listeners[event]||(this.listeners[event]=[]),this.listeners[event].push({listener:listener,ref:ref})},removeEventListener:function(event,listener,ref){if(this.listeners[event]){for(var i=0;i<this.listeners[event].length;++i)listener===this.listeners[event][i].listener&&ref===this.listeners[event][i].ref&&this.listeners[event].splice(i--,1);0===this.listeners[event].length&&(this.listeners[event]=null)}},dispatchEvent:function(event){if(event.target=this,this.listeners[event.type])for(var i=0,l=this.listeners[event.type].length;l>i;++i)this.listeners[event.type][i].listener.call(this.listeners[event.type][i].ref,event)}}}(),function($){"use strict";var isTouch="ontouchstart"in document,isPointer=window.navigator.pointerEnabled,isMSPoiner=!isPointer&&window.navigator.msPointerEnabled,usePointer=isPointer||isMSPoiner,ev_start=(isPointer?"pointerdown ":"")+(isMSPoiner?"MSPointerDown ":"")+(isTouch?"touchstart ":"")+"mousedown",ev_move=(isPointer?"pointermove ":"")+(isMSPoiner?"MSPointerMove ":"")+(isTouch?"touchmove ":"")+"mousemove",ev_end=(isPointer?"pointerup ":"")+(isMSPoiner?"MSPointerUp ":"")+(isTouch?"touchend ":"")+"mouseup",ev_cancel=(isPointer?"pointercancel ":"")+(isMSPoiner?"MSPointerCancel ":"")+"touchcancel";averta.TouchSwipe=function($element){this.$element=$element,this.enabled=!0,$element.bind(ev_start,{target:this},this.__touchStart),$element[0].swipe=this,this.onSwipe=null,this.swipeType="horizontal",this.noSwipeSelector="input, textarea, button, .no-swipe, .ms-no-swipe",this.lastStatus={}};var p=averta.TouchSwipe.prototype;p.getDirection=function(new_x,new_y){switch(this.swipeType){case"horizontal":return new_x<=this.start_x?"left":"right";case"vertical":return new_y<=this.start_y?"up":"down";case"all":return Math.abs(new_x-this.start_x)>Math.abs(new_y-this.start_y)?new_x<=this.start_x?"left":"right":new_y<=this.start_y?"up":"down"}},p.priventDefultEvent=function(new_x,new_y){var dx=Math.abs(new_x-this.start_x),dy=Math.abs(new_y-this.start_y),horiz=dx>dy;return"horizontal"===this.swipeType&&horiz||"vertical"===this.swipeType&&!horiz},p.createStatusObject=function(evt){var temp_x,temp_y,status_data={};return temp_x=this.lastStatus.distanceX||0,temp_y=this.lastStatus.distanceY||0,status_data.distanceX=evt.pageX-this.start_x,status_data.distanceY=evt.pageY-this.start_y,status_data.moveX=status_data.distanceX-temp_x,status_data.moveY=status_data.distanceY-temp_y,status_data.distance=parseInt(Math.sqrt(Math.pow(status_data.distanceX,2)+Math.pow(status_data.distanceY,2))),status_data.duration=(new Date).getTime()-this.start_time,status_data.direction=this.getDirection(evt.pageX,evt.pageY),status_data},p.__reset=function(event,jqevt){this.reset=!1,this.lastStatus={},this.start_time=(new Date).getTime(),this.start_x=isTouch?event.touches[0].pageX:usePointer?event.pageX:jqevt.pageX,this.start_y=isTouch?event.touches[0].pageY:usePointer?event.pageY:jqevt.pageY},p.__touchStart=function(event){var swipe=event.data.target,jqevt=event;if(swipe.enabled&&!($(event.target).closest(swipe.noSwipeSelector,swipe.$element).length>0)){if(event=event.originalEvent,usePointer&&$(this).css("-ms-touch-action","horizontal"===swipe.swipeType?"pan-y":"pan-x"),!swipe.onSwipe)return void $.error("Swipe listener is undefined");if(!swipe.touchStarted){swipe.start_x=isTouch?event.touches[0].pageX:usePointer?event.pageX:jqevt.pageX,swipe.start_y=isTouch?event.touches[0].pageY:usePointer?event.pageY:jqevt.pageY,swipe.start_time=(new Date).getTime(),$(document).bind(ev_end,{target:swipe},swipe.__touchEnd).bind(ev_move,{target:swipe},swipe.__touchMove).bind(ev_cancel,{target:swipe},swipe.__touchCancel);var evt=isTouch?event.touches[0]:usePointer?event:jqevt,status=swipe.createStatusObject(evt);status.phase="start",swipe.onSwipe.call(null,status),isTouch||jqevt.preventDefault(),swipe.lastStatus=status,swipe.touchStarted=!0}}},p.__touchMove=function(event){var swipe=event.data.target,jqevt=event;if(event=event.originalEvent,swipe.touchStarted){clearTimeout(swipe.timo),swipe.timo=setTimeout(function(){swipe.__reset(event,jqevt)},60);var evt=isTouch?event.touches[0]:usePointer?event:jqevt,status=swipe.createStatusObject(evt);swipe.priventDefultEvent(evt.pageX,evt.pageY)&&jqevt.preventDefault(),status.phase="move",swipe.lastStatus=status,swipe.onSwipe.call(null,status)}},p.__touchEnd=function(event){var swipe=event.data.target,jqevt=event;event=event.originalEvent,clearTimeout(swipe.timo);var status=(isTouch?event.touches[0]:usePointer?event:jqevt,swipe.lastStatus);isTouch||jqevt.preventDefault(),status.phase="end",swipe.touchStarted=!1,swipe.priventEvt=null,$(document).unbind(ev_end,swipe.__touchEnd).unbind(ev_move,swipe.__touchMove).unbind(ev_cancel,swipe.__touchCancel),status.speed=status.distance/status.duration,swipe.onSwipe.call(null,status)},p.__touchCancel=function(event){var swipe=event.data.target;swipe.__touchEnd(event)},p.enable=function(){this.enabled||(this.enabled=!0)},p.disable=function(){this.enabled&&(this.enabled=!1)}}(jQuery),function(){"use strict";averta.Ticker=function(){};var st=averta.Ticker,list=[],len=0,__stopped=!0;st.add=function(listener,ref){return list.push([listener,ref]),1===list.length&&st.start(),len=list.length},st.remove=function(listener,ref){for(var i=0,l=list.length;l>i;++i)list[i]&&list[i][0]===listener&&list[i][1]===ref&&list.splice(i,1);len=list.length,0===len&&st.stop()},st.start=function(){__stopped&&(__stopped=!1,__tick())},st.stop=function(){__stopped=!0};var __tick=function(){if(!st.__stopped){for(var item,i=0;i!==len;i++)item=list[i],item[0].call(item[1]);requestAnimationFrame(__tick)}}}(),function(){"use strict";Date.now||(Date.now=function(){return(new Date).getTime()}),averta.Timer=function(delay,autoStart){this.delay=delay,this.currentCount=0,this.paused=!1,this.onTimer=null,this.refrence=null,autoStart&&this.start()},averta.Timer.prototype={constructor:averta.Timer,start:function(){this.paused=!1,this.lastTime=Date.now(),averta.Ticker.add(this.update,this)},stop:function(){this.paused=!0,averta.Ticker.remove(this.update,this)},reset:function(){this.currentCount=0,this.paused=!0,this.lastTime=Date.now()},update:function(){this.paused||Date.now()-this.lastTime<this.delay||(this.currentCount++,this.lastTime=Date.now(),this.onTimer&&this.onTimer.call(this.refrence,this.getTime()))},getTime:function(){return this.delay*this.currentCount}}}(),function(){"use strict";window.CSSTween=function(element,duration,delay,ease){this.$element=element,this.duration=duration||1e3,this.delay=delay||0,this.ease=ease||"linear"};var p=CSSTween.prototype;p.to=function(callback,target){return this.to_cb=callback,this.to_cb_target=target,this},p.from=function(callback,target){return this.fr_cb=callback,this.fr_cb_target=target,this},p.onComplete=function(callback,target){return this.oc_fb=callback,this.oc_fb_target=target,this},p.chain=function(csstween){return this.chained_tween=csstween,this},p.reset=function(){clearTimeout(this.start_to),clearTimeout(this.end_to)},p.start=function(){var element=this.$element[0];clearTimeout(this.start_to),clearTimeout(this.end_to),this.fresh=!0,this.fr_cb&&(element.style[window._jcsspfx+"TransitionDuration"]="0ms",this.fr_cb.call(this.fr_cb_target));var that=this;return this.onTransComplete=function(){that.fresh&&(that.reset(),element.style[window._jcsspfx+"TransitionDuration"]="",element.style[window._jcsspfx+"TransitionProperty"]="",element.style[window._jcsspfx+"TransitionTimingFunction"]="",element.style[window._jcsspfx+"TransitionDelay"]="",that.fresh=!1,that.chained_tween&&that.chained_tween.start(),that.oc_fb&&that.oc_fb.call(that.oc_fb_target))},this.start_to=setTimeout(function(){that.$element&&(element.style[window._jcsspfx+"TransitionDuration"]=that.duration+"ms",element.style[window._jcsspfx+"TransitionProperty"]=that.transProperty||"all",element.style[window._jcsspfx+"TransitionDelay"]=that.delay>0?that.delay+"ms":"",element.style[window._jcsspfx+"TransitionTimingFunction"]=that.ease,that.to_cb&&that.to_cb.call(that.to_cb_target),that.end_to=setTimeout(function(){that.onTransComplete()},that.duration+(that.delay||0)))},100),this}}(),function(){"use strict";function transPos(element,properties){if(void 0!==properties.x||void 0!==properties.y)if(_cssanim){var trans=window._jcsspfx+"Transform";void 0!==properties.x&&(properties[trans]=(properties[trans]||"")+" translateX("+properties.x+"px)",delete properties.x),void 0!==properties.y&&(properties[trans]=(properties[trans]||"")+" translateY("+properties.y+"px)",delete properties.y)}else{if(void 0!==properties.x){var posx="auto"!==element.css("right")?"right":"left";properties[posx]=properties.x+"px",delete properties.x}if(void 0!==properties.y){var posy="auto"!==element.css("bottom")?"bottom":"top";properties[posy]=properties.y+"px",delete properties.y}}return properties}var _cssanim=null;window.CTween={},CTween.setPos=function(element,pos){element.css(transPos(element,pos))},CTween.animate=function(element,duration,properties,options){if(null==_cssanim&&(_cssanim=window._cssanim),options=options||{},transPos(element,properties),_cssanim){var tween=new CSSTween(element,duration,options.delay,EaseDic[options.ease]);return options.transProperty&&(tween.transProperty=options.transProperty),tween.to(function(){element.css(properties)}),options.complete&&tween.onComplete(options.complete,options.target),tween.start(),tween.stop=tween.reset,tween}var onCl;return options.delay&&element.delay(options.delay),options.complete&&(onCl=function(){options.complete.call(options.target)}),element.stop(!0).animate(properties,duration,options.ease||"linear",onCl),element},CTween.fadeOut=function(target,duration,remove){var options={};remove===!0?options.complete=function(){target.remove()}:2===remove&&(options.complete=function(){target.css("display","none")}),CTween.animate(target,duration||1e3,{opacity:0},options)},CTween.fadeIn=function(target,duration,reset){reset!==!1&&target.css("opacity",0).css("display",""),CTween.animate(target,duration||1e3,{opacity:1})}}(),function(){window.EaseDic={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",easeInCubic:"cubic-bezier(.55,.055,.675,.19)",easeOutCubic:"cubic-bezier(.215,.61,.355,1)",easeInOutCubic:"cubic-bezier(.645,.045,.355,1)",easeInCirc:"cubic-bezier(.6,.04,.98,.335)",easeOutCirc:"cubic-bezier(.075,.82,.165,1)",easeInOutCirc:"cubic-bezier(.785,.135,.15,.86)",easeInExpo:"cubic-bezier(.95,.05,.795,.035)",easeOutExpo:"cubic-bezier(.19,1,.22,1)",easeInOutExpo:"cubic-bezier(1,0,0,1)",easeInQuad:"cubic-bezier(.55,.085,.68,.53)",easeOutQuad:"cubic-bezier(.25,.46,.45,.94)",easeInOutQuad:"cubic-bezier(.455,.03,.515,.955)",easeInQuart:"cubic-bezier(.895,.03,.685,.22)",easeOutQuart:"cubic-bezier(.165,.84,.44,1)",easeInOutQuart:"cubic-bezier(.77,0,.175,1)",easeInQuint:"cubic-bezier(.755,.05,.855,.06)",easeOutQuint:"cubic-bezier(.23,1,.32,1)",easeInOutQuint:"cubic-bezier(.86,0,.07,1)",easeInSine:"cubic-bezier(.47,0,.745,.715)",easeOutSine:"cubic-bezier(.39,.575,.565,1)",easeInOutSine:"cubic-bezier(.445,.05,.55,.95)",easeInBack:"cubic-bezier(.6,-.28,.735,.045)",easeOutBack:"cubic-bezier(.175, .885,.32,1.275)",easeInOutBack:"cubic-bezier(.68,-.55,.265,1.55)"}}(),function(){"use strict";window.MSAligner=function(type,$container,$img){this.$container=$container,this.$img=$img,this.type=type||"stretch",this.widthOnly=!1,this.heightOnly=!1};var p=MSAligner.prototype;p.init=function(w,h){switch(this.baseWidth=w,this.baseHeight=h,this.imgRatio=w/h,this.imgRatio2=h/w,this.type){case"tile":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$img.remove();break;case"center":this.$container.css("background-image","url("+this.$img.attr("src")+")"),this.$container.css({backgroundPosition:"center center",backgroundRepeat:"no-repeat"}),this.$img.remove();break;case"stretch":this.$img.css({width:"100%",height:"100%"});break;case"fill":case"fit":this.needAlign=!0,this.align()}},p.align=function(){if(this.needAlign){var cont_w=this.$container.width(),cont_h=this.$container.height(),contRatio=cont_w/cont_h;"fill"==this.type?this.imgRatio<contRatio?(this.$img.width(cont_w),this.$img.height(cont_w*this.imgRatio2)):(this.$img.height(cont_h),this.$img.width(cont_h*this.imgRatio)):"fit"==this.type&&(this.imgRatio<contRatio?(this.$img.height(cont_h),this.$img.width(cont_h*this.imgRatio)):(this.$img.width(cont_w),this.$img.height(cont_w*this.imgRatio2))),this.setMargin()}},p.setMargin=function(){var cont_w=this.$container.width(),cont_h=this.$container.height();this.$img.css("margin-top",(cont_h-this.$img[0].offsetHeight)/2+"px"),this.$img.css("margin-left",(cont_w-this.$img[0].offsetWidth)/2+"px")}}(),function(){"use strict";var _options={bouncing:!0,snapping:!1,snapsize:null,friction:.05,outFriction:.05,outAcceleration:.09,minValidDist:.3,snappingMinSpeed:2,paging:!1,endless:!1,maxSpeed:160},Controller=function(min,max,options){if(null===max||null===min)throw new Error("Max and Min values are required.");this.options=options||{};for(var key in _options)key in this.options||(this.options[key]=_options[key]);this._max_value=max,this._min_value=min,this.value=min,this.end_loc=min,this.current_snap=this.getSnapNum(min),this.__extrStep=0,this.__extraMove=0,this.__animID=-1},p=Controller.prototype;p.changeTo=function(value,animate,speed,snap_num,dispatch){if(this.stopped=!1,this._internalStop(),value=this._checkLimits(value),speed=Math.abs(speed||0),this.options.snapping&&(snap_num=snap_num||this.getSnapNum(value),dispatch!==!1&&this._callsnapChange(snap_num),this.current_snap=snap_num),animate){this.animating=!0;var self=this,active_id=++self.__animID,amplitude=value-self.value,timeStep=0,targetPosition=value,animFrict=1-self.options.friction,timeconst=animFrict+(speed-20)*animFrict*1.3/self.options.maxSpeed,tick=function(){if(active_id===self.__animID){var dis=value-self.value;if(!(Math.abs(dis)>self.options.minValidDist&&self.animating))return self.animating&&(self.value=value,self._callrenderer()),self.animating=!1,active_id!==self.__animID&&(self.__animID=-1),void self._callonComplete("anim");window.requestAnimationFrame(tick),self.value=targetPosition-amplitude*Math.exp(-++timeStep*timeconst),self._callrenderer()}};return void tick()}this.value=value,this._callrenderer()},p.drag=function(move){this.start_drag&&(this.drag_start_loc=this.value,this.start_drag=!1),this.animating=!1,this._deceleration=!1,this.value-=move,!this.options.endless&&(this.value>this._max_value||this.value<0)?this.options.bouncing?(this.__isout=!0,this.value+=.6*move):this.value=this.value>this._max_value?this._max_value:0:!this.options.endless&&this.options.bouncing&&(this.__isout=!1),this._callrenderer()},p.push=function(speed){if(this.stopped=!1,this.options.snapping&&Math.abs(speed)<=this.options.snappingMinSpeed)return void this.cancel();if(this.__speed=speed,this.__startSpeed=speed,this.end_loc=this._calculateEnd(),this.options.snapping){var snap_loc=this.getSnapNum(this.value),end_snap=this.getSnapNum(this.end_loc);if(this.options.paging)return snap_loc=this.getSnapNum(this.drag_start_loc),this.__isout=!1,void(speed>0?this.gotoSnap(snap_loc+1,!0,speed):this.gotoSnap(snap_loc-1,!0,speed));if(snap_loc===end_snap)return void this.cancel();this._callsnapChange(end_snap),this.current_snap=end_snap}this.animating=!1,this.__needsSnap=this.options.endless||this.end_loc>this._min_value&&this.end_loc<this._max_value,this.options.snapping&&this.__needsSnap&&(this.__extraMove=this._calculateExtraMove(this.end_loc)),this._startDecelaration()},p.bounce=function(speed){this.animating||(this.stopped=!1,this.animating=!1,this.__speed=speed,this.__startSpeed=speed,this.end_loc=this._calculateEnd(),this._startDecelaration())},p.stop=function(){this.stopped=!0,this._internalStop()},p.cancel=function(){this.start_drag=!0,this.__isout?(this.__speed=4e-4,this._startDecelaration()):this.options.snapping&&this.gotoSnap(this.getSnapNum(this.value),!0)},p.renderCallback=function(listener,ref){this.__renderHook={fun:listener,ref:ref}},p.snappingCallback=function(listener,ref){this.__snapHook={fun:listener,ref:ref}},p.snapCompleteCallback=function(listener,ref){this.__compHook={fun:listener,ref:ref}},p.getSnapNum=function(value){return Math.floor((value+this.options.snapsize/2)/this.options.snapsize)},p.nextSnap=function(){this._internalStop();var curr_snap=this.getSnapNum(this.value);!this.options.endless&&(curr_snap+1)*this.options.snapsize>this._max_value?(this.__speed=8,this.__needsSnap=!1,this._startDecelaration()):this.gotoSnap(curr_snap+1,!0)},p.prevSnap=function(){this._internalStop();var curr_snap=this.getSnapNum(this.value);!this.options.endless&&(curr_snap-1)*this.options.snapsize<this._min_value?(this.__speed=-8,this.__needsSnap=!1,this._startDecelaration()):this.gotoSnap(curr_snap-1,!0)},p.gotoSnap=function(snap_num,animate,speed){this.changeTo(snap_num*this.options.snapsize,animate,speed,snap_num)},p.destroy=function(){this._internalStop(),this.__renderHook=null,this.__snapHook=null,this.__compHook=null},p._internalStop=function(){this.start_drag=!0,this.animating=!1,this._deceleration=!1,this.__extrStep=0},p._calculateExtraMove=function(value){var m=value%this.options.snapsize;return m<this.options.snapsize/2?-m:this.options.snapsize-m},p._calculateEnd=function(step){for(var temp_speed=this.__speed,temp_value=this.value,i=0;Math.abs(temp_speed)>this.options.minValidDist;)temp_value+=temp_speed,temp_speed*=this.options.friction,i++;return step?i:temp_value},p._checkLimits=function(value){return this.options.endless?value:value<this._min_value?this._min_value:value>this._max_value?this._max_value:value},p._callrenderer=function(){this.__renderHook&&this.__renderHook.fun.call(this.__renderHook.ref,this,this.value)},p._callsnapChange=function(targetSnap){this.__snapHook&&targetSnap!==this.current_snap&&this.__snapHook.fun.call(this.__snapHook.ref,this,targetSnap,targetSnap-this.current_snap)},p._callonComplete=function(type){this.__compHook&&!this.stopped&&this.__compHook.fun.call(this.__compHook.ref,this,this.current_snap,type)},p._computeDeceleration=function(){if(this.options.snapping&&this.__needsSnap){var xtr_move=(this.__startSpeed-this.__speed)/this.__startSpeed*this.__extraMove;this.value+=this.__speed+xtr_move-this.__extrStep,this.__extrStep=xtr_move}else this.value+=this.__speed;if(this.__speed*=this.options.friction,this.options.endless||this.options.bouncing||(this.value<=this._min_value?(this.value=this._min_value,this.__speed=0):this.value>=this._max_value&&(this.value=this._max_value,this.__speed=0)),this._callrenderer(),!this.options.endless&&this.options.bouncing){var out_value=0;this.value<this._min_value?out_value=this._min_value-this.value:this.value>this._max_value&&(out_value=this._max_value-this.value),this.__isout=Math.abs(out_value)>=this.options.minValidDist,this.__isout&&(this.__speed*out_value<=0?this.__speed+=out_value*this.options.outFriction:this.__speed=out_value*this.options.outAcceleration)}},p._startDecelaration=function(){if(!this._deceleration){this._deceleration=!0;var self=this,tick=function(){self._deceleration&&(self._computeDeceleration(),Math.abs(self.__speed)>self.options.minValidDist||self.__isout?window.requestAnimationFrame(tick):(self._deceleration=!1,self.__isout=!1,self.value=self.__needsSnap&&self.options.snapping&&!self.options.paging?self._checkLimits(self.end_loc+self.__extraMove):Math.round(self.value),self._callrenderer(),self._callonComplete("decel")))};tick()}},window.Controller=Controller}(),window.MSSliderEvent=function(type){this.type=type},MSSliderEvent.CHANGE_START="ms_changestart",MSSliderEvent.CHANGE_END="ms_changeend",MSSliderEvent.WAITING="ms_waiting",MSSliderEvent.AUTOPLAY_CHANGE="ms_autoplaychange",MSSliderEvent.VIDEO_PLAY="ms_videoPlay",MSSliderEvent.VIDEO_CLOSE="ms_videoclose",MSSliderEvent.INIT="ms_init",MSSliderEvent.HARD_UPDATE="ms_hard_update",MSSliderEvent.RESIZE="ms_resize",MSSliderEvent.RESERVED_SPACE_CHANGE="ms_rsc",MSSliderEvent.DESTROY="ms_destroy",function(window,document,$){"use strict";window.MSSlide=function(){this.$element=null,this.$loading=$("<div></div>").addClass("ms-slide-loading"),this.view=null,this.index=-1,this.__width=0,this.__height=0,this.fillMode="fill",this.selected=!1,this.pselected=!1,this.autoAppend=!0,this.isSleeping=!0,this.moz=$.browser.mozilla};var p=MSSlide.prototype;p.onSwipeStart=function(){this.link&&(this.linkdis=!0),this.video&&(this.videodis=!0)},p.onSwipeMove=function(e){var move=Math.max(Math.abs(e.data.distanceX),Math.abs(e.data.distanceY));this.swipeMoved=move>4},p.onSwipeCancel=function(){return this.swipeMoved?void(this.swipeMoved=!1):(this.link&&(this.linkdis=!1),void(this.video&&(this.videodis=!1)))},p.assetsLoaded=function(){this.ready=!0,this.slider.api._startTimer(),this.isSleeping||this.setupBG(),CTween.fadeOut(this.$loading,300,!0),(0===this.slider.options.preload||"all"===this.slider.options.preload)&&this.index<this.view.slideList.length-1?this.view.slideList[this.index+1].loadImages():"all"===this.slider.options.preload&&this.index===this.view.slideList.length-1&&this.slider._removeLoading()},p.setBG=function(img){this.hasBG=!0;var that=this;this.$imgcont=$("<div></div>").addClass("ms-slide-bgcont"),this.$element.append(this.$loading).append(this.$imgcont),this.$bg_img=$(img).css("visibility","hidden"),this.$imgcont.append(this.$bg_img),this.bgAligner=new MSAligner(that.fillMode,that.$imgcont,that.$bg_img),this.bgAligner.widthOnly=this.slider.options.autoHeight,that.slider.options.autoHeight&&(that.pselected||that.selected)&&that.slider.setHeight(that.slider.options.height),void 0!==this.$bg_img.data("src")?(this.bg_src=this.$bg_img.data("src"),this.$bg_img.removeAttr("data-src")):this.$bg_img.one("load",function(event){that._onBGLoad(event)}).each($.jqLoadFix)},p.setupBG=function(){!this.initBG&&this.bgLoaded&&(this.initBG=!0,this.$bg_img.css("visibility",""),this.bgWidth=this.bgNatrualWidth||this.$bg_img.width(),this.bgHeight=this.bgNatrualHeight||this.$bg_img.height(),CTween.fadeIn(this.$imgcont,300),this.slider.options.autoHeight&&this.$imgcont.height(this.bgHeight*this.ratio),this.bgAligner.init(this.bgWidth,this.bgHeight),this.setSize(this.__width,this.__height),this.slider.options.autoHeight&&(this.pselected||this.selected)&&this.slider.setHeight(this.getHeight()))},p.loadImages=function(){if(!this.ls){if(this.ls=!0,this.hasBG&&this.bg_src){var that=this;this.$bg_img.preloadImg(this.bg_src,function(event){that._onBGLoad(event)})}this.hasBG||this.hasLayers||this.assetsLoaded()}},p._onBGLoad=function(event){this.bgNatrualWidth=event.width,this.bgNatrualHeight=event.height,this.bgLoaded=!0,$.browser.msie&&this.$bg_img.on("dragstart",function(event){event.preventDefault()}),(!this.hasLayers||this.layerController.ready)&&this.assetsLoaded()},p.setSize=function(width,height){this.__width=width,this.slider.options.autoHeight&&(this.bgLoaded?(this.ratio=this.__width/this.bgWidth,height=Math.floor(this.ratio*this.bgHeight),this.$imgcont.height(height)):(this.ratio=width/this.slider.options.width,height=this.slider.options.height*this.ratio)),this.__height=height,this.$element.width(width).height(height),this.hasBG&&this.bgLoaded&&this.bgAligner.align()},p.getHeight=function(){return this.hasBG&&this.bgLoaded?this.bgHeight*this.ratio:Math.max(this.$element[0].clientHeight,this.slider.options.height*this.ratio)},p.__playVideo=function(){this.vplayed||this.videodis||(this.vplayed=!0,this.slider.api.paused||(this.slider.api.pause(),this.roc=!0),this.vcbtn.css("display",""),CTween.fadeOut(this.vpbtn,500,!1),CTween.fadeIn(this.vcbtn,500),CTween.fadeIn(this.vframe,500),this.vframe.css("display","block").attr("src",this.video+"&autoplay=1"),this.view.$element.addClass("ms-def-cursor"),this.view.swipeControl&&this.view.swipeControl.disable(),this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_PLAY)))},p.__closeVideo=function(){if(this.vplayed){this.vplayed=!1,this.roc&&this.slider.api.resume();var that=this;CTween.fadeIn(this.vpbtn,500),CTween.animate(this.vcbtn,500,{opacity:0},{complete:function(){that.vcbtn.css("display","none")}}),CTween.animate(this.vframe,500,{opacity:0},{complete:function(){that.vframe.attr("src","about:blank").css("display","none")}}),this.view.swipeControl&&this.view.swipeControl.enable(),this.view.$element.removeClass("ms-def-cursor"),this.slider.slideController.dispatchEvent(new MSSliderEvent(MSSliderEvent.VIDEO_CLOSE))}},p.create=function(){var that=this;this.link&&this.link.addClass("ms-slide-link").html("").click(function(e){that.linkdis&&e.preventDefault()}),this.video&&(-1===this.video.indexOf("?")&&(this.video+="?"),this.vframe=$("<iframe></iframe>").addClass("ms-slide-video").css({width:"100%",height:"100%",display:"none"}).attr("src","about:blank").attr("allowfullscreen","true").appendTo(this.$element),this.vpbtn=$("<div></div>").addClass("ms-slide-vpbtn").click(function(){that.__playVideo()}).appendTo(this.$element),this.vcbtn=$("<div></div>").addClass("ms-slide-vcbtn").click(function(){that.__closeVideo()}).appendTo(this.$element).css("display","none"),window._touch&&this.vcbtn.removeClass("ms-slide-vcbtn").addClass("ms-slide-vcbtn-mobile").append('<div class="ms-vcbtn-txt">Close video</div>').appendTo(this.view.$element.parent())),!this.slider.options.autoHeight&&this.hasBG&&(this.$imgcont.css("height","100%"),("center"===this.fillMode||"stretch"===this.fillMode)&&(this.fillMode="fill")),this.slider.options.autoHeight&&this.$element.addClass("ms-slide-auto-height"),this.sleep(!0)},p.destroy=function(){this.$element.remove(),this.$element=null},p.prepareToSelect=function(){this.pselected||this.selected||(this.pselected=!0,(this.link||this.video)&&(this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.view.addEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this),this.view.addEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this),this.linkdis=!1,this.swipeMoved=!1),this.loadImages(),this.moz&&this.$element.css("margin-top",""))},p.select=function(){this.selected||(this.selected=!0,this.pselected=!1,this.$element.addClass("ms-sl-selected"),this.videoAutoPlay&&(this.videodis=!1,this.vpbtn.trigger("click")))},p.unselect=function(){this.pselected=!1,this.moz&&this.$element.css("margin-top","0.1px"),(this.link||this.video)&&(this.view.removeEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.view.removeEventListener(MSViewEvents.SWIPE_MOVE,this.onSwipeMove,this),this.view.removeEventListener(MSViewEvents.SWIPE_CANCEL,this.onSwipeCancel,this)),this.selected&&(this.selected=!1,this.$element.removeClass("ms-sl-selected"),this.video&&this.vplayed&&(this.__closeVideo(),this.roc=!1))
|
10 |
+
},p.sleep=function(force){(!this.isSleeping||force)&&(this.isSleeping=!0,this.autoAppend&&this.$element.detach(),this.hasLayers&&this.layerController.onSlideSleep())},p.wakeup=function(){this.isSleeping&&(this.isSleeping=!1,this.autoAppend&&this.view.$slideCont.append(this.$element),this.moz&&this.$element.css("margin-top","0.1px"),this.setupBG(),this.hasBG&&this.bgAligner.align(),this.hasLayers&&this.layerController.onSlideWakeup())}}(window,document,jQuery),function($){"use strict";var SliderViewList={};window.MSSlideController=function(slider){this._delayProgress=0,this._timer=new averta.Timer(100),this._timer.onTimer=this.onTimer,this._timer.refrence=this,this.currentSlide=null,this.slider=slider,this.so=slider.options,averta.EventDispatcher.call(this)},MSSlideController.registerView=function(name,_class){if(name in SliderViewList)throw new Error(name+", is already registered.");SliderViewList[name]=_class},MSSlideController.SliderControlList={},MSSlideController.registerControl=function(name,_class){if(name in MSSlideController.SliderControlList)throw new Error(name+", is already registered.");MSSlideController.SliderControlList[name]=_class};var p=MSSlideController.prototype;p.setupView=function(){var that=this;this.resize_listener=function(){that.__resize()};var viewOptions={spacing:this.so.space,mouseSwipe:this.so.mouse,loop:this.so.loop,autoHeight:this.so.autoHeight,swipe:this.so.swipe,speed:this.so.speed,dir:this.so.dir,viewNum:this.so.inView,critMargin:this.so.critMargin};this.so.viewOptions&&$.extend(viewOptions,this.so.viewOptions),this.so.autoHeight&&(this.so.heightLimit=!1);var viewClass=SliderViewList[this.slider.options.view]||MSBasicView;if(!viewClass._3dreq||window._css3d&&!$.browser.msie||(viewClass=viewClass._fallback||MSBasicView),this.view=new viewClass(viewOptions),this.so.overPause){var that=this;this.slider.$element.mouseenter(function(){that.is_over=!0,that._stopTimer()}).mouseleave(function(){that.is_over=!1,that._startTimer()})}},p.onChangeStart=function(){this.change_started=!0,this.currentSlide&&this.currentSlide.unselect(),this.currentSlide=this.view.currentSlide,this.currentSlide.prepareToSelect(),this.so.endPause&&this.currentSlide.index===this.slider.slides.length-1&&(this.pause(),this.skipTimer()),this.so.autoHeight&&this.slider.setHeight(this.currentSlide.getHeight()),this.so.deepLink&&this.__updateWindowHash(),this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_START))},p.onChangeEnd=function(){if(this.change_started=!1,this._startTimer(),this.currentSlide.select(),this.so.preload>1){var loc,i,slide,l=this.so.preload-1;for(i=1;l>=i;++i){if(loc=this.view.index+i,loc>=this.view.slideList.length){if(!this.so.loop){i=l;continue}loc-=this.view.slideList.length}slide=this.view.slideList[loc],slide&&slide.loadImages()}for(l>this.view.slideList.length/2&&(l=Math.floor(this.view.slideList.length/2)),i=1;l>=i;++i){if(loc=this.view.index-i,0>loc){if(!this.so.loop){i=l;continue}loc=this.view.slideList.length+loc}slide=this.view.slideList[loc],slide&&slide.loadImages()}}this.dispatchEvent(new MSSliderEvent(MSSliderEvent.CHANGE_END))},p.onSwipeStart=function(){this.skipTimer()},p.skipTimer=function(){this._timer.reset(),this._delayProgress=0,this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))},p.onTimer=function(){if(this._timer.getTime()>=1e3*this.view.currentSlide.delay&&(this.skipTimer(),this.view.next(),this.hideCalled=!1),this._delayProgress=this._timer.getTime()/(10*this.view.currentSlide.delay),this.so.hideLayers&&!this.hideCalled&&1e3*this.view.currentSlide.delay-this._timer.getTime()<=300){var currentSlide=this.view.currentSlide;currentSlide.hasLayers&¤tSlide.layerController.animHideLayers(),this.hideCalled=!0}this.dispatchEvent(new MSSliderEvent(MSSliderEvent.WAITING))},p._stopTimer=function(){this._timer&&this._timer.stop()},p._startTimer=function(){this.paused||this.is_over||!this.currentSlide||!this.currentSlide.ready||this.change_started||this._timer.start()},p.__appendSlides=function(){var slide,loc,i=0,l=this.view.slideList.length-1;for(i;l>i;++i)slide=this.view.slideList[i],slide.detached||(slide.$element.detach(),slide.detached=!0);for(this.view.appendSlide(this.view.slideList[this.view.index]),l=3,i=1;l>=i;++i){if(loc=this.view.index+i,loc>=this.view.slideList.length){if(!this.so.loop){i=l;continue}loc-=this.view.slideList.length}slide=this.view.slideList[loc],slide.detached=!1,this.view.appendSlide(slide)}for(l>this.view.slideList.length/2&&(l=Math.floor(this.view.slideList.length/2)),i=1;l>=i;++i){if(loc=this.view.index-i,0>loc){if(!this.so.loop){i=l;continue}loc=this.view.slideList.length+loc}slide=this.view.slideList[loc],slide.detached=!1,this.view.appendSlide(slide)}},p.__resize=function(hard){this.created&&(this.width=this.slider.$element[0].clientWidth||this.so.width,this.so.fullwidth||(this.width=Math.min(this.width,this.so.width)),this.height=this.width/this.slider.aspect,this.so.autoHeight?(this.currentSlide.setSize(this.width,null,hard),this.view.setSize(this.width,this.currentSlide.getHeight(),hard)):this.view.setSize(this.width,Math.max(this.so.minHeight,this.so.heightLimit?Math.min(this.height,this.so.height):this.height),hard),this.slider.$controlsCont&&this.so.centerControls&&this.so.fullwidth&&this.view.$element.css("left",Math.min(0,-(this.slider.$element[0].clientWidth-this.so.width)/2)+"px"),this.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESIZE)))},p.__dispatchInit=function(){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.INIT))},p.setup=function(){this.created=!0,this.paused=!this.so.autoplay,this.view.addEventListener(MSViewEvents.CHANGE_START,this.onChangeStart,this),this.view.addEventListener(MSViewEvents.CHANGE_END,this.onChangeEnd,this),this.view.addEventListener(MSViewEvents.SWIPE_START,this.onSwipeStart,this),this.currentSlide=this.view.slideList[this.so.start-1],this.__resize();var startSlide=this.so.start-1;if(this.view.create(startSlide),0===this.so.preload&&this.view.slideList[0].loadImages(),this.scroller=this.view.controller,this.so.wheel){var that=this,last_time=(new Date).getTime();this.wheellistener=function(event){var e=window.event||event.orginalEvent||event;e.preventDefault();var current_time=(new Date).getTime();if(!(400>current_time-last_time)){last_time=current_time;var delta=Math.abs(e.detail||e.wheelDelta);$.browser.mozilla&&(delta*=100);var scrollThreshold=15;return e.detail<0||e.wheelDelta>0?delta>=scrollThreshold&&that.previous(!0):delta>=scrollThreshold&&that.next(!0),!1}},$.browser.mozilla?this.slider.$element[0].addEventListener("DOMMouseScroll",this.wheellistener):this.slider.$element.bind("mousewheel",this.wheellistener)}0===this.slider.$element[0].clientWidth&&(this.slider.init_safemode=!0),this.__resize()},p.index=function(){return this.view.index},p.count=function(){return this.view.slidesCount},p.next=function(checkLoop){this.skipTimer(),this.view.next(checkLoop)},p.previous=function(checkLoop){this.skipTimer(),this.view.previous(checkLoop)},p.gotoSlide=function(index){index=Math.min(index,this.count()-1),this.skipTimer(),this.view.gotoSlide(index)},p.destroy=function(reset){this.dispatchEvent(new MSSliderEvent(MSSliderEvent.DESTROY)),this.slider.destroy(reset)},p._destroy=function(){this._timer.reset(),this._timer=null,$(window).unbind("resize",this.resize_listener),this.view.destroy(),this.view=null,this.so.wheel&&($.browser.mozilla?this.slider.$element[0].removeEventListener("DOMMouseScroll",this.wheellistener):this.slider.$element.unbind("mousewheel",this.wheellistener),this.wheellistener=null),this.so=null},p.runAction=function(action){var actionParams=[];if(-1!==action.indexOf("(")){var temp=action.slice(0,action.indexOf("("));actionParams=action.slice(action.indexOf("(")+1,-1).replace(/\"|\'|\s/g,"").split(","),action=temp}action in this?this[action].apply(this,actionParams):console},p.update=function(hard){this.slider.init_safemode&&hard&&(this.slider.init_safemode=!1),this.__resize(hard),hard&&this.dispatchEvent(new MSSliderEvent(MSSliderEvent.HARD_UPDATE))},p.locate=function(){this.__resize()},p.resume=function(){this.paused&&(this.paused=!1,this._startTimer())},p.pause=function(){this.paused||(this.paused=!0,this._stopTimer())},p.currentTime=function(){return this._delayProgress},averta.EventDispatcher.extend(p)}(jQuery),function($){"use strict";window.MasterSlider=function(){this.options={autoplay:!1,loop:!1,mouse:!0,swipe:!0,grabCursor:!0,space:0,fillMode:"fill",start:1,view:"basic",width:300,height:150,inView:15,critMargin:1,heightLimit:!0,smoothHeight:!0,autoHeight:!1,minHeight:-1,fullwidth:!1,fullheight:!1,autofill:!1,layersMode:"center",hideLayers:!1,endPause:!1,centerControls:!0,overPause:!0,shuffle:!1,speed:17,dir:"h",preload:0,wheel:!1,layout:"boxed",autofillTarget:null,fullscreenMargin:0,instantStartLayers:!1,parallaxMode:"mouse",rtl:!1,deepLink:null,deepLinkType:"path",disablePlugins:[]},this.slides=[],this.activePlugins=[],this.$element=null,this.lastMargin=0,this.leftSpace=0,this.topSpace=0,this.rightSpace=0,this.bottomSpace=0,this._holdOn=0;var that=this;this.resize_listener=function(){that._resize()},$(window).bind("resize",this.resize_listener)},MasterSlider.author="Averta Ltd. (www.averta.net)",MasterSlider.version="2.9.4",MasterSlider.releaseDate="Apr 2015",MasterSlider._plugins=[];var MS=MasterSlider;MS.registerPlugin=function(plugin){-1===MS._plugins.indexOf(plugin)&&MS._plugins.push(plugin)};var p=MasterSlider.prototype;p.__setupSlides=function(){var new_slide,that=this,ind=0;this.$element.children(".ms-slide").each(function(){var $slide_ele=$(this);new_slide=new MSSlide,new_slide.$element=$slide_ele,new_slide.slider=that,new_slide.delay=void 0!==$slide_ele.data("delay")?$slide_ele.data("delay"):3,new_slide.fillMode=void 0!==$slide_ele.data("fill-mode")?$slide_ele.data("fill-mode"):that.options.fillMode,new_slide.index=ind++;var slide_img=$slide_ele.children("img:not(.ms-layer)");if(slide_img.length>0&&new_slide.setBG(slide_img[0]),that.controls)for(var i=0,l=that.controls.length;l>i;++i)that.controls[i].slideAction(new_slide);$slide_ele.children("a").each(function(){var $this=$(this);"video"===this.getAttribute("data-type")?(new_slide.video=this.getAttribute("href"),new_slide.videoAutoPlay=$this.data("autoplay"),$this.remove()):$this.hasClass("ms-layer")||(new_slide.link=$(this))});that.slides.push(new_slide),that.slideController.view.addSlide(new_slide)})},p._removeLoading=function(){$(window).unbind("resize",this.resize_listener),this.$element.removeClass("before-init").css("visibility","visible").css("height","").css("opacity",0),CTween.fadeIn(this.$element),this.$loading.remove(),this.slideController&&this.slideController.__resize()},p._resize=function(){if(this.$loading){var h=this.$loading[0].clientWidth/this.aspect;h=this.options.heightLimit?Math.min(h,this.options.height):h,this.$loading.height(h),this.$element.height(h)}},p._shuffleSlides=function(){for(var r,slides=this.$element.children(".ms-slide"),i=0,l=slides.length;l>i;++i)r=Math.floor(Math.random()*(l-1)),i!=r&&(this.$element[0].insertBefore(slides[i],slides[r]),slides=this.$element.children(".ms-slide"))},p._setupSliderLayout=function(){this._updateSideMargins(),this.lastMargin=this.leftSpace;var lo=this.options.layout;"boxed"!==lo&&"partialview"!==lo&&(this.options.fullwidth=!0),("fullscreen"===lo||"fullwidth"===lo||"autofill"===lo)&&($(window).bind("resize",{that:this},this._updateLayout),this._updateLayout()),$(window).bind("resize",this.slideController.resize_listener)},p._updateLayout=function(event){var that=event?event.data.that:this,$element=(that.options.layout,that.$element),$win=$(window);$element.width($win.width()-that.leftSpace-that.rightSpace);var margin=-$element.offset().left+that.leftSpace+that.lastMargin;$element.css("margin-left",margin),that.lastMargin=margin},p._init=function(){if(!(this._holdOn>0)&&this._docReady){if(this.initialized=!0,"all"!==this.options.preload&&this._removeLoading(),this.options.shuffle&&this._shuffleSlides(),this.slideController.setupView(),this.view=this.slideController.view,this.$controlsCont=$("<div></div>").addClass("ms-inner-controls-cont"),this.options.centerControls&&this.$controlsCont.css("max-width",this.options.width+"px"),this.$controlsCont.prepend(this.view.$element),this.$msContainer=$("<div></div>").addClass("ms-container").prependTo(this.$element).append(this.$controlsCont),this.controls)for(var i=0,l=this.controls.length;l>i;++i)this.controls[i].setup();if(this._setupSliderLayout(),this.__setupSlides(),this.slideController.setup(),this.controls)for(i=0,l=this.controls.length;l>i;++i)this.controls[i].create();if(this.options.autoHeight&&this.slideController.view.$element.height(this.slideController.currentSlide.getHeight()),this.options.swipe&&!window._touch&&this.options.grabCursor&&this.options.mouse){var $view=this.view.$element;$view.mousedown(function(){$view.removeClass("ms-grab-cursor"),$view.addClass("ms-grabbing-cursor"),$.browser.msie&&window.ms_grabbing_curosr&&($view[0].style.cursor="url("+window.ms_grabbing_curosr+"), move")}).addClass("ms-grab-cursor"),$(document).mouseup(function(){$view.removeClass("ms-grabbing-cursor"),$view.addClass("ms-grab-cursor"),$.browser.msie&&window.ms_grab_curosr&&($view[0].style.cursor="url("+window.ms_grab_curosr+"), move")})}this.slideController.__dispatchInit()}},p.setHeight=function(value){this.options.smoothHeight?(this.htween&&(this.htween.reset?this.htween.reset():this.htween.stop(!0)),this.htween=CTween.animate(this.slideController.view.$element,500,{height:value},{ease:"easeOutQuart"})):this.slideController.view.$element.height(value)},p.reserveSpace=function(side,space){var sideSpace=side+"Space",pos=this[sideSpace];return this[sideSpace]+=space,this._updateSideMargins(),pos},p._updateSideMargins=function(){this.$element.css("margin",this.topSpace+"px "+this.rightSpace+"px "+this.bottomSpace+"px "+this.leftSpace+"px")},p._realignControls=function(){this.rightSpace=this.leftSpace=this.topSpace=this.bottomSpace=0,this._updateSideMargins(),this.api.dispatchEvent(new MSSliderEvent(MSSliderEvent.RESERVED_SPACE_CHANGE))},p.control=function(control,options){if(control in MSSlideController.SliderControlList){this.controls||(this.controls=[]);var ins=new MSSlideController.SliderControlList[control](options);return ins.slider=this,this.controls.push(ins),this}},p.holdOn=function(){this._holdOn++},p.release=function(){this._holdOn--,this._init()},p.setup=function(target,options){if(this.$element="string"==typeof target?$("#"+target):target.eq(0),this.setupMarkup=this.$element.html(),0!==this.$element.length){this.$element.addClass("master-slider").addClass("before-init"),$.browser.msie?this.$element.addClass("ms-ie").addClass("ms-ie"+$.browser.version.slice(0,$.browser.version.indexOf("."))):$.browser.webkit?this.$element.addClass("ms-wk"):$.browser.mozilla&&this.$element.addClass("ms-moz");var ua=navigator.userAgent.toLowerCase(),isAndroid=ua.indexOf("android")>-1;isAndroid&&this.$element.addClass("ms-android");var that=this;$.extend(this.options,options),this.aspect=this.options.width/this.options.height,this.$loading=$("<div></div>").addClass("ms-loading-container").insertBefore(this.$element).append($("<div></div>").addClass("ms-loading")),this.$loading.parent().css("position","relative"),this.options.autofill&&(this.options.fullwidth=!0,this.options.fullheight=!0),this.options.fullheight&&this.$element.addClass("ms-fullheight"),this._resize(),this.slideController=new MSSlideController(this),this.api=this.slideController;for(var i=0,l=MS._plugins.length;i!==l;i++){var plugin=MS._plugins[i];-1===this.options.disablePlugins.indexOf(plugin.name)&&this.activePlugins.push(new plugin(this))}return $(document).ready(function(){that._docReady=!0,that._init()}),this}},p.destroy=function(insertMarkup){for(var i=0,l=this.activePlugins.length;i!==l;i++)this.activePlugins[i].destroy();if(this.controls)for(i=0,l=this.controls.length;i!==l;i++)this.controls[i].destroy();this.slideController&&this.slideController._destroy(),this.$loading&&this.$loading.remove(),insertMarkup?this.$element.html(this.setupMarkup).css("visibility","hidden"):this.$element.remove();var lo=this.options.layout;("fullscreen"===lo||"fullwidth"===lo)&&$(window).unbind("resize",this._updateLayout),this.view=null,this.slides=null,this.options=null,this.slideController=null,this.api=null,this.resize_listener=null,this.activePlugins=null}}(jQuery),function($,window,document,undefined){function MasterSliderPlugin(element,options){this.element=element,this.$element=$(element),this.settings=$.extend({},defaults,options),this._defaults=defaults,this._name=pluginName,this.init()}var pluginName="masterslider",defaults={controls:{}};$.extend(MasterSliderPlugin.prototype,{init:function(){var self=this;this._slider=new MasterSlider;for(var control in this.settings.controls)this._slider.control(control,this.settings.controls[control]);this._slider.setup(this.$element,this.settings);var _superDispatch=this._slider.api.dispatchEvent;this._slider.api.dispatchEvent=function(event){self.$element.trigger(event.type),_superDispatch.call(this,event)}},api:function(){return this._slider.api},slider:function(){return this._slider}}),$.fn[pluginName]=function(options){var args=arguments,plugin="plugin_"+pluginName;if(options===undefined||"object"==typeof options)return this.each(function(){$.data(this,plugin)||$.data(this,plugin,new MasterSliderPlugin(this,options))});if("string"==typeof options&&"_"!==options[0]&&"init"!==options){var returns;return this.each(function(){var instance=$.data(this,plugin);instance instanceof MasterSliderPlugin&&"function"==typeof instance[options]&&(returns=instance[options].apply(instance,Array.prototype.slice.call(args,1))),instance instanceof MasterSliderPlugin&&"function"==typeof instance._slider.api[options]&&(returns=instance._slider.api[options].apply(instance._slider.api,Array.prototype.slice.call(args,1))),"destroy"===options&&$.data(this,plugin,null)}),returns!==undefined?returns:this}}}(jQuery,window,document),window.MSViewEvents=function(type,data){this.type=type,this.data=data},MSViewEvents.SWIPE_START="swipeStart",MSViewEvents.SWIPE_END="swipeEnd",MSViewEvents.SWIPE_MOVE="swipeMove",MSViewEvents.SWIPE_CANCEL="swipeCancel",MSViewEvents.SCROLL="scroll",MSViewEvents.CHANGE_START="slideChangeStart",MSViewEvents.CHANGE_END="slideChangeEnd",function($){"use strict";window.MSBasicView=function(options){this.options={loop:!1,dir:"h",autoHeight:!1,spacing:5,mouseSwipe:!0,swipe:!0,speed:17,minSlideSpeed:2,viewNum:20,critMargin:1},$.extend(this.options,options),this.dir=this.options.dir,this.loop=this.options.loop,this.spacing=this.options.spacing,this.__width=0,this.__height=0,this.__cssProb="h"===this.dir?"left":"top",this.__offset="h"===this.dir?"offsetLeft":"offsetTop",this.__dimension="h"===this.dir?"__width":"__height",this.__translate_end=window._css3d?" translateZ(0px)":"",this.$slideCont=$("<div></div>").addClass("ms-slide-container"),this.$element=$("<div></div>").addClass("ms-view").addClass("ms-basic-view").append(this.$slideCont),this.currentSlide=null,this.index=-1,this.slidesCount=0,this.slides=[],this.slideList=[],this.viewSlidesList=[],this.css3=window._cssanim,this.start_buffer=0,this.firstslide_snap=0,this.slideChanged=!1,this.controller=new Controller(0,0,{snapping:!0,snapsize:100,paging:!0,snappingMinSpeed:this.options.minSlideSpeed,friction:(100-.5*this.options.speed)/100,endless:this.loop}),this.controller.renderCallback("h"===this.dir?this._horizUpdate:this._vertiUpdate,this),this.controller.snappingCallback(this.__snapUpdate,this),this.controller.snapCompleteCallback(this.__snapCompelet,this),averta.EventDispatcher.call(this)};var p=MSBasicView.prototype;p.__snapCompelet=function(){this.slideChanged&&(this.slideChanged=!1,this.__locateSlides(),this.start_buffer=0,this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END)))},p.__snapUpdate=function(controller,snap,change){if(this.loop){var target_index=this.index+change;this.updateLoop(target_index),target_index>=this.slidesCount&&(target_index-=this.slidesCount),0>target_index&&(target_index=this.slidesCount+target_index),this.index=target_index}else{if(0>snap||snap>=this.slidesCount)return;this.index=snap}this._checkCritMargins(),$.browser.mozilla&&(this.slideList[this.index].$element[0].style.marginTop="0.1px",this.currentSlide&&(this.currentSlide.$element[0].style.marginTop=""));var new_slide=this.slideList[this.index];new_slide!==this.currentSlide&&(this.currentSlide=new_slide,this.autoUpdateZIndex&&this.__updateSlidesZindex(),this.slideChanged=!0,this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START)))},p._checkCritMargins=function(){if(!this.normalMode){var hlf=Math.floor(this.options.viewNum/2),inView=this.viewSlidesList.indexOf(this.slideList[this.index]),size=this[this.__dimension]+this.spacing,cm=this.options.critMargin;return this.loop?void((cm>=inView||inView>=this.viewSlidesList.length-cm)&&(size*=inView-hlf,this.__locateSlides(!1,size+this.start_buffer),this.start_buffer+=size)):void((cm>inView&&this.index>=cm||inView>=this.viewSlidesList.length-cm&&this.index<this.slidesCount-cm)&&this.__locateSlides(!1))}},p._vertiUpdate=function(controller,value){return this.__contPos=value,this.dispatchEvent(new MSViewEvents(MSViewEvents.SCROLL)),this.css3?void(this.$slideCont[0].style[window._jcsspfx+"Transform"]="translateY("+-value+"px)"+this.__translate_end):void(this.$slideCont[0].style.top=-value+"px")},p._horizUpdate=function(controller,value){return this.__contPos=value,this.dispatchEvent(new MSViewEvents(MSViewEvents.SCROLL)),this.css3?void(this.$slideCont[0].style[window._jcsspfx+"Transform"]="translateX("+-value+"px)"+this.__translate_end):void(this.$slideCont[0].style.left=-value+"px")},p.__updateViewList=function(){if(this.normalMode)return void(this.viewSlidesList=this.slides);var temp=this.viewSlidesList.slice();this.viewSlidesList=[];var l,i=0,hlf=Math.floor(this.options.viewNum/2);if(this.loop)for(;i!==this.options.viewNum;i++)this.viewSlidesList.push(this.slides[this.currentSlideLoc-hlf+i]);else{for(i=0;i!==hlf&&this.index-i!==-1;i++)this.viewSlidesList.unshift(this.slideList[this.index-i]);for(i=1;i!==hlf&&this.index+i!==this.slidesCount;i++)this.viewSlidesList.push(this.slideList[this.index+i])}for(i=0,l=temp.length;i!==l;i++)-1===this.viewSlidesList.indexOf(temp[i])&&temp[i].sleep();temp=null,this.currentSlide&&this.__updateSlidesZindex()},p.__locateSlides=function(move,start){this.__updateViewList(),start=this.loop?start||0:this.slides.indexOf(this.viewSlidesList[0])*(this[this.__dimension]+this.spacing);for(var slide,l=this.viewSlidesList.length,i=0;i!==l;i++){var pos=start+i*(this[this.__dimension]+this.spacing);slide=this.viewSlidesList[i],slide.wakeup(),slide.position=pos,slide.$element[0].style[this.__cssProb]=pos+"px"}move!==!1&&this.controller.changeTo(this.slideList[this.index].position,!1,null,null,!1)},p.__createLoopList=function(){var return_arr=[],i=0,count=this.slidesCount/2,before_count=this.slidesCount%2===0?count-1:Math.floor(count),after_count=this.slidesCount%2===0?count:Math.floor(count);for(this.currentSlideLoc=before_count,i=1;before_count>=i;++i)return_arr.unshift(this.slideList[this.index-i<0?this.slidesCount-i+this.index:this.index-i]);for(return_arr.push(this.slideList[this.index]),i=1;after_count>=i;++i)return_arr.push(this.slideList[this.index+i>=this.slidesCount?this.index+i-this.slidesCount:this.index+i]);return return_arr},p.__getSteps=function(index,target){var right=index>target?this.slidesCount-index+target:target-index,left=Math.abs(this.slidesCount-right);return left>right?right:-left},p.__pushEnd=function(){var first_slide=this.slides.shift(),last_slide=this.slides[this.slidesCount-2];if(this.slides.push(first_slide),this.normalMode){var pos=last_slide.$element[0][this.__offset]+this.spacing+this[this.__dimension];first_slide.$element[0].style[this.__cssProb]=pos+"px",first_slide.position=pos}},p.__pushStart=function(){var last_slide=this.slides.pop(),first_slide=this.slides[0];if(this.slides.unshift(last_slide),this.normalMode){var pos=first_slide.$element[0][this.__offset]-this.spacing-this[this.__dimension];last_slide.$element[0].style[this.__cssProb]=pos+"px",last_slide.position=pos}},p.__updateSlidesZindex=function(){{var slide,l=this.viewSlidesList.length;Math.floor(l/2)}if(this.loop)for(var loc=this.viewSlidesList.indexOf(this.currentSlide),i=0;i!==l;i++)slide=this.viewSlidesList[i],this.viewSlidesList[i].$element.css("z-index",loc>=i?i+1:l-i);else{for(var beforeNum=this.currentSlide.index-this.viewSlidesList[0].index,i=0;i!==l;i++)this.viewSlidesList[i].$element.css("z-index",beforeNum>=i?i+1:l-i);this.currentSlide.$element.css("z-index",l)}},p.addSlide=function(slide){slide.view=this,this.slides.push(slide),this.slideList.push(slide),this.slidesCount++},p.appendSlide=function(slide){this.$slideCont.append(slide.$element)},p.updateLoop=function(index){if(this.loop)for(var steps=this.__getSteps(this.index,index),i=0,l=Math.abs(steps);l>i;++i)0>steps?this.__pushStart():this.__pushEnd()},p.gotoSlide=function(index,fast){this.updateLoop(index),this.index=index;var target_slide=this.slideList[index];this._checkCritMargins(),this.controller.changeTo(target_slide.position,!fast,null,null,!1),target_slide!==this.currentSlide&&(this.slideChanged=!0,this.currentSlide=target_slide,this.autoUpdateZIndex&&this.__updateSlidesZindex(),this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_START)),fast&&this.dispatchEvent(new MSViewEvents(MSViewEvents.CHANGE_END)))},p.next=function(checkLoop){return checkLoop&&!this.loop&&this.index+1>=this.slidesCount?void this.controller.bounce(10):void this.gotoSlide(this.index+1>=this.slidesCount?0:this.index+1)},p.previous=function(checkLoop){return checkLoop&&!this.loop&&this.index-1<0?void this.controller.bounce(-10):void this.gotoSlide(this.index-1<0?this.slidesCount-1:this.index-1)},p.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element),this.swipeControl.swipeType="h"===this.dir?"horizontal":"vertical";var that=this;this.swipeControl.onSwipe="h"===this.dir?function(status){that.horizSwipeMove(status)}:function(status){that.vertSwipeMove(status)}},p.vertSwipeMove=function(status){var phase=status.phase;if("start"===phase)this.controller.stop(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,status));else if("move"===phase&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+status.moveY)<this.cont_size/2))this.controller.drag(status.moveY),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_MOVE,status));else if("end"===phase||"cancel"===phase){var speed=status.distanceY/status.duration*50/3;Math.abs(speed)>.1?(this.controller.push(-speed),speed>this.controller.options.snappingMinSpeed&&this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,status))):(this.controller.cancel(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,status)))}},p.horizSwipeMove=function(status){var phase=status.phase;if("start"===phase)this.controller.stop(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_START,status));else if("move"===phase&&(!this.loop||Math.abs(this.currentSlide.position-this.controller.value+status.moveX)<this.cont_size/2))this.controller.drag(status.moveX),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_MOVE,status));else if("end"===phase||"cancel"===phase){var speed=status.distanceX/status.duration*50/3;Math.abs(speed)>.1?(this.controller.push(-speed),speed>this.controller.options.snappingMinSpeed&&this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_END,status))):(this.controller.cancel(),this.dispatchEvent(new MSViewEvents(MSViewEvents.SWIPE_CANCEL,status)))}},p.setSize=function(width,height,hard){if(this.lastWidth!==width||height!==this.lastHeight||hard){this.$element.width(width).height(height);for(var i=0;i<this.slidesCount;++i)this.slides[i].setSize(width,height,hard);this.__width=width,this.__height=height,this.__created&&(this.__locateSlides(),this.cont_size=(this.slidesCount-1)*(this[this.__dimension]+this.spacing),this.loop||(this.controller._max_value=this.cont_size),this.controller.options.snapsize=this[this.__dimension]+this.spacing,this.controller.changeTo(this.currentSlide.position,!1,null,null,!1),this.controller.cancel(),this.lastWidth=width,this.lastHeight=height)}},p.create=function(index){this.__created=!0,this.index=Math.min(index||0,this.slidesCount-1),this.lastSnap=this.index,this.loop&&(this.slides=this.__createLoopList()),this.normalMode=this.slidesCount<=this.options.viewNum;for(var i=0;i<this.slidesCount;++i)this.slides[i].create();this.__locateSlides(),this.controller.options.snapsize=this[this.__dimension]+this.spacing,this.loop||(this.controller._max_value=(this.slidesCount-1)*(this[this.__dimension]+this.spacing)),this.gotoSlide(this.index,!0),this.options.swipe&&(window._touch||this.options.mouseSwipe)&&this.setupSwipe()},p.destroy=function(){if(this.__created){for(var i=0;i<this.slidesCount;++i)this.slides[i].destroy();this.slides=null,this.slideList=null,this.$element.remove(),this.controller.destroy(),this.controller=null}},averta.EventDispatcher.extend(p),MSSlideController.registerView("basic",MSBasicView)}(jQuery),function(){"use strict";window.MSFadeView=function(options){MSBasicView.call(this,options),this.$element.removeClass("ms-basic-view").addClass("ms-fade-view"),this.controller.renderCallback(this.__update,this)},MSFadeView.extend(MSBasicView);var p=MSFadeView.prototype,_super=MSBasicView.prototype;p.__update=function(controller,value){for(var slide,distance,cont_scroll=-value,i=0;i<this.slidesCount;++i)slide=this.slideList[i],distance=-cont_scroll-slide.position,this.__updateSlides(slide,distance)},p.__updateSlides=function(slide,distance){var value=Math.abs(distance/this[this.__dimension]);0>=1-value?slide.$element.fadeTo(0,0).css("visibility","hidden"):slide.$element.fadeTo(0,1-value).css("visibility","")},p.__locateSlides=function(move,start){this.__updateViewList(),start=this.loop?start||0:this.slides.indexOf(this.viewSlidesList[0])*(this[this.__dimension]+this.spacing);for(var slide,l=this.viewSlidesList.length,i=0;i!==l;i++){var pos=start+i*this[this.__dimension];slide=this.viewSlidesList[i],slide.wakeup(),slide.position=pos}move!==!1&&this.controller.changeTo(this.slideList[this.index].position,!1,null,null,!1)},p.__pushEnd=function(){var first_slide=this.slides.shift(),last_slide=this.slides[this.slidesCount-2];this.slides.push(first_slide),first_slide.position=last_slide.position+this[this.__dimension]},p.__pushStart=function(){var last_slide=this.slides.pop(),first_slide=this.slides[0];this.slides.unshift(last_slide),last_slide.position=first_slide.position-this[this.__dimension]},p.create=function(index){_super.create.call(this,index),this.spacing=0,this.controller.options.minValidDist=10},MSSlideController.registerView("fade",MSFadeView)}(jQuery),function($){"use strict";var BaseControl=function(){this.options={prefix:"ms-",autohide:!0,overVideo:!0,customClass:null}},p=BaseControl.prototype;p.slideAction=function(){},p.setup=function(){this.cont=this.options.insertTo?$(this.options.insertTo):this.slider.$controlsCont,this.options.overVideo||this._hideOnvideoStarts()},p.checkHideUnder=function(){this.options.hideUnder&&(this.needsRealign=!this.options.insetTo&&("left"===this.options.align||"right"===this.options.align)&&this.options.inset===!1,$(window).bind("resize",{that:this},this.onResize),this.onResize())},p.onResize=function(event){var that=event&&event.data.that||this,w=window.innerWidth;w<=that.options.hideUnder&&!that.detached?(that.hide(!0),that.detached=!0,that.onDetach()):w>=that.options.hideUnder&&that.detached&&(that.detached=!1,that.visible(),that.onAppend())},p.create=function(){this.options.autohide&&(this.hide(!0),this.slider.$controlsCont.mouseenter($.proxy(this._onMouseEnter,this)).mouseleave($.proxy(this._onMouseLeave,this)).mousedown($.proxy(this._onMouseDown,this)),this.$element&&this.$element.mouseenter($.proxy(this._onMouseEnter,this)).mouseleave($.proxy(this._onMouseLeave,this)).mousedown($.proxy(this._onMouseDown,this)),$(document).mouseup($.proxy(this._onMouseUp,this))),this.options.align&&this.$element.addClass("ms-align-"+this.options.align),this.options.customClass&&this.$element&&this.$element.addClass(this.options.customClass)
|
11 |
+
},p._onMouseEnter=function(){this._disableAH||this.mdown||this.visible(),this.mleave=!1},p._onMouseLeave=function(){this.mdown||this.hide(),this.mleave=!0},p._onMouseDown=function(){this.mdown=!0},p._onMouseUp=function(){this.mdown&&this.mleave&&this.hide(),this.mdown=!1},p.onAppend=function(){this.needsRealign&&this.slider._realignControls()},p.onDetach=function(){this.needsRealign&&this.slider._realignControls()},p._hideOnvideoStarts=function(){var that=this;this.slider.api.addEventListener(MSSliderEvent.VIDEO_PLAY,function(){that._disableAH=!0,that.hide()}),this.slider.api.addEventListener(MSSliderEvent.VIDEO_CLOSE,function(){that._disableAH=!1,that.visible()})},p.hide=function(fast){if(fast)this.$element.css("opacity",0),this.$element.css("display","none");else{clearTimeout(this.hideTo);var $element=this.$element;this.hideTo=setTimeout(function(){CTween.fadeOut($element,400,!1)},20)}this.$element.addClass("ms-ctrl-hide")},p.visible=function(){this.detached||(clearTimeout(this.hideTo),this.$element.css("display",""),CTween.fadeIn(this.$element,400,!1),this.$element.removeClass("ms-ctrl-hide"))},p.destroy=function(){this.options&&this.options.hideUnder&&$(window).unbind("resize",this.onResize)},window.BaseControl=BaseControl}(jQuery),function($){"use strict";var MSArrows=function(options){BaseControl.call(this),$.extend(this.options,options)};MSArrows.extend(BaseControl);var p=MSArrows.prototype,_super=BaseControl.prototype;p.setup=function(){var that=this;this.$next=$("<div></div>").addClass(this.options.prefix+"nav-next").bind("click",function(){that.slider.api.next(!0)}),this.$prev=$("<div></div>").addClass(this.options.prefix+"nav-prev").bind("click",function(){that.slider.api.previous(!0)}),_super.setup.call(this),this.cont.append(this.$next),this.cont.append(this.$prev),this.checkHideUnder()},p.hide=function(fast){return fast?(this.$prev.css("opacity",0).css("display","none"),void this.$next.css("opacity",0).css("display","none")):(CTween.fadeOut(this.$prev,400,!1),CTween.fadeOut(this.$next,400,!1),this.$prev.addClass("ms-ctrl-hide"),void this.$next.addClass("ms-ctrl-hide"))},p.visible=function(){this.detached||(CTween.fadeIn(this.$prev,400),CTween.fadeIn(this.$next,400),this.$prev.removeClass("ms-ctrl-hide").css("display",""),this.$next.removeClass("ms-ctrl-hide").css("display",""))},p.destroy=function(){_super.destroy(),this.$next.remove(),this.$prev.remove()},window.MSArrows=MSArrows,MSSlideController.registerControl("arrows",MSArrows)}(jQuery),function($){"use strict";var MSThumblist=function(options){BaseControl.call(this),this.options.dir="h",this.options.wheel="v"===options.dir,this.options.arrows=!1,this.options.speed=17,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.space=10,this.options.width=100,this.options.height=100,this.options.type="thumbs",this.options.hover=!1,$.extend(this.options,options),this.thumbs=[],this.index_count=0,this.__dimen="h"===this.options.dir?"width":"height",this.__alignsize="h"===this.options.dir?"height":"width",this.__jdimen="h"===this.options.dir?"outerWidth":"outerHeight",this.__pos="h"===this.options.dir?"left":"top",this.click_enable=!0};MSThumblist.extend(BaseControl);var p=MSThumblist.prototype,_super=BaseControl.prototype;p.setup=function(){if(this.$element=$("<div></div>").addClass(this.options.prefix+"thumb-list"),"tabs"===this.options.type&&this.$element.addClass(this.options.prefix+"tabs"),this.$element.addClass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),this.$thumbscont=$("<div></div>").addClass("ms-thumbs-cont").appendTo(this.$element),this.options.arrows){var that=this;this.$fwd=$("<div></div>").addClass("ms-thumblist-fwd").appendTo(this.$element).click(function(){that.controller.push(-15)}),this.$bwd=$("<div></div>").addClass("ms-thumblist-bwd").appendTo(this.$element).click(function(){that.controller.push(15)})}if(!this.options.insetTo&&this.options.align){var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.detach().prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.width):this.$element.height(this.options.height)}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,this.options[this.__alignsize]+2*this.options.margin);this.$element.css(align,-pos-this.options[this.__alignsize]-this.options.margin)}},p.slideAction=function(slide){var thumb_ele=slide.$element.find(".ms-thumb"),that=this,thumb_frame=$("<div></div>").addClass("ms-thumb-frame").append(thumb_ele).append($('<div class="ms-thumb-ol"></div>')).bind(this.options.hover?"hover":"click",function(){that.changeSlide(thumb_frame)});if(this.options.align&&thumb_frame.width(this.options.width-("v"===this.options.dir&&"tabs"===this.options.type?12:0)).height(this.options.height).css("margin-"+("v"===this.options.dir?"bottom":"right"),this.options.space),thumb_frame[0].index=this.index_count++,this.$thumbscont.append(thumb_frame),this.options.fillMode&&thumb_ele.is("img")){var aligner=new window.MSAligner(this.options.fillMode,thumb_frame,thumb_ele);thumb_ele[0].aligner=aligner,thumb_ele.one("load",function(){var $this=$(this);$this[0].aligner.init($this.width(),$this.height()),$this[0].aligner.align()}).each($.jqLoadFix)}$.browser.msie&&thumb_ele.on("dragstart",function(event){event.preventDefault()}),this.thumbs.push(thumb_frame)},p.create=function(){_super.create.call(this),this.__translate_end=window._css3d?" translateZ(0px)":"",this.controller=new Controller(0,0,{snappingMinSpeed:2,friction:(100-.5*this.options.speed)/100}),this.controller.renderCallback("h"===this.options.dir?this._hMove:this._vMove,this);var that=this;this.resize_listener=function(){that.__resize()},$(window).bind("resize",this.resize_listener),this.thumbSize=this.thumbs[0][this.__jdimen](!0),this.setupSwipe(),this.__resize();var that=this;this.options.wheel&&(this.wheellistener=function(event){var e=window.event||event.orginalEvent||event,delta=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));return that.controller.push(10*-delta),!1},$.browser.mozilla?this.$element[0].addEventListener("DOMMouseScroll",this.wheellistener):this.$element.bind("mousewheel",this.wheellistener)),this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.slider.api.addEventListener(MSSliderEvent.HARD_UPDATE,this.realignThumbs,this),this.cindex=this.slider.api.index(),this.select(this.thumbs[this.cindex])},p._hMove=function(controller,value){return this.__contPos=value,window._cssanim?void(this.$thumbscont[0].style[window._jcsspfx+"Transform"]="translateX("+-value+"px)"+this.__translate_end):void(this.$thumbscont[0].style.left=-value+"px")},p._vMove=function(controller,value){return this.__contPos=value,window._cssanim?void(this.$thumbscont[0].style[window._jcsspfx+"Transform"]="translateY("+-value+"px)"+this.__translate_end):void(this.$thumbscont[0].style.top=-value+"px")},p.setupSwipe=function(){this.swipeControl=new averta.TouchSwipe(this.$element),this.swipeControl.swipeType="h"===this.options.dir?"horizontal":"vertical";var that=this;this.swipeControl.onSwipe="h"===this.options.dir?function(status){that.horizSwipeMove(status)}:function(status){that.vertSwipeMove(status)}},p.vertSwipeMove=function(status){if(!this.dTouch){var phase=status.phase;if("start"===phase)this.controller.stop();else if("move"===phase)this.controller.drag(status.moveY);else if("end"===phase||"cancel"===phase){var speed=Math.abs(status.distanceY/status.duration*50/3);speed>.1?this.controller.push(-status.distanceY/status.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},p.horizSwipeMove=function(status){if(!this.dTouch){var phase=status.phase;if("start"===phase)this.controller.stop(),this.click_enable=!1;else if("move"===phase)this.controller.drag(status.moveX);else if("end"===phase||"cancel"===phase){var speed=Math.abs(status.distanceX/status.duration*50/3);speed>.1?this.controller.push(-status.distanceX/status.duration*50/3):(this.click_enable=!0,this.controller.cancel())}}},p.update=function(){var nindex=this.slider.api.index();this.cindex!==nindex&&(null!=this.cindex&&this.unselect(this.thumbs[this.cindex]),this.cindex=nindex,this.select(this.thumbs[this.cindex]),this.dTouch||this.updateThumbscroll())},p.realignThumbs=function(){this.$element.find(".ms-thumb").each(function(index,thumb){thumb.aligner&&thumb.aligner.align()})},p.updateThumbscroll=function(){var pos=this.thumbSize*this.cindex;if(0/0==this.controller.value&&(this.controller.value=0),pos-this.controller.value<0)return void this.controller.gotoSnap(this.cindex,!0);if(pos+this.thumbSize-this.controller.value>this.$element[this.__dimen]()){var first_snap=this.cindex-Math.floor(this.$element[this.__dimen]()/this.thumbSize)+1;return void this.controller.gotoSnap(first_snap,!0)}},p.changeSlide=function(thumb){this.click_enable&&this.cindex!==thumb[0].index&&this.slider.api.gotoSlide(thumb[0].index)},p.unselect=function(ele){ele.removeClass("ms-thumb-frame-selected")},p.select=function(ele){ele.addClass("ms-thumb-frame-selected")},p.__resize=function(){var size=this.$element[this.__dimen]();if(this.ls!==size){this.ls=size,this.thumbSize=this.thumbs[0][this.__jdimen](!0);var len=this.slider.api.count()*this.thumbSize;this.$thumbscont[0].style[this.__dimen]=len+"px",size>=len?(this.dTouch=!0,this.controller.stop(),this.$thumbscont[0].style[this.__pos]=.5*(size-len)+"px",this.$thumbscont[0].style[window._jcsspfx+"Transform"]=""):(this.dTouch=!1,this.click_enable=!0,this.$thumbscont[0].style[this.__pos]="",this.controller._max_value=len-size,this.controller.options.snapsize=this.thumbSize,this.updateThumbscroll())}},p.destroy=function(){_super.destroy(),this.options.wheel&&($.browser.mozilla?this.$element[0].removeEventListener("DOMMouseScroll",this.wheellistener):this.$element.unbind("mousewheel",this.wheellistener),this.wheellistener=null),$(window).unbind("resize",this.resize_listener),this.$element.remove(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)},window.MSThumblist=MSThumblist,MSSlideController.registerControl("thumblist",MSThumblist)}(jQuery),function($){"use strict";var MSBulltes=function(options){BaseControl.call(this),this.options.dir="h",this.options.inset=!0,this.options.margin=10,this.options.space=10,$.extend(this.options,options),this.bullets=[]};MSBulltes.extend(BaseControl);var p=MSBulltes.prototype,_super=BaseControl.prototype;p.setup=function(){if(_super.setup.call(this),this.$element=$("<div></div>").addClass(this.options.prefix+"bullets").addClass("ms-dir-"+this.options.dir).appendTo(this.cont),this.$bullet_cont=$("<div></div>").addClass("ms-bullets-count").appendTo(this.$element),!this.options.insetTo&&this.options.align){var align=this.options.align;this.options.inset&&this.$element.css(align,this.options.margin)}this.checkHideUnder()},p.create=function(){_super.create.call(this);var that=this;this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.cindex=this.slider.api.index();for(var i=0;i<this.slider.api.count();++i){var bullet=$("<div></div>").addClass("ms-bullet");bullet[0].index=i,bullet.on("click",function(){that.changeSlide(this.index)}),this.$bullet_cont.append(bullet),this.bullets.push(bullet),"h"===this.options.dir?bullet.css("margin",this.options.space/2):bullet.css("margin",this.options.space)}"h"===this.options.dir?this.$element.width(bullet.outerWidth(!0)*this.slider.api.count()):this.$element.css("margin-top",-this.$element.outerHeight(!0)/2),this.select(this.bullets[this.cindex])},p.update=function(){var nindex=this.slider.api.index();this.cindex!==nindex&&(null!=this.cindex&&this.unselect(this.bullets[this.cindex]),this.cindex=nindex,this.select(this.bullets[this.cindex]))},p.changeSlide=function(index){this.cindex!==index&&this.slider.api.gotoSlide(index)},p.unselect=function(ele){ele.removeClass("ms-bullet-selected")},p.select=function(ele){ele.addClass("ms-bullet-selected")},p.destroy=function(){_super.destroy(),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.$element.remove()},window.MSBulltes=MSBulltes,MSSlideController.registerControl("bullets",MSBulltes)}(jQuery),function($){"use strict";var MSScrollbar=function(options){BaseControl.call(this),this.options.dir="h",this.options.autohide=!0,this.options.width=4,this.options.color="#3D3D3D",this.options.margin=10,$.extend(this.options,options),this.__dimen="h"===this.options.dir?"width":"height",this.__jdimen="h"===this.options.dir?"outerWidth":"outerHeight",this.__pos="h"===this.options.dir?"left":"top",this.__translate_end=window._css3d?" translateZ(0px)":"",this.__translate_start="h"===this.options.dir?" translateX(":"translateY("};MSScrollbar.extend(BaseControl);var p=MSScrollbar.prototype,_super=BaseControl.prototype;p.setup=function(){if(this.$element=$("<div></div>").addClass(this.options.prefix+"sbar").addClass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),this.$bar=$("<div></div>").addClass(this.options.prefix+"bar").appendTo(this.$element),this.slider.options.loop&&(this.disable=!0,this.$element.remove()),"v"===this.options.dir?this.$bar.width(this.options.width):this.$bar.height(this.options.width),this.$bar.css("background-color",this.options.color),!this.options.insetTo&&this.options.align){this.$element.css("v"===this.options.dir?{right:"auto",left:"auto"}:{top:"auto",bottom:"auto"});var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align())}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,2*this.options.margin+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)}},p.create=function(){if(!this.disable){this.scroller=this.slider.api.scroller,this.slider.api.view.addEventListener(MSViewEvents.SCROLL,this._update,this),this.slider.api.addEventListener(MSSliderEvent.RESIZE,this._resize,this),this._resize(),this.options.autohide&&this.$bar.css("opacity","0")}},p._resize=function(){this.vdimen=this.$element[this.__dimen](),this.bar_dimen=this.slider.api.view["__"+this.__dimen]*this.vdimen/this.scroller._max_value,this.$bar[this.__dimen](this.bar_dimen)},p._update=function(){var value=this.scroller.value*(this.vdimen-this.bar_dimen)/this.scroller._max_value;if(this.lvalue!==value){if(this.lvalue=value,this.options.autohide){clearTimeout(this.hto),this.$bar.css("opacity","1");var that=this;this.hto=setTimeout(function(){that.$bar.css("opacity","0")},150)}return 0>value?void(this.$bar[0].style[this.__dimen]=this.bar_dimen+value+"px"):(value>this.vdimen-this.bar_dimen&&(this.$bar[0].style[this.__dimen]=this.vdimen-value+"px"),window._cssanim?void(this.$bar[0].style[window._jcsspfx+"Transform"]=this.__translate_start+value+"px)"+this.__translate_end):void(this.$bar[0].style[this.__pos]=value+"px"))}},p.destroy=function(){_super.destroy(),this.slider.api.view.removeEventListener(MSViewEvents.SCROLL,this._update,this),this.slider.api.removeEventListener(MSSliderEvent.RESIZE,this._resize,this),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.$element.remove()},window.MSScrollbar=MSScrollbar,MSSlideController.registerControl("scrollbar",MSScrollbar)}(jQuery),function($){"use strict";var MSTimerbar=function(options){BaseControl.call(this),this.options.autohide=!1,this.options.width=4,this.options.color="#FFFFFF",this.options.inset=!0,this.options.margin=0,$.extend(this.options,options)};MSTimerbar.extend(BaseControl);var p=MSTimerbar.prototype,_super=BaseControl.prototype;p.setup=function(){if(_super.setup.call(this),this.$element=$("<div></div>").addClass(this.options.prefix+"timerbar"),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),this.$bar=$("<div></div>").addClass("ms-time-bar").appendTo(this.$element),"v"===this.options.dir?(this.$bar.width(this.options.width),this.$element.width(this.options.width)):(this.$bar.height(this.options.width),this.$element.height(this.options.width)),this.$bar.css("background-color",this.options.color),!this.options.insetTo&&this.options.align){this.$element.css({top:"auto",bottom:"auto"});var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align())}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,2*this.options.margin+this.options.width);this.$element.css(align,-pos-this.options.margin-this.options.width)}},p.create=function(){_super.create.call(this),this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this),this._update()},p._update=function(){this.$bar[0].style.width=this.slider.api._delayProgress+"%"},p.destroy=function(){_super.destroy(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this),this.$element.remove()},window.MSTimerbar=MSTimerbar,MSSlideController.registerControl("timebar",MSTimerbar)}(jQuery),function($){"use strict";var MSCircleTimer=function(options){BaseControl.call(this),this.options.color="#A2A2A2",this.options.stroke=10,this.options.radius=4,this.options.autohide=!1,$.extend(this.options,options)};MSCircleTimer.extend(BaseControl);var p=MSCircleTimer.prototype,_super=BaseControl.prototype;p.setup=function(){return _super.setup.call(this),this.$element=$("<div></div>").addClass(this.options.prefix+"ctimer").appendTo(this.cont),this.$canvas=$("<canvas></canvas>").addClass("ms-ctimer-canvas").appendTo(this.$element),this.$bar=$("<div></div>").addClass("ms-ctimer-bullet").appendTo(this.$element),this.$canvas[0].getContext?(this.ctx=this.$canvas[0].getContext("2d"),this.prog=0,this.__w=2*(this.options.radius+this.options.stroke/2),this.$canvas[0].width=this.__w,this.$canvas[0].height=this.__w,void this.checkHideUnder()):(this.destroy(),void(this.disable=!0))},p.create=function(){if(!this.disable){_super.create.call(this),this.slider.api.addEventListener(MSSliderEvent.WAITING,this._update,this);var that=this;this.$element.click(function(){that.slider.api.paused?that.slider.api.resume():that.slider.api.pause()}),this._update()}},p._update=function(){var that=this;$(this).stop(!0).animate({prog:.01*this.slider.api._delayProgress},{duration:200,step:function(){that._draw()}})},p._draw=function(){this.ctx.clearRect(0,0,this.__w,this.__w),this.ctx.beginPath(),this.ctx.arc(.5*this.__w,.5*this.__w,this.options.radius,1.5*Math.PI,1.5*Math.PI+2*Math.PI*this.prog,!1),this.ctx.strokeStyle=this.options.color,this.ctx.lineWidth=this.options.stroke,this.ctx.stroke()},p.destroy=function(){_super.destroy(),this.disable||($(this).stop(!0),this.slider.api.removeEventListener(MSSliderEvent.WAITING,this._update,this),this.$element.remove())},window.MSCircleTimer=MSCircleTimer,MSSlideController.registerControl("circletimer",MSCircleTimer)}(jQuery),function($){"use strict";window.MSSlideInfo=function(options){BaseControl.call(this,options),this.options.autohide=!1,this.options.align=null,this.options.inset=!1,this.options.margin=10,this.options.size=100,this.options.dir="h",$.extend(this.options,options),this.data_list=[]},MSSlideInfo.fadeDuratation=400,MSSlideInfo.extend(BaseControl);var p=MSSlideInfo.prototype,_super=BaseControl.prototype;p.setup=function(){if(this.$element=$("<div></div>").addClass(this.options.prefix+"slide-info").addClass("ms-dir-"+this.options.dir),_super.setup.call(this),this.$element.appendTo(this.slider.$controlsCont===this.cont?this.slider.$element:this.cont),!this.options.insetTo&&this.options.align){var align=this.options.align;this.options.inset?this.$element.css(align,this.options.margin):"top"===align?this.$element.prependTo(this.slider.$element).css({"margin-bottom":this.options.margin,position:"relative"}):"bottom"===align?this.$element.css({"margin-top":this.options.margin,position:"relative"}):(this.slider.api.addEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.align()),"v"===this.options.dir?this.$element.width(this.options.size):this.$element.css("min-height",this.options.size)}this.checkHideUnder()},p.align=function(){if(!this.detached){var align=this.options.align,pos=this.slider.reserveSpace(align,this.options.size+2*this.options.margin);this.$element.css(align,-pos-this.options.size-this.options.margin)}},p.slideAction=function(slide){var info_ele=$(slide.$element.find(".ms-info"));info_ele.detach(),this.data_list[slide.index]=info_ele},p.create=function(){_super.create.call(this),this.slider.api.addEventListener(MSSliderEvent.CHANGE_START,this.update,this),this.cindex=this.slider.api.index(),this.switchEle(this.data_list[this.cindex])},p.update=function(){var nindex=this.slider.api.index();this.switchEle(this.data_list[nindex]),this.cindex=nindex},p.switchEle=function(ele){if(this.current_ele){this.current_ele[0].tween&&this.current_ele[0].tween.stop(!0),this.current_ele[0].tween=CTween.animate(this.current_ele,MSSlideInfo.fadeDuratation,{opacity:0},{complete:function(){this.detach(),this[0].tween=null,ele.css("position","relative")},target:this.current_ele}),ele.css("position","absolute")}this.__show(ele)},p.__show=function(ele){ele.appendTo(this.$element).css("opacity","0"),this.current_ele&&ele.height(Math.max(ele.height(),this.current_ele.height())),clearTimeout(this.tou),this.tou=setTimeout(function(){CTween.fadeIn(ele,MSSlideInfo.fadeDuratation),ele.css("height","")},MSSlideInfo.fadeDuratation),ele[0].tween&&ele[0].tween.stop(!0),this.current_ele=ele},p.destroy=function(){_super.destroy(),clearTimeout(this.tou),this.current_ele&&this.current_ele[0].tween&&this.current_ele[0].tween.stop("true"),this.$element.remove(),this.slider.api.removeEventListener(MSSliderEvent.RESERVED_SPACE_CHANGE,this.align,this),this.slider.api.removeEventListener(MSSliderEvent.CHANGE_START,this.update,this)},MSSlideController.registerControl("slideinfo",MSSlideInfo)}(jQuery),function($,document,window){var PId=0,$window=$(window),$doc=$(document);if(window.MasterSlider){var StartOnAppear=function(slider){this.PId=PId++,this.slider=slider,this.$slider=slider.$element,this.slider.options.startOnAppear&&(slider.holdOn(),$doc.ready($.proxy(this.init,this)))};StartOnAppear.name="MSStartOnAppear";var p=StartOnAppear.prototype;p.init=function(){this.slider.api;$window.on("scroll.soa"+this.PId,$.proxy(this._onScroll,this)).trigger("scroll")},p._onScroll=function(){var vpBottom=$window.scrollTop()+$window.height(),top=this.$slider.offset().top;vpBottom>top&&($window.off("scroll.soa"+this.PId),this.slider.release())},p.destroy=function(){},MasterSlider.registerPlugin(StartOnAppear)}}(jQuery,document,window),function(){window.msCli=function(f){f=f||"pause";var m=masterslider_instances;for(var i in m)m[i].api[f]()}}(jQuery);
|
|