WordPress Page Builder – Beaver Builder - Version 2.0.5

Version Description

Download this release

Release Info

Developer pross
Plugin Icon 128x128 WordPress Page Builder – Beaver Builder
Version 2.0.5
Comparing to
See all releases

Code changes from version 2.0.4.4 to 2.0.5

changelog.txt CHANGED
@@ -1,3 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>2.0.4.4 - 02/05/2018</h4>
2
  <p><strong>Hotfix</strong></p>
3
  <ul>
1
+ <h4>2.0.5 - 02/15/2018</h4>
2
+ <p><strong>Enhancements</strong></p>
3
+ <ul>
4
+ <li>Plugin Icons are now shown in the updates core page.</li>
5
+ <li>Global JS is not included if safe mode is enabled.</li>
6
+ <li>Added url connection to HTML module.</li>
7
+ <li>Updated translation files.</li>
8
+ </ul>
9
+ <p><strong>Bug Fixes</strong></p>
10
+ <ul>
11
+ <li>Fixed Custom module SVG icons not displaying.</li>
12
+ <li>Fixed issue with GoDaddy stock photo dropdown hidden in Lite version.</li>
13
+ <li>Fixed Load More button on Posts Module when there are 1000s of posts.</li>
14
+ <li>Fixed row background fallback image on row backgrounds on mobile for Youtube and Vimeo.</li>
15
+ <li>Fixed conflict with Button Module Lightbox and contact form.</li>
16
+ <li>Fixed missing trailing slash in paths passed to <code>fl_builder_locate_template_order</code> filter.</li>
17
+ <li>Fixed undefined variable in Post Slider module.</li>
18
+ <li>Fixed column width on column parent settings not working.</li>
19
+ <li>Fixed Posts Module pagination when order is set to author.</li>
20
+ <li>Fixed Number Counter module issue with DE lang.</li>
21
+ <li>Fixed SmugMug links, they now use https.</li>
22
+ <li>Fixed mobile stuttering issue in Number Counter module.</li>
23
+ <li>Fixed shortcodes being rendered twice when other plugins filter the_content.</li>
24
+ <li>Fixed issue where poorly coded themes styles were overriding the WP Core media modal.</li>
25
+ <li>Fixed sub menu styles when more than one menu is on the page.</li>
26
+ <li>Fixed rows set to mobile only displaying on desktop on IE11.</li>
27
+ <li>Fixed the nested columns equal alignment on IE 11.</li>
28
+ </ul>
29
+
30
  <h4>2.0.4.4 - 02/05/2018</h4>
31
  <p><strong>Hotfix</strong></p>
32
  <ul>
classes/class-fl-builder-debug.php CHANGED
@@ -291,14 +291,14 @@ final class FL_Debug {
291
  }
292
 
293
  $args = array(
294
- 'name' => 'Licence',
295
  'data' => self::divider(),
296
  );
297
- self::register( 'licence', $args );
298
 
299
  if ( true === FL_BUILDER_LITE ) {
300
  $args = array(
301
- 'name' => 'Beaver Builder Licence',
302
  'data' => 'Lite version detected',
303
  );
304
  self::register( 'bb_sub_lite', $args );
@@ -306,14 +306,14 @@ final class FL_Debug {
306
  } else {
307
  $subscription = FLUpdater::get_subscription_info();
308
  $args = array(
309
- 'name' => 'Beaver Builder Licence',
310
  'data' => ( $subscription->active ) ? 'Active' : 'Not Active',
311
  );
312
  self::register( 'bb_sub', $args );
313
 
314
  if ( isset( $subscription->error ) ) {
315
  $args = array(
316
- 'name' => 'Licence Error',
317
  'data' => $subscription->error,
318
  );
319
  self::register( 'bb_sub_err', $args );
291
  }
292
 
293
  $args = array(
294
+ 'name' => 'License',
295
  'data' => self::divider(),
296
  );
297
+ self::register( 'license', $args );
298
 
299
  if ( true === FL_BUILDER_LITE ) {
300
  $args = array(
301
+ 'name' => 'Beaver Builder License',
302
  'data' => 'Lite version detected',
303
  );
304
  self::register( 'bb_sub_lite', $args );
306
  } else {
307
  $subscription = FLUpdater::get_subscription_info();
308
  $args = array(
309
+ 'name' => 'Beaver Builder License',
310
  'data' => ( $subscription->active ) ? 'Active' : 'Not Active',
311
  );
312
  self::register( 'bb_sub', $args );
313
 
314
  if ( isset( $subscription->error ) ) {
315
  $args = array(
316
+ 'name' => 'License Error',
317
  'data' => $subscription->error,
318
  );
319
  self::register( 'bb_sub_err', $args );
classes/class-fl-builder-loader.php CHANGED
@@ -25,7 +25,10 @@ if ( ! class_exists( 'FLBuilderLoader' ) ) {
25
  $lite_active = is_plugin_active( $lite_dirname . '/fl-builder.php' );
26
  $plugin_dirname = basename( dirname( dirname( __FILE__ ) ) );
27
 
28
- if ( class_exists( 'FLBuilder' ) || ( $plugin_dirname != $lite_dirname && $lite_active ) ) {
 
 
 
29
  add_action( 'admin_notices', __CLASS__ . '::double_install_admin_notice' );
30
  add_action( 'network_admin_notices', __CLASS__ . '::double_install_admin_notice' );
31
  return;
@@ -43,7 +46,7 @@ if ( ! class_exists( 'FLBuilderLoader' ) ) {
43
  * @return void
44
  */
45
  static private function define_constants() {
46
- define( 'FL_BUILDER_VERSION', '2.0.4.4' );
47
  define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
48
  define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
49
  define( 'FL_BUILDER_URL', plugins_url( '/', FL_BUILDER_FILE ) );
25
  $lite_active = is_plugin_active( $lite_dirname . '/fl-builder.php' );
26
  $plugin_dirname = basename( dirname( dirname( __FILE__ ) ) );
27
 
28
+ if ( $lite_active && $plugin_dirname != $lite_dirname ) {
29
+ deactivate_plugins( array( $lite_dirname . '/fl-builder.php' ), false, is_network_admin() );
30
+ return;
31
+ } elseif ( class_exists( 'FLBuilder' ) ) {
32
  add_action( 'admin_notices', __CLASS__ . '::double_install_admin_notice' );
33
  add_action( 'network_admin_notices', __CLASS__ . '::double_install_admin_notice' );
34
  return;
46
  * @return void
47
  */
48
  static private function define_constants() {
49
+ define( 'FL_BUILDER_VERSION', '2.0.5' );
50
  define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
51
  define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
52
  define( 'FL_BUILDER_URL', plugins_url( '/', FL_BUILDER_FILE ) );
classes/class-fl-builder-loop.php CHANGED
@@ -186,6 +186,14 @@ final class FLBuilderLoop {
186
  $args['meta_key'] = $settings->order_by_meta_key;
187
  }
188
 
 
 
 
 
 
 
 
 
189
  // Build the author query.
190
  if ( ! empty( $users ) ) {
191
 
186
  $args['meta_key'] = $settings->order_by_meta_key;
187
  }
188
 
189
+ // Order by author
190
+ if ( 'author' == $order_by ) {
191
+ $args['orderby'] = array(
192
+ 'author' => $order,
193
+ 'date' => $order,
194
+ );
195
+ }
196
+
197
  // Build the author query.
198
  if ( ! empty( $users ) ) {
199
 
classes/class-fl-builder-module.php CHANGED
@@ -159,23 +159,6 @@ class FLBuilderModule {
159
  $this->editor_export = isset( $params['editor_export'] ) ? $params['editor_export'] : true;
160
  $this->partial_refresh = isset( $params['partial_refresh'] ) ? $params['partial_refresh'] : false;
161
 
162
- // Icon requires dir be defined before calling get_icon()
163
- $this->icon = isset( $params['icon'] ) ? $this->get_icon( $params['icon'] ) : $this->get_icon();
164
-
165
- $details = apply_filters( 'fl_builder_module_details', array(
166
- 'name' => $params['name'],
167
- 'description' => $params['description'],
168
- 'category' => $this->normalize_category_name( $params['category'] ),
169
- 'group' => isset( $params['group'] ) ? $params['group'] : false,
170
- 'icon' => $this->icon,
171
- ), $this->slug );
172
-
173
- $this->name = $details['name'];
174
- $this->description = $details['description'];
175
- $this->category = $details['category'];
176
- $this->group = $details['group'];
177
- $this->icon = $details['icon'];
178
-
179
  // We need to normalize the paths here since path comparisons
180
  // break on Windows because they use backslashes.
181
  $abspath = str_replace( '\\', '/', ABSPATH );
@@ -203,6 +186,22 @@ class FLBuilderModule {
203
  $this->url = trailingslashit( FL_BUILDER_URL . 'modules/' . $this->slug );
204
  $this->dir = trailingslashit( FL_BUILDER_DIR . 'modules/' . $this->slug );
205
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  }
207
 
208
  /**
159
  $this->editor_export = isset( $params['editor_export'] ) ? $params['editor_export'] : true;
160
  $this->partial_refresh = isset( $params['partial_refresh'] ) ? $params['partial_refresh'] : false;
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  // We need to normalize the paths here since path comparisons
163
  // break on Windows because they use backslashes.
164
  $abspath = str_replace( '\\', '/', ABSPATH );
186
  $this->url = trailingslashit( FL_BUILDER_URL . 'modules/' . $this->slug );
187
  $this->dir = trailingslashit( FL_BUILDER_DIR . 'modules/' . $this->slug );
188
  }
189
+ // Icon requires dir be defined before calling get_icon()
190
+ $this->icon = isset( $params['icon'] ) ? $this->get_icon( $params['icon'] ) : $this->get_icon();
191
+
192
+ $details = apply_filters( 'fl_builder_module_details', array(
193
+ 'name' => $params['name'],
194
+ 'description' => $params['description'],
195
+ 'category' => $this->normalize_category_name( $params['category'] ),
196
+ 'group' => isset( $params['group'] ) ? $params['group'] : false,
197
+ 'icon' => $this->icon,
198
+ ), $this->slug );
199
+
200
+ $this->name = $details['name'];
201
+ $this->description = $details['description'];
202
+ $this->category = $details['category'];
203
+ $this->group = $details['group'];
204
+ $this->icon = $details['icon'];
205
  }
206
 
207
  /**
classes/class-fl-builder.php CHANGED
@@ -793,8 +793,8 @@ final class FLBuilder {
793
  // Try to find the specific template, then repeat the same process for general.
794
 
795
  $locate_template_order = apply_filters( 'fl_builder_locate_template_order', array(
796
- self::$template_dir . $specific_template,
797
- self::$template_dir . $general_template,
798
  ), self::$template_dir, $template_base, $slug );
799
 
800
  $template_path = locate_template( $locate_template_order );
@@ -1642,6 +1642,9 @@ final class FLBuilder {
1642
  // Remove empty lines.
1643
  $content = preg_replace( '/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/', "\n", $content );
1644
 
 
 
 
1645
  return apply_filters( 'fl_builder_editor_content', $content );
1646
  }
1647
 
@@ -2673,7 +2676,7 @@ final class FLBuilder {
2673
  $path = $include_global ? $asset_info['js'] : $asset_info['js_partial'];
2674
 
2675
  // Render the global js.
2676
- if ( $include_global ) {
2677
  $js .= self::render_global_js();
2678
  }
2679
 
@@ -2688,8 +2691,10 @@ final class FLBuilder {
2688
  }
2689
 
2690
  // Add the layout settings JS.
2691
- $js .= self::render_global_nodes_custom_code( 'js' );
2692
- $js .= ( is_array( $layout_settings->js ) || is_object( $layout_settings->js ) ) ? json_encode( $layout_settings->js ) : $layout_settings->js;
 
 
2693
 
2694
  // Call the FLBuilder._renderLayoutComplete method if we're currently editing.
2695
  if ( stristr( $asset_info['js'], '-draft.js' ) || stristr( $asset_info['js'], '-preview.js' ) ) {
793
  // Try to find the specific template, then repeat the same process for general.
794
 
795
  $locate_template_order = apply_filters( 'fl_builder_locate_template_order', array(
796
+ trailingslashit( self::$template_dir ) . $specific_template,
797
+ trailingslashit( self::$template_dir ) . $general_template,
798
  ), self::$template_dir, $template_base, $slug );
799
 
800
  $template_path = locate_template( $locate_template_order );
1642
  // Remove empty lines.
1643
  $content = preg_replace( '/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/', "\n", $content );
1644
 
1645
+ // Strip shortcodes since some plugins parse them early causing them to be parsed twice.
1646
+ $content = preg_replace( '/\[.*\]/', '', $content );
1647
+
1648
  return apply_filters( 'fl_builder_editor_content', $content );
1649
  }
1650
 
2676
  $path = $include_global ? $asset_info['js'] : $asset_info['js_partial'];
2677
 
2678
  // Render the global js.
2679
+ if ( $include_global && ! isset( $_GET['safemode'] ) ) {
2680
  $js .= self::render_global_js();
2681
  }
2682
 
2691
  }
2692
 
2693
  // Add the layout settings JS.
2694
+ if ( ! isset( $_GET['safemode'] ) ) {
2695
+ $js .= self::render_global_nodes_custom_code( 'js' );
2696
+ $js .= ( is_array( $layout_settings->js ) || is_object( $layout_settings->js ) ) ? json_encode( $layout_settings->js ) : $layout_settings->js;
2697
+ }
2698
 
2699
  // Call the FLBuilder._renderLayoutComplete method if we're currently editing.
2700
  if ( stristr( $asset_info['js'], '-draft.js' ) || stristr( $asset_info['js'], '-preview.js' ) ) {
css/fl-builder-layout.css CHANGED
@@ -194,7 +194,7 @@
194
  }
195
 
196
  /* IE 11 - Row full height - vertical alignment center/bottom fix */
197
- .fl-builder-ie-11 .fl-row.fl-row-full-height {
198
  display: flex;
199
  flex-direction: column;
200
  height: 100%;
@@ -355,8 +355,11 @@
355
  }
356
 
357
  /* IE11 fix for images with height:auto in equal height columns. */
 
 
 
358
  .fl-builder-ie-11 .fl-col-group-equal-height .fl-module,
359
- .fl-col-group-equal-height.fl-col-group-align-center .fl-col-group {
360
  min-height: 1px;
361
  }
362
 
194
  }
195
 
196
  /* IE 11 - Row full height - vertical alignment center/bottom fix */
197
+ .fl-builder-ie-11 .fl-row.fl-row-full-height:not(.fl-visible-medium):not(.fl-visible-medium-mobile):not(.fl-visible-mobile) {
198
  display: flex;
199
  flex-direction: column;
200
  height: 100%;
355
  }
356
 
357
  /* IE11 fix for images with height:auto in equal height columns. */
358
+ .fl-builder-ie-11 .fl-col-group-equal-height,
359
+ .fl-builder-ie-11 .fl-col-group-equal-height .fl-col,
360
+ .fl-builder-ie-11 .fl-col-group-equal-height .fl-col-content,
361
  .fl-builder-ie-11 .fl-col-group-equal-height .fl-module,
362
+ .fl-col-group-equal-height.fl-col-group-align-center .fl-col-group {
363
  min-height: 1px;
364
  }
365
 
css/fl-builder.css CHANGED
@@ -3722,6 +3722,9 @@ i.fl-field-responsive-toggle:hover {
3722
  .fl-builder-edit .media-frame {
3723
  -webkit-backface-visibility: hidden;
3724
  }
 
 
 
3725
  .fl-builder-edit .media-modal-content .thumbnail {
3726
  padding: 0;
3727
  border: none;
@@ -3735,6 +3738,9 @@ i.fl-field-responsive-toggle:hover {
3735
  .fl-builder-edit .media-frame.hide-menu {
3736
  visibility: visible;
3737
  }
 
 
 
3738
 
3739
  /* Multiple Photo Fields */
3740
  .fl-multiple-photos-lightbox .gallery-settings,
3722
  .fl-builder-edit .media-frame {
3723
  -webkit-backface-visibility: hidden;
3724
  }
3725
+ .fl-builder-edit .media-modal-content h1 {
3726
+ font-family: inherit;
3727
+ }
3728
  .fl-builder-edit .media-modal-content .thumbnail {
3729
  padding: 0;
3730
  border: none;
3738
  .fl-builder-edit .media-frame.hide-menu {
3739
  visibility: visible;
3740
  }
3741
+ span.select2-container.select2-container--open {
3742
+ z-index: 9999999;
3743
+ }
3744
 
3745
  /* Multiple Photo Fields */
3746
  .fl-multiple-photos-lightbox .gallery-settings,
css/fl-builder.min.css CHANGED
@@ -1 +1 @@
1
- #wpadminbar,html{transition-duration:.35s}.fl-builder-button,.fl-builder-edit .fl-builder-content{-webkit-touch-callout:none;-webkit-user-select:none;-ms-user-select:none}.fl-builder-badge,.fl-builder-bar-title span{vertical-align:middle}.fl-theme-builder-preview-select-title i:before,body .fl-theme-builder-preview-select .fa-caret-down i:before,body .fl-theme-builder-preview-select-item-title i:before{content:"\f078"}.fl-builder-edit .media-frame,.fl-lightbox-wrap{-webkit-backface-visibility:hidden}html{transition-property:margin}html.fl-builder-is-showing-toolbar{margin-top:46px!important}.fl-builder-edit body{position:static!important}.fl-builder-edit:after,.fl-builder-edit:before{z-index:0!important}.fl-builder-edit .fl-builder-content{-moz-user-select:none;user-select:none}#wpadminbar{transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;-webkit-transform-origin:bottom;transform-origin:bottom;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-transform:rotateX(89deg) translateY(46px);transform:rotateX(89deg) translateY(46px);opacity:0;pointer-events:none;will-change:transform}html.fl-builder-show-admin-bar{margin-top:32px}html.fl-builder-show-admin-bar #wpadminbar{-webkit-transform:rotateX(0) translateY(0);transform:rotateX(0) translateY(0);pointer-events:auto;opacity:1}@media screen and (max-width:782px){html.fl-builder-show-admin-bar{margin-top:46px}}.fl-clear{clear:both}.screen-reader-text{position:absolute;left:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}.fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(240,240,240,.8);bottom:0;display:none;left:0;position:fixed;right:0;text-align:center;top:0;z-index:12000000}.fl-builder-settings .fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(255,255,255,.8);display:block;position:absolute}.fl-field-loader{color:#B3B3B3!important;font-style:italic}.fl-builder-node-loading{opacity:.35}.fl-builder-node-loading-placeholder{background:url(../img/ajax-loader.svg) center center no-repeat;height:50px}.fl-col-group-has-child-loading{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-col-group-has-child-loading>.fl-builder-node-loading-placeholder{width:50px}.fl-builder-content-editing .fl-visible-desktop,.fl-builder-content-editing .fl-visible-desktop-medium,.fl-builder-content-editing .fl-visible-medium,.fl-builder-content-editing .fl-visible-medium-mobile,.fl-builder-content-editing .fl-visible-mobile{display:block!important}.fl-responsive-preview-mask{background:#F7F7F7;bottom:0;left:0;position:fixed;right:0;top:0;z-index:99999}.fl-responsive-preview{bottom:0;left:0;position:absolute;right:0;top:0;z-index:100000}.fl-builder-preview .fl-responsive-preview{margin:0!important}.fl-responsive-preview-content{background:#F5F7F9;padding:20px 20px 45px}.fl-responsive-preview-message{color:#b3b3b3;font-family:Helvetica,Arial,Verdana,sans-serif;font-size:14px;font-weight:400;padding:0 20px 20px;text-align:center}.fl-builder-button,body .fl-builder-bar .fl-builder-bar-content{display:-webkit-box;display:-ms-flexbox;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-responsive-preview-message i{cursor:pointer;margin-left:3px}.fl-responsive-preview .fl-builder-content{box-shadow:0 0 8px rgba(0,0,0,.2);margin-left:auto;margin-right:auto;max-width:100%}.fl-builder-button{color:#676F7A!important;fill:#676F7A!important;background:#E4E7EA;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:flex;text-decoration:none;font-size:14px!important;font-weight:500!important;line-height:1!important;height:33px;margin:0;padding:0 12px;cursor:pointer;-webkit-border-radius:3px;-webkit-appearance:none;border:2px solid transparent;border-radius:3px;letter-spacing:normal!important;white-space:nowrap;box-sizing:border-box!important;transition-property:background-color,width;transition-duration:.2s;-moz-user-select:none;user-select:none}.fl-builder--search-results-panel,.fl-builder-bar,.fl-builder-panel{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-touch-callout:none}.fl-builder-button:hover{background:#dadfe5;color:#222;border:2px solid transparent!important}.fl-builder-button:active{background:#DCDCDC}button.fl-builder-button:focus{position:static;top:auto;outline:0;background:#E4E7EA;border:2px solid #00A0D0!important}.fl-builder-bar .fl-builder-button{height:auto}.fl-builder-button-primary,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button{background:#00A0D2;color:#fff!important;text-decoration:none;border:2px solid transparent!important}.fl-builder-button.fl-builder-button-primary:focus,body.fl-builder--layout-has-drafted-changes .fl-builder-button.fl-builder-done-button:focus{background:#00A0D2;border:2px solid #ffc217!important}.fl-builder-button-primary:hover,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:hover{background:#0197C6;color:#fff!important}.fl-builder-button-primary:active,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:active{background:#0484AC}.fl-builder-button-large{height:30px}.fl-builder-button-small{font-size:11px!important;line-height:1!important}.fl-builder-help-button{color:#b3b3b3;font-size:16px!important}.fl-builder-help-button i{position:relative;top:-1px}.fl-builder-help-button:hover{color:#666}.fl-builder-publish-button{line-height:45px!important}.fl-builder-content-panel-button,.fl-builder-content-panel-button:hover{fill:#00A0D2!important;font-size:30px!important;padding-bottom:4px}.fl-builder-button-silent,.fl-builder-button-silent:hover{padding:0 12px;background:0 0!important;border:2px solid transparent!important;box-shadow:none!important}.fl-builder-done-button,.fl-builder-done-button:hover{font-weight:600}.fl-field .fl-builder-button{display:inline-block;height:auto;padding:11px 12px;vertical-align:middle;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.fl-builder-badge{background:#333;border-radius:2px;color:#fff!important;display:inline;font-size:11px!important;font-weight:400;letter-spacing:1px;margin-left:2px;padding:2px 4px}.fl-builder-badge-global{background:#ff9600;-webkit-transform:translateY(0);transform:translateY(0);transition-duration:.25s;transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform}.fl-builder-blocks-node-template .fl-builder-badge-global{position:absolute;right:0;top:0}.fl-builder-block:hover .fl-builder-badge-global{display:none}.fl-builder-bar{left:0;position:fixed;right:0;top:0;z-index:999999;user-select:none;transition-property:-webkit-transform opacity;transition-property:transform opacity;transition-property:transform opacity,-webkit-transform opacity;transition-duration:.35s;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;-webkit-perspective:1100px;perspective:1100px}.fl-builder-bar.is-hidden{pointer-events:none}.fl-builder-bar.is-hidden .fl-builder-bar-content{-webkit-transform:translateY(-100%) rotateX(90deg);transform:translateY(-100%) rotateX(90deg)}body .fl-builder-bar .fl-builder-bar-content{display:flex;box-sizing:border-box;background:#fff;border-bottom:2px solid #D5DADD;color:#999;font-size:14px!important;height:48px;transition-property:background-color,opacity,-webkit-transform;transition-property:background-color,opacity,transform;transition-property:background-color,opacity,transform,-webkit-transform;transition-duration:.35s;pointer-events:auto}.fl-builder-bar-title,.fl-builder-bar-title-icon{display:-webkit-box;display:-ms-flexbox;box-sizing:border-box}.fl-builder-draggable-is-dragging .fl-builder-content,.fl-builder-draggable-is-dragging .fl-builder-panel .fl-lightbox,.fl-builder-resizable-is-resizing .fl-builder-content,.fl-builder-resizable-is-resizing .fl-builder-panel .fl-lightbox,body .fl-builder-bar .fl-builder-bar-content.is-muted{pointer-events:none}body .fl-builder-bar .fl-builder-bar-content.is-muted>:not(.fl-builder-publish-actions){-webkit-filter:saturate(20%) blur(1px);filter:saturate(20%) blur(1px);opacity:.4}.fl-builder-bar-title{color:#333;display:flex;-webkit-box-flex:0;-ms-flex:0 0 380px;flex:0 0 380px;max-width:380px;border-right:2px solid #D5DADD;cursor:pointer}.fl-builder-bar-title:hover{background:#fff}.fl-builder-bar-title.is-showing-menu .fl-builder-bar-title-caret>svg{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fl-builder-simple .fl-builder-bar-title{cursor:auto}.fl-builder-simple .fl-builder-bar-title:hover{cursor:auto;background:0 0}.fl-builder-bar-title-icon{background:0 0;-webkit-box-flex:0;-ms-flex:0 0 46px;flex:0 0 46px;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:4px}.fl-builder-bar-title-icon img{max-width:100%!important;height:auto!important}.fl-builder-bar-title.fl-builder-bar-title-no-icon{padding-left:12px}.fl-builder-bar-title-area{box-sizing:border-box;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:4px}.fl-builder-layout-title,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{font-size:17px;font-weight:400;line-height:1.3;color:#161B20;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret,.fl-builder-layout-pretitle,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{font-size:12px;font-weight:500;line-height:1.3;color:#656d77;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret i,.fl-theme-builder-preview-select-title i{color:inherit!important;font-size:14px}.fl-builder-bar-title-caret{margin-left:auto!important;-webkit-box-flex:0;-ms-flex:0 0 46px;flex:0 0 46px}.fl-theme-builder-preview-select-title i{padding:12px}.fl-theme-builder-preview-select.fl-builder-button{position:relative;border-radius:0;background:0 0;min-width:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 360px;flex:0 0 360px;max-width:360px;margin:0!important;padding:4px 10px;border:none!important;border-right:2px solid #d5dadd!important;box-shadow:none}.fl-theme-builder-preview-select.fl-builder-button:hover{border:none!important;border-right:2px solid #d5dadd!important}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fl-theme-builder-preview-select-title div{-webkit-box-flex:1;-ms-flex:1;flex:1}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{display:block}.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items{position:absolute;top:calc(48px + 10px);left:10px;width:calc(100% - 20px)!important;background:#fff;border-radius:4px;border:2px solid #D5DADD;border-top:3px solid #00a0d2;box-shadow:0 15px 45px 8px rgba(0,0,0,.04);margin:0!important;padding:0;z-index:-1;font-size:16px;overflow:visible;height:auto!important;max-height:calc(100vh - 66px);min-height:300px;display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.fl-theme-builder-preview-select-item{padding:4px 0!important;border-bottom:none!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.fl-theme-builder-preview-select-item:hover{text-decoration:none;color:#111;background:0 0!important}body .fl-theme-builder-preview-select .fa-caret-down{float:none}body .fl-theme-builder-preview-select-item-title{padding:10px 15px;color:#222;font-size:14px}body .fl-theme-builder-preview-select-item-children{overflow:auto}body .fl-theme-builder-preview-select-item-child{overflow:hidden;text-overflow:ellipsis;line-height:1.1;margin:0 10px;border:2px solid transparent;border-radius:4px;padding:8px 10px 10px;font-size:14px;font-weight:400;color:#222}body .fl-theme-builder-preview-select-item-child:hover{background:#e6eaed!important}.fl-theme-builder-preview-select-item .fa-caret-down{color:#606D77}.fl-builder-bar-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;padding:4px}.fl-builder-bar .fl-builder-button{margin:0 0 0 4px}.fl-builder-bar-actions .fl-builder-button:last-child{margin:0}.fl-builder-bar-actions:after{clear:both}.fl-builder-bar .fl-builder-content-panel-button{-webkit-box-align:baseline!important;-ms-flex-align:baseline!important;align-items:baseline!important;padding-top:1px;font-weight:400}.fl-builder-content-panel-button svg{transition-property:-webkit-transform;transition-property:transform;transition-property:transform,-webkit-transform;transition-duration:.25s;-webkit-transform:rotate(0) scale(1);transform:rotate(0) scale(1);-webkit-transform-origin:center;transform-origin:center}.fl-builder-content-panel-is-showing .fl-builder-content-panel-button svg{-webkit-transform:rotate(135deg) scale(1.1) translate(.5px,-.5px);transform:rotate(135deg) scale(1.1) translate(.5px,-.5px)}.fl-builder--saving-indicator{cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;padding:0 16px;font-size:1em;font-style:italic;color:#676f7a}.fl-builder--saving-indicator:hover{color:#676f7a}.fl-builder--saving-indicator .fa-question-circle{font-size:13px;margin:3px 0 3px 8px}.fl-builder-buy-button,.fl-builder-upgrade-button{background:#F7A407;color:#fff!important;text-decoration:none}.fl-builder-buy-button i.fa-external-link-square,.fl-builder-upgrade-button i.fa-external-link-square{color:#FFC733;margin:0 0 0 6px}.fl-builder-buy-button:hover,.fl-builder-upgrade-button:hover{background:#EE8E0D;color:#fff!important}@media (max-width:980px){.fl-builder--main-menu-panel{width:calc(100% - 20px)!important}.fl-builder--main-menu-panel:before{right:auto;left:20px}.fl-builder-bar-title,.fl-theme-builder-preview-select{-webkit-box-flex:1!important;-ms-flex:1 .5 380px!important;flex:1 .5 380px!important}}@media (max-width:620px){.fl-theme-builder-preview-select.fl-builder-button{display:none}}@media (max-width:500px){.fl-builder--main-menu-panel:before,.fl-builder-bar-title-area,.fl-builder-panel-drag-handle,.fl-builder-panel:before{display:none}.fl-builder--main-menu-panel,.fl-builder-panel{width:auto!important;top:44px!important;left:0!important;right:0!important;bottom:0!important;border-radius:0!important;box-shadow:none!important}.fl-builder--main-menu-panel{border-left:transparent!important;border-right:transparent!important;border-bottom:transparent!important;max-height:calc(100% - 44px)!important}.fl-builder-bar-title{-webkit-box-flex:0!important;-ms-flex:0 0 100px!important;flex:0 0 100px!important}.fl-builder--panel-header{border-radius:0!important;cursor:default!important}.fl-builder--panel-header .fl-builder--tabs{cursor:default!important}.fl-builder-publish-actions{width:100%!important}.fl-builder-bar-actions .fl-builder-button{padding:0 8px!important}}.fl-builder--preview-actions{display:none;position:fixed;top:4px;left:4px;z-index:100008;padding:4px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder-preview .fl-builder--preview-actions{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-builder--preview-actions .device-icons{color:#555;background:#e4e4e4;border:none!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;text-decoration:none;font-size:14px!important;line-height:1!important;margin:0 4px 0 0;padding:0 6px;cursor:pointer;-webkit-border-radius:3px;-webkit-appearance:none;border-radius:3px}.fl-builder--preview-actions .device-icons i{margin:0 6px}@-webkit-keyframes fl-builder-ui-pin-zone-pulse{0%,100%{opacity:1;filter:alpha( opacity=1 )}50%{opacity:.5;filter:alpha( opacity=35 )}}@keyframes fl-builder-ui-pin-zone-pulse{0%,100%{opacity:1;filter:alpha( opacity=1 )}50%{opacity:.5;filter:alpha( opacity=35 )}}.fl-builder-ui-pin-zone{-webkit-animation:fl-builder-ui-pin-zone-pulse 2s infinite;animation:fl-builder-ui-pin-zone-pulse 2s infinite;transition:width .3s ease;background:rgba(0,160,210,.5);bottom:0;top:0;position:fixed;width:35px;z-index:100001}.fl-builder-ui-show-pin-zone-left .fl-builder-ui-pin-zone-left,.fl-builder-ui-show-pin-zone-right .fl-builder-ui-pin-zone-right{width:75px}.fl-builder-ui-pin-zone-left{left:0}.fl-builder-ui-pin-zone-right{right:0}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button{display:-webkit-box!important;display:-ms-flexbox!important;display:flex!important;background:rgba(0,160,210,.5)!important;padding:2px 4px;width:80px;-webkit-animation:fl-builder-ui-pin-zone-pulse 2s infinite;animation:fl-builder-ui-pin-zone-pulse 2s infinite}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button svg{display:none}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button{width:120px}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button svg{display:none!important;width:100%;-webkit-transform:none!important;transform:none!important;fill:#00A0D2!important;border-radius:3px}.fl-builder-ui-is-pinned .fl-builder-content-panel-button,.fl-builder-ui-pinned-container .fl-lightbox-controls{display:none}.fl-builder-content-panel-pin-zone .fl-builder-done-button{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.fl-builder-panel.fl-builder-ui-pinned{top:48px!important;bottom:0!important;height:auto!important;border-radius:0;border:none;box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s;z-index:9}.fl-builder-panel.fl-builder-ui-pinned-right{left:auto!important;right:0;border-left:2px solid #d5dadd}.fl-builder-panel.fl-builder-ui-pinned-left{left:0;right:auto;border-right:2px solid #d5dadd}.fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-radius:0!important}.fl-builder-ui-pinned-container .fl-lightbox-wrap{position:absolute;z-index:9}.fl-builder-ui-pinned-container .fl-lightbox{position:absolute;top:0;bottom:0;left:0;right:0;width:auto!important;height:auto;border-radius:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-builder-ui-pinned-container .fl-lightbox-header-wrap{border-radius:0}.fl-builder-ui-pinned-container .fl-lightbox.ui-draggable .fl-lightbox-header{cursor:auto}.fl-builder-ui-pinned-container .fl-lightbox-header h1{padding:12px 20px 10px!important}.fl-builder-ui-pinned-content-transform{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:center top 0;transform-origin:center top 0}.fl-builder-ui-pinned-collapse{cursor:pointer;display:none;position:absolute!important;bottom:2px;padding:5px;border:2px solid transparent;background:0 0;width:36px;height:36px;border-radius:4px;fill:#778794;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.fl-builder-ui-pinned-collapse:focus,.fl-builder-ui-pinned-collapse:hover{top:auto!important;background:0 0;border:2px solid transparent;outline:0;fill:#00A0D2}.fl-builder-ui-pinned-collapse:focus{background:#E4E7EA}.fl-builder-ui-pinned-collapse>*{margin:auto;line-height:1}.fl-builder-ui-pinned-collapse svg g{fill:inherit}.fl-builder-ui-is-pinned-right .fl-builder-ui-pinned-right-collapse{display:-webkit-box;display:-ms-flexbox;display:flex;left:-40px}.fl-builder-ui-is-pinned-left .fl-builder-ui-pinned-left-collapse{display:-webkit-box;display:-ms-flexbox;display:flex;right:-40px}.fl-builder-ui-pinned-collapse i[data-toggle=show],.fl-builder-ui-pinned-is-collapsed i[data-toggle=hide]{display:none}.fl-builder-ui-pinned-is-collapsed i[data-toggle=show]{display:block}.fl-builder-ui-is-pinned-left [data-toggle=hide],.fl-builder-ui-is-pinned-right [data-toggle=show]{-webkit-transform:rotateY(180deg);transform:rotateY(180deg)}.fl-builder-ui-pinned-is-collapsed .fl-lightbox{box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none}.fl-builder-ui-pinned-is-collapsed .fl-builder--panel-header{display:none}@-webkit-keyframes fl-builder-show-panel{from{-webkit-transform:scale(.8);transform:scale(.8)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes fl-builder-show-panel{from{-webkit-transform:scale(.8);transform:scale(.8)}to{-webkit-transform:scale(1);transform:scale(1)}}.fl-builder--search-results-panel,.fl-builder-panel{box-sizing:border-box;position:fixed!important;right:20px;top:calc(48px + 10px);width:380px;bottom:20px;background:#F5F7F9;color:#676F7A;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;border-radius:4px;box-shadow:0 8px 40px 4px rgba(0,0,0,.3);z-index:10000007;will-change:transform;display:none;user-select:none}.fl-builder-panel{-webkit-transform-origin:top right;transform-origin:top right;-webkit-animation-name:fl-builder-show-panel;animation-name:fl-builder-show-panel;-webkit-animation-duration:.15s;animation-duration:.15s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.fl-builder--search-results-panel{position:absolute;right:0;top:93px;left:0;bottom:0;width:auto!important;border:none;border-radius:0;box-shadow:none;min-height:100px;max-height:calc(100vh - 54px);overflow:auto;z-index:1}.fl-builder-content-panel-is-showing .fl-builder-panel,.fl-builder-search-results-panel-is-showing .fl-builder--search-results-panel{display:block}.fl-builder-panel .fl-lightbox .fl-builder-panel-drag-handle,.fl-builder-ui-is-pinned .fl-builder--panel-arrow,.fl-lightbox-width-full .fl-builder-panel-drag-handle,body.fl-builder-draggable-is-dragging .fl-builder--panel-arrow{display:none}.fl-builder-content-panel-is-showing .fl-builder-panel.fl-builder--current-view-templates{width:520px}.fl-builder--search-results-panel .fl-builder--no-results{text-align:center;padding:50px 20px}.fl-builder--panel-arrow{position:absolute;top:-13px;right:10px}.fl-builder--panel-arrow polygon{fill:#00a0d2}.fl-builder--panel-header{background:#fff;border-top:3px solid #00a0d2;border-bottom:2px solid #e6eaed;border-top-right-radius:4px;border-top-left-radius:4px}.fl-builder-ui-is-pinned .fl-builder--panel-header{border-top-color:transparent}.fl-builder-panel-drag-handle{position:absolute;top:7px;left:10px;fill:#ccd4da;width:6px}.fl-builder-ui-is-pinned-left .fl-builder-panel-drag-handle{left:auto;right:10px}.fl-builder--panel-header .fl-builder--panel-controls{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;position:relative}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-content-group-select{-webkit-box-flex:1;-ms-flex:1 1;flex:1 1}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-panel-search{-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;padding:0 10px 6px 0;margin-left:-4px}.fl-builder--panel-controls .fl-builder-panel-search button{width:38px;background:0 0!important;border:2px solid transparent!important;font-size:inherit;height:38px;padding:0}.fl-builder--panel-controls .fl-builder-panel-search button:active,.fl-builder--panel-controls .fl-builder-panel-search button:focus{top:0;outline:0}.fl-builder-panel-search button svg{height:auto;width:20px}.fl-builder-panel-search button.fl-builder-dismiss-panel-search svg{width:16px}.fl-builder-panel-search button svg .filled-shape{fill:#000}.fl-builder--panel-controls .fl-builder-panel-search button:active svg .filled-shape,.fl-builder--panel-controls .fl-builder-panel-search button:focus svg .filled-shape{fill:#00A0D2}.fl-builder-panel-search .fl-builder-panel-search-input{display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:#fff}.fl-builder-panel-search.is-showing-input .fl-builder-panel-search-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;padding:0 10px 6px}.fl-builder-panel-search-input input{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;border:2px solid #e6eaed;background:#fff;border-radius:4px;margin-right:4px;padding:10px;color:#333}.fl-builder-panel-search-input input:focus{border-color:#0197C6;outline:0}.fl-builder-panel-search-input button{-webkit-box-flex:0;-ms-flex:0 0 38px;flex:0 0 38px}.fl-builder-panel-content-wrap{bottom:0;height:auto;left:0;overflow:hidden;position:absolute;right:0;top:43px}.fl-builder-panel-content{padding-bottom:60px}.fl-builder-blocks-section{border-top:2px solid #e6eaed}.fl-builder--panel-view .fl-builder-blocks-section:first-child{border-top:none}.fl-builder-blocks-group:first-child{padding:20px 0 0}.fl-builder-blocks-group .fl-builder-blocks-section-group-name{display:block;padding:0 30px 15px;color:#000;font-size:20px;font-weight:600;line-height:1.4}.fl-builder-blocks-section .fl-builder-block,.fl-builder-blocks-section .fl-builder-blocks-section-title{display:block;line-height:1.1;padding:15px 20px}.fl-builder--template-collection-section-name,.fl-builder-blocks-section .fl-builder-blocks-section-title{display:inline-block;font-weight:700;font-size:12px;line-height:1.2;text-transform:uppercase;color:#333;padding:4px 10px 4px 15px;margin:0!important;background:#e6eaed;border-bottom-right-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.fl-builder-blocks-section .fl-builder-blocks-section-title i{color:#bfbfbf;float:right}.fl-builder-blocks-section-content{overflow:auto;padding:10px 10px 20px}.fl-builder-blocks-section-content:after{float:none;clear:both}.fl-builder-blocks-section-content.fl-builder-modules,.fl-builder-blocks-section-content.fl-builder-rows,.fl-builder-blocks-section-content.fl-builder-widgets{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.fl-builder-blocks-section-content .fl-builder-block-module,.fl-builder-blocks-section-content .fl-builder-block-row{-webkit-box-flex:1;-ms-flex:1 1 50%;flex:1 1 50%;width:50%;box-sizing:border-box}.fl-builder--search-results-panel .fl-builder-blocks-section-content .fl-builder-block-module{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;width:100%}.fl-builder-blocks-section.fl-active .fl-builder-blocks-section-content{display:block}.fl-builder-blocks-section-content .fl-builder-block{box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:14px;line-height:1.1;font-weight:500;color:#727272}.fl-builder-block{position:relative;height:47px}.fl-builder-block.fl-builder-block-col-group{height:84px}.fl-builder-block.fl-builder-block-module-template.fl-builder-block-has-thumbnail,.fl-builder-block.fl-builder-block-row-template.fl-builder-block-has-thumbnail,.fl-builder-block.fl-builder-block-saved-module.fl-builder-block-has-thumbnail,.fl-builder-block.fl-builder-block-saved-row.fl-builder-block-has-thumbnail{padding:10px;height:auto}.fl-builder-block:hover{overflow:visible;z-index:1}.fl-builder-block:hover .fl-builder-block-content{display:block;box-sizing:border-box;position:absolute;top:0;left:0;width:100%;padding:15px 20px;border-radius:4px;background:#fff;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);text-decoration:none;color:#111;cursor:move;overflow:hidden}.fl-builder-block.fl-builder-block-module-template.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-block.fl-builder-block-row-template.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-block.fl-builder-block-saved-module.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-block.fl-builder-block-saved-row.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-blocks-node-template .fl-builder-block,.fl-builder-blocks-section-content .fl-builder-block .fl-builder-block-details{position:relative}.fl-builder-block-module:hover .fl-builder-block-content{width:auto;min-width:100%}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual{display:block;margin-bottom:7px}.fl-builder-block-drag-helper .fl-builder-block-content .fl-builder-block-visual{display:none!important}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual.fl-cols-visual{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;height:30px}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{-webkit-box-flex:1;-ms-flex:1 100%;flex:1 100%;background:#464a4c;height:30px;margin:0 2px;border-radius:2px}.fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#000}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:first-child{margin-left:0!important}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:last-child{margin-right:0!important}.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:last-child,.fl-cols-visual.left-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.right-sidebar .fl-cols-visual-col:last-child{-ms-flex-preferred-size:60px;flex-basis:60px}.fl-builder-block-saved-module.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-module:hover .fl-builder-block-title,.fl-builder-block-saved-row.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-row:hover .fl-builder-block-title{margin-right:70px}.fl-builder-block-module:nth-child(even):hover .fl-builder-block-content{left:auto;right:0}.fl-builder-block-thumbnail{border-radius:4px;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:rgba(0,0,0,.06);margin-bottom:10px;-webkit-transform-origin:bottom;transform-origin:bottom;transition-property:box-shadow,-webkit-transform;transition-property:transform,box-shadow;transition-property:transform,box-shadow,-webkit-transform;transition-duration:.15s}.fl-builder-block:hover .fl-builder-block-thumbnail{-webkit-transform:scale(1.05);transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder-block .fl-builder-block-icon{margin-right:7px;fill:#000;display:inline-block;width:20px;height:20px;vertical-align:middle}.fl-builder-block-thumbnail:before{content:"";display:block;padding-top:50%}.fl-builder-block-thumbnail img{max-width:100%;max-height:160px;margin:0;-o-object-fit:cover;object-fit:cover}.fl-builder-blocks-section-content .fl-builder-block{box-shadow:0 0 0 transparent;transition-property:box-shadow;transition-duration:.15s}.fl-builder-blocks-section-content .fl-builder-block i,.fl-user-template-actions i{color:#000;margin-right:10px}.fl-builder-blocks-separator{background:#f1f1f1;height:6px}.fl-builder-block:hover .fl-builder-badge{background:#2ea2cc}.ui-sortable-helper .fl-builder-badge{display:none!important}.fl-builder-modules-cta a{color:#999!important;display:block!important;font-size:12px!important;font-style:italic!important;padding:15px 20px!important;line-height:16px!important}.fl-builder-modules-cta a:hover{background:#e5e5e5!important;color:#666!important;text-decoration:none!important}.fl-builder-modules-cta a:focus{text-decoration:none!important}.fl-builder-modules-cta .fa{float:right!important;font-size:14px!important;margin:3px 0 0 9px!important}.fl-builder--panel-message{text-align:center;padding:40px 20px;font-size:16px}.fl-builder--panel-message .fl-builder-button{display:inline-block;padding:10px}.fl-builder--panel-cta{padding:20px 30px;font-size:16px;text-align:center}.fl-builder--panel-cta a{color:inherit;text-decoration:none}.fl-builder--panel-cta a:hover{text-decoration:none}.fl-builder-block-template-image{margin:5px 0 10px;max-width:100%;border:1px solid #dfdfdf}.fl-builder-block .fl-builder-block-title{overflow:hidden;text-overflow:ellipsis;vertical-align:middle;line-height:1.3}.ui-sortable-helper .fl-builder-block-template-image{display:none!important}@-webkit-keyframes fl-builder-template-item-enter{from{-webkit-transform:translateY(100px) scale(.3);transform:translateY(100px) scale(.3);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes fl-builder-template-item-enter{from{-webkit-transform:translateY(100px) scale(.3);transform:translateY(100px) scale(.3);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.fl-builder--template-collection{clear:both;padding:10px 0}.fl-builder--template-collection-section-content{padding:0 10px}.fl-builder--template-collection-item{box-sizing:border-box;width:50%;float:left;padding:10px;cursor:pointer;font-size:13px;-webkit-transform-origin:center;transform-origin:center;opacity:1}.fl-builder--template-thumbnail{background-size:cover;background-clip:content-box;background-position:center top;background-color:#fff;border:2px solid transparent;-webkit-transform-origin:bottom;transform-origin:bottom;transition-property:box-shadow,-webkit-transform;transition-property:transform,box-shadow;transition-property:transform,box-shadow,-webkit-transform;transition-duration:.15s}.fl-builder--template-collection-item[data-id="0"] .fl-builder--template-thumbnail,.fl-user-template .fl-builder--template-thumbnail{border-color:#e4e7ea}.fl-builder--template-thumbnail:before{display:block;content:"";padding-top:120%}.fl-builder--template-thumbnail:hover{-webkit-transform:scale(1.05);transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder--template-name{text-align:center;padding:4px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fl-builder--template-collection-section{padding-bottom:10px;border-bottom:1px solid #dfdfdf}.fl-builder--template-collection-section:after,.fl-builder--template-collection-section:before{content:"";display:block;clear:both}.fl-builder--template-collection-section-name{padding:15px 10px 10px}span.fl-builder-block-no-node-templates{display:block;padding:15px 20px;text-align:center}span.fl-builder-block-no-node-templates:hover{cursor:default}.fl-builder-blocks-section-content .fl-builder-node-template-actions{bottom:0;cursor:default;display:none;position:absolute;right:0;top:0}.fl-builder-blocks-section-content .fl-builder-node-template-delete,.fl-builder-blocks-section-content .fl-builder-node-template-edit{display:inline;cursor:pointer;margin:0;padding:15px 10px;text-align:center;width:30px}.fl-builder-block-details .fl-builder-node-template-delete,.fl-builder-block-details .fl-builder-node-template-edit{padding-top:0!important}.fl-builder-blocks-section-content .fl-builder-node-template-delete i,.fl-builder-blocks-section-content .fl-builder-node-template-edit i{margin:0}.fl-builder-blocks-section-content .fl-builder-node-template-delete:hover i,.fl-builder-blocks-section-content .fl-builder-node-template-edit:hover i{color:#444}.fl-builder-blocks-node-template .fl-builder-block:hover .fl-builder-node-template-actions{display:block}.ui-sortable-helper .fl-builder-node-template-delete,.ui-sortable-helper .fl-builder-node-template-edit{display:none!important}.fl-builder--tabs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;position:relative;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.fl-builder-panel .fl-builder--panel-header{cursor:move;position:absolute;top:0;left:0;right:0;z-index:9}.fl-builder-panel .fl-builder--tabs{-ms-flex-pack:distribute;justify-content:space-around;padding:0 24px;min-height:46px;cursor:pointer}.fl-builder--tab-wrap{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.fl-builder--tabs button,.fl-builder--tabs button:active,.fl-builder--tabs button:focus,.fl-builder--tabs button:hover{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;display:inline-block;text-decoration:none;color:inherit;text-align:center;letter-spacing:normal!important;padding:5px;cursor:pointer;font-size:14px!important;font-weight:600!important;line-height:1.4!important;background:0 0!important;outline:0!important;border:2px solid transparent;border-radius:4px;margin:7px 0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;top:0;transition-property:background,color;transition-duration:.25s}.fl-builder--tabs button:focus{background:#e6eaed!important}.fl-builder--tabs button.is-showing{color:#0086b0}.fl-builder--panel-view{display:none;overflow:hidden}.fl-builder--panel-view.is-showing{display:block}.fl-builder--content-library-panel .fl-builder--panel-view.is-showing{position:absolute;top:96px;bottom:0;left:0;right:0;width:auto;height:auto}.fl-builder--content-library-panel.single-view .fl-builder--panel-view.is-showing{top:52px}.fl-builder--content-library-panel.ui-draggable-dragging{height:500px!important}.fl-builder--content-library-panel .fl-builder-drop-zone{display:none!important}.fl-builder--panel-header .fl-builder--tabs{cursor:move}.fl-builder--category-select{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:relative}.fl-builder--selector-display,.fl-builder--selector-display-label,.fl-builder-publish-actions{-webkit-box-orient:horizontal;-webkit-box-direction:normal}.fl-builder--selector-display{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#161B20;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;cursor:pointer;font-size:13px;font-weight:700;line-height:16px;border-radius:4px}.fl-builder--selector-display-label{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:inherit;line-height:inherit;width:100%;padding:0!important;color:#6D6D6D;background:0 0;border:2px solid #e4e7ea;border-radius:4px;font-family:inherit}.fl-builder--selector-display-label:active,.fl-builder--selector-display-label:hover{top:0;color:inherit;background:0 0;border:2px solid #e4e7ea;border-radius:4px}.fl-builder--selector-display-label:focus{top:0;color:inherit;background:0 0;border:2px solid #00A0D2;outline:0}.fl-builder--group-label{color:inherit;-webkit-box-flex:0;-ms-flex:0 0 0%;flex:0 0 0%;padding:9px 12px 9px 10px;background:#e6eaed;border-top-left-radius:2px;border-bottom-left-radius:2px}.fl-builder--current-view-name{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600;padding:9px 10px;text-align:left}.fl-builder--selector-menu{display:none;color:#293138;position:absolute;top:46px;left:0;width:100%;background:#fff;border-radius:4px;box-shadow:0 0 20px 2px rgba(0,0,0,.2);overflow:visible}.fl-builder--selector-menu:before{bottom:100%;right:8px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}.fl-builder--category-select.is-showing .fl-builder--selector-menu{display:-webkit-box;display:-ms-flexbox;display:flex;max-height:calc(100vh - 150px)}.fl-builder--category-select.is-showing .fl-builder--selector-menu .fl-builder--menu{margin:10px 0;-webkit-box-flex:1;-ms-flex:1 100%;flex:1 100%;overflow:auto}button.fl-builder-button.fl-builder-bar-title-caret{margin:4px}button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#e6eaed!important;border-color:transparent!important}.fl-builder--category-select.is-showing .fl-builder-bar-title-caret i{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fl-builder--menu{margin-bottom:2px}.fl-builder--menu>a,.fl-builder--menu>button,.fl-builder--menu>span{display:block;padding:8px 10px 10px;border-radius:4px;color:inherit;text-decoration:none;background:0 0!important;border:2px solid transparent!important;font-weight:400;font-family:inherit}.fl-builder--menu>a:active,.fl-builder--menu>a:focus,.fl-builder--menu>a:hover,.fl-builder--menu>button:active,.fl-builder--menu>button:focus,.fl-builder--menu>button:hover{background:#e6eaed!important;border:2px solid transparent!important;top:0}.fl-block-col-resize-feedback,.fl-block-overlay-title,.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging,.fl-builder-drop-zone,.fl-builder-empty,.fl-builder-has-submenu>ul.fl-builder-submenu li a{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-builder--menu>a:focus,.fl-builder--menu>button:focus{outline:0;color:inherit;text-decoration:none}.fl-builder--menu .fl-inset{padding-left:35px;font-size:14px;line-height:1.25}.fl-builder--menu a.fl-template-collection{color:#161B20}.fl-builder--menu>:after{clear:both}.fl-builder--menu * .fl-builder--menu-item-accessory{float:right;color:#000;text-transform:uppercase;text-align:center;min-width:20px;letter-spacing:2px}.fl-builder--menu * .fl-builder--menu-item-accessory i{font-size:1em;margin-top:2px}.fl-builder--menu .fl-builder-video-wrap iframe{display:block;margin:4px 0;width:100%}.fl-builder-publish-actions{display:-webkit-box;display:-ms-flexbox;display:flex;box-sizing:border-box;position:absolute;top:0;right:0;width:380px;max-width:100%;height:46px;padding:4px;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;opacity:1;pointer-events:auto;-webkit-transform:scaleX(1) translateX(0);transform:scaleX(1) translateX(0);-webkit-transform-origin:right;transform-origin:right;transition-property:opacity,-webkit-transform;transition-property:transform,opacity;transition-property:transform,opacity,-webkit-transform;transition-duration:.15s}.fl-builder-publish-actions.is-hidden{-webkit-transform:scaleX(.23) translateX(68px);transform:scaleX(.23) translateX(68px);opacity:0;pointer-events:none}.fl-builder-bar .fl-builder-button-group{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:100%;flex-basis:100%}.fl-builder-bar .fl-builder-button-group>.fl-builder-button{border-radius:0;margin-left:0;-ms-flex-preferred-size:100%;flex-basis:100%;text-align:center;-ms-flex-pack:distribute;justify-content:space-around;box-shadow:none}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.fl-builder-publish-actions-click-away-mask{display:none;position:fixed;top:0;left:0;right:0;height:100vh;background:0 0}.fl-builder-dragging .fl-builder-content:not(.fl-builder-empty){padding:16px 0}.fl-builder-empty{display:none;border:2px dashed #969696;border-radius:8px;color:#909090;font-size:20px;font-weight:700;margin:10px;padding:250px 20px;position:relative;text-align:center;text-transform:uppercase}.fl-builder-edit .fl-builder-empty{display:block}.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging{background:rgba(255,255,255,.95)!important;border:2px solid #000;border-radius:4px;box-shadow:0 0 8px rgba(0,0,0,.2);-moz-box-shadow:0 0 8px rgba(0,0,0,.2);-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);color:#333!important;font-size:13px!important;height:47px!important;line-height:40px!important;overflow:hidden;padding:0 20px;position:fixed!important;text-overflow:ellipsis;white-space:nowrap;width:180px!important;z-index:100010!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.fl-builder-block.fl-builder-block-drag-helper:hover{padding:0;box-shadow:none}.fl-builder-block-drag-helper:hover .fl-builder-block-content{position:static;padding:0 20px}.fl-col-has-highlight-guide .fl-col-content,.fl-col-highlight,.fl-row-highlight .fl-col-group{position:relative}.fl-builder-block-saved-module.fl-builder-block-drag-helper:hover .fl-builder-block-content,.fl-builder-block-saved-row.fl-builder-block-drag-helper:hover .fl-builder-block-content{padding:14px 20px}.fl-builder-block-drag-helper .fl-builder-block-icon{fill:#000;margin-top:-10px}.fl-builder-drop-zone{-webkit-animation:fl-builder-drop-zone-pulse 2s infinite;animation:fl-builder-drop-zone-pulse 2s infinite;background:#00A2D7;border-radius:4px;color:#fff!important;display:block;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-align:left;text-overflow:ellipsis;text-shadow:none;text-transform:none;white-space:nowrap;overflow:hidden;z-index:10}@-webkit-keyframes fl-builder-drop-zone-pulse{0%,100%{background-color:#00A2D7}50%{background-color:#79DEFF}}@keyframes fl-builder-drop-zone-pulse{0%,100%{background-color:#00A2D7}50%{background-color:#79DEFF}}.fl-builder-drop-zone-global{-webkit-animation:fl-builder-drop-zone-global-pulse 2s infinite;animation:fl-builder-drop-zone-global-pulse 2s infinite;background:#ff9600}@-webkit-keyframes fl-builder-drop-zone-global-pulse{0%,100%{background-color:#FFBC5C}50%{background-color:#ff9600}}@keyframes fl-builder-drop-zone-global-pulse{0%,100%{background-color:#FFBC5C}50%{background-color:#ff9600}}.fl-builder-content>.fl-builder-drop-zone{margin:10px 20px}.fl-row-content>.fl-builder-drop-zone{margin:3px 7px}.fl-col-has-cols>.fl-col-content>.fl-builder-drop-zone{margin:3px 10px}.fl-sortable-disabled>.fl-builder-drop-zone{display:none!important}.fl-col-group-equal-height.fl-col-group-align-center .fl-col-content>.fl-builder-drop-zone{width:100%}.fl-row-highlight{padding:16px 0}.fl-row-highlight .fl-row-content{border:2px dashed rgba(203,205,206,.5);padding:8px;border-radius:6px}.fl-row-highlight.fl-node-global .fl-row-content{border-color:#ff9600}.fl-col-highlight{padding:8px}.fl-col-highlight .fl-col-content{border-style:dashed!important;border-color:#00a0d2!important;border-radius:4px;min-height:100px;overflow-x:hidden;width:100%;border-width:2px!important}.fl-col-has-cols.fl-col-highlight>.fl-col-content{padding:8px}.fl-col-highlight.fl-node-global .fl-col-content{border-color:#ff9600!important}.fl-builder-simple .fl-col-highlight .fl-col-content{border:none!important}.fl-col-highlight-guide{background:rgba(0,160,210,.05);border:2px solid #00A0D2;border-radius:4px;bottom:4px;left:4px;position:absolute;right:4px;top:4px;z-index:1}.fl-node-global .fl-col-highlight-guide{border-color:#ff9600!important;background-color:rgba(255,150,0,.06)!important}.fl-col-has-highlight-guide .fl-block-overlay{background:0 0;border-color:transparent}.fl-col-has-highlight-guide .fl-block-col-resize{display:none}.fl-col-has-highlight-guide .fl-col-highlight .fl-col-content{border-color:transparent!important}.fl-col-drop-target{bottom:8px;display:none;left:-9px;position:absolute;top:8px;width:18px;z-index:1}.fl-col-highlight .fl-col-drop-target{display:block}.fl-col-drop-target-last{left:auto;right:-9px}.fl-col-drop-target .fl-builder-drop-zone{bottom:0;left:2px;margin:0;padding:0;position:absolute;right:2px;top:0}.fl-col-group-drop-target{display:none;left:8px;height:18px;position:absolute;right:8px;top:-9px;z-index:1}.fl-row-highlight .fl-col-group-drop-target{display:block}.fl-col-group-drop-target-last{top:auto;bottom:-9px}.fl-col-group-drop-target .fl-builder-drop-zone{bottom:2px;left:0;margin:0;padding:0;position:absolute;right:0;top:2px}.fl-row-content>.fl-col-group-drop-target{position:static}.fl-row-content>.fl-col-group-drop-target .fl-builder-drop-zone{height:18px;position:static}.fl-row-drop-target{display:none;left:0;height:24px;margin-top:-28px;position:absolute;right:0;z-index:1}.fl-row-highlight .fl-row-drop-target{display:block}.fl-row-drop-target-last{margin-top:4px}.fl-row .fl-row-drop-target .fl-builder-drop-zone{bottom:0;left:4px;margin:0;position:absolute;right:4px;top:0}.fl-builder-content>.fl-row-drop-target{margin:0;position:static}.fl-builder-dragging .fl-builder-content.fl-builder-empty>.fl-row-drop-target{bottom:10px;display:block;height:auto;left:0;position:absolute;right:0;top:10px}.fl-builder-content .fl-row-drop-target .fl-builder-drop-zone{margin-bottom:0;margin-top:0}.fl-col-group:focus,.fl-col:focus,.fl-module:focus,.fl-row:focus{outline:0}.fl-sortable-proxy{display:none}.fl-block-overlay,.fl-block-overlay *{text-shadow:none;-webkit-touch-callout:none}.fl-block-overlay-active{position:relative}.fl-block-overlay-actions{background:#00A0D2;float:left;height:30px;margin:-1px -1px 0;padding:0 4px;text-shadow:none;border-bottom-right-radius:5px;border-top-left-radius:3px}.fl-row-overlay-header-bottom .fl-block-overlay-actions{border-radius:0 5px 0 3px}.fl-builder-col-resizing .fl-block-overlay-actions,.fl-builder-row-resizing .fl-block-overlay-actions{overflow:hidden}.fl-block-overlay-actions>span{display:block;float:left}.fl-block-overlay-actions i{color:#fff!important;cursor:pointer;display:block!important;float:left;font-size:16px!important;height:28px!important;font-weight:100!important;line-height:28px!important;opacity:.8;filter:alpha(opacity=80);text-align:center;width:32px!important}.fl-block-overlay-actions i:hover{opacity:1;filter:alpha(opacity=100)}.fl-block-overlay-actions>i:first-child{padding-left:4px}.fl-block-overlay-actions>i:last-child{padding-right:2px}.fl-block-overlay-actions .fl-block-move{cursor:move}.fl-block-overlay-title{color:#fff!important;float:left;font-size:14px;height:30px;line-height:29px;margin-right:2px;padding:0 12px 0 8px}.fl-col-overlay,.fl-module-overlay,.fl-row-overlay{background:rgba(190,239,255,0);color:#fff}.fl-row-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:0;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;left:0;position:absolute;top:-33px;right:0;z-index:100006}.fl-row-overlay.fl-row-menu-active,.fl-row-overlay.fl-row-menu-active.fl-block-overlay.fl-block-overlay-global{z-index:100007}.fl-row-full-width .fl-row-overlay{left:2px;right:2px;bottom:2px}.fl-row-overlay-header-bottom{bottom:-32px!important;top:0}.fl-row-overlay-header-bottom .fl-block-overlay-header{position:absolute;bottom:0}.fl-block-overlay-active .fl-row-content-wrap{position:relative}.fl-block-overlay-active .fl-row-content{position:relative;z-index:100007!important}.fl-builder-row-resizing .fl-col.fl-block-overlay-active,.fl-builder-row-resizing .fl-module.fl-block-overlay-active{position:static}.fl-col-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:8px;cursor:pointer;left:8px;position:absolute;right:8px;top:8px;z-index:100008}.fl-module-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:4px;cursor:pointer;left:4px;min-height:32px;position:absolute;right:4px;top:4px;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-module-overlay{cursor:default}.fl-module-adjust-height{padding-bottom:15px;padding-top:15px}.fl-block-overlay-global{background:rgba(255,150,0,0);border:2px solid #F7A407;border-radius:4px}.fl-block-overlay-global .fl-block-overlay-actions{background:#F7A407}.fl-block-overlay-title-global{background:#fff;color:#ff9600!important;font-size:11px;letter-spacing:1px;margin-left:4px;padding:2px 4px;vertical-align:top}.fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:pointer;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-row-overlay{cursor:default}.fl-builder-row-template .fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:default;z-index:100006}.fl-block-overlay-global.fl-row-overlay .fl-block-col-resize{display:none}.fl-block-overlay-muted .fl-row-overlay{background:rgba(85,93,102,0);border:2px solid #555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-overlay-actions{background:#555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-col-resize{display:none}.fl-node-disabled .fl-row-content-wrap{opacity:.3}.fl-block-col-resize{bottom:0!important;position:absolute;top:0!important;width:6px}.fl-block-col-resize-e{cursor:ew-resize;left:auto!important;right:-2px!important}.fl-block-col-resize-w{cursor:ew-resize;left:-7px!important}.fl-block-col-resize-handle-wrap{margin:-4px 0 0 -5px;padding:0 5px;position:absolute;top:50%!important}.fl-block-col-resize-e .fl-block-col-resize-handle-wrap{margin-left:-6px}.fl-block-col-resize-handle{background:#fff;border:2px solid #00A0D2;border-radius:50%;height:12px;width:12px}.fl-node-global .fl-block-col-resize-handle{border-color:#ff9600}.fl-block-col-resize-feedback{color:#333!important;display:none;font-size:11px!important;position:absolute}.fl-block-col-resize-feedback-left,.fl-block-col-resize-feedback-right{background:#fff;border:1px solid #3ba0ff;padding:2px 4px}.fl-block-col-resize-feedback-left{right:20px;top:-7px}.fl-block-col-resize-feedback-right{left:20px;top:-7px}.fl-builder-has-submenu{position:relative}.fl-builder-has-submenu>ul.fl-builder-submenu{background:#00A0D2;box-shadow:0 0 20px rgba(0,0,0,.2);border-radius:0 4px 4px;display:none;left:0;list-style:none;margin:0;padding:6px 0;position:absolute;text-align:left;top:100%;width:165px;z-index:100008}.fl-builder-has-submenu>ul.fl-builder-submenu li{list-style:none;margin:0;padding:0}.fl-builder-submenu-right ul.fl-builder-submenu{left:auto;right:0}.fl-builder-has-submenu.fl-builder-submenu-open>ul.fl-builder-submenu{display:block}.fl-builder-has-submenu>ul.fl-builder-submenu li a{border-bottom:0 none;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;color:#fff!important;display:block;line-height:13px;font-size:13px;font-weight:400;opacity:.8;filter:alpha(opacity=80);overflow:hidden;padding:6px 12px;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.fl-builder-has-submenu>ul.fl-builder-submenu li a:hover{background:#0197C6;color:#fff;opacity:1;filter:alpha(opacity=100);text-decoration:none}.fl-builder-actions-title,.fl-builder-alert-lightbox .fl-lightbox-message{color:#333!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px!important}.fl-builder-has-submenu .fl-builder-submenu .fa{float:right;height:12px!important;line-height:12px!important;position:relative;right:-5px;width:14px!important}.fl-builder-has-submenu .fl-builder-has-submenu .fl-builder-submenu{display:none;left:100%;top:0}.fl-builder-has-submenu .fl-builder-submenu-right.fl-builder-has-submenu .fl-builder-submenu{left:auto;right:100%}.fl-builder-has-submenu .fl-builder-has-submenu:hover .fl-builder-submenu{display:block}.fl-builder-submenu-sep{padding:7px 0!important}.fl-builder-submenu-sep div{border-bottom:1px solid rgba(255,255,255,.4)}.fl-block-col-move,.fl-block-col-move-parent{cursor:move;position:relative}.fl-builder-submenu .fa-arrows{cursor:move;display:none!important}.fl-builder-submenu a:hover .fa-arrows{display:block!important}.fl-block-overlay-global ul.fl-builder-submenu{background:#ff9600!important}.fl-block-overlay-global ul.fl-builder-submenu li a:hover{background:#fa3}.fl-builder-actions-lightbox .fl-lightbox{display:block;width:300px;border-radius:4px}.fl-builder-actions-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-actions-lightbox .fl-builder-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:25px;text-align:center}.fl-builder-actions-title{display:block;margin-bottom:20px}.fl-builder-actions .fl-builder-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:7px;min-height:36px}.fl-builder-alert-lightbox{padding:20px;z-index:30000000;top:0;pointer-events:auto}.fl-builder-alert-lightbox .fl-lightbox{max-width:440px;width:auto}.fl-builder-alert-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-alert-lightbox .fl-lightbox-message{line-height:24px;padding:30px}@-webkit-keyframes fl-builder-content-section-entry{from{-webkit-transform:translateY(150px) translateX(100px) scale(.3);transform:translateY(150px) translateX(100px) scale(.3);opacity:0}to{-webkit-transform:translateY(0) translateX(0) scale(1);transform:translateY(0) translateX(0) scale(1);opacity:1}}@keyframes fl-builder-content-section-entry{from{-webkit-transform:translateY(150px) translateX(100px) scale(.3);transform:translateY(150px) translateX(100px) scale(.3);opacity:0}to{-webkit-transform:translateY(0) translateX(0) scale(1);transform:translateY(0) translateX(0) scale(1);opacity:1}}.fl-template-category-select{width:180px!important}.fl-template-selector .fl-builder-settings-section{margin:0 0 10px}.fl-template-selector .fl-builder-settings-fields{height:470px}.fl-template-selector .fl-builder-settings-tab{width:560px}.fl-template-selector .fl-builder-settings-tab-description{font-size:15px!important;margin:0!important;padding:10px 0 25px;text-align:center}.fl-template-preview{float:left;margin:0 25px 30px 0;position:relative;text-align:center;width:170px}.fl-template-preview.fl-last{margin-right:0}.fl-template-image{border:1px solid #d9d9d9;cursor:pointer;margin-bottom:12px;height:164px;overflow:hidden}.fl-template-image:hover{border-color:red}.fl-template-image img{max-height:none;width:100%}.fl-template-preview span{display:block;text-align:center}.fl-user-template-category-name{background:#f2f2f2;border-bottom:3px solid #dfdfdf;border-top:2px solid #dfdfdf;font-weight:700;padding:8px 15px}.fl-user-templates{border-bottom:1px solid #dfdfdf;padding:10px 0 20px}.fl-builder--user-templates-section-content{border-bottom:2px solid #e6eaed;padding:10px}.fl-builder--user-templates-section-content:first-child{padding-top:0}.fl-builder--user-templates-section-content:last-child,.fl-user-templates:last-child{border-bottom:none}.fl-builder--user-templates-section-name{font-weight:700;font-size:16px;color:#333;z-index:9999;padding:15px 10px;margin:0 10px}@-webkit-keyframes fl-list-item-entry{from{opacity:0;-webkit-transform:scale(.5) translateY(100px);transform:scale(.5) translateY(100px)}to{opacity:1;-webkit-transform:scale(1) translateY(0);transform:scale(1) translateY(0)}}@keyframes fl-list-item-entry{from{opacity:0;-webkit-transform:scale(.5) translateY(100px);transform:scale(.5) translateY(100px)}to{opacity:1;-webkit-transform:scale(1) translateY(0);transform:scale(1) translateY(0)}}.fl-builder--save-new-user-template,.fl-user-template{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:16px;font-weight:200;line-height:1.1;padding:10px 20px;color:#6d6d6d}.fl-user-template:hover{cursor:pointer;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.08);text-decoration:none;color:#111;padding-right:68px}.fl-user-template-name{overflow:hidden;text-overflow:ellipsis;-webkit-box-flex:1;-ms-flex:1;flex:1}.fl-user-template-actions{display:none;bottom:0;position:absolute;right:0;top:0}.fl-user-template:hover .fl-user-template-actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.fl-user-template-actions a{display:inline-block;padding:15px 0;width:30px}.fl-user-template:hover a:hover i{color:#444!important}.fl-user-templates-message{display:none}.fl-user-template-thumbnail{-webkit-box-flex:0;-ms-flex:0;flex:0;margin-right:20px}.fl-user-template-thumbnail .fl-builder--template-thumbnail{background-size:cover;background-position:center top;width:45px}.fl-user-template-thumbnail .fl-builder--template-thumbnail:hover{box-shadow:none;-webkit-transform:scale(1);transform:scale(1);transition-property:none}.fl-builder--save-new-user-template .fl-user-template-thumbnail .fl-builder--template-thumbnail{border-style:dashed;border-width:2px;border-color:#ccd4da}.fl-builder--save-new-user-template .fl-save-control{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex:1;-ms-flex:1;flex:1}.fl-builder--save-new-user-template .fl-save-control input{background:0 0;border:none!important;-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:16px;margin-right:10px;margin-left:-12px;color:#000}.fl-builder--save-new-user-template .fl-save-control input::-webkit-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input::-moz-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-ms-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-moz-placeholder{color:#777}@-webkit-keyframes fl-slide-in-right{from{-webkit-transform:translateX(50px);transform:translateX(50px)}to{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fl-slide-in-right{from{-webkit-transform:translateX(50px);transform:translateX(50px)}to{-webkit-transform:translateX(0);transform:translateX(0)}}.fl-builder--save-new-user-template .fl-save-control button{display:none;-webkit-animation-name:fl-slide-in-right;animation-name:fl-slide-in-right;-webkit-animation-duration:.25s;animation-duration:.25s;background-color:#00a0d2;border:none;padding:0 15px}.fl-save-control-mask{display:none;background:0 0;position:absolute;top:-50px;left:0;bottom:0;right:0;z-index:-1;min-height:80vh}.fl-builder-templates-cta{margin-bottom:20px}.fl-builder-templates-cta p{display:inline-block!important;width:75%!important;font-size:14px!important;line-height:1.5!important;margin-bottom:0!important}.fl-builder-templates-cta .fl-builder-upgrade-button{font-size:13px!important;line-height:13px!important;position:relative;top:8px;left:15px;padding:1px 12px}.fl-builder-settings-message,.fl-builder-settings-message *{font-size:15px!important;line-height:23px!important}.single-fl-builder-template .fl-content{width:100%!important}form.fl-builder-settings{height:100%;margin:0;padding:0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.fl-builder-settings-message{padding:20px 25px!important;background:#f2f2f2!important}.fl-builder-preview-loader{position:relative;top:-2px;margin-left:3px}.fl-lightbox-header .fl-builder-preview-loader{margin:0;position:absolute;right:40px;top:15px}@-webkit-keyframes fl-grab-attention{0%,100%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}}@keyframes fl-grab-attention{0%,100%{-webkit-transform:scale(1);transform:scale(1)}50%{-webkit-transform:scale(1.05);transform:scale(1.05)}}.fl-lightbox-width-slim .fl-form-table{margin:20px 25px 10px 15px!important;width:calc(100% - 60px)}.fl-lightbox-width-slim .fl-form-table th{display:block;padding:10px 0 0 12px!important}.fl-lightbox-width-slim .fl-form-table td{display:block}.fl-lightbox-width-slim .fl-form-table td:first-child{padding-left:10px!important}.fl-lightbox-width-slim .fl-form-table .fl-field[data-type=editor] td:first-child{padding-left:0!important}.fl-field-label .fl-field-responsive-toggle,.fl-lightbox-width-slim .fl-field-control-wrapper .fl-field-responsive-toggle{display:none}.fl-lightbox-width-slim .fl-field-label .fl-field-responsive-toggle{display:inline-block;padding:0 5px!important}.fl-lightbox-width-slim .fl-builder-settings-fields select{width:100%}.fl-lightbox-width-slim .fl-color-picker{display:-webkit-box;display:-ms-flexbox;display:flex;width:auto}.fl-lightbox-width-slim .fl-color-picker-clear{-webkit-box-flex:0;-ms-flex:0 0 50px;flex:0 0 50px}.fl-lightbox-width-slim .mce-menubtn.mce-fixed-width button{width:28px!important}.fl-lightbox-width-slim .mce-btn[aria-label=Blockquote],.fl-lightbox-width-slim .mce-btn[aria-label=Fullscreen]{display:none}.fl-lightbox-width-slim .fl-builder-field-multiple{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-control,.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-label{width:100%!important}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-builder-field-actions{position:absolute!important;top:0;right:0;width:70px}.fl-lightbox-width-slim .fl-field[data-type=time] select{width:auto}.fl-builder-settings-tabs{margin:6px;border:2px solid #e6eaed;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;overflow:hidden}.fl-builder-content-group-select{padding:0 10px 6px;display:none}.fl-builder-content-group-select select{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:8px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;border:2px solid #e4e7ea;color:#161B20}select:focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;outline:0!important}.fl-legacy-settings-tab{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings-tab:first-child .fl-legacy-settings-tab{background:0 0;height:auto}body .fl-builder-settings-tabs>*{box-sizing:border-box;color:#676F7A!important;fill:#676F7A!important;background:0 0;border:2px solid transparent;border-radius:0;margin:0;outline:0;padding:6px 15px;text-decoration:none!important;font-size:14px;font-weight:400!important;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;text-align:center}.fl-builder-settings-tabs-more g,.fl-builder-settings-tabs-more path,.fl-builder-settings-tabs-more svg,.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon path{fill:inherit}body .fl-builder-settings-tabs>:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}body .fl-builder-settings-tabs>:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}body .fl-lightbox-width-slim .fl-builder-settings-tabs>*{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto;padding:6px 8px}body .fl-builder-settings-tabs>.fl-builder-settings-tabs-more{-webkit-box-flex:0;-ms-flex:0 0 60px;flex:0 0 60px;display:none;margin-left:auto;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.fl-builder-settings-tabs-more svg{width:16px;height:auto;margin:auto}body .fl-lightbox-has-tab-overflow .fl-builder-settings-tabs-more{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-builder-settings-tabs>:active,.fl-builder-settings-tabs>:hover{top:0;color:#333;background:0 0;border:2px solid transparent}.fl-builder-settings-tabs>:focus{top:0;outline:0;border:2px solid transparent;background:0 0;color:#0086b0;fill:#0086b0}.fl-builder-settings-tabs .fl-active,.fl-builder-settings-tabs-more.fl-contains-active,.fl-builder-settings-tabs-overflow-menu .fl-active{color:#0086b0!important;fill:#0086b0!important;position:relative;background:#e6eaed}.fl-builder-settings-tabs .fl-active.fl-overflowed,.fl-builder-settings-tabs .fl-overflowed{display:none!important}.fl-builder-settings-tabs .error{color:#d03436;padding-right:10px}.fl-builder-settings-tabs .error .fl-error-icon,.fl-builder-settings-tabs-overflow-menu .error .fl-error-icon{background:url(../img/sprite.png) -148px -5px no-repeat;display:inline-block;height:16px;margin-left:7px;position:relative;top:3px;width:16px}.fl-builder-settings-tabs-more.fl-contains-errors{fill:#d03436!important}.fl-builder-settings-tab{display:none;width:auto!important}.fl-builder-settings-tab.fl-active{display:block}.fl-builder-settings-tab-description{background:#e4e7ea;padding:10px 15px;border-radius:4px;margin:20px}.fl-builder-settings-tab-description a{text-decoration:underline!important}.fl-builder-settings-tab-description a:hover{color:#333}.fl-builder-settings-tabs-overflow-menu{display:none;position:absolute;left:0;right:0;border:2px solid #e6eaed;border-top:3px solid #00a0d2;border-radius:4px;background:#fff;z-index:9999;margin:0 6px;padding:10px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;box-shadow:0 0 20px 2px rgba(0,0,0,.2)}.fl-builder-settings-tabs-overflow-menu:before{bottom:100%;right:20px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:10px;margin-left:-10px}.fl-builder-settings-tabs-overflow-menu>a{display:block;padding:10px 15px;font-size:14px;font-weight:600!important;border:2px solid transparent;border-radius:4px;outline:0}.fl-builder-settings-tabs-overflow-menu>a:hover{background:#e6eaed;text-decoration:none}.fl-builder-settings-tabs-overflow-click-mask{display:none;position:fixed;top:0;bottom:0;left:0;right:0;background:0 0;z-index:9}.fl-form-table{background:none;border:none;width:calc(100% - 35px)}.fl-form-table tbody{border:none}.fl-form-table tr,.fl-form-table tr:nth-child(even){background:0 0}.fl-form-table td,.fl-form-table th{background:0 0!important;border:none!important;font-weight:400!important;text-align:left!important}.fl-form-table th{padding:10px 10px 10px 30px!important;vertical-align:top!important;width:200px!important}.fl-form-table td:first-child{padding-left:30px!important}.fl-form-table th label{color:#333;width:auto;max-width:100%}.fl-photo-field .fl-photo-preview-img img,.fl-video-field .fl-video-preview-img img{max-width:60px}.fl-form-table td{padding:8px 10px}.fl-lightbox-width-slim .fl-form-table td{padding:4px 0 10px}.fl-builder-settings-fields{margin:0;overflow:hidden;position:relative;-webkit-box-flex:1;-ms-flex:1 100%;flex:1 100%;visibility:hidden}.fl-builder-ui-keyboard-shortcut-item,.fl-link-field .fl-link-field-input-wrap{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row}.fl-lightbox-header .fl-builder-settings-fields{height:auto;margin:0;position:absolute;right:10px;top:10px}.fl-builder-settings-fields .fl-nanoscroller-content{padding:0}.fl-builder-settings-fields .fl-field-control-wrapper{position:relative}.fl-field{-webkit-animation-duration:.25s;animation-duration:.25s;-webkit-animation-delay:.1s;animation-delay:.1s}.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select,.fl-builder-settings-fields textarea{background:#fff!important;border-color:transparent!important;border-style:solid;border-width:2px;border-radius:4px!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);color:#333!important;display:inline;font-size:13px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px 9px;width:auto;box-sizing:border-box}.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select{height:36px!important}.fl-builder-settings-fields input[type=number]{width:70px}.fl-builder-lightbox .fl-builder-settings-fields input[type=email]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=file]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=number]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=password]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=search]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=text]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=url]:focus,.fl-builder-lightbox .fl-builder-settings-fields select:focus,.fl-builder-lightbox .fl-builder-settings-fields textarea:focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)!important}.fl-builder-settings-fields ::-webkit-input-placeholder{color:#999!important;font-size:12px}.fl-builder-settings-fields input:-moz-placeholder{color:#999;font-size:12px}.fl-builder-settings-fields ::-moz-placeholder{color:#999!important;font-size:12px}.fl-builder-settings-fields input:-ms-input-placeholder{color:#999;font-size:12px}.fl-builder-settings-fields label{display:inline-block;font-weight:400;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:3px}.fl-builder-settings-fields select{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;color:#000;margin:0 0 2px;padding:2px 10px;padding-right:30px!important;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important}.fl-builder-settings-fields select[multiple]{height:60px;background-image:none!important}.fl-builder-custom-field select,.fl-photo-field select{-webkit-box-shadow:none;border-color:#e6eaed!important}.fl-font-field .fl-font-field-font{margin-bottom:4px;width:calc(70% - 5px)!important}.fl-font-field .fl-font-field-weight{width:30%!important}.fl-lightbox-width-slim input.text-full+.fl-field-description,.fl-lightbox-width-slim select+.fl-field-description{display:block;padding:8px 10px;margin:0}.fl-field[data-type=dimension] .fl-field-control-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-field[data-type=dimension] .fl-field-description{padding-top:9px}.fl-field[data-type=dimension] .fl-field-responsive-toggle{padding:9px 9px 0 0}.fl-dimension-field-units{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-dimension-field-unit{padding-right:5px}.fl-dimension-field-unit input{max-width:60px;width:auto!important}.fl-dimension-field-unit label{padding:5px 0 0;font-size:12px;color:inherit!important;display:block;text-align:center}.fl-link-field-search input{box-shadow:none!important;width:100%!important;padding:3px 9px!important}.fl-link-field-search #as-original-link-search{width:100%}.fl-builder-settings-section{border-top:2px solid #E6EAED}.fl-builder-settings-section:first-child{border-top:none!important}.fl-custom-query .fl-builder-settings-section{border-top:2px solid #E6EAED!important}.fl-builder-settings-description{padding:0 10px 10px;margin:0;font-style:italic;opacity:.75}.fl-builder-settings-fields table{margin:20px 0}.fl-builder-settings-fields h3.fl-builder-settings-title{display:inline-block;background:#E6EAED;padding:4px 10px 4px 15px;margin:0;text-transform:uppercase!important;border-bottom-right-radius:4px;font-size:12px!important;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-core-ui h1,.wp-core-ui h2,.wp-core-ui h3,.wp-core-ui h4,.wp-core-ui h5,.wp-core-ui h6{color:#333}.wp-core-ui .submitbox .submitdelete{color:#a00}.wp-core-ui button{font-weight:400}.wp-core-ui input[type=email],.wp-core-ui input[type=file],.wp-core-ui input[type=number],.wp-core-ui input[type=password],.wp-core-ui input[type=search],.wp-core-ui input[type=tel],.wp-core-ui input[type=text],.wp-core-ui input[type=url],.wp-core-ui select,.wp-core-ui textarea{background-color:#fff;border-color:#dfdfdf;border-style:solid;border-width:1px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;color:#333;font-weight:400}.wp-core-ui input[type=email]:focus,.wp-core-ui input[type=file]:focus,.wp-core-ui input[type=number]:focus,.wp-core-ui input[type=password]:focus,.wp-core-ui input[type=search]:focus,.wp-core-ui input[type=tel]:focus,.wp-core-ui input[type=text]:focus,.wp-core-ui input[type=url]:focus,.wp-core-ui select:focus,.wp-core-ui textarea:focus{background:0 0;border-color:#aaa}.wp-core-ui input[type=search]{background-image:none;padding:6px}.fl-field-responsive-setting{display:inline-block}.fl-field-responsive-setting-medium,.fl-field-responsive-setting-responsive{display:none}i.fl-field-responsive-toggle{color:grey;cursor:pointer;display:inline-block;font-size:15px!important;height:auto;line-height:18px!important;text-align:left;vertical-align:middle;width:20px}i.fl-field-responsive-toggle:hover{color:#000}.fl-builder-settings-fields input.text-full,.fl-builder-settings-fields textarea{width:100%}.fl-color-picker{cursor:pointer}.fl-color-picker .fl-color-picker-clear{box-sizing:border-box}.fl-color-picker .fl-color-picker-clear:hover{background-color:#ededed}.colorpicker input{padding:0!important;font-size:11px!important;color:#fff!important;width:29px!important;height:auto!important;background:0 0!important;border:none!important}.colorpicker .colorpicker_hex input{width:45px!important}.fl-builder-custom-field{background:#fff;border:2px solid transparent;border-radius:4px;padding:7px 10px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);min-height:36px;box-sizing:border-box}.fl-builder-field-multiple .fl-builder-custom-field{cursor:move}.fl-builder-custom-field a{color:#21759b!important;text-decoration:underline!important}.fl-builder-custom-field a:hover{color:#d54e21!important}.fl-builder-custom-field label.error{margin-top:5px}.fl-photo-field .fl-photo-preview{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-photo-field .fl-photo-select,.fl-photo-field.fl-photo-empty .fl-photo-preview{display:none}.fl-photo-field.fl-photo-empty .fl-photo-select{display:block}.fl-photo-field .fl-photo-preview-img{line-height:0;margin:5px 0}.fl-photo-field .fl-photo-preview select{margin:8px 0 8px 10px;width:200px}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview select{display:none}.fl-photo-field .fl-photo-preview-filename{display:none;font-size:14px;font-weight:700;margin:7px 0 5px 11px}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview-filename{display:inline-block;word-break:break-all}.fl-multiple-photos-field .fl-multiple-photos-select,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-add,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-count,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-edit,.fl-multiple-photos-lightbox .gallery-settings,.fl-photo-field.fl-photo-no-attachment .fl-photo-edit{display:none}.fl-photo-field .fl-photo-edit{margin:0 0 0 11px}.fl-multiple-photos-field .fl-multiple-photos-add,.fl-photo-field .fl-photo-remove,.fl-photo-field .fl-photo-replace{margin:0 0 0 8px}.fl-builder-edit .media-modal{z-index:9999991}.fl-builder-edit .media-modal-backdrop{z-index:999999}.fl-builder-edit .media-modal-content .thumbnail{padding:0;border:none;border-radius:0}.fl-builder-edit button.button-link.media-modal-close{position:absolute;box-shadow:none;-webkit-box-shadow:none}.fl-builder-edit .media-frame.hide-menu{visibility:visible}.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-select{display:inline}.fl-multiple-photos-count{font-weight:700;margin-bottom:3px}.fl-video-field .fl-video-select,.fl-video-field.fl-video-empty .fl-video-preview{display:none}.fl-video-field.fl-video-empty .fl-video-select{display:block}.fl-video-field .fl-video-preview-img{float:left;line-height:0;margin:5px 0}.fl-video-field .fl-video-preview-img .dashicons.dashicons-media-video{display:block;font-size:60px;height:60px;line-height:60px;width:60px}.fl-video-field .fl-video-preview-filename{display:inline-block;font-size:14px;font-weight:700;margin:7px 0 5px 11px}.fl-video-field .fl-video-replace{margin:0 0 0 11px}.fl-multiple-audios-field .fl-multiple-audios-select,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-add,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-edit{display:none}.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-select{display:block}.fl-multiple-audios-field .fl-multiple-audios-add{margin:0 0 0 8px}.fl-icon-field .fl-icon-select,.fl-icon-field.fl-icon-empty .fl-icon-preview{display:none}.fl-icon-field.fl-icon-empty .fl-icon-select{display:block}.fl-icon-field .fl-icon-preview i{display:inline-block;font-size:28px;margin:10px 10px 9px;vertical-align:middle}.fl-icon-field .fl-icon-remove{margin:0 0 0 8px}.fl-builder-hidden-editor{display:none}.fl-builder-settings .wp-switch-editor{background:#ebebeb;border:1px solid #e5e5e5;border-radius:0;color:#333}.fl-builder-settings .wp-editor-container{border:1px solid #e5e5e5}.fl-builder-settings .mce-toolbar .mce-btn-group .mce-btn{margin:2px 0}.fl-builder-settings .mce-menubtn.mce-fixed-width button{width:100px}.fl-builder-settings .mce-menubtn.mce-fixed-width span{width:100%}.mce-close:active,.mce-close:hover,.mce-toolbar .mce-btn button:active,.mce-toolbar .mce-btn button:hover,.mce-window .mce-btn button:active,.mce-window .mce-btn button:hover{background:0 0;border:none}.mce-ico{font-family:tinymce,Arial!important}.mce-toolbar i.mce-ico{font:400 20px/1 dashicons!important}.fl-builder-edit form#wp-link,.popover[class*=tour-],ul.as-list{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:1px!important}.wp-editor-container textarea.wp-editor-area{background:0 0;border:none;padding:10px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.fl-builder-edit form#wp-link{color:#000;font-size:13px}.fl-builder-edit form#wp-link #link-options label{display:block;margin-bottom:2px}.fl-builder-edit form#wp-link #link-options label span{padding-right:10px;vertical-align:middle}.fl-builder-edit form#wp-link #link-options input[type=text]{display:inline-block;height:auto;margin:5px 0 0;padding:3px 5px;width:80%}.fl-builder-edit form#wp-link .query-results{top:225px}.fl-code-field{border:1px solid #E6E6E6;border-left:none}.ace_editor,.ace_editor *{font-family:Monaco,Menlo,"Ubuntu Mono","Droid Sans Mono",Consolas,monospace!important;font-size:12px!important;font-weight:400!important;letter-spacing:0!important}.fl-layout-field-option{border:2px solid #d9d9d9;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;cursor:pointer;float:left;line-height:0;max-width:23%;margin:0 1% 2%;padding:5px}.fl-layout-field-option-selected,.fl-layout-field-option:hover{border-color:red}.fl-layout-field-option img{max-width:100%}.fl-link-field .fl-link-field-input-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:row}.fl-link-field-input{width:auto!important;-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%}.fl-link-field .fl-link-field-input-wrap button{-webkit-box-flex:0;-ms-flex:0 0 0%;flex:0 0 0%;margin-left:5px}.fl-link-field-search{display:none;border:2px solid #e6eaed;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin:4px 0 0;padding:10px}.fl-link-field-search-title{display:block;margin:0 0 3px 2px}.fl-link-field-search-cancel{margin-top:6px}.fl-help-tooltip{display:inline-block;position:relative}.fl-help-tooltip-icon{color:#999!important;cursor:pointer;font-family:FontAwesome;font-size:15px!important;padding:5px;vertical-align:middle}.fl-help-tooltip-text{background:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ccc;-moz-box-shadow:0 0 5px #ccc;-webkit-box-shadow:0 0 5px #ccc;display:none;font-weight:400;left:23px;padding:10px 13px;position:absolute;top:-6px;width:250px;z-index:1000;border-radius:4px}.fl-lightbox-width-slim .fl-help-tooltip-text{top:26px;left:-30px}.fl-field-control .fl-form-field{margin-bottom:0}.fl-form-field-preview-text i{display:inline-block;font-size:18px;line-height:22px;margin-bottom:5px}.fl-builder-field-actions{padding-left:0!important;padding-right:0!important;text-align:center;width:85px}.fl-builder-field-actions i{color:#999!important;cursor:pointer;font-size:13px!important;line-height:29px!important;width:16px}.fl-builder-field-actions i:hover{color:#000!important}.fl-builder-field-actions i.fl-builder-field-copy,.fl-builder-field-actions i.fl-builder-field-delete{margin-left:5px}.fl-builder-field-actions i.fl-builder-field-move{cursor:move}.fl-builder-field-dd-helper{background:#ccc;height:30px!important;float:left;width:130px!important}.fl-builder-field-dd-zone{border:1px dashed #ccc;height:30px}.fl-builder-field-actions-single .fl-builder-field-delete,.fl-builder-field-actions-single .fl-builder-field-move{display:none!important}.fl-lightbox-width-slim .fl-builder-field-actions-single .fl-builder-field-copy{float:right!important}.fl-builder-field-multiple .fl-builder-field-actions,.fl-builder-field-multiple .fl-field-control,.fl-builder-field-multiple .fl-field-label{padding-top:2px!important;padding-bottom:2px!important}.fl-builder-field-multiple .fl-builder-field-actions{min-width:70px!important}.fl-builder-field-multiple[data-field=icons] .fl-builder-field-actions{width:70px!important}.fl-builder-field-multiple.ui-sortable-helper .fl-field-control{width:60%}.fl-builder-field-multiple.ui-sortable-helper .fl-builder-field-actions{display:none}.fl-builder-widget-settings input{display:inline-block!important;margin:5px 10px 8px!important}.fl-builder-lightbox-loading{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings .error,.fl-builder-settings input.error{color:#d03436!important}.fl-builder-settings label.error,.fl-builder-settings p.error{color:#d03436;display:block;margin-top:5px}.fl-builder-settings .fl-form-table .fl-field-description{color:#464646;font-style:normal;margin-left:2px}.fl-lightbox .fl-field-connection{right:-1px}.fl-lightbox .fl-field-connection-content{border:2px solid transparent!important;background:#e4e7ea!important}.fl-field-connection-content .fl-field-connection-label{color:#676f7a!important}ul.as-selections{background-color:#fff;border:none;border-radius:4px;box-shadow:none;color:#333;font-size:12px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px;width:auto}ul.as-selections.loading{background:url(../img/ajax-loader-small.svg) 98% center no-repeat}ul.as-selections li.as-selection-item{background:#d4eaf6;border:none;font-size:11px;line-height:14px;padding:8px 15px;border-radius:4px;margin:2px}ul.as-selections li.as-selection-item.blur{background:#f4f4f4}ul.as-selections li.as-selection-item a.as-close{line-height:12px}ul.as-selections li.as-original{margin:0}ul.as-selections li.as-original input{height:auto;font-size:12px;margin:0;padding:0;box-shadow:none}ul.as-list{margin:0;font-size:13px;color:#000;background-color:#fff;background-color:rgba(255,255,255,.95);z-index:2;box-shadow:0 0 10px rgba(0,0,0,.1);border:none;border:1px solid #dfdfdf;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}li.as-message,li.as-result-item{border:none}li.as-result-item.active{background:#e5e5e5;border-radius:0;color:#333;text-shadow:none}li.as-result-item em{background:0 0!important;color:#333!important;font-size:12px;padding:0!important;font-weight:700}.fl-custom-query-filter{display:none}.fl-custom-query .fl-field[data-type=suggest] select{margin-bottom:5px;width:100%}.fl-builder-service-settings{position:relative}.fl-builder-service-error{color:red!important;padding:15px 0 0}.fl-builder-service-account-delete{color:red!important;margin-left:10px;position:relative;top:2px}#fl-field-visibility_user_capability .fl-field-description,.fl-builder-service-connect-row .fl-field-description{background:#f0f0f0;color:#333!important;display:block;float:none;margin:10px 0 0;padding:10px}#fl-field-visibility_user_capability .fl-field-description a,.fl-builder-service-connect-row .fl-field-description a{color:#21759b!important;text-decoration:underline!important}.fl-ordering-field-option{background:#fff;border:1px solid #dfdfdf;border-radius:3px;cursor:move;margin-bottom:5px;padding:5px 10px}.fl-ordering-field-option .fa{color:#ccc;float:right;line-height:16px}#tiptip_holder{z-index:1000000}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:#333}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:#333}#tiptip_holder.tip_right #tiptip_arrow_inner{border-right-color:#333}#tiptip_holder.tip_left #tiptip_arrow_inner{border-left-color:#333}#tiptip_content{background:#333;box-shadow:none}.fl-builder-getting-started-video{line-height:0!important;padding:10px}.fl-builder-getting-started-video iframe{border:none;height:326px;width:100%}.fl-builder-tour-actions .fl-builder-actions-title{font-size:14px!important;line-height:19px}.fl-builder-tour-mask{bottom:0;left:0;position:fixed;right:0;top:0;z-index:100000000}.fl-builder-tour-dimmed{background:rgba(0,0,0,.7);bottom:0;left:0;position:absolute;right:0;top:0}body>.fl-builder-tour-dimmed{position:fixed}.tour-backdrop{z-index:110000}.popover[class*=tour-]{border:1px solid #ccc;border-radius:0;box-shadow:0 0 40px rgba(0,0,0,.3);color:#666;font-size:13px;font-weight:400;line-height:18px;max-width:none;padding:0;width:300px;z-index:100000001}.popover[class*=tour-].bottom>.arrow{border-bottom-color:#ccc}.popover[class*=tour-].bottom>.arrow:after{border-bottom-color:#f7f7f7}.popover[class*=tour-] .popover-title{border-radius:0;color:#333;letter-spacing:normal;text-transform:none}.popover[class*=tour-] .fa-times{color:#b3b3b3;cursor:pointer;font-size:16px;padding:5px;position:absolute;right:3px;top:2px}.popover[class*=tour-] .fa-times:hover{color:#666}.popover[class*=tour-] .popover-content{border-bottom:1px solid #d9d9d9;padding:13px 15px}.popover[class*=tour-] .fl-builder-tour-next{display:block;float:none;width:100%}.popover-navigation button{min-height:36px}.fl-builder-shortcode-mask-wrap{position:relative}.fl-builder-shortcode-mask{bottom:-1px;left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fl-builder--search{border:2px solid transparent;position:relative;padding:0;width:54px;transition-property:width;transition-delay:.1s;transition-duration:.15s}.fl-builder--search.is-expanded{border:2px solid #00A0D0}.fl-builder--search input[type=text],.fl-builder--search input[type=text]:focus{background-color:transparent;border:none!important;box-sizing:border-box;width:100%;font-size:16px;text-align:center}.fl-builder--search:before{display:-webkit-box;display:-ms-flexbox;display:flex;top:0;left:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;content:"\f002";font:normal normal normal 14px/1 FontAwesome;text-align:center;width:100%;height:100%;position:absolute;pointer-events:none;color:rgba(128,128,128,.6);font-size:17px;opacity:1;transition-property:opacity;transition-duration:.15s}.fl-builder--main-menu-panel,.fl-builder-ui-keyboard-shortcuts{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-builder--search.has-text:before,.fl-builder--search.is-expanded:before{opacity:0}.fl-builder--search input::-webkit-input-placeholder{color:rgba(128,128,128,0)!important;transition:color .25s}.fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(128,128,128,.4)!important}.fl-builder--search .search-label{cursor:text}.fl-builder--search .search-clear{display:none;padding:10px 10px 10px 30px;color:#a7a7a7;font-size:12px;position:absolute;right:0;top:0;background-color:#eff1f2;background:linear-gradient(to left,#e4e7ea,#e4e7ea 75%,rgba(228,231,234,0))}.fl-builder--search.has-text .search-clear,.fl-builder--search.is-expanded input{display:inline-block}.fl-builder--search:hover .search-clear{color:#888;background-color:#eff1f2;background:linear-gradient(to left,#dadfe5,#dadfe5 75%,rgba(218,223,229,0))}.fl-builder--search.is-expanded{width:246px}@-webkit-keyframes fl-builder-show-menu-item{from{-webkit-transform:translateY(10px) scale(.8);transform:translateY(10px) scale(.8);opacity:0}to{-webkit-transform:translateX(0) translateY(0) scale(1);transform:translateX(0) translateY(0) scale(1);opacity:1}}@keyframes fl-builder-show-menu-item{from{-webkit-transform:translateY(10px) scale(.8);transform:translateY(10px) scale(.8);opacity:0}to{-webkit-transform:translateX(0) translateY(0) scale(1);transform:translateX(0) translateY(0) scale(1);opacity:1}}.fl-builder--main-menu-panel{display:none;box-sizing:border-box;position:fixed;top:calc(48px + 10px);left:10px;width:360px;color:#222;max-height:calc(100% - 66px);border-radius:4px;background:#fff;border:2px solid #D5DADD;border-top:3px solid #00a0d2;box-shadow:0 15px 45px 8px rgba(0,0,0,.04);font-size:14px!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10000009;pointer-events:auto}.fl-builder--main-menu-panel.is-showing{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-builder--main-menu-panel:before,.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items:before{bottom:100%;right:6px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:13px;margin-left:-13px}.fl-builder--main-menu-panel-views{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;overflow:auto}.fl-builder--main-menu-panel-mask{display:none;position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000119}.fl-builder--main-menu-panel .fl-builder--tabs{padding-left:20px;padding-top:15px}.fl-builder--main-menu-panel-view{display:none}.fl-builder--main-menu-panel-view.is-showing{display:block}.fl-builder--main-menu-panel-view-title{font-size:24px;font-weight:600;padding:25px 22px 0;line-height:1;white-space:nowrap}.fl-builder--main-menu-panel-view-title .title-accessory{float:right;color:#b1b1b1}.fl-builder--main-menu-panel-view-title .title-accessory>i{font-size:20px!important;width:25px!important}.fl-builder--main-menu-panel-view-title .title-accessory>i:hover{color:#222}.fl-builder--main-menu-panel-view-title .pop-view{padding:10px;margin-left:-10px;opacity:.5;font-size:25px;font-weight:400;cursor:pointer;background:0 0;outline:0;border:none;color:inherit}.fl-builder--main-menu-panel-view-title .pop-view:focus{outline:0;top:0;background:#E5EAED!important}.fl-builder--menu-item:before{display:block;content:"";float:none;clear:both}.fl-builder--menu-item{color:inherit;text-align:left;box-sizing:border-box;display:block;padding:10px 15px;margin:0 10px;width:calc(100% - 20px);background:0 0;border:none;border-radius:4px;font-size:14px;line-height:1.1;cursor:pointer;opacity:1}.fl-builder--menu-item:hover{background:#eaf1f8;border:none;text-decoration:none;color:#000}.fl-builder--selector-menu .fl-builder--menu-item:hover{background:#fff}.fl-builder--menu-item-accessory{float:right;text-align:center;display:inline-block;min-width:40px;font-size:14px}.fl-builder--menu-item-accessory.view-arrow{font-size:18px}.fl-builder--menu{padding:0;margin:20px 0}.fl-builder--menu hr{margin:8px 0;background-color:#e6eaed!important;height:2px;border:none}.fl-builder--menu .fl-builder-video-wrap{padding:0 10px 10px}.fl-revision-list-item{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-revision-list-item-text{padding-left:15px}.fl-revision-list-item-date{padding-bottom:5px}.fl-builder--revision-actions{display:none;position:fixed;top:4px;left:4px;z-index:100008;padding:4px 4px 6px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder--revision-actions *{margin-right:5px}.fl-builder--revision-actions :last-child{margin:0}.fl-builder--menu-item[data-event=noRevisionsMessage]:hover{background:0 0;box-shadow:none;cursor:default}.fl-no-revisions-message-title{font-weight:700;margin-bottom:10px}.fl-no-revisions-message-text{line-height:22px}.fl-builder-module-placeholder-message{border:1px dashed #ccc;overflow:hidden;padding:20px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.fl-field-connections-menu{z-index:999999}.fl-field-connections-toggle{right:-30px!important}.fl-builder-add-ultimate-presets-button,.fl-builder-add-ultimate-rows-button,.fl-builder-pp-add-template-button,.pp-preview-button,.uabb-live-preview-button{display:none!important}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;background:0 0;transition-property:background;transition-duration:.15s}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-ne,.ui-resizable-nw,.ui-resizable-se,.ui-resizable-sw{width:12px;height:12px}.ui-resizable-se{cursor:se-resize;right:-4px;bottom:-4px}.ui-resizable-sw{cursor:sw-resize;left:-4px;bottom:-4px}.ui-resizable-nw{cursor:nw-resize;left:-4px;top:-4px}.ui-resizable-ne{cursor:ne-resize;right:-4px;top:-4px}.fl-builder-resizable-iframe-fix{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100000000}.fl-builder-panel .ui-resizable-handle:active,.fl-builder-panel .ui-resizable-handle:hover,.fl-lightbox .ui-resizable-handle:active,.fl-lightbox .ui-resizable-handle:hover{background:#00a0d2}.fl-builder-panel .ui-resizable-n,.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-n,.fl-lightbox .ui-resizable-s{height:6px}.fl-builder-panel .ui-resizable-n,.fl-lightbox .ui-resizable-n{top:-3px}.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-s{bottom:-3px}.fl-builder-panel .ui-resizable-e,.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-e,.fl-lightbox .ui-resizable-w{width:6px}.fl-builder-panel .ui-resizable-e,.fl-lightbox .ui-resizable-e{right:-3px}.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-w{left:-3px}.fl-lightbox .ui-resizable-ne,.fl-lightbox .ui-resizable-nw,.fl-lightbox .ui-resizable-se,.fl-lightbox .ui-resizable-sw{background:0 0;border:6px solid transparent}.fl-lightbox .ui-resizable-ne:active,.fl-lightbox .ui-resizable-ne:hover,.fl-lightbox .ui-resizable-nw:active,.fl-lightbox .ui-resizable-nw:hover,.fl-lightbox .ui-resizable-se:active,.fl-lightbox .ui-resizable-se:hover,.fl-lightbox .ui-resizable-sw:active,.fl-lightbox .ui-resizable-sw:hover{background:0 0;border-color:#00a0d2}.fl-lightbox .ui-resizable-ne{border-bottom:none;border-left:none;border-top-right-radius:4px}.fl-lightbox .ui-resizable-nw{border-bottom:none;border-right:none;border-top-left-radius:4px}.fl-lightbox .ui-resizable-se{border-top:none;border-left:none;border-bottom-right-radius:4px}.fl-lightbox .ui-resizable-sw{border-top:none;border-right:none;border-bottom-left-radius:4px}.fl-builder-ui-keyboard-shortcuts{display:none;position:fixed;top:0;left:0;bottom:0;right:0;z-index:999999;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(50,50,50,.88);font-size:15px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fl-builder-ui-keyboard-shortcuts.is-showing{display:-webkit-box;display:-ms-flexbox;display:flex}.fl-builder-ui-keyboard-shortcuts-content{box-sizing:border-box;width:500px;background:#f5f7f9;border-radius:4px;padding:30px 0 0;box-shadow:0 10px 30px rgba(0,0,0,.15)}.fl-builder-ui-keyboard-shortcut-item{display:-webkit-box;display:-ms-flexbox;display:flex;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:12px 40px}.fl-builder-ui-keyboard-shortcust-footer,.fl-color-picker{display:-webkit-box;display:-ms-flexbox;-ms-flex-direction:row;-webkit-box-orient:horizontal;-webkit-box-direction:normal}.fl-builder-ui-keyboard-shortcut-item:nth-child(even){background:#eef2f5}.fl-builder-ui-shortcut-keycode{margin-left:auto;text-transform:uppercase;letter-spacing:2px}.fl-builder-ui-keyboard-shortcust-footer{display:flex;flex-direction:row;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:10px}.dismiss-shortcut-ui{padding:10px;border-radius:4px;background:#fff;color:#000;font-size:14px;border:2px solid #fff}.dismiss-shortcut-ui:focus,.dismiss-shortcut-ui:hover{top:0;color:#000;background:#eef2f5;border:2px solid #eef2f5}.fl-color-picker-ui{width:300px}.fl-color-picker-ui.fl-color-alpha-enabled{width:238px}.fl-color-picker-ui .iris-picker{float:left;width:100%;height:224px;display:block;position:relative;border-top:1px solid rgba(0,0,0,.1)}.fl-color-picker-ui .iris-picker .iris-square-inner,.fl-color-picker-ui .iris-picker-inner{position:absolute;left:0;top:0;bottom:0;right:0}.fl-color-picker-ui .iris-picker,.iris-picker *{box-sizing:content-box}.fl-color-picker-ui .iris-error{background-color:#ffafaf}.fl-color-picker-ui .iris-picker .iris-square{width:300px;height:200px}.fl-color-picker-ui .iris-picker .iris-palette,.fl-color-picker-ui .iris-picker .iris-slider,.fl-color-picker-ui .iris-picker .iris-square-inner{height:100%;width:12.5%}.fl-color-picker-ui .iris-picker .iris-placeholder,.fl-color-picker-ui .iris-picker .iris-square{position:relative}.fl-color-picker-ui .iris-picker .iris-square-inner{width:auto;margin:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square,.fl-color-picker-ui .iris-ie-9 .iris-square-inner{box-shadow:none;border-radius:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square{outline:rgba(0,0,0,.1) solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-palette,.fl-color-picker-ui .iris-ie-lt9 .iris-slider,.fl-color-picker-ui .iris-ie-lt9 .iris-square,.fl-color-picker-ui .iris-ie-lt9 .iris-square-inner{outline:#999 solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-square .ui-slider-handle{outline:#999 solid 1px;background-color:#fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.fl-color-picker-ui .iris-ie-lt9 .iris-square .iris-square-handle{background:0 0;border:3px solid #fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.fl-color-picker-ui .iris-picker .iris-strip{box-sizing:border-box;width:calc(300px - 12px);margin:5px 6px 6px;border-radius:4px;position:relative;height:22px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle{width:6px;position:absolute;right:0;top:-2px;bottom:-2px;margin:0;border-radius:3px;background:#fff;box-shadow:0 0 2px rgba(0,0,0,.5);z-index:5;cursor:ew-resize}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle:focus{outline:#00a0d2 solid 2px}.fl-color-picker-ui .iris-picker .iris-slider-offset{position:absolute;top:0;left:6px;right:0;bottom:0;width:auto;height:auto;background:0 0;border:none;border-radius:0;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-square-handle{background:0 0;border:5px solid #999;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.fl-color-picker-ui .iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover{border-color:#999}.fl-color-picker-ui .iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover::after{border-color:#fff}.fl-color-picker-ui .iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.fl-color-picker-ui .iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.fl-color-picker-wrapper{position:relative;width:48px;height:32px}.fl-color-picker{box-shadow:0 2px 4px 0 rgba(0,0,0,.12);background:#fff;border-radius:4px;width:120px;height:36px;display:flex;flex-direction:row}.fl-color-picker-color{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;box-sizing:border-box!important;position:relative;border-radius:4px;background-color:transparent;cursor:pointer;border:2px solid transparent;border-right:2px solid rgba(0,0,0,.1);padding:0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;display:-webkit-box;display:-ms-flexbox;display:flex}.fl-color-picker-clear:hover,.fl-color-picker-color:hover{background:0 0;border:2px solid transparent}.fl-color-picker-clear:focus,.fl-color-picker-color.fl-color-picker-empty:focus,.fl-color-picker-color:focus{outline:0;top:0;border:2px solid #00a0d2;background:0 0}.fl-color-picker.fl-color-picker-has-reset .fl-color-picker-color:not(.fl-color-picker-empty){border-top-right-radius:0;border-bottom-right-radius:0}.fl-color-picker-icon{display:none;margin:auto}.fl-color-picker-color.fl-color-picker-empty{border-color:transparent}.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon{display:block}.fl-color-picker-clear{box-sizing:border-box;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 0 36px;flex:0 0 36px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:0;border:2px solid transparent;border-top-right-radius:4px;border-bottom-right-radius:4px;background-color:#fff;cursor:pointer}.fl-color-picker-color.fl-color-picker-empty+.fl-color-picker-clear{display:none}.fl-color-picker-ui{display:inline-block;font-family:Helvetica,Verdana,sans-serif;z-index:999999;position:fixed;overflow:hidden;padding-bottom:45px;border:1px solid rgba(0,0,0,.1);color:#999;background-color:#FAFAFA;border-radius:3px;box-shadow:0 9px 20px rgba(0,0,0,.17);transition:opacity .2s,visibility .2s;visibility:hidden;opacity:0;-webkit-transform:translate3d(0,0,0)}.fl-color-picker-ui.fl-color-picker-active{visibility:visible;opacity:1}.fl-color-picker-ui .fl-color-picker-input,.fl-color-picker-ui .fl-color-picker-input:focus{width:100%;height:30px;border:none!important;font-size:14px!important;padding:0 8px;vertical-align:middle;color:#656c6e;background-color:#fff;border-radius:0;box-shadow:none}.fl-color-picker-ui .iris-square-value{transition:none}.fl-color-picker-preset-add{position:absolute;top:8px;right:8px;width:14px;height:14px;background-color:#656c6e;border-radius:50%;cursor:pointer;transition:all .2s}.fl-color-picker-preset-add:hover{background-color:#333}.fl-color-picker-preset-add:after,.fl-color-picker-preset-add:before{content:'';display:block;position:relative;background-color:#fff}.fl-color-picker-preset-add:before{top:6px;left:3px;width:8px;height:2px}.fl-color-picker-preset-add:after{left:6px;top:1px;width:2px;height:8px}.fl-color-picker-presets{position:absolute;left:0;bottom:0;width:100%;z-index:15;overflow:auto;border-top:1px solid rgba(0,0,0,.1);background-color:#FAFAFA}.fl-color-picker-presets-list .fl-color-picker-preset:hover,.fl-color-picker-presets-toggle:hover{background-color:#EDEDED}.fl-color-picker-presets-toggle{position:relative;overflow:hidden;width:100%;height:35px;text-align:center;line-height:35px;font-size:12px;font-weight:700;cursor:pointer;transition:all .1s}.fl-color-picker-presets-close-label,.fl-color-picker-presets-open-label{position:absolute;top:50%;left:50%;visibility:hidden;color:#999;transition:all .5s;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);opacity:0;width:100%}.fl-color-picker-presets-close-label.fl-color-picker-active,.fl-color-picker-presets-open-label.fl-color-picker-active{color:#656c6e;visibility:visible;opacity:1}.fl-color-picker-presets-list{width:100%;list-style:none;margin:0;padding:0;overflow:auto}.fl-color-picker-presets-list .fl-color-picker-no-preset,.fl-color-picker-presets-list .fl-color-picker-preset{position:relative;padding:5px;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .1s}.fl-color-picker-presets-list .fl-color-picker-no-preset{padding:18px 5px;text-align:center}.fl-color-picker-presets-list .fl-color-picker-preset-color{display:inline-block;width:40px;height:20px;margin-right:3px;vertical-align:middle;border:1px solid rgba(0,0,0,.1);border-radius:2px;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-label{vertical-align:middle;color:#333;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-remove{position:absolute;top:50%;cursor:pointer;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.fl-color-picker-clear .fl-color-picker-icon-remove{right:auto;top:auto;margin:auto}.fl-color-picker-presets-list .fl-color-picker-preset-remove{right:5px}.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:after,.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:before{background-color:#333}.fl-color-picker-added{position:absolute;width:100%;top:0;left:0;right:0;bottom:35px;z-index:10;color:#fff;text-align:center;background-color:rgba(0,0,0,.8)}.fl-color-picker-added-text{position:absolute;top:50%;left:50%;width:80%;font-size:14px;color:#fff!important;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.fl-color-picker-icon-check{position:relative;width:50px;height:50px;margin:5px auto}.fl-color-picker-icon-check:before{content:'';display:block;position:relative;width:15px;height:30px;margin-left:14px;border:7px solid #fff;border-left:none;border-top:none;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.fl-color-picker-icon-arrow-down,.fl-color-picker-icon-arrow-up{display:inline-block;position:relative;width:10px;height:10px;margin-left:5px}.fl-color-picker-icon-arrow-down:before,.fl-color-picker-icon-arrow-up:before{content:'';display:block;position:relative;width:6px;height:6px;border:2px solid #999;border-left:none;border-top:none;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.fl-color-picker-icon-arrow-up{top:2px;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fl-color-picker-icon-remove{width:15px;height:15px}.fl-color-picker-icon-remove:after,.fl-color-picker-icon-remove:before{content:'';display:block;position:relative;background-color:#6f7881}.fl-color-picker-icon-remove:before{left:6px;width:2px;height:10px;margin-top:3px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.fl-color-picker-icon-remove:after{left:6px;width:2px;height:10px;margin-top:-10px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.fl-alpha-wrap{position:absolute;width:35px;height:215px;padding:0 5px;right:4px;border-top:none}.fl-alpha-slider{height:190px;position:absolute;top:12px;width:28px}.fl-alpha-slider .ui-slider-handle{background:rgba(0,0,0,0);border-color:#aaa;border-radius:4px;border-style:solid;border-width:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);cursor:ns-resize;height:12px;left:0;opacity:.9;position:absolute;right:0;width:30px;z-index:14}.fl-alpha-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.fl-alpha-slider-offset{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAASCAYAAAAe/ZHXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkNEQUQ0ODM4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkNEQUQ0ODQ4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2Q0RBRDQ4MThFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2Q0RBRDQ4MjhFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/r/N8AAAWYSURBVHjarFvvR3VBEN45JZGIPkREHyIiIhJJf3qUSERE9CGiDxERkcg9z9u92uucvTszz5z7xnHPj93Z2d359cxscn5+jpTS+EoiMr3/+51cZ2dn4+e29i2/u7y8RKf/pO3vc+o+n5ycoNK31+f6+jrfZ37yuG2mf3R01H3fa5N/b29vU6dP5qft0G4PDg5MGuPr/v4+jz1t27mfvN/b21P75+fHx8eZfiV/Ozs7rUJnSu/5+RlFv+m6ZJpbW1s1PnrvXl9fZ/qX89zY2LB4mfy+v7/nsdV1XltbK/dr5vnz87OcV5bJabuVlRVLBifjfX9/l/xkGtM+S0tLNXnu0szfU/P3IMn/k0678h6ddqjQFGccVL6hoCsVfsq+NZ5QtCv5rfFS41sq37W+UPhMyhxEWTetvce3NR8oewqD39qalXuGAK/WPltjajIC4x2c9Ye1f43SGcqGwRBeTZjhMNntL4pCWZMQYhE05RVl02EovRgC4RkCbUNSQAGhGB/GsKG4h6FQoigDa2i8fRBy3uLMXYIG3Vr3aZvRaCRdBYlYIMZywhBGCVhgzzOlgRuUSOvC0GMEWxOM/+EtQFh1OIIXtfwg1tRaayGjg5px0jyZKEaTle3e+AsLCygVRAh3FlEgKbReE3oYGj9EgIR00QiEgKw3ZBQbRGjBeAMtDETQmHiKDsezJNLgCTFGItZXlAgCSiQggblP+9c8SDI0lXWlFv5g3K63KZ51FOcZzthQ3LomoNHwJmKIQISI3vqzSpwIQ8liSjGMFQjDpoVgaQ6cWgvLhOC7qiAwiHrWbEg4JMSmeUrBuHoYwioOQNXmhmAcrs096s1gJCGi3hSEVU8DQxYElYHhKwUUGAa+NqOBMsSSAQJuhQhCAH4vxozExsxiihPuaIrjCVYKWlYEsjSM52G8Kxxryngl5j0j+EyGTIiED4s1Itm0ZGWxMFCLJaBAcEI6OBkmFgNBoc8Cait2ZnENE/6wQN8LJSJeSMNAjKVm+LUMAIt3PR5AQgIGp1Z5zxhE8PtXUYReYeXi4mKmOPNXBMzt2tPT07LIUtJqr66uusXEbkFnWiQ6Pj72ikrtzc1NKopuvbbj58PDwxqNHp27u7tuYWumUDV+v7+/Xyu6pc59+/DwUCsC9ujt7u6qRbt8//T01C3elbyN70fb29uZ/1FSincvLy/lPGb42tzc9IqJeHt7q61Pr2C6vr7u7tfHx8fMPhV0sLq6WhZtU0n36+uru8elPE7aLi8v1wqJPXn++fmZKYgX8ozFxcXJb0NaQTHClZT8+gBjsYdaFc+zWcUkGTCWENY66ta92oSVzo3WI6IZKGtukeyfBLFKBNAj6bUOBgaoe9wE4n04IBNkLMoC7+Skj630ZlTJMYdyMsU2T8AwpzALkVFilZgJcT2l9PCWDDSAMBSjVlJgZNk0lE1AIby0qCiCnBQNj6aBGQslZIZJ5hB6D/AzQHto5Z9Nk8tARdN4q2ExBnsyIJ311EymShyjan2rKk0zh1Ay1oQVWAZQRnkUA8RFw7TahjBnmNgMVMQrsCGZJezRtGlU0cUZ1zuaxGZPpbhApM+ZpFQqQ6xadoMtBrEKpBVo4GRXvNSxpaRixKiR+TChCYhsDwZkfFj8IkErjAHejcUI0XQrgwehhNSMHAz21E0wZ23FcCAmj8Sd/PXy2xLYLAuwRw4IMsqjFaWYOpMEhDySAPFCWyFkgAHrEcA+BNeJ4UE8HCzJPpCrerUmQIx1pWJkjqxJD8EikUo2c5aI8ZYgsAkM4WQtnHd0ns0ORgVTBghy5ISy928SGsbTMqYg523RUY8oNYG4FIYiyRyZCnFCJC87IoRAIMVOqQ7BKexxCS2hYVl9JhvlpYjnAe4MhmRPMWhhvLfXINaI9WKM0Zu0+SfAAFLE1EgfVSv7AAAAAElFTkSuQmCC) center;box-shadow:0 0 5px rgba(0,0,0,.4) inset;-moz-box-shadow:0 0 5px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4) inset;width:200px;height:22px;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);bottom:48%;left:-80px;position:absolute}.fl-alpha-text{width:30px;font-size:12px;text-align:center;color:#999;position:absolute;bottom:-5px}.fl-lightbox-wrap.fl-icon-selector{z-index:1000111}.fl-icon-selector .fl-lightbox{height:100%}.fl-icons-filter{height:auto!important;margin:0!important;position:absolute!important;right:0;top:0;padding:10px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.fl-icons-filter select{vertical-align:middle;width:160px;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;color:#000;border:2px solid #e4e7ea!important;border-right:none!important;margin:0;padding:2px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;border-radius:0}.fl-icons-filter input[type=text]{line-height:18px;vertical-align:middle;width:160px;-webkit-box-flex:1;-ms-flex:1 1 160px;flex:1 1 160px;border:2px solid #e4e7ea!important;border-radius:0!important;padding:2px 10px!important}.fl-icons-filter input[type=text]:focus,.fl-icons-filter select:focus{border:2px solid #00A0D2!important}.fl-icons-list{bottom:52px;left:0;overflow:auto;padding:20px;position:absolute;right:0;top:48px}.fl-icons-list::-webkit-scrollbar{background-color:#ccc;-webkit-appearance:none;width:10px}.fl-icons-list::-webkit-scrollbar-thumb{background-color:#666;border:1px solid #ccc}.fl-icons-section{text-align:center}.fl-icons-section h2{border-bottom:1px solid #dfdfdf;color:#333!important;font-family:Helvetica,Verdana,sans-serif!important;font-size:16px!important;font-weight:700!important;margin:0 0 20px!important;padding:0 0 10px!important;text-align:left}.fl-icons-list i,.fl-icons-list i:before{cursor:pointer;display:inline-block;font-size:40px;height:100px;line-height:100px;width:100px;background:0 0}.fl-icons-list i:hover{background:#fff;box-shadow:0 10px 20px rgba(0,0,0,.15);border-radius:4px}.fl-icon-selector-footer{bottom:0;left:0;position:absolute;right:0}.fl-lightbox-mask,.fl-lightbox-wrap{bottom:0;left:0;position:fixed;right:0;z-index:100010}@-webkit-keyframes fl-lightbox-zoom{from{-webkit-transform:scale(.4);transform:scale(.4)}to{-webkit-transform:scale(1);transform:scale(1)}}@keyframes fl-lightbox-zoom{from{-webkit-transform:scale(.4);transform:scale(.4)}to{-webkit-transform:scale(1);transform:scale(1)}}.fl-lightbox-wrap{display:none;overflow:auto;padding:4px;top:46px;-webkit-transform:translateZ(0);pointer-events:none}.fl-builder-draggable-is-dragging .fl-lightbox-wrap,.fl-builder-resizable-is-resizing .fl-lightbox-wrap,.fl-lightbox,.fl-lightbox-mask{pointer-events:auto}.fl-lightbox-mask{background:#000;opacity:.7;filter:alpha(opacity=70);top:0}.fl-lightbox{background:#F5F7F9;border-radius:4px;box-shadow:rgba(0,0,0,1) 0 4px 30px;-moz-box-shadow:rgba(0,0,0,1) 0 4px 30px;-webkit-box-shadow:rgba(0,0,0,1) 0 4px 30px;position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;z-index:100011;-webkit-transform-origin:center;transform-origin:center;-webkit-animation-name:fl-lightbox-zoom;animation-name:fl-lightbox-zoom;-webkit-animation-duration:.25s;animation-duration:.25s}.fl-lightbox.fl-lightbox-prevent-animation{animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-lightbox :not(i){color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:16px;text-decoration:none;text-transform:none}.fl-lightbox *,.fl-lightbox :after,.fl-lightbox :before{box-sizing:content-box}.fl-lightbox .fl-nanoscroller-pane{bottom:4px;right:4px;width:8px}.fl-lightbox .fa{font-family:FontAwesome}.fl-lightbox .dashicons{font-family:dashicons}.fl-lightbox.ui-draggable{box-shadow:rgba(0,0,0,.2) 0 7px 30px;-moz-box-shadow:rgba(0,0,0,.2) 0 7px 30px;-webkit-box-shadow:rgba(0,0,0,.2) 0 7px 30px}.fl-lightbox-resizable{height:500px;width:380px}@media (max-width:500px){.fl-lightbox-resizable{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-resizable .ui-resizable-handle{display:none!important}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:default!important}.fl-lightbox-controls{display:none}}.fl-lightbox-width-full{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-width-full .fl-lightbox-header{cursor:inherit!important}.fl-lightbox-controls{position:absolute;right:10px;top:10px;z-index:5}.fl-lightbox-controls .fa{color:#bdbdbd;font-size:14px;padding:5px}.fl-lightbox-controls .fa:hover{color:#aaa;cursor:pointer}.fl-lightbox-header-wrap{background:#fff;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:2px solid #eaeaea}.fl-lightbox-header{position:relative}.fl-lightbox-header h1{color:#333!important;font-size:20px!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;font-weight:600!important;margin:0!important;padding:14px 34px 15px 28px!important;text-align:left!important;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.1}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:move}.fl-lightbox-header h1 .fl-builder-badge{margin-left:10px}.fl-lightbox-content,.fl-lightbox-content-wrap{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-flex:1;-ms-flex:1 100%;flex:1 100%;height:100%;max-width:100%}.fl-lightbox-footer{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;-webkit-box-flex:0;-ms-flex:0 0;flex:0 0;-ms-flex-preferred-size:44px;flex-basis:44px;padding:4px;text-align:right}.fl-lightbox-footer .fl-builder-button{height:36px;margin-left:5px!important;-webkit-box-flex:0;-ms-flex:0 0 0%;flex:0 0 0%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.fl-lightbox-width-slim .fl-lightbox-footer{-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;padding:4px 5px}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button{-webkit-box-flex:1;-ms-flex:1 1 100%;flex:1 1 100%;display:block;text-align:center}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button:first-child{margin-left:0!important}.fl-lightbox table,.fl-lightbox td,.fl-lightbox th,.fl-lightbox tr{border:none}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel,.fl-builder-ui-skin--dark .fl-builder--preview-actions,.fl-builder-ui-skin--dark .fl-builder--search-results-panel,.fl-builder-ui-skin--dark .fl-builder-panel,.fl-builder-ui-skin--dark .fl-lightbox,body.fl-builder-ui-skin--dark .fl-builder-bar .fl-builder-bar-content{background:#23282d;color:#b4b9be;border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-header{background:#1d2227;color:#b4b9be;border-bottom-color:#1d1d1d;border-top-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-top-color:#1d2227}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel:before{border-bottom-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-arrow polygon{fill:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel-search .fl-builder-panel-search-input{background:#1e2228}.fl-builder-ui-skin--dark .fl-responsive-preview-content{background:#131619}.fl-builder-ui-skin--dark .fl-form-table th{background:#23282d!important;color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--preview-actions .device-icons,.fl-builder-ui-skin--dark .fl-builder-button{background:#383f46}.fl-builder-ui-skin--dark .fl-builder-button:focus{background:#131a22}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-primary{color:#fff!important;fill:#fff!important;background:#00A0D2}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-silent:focus{border:2px solid #00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{color:#00A0D2!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:hover,.fl-builder-ui-skin--dark .fl-builder--menu>button:hover{background:#101215!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:focus,.fl-builder-ui-skin--dark .fl-builder--menu>button:focus{background:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-bar-title{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:#181b1f}.fl-builder-simple.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:transparent}.fl-builder-ui-skin--dark .fl-builder-layout-title{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-bar-title-caret i,.fl-builder-ui-skin--dark .fl-builder-layout-pretitle,.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{color:#7d8690}.fl-builder-ui-skin--dark button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#101215!important}.fl-builder-ui-skin--dark .fl-builder--search:before{color:rgba(162,173,184,.73)}.fl-builder-ui-skin--dark .fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(162,173,184,.73)!important}.fl-builder-ui-skin--dark .fl-builder--search .search-clear{color:rgba(162,173,184,.5);background-color:#e4e4e4;background:linear-gradient(to left,#383f46,#383f46 75%,rgba(56,63,70,0))}.fl-builder-ui-skin--dark .fl-builder--menu hr{background-color:#23282d!important;border:none}.fl-builder-ui-skin--dark .fl-builder--tabs{border-color:#383f46!important}.fl-builder-ui-skin--dark .fl-builder--tabs>.is-showing,.fl-builder-ui-skin--dark .fl-builder-settings-tabs a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-more.fl-contains-active{color:#fff!important;fill:#fff!important;background:#383f46}.fl-builder-ui-skin--dark .fl-builder--tabs>:focus{background-color:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder--tabs>.is-showing:focus{color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder--menu-item:hover{background:#383f46;color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--menu * .fl-builder--menu-item-accessory,.fl-builder-ui-skin--dark .fl-builder-blocks-section-group-name{color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--category-select{background:#171b1f}.fl-builder-ui-skin--dark .fl-builder--selector-display{color:#c6cdd6;background:url(../img/svg/select-arrow-down-alt2-light.svg) center right 10px no-repeat #171b1f!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label,.fl-builder-ui-skin--dark .fl-builder-panel-search-input input{border-color:#5b656f;color:#b5becb}.fl-builder-ui-skin--dark .fl-builder-panel-search-input input{background:#171b1f!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label:focus,.fl-builder-ui-skin--dark .fl-builder-panel-search-input input:focus{border-color:#00a0d2}.fl-builder-ui-skin--dark .fl-builder--group-label{color:#171b1f!important;background:#5b656f}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu{border-color:#101215!important;color:#7c858e;background-color:#101215}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu:before{border-bottom-color:#101215}.fl-builder-ui-skin--dark .fl-builder--menu>a,.fl-builder-ui-skin--dark .fl-builder--menu>button,.fl-builder-ui-skin--dark .fl-builder--menu>span{color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:hover{background:#23282d!important;color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:focus{background:#23282d!important;color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-panel-drag-handle{fill:#5b656f}.fl-builder-ui-skin--dark .fl-builder--template-collection-section-name,.fl-builder-ui-skin--dark .fl-builder--user-templates-section-name,.fl-builder-ui-skin--dark .fl-builder-blocks-section .fl-builder-blocks-section-title{color:#969ea7;background:#171b1f}.fl-builder-ui-skin--dark .fl-builder-blocks-section-content .fl-builder-block,.fl-builder-ui-skin--dark .fl-user-template{color:#b8c2ce}.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-content,.fl-builder-ui-skin--dark .fl-user-template:hover{background:#171b1f;color:#fff}.fl-builder-ui-skin--dark .fl-builder-block:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover i{color:#6d7782!important}.fl-builder-ui-skin--dark .fl-builder-block:hover a:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover a:hover i{color:#9eacbb!important}.fl-builder-ui-skin--dark .fl-builder-block .fl-builder-block-icon{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col,.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#7d8690}.fl-builder-ui-skin--dark .fl-builder-blocks-section,.fl-builder-ui-skin--dark .fl-builder-settings-section{border-top:2px solid #171b1f}.fl-builder-ui-skin--dark .fl-user-templates{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder--template-thumbnail{border-color:#393f44}.fl-builder-ui-skin--dark .fl-builder--menu a.fl-template-collection{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-lightbox-header-wrap{background:#1d2227;border-bottom-color:#131a22}.fl-builder-ui-skin--dark .fl-lightbox .fl-lightbox-header h1{color:#fff!important}.fl-builder-ui-skin--dark .fl-form-table th label{color:#a8b3bf!important}.fl-builder-ui-skin--dark .fl-builder-settings-tabs{border-color:#383f46!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields h3.fl-builder-settings-title{background:#1b2025}.fl-builder-ui-skin--dark h3.fl-builder-settings-title .fl-builder-settings-title-text-wrap{color:#a8b3bf;background-color:#1b2025}.fl-builder-ui-skin--dark .fl-lightbox :not(i){color:#7d8690!important}.fl-builder-ui-skin--dark .fl-builder-button{color:#c6cdd6!important;fill:#c6cdd6!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{fill:#00A0D2!important}.fl-builder-ui-skin--dark .fl-lightbox .fl-builder-button.fl-builder-button-primary{color:#fff!important}.fl-builder-ui-skin--dark .fl-color-picker{background:#131a22}.fl-color-picker-color.fl-color-picker-empty .fl-color-picker-icon{fill:#6f7881}.fl-builder-ui-skin--dark .fl-color-picker-clear{background-color:#191d21}.fl-builder-ui-skin--dark .fl-color-picker-clear:hover{background-color:#373f46}.fl-builder-ui-skin--dark span.fl-builder-block-no-node-templates:hover{background:#1d2025}.fl-builder-ui-skin--dark .fl-builder-settings-tab-description{background:#1d2227}.fl-builder-ui-skin--dark .fl-builder-panel-search button svg .filled-shape{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-custom-field,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url],.fl-builder-ui-skin--dark .fl-builder-settings-fields select,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea{background-color:#131a22!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields select:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea:focus{border-color:#00a0d2!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields select{background-image:url(../img/svg/select-arrow-down-alt2-light.svg)!important}.fl-builder-ui-skin--dark .fl-builder-custom-field select,.fl-builder-ui-skin--dark .fl-photo-field select{border-color:#7d8690!important}.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle{color:#6b747d}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel-view-title,.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle:hover{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--saving-indicator{color:#858f99}.fl-builder-ui-skin--dark .fl-icons-list i:hover{background-color:#16191d;color:#fff}.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:after,.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:before{background:#6f7881}.fl-builder-ui-skin--dark .fl-builder--user-templates-section-content{border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button{background:0 0;border-right-color:#101215!important}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button:hover{background:#181b1f}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu{background:#131a22;border-color:#353c43 #131a22 #131a22}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu:before{border-bottom-color:#353c43}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:focus,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover{background:#383f46}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover.fl-active{color:#fff!important;background:#383f46}.fl-builder-ui-skin--dark ul.as-selections{background-color:#121a23}.fl-builder-ui-skin--dark .fl-custom-query .fl-builder-settings-section{border-top:2px solid #1b2026!important}.fl-builder-ui-skin--dark .pp-preview-button{background:#23282d;border:2px solid #101215}.fl-builder-ui-skin--dark .pp-preview-button .pp-preview-button-wrap .fa{color:#b8bfc7}
1
+ #wpadminbar,html{transition-duration:.35s}.fl-builder-badge,.fl-builder-bar-title span{vertical-align:middle}.fl-theme-builder-preview-select-title i:before,body .fl-theme-builder-preview-select .fa-caret-down i:before,body .fl-theme-builder-preview-select-item-title i:before{content:"\f078"}.fl-builder-edit .media-frame,.fl-lightbox-wrap{-webkit-backface-visibility:hidden}html{transition-property:margin}html.fl-builder-is-showing-toolbar{margin-top:46px!important}.fl-builder-edit body{position:static!important}.fl-builder-edit:after,.fl-builder-edit:before{z-index:0!important}.fl-builder-edit .fl-builder-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-touch-callout:none}.fl-builder-bar,.fl-builder-button{-webkit-user-select:none;-moz-user-select:none;-webkit-touch-callout:none}#wpadminbar{transition-property:transform,opacity;transform-origin:bottom;transform-style:preserve-3d;transform:rotateX(89deg) translateY(46px);opacity:0;pointer-events:none;will-change:transform}html.fl-builder-show-admin-bar{margin-top:32px}html.fl-builder-show-admin-bar #wpadminbar{transform:rotateX(0) translateY(0);pointer-events:auto;opacity:1}@media screen and (max-width:782px){html.fl-builder-show-admin-bar{margin-top:46px}}.fl-clear{clear:both}.screen-reader-text{position:absolute;left:-1000em;top:-1000em;height:1px;width:1px;overflow:hidden}.fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(240,240,240,.8);bottom:0;display:none;left:0;position:fixed;right:0;text-align:center;top:0;z-index:12000000}.fl-builder-settings .fl-builder-loading{background:url(../img/ajax-loader.svg) center center no-repeat rgba(255,255,255,.8);display:block;position:absolute}.fl-field-loader{color:#B3B3B3!important;font-style:italic}.fl-builder-node-loading{opacity:.35}.fl-builder-node-loading-placeholder{background:url(../img/ajax-loader.svg) center center no-repeat;height:50px}.fl-col-group-has-child-loading{display:-ms-flexbox;display:flex}.fl-col-group-has-child-loading>.fl-builder-node-loading-placeholder{width:50px}.fl-builder-content-editing .fl-visible-desktop,.fl-builder-content-editing .fl-visible-desktop-medium,.fl-builder-content-editing .fl-visible-medium,.fl-builder-content-editing .fl-visible-medium-mobile,.fl-builder-content-editing .fl-visible-mobile{display:block!important}.fl-responsive-preview-mask{background:#F7F7F7;bottom:0;left:0;position:fixed;right:0;top:0;z-index:99999}.fl-responsive-preview{bottom:0;left:0;position:absolute;right:0;top:0;z-index:100000}.fl-builder-preview .fl-responsive-preview{margin:0!important}.fl-responsive-preview-content{background:#F5F7F9;padding:20px 20px 45px}.fl-responsive-preview-message{color:#b3b3b3;font-family:Helvetica,Arial,Verdana,sans-serif;font-size:14px;font-weight:400;padding:0 20px 20px;text-align:center}.fl-builder-button,body .fl-builder-bar .fl-builder-bar-content{display:-ms-flexbox;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-responsive-preview-message i{cursor:pointer;margin-left:3px}.fl-responsive-preview .fl-builder-content{box-shadow:0 0 8px rgba(0,0,0,.2);margin-left:auto;margin-right:auto;max-width:100%}.fl-builder-button{color:#676F7A!important;fill:#676F7A!important;background:#E4E7EA;-ms-flex-align:center;align-items:center;display:flex;text-decoration:none;font-size:14px!important;font-weight:500!important;line-height:1!important;height:33px;margin:0;padding:0 12px;cursor:pointer;-webkit-border-radius:3px;-webkit-appearance:none;border:2px solid transparent;border-radius:3px;letter-spacing:normal!important;white-space:nowrap;box-sizing:border-box!important;transition-property:background-color,width;transition-duration:.2s;-ms-user-select:none;user-select:none}.fl-builder-button:hover{background:#dadfe5;color:#222;border:2px solid transparent!important}.fl-builder-button:active{background:#DCDCDC}button.fl-builder-button:focus{position:static;top:auto;outline:0;background:#E4E7EA;border:2px solid #00A0D0!important}.fl-builder-bar .fl-builder-button{height:auto}.fl-builder-button-primary,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button{background:#00A0D2;color:#fff!important;text-decoration:none;border:2px solid transparent!important}.fl-builder-button.fl-builder-button-primary:focus,body.fl-builder--layout-has-drafted-changes .fl-builder-button.fl-builder-done-button:focus{background:#00A0D2;border:2px solid #ffc217!important}.fl-builder-button-primary:hover,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:hover{background:#0197C6;color:#fff!important}.fl-builder-button-primary:active,body.fl-builder--layout-has-drafted-changes .fl-builder-done-button:active{background:#0484AC}.fl-builder-button-large{height:30px}.fl-builder-button-small{font-size:11px!important;line-height:1!important}.fl-builder-help-button{color:#b3b3b3;font-size:16px!important}.fl-builder-help-button i{position:relative;top:-1px}.fl-builder-help-button:hover{color:#666}.fl-builder-publish-button{line-height:45px!important}.fl-builder-content-panel-button,.fl-builder-content-panel-button:hover{fill:#00A0D2!important;font-size:30px!important;padding-bottom:4px}.fl-builder-button-silent,.fl-builder-button-silent:hover{padding:0 12px;background:0 0!important;border:2px solid transparent!important;box-shadow:none!important}.fl-builder-done-button,.fl-builder-done-button:hover{font-weight:600}.fl-field .fl-builder-button{display:inline-block;height:auto;padding:11px 12px;vertical-align:middle;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)}.fl-builder-badge{background:#333;border-radius:2px;color:#fff!important;display:inline;font-size:11px!important;font-weight:400;letter-spacing:1px;margin-left:2px;padding:2px 4px}.fl-builder-badge-global{background:#ff9600;transform:translateY(0);transition-duration:.25s;transition-property:transform}.fl-builder-blocks-node-template .fl-builder-badge-global{position:absolute;right:0;top:0}.fl-builder-block:hover .fl-builder-badge-global{display:none}.fl-builder-bar{left:0;position:fixed;right:0;top:0;z-index:999999;-ms-user-select:none;user-select:none;transition-property:transform opacity;transition-duration:.35s;transform-style:preserve-3d;perspective:1100px}.fl-builder-bar.is-hidden{pointer-events:none}.fl-builder-bar.is-hidden .fl-builder-bar-content{transform:translateY(-100%) rotateX(90deg)}.fl-builder--category-select.is-showing .fl-builder-bar-title-caret i,.fl-builder-bar-title.is-showing-menu .fl-builder-bar-title-caret>svg{transform:rotate(180deg)}body .fl-builder-bar .fl-builder-bar-content{display:flex;box-sizing:border-box;background:#fff;border-bottom:2px solid #D5DADD;color:#999;font-size:14px!important;height:48px;transition-property:background-color,opacity,transform;transition-duration:.35s;pointer-events:auto}.fl-builder-draggable-is-dragging .fl-builder-content,.fl-builder-draggable-is-dragging .fl-builder-panel .fl-lightbox,.fl-builder-resizable-is-resizing .fl-builder-content,.fl-builder-resizable-is-resizing .fl-builder-panel .fl-lightbox,body .fl-builder-bar .fl-builder-bar-content.is-muted{pointer-events:none}body .fl-builder-bar .fl-builder-bar-content.is-muted>:not(.fl-builder-publish-actions){-webkit-filter:saturate(20%) blur(1px);filter:saturate(20%) blur(1px);opacity:.4}.fl-builder-bar-title{box-sizing:border-box;color:#333;display:-ms-flexbox;display:flex;-ms-flex:0 0 380px;flex:0 0 380px;max-width:380px;border-right:2px solid #D5DADD;cursor:pointer}.fl-builder-bar-title:hover{background:#fff}.fl-builder-simple .fl-builder-bar-title{cursor:auto}.fl-builder-simple .fl-builder-bar-title:hover{cursor:auto;background:0 0}.fl-builder-bar-title-icon{box-sizing:border-box;background:0 0;-ms-flex:0 0 46px;flex:0 0 46px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:4px}.fl-builder-bar-title-icon img{max-width:100%!important;height:auto!important}.fl-builder-bar-title.fl-builder-bar-title-no-icon{padding-left:12px}.fl-builder-bar-title-area{box-sizing:border-box;-ms-flex:1 1 100%;flex:1 1 100%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden;padding:4px}.fl-builder-layout-title,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{font-size:17px;font-weight:400;line-height:1.3;color:#161B20;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret,.fl-builder-layout-pretitle,.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{font-size:12px;font-weight:500;line-height:1.3;color:#656d77;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.fl-builder-bar-title-caret i,.fl-theme-builder-preview-select-title i{color:inherit!important;font-size:14px}.fl-builder-bar-title-caret{margin-left:auto!important;-ms-flex:0 0 46px;flex:0 0 46px}.fl-theme-builder-preview-select-title i{padding:12px}.fl-theme-builder-preview-select.fl-builder-button{position:relative;border-radius:0;background:0 0;min-width:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 360px;flex:0 0 360px;max-width:360px;margin:0!important;padding:4px 10px;border:none!important;border-right:2px solid #d5dadd!important;box-shadow:none}.fl-theme-builder-preview-select.fl-builder-button:hover{border:none!important;border-right:2px solid #d5dadd!important}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fl-theme-builder-preview-select-title div{-ms-flex:1;flex:1}.fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{display:block}.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items{position:absolute;top:calc(48px + 10px);left:10px;width:calc(100% - 20px)!important;background:#fff;border-radius:4px;border:2px solid #D5DADD;border-top:3px solid #00a0d2;box-shadow:0 15px 45px 8px rgba(0,0,0,.04);margin:0!important;padding:0;z-index:-1;font-size:16px;overflow:visible;height:auto!important;max-height:calc(100vh - 66px);min-height:300px;display:-ms-flexbox!important;display:flex!important;-ms-flex-direction:column;flex-direction:column}.fl-theme-builder-preview-select-item{padding:4px 0!important;border-bottom:none!important;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.fl-theme-builder-preview-select-item:hover{text-decoration:none;color:#111;background:0 0!important}body .fl-theme-builder-preview-select .fa-caret-down{float:none}body .fl-theme-builder-preview-select-item-title{padding:10px 15px;color:#222;font-size:14px}body .fl-theme-builder-preview-select-item-children{overflow:auto}body .fl-theme-builder-preview-select-item-child{overflow:hidden;text-overflow:ellipsis;line-height:1.1;margin:0 10px;border:2px solid transparent;border-radius:4px;padding:8px 10px 10px;font-size:14px;font-weight:400;color:#222}body .fl-theme-builder-preview-select-item-child:hover{background:#e6eaed!important}.fl-theme-builder-preview-select-item .fa-caret-down{color:#606D77}.fl-builder-bar-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex:1 1 100%;flex:1 1 100%;padding:4px}.fl-builder-bar .fl-builder-button{margin:0 0 0 4px}.fl-builder-bar-actions .fl-builder-button:last-child{margin:0}.fl-builder-bar-actions:after{clear:both}.fl-builder-bar .fl-builder-content-panel-button{-ms-flex-align:baseline!important;align-items:baseline!important;padding-top:1px;font-weight:400}.fl-builder-content-panel-button svg{transition-property:transform;transition-duration:.25s;transform:rotate(0) scale(1);transform-origin:center}.fl-builder-content-panel-is-showing .fl-builder-content-panel-button svg{transform:rotate(135deg) scale(1.1) translate(.5px,-.5px)}.fl-builder--saving-indicator{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;padding:0 16px;font-size:1em;font-style:italic;color:#676f7a}.fl-builder--saving-indicator:hover{color:#676f7a}.fl-builder--saving-indicator .fa-question-circle{font-size:13px;margin:3px 0 3px 8px}.fl-builder-buy-button,.fl-builder-upgrade-button{background:#F7A407;color:#fff!important;text-decoration:none}.fl-builder-buy-button i.fa-external-link-square,.fl-builder-upgrade-button i.fa-external-link-square{color:#FFC733;margin:0 0 0 6px}.fl-builder-buy-button:hover,.fl-builder-upgrade-button:hover{background:#EE8E0D;color:#fff!important}@media (max-width:980px){.fl-builder--main-menu-panel{width:calc(100% - 20px)!important}.fl-builder--main-menu-panel:before{right:auto;left:20px}.fl-builder-bar-title,.fl-theme-builder-preview-select{-ms-flex:1 .5 380px!important;flex:1 .5 380px!important}}@media (max-width:620px){.fl-theme-builder-preview-select.fl-builder-button{display:none}}@media (max-width:500px){.fl-builder--main-menu-panel:before,.fl-builder-bar-title-area,.fl-builder-panel-drag-handle,.fl-builder-panel:before{display:none}.fl-builder--main-menu-panel,.fl-builder-panel{width:auto!important;top:44px!important;left:0!important;right:0!important;bottom:0!important;border-radius:0!important;box-shadow:none!important}.fl-builder--main-menu-panel{border-left:transparent!important;border-right:transparent!important;border-bottom:transparent!important;max-height:calc(100% - 44px)!important}.fl-builder-bar-title{-ms-flex:0 0 100px!important;flex:0 0 100px!important}.fl-builder--panel-header{border-radius:0!important;cursor:default!important}.fl-builder--panel-header .fl-builder--tabs{cursor:default!important}.fl-builder-publish-actions{width:100%!important}.fl-builder-bar-actions .fl-builder-button{padding:0 8px!important}}.fl-builder--preview-actions{display:none;position:fixed;top:4px;left:4px;z-index:100008;padding:4px;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder-preview .fl-builder--preview-actions{display:-ms-flexbox;display:flex}.fl-builder--preview-actions .device-icons{color:#555;background:#e4e4e4;border:none!important;-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;text-decoration:none;font-size:14px!important;line-height:1!important;margin:0 4px 0 0;padding:0 6px;cursor:pointer;-webkit-border-radius:3px;-webkit-appearance:none;border-radius:3px}.fl-builder--preview-actions .device-icons i{margin:0 6px}@keyframes fl-builder-ui-pin-zone-pulse{0%,100%{opacity:1;filter:alpha( opacity=1 )}50%{opacity:.5;filter:alpha( opacity=35 )}}.fl-builder-ui-pin-zone{animation:fl-builder-ui-pin-zone-pulse 2s infinite;transition:width .3s ease;background:rgba(0,160,210,.5);bottom:0;top:0;position:fixed;width:35px;z-index:100001}.fl-builder-ui-show-pin-zone-left .fl-builder-ui-pin-zone-left,.fl-builder-ui-show-pin-zone-right .fl-builder-ui-pin-zone-right{width:75px}.fl-builder-ui-pin-zone-left{left:0}.fl-builder-ui-pin-zone-right{right:0}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button{display:-ms-flexbox!important;display:flex!important;background:rgba(0,160,210,.5)!important;padding:2px 4px;width:80px;animation:fl-builder-ui-pin-zone-pulse 2s infinite}.fl-builder-content-panel-pin-zone .fl-builder-content-panel-button svg{display:none}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button{width:120px}.fl-builder-content-panel-pin-zone-hover .fl-builder-content-panel-button svg{display:none!important;width:100%;transform:none!important;fill:#00A0D2!important;border-radius:3px}.fl-builder-ui-is-pinned .fl-builder-content-panel-button,.fl-builder-ui-pinned-container .fl-lightbox-controls{display:none}.fl-builder-content-panel-pin-zone .fl-builder-done-button{-webkit-filter:grayscale(100%);filter:grayscale(100%)}.fl-builder-panel.fl-builder-ui-pinned{top:48px!important;bottom:0!important;height:auto!important;border-radius:0;border:none;box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s;z-index:9}.fl-builder-panel.fl-builder-ui-pinned-right{left:auto!important;right:0;border-left:2px solid #d5dadd}.fl-builder-panel.fl-builder-ui-pinned-left{left:0;right:auto;border-right:2px solid #d5dadd}.fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-radius:0!important}.fl-builder-ui-pinned-container .fl-lightbox-wrap{position:absolute;z-index:9}.fl-builder-ui-pinned-container .fl-lightbox{position:absolute;top:0;bottom:0;left:0;right:0;width:auto!important;height:auto;border-radius:0;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-builder-ui-pinned-container .fl-lightbox-header-wrap{border-radius:0}.fl-builder-ui-pinned-container .fl-lightbox.ui-draggable .fl-lightbox-header{cursor:auto}.fl-builder-ui-pinned-container .fl-lightbox-header h1{padding:12px 20px 10px!important}.fl-builder-ui-pinned-content-transform{transform:scale(1);transform-origin:center top 0}.fl-builder-ui-pinned-collapse{cursor:pointer;display:none;position:absolute!important;bottom:2px;padding:5px;border:2px solid transparent;background:0 0;width:36px;height:36px;border-radius:4px;fill:#778794;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.fl-builder-ui-pinned-collapse:focus,.fl-builder-ui-pinned-collapse:hover{top:auto!important;background:0 0;border:2px solid transparent;outline:0;fill:#00A0D2}.fl-builder-ui-pinned-collapse:focus{background:#E4E7EA}.fl-builder-ui-pinned-collapse>*{margin:auto;line-height:1}.fl-builder-ui-pinned-collapse svg g{fill:inherit}.fl-builder-ui-is-pinned-right .fl-builder-ui-pinned-right-collapse{display:-ms-flexbox;display:flex;left:-40px}.fl-builder-ui-is-pinned-left .fl-builder-ui-pinned-left-collapse{display:-ms-flexbox;display:flex;right:-40px}.fl-builder-ui-pinned-collapse i[data-toggle=show],.fl-builder-ui-pinned-is-collapsed i[data-toggle=hide]{display:none}.fl-builder-ui-pinned-is-collapsed i[data-toggle=show]{display:block}.fl-builder-ui-is-pinned-left [data-toggle=hide],.fl-builder-ui-is-pinned-right [data-toggle=show]{transform:rotateY(180deg)}.fl-builder-ui-pinned-is-collapsed .fl-lightbox{box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none}.fl-builder-ui-pinned-is-collapsed .fl-builder--panel-header{display:none}@keyframes fl-builder-show-panel{from{transform:scale(.8)}to{transform:scale(1)}}.fl-builder--search-results-panel,.fl-builder-panel{box-sizing:border-box;position:fixed!important;right:20px;top:calc(48px + 10px);width:380px;bottom:20px;background:#F5F7F9;color:#676F7A;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;border-radius:4px;box-shadow:0 8px 40px 4px rgba(0,0,0,.3);z-index:10000007;will-change:transform;display:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fl-builder-panel{transform-origin:top right;animation-name:fl-builder-show-panel;animation-duration:.15s;animation-fill-mode:both}.fl-builder--search-results-panel{position:absolute;right:0;top:93px;left:0;bottom:0;width:auto!important;border:none;border-radius:0;box-shadow:none;min-height:100px;max-height:calc(100vh - 54px);overflow:auto;z-index:1}.fl-builder-content-panel-is-showing .fl-builder-panel,.fl-builder-search-results-panel-is-showing .fl-builder--search-results-panel{display:block}.fl-builder-panel .fl-lightbox .fl-builder-panel-drag-handle,.fl-builder-ui-is-pinned .fl-builder--panel-arrow,.fl-lightbox-width-full .fl-builder-panel-drag-handle,body.fl-builder-draggable-is-dragging .fl-builder--panel-arrow{display:none}.fl-builder-content-panel-is-showing .fl-builder-panel.fl-builder--current-view-templates{width:520px}.fl-builder--search-results-panel .fl-builder--no-results{text-align:center;padding:50px 20px}.fl-builder--panel-arrow{position:absolute;top:-13px;right:10px}.fl-builder--panel-arrow polygon{fill:#00a0d2}.fl-builder--panel-header{background:#fff;border-top:3px solid #00a0d2;border-bottom:2px solid #e6eaed;border-top-right-radius:4px;border-top-left-radius:4px}.fl-builder-ui-is-pinned .fl-builder--panel-header{border-top-color:transparent}.fl-builder-panel-drag-handle{position:absolute;top:7px;left:10px;fill:#ccd4da;width:6px}.fl-builder-ui-is-pinned-left .fl-builder-panel-drag-handle{left:auto;right:10px}.fl-builder--panel-header .fl-builder--panel-controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-content-group-select{-ms-flex:1 1;flex:1 1}.fl-builder--panel-header .fl-builder--panel-controls .fl-builder-panel-search{-ms-flex:0 0;flex:0 0;padding:0 10px 6px 0;margin-left:-4px}.fl-builder--panel-controls .fl-builder-panel-search button{width:38px;background:0 0!important;border:2px solid transparent!important;font-size:inherit;height:38px;padding:0}.fl-builder--panel-controls .fl-builder-panel-search button:active,.fl-builder--panel-controls .fl-builder-panel-search button:focus{top:0;outline:0}.fl-builder-panel-search button svg{height:auto;width:20px}.fl-builder-panel-search button.fl-builder-dismiss-panel-search svg{width:16px}.fl-builder-panel-search button svg .filled-shape{fill:#000}.fl-builder--panel-controls .fl-builder-panel-search button:active svg .filled-shape,.fl-builder--panel-controls .fl-builder-panel-search button:focus svg .filled-shape{fill:#00A0D2}.fl-builder-panel-search .fl-builder-panel-search-input{display:none;position:absolute;top:0;left:0;right:0;bottom:0;background:#fff}.fl-builder-panel-search.is-showing-input .fl-builder-panel-search-input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:0 10px 6px}.fl-builder-panel-search-input input{-ms-flex:1 1 100%;flex:1 1 100%;border:2px solid #e6eaed;background:#fff;border-radius:4px;margin-right:4px;padding:10px;color:#333}.fl-builder-panel-search-input input:focus{border-color:#0197C6;outline:0}.fl-builder-panel-search-input button{-ms-flex:0 0 38px;flex:0 0 38px}.fl-builder-panel-content-wrap{bottom:0;height:auto;left:0;overflow:hidden;position:absolute;right:0;top:43px}.fl-builder-panel-content{padding-bottom:60px}.fl-builder-blocks-section{border-top:2px solid #e6eaed}.fl-builder--panel-view .fl-builder-blocks-section:first-child{border-top:none}.fl-builder-blocks-group:first-child{padding:20px 0 0}.fl-builder-blocks-group .fl-builder-blocks-section-group-name{display:block;padding:0 30px 15px;color:#000;font-size:20px;font-weight:600;line-height:1.4}.fl-builder-blocks-section .fl-builder-block,.fl-builder-blocks-section .fl-builder-blocks-section-title{display:block;line-height:1.1;padding:15px 20px}.fl-builder--template-collection-section-name,.fl-builder-blocks-section .fl-builder-blocks-section-title{display:inline-block;font-weight:700;font-size:12px;line-height:1.2;text-transform:uppercase;color:#333;padding:4px 10px 4px 15px;margin:0!important;background:#e6eaed;border-bottom-right-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top}.fl-builder-blocks-section .fl-builder-blocks-section-title i{color:#bfbfbf;float:right}.fl-builder-blocks-section-content{overflow:auto;padding:10px 10px 20px}.fl-builder-blocks-section-content:after{float:none;clear:both}.fl-builder-blocks-section-content.fl-builder-modules,.fl-builder-blocks-section-content.fl-builder-rows,.fl-builder-blocks-section-content.fl-builder-widgets{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.fl-builder-blocks-section-content .fl-builder-block-module,.fl-builder-blocks-section-content .fl-builder-block-row{-ms-flex:1 1 50%;flex:1 1 50%;width:50%;box-sizing:border-box}.fl-builder--search-results-panel .fl-builder-blocks-section-content .fl-builder-block-module{-ms-flex:1 1 100%;flex:1 1 100%;width:100%}.fl-builder-blocks-section.fl-active .fl-builder-blocks-section-content{display:block}.fl-builder-blocks-section-content .fl-builder-block{box-sizing:border-box;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:14px;line-height:1.1;font-weight:500;color:#727272}.fl-builder-block{position:relative;height:47px}.fl-builder-block.fl-builder-block-col-group{height:84px}.fl-builder-block.fl-builder-block-module-template.fl-builder-block-has-thumbnail,.fl-builder-block.fl-builder-block-row-template.fl-builder-block-has-thumbnail,.fl-builder-block.fl-builder-block-saved-module.fl-builder-block-has-thumbnail,.fl-builder-block.fl-builder-block-saved-row.fl-builder-block-has-thumbnail{padding:10px;height:auto}.fl-builder-block:hover{overflow:visible;z-index:1}.fl-builder-block:hover .fl-builder-block-content{display:block;box-sizing:border-box;position:absolute;top:0;left:0;width:100%;padding:15px 20px;border-radius:4px;background:#fff;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);text-decoration:none;color:#111;cursor:move;overflow:hidden}.fl-builder-block.fl-builder-block-module-template.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-block.fl-builder-block-row-template.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-block.fl-builder-block-saved-module.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-block.fl-builder-block-saved-row.fl-builder-block-has-thumbnail .fl-builder-block-content,.fl-builder-blocks-node-template .fl-builder-block,.fl-builder-blocks-section-content .fl-builder-block .fl-builder-block-details{position:relative}.fl-builder-block-module:hover .fl-builder-block-content{width:auto;min-width:100%}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual{display:block;margin-bottom:7px}.fl-builder-block-drag-helper .fl-builder-block-content .fl-builder-block-visual{display:none!important}.fl-builder-block .fl-builder-block-content .fl-builder-block-visual.fl-cols-visual{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:30px}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{-ms-flex:1 100%;flex:1 100%;background:#464a4c;height:30px;margin:0 2px;border-radius:2px}.fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#000}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:first-child{margin-left:0!important}.fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col:last-child{margin-right:0!important}.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.left-right-sidebar .fl-cols-visual-col:last-child,.fl-cols-visual.left-sidebar .fl-cols-visual-col:first-child,.fl-cols-visual.right-sidebar .fl-cols-visual-col:last-child{-ms-flex-preferred-size:60px;flex-basis:60px}.fl-builder-block-saved-module.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-module:hover .fl-builder-block-title,.fl-builder-block-saved-row.fl-builder-block-global .fl-builder-block-title,.fl-builder-block-saved-row:hover .fl-builder-block-title{margin-right:70px}.fl-builder-block-module:nth-child(even):hover .fl-builder-block-content{left:auto;right:0}.fl-builder-block-thumbnail{border-radius:4px;background-size:contain;background-repeat:no-repeat;background-position:center;background-color:rgba(0,0,0,.06);margin-bottom:10px;transform-origin:bottom;transition-property:transform,box-shadow;transition-duration:.15s}.fl-builder-block:hover .fl-builder-block-thumbnail{transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder-block .fl-builder-block-icon{margin-right:7px;fill:#000;display:inline-block;width:20px;height:20px;vertical-align:middle}.fl-builder-block-thumbnail:before{content:"";display:block;padding-top:50%}.fl-builder-block-thumbnail img{max-width:100%;max-height:160px;margin:0;-o-object-fit:cover;object-fit:cover}.fl-builder-blocks-section-content .fl-builder-block{box-shadow:0 0 0 transparent;transition-property:box-shadow;transition-duration:.15s}.fl-builder-blocks-section-content .fl-builder-block i,.fl-user-template-actions i{color:#000;margin-right:10px}.fl-builder-blocks-separator{background:#f1f1f1;height:6px}.fl-builder-block:hover .fl-builder-badge{background:#2ea2cc}.ui-sortable-helper .fl-builder-badge{display:none!important}.fl-builder-modules-cta a{color:#999!important;display:block!important;font-size:12px!important;font-style:italic!important;padding:15px 20px!important;line-height:16px!important}.fl-builder-modules-cta a:hover{background:#e5e5e5!important;color:#666!important;text-decoration:none!important}.fl-builder-modules-cta a:focus{text-decoration:none!important}.fl-builder-modules-cta .fa{float:right!important;font-size:14px!important;margin:3px 0 0 9px!important}.fl-builder--panel-message{text-align:center;padding:40px 20px;font-size:16px}.fl-builder--panel-message .fl-builder-button{display:inline-block;padding:10px}.fl-builder--panel-cta{padding:20px 30px;font-size:16px;text-align:center}.fl-builder--panel-cta a{color:inherit;text-decoration:none}.fl-builder--panel-cta a:hover{text-decoration:none}.fl-builder-block-template-image{margin:5px 0 10px;max-width:100%;border:1px solid #dfdfdf}.fl-builder-block .fl-builder-block-title{overflow:hidden;text-overflow:ellipsis;vertical-align:middle;line-height:1.3}.ui-sortable-helper .fl-builder-block-template-image{display:none!important}@keyframes fl-builder-template-item-enter{from{transform:translateY(100px) scale(.3);opacity:0}to{transform:scale(1);opacity:1}}.fl-builder--template-collection{clear:both;padding:10px 0}.fl-builder--template-collection-section-content{padding:0 10px}.fl-builder--template-collection-item{box-sizing:border-box;width:50%;float:left;padding:10px;cursor:pointer;font-size:13px;transform-origin:center;opacity:1}.fl-builder--template-thumbnail{background-size:cover;background-clip:content-box;background-position:center top;background-color:#fff;border:2px solid transparent;transform-origin:bottom;transition-property:transform,box-shadow;transition-duration:.15s}.fl-builder--template-collection-item[data-id="0"] .fl-builder--template-thumbnail,.fl-user-template .fl-builder--template-thumbnail{border-color:#e4e7ea}.fl-builder--template-thumbnail:before{display:block;content:"";padding-top:120%}.fl-builder--template-thumbnail:hover{transform:scale(1.05);box-shadow:0 20px 40px rgba(0,0,0,.08)}.fl-builder--template-name{text-align:center;padding:4px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fl-builder--template-collection-section{padding-bottom:10px;border-bottom:1px solid #dfdfdf}.fl-builder--template-collection-section:after,.fl-builder--template-collection-section:before{content:"";display:block;clear:both}.fl-builder--template-collection-section-name{padding:15px 10px 10px}span.fl-builder-block-no-node-templates{display:block;padding:15px 20px;text-align:center}span.fl-builder-block-no-node-templates:hover{cursor:default}.fl-builder-blocks-section-content .fl-builder-node-template-actions{bottom:0;cursor:default;display:none;position:absolute;right:0;top:0}.fl-builder-blocks-section-content .fl-builder-node-template-delete,.fl-builder-blocks-section-content .fl-builder-node-template-edit{display:inline;cursor:pointer;margin:0;padding:15px 10px;text-align:center;width:30px}.fl-builder-block-details .fl-builder-node-template-delete,.fl-builder-block-details .fl-builder-node-template-edit{padding-top:0!important}.fl-builder-blocks-section-content .fl-builder-node-template-delete i,.fl-builder-blocks-section-content .fl-builder-node-template-edit i{margin:0}.fl-builder-blocks-section-content .fl-builder-node-template-delete:hover i,.fl-builder-blocks-section-content .fl-builder-node-template-edit:hover i{color:#444}.fl-builder-blocks-node-template .fl-builder-block:hover .fl-builder-node-template-actions{display:block}.ui-sortable-helper .fl-builder-node-template-delete,.ui-sortable-helper .fl-builder-node-template-edit{display:none!important}.fl-builder--tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative;-ms-flex-pack:start;justify-content:flex-start;-ms-flex-align:center;align-items:center}.fl-builder-panel .fl-builder--panel-header{cursor:move;position:absolute;top:0;left:0;right:0;z-index:9}.fl-builder-panel .fl-builder--tabs{-ms-flex-pack:distribute;justify-content:space-around;padding:0 24px;min-height:46px;cursor:pointer}.fl-builder--tab-wrap{-ms-flex:1 1 100%;flex:1 1 100%;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:stretch;align-items:stretch;-ms-flex-pack:justify;justify-content:space-between}.fl-builder--tabs button,.fl-builder--tabs button:active,.fl-builder--tabs button:focus,.fl-builder--tabs button:hover{-ms-flex:1 1 100%;flex:1 1 100%;display:inline-block;text-decoration:none;color:inherit;text-align:center;letter-spacing:normal!important;padding:5px;cursor:pointer;font-size:14px!important;font-weight:600!important;line-height:1.4!important;background:0 0!important;outline:0!important;border:2px solid transparent;border-radius:4px;margin:7px 0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;top:0;transition-property:background,color;transition-duration:.25s}.fl-builder--current-view-name,.fl-builder-drop-zone{text-align:left;text-overflow:ellipsis;white-space:nowrap}.fl-builder--tabs button:focus{background:#e6eaed!important}.fl-builder--tabs button.is-showing{color:#0086b0}.fl-builder--panel-view{display:none;overflow:hidden}.fl-builder--panel-view.is-showing{display:block}.fl-builder--content-library-panel .fl-builder--panel-view.is-showing{position:absolute;top:96px;bottom:0;left:0;right:0;width:auto;height:auto}.fl-builder--content-library-panel.single-view .fl-builder--panel-view.is-showing{top:52px}.fl-builder--content-library-panel.ui-draggable-dragging{height:500px!important}.fl-builder--content-library-panel .fl-builder-drop-zone{display:none!important}.fl-builder--panel-header .fl-builder--tabs{cursor:move}.fl-builder--category-select{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative}.fl-builder--selector-display{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;position:relative;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;color:#161B20;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;cursor:pointer;font-size:13px;font-weight:700;line-height:16px;border-radius:4px}.fl-builder--selector-display-label{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:inherit;line-height:inherit;width:100%;padding:0!important;color:#6D6D6D;background:0 0;border:2px solid #e4e7ea;border-radius:4px;font-family:inherit}.fl-builder--selector-display-label:active,.fl-builder--selector-display-label:hover{top:0;color:inherit;background:0 0;border:2px solid #e4e7ea;border-radius:4px}.fl-builder--selector-display-label:focus{top:0;color:inherit;background:0 0;border:2px solid #00A0D2;outline:0}.fl-builder--group-label{color:inherit;-ms-flex:0 0 0%;flex:0 0 0%;padding:9px 12px 9px 10px;background:#e6eaed;border-top-left-radius:2px;border-bottom-left-radius:2px}.fl-builder--current-view-name{-ms-flex:1 1 100%;flex:1 1 100%;color:inherit;overflow:hidden;font-weight:600;padding:9px 10px}.fl-builder--selector-menu{display:none;color:#293138;position:absolute;top:46px;left:0;width:100%;background:#fff;border-radius:4px;box-shadow:0 0 20px 2px rgba(0,0,0,.2);overflow:visible}.fl-builder--selector-menu:before{bottom:100%;right:8px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}.fl-builder--category-select.is-showing .fl-builder--selector-menu{display:-ms-flexbox;display:flex;max-height:calc(100vh - 150px)}.fl-builder--category-select.is-showing .fl-builder--selector-menu .fl-builder--menu{margin:10px 0;-ms-flex:1 100%;flex:1 100%;overflow:auto}button.fl-builder-button.fl-builder-bar-title-caret{margin:4px}button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#e6eaed!important;border-color:transparent!important}.fl-builder--menu{margin-bottom:2px}.fl-builder--menu>a,.fl-builder--menu>button,.fl-builder--menu>span{display:block;padding:8px 10px 10px;border-radius:4px;color:inherit;text-decoration:none;background:0 0!important;border:2px solid transparent!important;font-weight:400;font-family:inherit}.fl-builder--menu>a:active,.fl-builder--menu>a:focus,.fl-builder--menu>a:hover,.fl-builder--menu>button:active,.fl-builder--menu>button:focus,.fl-builder--menu>button:hover{background:#e6eaed!important;border:2px solid transparent!important;top:0}.fl-block-col-resize-feedback,.fl-block-overlay-title,.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging,.fl-builder-drop-zone,.fl-builder-empty,.fl-builder-has-submenu>ul.fl-builder-submenu li a{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.fl-builder--menu>a:focus,.fl-builder--menu>button:focus{outline:0;color:inherit;text-decoration:none}.fl-builder--menu .fl-inset{padding-left:35px;font-size:14px;line-height:1.25}.fl-builder--menu a.fl-template-collection{color:#161B20}.fl-builder--menu>:after{clear:both}.fl-builder--menu * .fl-builder--menu-item-accessory{float:right;color:#000;text-transform:uppercase;text-align:center;min-width:20px;letter-spacing:2px}.fl-builder--menu * .fl-builder--menu-item-accessory i{font-size:1em;margin-top:2px}.fl-builder--menu .fl-builder-video-wrap iframe{display:block;margin:4px 0;width:100%}.fl-builder-publish-actions{display:-ms-flexbox;display:flex;box-sizing:border-box;position:absolute;top:0;right:0;width:380px;max-width:100%;height:46px;padding:4px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;opacity:1;pointer-events:auto;transform:scaleX(1) translateX(0);transform-origin:right;transition-property:transform,opacity;transition-duration:.15s}.fl-builder-publish-actions.is-hidden{transform:scaleX(.23) translateX(68px);opacity:0;pointer-events:none}.fl-builder-bar .fl-builder-button-group{display:-ms-flexbox;display:flex;-ms-flex-preferred-size:100%;flex-basis:100%}.fl-builder-bar .fl-builder-button-group>.fl-builder-button{border-radius:0;margin-left:0;-ms-flex-preferred-size:100%;flex-basis:100%;text-align:center;-ms-flex-pack:distribute;justify-content:space-around;box-shadow:none}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:first-child{margin-left:0;border-top-left-radius:3px;border-bottom-left-radius:3px}.fl-builder-bar .fl-builder-button-group>.fl-builder-button:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}.fl-builder-publish-actions-click-away-mask{display:none;position:fixed;top:0;left:0;right:0;height:100vh;background:0 0}.fl-builder-dragging .fl-builder-content:not(.fl-builder-empty){padding:16px 0}.fl-builder-empty{display:none;border:2px dashed #969696;border-radius:8px;color:#909090;font-size:20px;font-weight:700;margin:10px;padding:250px 20px;position:relative;text-align:center;text-transform:uppercase}.fl-builder-edit .fl-builder-empty{display:block}.fl-builder-block-drag-helper,.fl-builder-block.ui-draggable-dragging{background:rgba(255,255,255,.95)!important;border:2px solid #000;border-radius:4px;box-shadow:0 0 8px rgba(0,0,0,.2);-moz-box-shadow:0 0 8px rgba(0,0,0,.2);-webkit-box-shadow:0 0 8px rgba(0,0,0,.2);color:#333!important;font-size:13px!important;height:47px!important;line-height:40px!important;overflow:hidden;padding:0 20px;position:fixed!important;text-overflow:ellipsis;white-space:nowrap;width:180px!important;z-index:100010!important;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:start;justify-content:flex-start}.fl-builder-block.fl-builder-block-drag-helper:hover{padding:0;box-shadow:none}.fl-builder-block-drag-helper:hover .fl-builder-block-content{position:static;padding:0 20px}.fl-col-has-highlight-guide .fl-col-content,.fl-col-highlight,.fl-row-highlight .fl-col-group{position:relative}.fl-builder-block-saved-module.fl-builder-block-drag-helper:hover .fl-builder-block-content,.fl-builder-block-saved-row.fl-builder-block-drag-helper:hover .fl-builder-block-content{padding:14px 20px}.fl-builder-block-drag-helper .fl-builder-block-icon{fill:#000;margin-top:-10px}.fl-builder-drop-zone{animation:fl-builder-drop-zone-pulse 2s infinite;background:#00A2D7;border-radius:4px;color:#fff!important;display:block;font-weight:400;font-size:12px;letter-spacing:1px;line-height:14px;margin:10px;padding:6px 8px 5px;position:relative;text-shadow:none;text-transform:none;overflow:hidden;z-index:10}@keyframes fl-builder-drop-zone-pulse{0%,100%{background-color:#00A2D7}50%{background-color:#79DEFF}}.fl-builder-drop-zone-global{animation:fl-builder-drop-zone-global-pulse 2s infinite;background:#ff9600}.fl-field,.fl-lightbox{animation-duration:.25s}@keyframes fl-builder-drop-zone-global-pulse{0%,100%{background-color:#FFBC5C}50%{background-color:#ff9600}}.fl-builder-content>.fl-builder-drop-zone{margin:10px 20px}.fl-row-content>.fl-builder-drop-zone{margin:3px 7px}.fl-col-has-cols>.fl-col-content>.fl-builder-drop-zone{margin:3px 10px}.fl-sortable-disabled>.fl-builder-drop-zone{display:none!important}.fl-col-group-equal-height.fl-col-group-align-center .fl-col-content>.fl-builder-drop-zone{width:100%}.fl-row-highlight{padding:16px 0}.fl-row-highlight .fl-row-content{border:2px dashed rgba(203,205,206,.5);padding:8px;border-radius:6px}.fl-row-highlight.fl-node-global .fl-row-content{border-color:#ff9600}.fl-col-highlight{padding:8px}.fl-col-highlight .fl-col-content{border-style:dashed!important;border-color:#00a0d2!important;border-radius:4px;min-height:100px;overflow-x:hidden;width:100%;border-width:2px!important}.fl-col-has-cols.fl-col-highlight>.fl-col-content{padding:8px}.fl-col-highlight.fl-node-global .fl-col-content{border-color:#ff9600!important}.fl-builder-simple .fl-col-highlight .fl-col-content{border:none!important}.fl-col-highlight-guide{background:rgba(0,160,210,.05);border:2px solid #00A0D2;border-radius:4px;bottom:4px;left:4px;position:absolute;right:4px;top:4px;z-index:1}.fl-node-global .fl-col-highlight-guide{border-color:#ff9600!important;background-color:rgba(255,150,0,.06)!important}.fl-col-has-highlight-guide .fl-block-overlay{background:0 0;border-color:transparent}.fl-col-has-highlight-guide .fl-block-col-resize{display:none}.fl-col-has-highlight-guide .fl-col-highlight .fl-col-content{border-color:transparent!important}.fl-col-drop-target{bottom:8px;display:none;left:-9px;position:absolute;top:8px;width:18px;z-index:1}.fl-col-highlight .fl-col-drop-target{display:block}.fl-col-drop-target-last{left:auto;right:-9px}.fl-col-drop-target .fl-builder-drop-zone{bottom:0;left:2px;margin:0;padding:0;position:absolute;right:2px;top:0}.fl-col-group-drop-target{display:none;left:8px;height:18px;position:absolute;right:8px;top:-9px;z-index:1}.fl-row-highlight .fl-col-group-drop-target{display:block}.fl-col-group-drop-target-last{top:auto;bottom:-9px}.fl-col-group-drop-target .fl-builder-drop-zone{bottom:2px;left:0;margin:0;padding:0;position:absolute;right:0;top:2px}.fl-row-content>.fl-col-group-drop-target{position:static}.fl-row-content>.fl-col-group-drop-target .fl-builder-drop-zone{height:18px;position:static}.fl-row-drop-target{display:none;left:0;height:24px;margin-top:-28px;position:absolute;right:0;z-index:1}.fl-row-highlight .fl-row-drop-target{display:block}.fl-row-drop-target-last{margin-top:4px}.fl-row .fl-row-drop-target .fl-builder-drop-zone{bottom:0;left:4px;margin:0;position:absolute;right:4px;top:0}.fl-builder-content>.fl-row-drop-target{margin:0;position:static}.fl-builder-dragging .fl-builder-content.fl-builder-empty>.fl-row-drop-target{bottom:10px;display:block;height:auto;left:0;position:absolute;right:0;top:10px}.fl-builder-content .fl-row-drop-target .fl-builder-drop-zone{margin-bottom:0;margin-top:0}.fl-col-group:focus,.fl-col:focus,.fl-module:focus,.fl-row:focus{outline:0}.fl-sortable-proxy{display:none}.fl-block-overlay,.fl-block-overlay *{text-shadow:none;-webkit-touch-callout:none}.fl-block-overlay-active{position:relative}.fl-block-overlay-actions{background:#00A0D2;float:left;height:30px;margin:-1px -1px 0;padding:0 4px;text-shadow:none;border-bottom-right-radius:5px;border-top-left-radius:3px}.fl-row-overlay-header-bottom .fl-block-overlay-actions{border-radius:0 5px 0 3px}.fl-builder-col-resizing .fl-block-overlay-actions,.fl-builder-row-resizing .fl-block-overlay-actions{overflow:hidden}.fl-block-overlay-actions>span{display:block;float:left}.fl-block-overlay-actions i{color:#fff!important;cursor:pointer;display:block!important;float:left;font-size:16px!important;height:28px!important;font-weight:100!important;line-height:28px!important;opacity:.8;filter:alpha(opacity=80);text-align:center;width:32px!important}.fl-block-overlay-actions i:hover{opacity:1;filter:alpha(opacity=100)}.fl-block-overlay-actions>i:first-child{padding-left:4px}.fl-block-overlay-actions>i:last-child{padding-right:2px}.fl-block-overlay-actions .fl-block-move{cursor:move}.fl-block-overlay-title{color:#fff!important;float:left;font-size:14px;height:30px;line-height:29px;margin-right:2px;padding:0 12px 0 8px}.fl-col-overlay,.fl-module-overlay,.fl-row-overlay{background:rgba(190,239,255,0);color:#fff}.fl-row-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:0;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;left:0;position:absolute;top:-33px;right:0;z-index:100006}.fl-row-overlay.fl-row-menu-active,.fl-row-overlay.fl-row-menu-active.fl-block-overlay.fl-block-overlay-global{z-index:100007}.fl-row-full-width .fl-row-overlay{left:2px;right:2px;bottom:2px}.fl-row-overlay-header-bottom{bottom:-32px!important;top:0}.fl-row-overlay-header-bottom .fl-block-overlay-header{position:absolute;bottom:0}.fl-block-overlay-active .fl-row-content-wrap{position:relative}.fl-block-overlay-active .fl-row-content{position:relative;z-index:100007!important}.fl-builder-row-resizing .fl-col.fl-block-overlay-active,.fl-builder-row-resizing .fl-module.fl-block-overlay-active{position:static}.fl-col-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:8px;cursor:pointer;left:8px;position:absolute;right:8px;top:8px;z-index:100008}.fl-module-overlay{border:2px solid #00A0D2;border-radius:4px;bottom:4px;cursor:pointer;left:4px;min-height:32px;position:absolute;right:4px;top:4px;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-module-overlay{cursor:default}.fl-module-adjust-height{padding-bottom:15px;padding-top:15px}.fl-block-overlay-global{background:rgba(255,150,0,0);border:2px solid #F7A407;border-radius:4px}.fl-block-overlay-global .fl-block-overlay-actions{background:#F7A407}.fl-block-overlay-title-global{background:#fff;color:#ff9600!important;font-size:11px;letter-spacing:1px;margin-left:4px;padding:2px 4px;vertical-align:top}.fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:pointer;z-index:100007}.fl-builder-global-templates-locked .fl-block-overlay-global.fl-row-overlay{cursor:default}.fl-builder-row-template .fl-block-overlay-global.fl-row-overlay{background:rgba(255,150,0,0);cursor:default;z-index:100006}.fl-block-overlay-global.fl-row-overlay .fl-block-col-resize{display:none}.fl-block-overlay-muted .fl-row-overlay{background:rgba(85,93,102,0);border:2px solid #555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-overlay-actions{background:#555D66}.fl-block-overlay-muted .fl-row-overlay .fl-block-col-resize{display:none}.fl-node-disabled .fl-row-content-wrap{opacity:.3}.fl-block-col-resize{bottom:0!important;position:absolute;top:0!important;width:6px}.fl-block-col-resize-e{cursor:ew-resize;left:auto!important;right:-2px!important}.fl-block-col-resize-w{cursor:ew-resize;left:-7px!important}.fl-block-col-resize-handle-wrap{margin:-4px 0 0 -5px;padding:0 5px;position:absolute;top:50%!important}.fl-block-col-resize-e .fl-block-col-resize-handle-wrap{margin-left:-6px}.fl-block-col-resize-handle{background:#fff;border:2px solid #00A0D2;border-radius:50%;height:12px;width:12px}.fl-node-global .fl-block-col-resize-handle{border-color:#ff9600}.fl-block-col-resize-feedback{color:#333!important;display:none;font-size:11px!important;position:absolute}.fl-block-col-resize-feedback-left,.fl-block-col-resize-feedback-right{background:#fff;border:1px solid #3ba0ff;padding:2px 4px}.fl-block-col-resize-feedback-left{right:20px;top:-7px}.fl-block-col-resize-feedback-right{left:20px;top:-7px}.fl-builder-has-submenu{position:relative}.fl-builder-has-submenu>ul.fl-builder-submenu{background:#00A0D2;box-shadow:0 0 20px rgba(0,0,0,.2);border-radius:0 4px 4px;display:none;left:0;list-style:none;margin:0;padding:6px 0;position:absolute;text-align:left;top:100%;width:165px;z-index:100008}.fl-builder-has-submenu>ul.fl-builder-submenu li{list-style:none;margin:0;padding:0}.fl-builder-submenu-right ul.fl-builder-submenu{left:auto;right:0}.fl-builder-has-submenu.fl-builder-submenu-open>ul.fl-builder-submenu{display:block}.fl-builder-has-submenu>ul.fl-builder-submenu li a{border-bottom:0 none;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;color:#fff!important;display:block;line-height:13px;font-size:13px;font-weight:400;opacity:.8;filter:alpha(opacity=80);overflow:hidden;padding:6px 12px;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.fl-builder-has-submenu>ul.fl-builder-submenu li a:hover{background:#0197C6;color:#fff;opacity:1;filter:alpha(opacity=100);text-decoration:none}.fl-builder-actions-title,.fl-builder-alert-lightbox .fl-lightbox-message{color:#333!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:16px!important}.fl-builder-has-submenu .fl-builder-submenu .fa{float:right;height:12px!important;line-height:12px!important;position:relative;right:-5px;width:14px!important}.fl-builder-has-submenu .fl-builder-has-submenu .fl-builder-submenu{display:none;left:100%;top:0}.fl-builder-has-submenu .fl-builder-submenu-right.fl-builder-has-submenu .fl-builder-submenu{left:auto;right:100%}.fl-builder-has-submenu .fl-builder-has-submenu:hover .fl-builder-submenu{display:block}.fl-builder-submenu-sep{padding:7px 0!important}.fl-builder-submenu-sep div{border-bottom:1px solid rgba(255,255,255,.4)}.fl-block-col-move,.fl-block-col-move-parent{cursor:move;position:relative}.fl-builder-submenu .fa-arrows{cursor:move;display:none!important}.fl-builder-submenu a:hover .fa-arrows{display:block!important}.fl-block-overlay-global ul.fl-builder-submenu{background:#ff9600!important}.fl-block-overlay-global ul.fl-builder-submenu li a:hover{background:#fa3}.fl-builder-actions-lightbox .fl-lightbox{display:block;width:300px;border-radius:4px}.fl-builder-actions-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-actions-lightbox .fl-builder-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:25px;text-align:center}.fl-builder-actions-title{display:block;margin-bottom:20px}.fl-builder-actions .fl-builder-button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;margin-bottom:7px;min-height:36px}.fl-builder-alert-lightbox{padding:20px;z-index:30000000;top:0;pointer-events:auto}.fl-builder-alert-lightbox .fl-lightbox{max-width:440px;width:auto}.fl-builder-alert-lightbox .fl-lightbox-content-wrap{display:block}.fl-builder-alert-lightbox .fl-lightbox-message{line-height:24px;padding:30px}@keyframes fl-builder-content-section-entry{from{transform:translateY(150px) translateX(100px) scale(.3);opacity:0}to{transform:translateY(0) translateX(0) scale(1);opacity:1}}.fl-template-category-select{width:180px!important}.fl-template-selector .fl-builder-settings-section{margin:0 0 10px}.fl-template-selector .fl-builder-settings-fields{height:470px}.fl-template-selector .fl-builder-settings-tab{width:560px}.fl-template-selector .fl-builder-settings-tab-description{font-size:15px!important;margin:0!important;padding:10px 0 25px;text-align:center}.fl-template-preview{float:left;margin:0 25px 30px 0;position:relative;text-align:center;width:170px}.fl-template-preview.fl-last{margin-right:0}.fl-template-image{border:1px solid #d9d9d9;cursor:pointer;margin-bottom:12px;height:164px;overflow:hidden}.fl-template-image:hover{border-color:red}.fl-template-image img{max-height:none;width:100%}.fl-template-preview span{display:block;text-align:center}.fl-user-template-category-name{background:#f2f2f2;border-bottom:3px solid #dfdfdf;border-top:2px solid #dfdfdf;font-weight:700;padding:8px 15px}.fl-user-templates{border-bottom:1px solid #dfdfdf;padding:10px 0 20px}.fl-builder--user-templates-section-content{border-bottom:2px solid #e6eaed;padding:10px}.fl-builder--user-templates-section-content:first-child{padding-top:0}.fl-builder--user-templates-section-content:last-child,.fl-user-templates:last-child{border-bottom:none}.fl-builder--user-templates-section-name{font-weight:700;font-size:16px;color:#333;z-index:9999;padding:15px 10px;margin:0 10px}@keyframes fl-list-item-entry{from{opacity:0;transform:scale(.5) translateY(100px)}to{opacity:1;transform:scale(1) translateY(0)}}.fl-builder--save-new-user-template,.fl-user-template{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:4px;font-size:16px;font-weight:200;line-height:1.1;padding:10px 20px;color:#6d6d6d}.fl-user-template:hover{cursor:pointer;background:#fff;box-shadow:0 6px 20px rgba(0,0,0,.08);text-decoration:none;color:#111;padding-right:68px}.fl-user-template-name{overflow:hidden;text-overflow:ellipsis;-ms-flex:1;flex:1}.fl-user-template-actions{display:none;bottom:0;position:absolute;right:0;top:0}.fl-user-template:hover .fl-user-template-actions{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}.fl-user-template-actions a{display:inline-block;padding:15px 0;width:30px}.fl-user-template:hover a:hover i{color:#444!important}.fl-user-templates-message{display:none}.fl-user-template-thumbnail{-ms-flex:0;flex:0;margin-right:20px}.fl-user-template-thumbnail .fl-builder--template-thumbnail{background-size:cover;background-position:center top;width:45px}.fl-user-template-thumbnail .fl-builder--template-thumbnail:hover{box-shadow:none;transform:scale(1);transition-property:none}.fl-builder--save-new-user-template .fl-user-template-thumbnail .fl-builder--template-thumbnail{border-style:dashed;border-width:2px;border-color:#ccd4da}.fl-builder--save-new-user-template .fl-save-control{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex:1;flex:1}.fl-builder--save-new-user-template .fl-save-control input{background:0 0;border:none!important;-ms-flex:1;flex:1;font-size:16px;margin-right:10px;margin-left:-12px;color:#000}.fl-builder--save-new-user-template .fl-save-control input::-webkit-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input::-moz-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-ms-input-placeholder{color:#777}.fl-builder--save-new-user-template .fl-save-control input:-moz-placeholder{color:#777}@keyframes fl-slide-in-right{from{transform:translateX(50px)}to{transform:translateX(0)}}.fl-builder--save-new-user-template .fl-save-control button{display:none;animation-name:fl-slide-in-right;animation-duration:.25s;background-color:#00a0d2;border:none;padding:0 15px}.fl-save-control-mask{display:none;background:0 0;position:absolute;top:-50px;left:0;bottom:0;right:0;z-index:-1;min-height:80vh}.fl-builder-templates-cta{margin-bottom:20px}.fl-builder-templates-cta p{display:inline-block!important;width:75%!important;font-size:14px!important;line-height:1.5!important;margin-bottom:0!important}.fl-builder-templates-cta .fl-builder-upgrade-button{font-size:13px!important;line-height:13px!important;position:relative;top:8px;left:15px;padding:1px 12px}.fl-builder-settings-message,.fl-builder-settings-message *{font-size:15px!important;line-height:23px!important}.single-fl-builder-template .fl-content{width:100%!important}form.fl-builder-settings{height:100%;margin:0;padding:0;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.fl-builder-settings-message{padding:20px 25px!important;background:#f2f2f2!important}.fl-builder-preview-loader{position:relative;top:-2px;margin-left:3px}.fl-lightbox-header .fl-builder-preview-loader{margin:0;position:absolute;right:40px;top:15px}@keyframes fl-grab-attention{0%,100%{transform:scale(1)}50%{transform:scale(1.05)}}.fl-lightbox-width-slim .fl-form-table{margin:20px 25px 10px 15px!important;width:calc(100% - 60px)}.fl-lightbox-width-slim .fl-form-table th{display:block;padding:10px 0 0 12px!important}.fl-lightbox-width-slim .fl-form-table td{display:block}.fl-lightbox-width-slim .fl-form-table td:first-child{padding-left:10px!important}.fl-lightbox-width-slim .fl-form-table .fl-field[data-type=editor] td:first-child{padding-left:0!important}.fl-field-label .fl-field-responsive-toggle,.fl-lightbox-width-slim .fl-field-control-wrapper .fl-field-responsive-toggle{display:none}.fl-lightbox-width-slim .fl-field-label .fl-field-responsive-toggle{display:inline-block;padding:0 5px!important}.fl-lightbox-width-slim .fl-builder-settings-fields select{width:100%}.fl-lightbox-width-slim .fl-color-picker{display:-ms-flexbox;display:flex;width:auto}.fl-lightbox-width-slim .fl-color-picker-clear{-ms-flex:0 0 50px;flex:0 0 50px}.fl-lightbox-width-slim .mce-menubtn.mce-fixed-width button{width:28px!important}.fl-lightbox-width-slim .mce-btn[aria-label=Blockquote],.fl-lightbox-width-slim .mce-btn[aria-label=Fullscreen]{display:none}.fl-lightbox-width-slim .fl-builder-field-multiple{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-control,.fl-lightbox-width-slim .fl-builder-field-multiple .fl-field-label{width:100%!important}.fl-lightbox-width-slim .fl-builder-field-multiple .fl-builder-field-actions{position:absolute!important;top:0;right:0;width:70px}.fl-lightbox-width-slim .fl-field[data-type=time] select{width:auto}.fl-builder-settings-tabs{margin:6px;border:2px solid #e6eaed;border-radius:4px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;overflow:hidden}.fl-builder-content-group-select{padding:0 10px 6px;display:none}.fl-builder-content-group-select select{display:block;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;padding:8px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;border:2px solid #e4e7ea;color:#161B20}select:focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;outline:0!important}.fl-legacy-settings-tab{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings-tab:first-child .fl-legacy-settings-tab{background:0 0;height:auto}body .fl-builder-settings-tabs>*{box-sizing:border-box;color:#676F7A!important;fill:#676F7A!important;background:0 0;border:2px solid transparent;border-radius:0;margin:0;outline:0;padding:6px 15px;text-decoration:none!important;font-size:14px;font-weight:400!important;-ms-flex:0 0 auto;flex:0 0 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;text-align:center}.fl-builder-settings-tabs-more g,.fl-builder-settings-tabs-more path,.fl-builder-settings-tabs-more svg,.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon path{fill:inherit}body .fl-builder-settings-tabs>:first-child{border-top-left-radius:3px;border-bottom-left-radius:3px}body .fl-builder-settings-tabs>:last-child{border-top-right-radius:3px;border-bottom-right-radius:3px}body .fl-lightbox-width-slim .fl-builder-settings-tabs>*{-ms-flex:1 1 auto;flex:1 1 auto;padding:6px 8px}body .fl-builder-settings-tabs>.fl-builder-settings-tabs-more{-ms-flex:0 0 60px;flex:0 0 60px;display:none;margin-left:auto;-ms-flex-pack:center;justify-content:center}.fl-builder-settings-tabs-more svg{width:16px;height:auto;margin:auto}body .fl-lightbox-has-tab-overflow .fl-builder-settings-tabs-more{display:-ms-flexbox;display:flex}.fl-builder-settings-tabs>:active,.fl-builder-settings-tabs>:hover{top:0;color:#333;background:0 0;border:2px solid transparent}.fl-builder-settings-tabs>:focus{top:0;outline:0;border:2px solid transparent;background:0 0;color:#0086b0;fill:#0086b0}.fl-builder-settings-tabs .fl-active,.fl-builder-settings-tabs-more.fl-contains-active,.fl-builder-settings-tabs-overflow-menu .fl-active{color:#0086b0!important;fill:#0086b0!important;position:relative;background:#e6eaed}.fl-builder-settings-tabs .fl-active.fl-overflowed,.fl-builder-settings-tabs .fl-overflowed{display:none!important}.fl-builder-settings-tabs .error{color:#d03436;padding-right:10px}.fl-builder-settings-tabs .error .fl-error-icon,.fl-builder-settings-tabs-overflow-menu .error .fl-error-icon{background:url(../img/sprite.png) -148px -5px no-repeat;display:inline-block;height:16px;margin-left:7px;position:relative;top:3px;width:16px}.fl-builder-settings-tabs-more.fl-contains-errors{fill:#d03436!important}.fl-builder-settings-tab{display:none;width:auto!important}.fl-builder-settings-tab.fl-active{display:block}.fl-builder-settings-tab-description{background:#e4e7ea;padding:10px 15px;border-radius:4px;margin:20px}.fl-builder-settings-tab-description a{text-decoration:underline!important}.fl-builder-settings-tab-description a:hover{color:#333}.fl-builder-settings-tabs-overflow-menu{display:none;position:absolute;left:0;right:0;border:2px solid #e6eaed;border-top:3px solid #00a0d2;border-radius:4px;background:#fff;z-index:9999;margin:0 6px;padding:10px;-ms-flex-direction:column;flex-direction:column;box-shadow:0 0 20px 2px rgba(0,0,0,.2)}.fl-builder-settings-tabs-overflow-menu:before{bottom:100%;right:20px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:10px;margin-left:-10px}.fl-builder-settings-tabs-overflow-menu>a{display:block;padding:10px 15px;font-size:14px;font-weight:600!important;border:2px solid transparent;border-radius:4px;outline:0}.fl-builder-settings-tabs-overflow-menu>a:hover{background:#e6eaed;text-decoration:none}.fl-builder-settings-tabs-overflow-click-mask{display:none;position:fixed;top:0;bottom:0;left:0;right:0;background:0 0;z-index:9}.fl-form-table{background:none;border:none;width:calc(100% - 35px)}.fl-form-table tbody{border:none}.fl-form-table tr,.fl-form-table tr:nth-child(even){background:0 0}.fl-form-table td,.fl-form-table th{background:0 0!important;border:none!important;font-weight:400!important;text-align:left!important}.fl-form-table th{padding:10px 10px 10px 30px!important;vertical-align:top!important;width:200px!important}.fl-form-table td:first-child{padding-left:30px!important}.fl-form-table th label{color:#333;width:auto;max-width:100%}.fl-photo-field .fl-photo-preview-img img,.fl-video-field .fl-video-preview-img img{max-width:60px}.fl-form-table td{padding:8px 10px}.fl-lightbox-width-slim .fl-form-table td{padding:4px 0 10px}.fl-builder-settings-fields{margin:0;overflow:hidden;position:relative;-ms-flex:1 100%;flex:1 100%;visibility:hidden}.fl-lightbox-header .fl-builder-settings-fields{height:auto;margin:0;position:absolute;right:10px;top:10px}.fl-builder-settings-fields .fl-nanoscroller-content{padding:0}.fl-builder-settings-fields .fl-field-control-wrapper{position:relative}.fl-field{animation-delay:.1s}.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select,.fl-builder-settings-fields textarea{background:#fff!important;border-color:transparent!important;border-style:solid;border-width:2px;border-radius:4px!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);color:#333!important;display:inline;font-size:13px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px 9px;width:auto;box-sizing:border-box}.fl-builder-settings-fields input[type=email],.fl-builder-settings-fields input[type=file],.fl-builder-settings-fields input[type=number],.fl-builder-settings-fields input[type=password],.fl-builder-settings-fields input[type=search],.fl-builder-settings-fields input[type=tel],.fl-builder-settings-fields input[type=text],.fl-builder-settings-fields input[type=url],.fl-builder-settings-fields select{height:36px!important}.fl-builder-settings-fields input[type=number]{width:70px}.fl-builder-lightbox .fl-builder-settings-fields input[type=email]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=file]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=number]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=password]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=search]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=text]:focus,.fl-builder-lightbox .fl-builder-settings-fields input[type=url]:focus,.fl-builder-lightbox .fl-builder-settings-fields select:focus,.fl-builder-lightbox .fl-builder-settings-fields textarea:focus{border-width:2px!important;border-style:solid!important;border-color:#00a0d2!important;box-shadow:0 2px 4px 0 rgba(0,0,0,.12)!important}.fl-builder-settings-fields ::-webkit-input-placeholder{color:#999!important;font-size:12px}.fl-builder-settings-fields input:-moz-placeholder{color:#999;font-size:12px}.fl-builder-settings-fields ::-moz-placeholder{color:#999!important;font-size:12px}.fl-builder-settings-fields input:-ms-input-placeholder{color:#999;font-size:12px}.fl-builder-settings-fields label{display:inline-block;font-weight:400;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-bottom:3px}.fl-builder-settings-fields select{-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;color:#000;margin:0 0 2px;padding:2px 10px;padding-right:30px!important;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important}.fl-builder-settings-fields select[multiple]{height:60px;background-image:none!important}.fl-builder-custom-field select,.fl-photo-field select{-webkit-box-shadow:none;border-color:#e6eaed!important}.fl-font-field .fl-font-field-font{margin-bottom:4px;width:calc(70% - 5px)!important}.fl-font-field .fl-font-field-weight{width:30%!important}.fl-lightbox-width-slim input.text-full+.fl-field-description,.fl-lightbox-width-slim select+.fl-field-description{display:block;padding:8px 10px;margin:0}.fl-field[data-type=dimension] .fl-field-control-wrapper{display:-ms-flexbox;display:flex}.fl-field[data-type=dimension] .fl-field-description{padding-top:9px}.fl-field[data-type=dimension] .fl-field-responsive-toggle{padding:9px 9px 0 0}.fl-dimension-field-units{display:-ms-flexbox;display:flex}.fl-dimension-field-unit{padding-right:5px}.fl-dimension-field-unit input{max-width:60px;width:auto!important}.fl-dimension-field-unit label{padding:5px 0 0;font-size:12px;color:inherit!important;display:block;text-align:center}.fl-link-field-search input{box-shadow:none!important;width:100%!important;padding:3px 9px!important}.fl-link-field-search #as-original-link-search{width:100%}.fl-builder-settings-section{border-top:2px solid #E6EAED}.fl-builder-settings-section:first-child{border-top:none!important}.fl-custom-query .fl-builder-settings-section{border-top:2px solid #E6EAED!important}.fl-builder-settings-description{padding:0 10px 10px;margin:0;font-style:italic;opacity:.75}.fl-builder-settings-fields table{margin:20px 0}.fl-builder-settings-fields h3.fl-builder-settings-title{display:inline-block;background:#E6EAED;padding:4px 10px 4px 15px;margin:0;text-transform:uppercase!important;border-bottom-right-radius:4px;font-size:12px!important;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.wp-core-ui h1,.wp-core-ui h2,.wp-core-ui h3,.wp-core-ui h4,.wp-core-ui h5,.wp-core-ui h6{color:#333}.wp-core-ui .submitbox .submitdelete{color:#a00}.wp-core-ui button{font-weight:400}.wp-core-ui input[type=email],.wp-core-ui input[type=file],.wp-core-ui input[type=number],.wp-core-ui input[type=password],.wp-core-ui input[type=search],.wp-core-ui input[type=tel],.wp-core-ui input[type=text],.wp-core-ui input[type=url],.wp-core-ui select,.wp-core-ui textarea{background-color:#fff;border-color:#dfdfdf;border-style:solid;border-width:1px;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-shadow:none;-moz-box-shadow:none;-webkit-box-shadow:none;color:#333;font-weight:400}.wp-core-ui input[type=email]:focus,.wp-core-ui input[type=file]:focus,.wp-core-ui input[type=number]:focus,.wp-core-ui input[type=password]:focus,.wp-core-ui input[type=search]:focus,.wp-core-ui input[type=tel]:focus,.wp-core-ui input[type=text]:focus,.wp-core-ui input[type=url]:focus,.wp-core-ui select:focus,.wp-core-ui textarea:focus{background:0 0;border-color:#aaa}.wp-core-ui input[type=search]{background-image:none;padding:6px}.fl-field-responsive-setting{display:inline-block}.fl-field-responsive-setting-medium,.fl-field-responsive-setting-responsive{display:none}i.fl-field-responsive-toggle{color:grey;cursor:pointer;display:inline-block;font-size:15px!important;height:auto;line-height:18px!important;text-align:left;vertical-align:middle;width:20px}i.fl-field-responsive-toggle:hover{color:#000}.fl-builder-settings-fields input.text-full,.fl-builder-settings-fields textarea{width:100%}.fl-color-picker{cursor:pointer}.fl-color-picker .fl-color-picker-clear{box-sizing:border-box}.fl-color-picker .fl-color-picker-clear:hover{background-color:#ededed}.colorpicker input{padding:0!important;font-size:11px!important;color:#fff!important;width:29px!important;height:auto!important;background:0 0!important;border:none!important}.colorpicker .colorpicker_hex input{width:45px!important}.fl-builder-custom-field{background:#fff;border:2px solid transparent;border-radius:4px;padding:7px 10px;box-shadow:0 2px 4px 0 rgba(0,0,0,.12);min-height:36px;box-sizing:border-box}.fl-builder-field-multiple .fl-builder-custom-field{cursor:move}.fl-builder-custom-field a{color:#21759b!important;text-decoration:underline!important}.fl-builder-custom-field a:hover{color:#d54e21!important}.fl-builder-custom-field label.error{margin-top:5px}.fl-photo-field .fl-photo-preview{display:-ms-flexbox;display:flex}.fl-photo-field .fl-photo-select,.fl-photo-field.fl-photo-empty .fl-photo-preview{display:none}.fl-photo-field.fl-photo-empty .fl-photo-select{display:block}.fl-photo-field .fl-photo-preview-img{line-height:0;margin:5px 0}.fl-photo-field .fl-photo-preview select{margin:8px 0 8px 10px;width:200px}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview select{display:none}.fl-photo-field .fl-photo-preview-filename{display:none;font-size:14px;font-weight:700;margin:7px 0 5px 11px}.fl-photo-field.fl-photo-no-attachment .fl-photo-preview-filename{display:inline-block;word-break:break-all}.fl-multiple-photos-field .fl-multiple-photos-select,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-add,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-count,.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-edit,.fl-multiple-photos-lightbox .gallery-settings,.fl-photo-field.fl-photo-no-attachment .fl-photo-edit{display:none}.fl-photo-field .fl-photo-edit{margin:0 0 0 11px}.fl-multiple-photos-field .fl-multiple-photos-add,.fl-photo-field .fl-photo-remove,.fl-photo-field .fl-photo-replace{margin:0 0 0 8px}.fl-builder-edit .media-modal{z-index:9999991}.fl-builder-edit .media-modal-backdrop{z-index:999999}.fl-builder-edit .media-modal-content h1{font-family:inherit}.fl-builder-edit .media-modal-content .thumbnail{padding:0;border:none;border-radius:0}.fl-builder-edit button.button-link.media-modal-close{position:absolute;box-shadow:none;-webkit-box-shadow:none}.fl-builder-edit .media-frame.hide-menu{visibility:visible}span.select2-container.select2-container--open{z-index:9999999}.fl-multiple-photos-field.fl-multiple-photos-empty .fl-multiple-photos-select{display:inline}.fl-multiple-photos-count{font-weight:700;margin-bottom:3px}.fl-video-field .fl-video-select,.fl-video-field.fl-video-empty .fl-video-preview{display:none}.fl-video-field.fl-video-empty .fl-video-select{display:block}.fl-video-field .fl-video-preview-img{float:left;line-height:0;margin:5px 0}.fl-video-field .fl-video-preview-img .dashicons.dashicons-media-video{display:block;font-size:60px;height:60px;line-height:60px;width:60px}.fl-video-field .fl-video-preview-filename{display:inline-block;font-size:14px;font-weight:700;margin:7px 0 5px 11px}.fl-video-field .fl-video-replace{margin:0 0 0 11px}.fl-multiple-audios-field .fl-multiple-audios-select,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-add,.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-edit{display:none}.fl-multiple-audios-field.fl-multiple-audios-empty .fl-multiple-audios-select{display:block}.fl-multiple-audios-field .fl-multiple-audios-add{margin:0 0 0 8px}.fl-icon-field .fl-icon-select,.fl-icon-field.fl-icon-empty .fl-icon-preview{display:none}.fl-icon-field.fl-icon-empty .fl-icon-select{display:block}.fl-icon-field .fl-icon-preview i{display:inline-block;font-size:28px;margin:10px 10px 9px;vertical-align:middle}.fl-icon-field .fl-icon-remove{margin:0 0 0 8px}.fl-builder-hidden-editor{display:none}.fl-builder-settings .wp-switch-editor{background:#ebebeb;border:1px solid #e5e5e5;border-radius:0;color:#333}.fl-builder-settings .wp-editor-container{border:1px solid #e5e5e5}.fl-builder-settings .mce-toolbar .mce-btn-group .mce-btn{margin:2px 0}.fl-builder-settings .mce-menubtn.mce-fixed-width button{width:100px}.fl-builder-settings .mce-menubtn.mce-fixed-width span{width:100%}.mce-close:active,.mce-close:hover,.mce-toolbar .mce-btn button:active,.mce-toolbar .mce-btn button:hover,.mce-window .mce-btn button:active,.mce-window .mce-btn button:hover{background:0 0;border:none}.mce-ico{font-family:tinymce,Arial!important}.mce-toolbar i.mce-ico{font:400 20px/1 dashicons!important}.fl-builder-edit form#wp-link,.popover[class*=tour-],ul.as-list{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif}.wp-core-ui .quicktags-toolbar input.button.button-small{margin:1px!important}.wp-editor-container textarea.wp-editor-area{background:0 0;border:none;padding:10px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box}.fl-builder-edit form#wp-link{color:#000;font-size:13px}.fl-builder-edit form#wp-link #link-options label{display:block;margin-bottom:2px}.fl-builder-edit form#wp-link #link-options label span{padding-right:10px;vertical-align:middle}.fl-builder-edit form#wp-link #link-options input[type=text]{display:inline-block;height:auto;margin:5px 0 0;padding:3px 5px;width:80%}.fl-builder-edit form#wp-link .query-results{top:225px}.fl-code-field{border:1px solid #E6E6E6;border-left:none}.ace_editor,.ace_editor *{font-family:Monaco,Menlo,"Ubuntu Mono","Droid Sans Mono",Consolas,monospace!important;font-size:12px!important;font-weight:400!important;letter-spacing:0!important}.fl-layout-field-option{border:2px solid #d9d9d9;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;box-sizing:border-box!important;-moz-box-sizing:border-box!important;-webkit-box-sizing:border-box!important;cursor:pointer;float:left;line-height:0;max-width:23%;margin:0 1% 2%;padding:5px}.fl-layout-field-option-selected,.fl-layout-field-option:hover{border-color:red}.fl-layout-field-option img{max-width:100%}.fl-link-field .fl-link-field-input-wrap{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-link-field-input{width:auto!important;-ms-flex:1 1 100%;flex:1 1 100%}.fl-link-field .fl-link-field-input-wrap button{-ms-flex:0 0 0%;flex:0 0 0%;margin-left:5px}.fl-link-field-search{display:none;border:2px solid #e6eaed;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;margin:4px 0 0;padding:10px}.fl-link-field-search-title{display:block;margin:0 0 3px 2px}.fl-link-field-search-cancel{margin-top:6px}.fl-help-tooltip{display:inline-block;position:relative}.fl-help-tooltip-icon{color:#999!important;cursor:pointer;font-family:FontAwesome;font-size:15px!important;padding:5px;vertical-align:middle}.fl-help-tooltip-text{background:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ccc;-moz-box-shadow:0 0 5px #ccc;-webkit-box-shadow:0 0 5px #ccc;display:none;font-weight:400;left:23px;padding:10px 13px;position:absolute;top:-6px;width:250px;z-index:1000;border-radius:4px}.fl-lightbox-width-slim .fl-help-tooltip-text{top:26px;left:-30px}.fl-field-control .fl-form-field{margin-bottom:0}.fl-form-field-preview-text i{display:inline-block;font-size:18px;line-height:22px;margin-bottom:5px}.fl-builder-field-actions{padding-left:0!important;padding-right:0!important;text-align:center;width:85px}.fl-builder-field-actions i{color:#999!important;cursor:pointer;font-size:13px!important;line-height:29px!important;width:16px}.fl-builder-field-actions i:hover{color:#000!important}.fl-builder-field-actions i.fl-builder-field-copy,.fl-builder-field-actions i.fl-builder-field-delete{margin-left:5px}.fl-builder-field-actions i.fl-builder-field-move{cursor:move}.fl-builder-field-dd-helper{background:#ccc;height:30px!important;float:left;width:130px!important}.fl-builder-field-dd-zone{border:1px dashed #ccc;height:30px}.fl-builder-field-actions-single .fl-builder-field-delete,.fl-builder-field-actions-single .fl-builder-field-move{display:none!important}.fl-lightbox-width-slim .fl-builder-field-actions-single .fl-builder-field-copy{float:right!important}.fl-builder-field-multiple .fl-builder-field-actions,.fl-builder-field-multiple .fl-field-control,.fl-builder-field-multiple .fl-field-label{padding-top:2px!important;padding-bottom:2px!important}.fl-builder-field-multiple .fl-builder-field-actions{min-width:70px!important}.fl-builder-field-multiple[data-field=icons] .fl-builder-field-actions{width:70px!important}.fl-builder-field-multiple.ui-sortable-helper .fl-field-control{width:60%}.fl-builder-field-multiple.ui-sortable-helper .fl-builder-field-actions{display:none}.fl-builder-widget-settings input{display:inline-block!important;margin:5px 10px 8px!important}.fl-builder-lightbox-loading{background:url(../img/ajax-loader.svg) center center no-repeat;height:100px}.fl-builder-settings .error,.fl-builder-settings input.error{color:#d03436!important}.fl-builder-settings label.error,.fl-builder-settings p.error{color:#d03436;display:block;margin-top:5px}.fl-builder-settings .fl-form-table .fl-field-description{color:#464646;font-style:normal;margin-left:2px}.fl-lightbox .fl-field-connection{right:-1px}.fl-lightbox .fl-field-connection-content{border:2px solid transparent!important;background:#e4e7ea!important}.fl-field-connection-content .fl-field-connection-label{color:#676f7a!important}ul.as-selections{background-color:#fff;border:none;border-radius:4px;box-shadow:none;color:#333;font-size:12px;height:auto;line-height:15px;margin:1px;outline:0;padding:3px;width:auto}ul.as-selections.loading{background:url(../img/ajax-loader-small.svg) 98% center no-repeat}ul.as-selections li.as-selection-item{background:#d4eaf6;border:none;font-size:11px;line-height:14px;padding:8px 15px;border-radius:4px;margin:2px}ul.as-selections li.as-selection-item.blur{background:#f4f4f4}ul.as-selections li.as-selection-item a.as-close{line-height:12px}ul.as-selections li.as-original{margin:0}ul.as-selections li.as-original input{height:auto;font-size:12px;margin:0;padding:0;box-shadow:none}ul.as-list{margin:0;font-size:13px;color:#000;background-color:#fff;background-color:rgba(255,255,255,.95);z-index:2;box-shadow:0 0 10px rgba(0,0,0,.1);border:none;border:1px solid #dfdfdf;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px}li.as-message,li.as-result-item{border:none}li.as-result-item.active{background:#e5e5e5;border-radius:0;color:#333;text-shadow:none}li.as-result-item em{background:0 0!important;color:#333!important;font-size:12px;padding:0!important;font-weight:700}.fl-custom-query-filter{display:none}.fl-custom-query .fl-field[data-type=suggest] select{margin-bottom:5px;width:100%}.fl-builder-service-settings{position:relative}.fl-builder-service-error{color:red!important;padding:15px 0 0}.fl-builder-service-account-delete{color:red!important;margin-left:10px;position:relative;top:2px}#fl-field-visibility_user_capability .fl-field-description,.fl-builder-service-connect-row .fl-field-description{background:#f0f0f0;color:#333!important;display:block;float:none;margin:10px 0 0;padding:10px}#fl-field-visibility_user_capability .fl-field-description a,.fl-builder-service-connect-row .fl-field-description a{color:#21759b!important;text-decoration:underline!important}.fl-ordering-field-option{background:#fff;border:1px solid #dfdfdf;border-radius:3px;cursor:move;margin-bottom:5px;padding:5px 10px}.fl-ordering-field-option .fa{color:#ccc;float:right;line-height:16px}#tiptip_holder{z-index:1000000}#tiptip_holder.tip_top #tiptip_arrow_inner{border-top-color:#333}#tiptip_holder.tip_bottom #tiptip_arrow_inner{border-bottom-color:#333}#tiptip_holder.tip_right #tiptip_arrow_inner{border-right-color:#333}#tiptip_holder.tip_left #tiptip_arrow_inner{border-left-color:#333}#tiptip_content{background:#333;box-shadow:none}.fl-builder-getting-started-video{line-height:0!important;padding:10px}.fl-builder-getting-started-video iframe{border:none;height:326px;width:100%}.fl-builder-tour-actions .fl-builder-actions-title{font-size:14px!important;line-height:19px}.fl-builder-tour-mask{bottom:0;left:0;position:fixed;right:0;top:0;z-index:100000000}.fl-builder-tour-dimmed{background:rgba(0,0,0,.7);bottom:0;left:0;position:absolute;right:0;top:0}body>.fl-builder-tour-dimmed{position:fixed}.tour-backdrop{z-index:110000}.popover[class*=tour-]{border:1px solid #ccc;border-radius:0;box-shadow:0 0 40px rgba(0,0,0,.3);color:#666;font-size:13px;font-weight:400;line-height:18px;max-width:none;padding:0;width:300px;z-index:100000001}.popover[class*=tour-].bottom>.arrow{border-bottom-color:#ccc}.popover[class*=tour-].bottom>.arrow:after{border-bottom-color:#f7f7f7}.popover[class*=tour-] .popover-title{border-radius:0;color:#333;letter-spacing:normal;text-transform:none}.popover[class*=tour-] .fa-times{color:#b3b3b3;cursor:pointer;font-size:16px;padding:5px;position:absolute;right:3px;top:2px}.popover[class*=tour-] .fa-times:hover{color:#666}.popover[class*=tour-] .popover-content{border-bottom:1px solid #d9d9d9;padding:13px 15px}.popover[class*=tour-] .fl-builder-tour-next{display:block;float:none;width:100%}.popover-navigation button{min-height:36px}.fl-builder-shortcode-mask-wrap{position:relative}.fl-builder-shortcode-mask{bottom:-1px;left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fl-builder--search{border:2px solid transparent;position:relative;padding:0;width:54px;transition-property:width;transition-delay:.1s;transition-duration:.15s}.fl-builder--search.is-expanded{border:2px solid #00A0D0}.fl-builder--search input[type=text],.fl-builder--search input[type=text]:focus{background-color:transparent;border:none!important;box-sizing:border-box;width:100%;font-size:16px;text-align:center}.fl-builder--search:before{display:-ms-flexbox;display:flex;top:0;left:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;content:"\f002";font:normal normal normal 14px/1 FontAwesome;text-align:center;width:100%;height:100%;position:absolute;pointer-events:none;color:rgba(128,128,128,.6);font-size:17px;opacity:1;transition-property:opacity;transition-duration:.15s}.fl-builder--main-menu-panel,.fl-builder-ui-keyboard-shortcuts{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important}.fl-builder--search.has-text:before,.fl-builder--search.is-expanded:before{opacity:0}.fl-builder--search input::-webkit-input-placeholder{color:rgba(128,128,128,0)!important;transition:color .25s}.fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(128,128,128,.4)!important}.fl-builder--search .search-label{cursor:text}.fl-builder--search .search-clear{display:none;padding:10px 10px 10px 30px;color:#a7a7a7;font-size:12px;position:absolute;right:0;top:0;background-color:#eff1f2;background:linear-gradient(to left,#e4e7ea,#e4e7ea 75%,rgba(228,231,234,0))}.fl-builder--search.has-text .search-clear,.fl-builder--search.is-expanded input{display:inline-block}.fl-builder--search:hover .search-clear{color:#888;background-color:#eff1f2;background:linear-gradient(to left,#dadfe5,#dadfe5 75%,rgba(218,223,229,0))}.fl-builder--search.is-expanded{width:246px}@keyframes fl-builder-show-menu-item{from{transform:translateY(10px) scale(.8);opacity:0}to{transform:translateX(0) translateY(0) scale(1);opacity:1}}.fl-builder--main-menu-panel{display:none;box-sizing:border-box;position:fixed;top:calc(48px + 10px);left:10px;width:360px;color:#222;max-height:calc(100% - 66px);border-radius:4px;background:#fff;border:2px solid #D5DADD;border-top:3px solid #00a0d2;box-shadow:0 15px 45px 8px rgba(0,0,0,.04);font-size:14px!important;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:10000009;pointer-events:auto}.fl-builder--main-menu-panel.is-showing{display:-ms-flexbox;display:flex}.fl-builder--main-menu-panel:before,.fl-theme-builder-preview-select-open .fl-theme-builder-preview-select-items:before{bottom:100%;right:6px;content:" ";height:0;width:0;position:absolute;pointer-events:none;border:solid;border-color:rgba(255,255,255,0);border-bottom-color:#00a0d2;border-width:13px;margin-left:-13px}.fl-builder--main-menu-panel-views{-ms-flex:1 1 100%;flex:1 1 100%;overflow:auto}.fl-builder--main-menu-panel-mask{display:none;position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000119}.fl-builder--main-menu-panel .fl-builder--tabs{padding-left:20px;padding-top:15px}.fl-builder--main-menu-panel-view{display:none}.fl-builder--main-menu-panel-view.is-showing{display:block}.fl-builder--main-menu-panel-view-title{font-size:24px;font-weight:600;padding:25px 22px 0;line-height:1;white-space:nowrap}.fl-builder--main-menu-panel-view-title .title-accessory{float:right;color:#b1b1b1}.fl-builder--main-menu-panel-view-title .title-accessory>i{font-size:20px!important;width:25px!important}.fl-builder--main-menu-panel-view-title .title-accessory>i:hover{color:#222}.fl-builder--main-menu-panel-view-title .pop-view{padding:10px;margin-left:-10px;opacity:.5;font-size:25px;font-weight:400;cursor:pointer;background:0 0;outline:0;border:none;color:inherit}.fl-builder--main-menu-panel-view-title .pop-view:focus{outline:0;top:0;background:#E5EAED!important}.fl-builder--menu-item:before{display:block;content:"";float:none;clear:both}.fl-builder--menu-item{color:inherit;text-align:left;box-sizing:border-box;display:block;padding:10px 15px;margin:0 10px;width:calc(100% - 20px);background:0 0;border:none;border-radius:4px;font-size:14px;line-height:1.1;cursor:pointer;opacity:1}.fl-builder--menu-item:hover{background:#eaf1f8;border:none;text-decoration:none;color:#000}.fl-builder--selector-menu .fl-builder--menu-item:hover{background:#fff}.fl-builder--menu-item-accessory{float:right;text-align:center;display:inline-block;min-width:40px;font-size:14px}.fl-builder--menu-item-accessory.view-arrow{font-size:18px}.fl-builder--menu{padding:0;margin:20px 0}.fl-builder--menu hr{margin:8px 0;background-color:#e6eaed!important;height:2px;border:none}.fl-builder--menu .fl-builder-video-wrap{padding:0 10px 10px}.fl-revision-list-item{display:-ms-flexbox;display:flex}.fl-revision-list-item-text{padding-left:15px}.fl-revision-list-item-date{padding-bottom:5px}.fl-builder--revision-actions{display:none;position:fixed;top:4px;left:4px;z-index:100008;padding:4px 4px 6px;-ms-flex-pack:center;justify-content:center;background:#fff;border-radius:4px}.fl-builder--revision-actions *{margin-right:5px}.fl-builder--revision-actions :last-child{margin:0}.fl-builder--menu-item[data-event=noRevisionsMessage]:hover{background:0 0;box-shadow:none;cursor:default}.fl-no-revisions-message-title{font-weight:700;margin-bottom:10px}.fl-no-revisions-message-text{line-height:22px}.fl-builder-module-placeholder-message{border:1px dashed #ccc;overflow:hidden;padding:20px;text-align:center;text-overflow:ellipsis;white-space:nowrap}.fl-field-connections-menu{z-index:999999}.fl-field-connections-toggle{right:-30px!important}.fl-builder-add-ultimate-presets-button,.fl-builder-add-ultimate-rows-button,.fl-builder-pp-add-template-button,.pp-preview-button,.uabb-live-preview-button{display:none!important}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;display:block;-ms-touch-action:none;touch-action:none;background:0 0;transition-property:background;transition-duration:.15s}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-ne,.ui-resizable-nw,.ui-resizable-se,.ui-resizable-sw{width:12px;height:12px}.ui-resizable-se{cursor:se-resize;right:-4px;bottom:-4px}.ui-resizable-sw{cursor:sw-resize;left:-4px;bottom:-4px}.ui-resizable-nw{cursor:nw-resize;left:-4px;top:-4px}.ui-resizable-ne{cursor:ne-resize;right:-4px;top:-4px}.fl-builder-resizable-iframe-fix{position:absolute;top:0;right:0;bottom:0;left:0;z-index:100000000}.fl-builder-panel .ui-resizable-handle:active,.fl-builder-panel .ui-resizable-handle:hover,.fl-lightbox .ui-resizable-handle:active,.fl-lightbox .ui-resizable-handle:hover{background:#00a0d2}.fl-builder-panel .ui-resizable-n,.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-n,.fl-lightbox .ui-resizable-s{height:6px}.fl-builder-panel .ui-resizable-n,.fl-lightbox .ui-resizable-n{top:-3px}.fl-builder-panel .ui-resizable-s,.fl-lightbox .ui-resizable-s{bottom:-3px}.fl-builder-panel .ui-resizable-e,.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-e,.fl-lightbox .ui-resizable-w{width:6px}.fl-builder-panel .ui-resizable-e,.fl-lightbox .ui-resizable-e{right:-3px}.fl-builder-panel .ui-resizable-w,.fl-lightbox .ui-resizable-w{left:-3px}.fl-lightbox .ui-resizable-ne,.fl-lightbox .ui-resizable-nw,.fl-lightbox .ui-resizable-se,.fl-lightbox .ui-resizable-sw{background:0 0;border:6px solid transparent}.fl-lightbox .ui-resizable-ne:active,.fl-lightbox .ui-resizable-ne:hover,.fl-lightbox .ui-resizable-nw:active,.fl-lightbox .ui-resizable-nw:hover,.fl-lightbox .ui-resizable-se:active,.fl-lightbox .ui-resizable-se:hover,.fl-lightbox .ui-resizable-sw:active,.fl-lightbox .ui-resizable-sw:hover{background:0 0;border-color:#00a0d2}.fl-lightbox .ui-resizable-ne{border-bottom:none;border-left:none;border-top-right-radius:4px}.fl-lightbox .ui-resizable-nw{border-bottom:none;border-right:none;border-top-left-radius:4px}.fl-lightbox .ui-resizable-se{border-top:none;border-left:none;border-bottom-right-radius:4px}.fl-lightbox .ui-resizable-sw{border-top:none;border-right:none;border-bottom-left-radius:4px}.fl-builder-ui-keyboard-shortcuts{display:none;position:fixed;top:0;left:0;bottom:0;right:0;z-index:999999;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background:rgba(50,50,50,.88);font-size:15px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.fl-builder-ui-keyboard-shortcuts.is-showing{display:-ms-flexbox;display:flex}.fl-builder-ui-keyboard-shortcuts-content{box-sizing:border-box;width:500px;background:#f5f7f9;border-radius:4px;padding:30px 0 0;box-shadow:0 10px 30px rgba(0,0,0,.15)}.fl-builder-ui-keyboard-shortcut-item{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:12px 40px}.fl-builder-ui-keyboard-shortcut-item:nth-child(even){background:#eef2f5}.fl-builder-ui-shortcut-keycode{margin-left:auto;text-transform:uppercase;letter-spacing:2px}.fl-builder-ui-keyboard-shortcust-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;padding:10px}.dismiss-shortcut-ui{padding:10px;border-radius:4px;background:#fff;color:#000;font-size:14px;border:2px solid #fff}.dismiss-shortcut-ui:focus,.dismiss-shortcut-ui:hover{top:0;color:#000;background:#eef2f5;border:2px solid #eef2f5}.fl-color-picker-ui{width:300px}.fl-color-picker-ui.fl-color-alpha-enabled{width:238px}.fl-color-picker-ui .iris-picker{float:left;width:100%;height:224px;display:block;position:relative;border-top:1px solid rgba(0,0,0,.1)}.fl-color-picker-ui .iris-picker .iris-square-inner,.fl-color-picker-ui .iris-picker-inner{position:absolute;left:0;top:0;bottom:0;right:0}.fl-color-picker-ui .iris-picker,.iris-picker *{box-sizing:content-box}.fl-color-picker-ui .iris-error{background-color:#ffafaf}.fl-color-picker-ui .iris-picker .iris-square{width:300px;height:200px}.fl-color-picker-ui .iris-picker .iris-palette,.fl-color-picker-ui .iris-picker .iris-slider,.fl-color-picker-ui .iris-picker .iris-square-inner{height:100%;width:12.5%}.fl-color-picker-ui .iris-picker .iris-placeholder,.fl-color-picker-ui .iris-picker .iris-square{position:relative}.fl-color-picker-ui .iris-picker .iris-square-inner{width:auto;margin:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square,.fl-color-picker-ui .iris-ie-9 .iris-square-inner{box-shadow:none;border-radius:0}.fl-color-picker-ui .iris-ie-9 .iris-palette,.fl-color-picker-ui .iris-ie-9 .iris-slider,.fl-color-picker-ui .iris-ie-9 .iris-square{outline:rgba(0,0,0,.1) solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-palette,.fl-color-picker-ui .iris-ie-lt9 .iris-slider,.fl-color-picker-ui .iris-ie-lt9 .iris-square,.fl-color-picker-ui .iris-ie-lt9 .iris-square-inner{outline:#999 solid 1px}.fl-color-picker-ui .iris-ie-lt9 .iris-square .ui-slider-handle{outline:#999 solid 1px;background-color:#fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)"}.fl-color-picker-ui .iris-ie-lt9 .iris-square .iris-square-handle{background:0 0;border:3px solid #fff;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.fl-color-picker-ui .iris-picker .iris-strip{box-sizing:border-box;width:calc(300px - 12px);margin:5px 6px 6px;border-radius:4px;position:relative;height:22px;transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle{width:6px;position:absolute;right:0;top:-2px;bottom:-2px;margin:0;border-radius:3px;background:#fff;box-shadow:0 0 2px rgba(0,0,0,.5);z-index:5;cursor:ew-resize}.fl-color-picker-ui .iris-picker .iris-strip .ui-slider-handle:focus{outline:#00a0d2 solid 2px}.fl-color-picker-ui .iris-picker .iris-slider-offset{position:absolute;top:0;left:6px;right:0;bottom:0;width:auto;height:auto;background:0 0;border:none;border-radius:0;transform:rotate(180deg)}.fl-color-picker-ui .iris-picker .iris-square-handle{background:0 0;border:5px solid #999;border-radius:50%;border-color:rgba(128,128,128,.5);box-shadow:none;width:12px;height:12px;position:absolute;left:-10px;top:-10px;cursor:move;opacity:1;z-index:10}.fl-color-picker-ui .iris-picker .ui-state-focus .iris-square-handle{opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover{border-color:#999}.fl-color-picker-ui .iris-picker .iris-square-value:focus .iris-square-handle{box-shadow:0 0 2px rgba(0,0,0,.75);opacity:.8}.fl-color-picker-ui .iris-picker .iris-square-handle:hover::after{border-color:#fff}.fl-color-picker-ui .iris-picker .iris-square-handle::after{position:absolute;bottom:-4px;right:-4px;left:-4px;top:-4px;border:3px solid #f9f9f9;border-color:rgba(255,255,255,.8);border-radius:50%;content:" "}.fl-color-picker-ui .iris-picker .iris-square-value{width:8px;height:8px;position:absolute}.iris-ie-lt9 .iris-square-value,.iris-mozilla .iris-square-value{width:1px;height:1px}.fl-color-picker-wrapper{position:relative;width:48px;height:32px}.fl-color-picker{box-shadow:0 2px 4px 0 rgba(0,0,0,.12);background:#fff;border-radius:4px;width:120px;height:36px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-color-picker-color{-ms-flex:1 1 100%;flex:1 1 100%;box-sizing:border-box!important;position:relative;border-radius:4px;background-color:transparent;cursor:pointer;border:2px solid transparent;border-right:2px solid rgba(0,0,0,.1);padding:0;-ms-flex-pack:center;justify-content:center;display:-ms-flexbox;display:flex}.fl-color-picker-clear:hover,.fl-color-picker-color:hover{background:0 0;border:2px solid transparent}.fl-color-picker-clear:focus,.fl-color-picker-color.fl-color-picker-empty:focus,.fl-color-picker-color:focus{outline:0;top:0;border:2px solid #00a0d2;background:0 0}.fl-color-picker.fl-color-picker-has-reset .fl-color-picker-color:not(.fl-color-picker-empty){border-top-right-radius:0;border-bottom-right-radius:0}.fl-color-picker-icon{display:none;margin:auto}.fl-color-picker-color.fl-color-picker-empty{border-color:transparent}.fl-color-picker-color.fl-color-picker-empty svg.fl-color-picker-icon{display:block}.fl-color-picker-clear{box-sizing:border-box;position:relative;display:-ms-flexbox;display:flex;-ms-flex:0 0 36px;flex:0 0 36px;-ms-flex-pack:center;justify-content:center;padding:0;border:2px solid transparent;border-top-right-radius:4px;border-bottom-right-radius:4px;background-color:#fff;cursor:pointer}.fl-color-picker-color.fl-color-picker-empty+.fl-color-picker-clear{display:none}.fl-color-picker-ui{display:inline-block;font-family:Helvetica,Verdana,sans-serif;z-index:999999;position:fixed;overflow:hidden;padding-bottom:45px;border:1px solid rgba(0,0,0,.1);color:#999;background-color:#FAFAFA;border-radius:3px;box-shadow:0 9px 20px rgba(0,0,0,.17);transition:opacity .2s,visibility .2s;visibility:hidden;opacity:0;-webkit-transform:translate3d(0,0,0)}.fl-color-picker-ui.fl-color-picker-active{visibility:visible;opacity:1}.fl-color-picker-ui .fl-color-picker-input,.fl-color-picker-ui .fl-color-picker-input:focus{width:100%;height:30px;border:none!important;font-size:14px!important;padding:0 8px;vertical-align:middle;color:#656c6e;background-color:#fff;border-radius:0;box-shadow:none}.fl-color-picker-ui .iris-square-value{transition:none}.fl-color-picker-preset-add{position:absolute;top:8px;right:8px;width:14px;height:14px;background-color:#656c6e;border-radius:50%;cursor:pointer;transition:all .2s}.fl-color-picker-preset-add:hover{background-color:#333}.fl-color-picker-preset-add:after,.fl-color-picker-preset-add:before{content:'';display:block;position:relative;background-color:#fff}.fl-color-picker-preset-add:before{top:6px;left:3px;width:8px;height:2px}.fl-color-picker-preset-add:after{left:6px;top:1px;width:2px;height:8px}.fl-color-picker-presets{position:absolute;left:0;bottom:0;width:100%;z-index:15;overflow:auto;border-top:1px solid rgba(0,0,0,.1);background-color:#FAFAFA}.fl-color-picker-presets-list .fl-color-picker-preset:hover,.fl-color-picker-presets-toggle:hover{background-color:#EDEDED}.fl-color-picker-presets-toggle{position:relative;overflow:hidden;width:100%;height:35px;text-align:center;line-height:35px;font-size:12px;font-weight:700;cursor:pointer;transition:all .1s}.fl-color-picker-presets-close-label,.fl-color-picker-presets-open-label{position:absolute;top:50%;left:50%;visibility:hidden;color:#999;transition:all .5s;transform:translate(-50%,-50%);opacity:0;width:100%}.fl-color-picker-presets-close-label.fl-color-picker-active,.fl-color-picker-presets-open-label.fl-color-picker-active{color:#656c6e;visibility:visible;opacity:1}.fl-color-picker-presets-list{width:100%;list-style:none;margin:0;padding:0;overflow:auto}.fl-color-picker-presets-list .fl-color-picker-no-preset,.fl-color-picker-presets-list .fl-color-picker-preset{position:relative;padding:5px;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .1s}.fl-color-picker-presets-list .fl-color-picker-no-preset{padding:18px 5px;text-align:center}.fl-color-picker-presets-list .fl-color-picker-preset-color{display:inline-block;width:40px;height:20px;margin-right:3px;vertical-align:middle;border:1px solid rgba(0,0,0,.1);border-radius:2px;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-label{vertical-align:middle;color:#333;cursor:pointer}.fl-color-picker-presets-list .fl-color-picker-preset-remove{position:absolute;top:50%;cursor:pointer;transform:translateY(-50%)}.fl-color-picker-clear .fl-color-picker-icon-remove{right:auto;top:auto;margin:auto}.fl-color-picker-presets-list .fl-color-picker-preset-remove{right:5px}.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:after,.fl-color-picker-presets-list .fl-color-picker-preset-remove:hover:before{background-color:#333}.fl-color-picker-added{position:absolute;width:100%;top:0;left:0;right:0;bottom:35px;z-index:10;color:#fff;text-align:center;background-color:rgba(0,0,0,.8)}.fl-color-picker-added-text{position:absolute;top:50%;left:50%;width:80%;font-size:14px;color:#fff!important;transform:translate(-50%,-50%)}.fl-color-picker-icon-check{position:relative;width:50px;height:50px;margin:5px auto}.fl-color-picker-icon-check:before{content:'';display:block;position:relative;width:15px;height:30px;margin-left:14px;border:7px solid #fff;border-left:none;border-top:none;transform:rotate(45deg)}.fl-color-picker-icon-arrow-down,.fl-color-picker-icon-arrow-up{display:inline-block;position:relative;width:10px;height:10px;margin-left:5px}.fl-color-picker-icon-arrow-down:before,.fl-color-picker-icon-arrow-up:before{content:'';display:block;position:relative;width:6px;height:6px;border:2px solid #999;border-left:none;border-top:none;transform:rotate(45deg)}.fl-color-picker-icon-arrow-up{top:2px;transform:rotate(180deg)}.fl-color-picker-icon-remove{width:15px;height:15px}.fl-color-picker-icon-remove:after,.fl-color-picker-icon-remove:before{content:'';display:block;position:relative;background-color:#6f7881}.fl-color-picker-icon-remove:before{left:6px;width:2px;height:10px;margin-top:3px;transform:rotate(-45deg)}.fl-color-picker-icon-remove:after{left:6px;width:2px;height:10px;margin-top:-10px;transform:rotate(45deg)}.fl-alpha-wrap{position:absolute;width:35px;height:215px;padding:0 5px;right:4px;border-top:none}.fl-alpha-slider{height:190px;position:absolute;top:12px;width:28px}.fl-alpha-slider .ui-slider-handle{background:rgba(0,0,0,0);border-color:#aaa;border-radius:4px;border-style:solid;border-width:4px;box-shadow:0 1px 2px rgba(0,0,0,.2);-moz-box-shadow:0 1px 2px rgba(0,0,0,.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.2);cursor:ns-resize;height:12px;left:0;opacity:.9;position:absolute;right:0;width:30px;z-index:14}.fl-alpha-slider .ui-slider-handle:before{content:" ";position:absolute;left:-2px;right:-2px;top:-3px;bottom:-3px;border:2px solid #fff;border-radius:3px}.fl-alpha-slider-offset{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAASCAYAAAAe/ZHXAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkNEQUQ0ODM4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkNEQUQ0ODQ4RUE0MTFFNEExOEJFN0E5M0VFOTg0QUQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2Q0RBRDQ4MThFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2Q0RBRDQ4MjhFQTQxMUU0QTE4QkU3QTkzRUU5ODRBRCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pv/r/N8AAAWYSURBVHjarFvvR3VBEN45JZGIPkREHyIiIhJJf3qUSERE9CGiDxERkcg9z9u92uucvTszz5z7xnHPj93Z2d359cxscn5+jpTS+EoiMr3/+51cZ2dn4+e29i2/u7y8RKf/pO3vc+o+n5ycoNK31+f6+jrfZ37yuG2mf3R01H3fa5N/b29vU6dP5qft0G4PDg5MGuPr/v4+jz1t27mfvN/b21P75+fHx8eZfiV/Ozs7rUJnSu/5+RlFv+m6ZJpbW1s1PnrvXl9fZ/qX89zY2LB4mfy+v7/nsdV1XltbK/dr5vnz87OcV5bJabuVlRVLBifjfX9/l/xkGtM+S0tLNXnu0szfU/P3IMn/k0678h6ddqjQFGccVL6hoCsVfsq+NZ5QtCv5rfFS41sq37W+UPhMyhxEWTetvce3NR8oewqD39qalXuGAK/WPltjajIC4x2c9Ye1f43SGcqGwRBeTZjhMNntL4pCWZMQYhE05RVl02EovRgC4RkCbUNSQAGhGB/GsKG4h6FQoigDa2i8fRBy3uLMXYIG3Vr3aZvRaCRdBYlYIMZywhBGCVhgzzOlgRuUSOvC0GMEWxOM/+EtQFh1OIIXtfwg1tRaayGjg5px0jyZKEaTle3e+AsLCygVRAh3FlEgKbReE3oYGj9EgIR00QiEgKw3ZBQbRGjBeAMtDETQmHiKDsezJNLgCTFGItZXlAgCSiQggblP+9c8SDI0lXWlFv5g3K63KZ51FOcZzthQ3LomoNHwJmKIQISI3vqzSpwIQ8liSjGMFQjDpoVgaQ6cWgvLhOC7qiAwiHrWbEg4JMSmeUrBuHoYwioOQNXmhmAcrs096s1gJCGi3hSEVU8DQxYElYHhKwUUGAa+NqOBMsSSAQJuhQhCAH4vxozExsxiihPuaIrjCVYKWlYEsjSM52G8Kxxryngl5j0j+EyGTIiED4s1Itm0ZGWxMFCLJaBAcEI6OBkmFgNBoc8Cait2ZnENE/6wQN8LJSJeSMNAjKVm+LUMAIt3PR5AQgIGp1Z5zxhE8PtXUYReYeXi4mKmOPNXBMzt2tPT07LIUtJqr66uusXEbkFnWiQ6Pj72ikrtzc1NKopuvbbj58PDwxqNHp27u7tuYWumUDV+v7+/Xyu6pc59+/DwUCsC9ujt7u6qRbt8//T01C3elbyN70fb29uZ/1FSincvLy/lPGb42tzc9IqJeHt7q61Pr2C6vr7u7tfHx8fMPhV0sLq6WhZtU0n36+uru8elPE7aLi8v1wqJPXn++fmZKYgX8ozFxcXJb0NaQTHClZT8+gBjsYdaFc+zWcUkGTCWENY66ta92oSVzo3WI6IZKGtukeyfBLFKBNAj6bUOBgaoe9wE4n04IBNkLMoC7+Skj630ZlTJMYdyMsU2T8AwpzALkVFilZgJcT2l9PCWDDSAMBSjVlJgZNk0lE1AIby0qCiCnBQNj6aBGQslZIZJ5hB6D/AzQHto5Z9Nk8tARdN4q2ExBnsyIJ311EymShyjan2rKk0zh1Ay1oQVWAZQRnkUA8RFw7TahjBnmNgMVMQrsCGZJezRtGlU0cUZ1zuaxGZPpbhApM+ZpFQqQ6xadoMtBrEKpBVo4GRXvNSxpaRixKiR+TChCYhsDwZkfFj8IkErjAHejcUI0XQrgwehhNSMHAz21E0wZ23FcCAmj8Sd/PXy2xLYLAuwRw4IMsqjFaWYOpMEhDySAPFCWyFkgAHrEcA+BNeJ4UE8HCzJPpCrerUmQIx1pWJkjqxJD8EikUo2c5aI8ZYgsAkM4WQtnHd0ns0ORgVTBghy5ISy928SGsbTMqYg523RUY8oNYG4FIYiyRyZCnFCJC87IoRAIMVOqQ7BKexxCS2hYVl9JhvlpYjnAe4MhmRPMWhhvLfXINaI9WKM0Zu0+SfAAFLE1EgfVSv7AAAAAElFTkSuQmCC) center;box-shadow:0 0 5px rgba(0,0,0,.4) inset;-moz-box-shadow:0 0 5px rgba(0,0,0,.4) inset;-webkit-box-shadow:0 0 5px rgba(0,0,0,.4) inset;width:200px;height:22px;transform:rotate(-90deg);bottom:48%;left:-80px;position:absolute}.fl-alpha-text{width:30px;font-size:12px;text-align:center;color:#999;position:absolute;bottom:-5px}.fl-lightbox-wrap.fl-icon-selector{z-index:1000111}.fl-icon-selector .fl-lightbox{height:100%}.fl-icons-filter{height:auto!important;margin:0!important;position:absolute!important;right:0;top:0;padding:10px 16px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}.fl-icons-filter select{vertical-align:middle;width:160px;-webkit-appearance:none;-moz-appearance:none;appearance:none;box-sizing:border-box;color:#000;border:2px solid #e4e7ea!important;border-right:none!important;margin:0;padding:2px 10px;background:url(../img/svg/select-arrow-down-alt2.svg) center right 10px no-repeat #fff!important;-ms-flex:1 1 160px;flex:1 1 160px;border-radius:0}.fl-icons-filter input[type=text]{line-height:18px;vertical-align:middle;width:160px;-ms-flex:1 1 160px;flex:1 1 160px;border:2px solid #e4e7ea!important;border-radius:0!important;padding:2px 10px!important}.fl-icons-filter input[type=text]:focus,.fl-icons-filter select:focus{border:2px solid #00A0D2!important}.fl-icons-list{bottom:52px;left:0;overflow:auto;padding:20px;position:absolute;right:0;top:48px}.fl-icons-list::-webkit-scrollbar{background-color:#ccc;-webkit-appearance:none;width:10px}.fl-icons-list::-webkit-scrollbar-thumb{background-color:#666;border:1px solid #ccc}.fl-icons-section{text-align:center}.fl-icons-section h2{border-bottom:1px solid #dfdfdf;color:#333!important;font-family:Helvetica,Verdana,sans-serif!important;font-size:16px!important;font-weight:700!important;margin:0 0 20px!important;padding:0 0 10px!important;text-align:left}.fl-icons-list i,.fl-icons-list i:before{cursor:pointer;display:inline-block;font-size:40px;height:100px;line-height:100px;width:100px;background:0 0}.fl-icons-list i:hover{background:#fff;box-shadow:0 10px 20px rgba(0,0,0,.15);border-radius:4px}.fl-icon-selector-footer{bottom:0;left:0;position:absolute;right:0}.fl-lightbox-mask,.fl-lightbox-wrap{bottom:0;left:0;position:fixed;right:0;z-index:100010}@keyframes fl-lightbox-zoom{from{transform:scale(.4)}to{transform:scale(1)}}.fl-lightbox-wrap{display:none;overflow:auto;padding:4px;top:46px;-webkit-transform:translateZ(0);pointer-events:none}.fl-builder-draggable-is-dragging .fl-lightbox-wrap,.fl-builder-resizable-is-resizing .fl-lightbox-wrap,.fl-lightbox,.fl-lightbox-mask{pointer-events:auto}.fl-lightbox-mask{background:#000;opacity:.7;filter:alpha(opacity=70);top:0}.fl-lightbox{background:#F5F7F9;border-radius:4px;box-shadow:rgba(0,0,0,1) 0 4px 30px;-moz-box-shadow:rgba(0,0,0,1) 0 4px 30px;-webkit-box-shadow:rgba(0,0,0,1) 0 4px 30px;position:relative;display:-ms-flexbox;display:flex;z-index:100011;transform-origin:center;animation-name:fl-lightbox-zoom}.fl-lightbox.fl-lightbox-prevent-animation{animation-duration:0s;-moz-animation-duration:0s;-webkit-animation-duration:0s;-o-animation-duration:0s}.fl-lightbox :not(i){color:#333;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:16px;text-decoration:none;text-transform:none}.fl-lightbox *,.fl-lightbox :after,.fl-lightbox :before{box-sizing:content-box}.fl-lightbox .fl-nanoscroller-pane{bottom:4px;right:4px;width:8px}.fl-lightbox .fa{font-family:FontAwesome}.fl-lightbox .dashicons{font-family:dashicons}.fl-lightbox.ui-draggable{box-shadow:rgba(0,0,0,.2) 0 7px 30px;-moz-box-shadow:rgba(0,0,0,.2) 0 7px 30px;-webkit-box-shadow:rgba(0,0,0,.2) 0 7px 30px}.fl-lightbox-resizable{height:500px;width:380px}@media (max-width:500px){.fl-lightbox-resizable{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-resizable .ui-resizable-handle{display:none!important}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:default!important}.fl-lightbox-controls{display:none}}.fl-lightbox-width-full{left:0!important;right:0!important;top:0!important;height:100%!important;width:100%!important}.fl-lightbox-width-full .fl-lightbox-header{cursor:inherit!important}.fl-lightbox-controls{position:absolute;right:10px;top:10px;z-index:5}.fl-lightbox-controls .fa{color:#bdbdbd;font-size:14px;padding:5px}.fl-lightbox-controls .fa:hover{color:#aaa;cursor:pointer}.fl-lightbox-header-wrap{background:#fff;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:2px solid #eaeaea}.fl-lightbox-header{position:relative}.fl-lightbox-header h1{color:#333!important;font-size:20px!important;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif!important;font-weight:600!important;margin:0!important;padding:14px 34px 15px 28px!important;text-align:left!important;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;line-height:1.1}.fl-lightbox.ui-draggable .fl-lightbox-header{cursor:move}.fl-lightbox-header h1 .fl-builder-badge{margin-left:10px}.fl-lightbox-content,.fl-lightbox-content-wrap{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex:1 100%;flex:1 100%;height:100%;max-width:100%}.fl-lightbox-footer{box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex:0 0;flex:0 0;-ms-flex-preferred-size:44px;flex-basis:44px;padding:4px;text-align:right}.fl-lightbox-footer .fl-builder-button{height:36px;margin-left:5px!important;-ms-flex:0 0 0%;flex:0 0 0%;-ms-flex-pack:center;justify-content:center}.fl-lightbox-width-slim .fl-lightbox-footer{-ms-flex-pack:stretch;justify-content:stretch;padding:4px 5px}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button{-ms-flex:1 1 100%;flex:1 1 100%;display:block;text-align:center}.fl-lightbox-width-slim .fl-lightbox-footer .fl-builder-button:first-child{margin-left:0!important}.fl-lightbox table,.fl-lightbox td,.fl-lightbox th,.fl-lightbox tr{border:none}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel,.fl-builder-ui-skin--dark .fl-builder--preview-actions,.fl-builder-ui-skin--dark .fl-builder--search-results-panel,.fl-builder-ui-skin--dark .fl-builder-panel,.fl-builder-ui-skin--dark .fl-lightbox,body.fl-builder-ui-skin--dark .fl-builder-bar .fl-builder-bar-content{background:#23282d;color:#b4b9be;border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-header{background:#1d2227;color:#b4b9be;border-bottom-color:#1d1d1d;border-top-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel.fl-builder-ui-pinned .fl-builder--panel-header{border-top-color:#1d2227}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel:before{border-bottom-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder--panel-arrow polygon{fill:#1d1d1d}.fl-builder-ui-skin--dark .fl-builder-panel-search .fl-builder-panel-search-input{background:#1e2228}.fl-builder-ui-skin--dark .fl-responsive-preview-content{background:#131619}.fl-builder-ui-skin--dark .fl-form-table th{background:#23282d!important;color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--preview-actions .device-icons,.fl-builder-ui-skin--dark .fl-builder-button{background:#383f46}.fl-builder-ui-skin--dark .fl-builder-button:focus{background:#131a22}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-primary{color:#fff!important;fill:#fff!important;background:#00A0D2}.fl-builder-ui-skin--dark .fl-builder-button.fl-builder-button-silent:focus{border:2px solid #00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{color:#00A0D2!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:hover,.fl-builder-ui-skin--dark .fl-builder--menu>button:hover{background:#101215!important}.fl-builder-ui-skin--dark .fl-builder--menu>a:focus,.fl-builder-ui-skin--dark .fl-builder--menu>button:focus{background:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-bar-title{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:#181b1f}.fl-builder-simple.fl-builder-ui-skin--dark .fl-builder-bar-title:hover{background-color:transparent}.fl-builder-ui-skin--dark .fl-builder-layout-title{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-bar-title-caret i,.fl-builder-ui-skin--dark .fl-builder-layout-pretitle,.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title{color:#7d8690}.fl-builder-ui-skin--dark button.fl-builder-button.fl-builder-bar-title-caret:focus{background-color:#101215!important}.fl-builder-ui-skin--dark .fl-builder--search:before{color:rgba(162,173,184,.73)}.fl-builder-ui-skin--dark .fl-builder--search input:focus::-webkit-input-placeholder{color:rgba(162,173,184,.73)!important}.fl-builder-ui-skin--dark .fl-builder--search .search-clear{color:rgba(162,173,184,.5);background-color:#e4e4e4;background:linear-gradient(to left,#383f46,#383f46 75%,rgba(56,63,70,0))}.fl-builder-ui-skin--dark .fl-builder--menu hr{background-color:#23282d!important;border:none}.fl-builder-ui-skin--dark .fl-builder--tabs{border-color:#383f46!important}.fl-builder-ui-skin--dark .fl-builder--tabs>.is-showing,.fl-builder-ui-skin--dark .fl-builder-settings-tabs a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-more.fl-contains-active{color:#fff!important;fill:#fff!important;background:#383f46}.fl-builder-ui-skin--dark .fl-builder--tabs>:focus{background-color:#101215!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder--tabs>.is-showing:focus{color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder--menu-item:hover{background:#383f46;color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--menu * .fl-builder--menu-item-accessory,.fl-builder-ui-skin--dark .fl-builder-blocks-section-group-name{color:#7d8690}.fl-builder-ui-skin--dark .fl-builder--category-select{background:#171b1f}.fl-builder-ui-skin--dark .fl-builder--selector-display{color:#c6cdd6;background:url(../img/svg/select-arrow-down-alt2-light.svg) center right 10px no-repeat #171b1f!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label,.fl-builder-ui-skin--dark .fl-builder-panel-search-input input{border-color:#5b656f;color:#b5becb}.fl-builder-ui-skin--dark .fl-builder-panel-search-input input{background:#171b1f!important}.fl-builder-ui-skin--dark .fl-builder--selector-display-label:focus,.fl-builder-ui-skin--dark .fl-builder-panel-search-input input:focus{border-color:#00a0d2}.fl-builder-ui-skin--dark .fl-builder--group-label{color:#171b1f!important;background:#5b656f}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu{border-color:#101215!important;color:#7c858e;background-color:#101215}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu:before{border-bottom-color:#101215}.fl-builder-ui-skin--dark .fl-builder--menu>a,.fl-builder-ui-skin--dark .fl-builder--menu>button,.fl-builder-ui-skin--dark .fl-builder--menu>span{color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:hover{background:#23282d!important;color:#a1adb9}.fl-builder-ui-skin--dark .fl-builder--category-select .fl-builder--selector-menu .fl-builder--menu-item:focus{background:#23282d!important;color:#00a0d2!important}.fl-builder-ui-skin--dark .fl-builder-panel-drag-handle{fill:#5b656f}.fl-builder-ui-skin--dark .fl-builder--template-collection-section-name,.fl-builder-ui-skin--dark .fl-builder--user-templates-section-name,.fl-builder-ui-skin--dark .fl-builder-blocks-section .fl-builder-blocks-section-title{color:#969ea7;background:#171b1f}.fl-builder-ui-skin--dark .fl-builder-blocks-section-content .fl-builder-block,.fl-builder-ui-skin--dark .fl-user-template{color:#b8c2ce}.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-content,.fl-builder-ui-skin--dark .fl-user-template:hover{background:#171b1f;color:#fff}.fl-builder-ui-skin--dark .fl-builder-block:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover i{color:#6d7782!important}.fl-builder-ui-skin--dark .fl-builder-block:hover a:hover i,.fl-builder-ui-skin--dark .fl-user-template:hover a:hover i{color:#9eacbb!important}.fl-builder-ui-skin--dark .fl-builder-block .fl-builder-block-icon{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col,.fl-builder-ui-skin--dark .fl-builder-block:hover .fl-builder-block-visual.fl-cols-visual .fl-cols-visual-col{background:#7d8690}.fl-builder-ui-skin--dark .fl-builder-blocks-section,.fl-builder-ui-skin--dark .fl-builder-settings-section{border-top:2px solid #171b1f}.fl-builder-ui-skin--dark .fl-user-templates{border-color:#101215}.fl-builder-ui-skin--dark .fl-builder--template-thumbnail{border-color:#393f44}.fl-builder-ui-skin--dark .fl-builder--menu a.fl-template-collection{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-lightbox-header-wrap{background:#1d2227;border-bottom-color:#131a22}.fl-builder-ui-skin--dark .fl-lightbox .fl-lightbox-header h1{color:#fff!important}.fl-builder-ui-skin--dark .fl-form-table th label{color:#a8b3bf!important}.fl-builder-ui-skin--dark .fl-builder-settings-tabs{border-color:#383f46!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields h3.fl-builder-settings-title{background:#1b2025}.fl-builder-ui-skin--dark h3.fl-builder-settings-title .fl-builder-settings-title-text-wrap{color:#a8b3bf;background-color:#1b2025}.fl-builder-ui-skin--dark .fl-lightbox :not(i){color:#7d8690!important}.fl-builder-ui-skin--dark .fl-builder-button{color:#c6cdd6!important;fill:#c6cdd6!important}.fl-builder-ui-skin--dark .fl-builder-content-panel--button:hover,.fl-builder-ui-skin--dark .fl-builder-content-panel-button{fill:#00A0D2!important}.fl-builder-ui-skin--dark .fl-lightbox .fl-builder-button.fl-builder-button-primary{color:#fff!important}.fl-builder-ui-skin--dark .fl-color-picker{background:#131a22}.fl-color-picker-color.fl-color-picker-empty .fl-color-picker-icon{fill:#6f7881}.fl-builder-ui-skin--dark .fl-color-picker-clear{background-color:#191d21}.fl-builder-ui-skin--dark .fl-color-picker-clear:hover{background-color:#373f46}.fl-builder-ui-skin--dark span.fl-builder-block-no-node-templates:hover{background:#1d2025}.fl-builder-ui-skin--dark .fl-builder-settings-tab-description{background:#1d2227}.fl-builder-ui-skin--dark .fl-builder-panel-search button svg .filled-shape{fill:#b5becb}.fl-builder-ui-skin--dark .fl-builder-custom-field,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text],.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url],.fl-builder-ui-skin--dark .fl-builder-settings-fields select,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea{background-color:#131a22!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=email]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=file]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=number]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=password]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=search]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=tel]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=text]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields input[type=url]:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields select:focus,.fl-builder-ui-skin--dark .fl-builder-settings-fields textarea:focus{border-color:#00a0d2!important;color:#fff!important}.fl-builder-ui-skin--dark .fl-builder-settings-fields select{background-image:url(../img/svg/select-arrow-down-alt2-light.svg)!important}.fl-builder-ui-skin--dark .fl-builder-custom-field select,.fl-builder-ui-skin--dark .fl-photo-field select{border-color:#7d8690!important}.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle{color:#6b747d}.fl-builder-ui-skin--dark .fl-builder--main-menu-panel-view-title,.fl-builder-ui-skin--dark .fl-field i.fl-field-responsive-toggle:hover{color:#a8b3bf}.fl-builder-ui-skin--dark .fl-builder--saving-indicator{color:#858f99}.fl-builder-ui-skin--dark .fl-icons-list i:hover{background-color:#16191d;color:#fff}.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:after,.fl-builder-ui-skin--dark .fl-color-picker-clear .fl-color-picker-icon-remove:before{background:#6f7881}.fl-builder-ui-skin--dark .fl-builder--user-templates-section-content{border-color:#1d1d1d}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button{background:0 0;border-right-color:#101215!important}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select.fl-builder-button:hover{background:#181b1f}.fl-builder-ui-skin--dark .fl-theme-builder-preview-select .fl-theme-builder-preview-select-title span{color:#c6cdd6}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu{background:#131a22;border-color:#353c43 #131a22 #131a22}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu:before{border-bottom-color:#353c43}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:focus,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover{background:#383f46}.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a.fl-active,.fl-builder-ui-skin--dark .fl-builder-settings-tabs-overflow-menu>a:hover.fl-active{color:#fff!important;background:#383f46}.fl-builder-ui-skin--dark ul.as-selections{background-color:#121a23}.fl-builder-ui-skin--dark .fl-custom-query .fl-builder-settings-section{border-top:2px solid #1b2026!important}.fl-builder-ui-skin--dark .pp-preview-button{background:#23282d;border:2px solid #101215}.fl-builder-ui-skin--dark .pp-preview-button .pp-preview-button-wrap .fa{color:#b8bfc7}
fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 2.0.4.4
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
9
  * Copyright: (c) 2014 Beaver Builder
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 2.0.5
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
9
  * Copyright: (c) 2014 Beaver Builder
img/beaver-128.png ADDED
Binary file
img/beaver-256.png ADDED
Binary file
includes/ui-js-templates.php CHANGED
@@ -569,7 +569,7 @@
569
  // Check if there are any ordered sections before looping over everything
570
  if (!_.isUndefined(data.orderedSectionNames)) {
571
 
572
- for( var i in data.orderedSectionNames ) {
573
  var title = data.orderedSectionNames[i],
574
  modules = groupedModules.categorized[title],
575
  slug = title.replace(/\s+/g, '-').toLowerCase();
569
  // Check if there are any ordered sections before looping over everything
570
  if (!_.isUndefined(data.orderedSectionNames)) {
571
 
572
+ for( var i = 0; i < data.orderedSectionNames.length; i++ ) {
573
  var title = data.orderedSectionNames[i],
574
  modules = groupedModules.categorized[title],
575
  slug = title.replace(/\s+/g, '-').toLowerCase();
includes/ui-settings-form.php CHANGED
@@ -18,8 +18,8 @@
18
  <div class="fl-lightbox-header">
19
  <h1>
20
  {{{data.title}}}
21
- <# for ( var badge in data.badges ) { #>
22
- <span class="fl-builder-badge fl-builder-badge-{{badge}}">{{data.badges[ badge ]}}</span>
23
  <# } #>
24
  </h1>
25
  <div class="fl-lightbox-controls">
18
  <div class="fl-lightbox-header">
19
  <h1>
20
  {{{data.title}}}
21
+ <# for ( var i = 0; i < data.badges.length; i++ ) { #>
22
+ <span class="fl-builder-badge fl-builder-badge-{{data.badges[ i ]}}">{{data.badges[ i ]}}</span>
23
  <# } #>
24
  </h1>
25
  <div class="fl-lightbox-controls">
includes/updater-config.php CHANGED
@@ -3,7 +3,7 @@
3
  if ( class_exists( 'FLUpdater' ) ) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
- 'version' => '2.0.4.4',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin',
9
  ));
3
  if ( class_exists( 'FLUpdater' ) ) {
4
  FLUpdater::add_product(array(
5
  'name' => 'Beaver Builder Plugin (Lite Version)',
6
+ 'version' => '2.0.5',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin',
9
  ));
includes/updater/classes/class-fl-updater.php CHANGED
@@ -128,6 +128,11 @@ final class FLUpdater {
128
  $transient->response[ $plugin ]->url = $response->homepage;
129
  $transient->response[ $plugin ]->package = $response->package;
130
  $transient->response[ $plugin ]->tested = $response->tested;
 
 
 
 
 
131
 
132
  if ( empty( $response->package ) ) {
133
  $transient->response[ $plugin ]->upgrade_notice = FLUpdater::get_update_error_message();
@@ -342,7 +347,7 @@ final class FLUpdater {
342
  */
343
  static private function get_update_error_message( $plugin_data = null ) {
344
  $message = '';
345
- $message .= '<p style="padding:10px 20px; margin-top: 10px; background: #d54e21; color: #fff;">';
346
  $message .= __( '<strong>UPDATE UNAVAILABLE!</strong>', 'fl-builder' );
347
  $message .= '&nbsp;&nbsp;&nbsp;';
348
  $message .= __( 'Please subscribe to enable automatic updates for this plugin.', 'fl-builder' );
@@ -352,9 +357,7 @@ final class FLUpdater {
352
  $message .= __( 'Subscribe Now', 'fl-builder' );
353
  $message .= ' &raquo;</a>';
354
  }
355
-
356
- $message .= '</p>';
357
-
358
  return $message;
359
  }
360
 
128
  $transient->response[ $plugin ]->url = $response->homepage;
129
  $transient->response[ $plugin ]->package = $response->package;
130
  $transient->response[ $plugin ]->tested = $response->tested;
131
+ $transient->response[ $plugin ]->icons = apply_filters( 'fl_updater_icon', array(
132
+ '1x' => FL_BUILDER_URL . 'img/beaver-128.png',
133
+ '2x' => FL_BUILDER_URL . 'img/beaver-256.png',
134
+ 'default' => FL_BUILDER_URL . 'img/beaver-256.png',
135
+ ), $response, $this->settings );
136
 
137
  if ( empty( $response->package ) ) {
138
  $transient->response[ $plugin ]->upgrade_notice = FLUpdater::get_update_error_message();
347
  */
348
  static private function get_update_error_message( $plugin_data = null ) {
349
  $message = '';
350
+ $message .= '<span style="display:block;padding:10px 20px;margin:10px 0; background: #d54e21; color: #fff;">';
351
  $message .= __( '<strong>UPDATE UNAVAILABLE!</strong>', 'fl-builder' );
352
  $message .= '&nbsp;&nbsp;&nbsp;';
353
  $message .= __( 'Please subscribe to enable automatic updates for this plugin.', 'fl-builder' );
357
  $message .= __( 'Subscribe Now', 'fl-builder' );
358
  $message .= ' &raquo;</a>';
359
  }
360
+ $message .= '</span>';
 
 
361
  return $message;
362
  }
363
 
js/fl-builder-layout.js CHANGED
@@ -427,6 +427,7 @@
427
  videoTag.attr( 'poster', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' )
428
  videoTag.css( 'background', 'transparent url("' + fallback + '") no-repeat center center' )
429
  videoTag.css( 'background-size', 'cover' )
 
430
  }
431
 
432
  // MP4 Source Tag
@@ -449,10 +450,10 @@
449
  }
450
 
451
  // Check what video player we are going to load in a row
452
- if ( 'undefined' != typeof youtube ) {
453
  FLBuilderLayout._initYoutubeBgVideo.apply( this );
454
  }
455
- else if ( 'undefined' != typeof vimeo ) {
456
  FLBuilderLayout._initVimeoBgVideo.apply( this );
457
  }
458
  else {
427
  videoTag.attr( 'poster', 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' )
428
  videoTag.css( 'background', 'transparent url("' + fallback + '") no-repeat center center' )
429
  videoTag.css( 'background-size', 'cover' )
430
+ videoTag.css( 'height', '100%' )
431
  }
432
 
433
  // MP4 Source Tag
450
  }
451
 
452
  // Check what video player we are going to load in a row
453
+ if ( 'undefined' != typeof youtube && ! FLBuilderLayout._isMobile() ) {
454
  FLBuilderLayout._initYoutubeBgVideo.apply( this );
455
  }
456
+ else if ( 'undefined' != typeof vimeo && ! FLBuilderLayout._isMobile() ) {
457
  FLBuilderLayout._initVimeoBgVideo.apply( this );
458
  }
459
  else {
js/fl-builder-revisions.js CHANGED
@@ -55,7 +55,7 @@
55
 
56
  } else {
57
 
58
- for ( i in posts ) {
59
 
60
  date = FLBuilderStrings.revisionDate.replace( '%s', posts[ i ].date.diff );
61
  date += ' (' + posts[ i ].date.published + ')';
55
 
56
  } else {
57
 
58
+ for ( ; i < posts.length; i++ ) {
59
 
60
  date = FLBuilderStrings.revisionDate.replace( '%s', posts[ i ].date.diff );
61
  date += ' (' + posts[ i ].date.published + ')';
js/fl-builder.js CHANGED
@@ -3891,12 +3891,11 @@
3891
  }
3892
 
3893
  if ( button.hasClass( 'fl-block-col-edit-parent' ) ) {
3894
- nodeId = col.parents( '.fl-col' ).data( 'node' );
3895
- }
3896
- else {
3897
- nodeId = col.attr('data-node');
3898
  }
3899
 
 
 
3900
  FLBuilderSettingsForms.render( {
3901
  id : 'col',
3902
  nodeId : nodeId,
3891
  }
3892
 
3893
  if ( button.hasClass( 'fl-block-col-edit-parent' ) ) {
3894
+ col = col.parents( '.fl-col' );
 
 
 
3895
  }
3896
 
3897
+ nodeId = col.attr('data-node');
3898
+
3899
  FLBuilderSettingsForms.render( {
3900
  id : 'col',
3901
  nodeId : nodeId,
js/fl-builder.min.js CHANGED
@@ -1,9 +1,9 @@
1
  var FLBuilderColorPicker;!function(e,t){function i(){var t,i,l="backgroundImage";h?f="filter":(t=e('<div id="iris-gradtest" />'),i="linear-gradient(top,#fff,#000)",e.each(g,function(e,s){if(t.css(l,s+i),t.css(l).match("gradient"))return f=e,!1}),f===!1&&(t.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),t.css(this.bgImageString).match("gradient")&&(f="webkit")),t.remove())}function l(t,i){return t="top"===t?"top":"left",i=e.isArray(i)?i:Array.prototype.slice.call(arguments,1),"webkit"===f?o(t,i):g[f]+"linear-gradient("+t+", "+i.join(", ")+")"}function s(t,i){var l,s,o,r,a,d,u,c,h;t="top"===t?"top":"left",i=e.isArray(i)?i:Array.prototype.slice.call(arguments,1),l="top"===t?0:1,s=e(this),o=i.length-1,r="filter",a=1===l?"left":"top",d=1===l?"right":"bottom",u=1===l?"height":"width",c='<div class="iris-ie-gradient-shim" style="position:absolute;'+u+":100%;"+a+":%start%;"+d+":%end%;"+r+':%filter%;" data-color:"%color%"></div>',h="","static"===s.css("position")&&s.css({position:"relative"}),i=n(i),e.each(i,function(e,t){var s,n,r;return e!==o&&(s=i[e+1],void(t.stop!==s.stop&&(n=100-parseFloat(s.stop)+"%",t.octoHex=new Color(t.color).toIEOctoHex(),s.octoHex=new Color(s.color).toIEOctoHex(),r="progid:DXImageTransform.Microsoft.Gradient(GradientType="+l+", StartColorStr='"+t.octoHex+"', EndColorStr='"+s.octoHex+"')",h+=c.replace("%start%",t.stop).replace("%end%",n).replace("%filter%",r))))}),s.find(".iris-ie-gradient-shim").remove(),e(h).prependTo(s)}function o(t,i){var l=[];return t="top"===t?"0% 0%,0% 100%,":"0% 100%,100% 100%,",i=n(i),e.each(i,function(e,t){l.push("color-stop("+parseFloat(t.stop)/100+", "+t.color+")")}),"-webkit-gradient(linear,"+t+l.join(",")+")"}function n(t){var i=[],l=[],s=[],o=t.length-1;return e.each(t,function(e,t){var s=t,o=!1,n=t.match(/1?[0-9]{1,2}%$/);n&&(s=t.replace(/\s?1?[0-9]{1,2}%$/,""),o=n.shift()),i.push(s),l.push(o)}),l[0]===!1&&(l[0]="0%"),l[o]===!1&&(l[o]="100%"),l=r(l),e.each(l,function(e){s[e]={color:i[e],stop:l[e]}}),s}function r(t){var i,l,s,o,n=0,a=t.length-1,d=0,u=!1;if(t.length<=2||e.inArray(!1,t)<0)return t;for(;d<t.length-1;)u||t[d]!==!1?u&&t[d]!==!1&&(a=d,d=t.length):(n=d-1,u=!0),d++;for(l=a-n,o=parseInt(t[n].replace("%"),10),i=(parseFloat(t[a].replace("%"))-o)/l,d=n+1,s=1;d<a;)t[d]=o+s*i+"%",s++,d++;return r(t)}var a=[],d=navigator.userAgent.toLowerCase(),u="Microsoft Internet Explorer"===navigator.appName,c=u?parseFloat(d.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,h=u&&c<10,f=!1,g=["-moz-","-webkit-","-o-","-ms-"];flBuilderParseColorValue=function(e){var t=e.replace(/\s+/g,""),i=t.indexOf("rgba")!==-1?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100,l=i<100;return{value:t,alpha:i,rgba:l}},e.fn.flBuilderColorPickerGradient=function(){var t=arguments;return this.each(function(){h?s.apply(this,t):e(this).css("backgroundImage",l.apply(this,t))})},e.fn.flBuilderColorPickerRaninbowGradient=function(t,i){var l,s,o,n;for(t=t||"top",l=e.extend({},{s:100,l:50},i),s="hsl(%h%,"+l.s+"%,"+l.l+"%)",o=0,n=[];o<=360;)n.push(s.replace("%h%",o)),o+=30;return this.each(function(){e(this).flBuilderColorPickerGradient(t,n)})},FLBuilderColorPicker=function(t){this._html='<div class="fl-color-picker-ui"><div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="javascript:void(0);"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div></div>';var i={elements:null,color:"",mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},target:!1,width:200,presets:[],labels:{colorPresets:"Color Presets",colorPicker:"Color Picker",placeholder:"Paste color here...",removePresetConfirm:"Are you sure?",noneColorSelected:"None color selected.",alreadySaved:"%s is already a saved preset.",noPresets:"Add a color preset first.",presetAdded:"%s added to presets!"}};this.options=e.extend({},i,t),(h===!1||h===!0&&c>7)&&this._init()},FLBuilderColorPicker.prototype={_html:"",_color:"",_currentElement:"",_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_scale:{h:360,s:100,l:100,v:100},_init:function(){var t=this;e(t.options.elements);this._color=new Color("#ff0000").setHSpace(t.options.mode),a=this.options.presets,f===!1&&i(),e("html").hasClass("fl-color-picker-init")?t.picker=e(".fl-color-picker-ui"):t.picker=e(this._html).appendTo("body"),u?9===c?t.picker.addClass("iris-ie-9"):c<=8&&t.picker.addClass("iris-ie-lt9"):d.indexOf("compatible")<0&&d.indexOf("khtml")<0&&d.match(/mozilla/)&&t.picker.addClass("iris-mozilla"),t.controls={square:t.picker.find(".iris-square"),squareDrag:t.picker.find(".iris-square-value"),horiz:t.picker.find(".iris-square-horiz"),vert:t.picker.find(".iris-square-vert"),strip:t.picker.find(".iris-strip"),stripSlider:t.picker.find(".iris-strip .iris-slider-offset")},"hsv"===t.options.mode&&t._has("l",t.options.controls)?t.options.controls=t._defaultHSVControls:"hsl"===t.options.mode&&t._has("v",t.options.controls)&&(t.options.controls=t._defaultHSLControls),t.hue=t._color.h(),this._setTemplates(),this._ui=e(".fl-color-picker-ui"),this._iris=e(".iris-picker"),this._wrapper=e("body"),e("html").hasClass("fl-color-picker-init")||this._ui.prepend(this._hexHtml).append(this._presetsHtml),t.element=this._ui.find(".fl-color-picker-input"),t._initControls(),t.active="external",t._change(),t._addInputListeners(t.element),this._buildUI(),this._prepareColorFields(),this._pickerControls(),this._presetsControls(),this._buildAlphaUI(),e("html").addClass("fl-color-picker-init")},_prepareColorFields:function(){var t=this;e(".fl-color-picker-value").each(function(){var i=e(this),l=i.val(),s=i.parent().find(".fl-color-picker-color"),o=flBuilderParseColorValue(l),n="";if(l){if(s.hasClass("fl-color-picker-alpha-enabled")&&o.rgba)n=i.val().toString();else if(!s.hasClass("fl-color-picker-alpha-enabled")&&o.rgba){var r=l.replace("rgba","rgb");r=r.substr(0,r.lastIndexOf(","))+")",t._color._alpha=1,n=r,i.val(r)}else n="#"+i.val().toString();s.css({backgroundColor:n})}})},_setTemplates:function(){this._alphaHtml='<div class="fl-alpha-wrap"><div class="fl-alpha-slider"></div><div class="fl-alpha-slider-offset"></div><div class="fl-alpha-text"></div></div>',this._presetsHtml='<div class="fl-color-picker-presets"><div class="fl-color-picker-presets-toggle"><div class="fl-color-picker-presets-open-label fl-color-picker-active">'+this.options.labels.colorPresets+' <span class="fl-color-picker-icon-arrow-up"></span></div><div class="fl-color-picker-presets-close-label">'+this.options.labels.colorPicker+' <span class="fl-color-picker-icon-arrow-down"></span></div></div><ul class="fl-color-picker-presets-list"></ul></div>',this._hexHtml='<input type="text" class="fl-color-picker-input" maxlength="7" placeholder="'+this.options.labels.placeholder+'"><div class="fl-color-picker-preset-add"></div>',this._presetsTpl='<li class="fl-color-picker-preset"><span class="fl-color-picker-preset-color"></span> <span class="fl-color-picker-preset-label"></span> <span class="fl-color-picker-preset-remove fl-color-picker-icon-remove"></span></li>',this._noPresetsTpl='<li class="fl-color-picker-no-preset"><span class="fl-color-picker-preset-label">'+this.options.labels.noPresets+"</span></li>"},_has:function(t,i){var l=!1;return e.each(i,function(e,i){if(t===i)return l=!0,!1}),l},_buildUI:function(){var t=this;t._presetsList=this._ui.find(".fl-color-picker-presets-list"),t._presetsList.html(""),this.options.presets.length>0?e.each(this.options.presets,function(e,i){t._addPresetView(i)}):t._presetsList.append(this._noPresetsTpl)},_addPresetView:function(t){var i=this._presetsList.find(".fl-color-picker-no-preset");i.length>0&&i.remove();var l=e(this._presetsTpl),s=Color(t);l.attr("data-color",t).find(".fl-color-picker-preset-color").css({backgroundColor:s.toString()}).end().find(".fl-color-picker-preset-label").html(s.toString()),this._presetsList.append(l)},_addPresetFeedback:function(){this._ui.append('<div class="fl-color-picker-added"><div class="fl-color-picker-added-text"><div class="fl-color-picker-icon-check"></div> "'+this.options.labels.presetAdded.replace("%s",this._color.toString())+'"</div></div>'),this._ui.find(".fl-color-picker-added").hide().fadeIn(200).delay(2e3).fadeOut(200,function(){e(this).remove()})},_pickerControls:function(){var t=this;this._wrapper.on("click",".fl-color-picker-color",function(){var i=e(this);t._currentElement=i.parent().find(".fl-color-picker-value"),t._ui.position({my:"left top",at:"left bottom",of:i,collision:"flipfit",using:function(e,i){t._togglePicker(e)}})}).on("click",".fl-color-picker-clear",function(){var i=e(this);t._currentElement=i.parent().find(".fl-color-picker-value"),i.prev(".fl-color-picker-color").css({backgroundColor:"transparent"}).addClass("fl-color-picker-empty"),t._setColor(""),t.element.val(""),t._currentElement.val("").trigger("change")}),e(document).on("mousedown",function(t){0===e(t.target).closest(".fl-color-picker-ui").length&&e(".fl-color-picker-ui.fl-color-picker-active").removeClass("fl-color-picker-active")})},_presetsControls:function(){var t=this,i=t._ui.find(".fl-color-picker-preset-add"),l=t._ui.find(".fl-color-picker-presets"),s=l.find(".fl-color-picker-presets-open-label"),o=l.find(".fl-color-picker-presets-close-label"),n=l.find(".fl-color-picker-presets-list");i.off("click").on("click",function(){t._addPreset(t.element.val())}),n.css({height:t.element.innerHeight()+t._iris.innerHeight()+14+"px"}).hide(),l.off("click").on("click",".fl-color-picker-presets-toggle",function(){s.toggleClass("fl-color-picker-active"),o.toggleClass("fl-color-picker-active"),n.slideToggle(500)}).on("click",".fl-color-picker-preset",function(i){var l=new Color(e(this).data("color").toString());t._setColor(l),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:l.toString()}).removeClass("fl-color-picker-empty"),s.toggleClass("fl-color-picker-active"),o.toggleClass("fl-color-picker-active"),n.slideToggle(500)}).on("click",".fl-color-picker-preset-remove",function(i){i.stopPropagation(),t._removePreset(e(this).parent().data("color"))})},_removePreset:function(t){if(confirm(this.options.labels.removePresetConfirm)){var i=t.toString(),l=a.indexOf(i);l>-1&&(a.splice(l,1),this.options.presets=a,this._presetsList.find('.fl-color-picker-preset[data-color="'+i+'"]').slideUp(function(){e(this).remove()})),a.length<1&&this._presetsList.append(this._noPresetsTpl),e(this).trigger("presetRemoved",{presets:a})}},_addPreset:function(t){var i=t.toString().replace(/^#/,"");""===i?alert(this.options.labels.noneColorSelected):a.indexOf(i)>-1?alert(this.options.labels.alreadySaved.replace("%s","#"+i)):(this._addPresetView(i),this._addPresetFeedback(),a.push(i),this.options.presets=a,e(this).trigger("presetAdded",{presets:a}))},_togglePicker:function(e){var t=this;this._ui.hasClass("fl-color-picker-active")?(this._ui.removeClass("fl-color-picker-active"),e&&setTimeout(function(){t._ui.css(e),t._ui.addClass("fl-color-picker-active"),t._setColor(t._currentElement.val())},200)):(e&&t._ui.css(e),setTimeout(function(){t._ui.addClass("fl-color-picker-active"),t._setColor(t._currentElement.val())},200))},_paint:function(){var e=this;e._paintDimension("right","strip"),e._paintDimension("top","vert"),e._paintDimension("left","horiz")},_paintDimension:function(e,t){var i,l=this,s=l._color,o=l.options.mode,n=l._getHSpaceColor(),r=l.controls[t],a=l.options.controls;if(t!==l.active&&("square"!==l.active||"strip"===t))switch(a[t]){case"h":if("hsv"===o){switch(n=s.clone(),t){case"horiz":n[a.vert](100);break;case"vert":n[a.horiz](100);break;case"strip":n.setHSpace("hsl")}i=n.toHsl()}else i="strip"===t?{s:n.s,l:n.l}:{s:100,l:n.l};r.flBuilderColorPickerRaninbowGradient(e,i);break;case"s":"hsv"===o?"vert"===t?i=[s.clone().a(0).s(0).toCSS("rgba"),s.clone().a(1).s(0).toCSS("rgba")]:"strip"===t?i=[s.clone().s(100).toCSS("hsl"),s.clone().s(0).toCSS("hsl")]:"horiz"===t&&(i=["#fff","hsl("+n.h+",100%,50%)"]):i="vert"===t&&"h"===l.options.controls.horiz?["hsla(0, 0%, "+n.l+"%, 0)","hsla(0, 0%, "+n.l+"%, 1)"]:["hsl("+n.h+",0%,50%)","hsl("+n.h+",100%,50%)"],r.flBuilderColorPickerGradient(e,i);break;case"l":i="strip"===t?["hsl("+n.h+",100%,100%)","hsl("+n.h+", "+n.s+"%,50%)","hsl("+n.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],r.flBuilderColorPickerGradient(e,i);break;case"v":i="strip"===t?[s.clone().v(100).toCSS(),s.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],r.flBuilderColorPickerGradient(e,i)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(e){var t,i=this,l=i.options,s=i.controls,o=s.square,n=i.picker.find(".iris-strip"),r="77.5%",a="12%",d=20,u=l.border?l.width-d:l.width;if(e&&(o.css("width",""),n.css("width",""),i.picker.css({width:"",height:""})),r=u*(parseFloat(r)/100),a=u*(parseFloat(a)/100),t=l.border?r+d:r,o.width(r).height(r),n.height(r).width(a),i.picker.css({width:l.width,height:t}),!l.palettes)return i.picker.css("paddingBottom","")},_addInputListeners:function(e){var t=this,i=100,l=function(i){var l=new Color(e.val()),s=e.val().replace(/^#/,""),o=t._currentElement.hasClass("fl-color-picker-empty");if(e.removeClass("iris-error"),l.error)""!==s&&e.addClass("iris-error");else if(l.toString()!==t._color.toString()||""!==t._color.toString()&&o)if("keyup"===i.type){if(s.match(/^[0-9a-fA-F]{3}$/))return;t._setColor(s),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:Color(s).toString()}).removeClass("fl-color-picker-empty"),t._currentElement.val(s).trigger("change")}else if("paste"===i.type)return s=i.originalEvent.clipboardData.getData("text").replace(/^#/,""),hex=Color(s).toString(),t._setColor(s),e.val(hex),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:hex}).removeClass("fl-color-picker-empty"),t._currentElement.val(s).trigger("change"),!1};e.on("change",l).on("keyup",t._debounce(l,i))},_initControls:function(){var t=this,i=t.controls,l=i.square,s=t.options.controls,o=t._scale[s.strip];i.stripSlider.slider({orientation:"horizontal",max:o,slide:function(e,i){t.active="strip","h"===s.strip&&(i.value=o-i.value),t._color[s.strip](i.value),t._change.apply(t,arguments)}}),i.squareDrag.draggable({containment:i.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(e,i){t._squareDrag(e,i)},start:function(){l.addClass("iris-dragging"),e(this).addClass("ui-state-focus")},stop:function(){l.removeClass("iris-dragging"),e(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(i){var l="ui-state-focus";i.preventDefault(),"mousedown"===i.type?(t.picker.find("."+l).removeClass(l).blur(),e(this).addClass(l).focus()):e(this).removeClass(l)}).on("keydown",function(e){var l=i.square,s=i.squareDrag,o=s.position(),n=2;switch(e.altKey&&(n*=10),e.keyCode){case 37:o.left-=n;break;case 38:o.top-=n;break;case 39:o.left+=n;break;case 40:o.top+=n;break;default:return!0}o.left=Math.max(0,Math.min(o.left,l.width())),o.top=Math.max(0,Math.min(o.top,l.height())),s.css(o),t._squareDrag(e,{position:o}),e.preventDefault()}),l.mousedown(function(i){var l,s;1===i.which&&e(i.target).is("div")&&(l=t.controls.square.offset(),s={top:i.pageY-l.top,left:i.pageX-l.left},i.preventDefault(),t._squareDrag(i,{position:s}),i.target=t.controls.squareDrag.get(0),t.controls.squareDrag.css(s).trigger(i))})},_squareDrag:function(e,t){var i=this,l=i.options.controls,s=i._squareDimensions(),o=Math.round((s.h-t.position.top)/s.h*i._scale[l.vert]),n=i._scale[l.horiz]-Math.round((s.w-t.position.left)/s.w*i._scale[l.horiz]);i._color[l.horiz](n)[l.vert](o),i.active="square",i._change.apply(i,arguments)},_setColor:function(e){var t,i,l=this,s=l.options.color;l.options.color=e,e=""+e,t=e.replace(/^#/,""),i=new Color(e).setHSpace(l.options.mode),i.error?l.options.color=s:(l._color=i,l.options.color=l._color.toString(),l.active="external",l._change())},_squareDimensions:function(e){var i,l,s=this.controls.square;return e!==t&&s.data("dimensions")?s.data("dimensions"):(l=this.controls.squareDrag,i={w:s.width(),h:s.height()},s.data("dimensions",i),i)},_isNonHueControl:function(e,t){return"square"===e&&"h"===this.options.controls.strip||"external"!==t&&("h"!==t||"strip"!==e)},_change:function(){var t=this,i=t.controls,l=t._getHSpaceColor(),s=["square","strip"],o=t.options.controls,n=o[t.active]||"external",r=t.hue;"strip"===t.active?s=[]:"external"!==t.active&&s.pop(),e.each(s,function(e,s){var n,r,a;if(s!==t.active)switch(s){case"strip":n="h"===o.strip?t._scale[o.strip]-l[o.strip]:l[o.strip],i.stripSlider.slider("value",n);break;case"square":r=t._squareDimensions(),a={left:l[o.horiz]/t._scale[o.horiz]*r.w,top:r.h-l[o.vert]/t._scale[o.vert]*r.h},t.controls.squareDrag.css(a)}}),l.h!==r&&t._isNonHueControl(t.active,n)&&t._color.h(r),t.hue=t._color.h(),t.options.color=t._color.toString(),t.element.is(":input")&&!t._color.error&&(t.element.removeClass("iris-error"),t.element.val()!==t._color.toString()&&(t.element.val(t._color.toString()),this._currentElement&&(this._currentElement.val(t._color.toString().replace(/^#/,"")).parent().find(".fl-color-picker-color").css({backgroundColor:t._color.toString()}).removeClass("fl-color-picker-empty"),t._wrapper.find(".fl-alpha-slider-offset").css("background-color",t._color.toString()),this._currentElement.trigger("change")))),t._paint(),t._inited=!0,t.active=!1},_debounce:function(e,t,i){var l,s;return function(){var o,n,r=this,a=arguments;return o=function(){l=null,i||(s=e.apply(r,a))},n=i&&!l,clearTimeout(l),l=setTimeout(o,t),n&&(s=e.apply(r,a)),s}},_buildAlphaUI:function(){var t=this;t._wrapper.on("click",".fl-color-picker-color",function(){var i=e(this);t._currentElement.val();i.hasClass("fl-color-picker-alpha-enabled")?(t._ui.find(".fl-alpha-wrap").length<=0&&e(t._alphaHtml).insertAfter(t._iris),t.picker.addClass("fl-color-alpha-enabled"),t._pickerAlphaControls()):t._ui.find(".fl-alpha-wrap").remove()})},_pickerAlphaControls:function(){var e=this,t=e._currentElement,i=flBuilderParseColorValue(t.val()),l=parseFloat(i.alpha/100),s=e._wrapper,o=e._ui,n=o.find(".fl-alpha-wrap"),r=n.find(".fl-alpha-slider"),a=n.find(".fl-alpha-text"),d=n.find(".fl-alpha-slider-offset");alphaHandle=n.find(".ui-slider-handle"),a.text(l<1?l:""),r.slider({orientation:"vertical",slide:function(t,i){var l=parseFloat(i.value/100);e._color._alpha=l,a.text(l<1?l:""),e._change.apply(e,arguments)},create:function(){d.css({backgroundColor:i.value}),s.on("click",".fl-color-picker-clear",function(){e._color._alpha=1,a.text(""),r.slider("value",100).trigger("slide")})},value:i.alpha,step:1,min:1,max:100})}}}(jQuery),function(e,t){var i=function(e,t){return this instanceof i?this._init(e,t):new i(e,t)};i.fn=i.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:"hsl",_init:function(e){var i="noop";switch(typeof e){case"object":return e.a!==t&&this.a(e.a),i=e.r!==t?"fromRgb":e.l!==t?"fromHsl":e.v!==t?"fromHsv":i,this[i](e);case"string":return this.fromCSS(e);case"number":return this.fromInt(parseInt(e,10))}return this},_error:function(){return this.error=!0,this},clone:function(){for(var e=new i(this.toInt()),t=["_alpha","_hSpace","_hsl","_hsv","error"],l=t.length-1;l>=0;l--)e[t[l]]=this[t[l]];return e},setHSpace:function(e){return this._hSpace="hsv"===e?e:"hsl",this},noop:function(){return this},fromCSS:function(e){var t,i=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,e=e.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),e.match(i)&&e.match(/\)$/)){if(t=e.replace(/(\s|%)/g,"").replace(i,"").replace(/,?\);?$/,"").split(","),t.length<3)return this._error();if(4===t.length&&(this.a(parseFloat(t.pop())),this.error))return this;for(var l=t.length-1;l>=0;l--)if(t[l]=parseInt(t[l],10),isNaN(t[l]))return this._error();return e.match(/^rgb/)?this.fromRgb({r:t[0],g:t[1],b:t[2]}):e.match(/^hsv/)?this.fromHsv({h:t[0],s:t[1],v:t[2]}):this.fromHsl({h:t[0],s:t[1],l:t[2]})}return this.fromHex(e)},fromRgb:function(e,i){return"object"!=typeof e||e.r===t||e.g===t||e.b===t?this._error():(this.error=!1,this.fromInt(parseInt((e.r<<16)+(e.g<<8)+e.b,10),i))},fromHex:function(e){return e=e.replace(/^#/,"").replace(/^0x/,""),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),this.error=!/^[0-9A-F]{6}$/i.test(e),this.fromInt(parseInt(e,16))},fromHsl:function(e){var i,l,s,o,n,r,a,d;return"object"!=typeof e||e.h===t||e.s===t||e.l===t?this._error():(this._hsl=e,this._hSpace="hsl",r=e.h/360,a=e.s/100,d=e.l/100,0===a?i=l=s=d:(o=d<.5?d*(1+a):d+a-d*a,n=2*d-o,i=this.hue2rgb(n,o,r+1/3),l=this.hue2rgb(n,o,r),s=this.hue2rgb(n,o,r-1/3)),this.fromRgb({r:255*i,g:255*l,b:255*s},!0))},fromHsv:function(e){var i,l,s,o,n,r,a,d,u,c,h;if("object"!=typeof e||e.h===t||e.s===t||e.v===t)return this._error();switch(this._hsv=e,this._hSpace="hsv",i=e.h/360,l=e.s/100,s=e.v/100,a=Math.floor(6*i),d=6*i-a,u=s*(1-l),c=s*(1-d*l),h=s*(1-(1-d)*l),a%6){case 0:o=s,n=h,r=u;break;case 1:o=c,n=s,r=u;break;case 2:o=u,n=s,r=h;break;case 3:o=u,n=c,r=s;break;case 4:o=h,n=u,r=s;break;case 5:o=s,n=u,r=c}return this.fromRgb({r:255*o,g:255*n,b:255*r},!0)},fromInt:function(e,i){return this._color=parseInt(e,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),i===t&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},toString:function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;t>=0;t--)e="0"+e;return"#"+e},toCSS:function(e,t){switch(e=e||"hex",t=parseFloat(t||this._alpha),e){case"rgb":case"rgba":var i=this.toRgb();return t<1?"rgba( "+i.r+", "+i.g+", "+i.b+", "+t+" )":"rgb( "+i.r+", "+i.g+", "+i.b+" )";case"hsl":case"hsla":var l=this.toHsl();return t<1?"hsla( "+l.h+", "+l.s+"%, "+l.l+"%, "+t+" )":"hsl( "+l.h+", "+l.s+"%, "+l.l+"% )";default:return this.toString()}},toRgb:function(){return{r:255&this._color>>16,g:255&this._color>>8,b:255&this._color}},toHsl:function(){var e,t,i=this.toRgb(),l=i.r/255,s=i.g/255,o=i.b/255,n=Math.max(l,s,o),r=Math.min(l,s,o),a=(n+r)/2;if(n===r)e=t=0;else{var d=n-r;switch(t=a>.5?d/(2-n-r):d/(n+r),n){case l:e=(s-o)/d+(s<o?6:0);break;case s:e=(o-l)/d+2;break;case o:e=(l-s)/d+4}e/=6}return e=Math.round(360*e),0===e&&this._hsl.h!==e&&(e=this._hsl.h),t=Math.round(100*t),0===t&&this._hsl.s&&(t=this._hsl.s),{h:e,s:t,l:Math.round(100*a)}},toHsv:function(){var e,t,i=this.toRgb(),l=i.r/255,s=i.g/255,o=i.b/255,n=Math.max(l,s,o),r=Math.min(l,s,o),a=n,d=n-r;if(t=0===n?0:d/n,n===r)e=t=0;else{switch(n){case l:e=(s-o)/d+(s<o?6:0);break;case s:e=(o-l)/d+2;break;case o:e=(l-s)/d+4}e/=6}return e=Math.round(360*e),0===e&&this._hsv.h!==e&&(e=this._hsv.h),t=Math.round(100*t),0===t&&this._hsv.s&&(t=this._hsv.s),{h:e,s:t,v:Math.round(100*a)}},toInt:function(){return this._color},toIEOctoHex:function(){var e=this.toString(),t=parseInt(255*this._alpha,10).toString(16);return 1===t.length&&(t="0"+t),"#"+t+e.replace(/^#/,"")},toLuminosity:function(){var e=this.toRgb();return.2126*Math.pow(e.r/255,2.2)+.7152*Math.pow(e.g/255,2.2)+.0722*Math.pow(e.b/255,2.2)},getDistanceLuminosityFrom:function(e){if(!(e instanceof i))throw"getDistanceLuminosityFrom requires a Color object";var t=this.toLuminosity(),l=e.toLuminosity();return t>l?(t+.05)/(l+.05):(l+.05)/(t+.05)},getMaxContrastColor:function(){var e=this.toLuminosity(),t=e>=.5?"000000":"ffffff";return new i(t)},getReadableContrastingColor:function(e,l){if(!(e instanceof i))return this;var s=l===t?5:l,o=e.getDistanceLuminosityFrom(this),n=e.getMaxContrastColor(),r=n.getDistanceLuminosityFrom(e);if(r<=s)return n;if(o>=s)return this;for(var a=0===n.toInt()?-1:1;o<s&&(this.l(a,!0),o=this.getDistanceLuminosityFrom(e),0!==this._color&&16777215!==this._color););return this},a:function(e){if(e===t)return this._alpha;var i=parseFloat(e);return isNaN(i)?this._error():(this._alpha=i,this)},darken:function(e){return e=e||5,this.l(-e,!0)},lighten:function(e){return e=e||5,this.l(e,!0)},saturate:function(e){return e=e||15,this.s(e,!0)},desaturate:function(e){return e=e||15,this.s(-e,!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(e){e=e||1;var t=180+30*e;return this.h(t,!0)},getAnalog:function(e){e=e||1;var t=30*e;return this.h(t,!0)},getTetrad:function(e){e=e||1;var t=60*e;return this.h(t,!0)},getTriad:function(e){e=e||1;var t=120*e;return this.h(t,!0)},_partial:function(e){var i=l[e];return function(l,s){var o=this._spaceFunc("to",i.space);return l===t?o[e]:(s===!0&&(l=o[e]+l),i.mod&&(l%=i.mod),i.range&&(l=l<i.range[0]?i.range[0]:l>i.range[1]?i.range[1]:l),o[e]=l,this._spaceFunc("from",i.space,o))}},_spaceFunc:function(e,t,i){var l=t||this._hSpace,s=e+l.charAt(0).toUpperCase()+l.substr(1);return this[s](i)}};var l={h:{mod:360},s:{range:[0,100]},l:{space:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var s in l)l.hasOwnProperty(s)&&(i.fn[s]=i.fn._partial(s));"object"==typeof exports?module.exports=i:e.Color=i}(this),function(e){FLLightbox=function(e){this._init(e)},FLLightbox.closeParent=function(t){var i=e(t).closest(".fl-lightbox-wrap").attr("data-instance-id");_.isUndefined(i)||FLLightbox._instances[i].close()},FLLightbox.getResizableControlClass=function(){var t=e(".fl-lightbox-resizable").eq(0),i="fa fa-window-maximize";return t.length&&t.hasClass("fl-lightbox-width-full")&&(i="fa fa-window-minimize"),i},FLLightbox.unbindAll=function(){var e;for(e in FLLightbox._instances)FLLightbox._instances[e]._unbind()},FLLightbox.bindAll=function(){var e;for(e in FLLightbox._instances)FLLightbox._instances[e]._bind()},FLLightbox.closeAll=function(){var e;for(e in FLLightbox._instances)FLLightbox._instances[e].close()},FLLightbox._instances={},FLLightbox.prototype={_id:null,_node:null,_visible:!1,_allowClosing:!0,_resizeTimer:null,_defaults:{className:"",destroyOnClose:!1,resizable:!1},open:function(e){this._bind(),this._node.show(),this._visible=!0,"undefined"!=typeof e?this.setContent(e):this._resize(),this.trigger("open"),FLBuilder.triggerHook("didShowLightbox",this)},close:function(){var e=this._node.data("parent");this._allowClosing&&(this.trigger("beforeCloseLightbox"),this._unbind(),this._node.hide(),this._visible=!1,this.trigger("close"),FLBuilder.triggerHook("didHideLightbox"),this._defaults.resizable&&_.isUndefined(e)&&FLBuilder.triggerHook("didHideAllLightboxes"),this._defaults.destroyOnClose&&this.destroy())},disableClose:function(){this._allowClosing=!1},enableClose:function(){this._allowClosing=!0},setContent:function(e){this._node.find(".fl-lightbox-content").html(e),this._resize()},empty:function(){this._node.find(".fl-lightbox-content").empty()},on:function(e,t){this._node.on(e,t)},off:function(e,t){this._node.off(e,t)},trigger:function(e,t){this._node.trigger(e,t)},destroy:function(){this._node.empty(),this._node.remove(),FLLightbox._instances[this._id]="undefined";try{delete FLLightbox._instances[this._id]}catch(e){}},_init:function(t){var i=0,l=null;for(l in FLLightbox._instances)i++;this._defaults=e.extend({},this._defaults,t),this._id=(new Date).getTime()+i,FLLightbox._instances[this._id]=this,this._render(),this._resizable()},_render:function(){this._node=e('<div class="fl-lightbox-wrap" data-instance-id="'+this._id+'"><div class="fl-lightbox-mask"></div><div class="fl-lightbox"><div class="fl-lightbox-content-wrap"><div class="fl-lightbox-content"></div></div></div></div>'),this._node.addClass(this._defaults.className),e("body").append(this._node)},_bind:function(){e(window).on("resize.fl-lightbox-"+this._id,this._delayedResize.bind(this))},_unbind:function(){e(window).off("resize.fl-lightbox-"+this._id)},_resizable:function(){var t=(e("body"),this._node.find(".fl-lightbox-mask")),i=this._node.find(".fl-lightbox"),l=e(".fl-lightbox-resizable").eq(0);this._defaults.resizable?(t.hide(),i.addClass("fl-lightbox-resizable"),i.delegate(".fl-lightbox-resize-toggle","click",this._resizeClicked.bind(this)),i.draggable({cursor:"move",handle:".fl-lightbox-header"}).resizable({handles:"all",minHeight:500,minWidth:380,start:this._resizeStart.bind(this),stop:this._resizeStop.bind(this)}),l.length&&l.hasClass("fl-lightbox-width-full")?(i.addClass("fl-lightbox-width-full"),i.draggable("disable")):this._restorePosition()):t.show(),this._resize()},_delayedResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._resize.bind(this),250)},_resize:function(){var t=this._node.find(".fl-lightbox"),i=parseInt(this._node.css("padding-top")),l=parseInt(this._node.css("padding-bottom")),s=parseInt(this._node.css("padding-left")),o=parseInt(this._node.css("padding-right")),n=t.height(),r=t.width(),a=e(window),d=a.height()-i-l,u=(a.width()-s-o,"0px");this._defaults.resizable?(r<600?t.addClass("fl-lightbox-width-slim"):t.removeClass("fl-lightbox-width-slim"),this._resizeEditors()):(d>n&&(u=(d-n-46)/2+"px"),t.attr("style","").css("margin",u+" auto 0")),this.trigger("resized")},_resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),e(".fl-builder-lightbox:visible").append('<div class="fl-builder-resizable-iframe-fix"></div>'),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},_resizeStop:function(t,i){var l=e(".fl-lightbox-resizable:visible");parseInt(l.css("top"))<0&&l.css("top","0"),this._savePosition(),e("body").removeClass("fl-builder-resizable-is-resizing"),e(".fl-builder-resizable-iframe-fix").remove(),FLBuilder._bindOverlayEvents()},_resizeClicked:function(){var t=e(".fl-lightbox-resizable"),i=(t.find(".fl-lightbox-resize-toggle"),this._node.find(".fl-lightbox"));i.hasClass("fl-lightbox-width-full")?this._resizeExitFull():this._resizeEnterFull(),this._resize()},_resizeEnterFull:function(){var t=e(".fl-lightbox-resizable"),i=t.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");i.removeClass("fa-window-maximize").addClass("fa-window-minimize"),t.addClass("fl-lightbox-width-full"),t.draggable("disable"),t.resizable("disable")},_resizeExitFull:function(){var t=e(".fl-lightbox-resizable"),i=t.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");i.removeClass("fa-window-minimize").addClass("fa-window-maximize"),t.removeClass("fl-lightbox-width-full"),t.draggable("enable"),t.resizable("enable")},_resizeEditors:function(){e(".fl-lightbox-resizable").each(function(){var t=e(this),i=t.find(".fl-builder-settings-fields").height(),l=t.find(".mce-edit-area > iframe, textarea.wp-editor-area, .ace_editor"),s=null;i<350&&(i=350),l.each(function(){s=e(this),s.hasClass("ace_editor")?(s.height(i-60),s.closest(".fl-field").data("editor").resize()):s.closest(".mce-container-body").find(".mce-toolbar-grp .mce-toolbar.mce-last").is(":visible")?s.height(i-175):s.height(i-150)})})},_savePosition:function(){var e=this._node.find(".fl-lightbox"),t={width:e.width(),height:e.height(),top:parseInt(e.css("top"))<0?"0px":e.css("top"),left:e.css("left")};e.closest(".fl-builder-ui-pinned").length||(FLBuilderConfig.userSettings.lightbox=t,FLBuilder.ajax({action:"save_lightbox_position",data:t}))},_restorePosition:function(){var e=this._node.find(".fl-lightbox"),t=FLBuilderConfig.userSettings.lightbox;t?e.css(t):e.css({top:25,left:FLBuilderConfig.isRtl?"-25":25})}}}(jQuery),function(e){FLIconSelector={_content:null,_lightbox:null,_rendered:!1,_filterText:"",open:function(e){FLIconSelector._rendered||FLIconSelector._render(),null===FLIconSelector._content?(FLIconSelector._lightbox.open('<div class="fl-builder-lightbox-loading"></div>'),FLBuilder.ajax({
2
  action:"render_icon_selector"},FLIconSelector._getContentComplete)):FLIconSelector._lightbox.open(),FLIconSelector._lightbox.on("icon-selected",function(t,i){FLIconSelector._lightbox.off("icon-selected"),FLIconSelector._lightbox.close(),e(i)})},_render:function(){FLIconSelector._lightbox=new FLLightbox({className:"fl-icon-selector"}),FLIconSelector._rendered=!0},_getContentComplete:function(t){var i=JSON.parse(t);FLIconSelector._content=i.html,FLIconSelector._lightbox.setContent(i.html),e(".fl-icons-filter-select").on("change",FLIconSelector._filter),e(".fl-icons-filter-text").on("keyup",FLIconSelector._filter),e(".fl-icons-list i").on("click",FLIconSelector._select),e(".fl-icon-selector-cancel").on("click",e.proxy(FLIconSelector._lightbox.close,FLIconSelector._lightbox))},_filter:function(){var t=e(".fl-icons-filter-select").val(),i=e(".fl-icons-filter-text").val();"all"==t?e(".fl-icons-section").show():(e(".fl-icons-section").hide(),e(".fl-"+t).show()),FLIconSelector._filterText=i,""!==i?e(".fl-icons-list i").each(FLIconSelector._filterIcon):e(".fl-icons-list i").show()},_filterIcon:function(){var t=e(this);-1==t.attr("class").indexOf(FLIconSelector._filterText)?t.hide():t.show()},_select:function(){var t=e(this).attr("class");FLIconSelector._lightbox.trigger("icon-selected",t)}}}(jQuery),function(e){FLStyleSheet=function(t){"object"==typeof t&&e.extend(this,t),this._createSheet()},FLStyleSheet.prototype={id:null,_sheet:null,_sheetElement:null,updateRule:function(e,t,i){for(var l=this._sheet.cssRules?this._sheet.cssRules:this._sheet.rules,s=null,o=0;o<l.length;o++)l[o].selectorText.toLowerCase()==e.toLowerCase()&&(s=l[o]);if(s)if("object"==typeof t)for(o in t)s.style[this._toCamelCase(o)]=t[o];else s.style[this._toCamelCase(t)]=i;else this.addRule(e,t,i)},addRule:function(e,t,i){var l="",s="";if("object"==typeof t)for(s in t)l+=s+":"+t[s]+";";else l=t+":"+i+";";this._sheet.insertRule?this._sheet.insertRule(e+" { "+l+" }",this._sheet.cssRules.length):this._sheet.addRule(e,l)},destroy:function(){this._sheetElement&&(this._sheetElement.remove(),this._sheetElement=null),this._sheet&&(this._sheet=null)},disable:function(){this._sheet.disabled=!0},enable:function(){this._sheet.disabled=!1},_createSheet:function(){var t=this.id?' id="'+this.id+'"':"",i=this.className?' class="'+this.className+'"':"";this._sheet||(this._sheetElement=e('<style type="text/css"'+t+i+"></style>"),e("body").append(this._sheetElement),this._sheet=this._sheetElement[0].sheet)},_toCamelCase:function(e){return e.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}}(jQuery),function(e){FLBuilder={preview:null,_actionsLightbox:null,_addModuleAfterNodeRender:null,_colResizeData:null,_colResizing:!1,_contentClass:!1,_dragEnabled:!1,_dragging:!1,_dragInitialScrollTop:0,_exitUrl:null,_layout:null,_layoutSettingsCSSCache:null,_layoutSettingsCSSTimeout:null,_lightbox:null,_lightboxScrollbarTimeout:null,_loadedModuleAssets:[],_moduleHelpers:{},_multiplePhotoSelector:null,_newColParent:null,_newColPosition:0,_newColGroupParent:null,_newColGroupPosition:0,_newModuleParent:null,_newModulePosition:0,_newRowPosition:0,_selectedTemplateId:null,_selectedTemplateType:null,_singlePhotoSelector:null,_singleVideoSelector:null,_multipleAudiosSelector:null,_init:function(){FLBuilder._initJQueryReadyFix(),FLBuilder._initGlobalErrorHandling(),FLBuilder._initPostLock(),FLBuilder._initClassNames(),FLBuilder._initMediaUploader(),FLBuilder._initOverflowFix(),FLBuilder._initScrollbars(),FLBuilder._initLightboxes(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._initStrings(),FLBuilder._initTipTips(),FLBuilder._initTinyMCE(),FLBuilder._bindEvents(),FLBuilder._bindOverlayEvents(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder.addHook("didInitUI",FLBuilder._showTourOrTemplates.bind(FLBuilder)),FLBuilder.triggerHook("init")},_initJQueryReadyFix:function(){FLBuilderConfig.debug||(jQuery.fn.oldReady=jQuery.fn.ready,jQuery.fn.ready=function(t){return jQuery.fn.oldReady(function(){try{"function"==typeof t&&t(e)}catch(i){FLBuilder.logError(i)}})})},_initGlobalErrorHandling:function(){FLBuilderConfig.debug||(window.onerror=function(e,t,i,l,s){return FLBuilder.logGlobalError(e,t,i,l,s),!0})},_initPostLock:function(){"undefined"!=typeof wp.heartbeat&&(wp.heartbeat.interval(30),wp.heartbeat.enqueue("fl_builder_post_lock",{post_id:FLBuilderConfig.postId}))},_initClassNames:function(){e("html").addClass("fl-builder-edit"),e("body").addClass("fl-builder"),FLBuilderConfig.simpleUi&&e("body").addClass("fl-builder-simple"),FLBuilder._contentClass=".fl-builder-content-"+FLBuilderConfig.postId,e(FLBuilder._contentClass).addClass("fl-builder-content-editing")},_initMediaUploader:function(){wp.media.model.settings.post.id=FLBuilderConfig.postId},_initOverflowFix:function(){e(FLBuilder._contentClass).parents().css("overflow","visible")},_initScrollbars:function(){e(".fl-nanoscroller").nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},_initSortables:function(){var t={appendTo:"body",cursor:"move",cursorAt:{left:85,top:20},distance:1,helper:FLBuilder._blockDragHelper,start:FLBuilder._blockDragStart,sort:FLBuilder._blockDragSort,change:FLBuilder._blockDragChange,stop:FLBuilder._blockDragStop,placeholder:"fl-builder-drop-zone",tolerance:"intersect"},i="",l="";l="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-col-content":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-node-global) .fl-col-content",i=FLBuilderConfig.nestedColumns?l:"row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target",e(".fl-builder-rows").sortable(e.extend({},t,{connectWith:i,items:".fl-builder-block-row",stop:FLBuilder._rowDragStop})),e(".fl-builder-row-templates").sortable(e.extend({},t,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-row-template",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-saved-rows").sortable(e.extend({},t,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-saved-row",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-modules, .fl-builder-widgets").sortable(e.extend({},t,{connectWith:l,items:".fl-builder-block-module",stop:FLBuilder._moduleDragStop})),e(".fl-builder-module-templates").sortable(e.extend({},t,{connectWith:l,items:".fl-builder-block-module-template",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-saved-modules").sortable(e.extend({},t,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:l,items:".fl-builder-block-saved-module",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-row-sortable-proxy").sortable(e.extend({},t,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",helper:FLBuilder._rowDragHelper,start:FLBuilder._rowDragStart,stop:FLBuilder._rowDragStop})),e(".fl-col-sortable-proxy").sortable(e.extend({},t,{connectWith:l,helper:FLBuilder._colDragHelper,start:FLBuilder._colDragStart,stop:FLBuilder._colDragStop})),e(FLBuilder._contentClass+" .fl-col-content").sortable(e.extend({},t,{connectWith:l,handle:".fl-module-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._moduleDragHelper,items:".fl-module, .fl-col-group",start:FLBuilder._moduleDragStart,stop:FLBuilder._moduleDragStop})),e(FLBuilder._contentClass+" .fl-row-drop-target").sortable(t),e(FLBuilder._contentClass+" .fl-col-group-drop-target").sortable(t),e(FLBuilder._contentClass+" .fl-col-drop-target").sortable(t)},_initStrings:function(){e.validator.messages.required=FLBuilderStrings.validateRequiredMessage},_bindEvents:function(){$excludedLinks=e(".fl-builder-bar a, .fl-builder--content-library-panel a, .fl-page-nav .nav a"),e("a").not($excludedLinks).on("click",FLBuilder._preventDefault),e(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),e("body").delegate("button.fl-builder-button","mouseup",this._buttonMouseUp.bind(this)),e(document).on("heartbeat-tick",FLBuilder._initPostLock),e(window).on("beforeunload",FLBuilder._warnBeforeUnload),e("body").delegate(".fl-builder-has-submenu","click",FLBuilder._submenuParentClicked),e("body").delegate(".fl-builder-has-submenu a","click",FLBuilder._submenuChildClicked),e("body").delegate(".fl-builder-submenu","mouseenter",FLBuilder._submenuMouseenter),e("body").delegate(".fl-builder-submenu","mouseleave",FLBuilder._submenuMouseleave),e("body").delegate(".fl-builder-submenu .fl-builder-has-submenu","mouseenter",FLBuilder._submenuNestedParentMouseenter),e(".fl-builder-panel-actions .fl-builder-panel-close").on("click",FLBuilder._closePanel),e(".fl-builder-blocks-section-title").on("click",FLBuilder._blockSectionTitleClicked),e("body").delegate(".fl-builder-node-template-actions","mousedown",FLBuilder._stopPropagation),e("body").delegate(".fl-builder-node-template-edit","mousedown",FLBuilder._stopPropagation),e("body").delegate(".fl-builder-node-template-delete","mousedown",FLBuilder._stopPropagation),e("body").delegate(".fl-builder-node-template-edit","click",FLBuilder._editNodeTemplateClicked),e("body").delegate(".fl-builder-node-template-delete","click",FLBuilder._deleteNodeTemplateClicked),e("body").delegate(".fl-builder-block","mousedown",FLBuilder._blockDragInit),e("body").on("mouseup",FLBuilder._blockDragCancel),e("body").delegate(".fl-builder-actions .fl-builder-cancel-button","click",FLBuilder._cancelButtonClicked),e("body").delegate(".fl-builder-save-user-template-button","click",FLBuilder._saveUserTemplateClicked),e("body").delegate(".fl-builder-duplicate-layout-button","click",FLBuilder._duplicateLayoutClicked),e("body").delegate(".fl-builder-layout-settings-button","click",FLBuilder._layoutSettingsClicked),e("body").delegate(".fl-builder-layout-settings .fl-builder-settings-save","click",FLBuilder._saveLayoutSettingsClicked),e("body").delegate(".fl-builder-layout-settings .fl-builder-settings-cancel","click",FLBuilder._cancelLayoutSettingsClicked),e("body").delegate(".fl-builder-global-settings-button","click",FLBuilder._globalSettingsClicked),e("body").delegate(".fl-builder-global-settings .fl-builder-settings-save","click",FLBuilder._saveGlobalSettingsClicked),e("body").delegate(".fl-builder-global-settings .fl-builder-settings-cancel","click",FLBuilder._cancelLayoutSettingsClicked),e("body").delegate(".fl-user-template","click",FLBuilder._userTemplateClicked),e("body").delegate(".fl-user-template-edit","click",FLBuilder._editUserTemplateClicked),e("body").delegate(".fl-user-template-delete","click",FLBuilder._deleteUserTemplateClicked),e("body").delegate(".fl-builder-template-replace-button","click",FLBuilder._templateReplaceClicked),e("body").delegate(".fl-builder-template-append-button","click",FLBuilder._templateAppendClicked),e("body").delegate(".fl-builder-template-actions .fl-builder-cancel-button","click",FLBuilder._templateCancelClicked),e("body").delegate(".fl-builder-user-template-settings .fl-builder-settings-save","click",FLBuilder._saveUserTemplateSettings),e("body").delegate(".fl-builder-help-tour-button","click",FLBuilder._startHelpTour),e("body").delegate(".fl-builder-knowledge-base-button","click",FLBuilder._viewKnowledgeBaseClicked),e("body").delegate(".fl-builder-forums-button","click",FLBuilder._visitForumsClicked),e("body").delegate(".fl-builder-no-tour-button","click",FLBuilder._noTourButtonClicked),e("body").delegate(".fl-builder-yes-tour-button","click",FLBuilder._yesTourButtonClicked),e("body").delegate(".fl-builder-alert-close","click",FLBuilder._alertClose),e("body").delegate(".fl-block-overlay","contextmenu",FLBuilder._removeAllOverlays),e("body").delegate(".fl-row-overlay .fl-block-remove","click",FLBuilder._deleteRowClicked),e("body").delegate(".fl-row-overlay .fl-block-copy","click",FLBuilder._rowCopyClicked),e("body").delegate(".fl-row-overlay .fl-block-move","mousedown",FLBuilder._rowDragInit),e("body").delegate(".fl-row-overlay .fl-block-settings","click",FLBuilder._rowSettingsClicked),e("body").delegate(".fl-row-overlay","click",FLBuilder._rowSettingsClicked),e("body").delegate(".fl-builder-row-settings .fl-builder-settings-save","click",FLBuilder._saveSettings),e("body").delegate(".fl-block-col-submenu .fl-block-row-reset","click",FLBuilder._resetRowWidthClicked),e("body").delegate(".fl-col-overlay .fl-block-move","mousedown",FLBuilder._colDragInit),e("body").delegate(".fl-block-col-copy","click",FLBuilder._copyColClicked),e("body").delegate(".fl-col-overlay .fl-block-remove","click",FLBuilder._deleteColClicked),e("body").delegate(".fl-col-overlay","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-builder-col-settings .fl-builder-settings-save","click",FLBuilder._saveSettings),e("body").delegate(".fl-block-col-submenu .fl-block-col-move","mousedown",FLBuilder._colDragInit),e("body").delegate(".fl-block-col-submenu .fl-block-col-edit","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-delete","click",FLBuilder._deleteColClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-reset","click",FLBuilder._resetColumnWidthsClicked),e("body").delegate(".fl-block-col-submenu li","mouseenter",FLBuilder._showColHighlightGuide),e("body").delegate(".fl-block-col-submenu li","mouseleave",FLBuilder._removeColHighlightGuides),e("body").delegate(".fl-block-col-submenu .fl-block-col-move-parent","mousedown",FLBuilder._colDragInit),e("body").delegate(".fl-block-col-submenu .fl-block-col-edit-parent","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-module-overlay .fl-block-remove","click",FLBuilder._deleteModuleClicked),e("body").delegate(".fl-module-overlay .fl-block-copy","click",FLBuilder._moduleCopyClicked),e("body").delegate(".fl-module-overlay .fl-block-move","mousedown",FLBuilder._blockDragInit),e("body").delegate(".fl-module-overlay .fl-block-settings","click",FLBuilder._moduleSettingsClicked),e("body").delegate(".fl-module-overlay","click",FLBuilder._moduleSettingsClicked),e("body").delegate(".fl-builder-module-settings .fl-builder-settings-save","click",FLBuilder._saveModuleClicked),e("body").delegate(".fl-builder-settings-save-as","click",FLBuilder._showNodeTemplateSettings),e("body").delegate(".fl-builder-node-template-settings .fl-builder-settings-save","click",FLBuilder._saveNodeTemplate),e("body").delegate(".fl-builder-settings-tabs a","click",FLBuilder._settingsTabClicked),e("body").delegate(".fl-builder-settings-tabs a","show",FLBuilder._calculateSettingsTabsOverflow),e("body").delegate(".fl-builder-settings-tabs a","hide",FLBuilder._calculateSettingsTabsOverflow),e("body").delegate(".fl-builder-settings-cancel","click",FLBuilder._settingsCancelClicked),e("body").delegate(".fl-builder-settings-tabs-overflow-menu > a","click",FLBuilder._settingsTabsToOverflowMenuItemClicked.bind(this)),e("body").delegate(".fl-builder-settings-tabs-more","click",FLBuilder._toggleTabsOverflowMenu.bind(this)),e("body").delegate(".fl-builder-settings-tabs-overflow-click-mask","click",FLBuilder._hideTabsOverflowMenu.bind(this)),e("body").delegate(".fl-help-tooltip-icon","mouseover",FLBuilder._showHelpTooltip),e("body").delegate(".fl-help-tooltip-icon","mouseout",FLBuilder._hideHelpTooltip),e("body").delegate(".fl-builder-field-add","click",FLBuilder._addFieldClicked),e("body").delegate(".fl-builder-field-copy","click",FLBuilder._copyFieldClicked),e("body").delegate(".fl-builder-field-delete","click",FLBuilder._deleteFieldClicked),e("body").delegate(".fl-builder-settings-fields select","change",FLBuilder._settingsSelectChanged),e("body").delegate(".fl-photo-field .fl-photo-select","click",FLBuilder._selectSinglePhoto),e("body").delegate(".fl-photo-field .fl-photo-edit","click",FLBuilder._selectSinglePhoto),e("body").delegate(".fl-photo-field .fl-photo-replace","click",FLBuilder._selectSinglePhoto),e("body").delegate(".fl-photo-field .fl-photo-remove","click",FLBuilder._singlePhotoRemoved),e("body").delegate(".fl-multiple-photos-field .fl-multiple-photos-select","click",FLBuilder._selectMultiplePhotos),e("body").delegate(".fl-multiple-photos-field .fl-multiple-photos-edit","click",FLBuilder._selectMultiplePhotos),e("body").delegate(".fl-multiple-photos-field .fl-multiple-photos-add","click",FLBuilder._selectMultiplePhotos),e("body").delegate(".fl-video-field .fl-video-select","click",FLBuilder._selectSingleVideo),e("body").delegate(".fl-video-field .fl-video-replace","click",FLBuilder._selectSingleVideo),e("body").delegate(".fl-multiple-audios-field .fl-multiple-audios-select","click",FLBuilder._selectMultipleAudios),e("body").delegate(".fl-multiple-audios-field .fl-multiple-audios-edit","click",FLBuilder._selectMultipleAudios),e("body").delegate(".fl-multiple-audios-field .fl-multiple-audios-add","click",FLBuilder._selectMultipleAudios),e("body").delegate(".fl-icon-field .fl-icon-select","click",FLBuilder._selectIcon),e("body").delegate(".fl-icon-field .fl-icon-replace","click",FLBuilder._selectIcon),e("body").delegate(".fl-icon-field .fl-icon-remove","click",FLBuilder._removeIcon),e("body").delegate(".fl-form-field .fl-form-field-edit","click",FLBuilder._formFieldClicked),e("body").delegate(".fl-form-field-settings .fl-builder-settings-save","click",FLBuilder._saveFormFieldClicked),e("body").delegate(".fl-layout-field-option","click",FLBuilder._layoutFieldClicked),e("body").delegate(".fl-link-field-select","click",FLBuilder._linkFieldSelectClicked),e("body").delegate(".fl-link-field-search-cancel","click",FLBuilder._linkFieldSelectCancelClicked),e("body").delegate(".fl-loop-data-source-select select[name=data_source]","change",FLBuilder._loopDataSourceChange),e("body").delegate(".fl-custom-query select[name=post_type]","change",FLBuilder._customQueryPostTypeChange),e("body").delegate(".fl-field input[type=number]","focus",FLBuilder._onNumberFieldFocus),e("body").delegate(".fl-field input[type=number]","blur",FLBuilder._onNumberFieldBlur),FLBuilder.addHook("didCompleteAJAX",FLBuilder._refreshSettingsPreviewReference),FLBuilder.addHook("didRenderLayoutComplete",FLBuilder._refreshSettingsPreviewReference)},_unbindEvents:function(){e("a").off("click",FLBuilder._preventDefault),e(".fl-page-nav .nav a").off("click",FLBuilder._headerLinkClicked)},_bindOverlayEvents:function(){var t=e(FLBuilder._contentClass);t.delegate(".fl-row","mouseenter",FLBuilder._rowMouseenter),t.delegate(".fl-row","mouseleave",FLBuilder._rowMouseleave),t.delegate(".fl-row-overlay","mouseleave",FLBuilder._rowMouseleave),t.delegate(".fl-col","mouseenter",FLBuilder._colMouseenter),t.delegate(".fl-col","mouseleave",FLBuilder._colMouseleave),t.delegate(".fl-module","mouseenter",FLBuilder._moduleMouseenter),t.delegate(".fl-module","mouseleave",FLBuilder._moduleMouseleave)},_destroyOverlayEvents:function(){var t=e(FLBuilder._contentClass);t.undelegate(".fl-row","mouseenter",FLBuilder._rowMouseenter),t.undelegate(".fl-row","mouseleave",FLBuilder._rowMouseleave),t.undelegate(".fl-row-overlay","mouseleave",FLBuilder._rowMouseleave),t.undelegate(".fl-col","mouseenter",FLBuilder._colMouseenter),t.undelegate(".fl-col","mouseleave",FLBuilder._colMouseleave),t.undelegate(".fl-module","mouseenter",FLBuilder._moduleMouseenter),t.undelegate(".fl-module","mouseleave",FLBuilder._moduleMouseleave)},_preventDefault:function(e){e.preventDefault()},_stopPropagation:function(e){e.stopPropagation()},_headerLinkClicked:function(t){var i=e(this),l=i.attr("href");this.hash||(t.preventDefault(),FLBuilderConfig.isUserTemplate||(FLBuilder._exitUrl=l.indexOf("?")>-1?l:l+"?fl_builder",FLBuilder.triggerHook("triggerDone")))},_warnBeforeUnload:function(){var t=e(".fl-builder-row-settings").length>0,i=e(".fl-builder-col-settings").length>0,l=e(".fl-builder-module-settings").length>0;if(t||i||l)return FLBuilderStrings.unloadWarning},_initTipTips:function(){e(".fl-tip:not(.fl-has-tip)").each(function(){var t=e(this);t.addClass("fl-has-tip"),void 0==t.attr("data-title")&&t.attr("data-title",t.attr("title"))}).tipTip({defaultPosition:"top",delay:1e3})},_hideTipTips:function(){e("#tiptip_holder").stop().hide()},_submenuParentClicked:function(t){var i=e("body"),l=e(this),s=l.find(".fl-builder-submenu");l.hasClass("fl-builder-submenu-open")?(i.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-right")):(l.offset().left+s.width()>e(window).width()&&l.addClass("fl-builder-submenu-right"),i.addClass("fl-builder-submenu-open"),l.addClass("fl-builder-submenu-open")),s.closest(".fl-row-overlay").addClass("fl-row-menu-active"),FLBuilder._hideTipTips(),t.preventDefault(),t.stopPropagation()},_submenuChildClicked:function(t){var i=e("body"),l=e(this).parents(".fl-builder-has-submenu");l.parents(".fl-builder-has-submenu").length||(i.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-open"))},_submenuMouseenter:function(t){var i=e(this),l=i.data("timeout");"undefined"!=typeof l&&clearTimeout(l)},_submenuMouseleave:function(t){var i=e("body"),l=e(this),s=setTimeout(function(){i.removeClass("fl-builder-submenu-open"),l.closest(".fl-builder-has-submenu").removeClass("fl-builder-submenu-open")},500);l.closest(".fl-row-overlay").removeClass("fl-row-menu-active"),l.data("timeout",s)},_submenuNestedParentMouseenter:function(t){var i=e(this),l=i.find(".fl-builder-submenu");i.width()+i.offset().left+l.width()>e(window).width()&&i.addClass("fl-builder-submenu-right")},_closeAllSubmenus:function(){e(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},_upgradeClicked:function(){window.open(FLBuilderConfig.upgradeUrl)},_buttonMouseUp:function(t){e(t.currentTarget).blur()},_closePanel:function(){FLBuilder.triggerHook("hideContentPanel")},_showPanel:function(){FLBuilder.triggerHook("showContentPanel")},_togglePanel:function(){FLBuilder.triggerHook("toggleContentPanel")},_blockSectionTitleClicked:function(){var t=e(this),i=t.parent();i.hasClass("fl-active")?i.removeClass("fl-active"):(e(".fl-builder-blocks-section").removeClass("fl-active"),i.addClass("fl-active")),FLBuilder._initScrollbars()},_publishLayout:function(e){if(FLBuilder._triggerSettingsSave(!1,!0)){if(_.isUndefined(e))var e=!0;FLBuilder.ajax({action:"save_layout"},this._onPublishComplete.bind(this,e))}},_publishButtonClicked:function(e){FLBuilder._publishLayout(e)},_onPublishComplete:function(t){t&&(FLBuilderConfig.shouldRefreshOnPublish?FLBuilder._exit():FLBuilder._exitWithoutRefresh()),e("#wp-admin-bar-fl-builder-frontend-edit-link .fl-builder-admin-bar-status-dot").css("color","#6bc373"),FLBuilder.triggerHook("didPublishLayout")},_draftButtonClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_draft"},FLBuilder._exit)},_discardButtonClicked:function(){var e=confirm(FLBuilderStrings.discardMessage);e?(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"clear_draft_layout"},FLBuilder._exit)):FLBuilder.triggerHook("didCancelDiscard")},_cancelButtonClicked:function(){FLBuilder._exitUrl=null,FLBuilder._actionsLightbox.close()},_exit:function(){var e=window.location.href;FLBuilderConfig.isUserTemplate&&"undefined"!=typeof window.opener&&window.opener?("undefined"!=typeof window.opener.FLBuilder&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):(FLBuilder._exitUrl?e=FLBuilder._exitUrl:(e=e.replace("?fl_builder&","?"),e=e.replace("?fl_builder",""),e=e.replace("&fl_builder","")),window.location.href=e)},_exitWithoutRefresh:function(){window.location.href;FLBuilderConfig.isUserTemplate&&"undefined"!=typeof window.opener&&window.opener?("undefined"!=typeof window.opener.FLBuilder&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):FLBuilder.triggerHook("endEditingSession")},_duplicateLayoutClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"duplicate_post"},FLBuilder._duplicateLayoutComplete)},_duplicateLayoutComplete:function(e){var t=FLBuilderConfig.adminUrl;window.location.href=t+"post.php?post="+e+"&action=edit"},_layoutSettingsClicked:function(){FLBuilderSettingsForms.render({id:"layout",className:"fl-builder-layout-settings",settings:FLBuilderSettingsConfig.settings.layout},function(){FLBuilder._layoutSettingsInitCSS()})},_layoutSettingsInitCSS:function(){var t=e(".fl-builder-settings #fl-field-css textarea:not(.ace_text-input)");t.on("change",FLBuilder._layoutSettingsCSSChanged),FLBuilder._layoutSettingsCSSCache=t.val()},_layoutSettingsCSSChanged:function(){FLBuilder._layoutSettingsCSSTimeout&&clearTimeout(FLBuilder._layoutSettingsCSSTimeout),FLBuilder._layoutSettingsCSSTimeout=setTimeout(e.proxy(FLBuilder._layoutSettingsCSSDoChange,this),600)},_layoutSettingsCSSDoChange:function(){var t=e(".fl-builder-settings"),i=e(this),l=i.parents("#fl-field-css");l.find(".ace_error").length>0||(t.hasClass("fl-builder-layout-settings")?e("#fl-builder-layout-css").html(i.val()):e("#fl-builder-global-css").html(i.val()),FLBuilder._layoutSettingsCSSTimeout=null)},_saveLayoutSettingsClicked:function(){for(var t=e(this).closest(".fl-builder-settings"),i=t.serializeArray(),l={},s=0;s<i.length;s++)l[i[s].name]=i[s].value;FLBuilder.showAjaxLoader(),FLBuilder._lightbox.close(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_layout_settings",settings:l},function(){FLBuilder.triggerHook("didSaveLayoutSettingsComplete",l),FLBuilder._updateLayout()})},_cancelLayoutSettingsClicked:function(){var t=e(".fl-builder-settings");t.hasClass("fl-builder-layout-settings")?e("#fl-builder-layout-css").html(FLBuilder._layoutSettingsCSSCache):e("#fl-builder-global-css").html(FLBuilder._layoutSettingsCSSCache),FLBuilder._layoutSettingsCSSCache=null},_globalSettingsClicked:function(){FLBuilderSettingsForms.render({id:"global",className:"fl-builder-global-settings",settings:FLBuilderSettingsConfig.settings.global},function(){FLBuilder._layoutSettingsInitCSS()})},_saveGlobalSettingsClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=t.validate().form(),l=FLBuilder._getSettings(t);i&&(FLBuilder.showAjaxLoader(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_global_settings",settings:l},FLBuilder._saveGlobalSettingsComplete),FLBuilder._lightbox.close())},_saveGlobalSettingsComplete:function(e){FLBuilderConfig.global=JSON.parse(e),FLBuilder.triggerHook("didSaveGlobalSettingsComplete",FLBuilderConfig.global),FLBuilder._updateLayout()},_initTemplateSelector:function(){var t=e(FLBuilder._contentClass).find(".fl-row"),i=t.length>0;i||FLBuilder.ContentPanel.show("modules")},_requestTemplateInsert:function(e,t){FLBuilder.layoutHasContent()?0==e?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate(0,!1,t)):(FLBuilder._selectedTemplateId=e,FLBuilder._selectedTemplateType=t,FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(e,!1,t)},_showTemplateActions:function(){var e=[];e[10]={key:"template-replace",label:FLBuilderStrings.templateReplace},e[20]={key:"template-append",label:FLBuilderStrings.templateAppend},FLBuilder._showActionsLightbox({className:"fl-builder-template-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_templateReplaceClicked:function(){confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!1,FLBuilder._selectedTemplateType))},_templateAppendClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!0,FLBuilder._selectedTemplateType)},_templateCancelClicked:function(){FLBuilder.triggerHook("showContentPanel")},_applyTemplate:function(e,t,i){t="undefined"!=typeof t&&t?"1":"0",i="undefined"==typeof i?"core":i,FLBuilder._lightbox.close(),FLBuilder.showAjaxLoader(),"core"==i?FLBuilder.ajax({action:"apply_template",template_id:e,append:t},FLBuilder._applyTemplateComplete):FLBuilder.ajax({action:"apply_user_template",template_id:e,append:t},FLBuilder._applyUserTemplateComplete),FLBuilder.triggerHook("didApplyTemplate")},_applyTemplateComplete:function(e){var t=JSON.parse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didApplyTemplateComplete",t.config)},_applyUserTemplateComplete:function(t){var i=JSON.parse(t);null!==i.layout_css&&e("#fl-builder-layout-css").html(i.layout_css),FLBuilder._renderLayout(i.layout),FLBuilder.triggerHook("didApplyTemplateComplete",i.config)},_saveUserTemplateClicked:function(){FLBuilderSettingsForms.render({id:"user_template",className:"fl-builder-user-template-settings",rules:{name:{required:!0}}})},_saveUserTemplateSettings:function(){var t=e(this).closest(".fl-builder-settings"),i=t.validate().form(),l=FLBuilder._getSettings(t);i&&(FLBuilder.ajax({action:"save_user_template",settings:l},FLBuilder._saveUserTemplateSettingsComplete),FLBuilder._lightbox.close())},_saveUserTemplateSettingsComplete:function(e){if(e){var e=JSON.parse(e);FLBuilderConfig.contentItems.template.push(e),FLBuilder.triggerHook("contentItemsChanged")}},_userTemplateClicked:function(){var t=e(this).attr("data-id");e(FLBuilder._contentClass).children(".fl-row").length>0?"blank"==t?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate("blank",!1,"user")):(FLBuilder._selectedTemplateId=t,FLBuilder._selectedTemplateType="user",FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(t,!1,"user")},_editUserTemplateClicked:function(t){t.preventDefault(),t.stopPropagation(),window.open(e(this).attr("href"))},_deleteUserTemplateClicked:function(t){var i=e(this).closest(".fl-user-template"),l=i.attr("data-id"),s=(e(".fl-user-template[data-id="+l+"]"),null),o=null,n=null;if(confirm(FLBuilderStrings.deleteTemplate)){FLBuilder.ajax({action:"delete_user_template",template_id:l});for(o in FLBuilderConfig.contentItems.template)n=FLBuilderConfig.contentItems.template[o],n.postId==l&&(s=o);_.isNull(s)||(FLBuilderConfig.contentItems.template.splice(s,1),FLBuilder.triggerHook("contentItemsChanged"))}t.stopPropagation()},_viewKnowledgeBaseClicked:function(){window.open(FLBuilderConfig.help.knowledge_base_url)},_visitForumsClicked:function(){window.open(FLBuilderConfig.help.forums_url)},_showTourOrTemplates:function(){FLBuilderConfig.simpleUi||FLBuilderConfig.isUserTemplate||(FLBuilderConfig.help.tour&&FLBuilderConfig.newUser?FLBuilder._showTourLightbox():FLBuilder._initTemplateSelector())},_showTourLightbox:function(){var e=wp.template("fl-tour-lightbox");FLBuilder._actionsLightbox.open(e())},_noTourButtonClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._initTemplateSelector()},_yesTourButtonClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilderTour.start()},_startHelpTour:function(){FLBuilder._actionsLightbox.close(),FLBuilderTour.start()},_setupEmptyLayout:function(){var t=e(FLBuilder._contentClass);FLBuilderConfig.isUserTemplate&&"module"==FLBuilderConfig.userTemplateType||(t.removeClass("fl-builder-empty"),t.find(".fl-builder-empty-message").remove(),t.find(".fl-row, .fl-builder-block").length||(t.addClass("fl-builder-empty"),t.append('<span class="fl-builder-empty-message">'+FLBuilderStrings.emptyMessage+"</span>"),
3
- FLBuilder._initSortables()))},_updateNode:function(t,i){e(".fl-node-"+t).length&&(FLBuilder._showNodeLoading(t),FLBuilder.ajax({action:"render_node",node_id:t},function(e){FLBuilder._renderLayout(JSON.parse(e),i)}.bind(this)))},_updateLayout:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_layout"},FLBuilder._renderLayout)},_renderLayout:function(e,t){FLBuilder._layout=new FLBuilderAJAXLayout(e,t)},_renderLayoutComplete:function(){FLBuilder._layout&&(FLBuilder._layout._complete(),FLBuilder._layout=null)},_resizeLayout:function(){e(window).trigger("resize"),"undefined"!=typeof YUI&&YUI().use("node-event-simulate",function(e){e.one(window).simulate("resize")})},layoutHasContent:function(){return e(FLBuilder._contentClass).children(".fl-row").length>0},_initMediaElements:function(){var t={};"undefined"!=typeof e.fn.mediaelementplayer&&("undefined"!=typeof _wpmejsSettings&&(t.pluginPath=_wpmejsSettings.pluginPath),e(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").mediaelementplayer(t))},_initDropTargets:function(){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",i=e(FLBuilder._contentClass+" .fl-row"),l=null,s=e(FLBuilder._contentClass+" .fl-row"+t).find(".fl-col-group"),o=null,n=null,r=0;for(e(".fl-col-drop-target").remove(),e(".fl-col-group-drop-target").remove(),e(".fl-row-drop-target").remove(),e(FLBuilder._contentClass).append('<div class="fl-drop-target fl-row-drop-target"></div>'),i.prepend('<div class="fl-drop-target fl-row-drop-target"></div>'),i.append('<div class="fl-drop-target fl-drop-target-last fl-row-drop-target fl-row-drop-target-last"></div>');r<i.length;r++)l=i.eq(r),0===l.find(".fl-col-group").length&&l.find(".fl-row-content").prepend('<div class="fl-drop-target fl-col-group-drop-target"></div>');for(r=0;r<s.length;r++)o=s.eq(r),n=o.find("> .fl-col"),o.hasClass("fl-col-group-nested")||(o.append('<div class="fl-drop-target fl-col-group-drop-target"></div>'),o.append('<div class="fl-drop-target fl-drop-target-last fl-col-group-drop-target fl-col-group-drop-target-last"></div>')),n.append('<div class="fl-drop-target fl-col-drop-target"></div>'),n.append('<div class="fl-drop-target fl-drop-target-last fl-col-drop-target fl-col-drop-target-last"></div>')},_blockDragHelper:function(e,t){var i=t.clone();return t.clone().insertAfter(t),i.addClass("fl-builder-block-drag-helper"),i},_blockDragInit:function(t){var i=e(t.currentTarget),l=null,s=e(window).scrollTop(),o=0;FLBuilder._dragEnabled=!0,FLBuilder._dragInitialScrollTop=s,i.closest("[data-node]").length>0?(l=i.closest("[data-node]"),l.addClass("fl-node-drag-init")):i.hasClass("fl-builder-block")&&e(".fl-row").each(function(){null===l&&e(this).offset().top-s>0&&(l=e(this))}),null!==l&&(o=l.offset().top-s),FLBuilder._highlightRowsAndColsForDrag(i),FLBuilder._adjustColHeightsForDrag(),FLBuilder._disableGlobalRows(),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays(),FLBuilder._initSortables(),e("body").addClass("fl-builder-dragging"),e(".fl-builder-empty-message").hide(),e(".fl-sortable-disabled").removeClass("fl-sortable-disabled"),o>0&&scrollTo(0,l.offset().top-o),FLBuilder.triggerHook("didInitDrag")},_blockDragStart:function(t,i){FLBuilder._dragging=!0,e(".fl-node-drag-init").removeClass("fl-node-drag-init"),FLBuilder.triggerHook("didStartDrag")},_blockDragSort:function(t,i){var l=i.placeholder.parent(),s=FLBuilderStrings.insert;FLBuilder._blockPreventSort(i.item,l)||(l.hasClass("fl-col-content")?s=i.item.hasClass("fl-builder-block-row")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-col-sortable-proxy-item")?FLBuilderStrings.column:i.item.hasClass("fl-builder-block-module")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-builder-block-saved-module")||i.item.hasClass("fl-builder-block-module-template")?i.item.find(".fl-builder-block-title").text():i.item.attr("data-name"):l.hasClass("fl-col-drop-target")?s="":l.hasClass("fl-col-group-drop-target")?s="":l.hasClass("fl-row-drop-target")&&(s=i.item.hasClass("fl-builder-block-row")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-builder-block-saved-row")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-row-sortable-proxy-item")?FLBuilderStrings.row:FLBuilderStrings.newRow),i.placeholder.html(s),i.item.hasClass("fl-node-global")||i.item.hasClass("fl-builder-block-global")||e(".fl-node-dragging").hasClass("fl-node-global")?i.placeholder.addClass("fl-builder-drop-zone-global"):i.placeholder.removeClass("fl-builder-drop-zone-global"))},_blockDragChange:function(e,t){t.placeholder.css("opacity","0"),t.placeholder.animate({opacity:"1"},100)},_blockPreventSort:function(t,i){var l=!1,s=t.hasClass("fl-builder-block-row"),o=t.hasClass("fl-col-sortable-proxy-item"),n=i.hasClass("fl-col-content"),r=i.hasClass("fl-col-drop-target"),a=i.parents(".fl-col-group:not(.fl-col-group-nested)"),d=i.parents(".fl-col-group-nested");return(s||o)&&n&&d.length>0&&(l=!0),n&&!i.find(".fl-module, .fl-col").length&&(s&&"1-col"==t.data("cols")?l=!0:o&&(l=!0)),s&&n&&e.inArray(t.data("cols"),["5-cols","6-cols"])>-1&&(l=!0),o&&e(".fl-node-dragging").find(".fl-col-group-nested").length>0&&(n||r&&d.length>0)&&(l=!0),r&&a.length>0&&0===d.length&&a.find("> .fl-col:visible").length>11&&(l=!0),r&&d.length>0&&d.find(".fl-col:visible").length>3&&(l=!0),l&&i.addClass("fl-sortable-disabled"),l},_blockDragStop:function(t,i){var l=e(window).scrollTop(),s=i.item.parent(),o=null;s.hasClass("fl-drop-target")&&s.closest("[data-node]").length?(s=s.closest("[data-node]"),o=s.offset().top-l):o=s.offset().top-l,s.hasClass("fl-builder-blocks-section-content")&&FLBuilder._showPanel(),FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._setupEmptyLayout(),e("body").removeClass("fl-builder-dragging"),scrollTo(0,s.offset().top-o),FLBuilder.triggerHook("didStopDrag")},_blockDragCancel:function(){FLBuilder._dragEnabled&&!FLBuilder._dragging&&(FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._setupEmptyLayout(),e("body").removeClass("fl-builder-dragging"),e(".fl-node-drag-init").removeClass("fl-node-drag-init"),e(".fl-node-dragging").removeClass("fl-node-dragging"),scrollTo(0,FLBuilder._dragInitialScrollTop))},_reorderNode:function(e,t){FLBuilder.ajax({action:"reorder_node",node_id:e,position:t})},_moveNode:function(e,t,i){FLBuilder.ajax({action:"move_node",new_parent:e,node_id:t,position:i})},_removeAllOverlays:function(){FLBuilder._removeRowOverlays(),FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._removeModuleOverlays(),FLBuilder._hideTipTips(),FLBuilder._closeAllSubmenus()},_appendOverlay:function(e,t){var i=0,l=null,s=e.hasClass("fl-row"),o=s?e.find("> .fl-row-content-wrap"):e.find("> .fl-node-content"),n={top:parseInt(o.css("margin-top"),10),bottom:parseInt(o.css("margin-bottom"),10)};return e.append(t),e.addClass("fl-block-overlay-active"),FLBuilder._initTipTips(),l=e.find("> .fl-block-overlay"),n.top<0&&(i=parseInt(l.css("top"),10),i=isNaN(i)?0:i,l.css("top",n.top+i+"px")),n.bottom<0&&(i=parseInt(l.css("bottom"),10),i=isNaN(i)?0:i,l.css("bottom",n.bottom+i+"px")),l},_buildOverlayOverflowMenu:function(e){var t=e.find(".fl-block-overlay-actions"),i=t.data("original"),l=0,s=null,o=0,n=null,r=0,a=[],d=[],u=[],c=wp.template("fl-overlay-overflow-menu");for(void 0!=i&&(t.after(i),t.remove(),t=i),t.data("original",t.clone()),l=Math.floor(t[0].getBoundingClientRect().width)-8,s=t.find(" > i, > span.fl-builder-has-submenu");r<s.length;r++)n=s.eq(r),o+=Math.floor(n[0].getBoundingClientRect().width),o>l?(d.push(n),n.remove()):a.push(n);if(d.length>0){for(d.unshift(a.pop().remove()),r=0;r<d.length;r++)d[r].is(".fl-builder-has-submenu")?u.push({type:"submenu",label:d[r].find(".fa").data("title"),submenu:d[r].find(".fl-builder-submenu")[0].outerHTML}):u.push({type:"action",label:d[r].data("title"),className:d[r].removeClass(function(e,t){return t.replace(/fl-block-([^\s]+)/,"")}).attr("class")});t.append(c(u)),FLBuilder._initTipTips()}},_removeRowOverlays:function(){e(".fl-row").removeClass("fl-block-overlay-active"),e(".fl-row-overlay").remove(),e(".fl-module").removeClass("fl-module-adjust-height"),e("body").removeClass("fl-builder-row-resizing"),FLBuilder._closeAllSubmenus()},_disableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&e(".fl-row.fl-node-global").addClass("fl-node-disabled")},_enableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&e(".fl-node-disabled").removeClass("fl-node-disabled")},_rowMouseenter:function(){var t=e(this),i=t.offset().top,l=null,s=null,o=wp.template("fl-row-overlay");t.closest(".fl-builder-node-loading").length||t.hasClass("fl-block-overlay-active")||(s=FLBuilder._appendOverlay(t,o({global:t.hasClass("fl-node-global"),node:t.attr("data-node")})),t.find(".fl-node-content:visible").each(function(){var t=e(this).offset().top;l=null===l||l>t?t:l}),null!==l&&l<i&&s.css("top",l-i-30+"px"),s.offset().top<43&&s.addClass("fl-row-overlay-header-bottom"),t.find(".fl-module").each(function(){var t=e(this);t.outerHeight(!0)<20&&t.addClass("fl-module-adjust-height")}),FLBuilder._buildOverlayOverflowMenu(s))},_rowMouseleave:function(t){var i=e(t.toElement)||e(t.relatedTarget),l=i.hasClass("fl-row-overlay"),s=i.closest(".fl-row-overlay").length>0,o=i.is("#tiptip_holder"),n=i.closest("#tiptip_holder").length>0;l||s||o||n||FLBuilder._removeRowOverlays()},_rowDragHelper:function(){return e('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.row+"</div>")},_rowDragInit:function(t){var i=e(t.target),l=e(".fl-row-sortable-proxy-item"),s=i.closest(".fl-row");s.addClass("fl-node-dragging"),FLBuilder._blockDragInit(t),t.target=l[0],l.trigger(t)},_rowDragStart:function(t,i){var l=e(FLBuilder._contentClass+" .fl-row"),s=e(".fl-node-dragging");1===l.length&&e(FLBuilder._contentClass).addClass("fl-builder-empty"),s.hide(),FLBuilder._blockDragStart(t,i)},_rowDragStop:function(t,i){var l=i.item,s=l.parent(),o=null,n=null,r=0;if(FLBuilder._blockDragStop(t,i),s.hasClass("fl-builder-rows"))return void l.remove();if(s.hasClass("fl-row-sortable-proxy"))return void e(".fl-node-dragging").removeClass("fl-node-dragging").show();if(l.hasClass("fl-builder-block")){if(s.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();s.hasClass("fl-col-content")?FLBuilder._addColGroup(l.closest(".fl-col").attr("data-node"),l.attr("data-cols"),s.find("> .fl-module, .fl-col-group, .fl-builder-block").index(l)):s.hasClass("fl-col-drop-target")?FLBuilder._addCols(s.closest(".fl-col"),s.hasClass("fl-col-drop-target-last")?"after":"before",l.attr("data-cols"),s.closest(".fl-col-group-nested").length>0):s.hasClass("fl-col-group-drop-target")?(n=l.closest(".fl-col-group"),r=l.closest(".fl-row").find(".fl-row-content > .fl-col-group").index(n),FLBuilder._addColGroup(l.closest(".fl-row").attr("data-node"),l.attr("data-cols"),s.hasClass("fl-drop-target-last")?r+1:r)):(o=l.closest(".fl-row"),r=o.length?e(FLBuilder._contentClass+" .fl-row").index(o):0,FLBuilder._addRow(l.attr("data-cols"),s.hasClass("fl-drop-target-last")?r+1:r)),l.remove(),FLBuilder._showPanel(),e(".fl-builder-modules").siblings(".fl-builder-blocks-section-title").eq(0).trigger("click")}else o=e(".fl-node-dragging").removeClass("fl-node-dragging").show(),s.parent().hasClass("fl-builder-content")||(s.hasClass("fl-drop-target-last")?s.parent().after(o):s.parent().before(o),FLBuilder._reorderNode(o.attr("data-node"),o.index())),e(".fl-row-sortable-proxy").append(i.item)},_addRow:function(t,i){FLBuilder._showNodeLoadingPlaceholder(e(FLBuilder._contentClass),i),FLBuilder._newRowPosition=i,FLBuilder.ajax({action:"render_new_row",cols:t,position:i},FLBuilder._addRowComplete)},_addRowComplete:function(t){var i="object"==typeof t?t:JSON.parse(t),l=e(FLBuilder._contentClass),s=e(i.html).data("node"),o=FLBuilder._addModuleAfterNodeRender;i.nodeParent=l,i.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(i,function(){null!==o&&(e(".fl-node-"+s+" .fl-col-content").append(o),FLBuilder._reorderModule(o),FLBuilder._addModuleAfterNodeRender=null),FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+s)),FLBuilder.triggerHook("didAddRow",s)})},_deleteRowClicked:function(t){var i=e(this).closest(".fl-row"),l=null;i.find(".fl-module").length?(l=confirm(FLBuilderStrings.deleteRowMessage),l&&FLBuilder._deleteRow(i)):FLBuilder._deleteRow(i),FLBuilder._removeAllOverlays(),t.stopPropagation()},_deleteRow:function(e){var t=e.attr("data-node");FLBuilder.ajax({action:"delete_node",node_id:t}),e.empty(),e.remove(),FLBuilder._setupEmptyLayout(),FLBuilder._removeRowOverlays(),FLBuilder.triggerHook("didDeleteRow",t)},_rowCopyClicked:function(t){var i=e(this).closest(".fl-row"),l=i.attr("data-node"),s=e(FLBuilder._contentClass+" .fl-row").index(i)+1,o=i.clone(),n=e(".fl-builder-settings[data-node]"),r=n.attr("data-node"),a=r===l?i:i.find('[data-node="'+r+'"]'),d=null;n.length&&a.length&&(d=FLBuilder._getSettings(n),FLBuilderSettingsConfig.nodes[r]=d),o.addClass("fl-node-"+l+"-clone fl-builder-node-clone"),o.find(".fl-block-overlay").remove(),i.after(o),e("html, body").animate({scrollTop:o.offset().top-75},500),FLBuilder._showNodeLoading(l+"-clone"),FLBuilder._newRowPosition=s,FLBuilder.ajax({action:"copy_row",node_id:l,settings:d,settings_id:r},function(e){var t=JSON.parse(e);t.duplicatedRow=l,FLBuilder._rowCopyComplete(t)}),t.stopPropagation()},_rowCopyComplete:function(t){t.nodeParent=e(FLBuilder._contentClass),t.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(t,function(){FLBuilder.triggerHook("didDuplicateRow",{newNodeId:t.nodeId,oldNodeId:t.duplicatedRow}),t.nodeParent.find(".fl-builder-node-loading").eq(0).remove()})},_rowSettingsClicked:function(t){var i=e(this),l=i.closest(".fl-row").attr("data-node"),s=i.closest(".fl-block-overlay-global").length>0,o=null;s&&"row"!=FLBuilderConfig.userTemplateType?FLBuilderConfig.userCanEditGlobalTemplates&&(o=window.open(e('.fl-row[data-node="'+l+'"]').attr("data-template-url")),o.FLBuilderGlobalNodeId=l):i.hasClass("fl-block-settings")&&FLBuilderSettingsForms.render({id:"row",nodeId:l,className:"fl-builder-row-settings",attrs:'data-node="'+l+'"',buttons:s||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:s?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[l],preview:{type:"row"}},function(){e("#fl-field-width select").on("change",FLBuilder._rowWidthChanged),e("#fl-field-content_width select").on("change",FLBuilder._rowWidthChanged)}),t.stopPropagation()},_rowWidthChanged:function(){var t=e("#fl-field-width select").val(),i=e("#fl-field-content_width select").val(),l=e("#fl-field-max_content_width");"fixed"==t||"full"==t&&"fixed"==i?l.show():l.hide()},_resetRowWidthClicked:function(t){var i=e(this),l=i.closest(".fl-row"),s=l.attr("data-node"),o=l.find(".fl-row-content"),n=FLBuilderConfig.global.row_width+"px",r=e(".fl-builder-row-settings");l.hasClass("fl-row-fixed-width")&&l.css("max-width",n),o.css("max-width",n),r.length&&r.find("[name=max_content_width]").val(""),FLBuilder.ajax({action:"resize_row_content",node:s,width:""}),FLBuilder._closeAllSubmenus(),FLBuilder.triggerHook("didResetRowWidth",s),t.stopPropagation()},_highlightEmptyCols:function(){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",i=(e(FLBuilder._contentClass+" .fl-row"+t),e(FLBuilder._contentClass+" .fl-col"+t));e(".fl-row-highlight").removeClass("fl-row-highlight"),i.removeClass("fl-col-highlight").find(".fl-col-content").css("height",""),i.each(function(){var t=e(this);0===t.find(".fl-module, .fl-col").length&&t.addClass("fl-col-highlight")})},_removeEmptyColHighlights:function(){e(".fl-row-highlight").removeClass("fl-row-highlight"),e(".fl-col-highlight").removeClass("fl-col-highlight")},_highlightRowsAndColsForDrag:function(t){var i="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)";e(FLBuilder._contentClass+" .fl-row").addClass("fl-row-highlight"),t.closest(".fl-row-overlay").length||e(FLBuilder._contentClass+" .fl-col"+i).addClass("fl-col-highlight")},_adjustColHeightsForDrag:function(){var t="row"==FLBuilderConfig.userTemplateType?"":".fl-row:not(.fl-node-global) ",i=e(FLBuilder._contentClass),l=i.find(t+".fl-col-group:not(.fl-col-group-nested) > .fl-col > .fl-col-content"),s=i.find(t+".fl-col-group-nested .fl-col-content"),o=0;for(e(".fl-node-drag-init").hide();o<s.length;o++)FLBuilder._adjustColHeightForDrag(s.eq(o));for(o=0;o<l.length;o++)FLBuilder._adjustColHeightForDrag(l.eq(o));e(".fl-node-drag-init").show()},_adjustColHeightForDrag:function(e){e.find(".fl-module:visible, .fl-col:visible").length&&e.height(e.height()+45)},_showColHighlightGuide:function(){var t=e(this),i=t.find("a"),l=t.closest(".fl-col"),s=l.parents(".fl-col"),o=e('<div class="fl-col-highlight-guide"></div>'),n=null,r=t.closest(".fl-block-overlay").offset().top;(i.hasClass("fl-block-col-move-parent")||i.hasClass("fl-block-col-edit-parent"))&&(l=s),l.hasClass("fl-col-highlight")||(l.find("> .fl-col-content").append(o),l.addClass("fl-col-has-highlight-guide"),n=o.offset().top,n>r&&o.css("top",r-n+4+"px"))},_removeColHighlightGuides:function(){e(".fl-col-has-highlight-guide").removeClass("fl-col-has-highlight-guide"),e(".fl-col-highlight-guide").remove()},_colMouseenter:function(){var t=e(this),i=t.closest(".fl-col-group"),l=i.hasClass("fl-col-group-has-child-loading"),s=t.hasClass("fl-node-global"),o=t.parents(".fl-node-global").length>0,n=t.closest(".fl-col-group").find("> .fl-col").length,r=i.find("> .fl-col").index(t),a=0===r,d=n===r+1,u=t.find(".fl-col").length>0,c=t.parents(".fl-col"),h=c.closest(".fl-col-group"),f=c.length>0,g=f?h.find("> .fl-col").length:0,p=h.find("> .fl-col").index(c),b=!!f&&0===p,m=!!f&&g===p+1,v=t.find("> .fl-col-content").width(),_=t.closest(".fl-row"),L=!!_.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,w=FLBuilderConfig.rowResize.userCanResizeRows,C=wp.template("fl-col-overlay"),F=null;FLBuilderConfig.simpleUi||s&&o&&"row"!=FLBuilderConfig.userTemplateType||t.find(".fl-module, .fl-builder-node-loading-placeholder").length>0||t.find(".fl-col").length>0||t.closest(".fl-builder-node-loading").length||(t.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),F=FLBuilder._appendOverlay(t,C({global:s,groupLoading:l,numCols:n,first:a,last:d,hasChildCols:u,hasParentCol:f,parentFirst:b,parentLast:m,numParentCols:g,contentWidth:v,rowIsFixedWidth:L,userCanResizeRows:w})),FLBuilder._buildOverlayOverflowMenu(F),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_colMouseleave:function(t){var i=e(this),l=e(t.toElement)||e(t.relatedTarget),s=i.find(".fl-module").length>0,o=l.is("#tiptip_holder"),n=l.closest("#tiptip_holder").length>0;o||n||s||(FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._closeAllSubmenus())},_removeColOverlays:function(){var t=e(".fl-col");t.removeClass("fl-block-overlay-active"),t.find(".fl-col-overlay").remove(),e("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_colDragHelper:function(){return e('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.column+"</div>")},_colDragInit:function(t){var i=e(t.target),l=e(".fl-col-sortable-proxy-item"),s=i.closest(".fl-col");i.hasClass("fl-block-col-move-parent")&&(s=s.parents(".fl-col")),s.addClass("fl-node-dragging"),FLBuilder._blockDragInit(t),FLBuilder._removeColHighlightGuides(),t.target=l[0],l.trigger(t)},_colDragStart:function(t,i){var l=e(".fl-node-dragging");l.hide(),FLBuilder._resetColumnWidths(l.parent()),FLBuilder._blockDragStart(t,i)},_colDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var l=e(".fl-node-dragging").removeClass("fl-node-dragging").show(),s=l.attr("data-node"),o=i.item.parent(),n=l.parent(),r=n.attr("data-node");newGroup=o.closest(".fl-col-group"),newGroupId=newGroup.attr("data-node"),newRow=o.closest(".fl-row"),position=0,o.hasClass("fl-sortable-disabled")?FLBuilder._resetColumnWidths(n):o.hasClass("fl-col-sortable-proxy")?FLBuilder._resetColumnWidths(n):o.hasClass("fl-col-content")?(l.remove(),0===n.find(".fl-col").length&&n.remove(),position=o.find("> .fl-module, .fl-col-group, .fl-col-sortable-proxy-item").index(i.item),FLBuilder._addColGroup(o.closest(".fl-col").attr("data-node"),s,position)):o.hasClass("fl-col-drop-target")?(o.hasClass("fl-col-drop-target-last")?o.parent().after(l):o.parent().before(l),FLBuilder._resetColumnWidths(newGroup),r==newGroupId?FLBuilder.ajax({action:"reorder_col",node_id:s,position:l.index()}):FLBuilder.ajax({action:"move_col",node_id:s,new_parent:newGroupId,position:l.index(),resize:[r,newGroupId]}),FLBuilder._resizeLayout()):o.hasClass("fl-col-group-drop-target")?(l.remove(),0===n.find(".fl-col").length&&n.remove(),position=newRow.find(".fl-row-content > .fl-col-group").index(newGroup),position=o.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addColGroup(newRow.attr("data-node"),s,position)):o.hasClass("fl-row-drop-target")&&(l.remove(),position=o.closest(".fl-builder-content").find(".fl-row").index(newRow),position=o.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addRow(s,position)),0===n.find(".fl-col").length&&n.remove(),e(".fl-col-sortable-proxy").append(i.item),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._closeAllSubmenus()},_colSettingsClicked:function(t){var i=e(this),l=i.closest(".fl-col"),s=l.find("> .fl-col-content"),o=i.closest(".fl-block-overlay-global").length>0,n=null;FLBuilder._colResizing||(n=i.hasClass("fl-block-col-edit-parent")?l.parents(".fl-col").data("node"):l.attr("data-node"),FLBuilderSettingsForms.render({id:"col",nodeId:n,className:"fl-builder-col-settings",attrs:'data-node="'+n+'"',badges:o?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[n],preview:{type:"col"}},function(){0===l.siblings(".fl-col").length?e("#fl-builder-settings-section-general").hide():s.width()<=40&&e("#fl-field-size").hide()}),t.stopPropagation())},_copyColClicked:function(t){var i=e(this).closest(".fl-col"),l=i.attr("data-node"),s=i.clone(),o=i.parent(),n=e(".fl-builder-settings[data-node]"),r=n.attr("data-node"),a=r===l?i:i.find('[data-node="'+r+'"]'),d=null;n.length&&a.length&&(d=FLBuilder._getSettings(n),FLBuilderSettingsConfig.nodes[r]=d),s.addClass("fl-node-"+l+"-clone fl-builder-node-clone"),s.find(".fl-block-overlay").remove(),i.after(s),FLBuilder._showNodeLoading(l+"-clone"),FLBuilder._newColParent=o,FLBuilder._newColPosition=i.index()+1,FLBuilder._resetColumnWidths(o),FLBuilder.ajax({action:"copy_col",node_id:l,settings:d,settings_id:r},function(e){var t=JSON.parse(e);t.duplicatedColumn=l,FLBuilder._copyColComplete(t)}),t.stopPropagation()},_copyColComplete:function(e){e.nodeParent=FLBuilder._newColParent,e.nodePosition=FLBuilder._newColPosition,FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateColumn",{newNodeId:e.nodeId,oldNodeId:e.duplicatedColumn}),e.nodeParent.find(".fl-builder-node-loading").eq(0).remove()})},_deleteColClicked:function(t){var i=e(this),l=i.closest(".fl-col"),s=l.closest(".fl-col-group"),o=l.parents(".fl-col"),n=o.length>0,r=o.find("> .fl-col-content > .fl-module, > .fl-col-content > .fl-col-group"),a=l.siblings(".fl-col"),d=!0;l.find(".fl-module").length>0&&(d=confirm(FLBuilderStrings.deleteColumnMessage)),n&&1===r.length&&(0===a.length?l=o:1!==a.length||a.find(".fl-module").length||(l=s)),d&&(FLBuilder._deleteCol(l),FLBuilder._removeAllOverlays(),FLBuilder._highlightEmptyCols()),t.stopPropagation()},_deleteCol:function(e){var t=e.attr("data-node"),i=e.closest(".fl-row"),l=e.closest(".fl-col-group"),s=0;e.remove(),rowCols=i.find(".fl-row-content > .fl-col-group > .fl-col"),groupCols=l.find(" > .fl-col"),0===rowCols.length&&"row"!=FLBuilderConfig.userTemplateType?FLBuilder._deleteRow(i):(0===groupCols.length?l.remove():(s=6===groupCols.length?16.65:7===groupCols.length?14.28:Math.round(100/groupCols.length*100)/100,groupCols.css("width",s+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:groupCols})),FLBuilder.ajax({action:"delete_col",node_id:t,new_width:s}),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder.triggerHook("didDeleteColumn",t))},_addCols:function(e,t,i,l){var s=e.closest(".fl-col-group"),o=s.find(".fl-col").index(e);i="undefined"==typeof i?"1-col":i,l="undefined"!=typeof l&&l,"after"==t&&o++,FLBuilder._showNodeLoadingPlaceholder(s,o),FLBuilder._removeAllOverlays(),FLBuilder.ajax({action:"render_new_columns",node_id:e.attr("data-node"),insert:t,type:i,nested:l?1:0},FLBuilder._addColsComplete)},_addColsComplete:function(t){var i=JSON.parse(t),l=null,s=FLBuilder._addModuleAfterNodeRender;FLBuilder._renderLayout(i,function(){null!==s&&(e('.fl-module[data-node="'+s.module.data("node")+'"]').remove(),l=e('.fl-col[data-node="'+s.colId+'"]'),"after"==s.position?l.next().find(".fl-col-content").append(s.module):l.prev().find(".fl-col-content").append(s.module),FLBuilder._reorderModule(s.module),FLBuilder._addModuleAfterNodeRender=null),FLBuilder.triggerHook("didAddColumn",i.nodeId),FLBuilder.triggerHook("didResetColumnWidths",{cols:e(".fl-node-"+i.nodeId).find("> .fl-col")})})},_addColGroup:function(t,i,l){var s=e(".fl-node-"+t);FLBuilder._newColGroupPosition=l,s.hasClass("fl-col")?FLBuilder._newColGroupParent=s.find(" > .fl-col-content"):FLBuilder._newColGroupParent=s.find(".fl-row-content"),FLBuilder._showNodeLoadingPlaceholder(FLBuilder._newColGroupParent,l),FLBuilder.ajax({action:"render_new_column_group",cols:i,node_id:t,position:l},FLBuilder._addColGroupComplete)},_addColGroupComplete:function(t){var i=JSON.parse(t),l=e(i.html),s=l.data("node"),o=l.find(".fl-col").data("node"),n=FLBuilder._addModuleAfterNodeRender;i.nodeParent=FLBuilder._newColGroupParent,i.nodePosition=FLBuilder._newColGroupPosition,FLBuilder._renderLayout(i,function(){i.nodeParent.hasClass("fl-col-content")&&i.nodeParent.parents(".fl-col").addClass("fl-col-has-cols"),null!==n&&(e(".fl-node-"+o+" .fl-col-content").append(n),FLBuilder._reorderModule(n),FLBuilder._addModuleAfterNodeRender=null),FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+s)),FLBuilder.triggerHook("didAddColumnGroup",s)})},_initColDragResizing:function(){e(".fl-block-col-resize").not(".fl-block-row-resize").draggable({axis:"x",start:FLBuilder._colDragResizeStart,drag:FLBuilder._colDragResize,stop:FLBuilder._colDragResizeStop})},_colDragResizeStart:function(t,i){var l=e(i.helper),s="",o=l.hasClass("fl-block-col-resize-parent"),n=o?l.closest(".fl-col").parents(".fl-col"):null,r=o?n.parents(".fl-col-group"):l.closest(".fl-col-group"),a=r.find("> .fl-col"),d=o?n:l.closest(".fl-col"),u=d.attr("data-node"),c=e("[data-node="+u+"] #fl-field-size input"),h=null,f=null,g=null,p=100,b=0,m=null,v=null;for(l.hasClass("fl-block-col-resize-e")?(s="e",h=d.nextAll(".fl-col").first()):(s="w",h=d.prevAll(".fl-col").first()),f=h.attr("data-node"),g=e("[data-node="+f+"] #fl-field-size input");b<a.length;b++)a.eq(b).data("node")!=d.data("node")&&a.eq(b).data("node")!=h.data("node")&&(p-=parseFloat(a.eq(b)[0].style.width));c.length?(m=c,v="col"):g.length&&(m=g,v="sibling"),FLBuilder._colResizeData={handle:l,feedbackLeft:l.find(".fl-block-col-resize-feedback-left"),feedbackRight:l.find(".fl-block-col-resize-feedback-right"),direction:s,groupWidth:r.outerWidth(),col:d,colWidth:parseFloat(d[0].style.width)/100,sibling:h,offset:i.position.left,availWidth:p,setting:m,settingType:v},FLBuilder._colResizing=!0,e("body").addClass("fl-builder-col-resizing"),FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents(),FLBuilder.triggerHook("col-resize-start")},_colDragResize:function(e,t){var i=FLBuilder._colResizeData,l=FLBuilderConfig.isRtl?"w":"e",s=i.handle.closest(".fl-block-overlay"),o=(i.offset-t.position.left)/i.groupWidth,n=l==i.direction?100*(i.colWidth-o):100*(i.colWidth+o),r=Math.round(100*n)/100,a=i.availWidth-n,d=Math.round(100*a)/100,u=8,c=Math.round(100*(i.availWidth-u))/100;r<u?(r=u,d=c):d<u&&(r=c,d=u),l==i.direction?(i.feedbackLeft.html(r.toFixed(1)+"%").show(),i.feedbackRight.html(d.toFixed(1)+"%").show()):(i.feedbackLeft.html(d.toFixed(1)+"%").show(),i.feedbackRight.html(r.toFixed(1)+"%").show()),i.col.css("width",r+"%"),i.sibling.css("width",d+"%"),i.setting&&("col"===i.settingType?i.setting.val(parseFloat(i.col[0].style.width)):"sibling"===i.settingType&&i.setting.val(parseFloat(i.sibling[0].style.width))),FLBuilder._buildOverlayOverflowMenu(s),FLBuilder.triggerHook("col-resize-drag")},_colDragResizeStop:function(t,i){var l=FLBuilder._colResizeData,s=FLBuilder._colResizeData.handle.closest(".fl-block-overlay"),o=l.col.data("node"),n=parseFloat(l.col[0].style.width),r=l.sibling.data("node"),a=parseFloat(l.sibling[0].style.width);FLBuilder._colResizeData.feedbackLeft.hide(),FLBuilder._colResizeData.feedbackRight.hide(),FLBuilder.ajax({action:"resize_cols",col_id:o,col_width:n,sibling_id:r,sibling_width:a}),FLBuilder._buildOverlayOverflowMenu(s),FLBuilder._colResizeData=null,e("body").removeClass("fl-builder-col-resizing"),FLBuilder._bindOverlayEvents(),setTimeout(function(){FLBuilder._colResizing=!1},50),FLBuilder.triggerHook("col-resize-stop"),FLBuilder.triggerHook("didResizeColumn",{colId:o,colWidth:n,siblingId:r,siblingWidth:a})},_resetColumnWidthsClicked:function(t){var i=e(this),l=!!i.closest(".fl-row-overlay").length,s=null,o=null,n=[],r=null,a=0,d=e(".fl-builder-col-settings"),u=null;o=l?i.closest(".fl-row").find(".fl-row-content > .fl-col-group"):i.parents(".fl-col-group").last(),o.each(function(){for(s=e(this),r=s.find(".fl-col-group"),n.push(s.data("node")),FLBuilder._resetColumnWidths(s),a=0;a<r.length;a++)FLBuilder._resetColumnWidths(r.eq(a)),n.push(r.eq(a).data("node"))}),d.length&&(u=e(".fl-node-"+d.attr("data-node")),d.find("#fl-field-size input").val(parseFloat(u[0].style.width))),FLBuilder.ajax({action:"reset_col_widths",group_id:n}),FLBuilder.triggerHook("col-reset-widths"),FLBuilder._closeAllSubmenus(),t.stopPropagation()},_resetColumnWidths:function(e){var t=e.find(" > .fl-col:visible"),i=0;i=6===t.length?16.65:7===t.length?14.28:Math.round(100/t.length*100)/100,t.css("width",i+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:t})},_moduleMouseenter:function(){var t=e(this),i=t.attr("data-name"),l=t.hasClass("fl-node-global"),s=t.parents(".fl-node-global").length>0,o=t.parents(".fl-col-group").last(),n=o.hasClass("fl-col-group-has-child-loading"),r=t.closest(".fl-col-group").find("> .fl-col").length,a=t.closest(".fl-col"),d=0===a.index(),u=r===a.index()+1,c=a.parents(".fl-col"),h=c.length>0,f=h?c.closest(".fl-col-group").find("> .fl-col").length:0,g=!!h&&0===c.index(),p=!!h&&f===c.index()+1,b=a.find("> .fl-col-content").width(),m=t.closest(".fl-row"),v=!!m.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,_=FLBuilderConfig.rowResize.userCanResizeRows,L=wp.template("fl-module-overlay"),w=null;FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),l&&s&&"row"!=FLBuilderConfig.userTemplateType||t.closest(".fl-builder-node-loading").length||(t.hasClass("fl-block-overlay-active")||(w=FLBuilder._appendOverlay(t,L({global:l,moduleName:i,groupLoading:n,numCols:r,colFirst:d,colLast:u,hasParentCol:h,numParentCols:f,parentFirst:g,parentLast:p,contentWidth:b,rowIsFixedWidth:v,userCanResizeRows:_})),FLBuilder._buildOverlayOverflowMenu(w),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_moduleMouseleave:function(t){var i=(e(this),e(t.toElement)||e(t.relatedTarget)),l=i.is("#tiptip_holder"),s=i.closest("#tiptip_holder").length>0;l||s||(FLBuilder._removeModuleOverlays(),FLBuilder._removeColHighlightGuides())},_removeModuleOverlays:function(){var t=e(".fl-module");t.removeClass("fl-block-overlay-active"),t.find(".fl-module-overlay").remove(),
4
  e("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_moduleDragHelper:function(t,i){return e('<div class="fl-builder-block-drag-helper">'+i.attr("data-name")+"</div>")},_moduleDragStart:function(t,i){e(i.item).data("original-position",i.item.index()),FLBuilder._blockDragStart(t,i)},_moduleDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var l=i.item,s=l.parent(),o=null,n=0,r=0;if(s.hasClass("fl-builder-modules")||s.hasClass("fl-builder-widgets"))return void l.remove();if(l.hasClass("fl-builder-block")){if(s.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();s.hasClass("fl-row-drop-target")?(s=l.closest(".fl-builder-content"),r=0,o=l.closest(".fl-row"),n=s.find(".fl-row").index(o)):s.hasClass("fl-col-group-drop-target")?(s=l.closest(".fl-row-content"),r=s.closest(".fl-row").attr("data-node"),o=l.closest(".fl-col-group"),n=s.find(" > .fl-col-group").index(o)):s.hasClass("fl-col-drop-target")?(s=l.closest(".fl-col-group"),r=s.attr("data-node"),o=l.closest(".fl-col"),n=s.find(" > .fl-col").index(o)):(n=s.find("> .fl-module, .fl-col-group, .fl-builder-block").index(l),r=l.closest(".fl-col").attr("data-node")),l.closest(".fl-drop-target-last").length&&(n+=1),FLBuilder._addModule(s,r,l.attr("data-type"),n,l.attr("data-widget"),l.attr("data-alias")),l.remove()}else{if(s.hasClass("fl-sortable-disabled"))return e(t.target).append(i.item),e(t.target).children().eq(i.item.data("original-position")).before(i.item),void FLBuilder._highlightEmptyCols();s.hasClass("fl-row-drop-target")?(o=l.closest(".fl-row"),n=l.closest(".fl-builder-content").children(".fl-row").index(o),n=l.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addModuleAfterNodeRender=l,FLBuilder._addRow("1-col",n),l.remove()):s.hasClass("fl-col-group-drop-target")?(o=l.closest(".fl-col-group"),n=l.closest(".fl-row-content ").find(" > .fl-col-group").index(o),n=l.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addModuleAfterNodeRender=l,FLBuilder._addColGroup(l.closest(".fl-row").attr("data-node"),"1-col",n),l.remove()):s.hasClass("fl-col-drop-target")?(o=l.closest(".fl-col"),n=l.closest(".fl-col-drop-target-last").length?"after":"before",FLBuilder._addModuleAfterNodeRender={module:l,colId:o.data("node"),position:n},FLBuilder._addCols(o,n,"1-col",l.closest(".fl-col-group-nested").length>0),l.remove()):FLBuilder._reorderModule(l)}FLBuilder._resizeLayout()},_reorderModule:function(e){var t=e.closest(".fl-col").attr("data-node"),i=e.attr("data-parent"),l=e.attr("data-node"),s=e.index();t==i?FLBuilder._reorderNode(l,s):(e.attr("data-parent",t),FLBuilder._moveNode(t,l,s))},_deleteModuleClicked:function(t){var i=e(this).closest(".fl-module"),l=confirm(FLBuilderStrings.deleteModuleMessage);l&&(FLBuilder._deleteModule(i),FLBuilder._removeAllOverlays()),t.stopPropagation()},_deleteModule:function(e){var t=e.closest(".fl-row"),i=e.attr("data-node");FLBuilder.ajax({action:"delete_node",node_id:i}),e.empty(),e.remove(),t.removeClass("fl-block-overlay-muted"),FLBuilder._highlightEmptyCols(),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didDeleteModule",i)},_moduleCopyClicked:function(t){var i=e(this).closest(".fl-module");nodeId=i.attr("data-node"),position=i.index()+1,clone=i.clone(),form=e(".fl-builder-module-settings[data-node="+nodeId+"]"),settings=null,form.length&&(settings=FLBuilder._getSettings(form),FLBuilderSettingsConfig.nodes[nodeId]=settings),clone.addClass("fl-node-"+nodeId+"-clone fl-builder-node-clone"),clone.find(".fl-block-overlay").remove(),i.after(clone),e("html, body").animate({scrollTop:clone.offset().top-75},500),FLBuilder._showNodeLoading(nodeId+"-clone"),FLBuilder._newModuleParent=i.parent(),FLBuilder._newModulePosition=position,FLBuilder.ajax({action:"copy_module",node_id:nodeId,settings:settings},function(e){var t=JSON.parse(e);t.duplicatedModule=nodeId,FLBuilder._moduleCopyComplete(t)}),t.stopPropagation()},_moduleCopyComplete:function(e){e.nodeParent=FLBuilder._newModuleParent,e.nodePosition=FLBuilder._newModulePosition,FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateModule",{newNodeId:e.nodeId,oldNodeId:e.duplicatedModule}),e.nodeParent.find(".fl-builder-node-loading").eq(0).remove()})},_moduleSettingsClicked:function(t){var i=e(this),l=i.closest(".fl-module").attr("data-type"),s=i.closest(".fl-module").attr("data-node"),o=i.closest(".fl-col").attr("data-node"),n=i.closest(".fl-block-overlay-global").length>0;t.stopPropagation(),FLBuilder._colResizing||n&&!FLBuilderConfig.userCanEditGlobalTemplates||FLBuilder._showModuleSettings({type:l,nodeId:s,parentId:o,global:n})},_showModuleSettings:function(t,i){var l=FLBuilderSettingsConfig.modules[t.type],s=t.settings?t.settings:FLBuilderSettingsConfig.nodes[t.nodeId],o=e("head");-1===e.inArray(t.type,FLBuilder._loadedModuleAssets)&&(""!==l.assets.css&&o.append(l.assets.css),""!==l.assets.js&&o.append(l.assets.js),FLBuilder._loadedModuleAssets.push(t.type)),FLBuilderSettingsForms.render({type:"module",id:t.type,nodeId:t.nodeId,className:"fl-builder-module-settings fl-builder-"+t.type+"-settings",attrs:'data-node="'+t.nodeId+'" data-parent="'+t.parentId+'" data-type="'+t.type+'"',buttons:t.global||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:t.global?[FLBuilderStrings.global]:[],settings:s?s:FLBuilderSettingsConfig.defaults.modules[t.type],legacy:t.legacy,helper:FLBuilder._moduleHelpers[t.type],rules:FLBuilder._moduleHelpers[t.type]?FLBuilder._moduleHelpers[t.type].rules:null,preview:{type:"module",layout:t.layout,callback:function(){FLBuilder.triggerHook("didAddModule",t.nodeId)}}},i)},_saveModuleClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=t.attr("data-type"),l=(t.attr("data-node"),FLBuilder._moduleHelpers[i]),s=!0;"undefined"!=typeof l&&(t.find("label.error").remove(),t.validate().hideErrors(),s=t.validate().form(),s&&(s=l.submit())),s?FLBuilder._saveSettings():FLBuilder._toggleSettingsTabErrors()},_addModule:function(e,t,i,l,s,o){FLBuilder._showNodeLoadingPlaceholder(e,l),e.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=e,FLBuilder._newModulePosition=l),FLBuilder.ajax({action:"render_new_module",parent_id:t,type:i,position:l,node_preview:1,widget:"undefined"==typeof s?"":s,alias:"undefined"==typeof o?"":o},FLBuilder._addModuleComplete)},_addModuleComplete:function(t){var i=JSON.parse(t);i.layout&&(i.layout.nodeParent=FLBuilder._newModuleParent,i.layout.nodePosition=FLBuilder._newModulePosition),e("form.fl-builder-settings").length?i.layout&&FLBuilder._renderLayout(i.layout):FLBuilder._showModuleSettings(i,function(){e(".fl-builder-module-settings").data("new-module","1")})},registerModuleHelper:function(t,i){var l={rules:{},init:function(){},submit:function(){return!0},preview:function(){}};FLBuilder._moduleHelpers[t]=e.extend({},l,i)},_registerModuleHelper:function(e,t){FLBuilder.registerModuleHelper(e,t)},_showNodeTemplateSettings:function(t){var i=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=i.attr("data-node"),s=FLBuilderStrings.saveModule;return i.hasClass("fl-builder-row-settings")&&(s=FLBuilderStrings.saveRow),!!FLBuilder._triggerSettingsSave(!1,!1,!1)&&void FLBuilderSettingsForms.render({id:"node_template",nodeId:l,title:s,attrs:'data-node="'+l+'"',className:"fl-builder-node-template-settings",rules:{name:{required:!0}}},function(){FLBuilderConfig.userCanEditGlobalTemplates||e("#fl-field-global").hide()})},_saveNodeTemplate:function(){var t=e(".fl-builder-node-template-settings"),i=t.attr("data-node"),l=t.validate().form();l&&(FLBuilder._showNodeLoading(i),FLBuilder.ajax({action:"save_node_template",node_id:i,settings:FLBuilder._getSettings(t)},function(e){FLBuilder._saveNodeTemplateComplete(e),FLBuilder._hideNodeLoading(i)}),FLBuilder._lightbox.close())},_saveNodeTemplateComplete:function(t){var i=JSON.parse(t),l=e(".fl-builder-saved-"+i.type+"s"),s=l.find(".fl-builder-block"),o=null,n="",r=i.name.toLowerCase(),a=0,d=wp.template("fl-node-template-block"),u={name:i.name,isGlobal:i.global,content:i.type,id:i.id,postID:i.postID,kind:"template",type:"user",link:i.link,category:{uncategorized:FLBuilderStrings.uncategorized}};if(FLBuilderConfig.contentItems.template.push(u),FLBuilder.triggerHook("contentItemsChanged"),i.layout&&(FLBuilder._renderLayout(i.layout),FLBuilder.triggerHook("didSaveGlobalNodeTemplate",i.config)),0===s.length)l.append(d(i));else for(;a<s.length;a++){if(o=s.eq(a),n=o.text().toLowerCase().trim(),0===a&&r<n){l.prepend(d(i));break}if(r<n){o.before(d(i));break}if(s.length-1===a){l.append(d(i));break}}l.find(".fl-builder-block-no-node-templates").remove()},_nodeTemplateDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var l=i.item,s=l.parent(),o=null,n=0,r=null,a="",d=null;if(s.hasClass("fl-builder-blocks-section-content"))return void l.remove();if(l.hasClass("fl-builder-block-saved-row")||l.hasClass("fl-builder-block-row-template"))r=l.closest(".fl-row"),n=r.length?e(FLBuilder._contentClass+" .fl-row").index(r):0,n=s.hasClass("fl-drop-target-last")?n+1:n,o=null,a="render_new_row",d=FLBuilder._addRowComplete,FLBuilder._newRowPosition=n,FLBuilder._showNodeLoadingPlaceholder(e(FLBuilder._contentClass),n);else if(l.hasClass("fl-builder-block-saved-module")||l.hasClass("fl-builder-block-module-template")){if(a="render_new_module",d=FLBuilder._addModuleComplete,s.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();s.hasClass("fl-row-drop-target")?(s=l.closest(".fl-builder-content"),o=0,n=s.find(".fl-row").index(l.closest(".fl-row"))):s.hasClass("fl-col-group-drop-target")?(s=l.closest(".fl-row-content"),o=s.closest(".fl-row").attr("data-node"),n=s.find(" > .fl-col-group").index(l.closest(".fl-col-group"))):s.hasClass("fl-col-drop-target")?(s=l.closest(".fl-col-group"),n=s.children(".fl-col").index(l.closest(".fl-col")),o=s.attr("data-node")):(n=s.children(".fl-module, .fl-builder-block").index(l),o=l.closest(".fl-col").attr("data-node")),l.closest(".fl-drop-target-last").length&&(n+=1),s.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=s,FLBuilder._newModulePosition=n),FLBuilder._showNodeLoadingPlaceholder(s,n)}FLBuilder.ajax({action:a,template_id:l.attr("data-id"),template_type:l.attr("data-type"),parent_id:o,position:n},function(e){if(a.indexOf("row")>-1){var t=JSON.parse(e);FLBuilder.triggerHook("didApplyRowTemplateComplete",t.config),d(t.layout)}else d(e)}),l.remove()},_editNodeTemplateClicked:function(t){t.preventDefault(),t.stopPropagation(),window.open(e(this).attr("href"))},_deleteNodeTemplateClicked:function(t){var i=e(t.target),l=i.closest(".fl-builder-blocks-section"),s=l.find(".fl-builder-blocks-section-content"),o=s.find(".fl-builder-block"),n=i.closest(".fl-builder-block"),r=n.hasClass("fl-builder-block-global"),a=r?FLBuilder._updateLayout:void 0,d=r?FLBuilderStrings.deleteGlobalTemplate:FLBuilderStrings.deleteTemplate,u=null;confirm(d)&&(n.remove(),1===o.length&&(n.hasClass("fl-builder-block-saved-row")?s.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedRows+"</span>"):s.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedModules+"</span>")),n.hasClass("fl-builder-block-global")&&FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"delete_node_template",template_id:n.attr("data-id")},a),u=_.findIndex(FLBuilderConfig.contentItems.template,{id:n.attr("data-id"),type:"user"}),FLBuilderConfig.contentItems.template.splice(u,1),FLBuilder.triggerHook("contentItemsChanged"))},_initSettingsForms:function(){FLBuilder._initCodeFields(),FLBuilder._initColorPickers(),FLBuilder._initSelectFields(),FLBuilder._initEditorFields(),FLBuilder._initMultipleFields(),FLBuilder._initAutoSuggestFields(),FLBuilder._initLinkFields(),FLBuilder._initFontFields(),FLBuilder._initOrderingFields(),FLBuilder._initTimezoneFields(),FLBuilder._focusFirstSettingsControl(),FLBuilder._lightbox._resizeEditors(),e(".fl-builder-settings-fields").css("visibility","visible"),FLBuilder.triggerHook("settings-form-init")},_destroySettingsForms:function(){FLBuilder._destroyEditorFields()},_setSettingsFormContent:function(t){e(".fl-legacy-settings").remove(),e("body").append(t)},_settingsTabClicked:function(t){var i=e(this),l=i.closest(".fl-builder-settings"),s=i.attr("href").split("#").pop();FLBuilder._resetSettingsTabsState(),l.find(".fl-builder-settings-tab").removeClass("fl-active"),l.find("#"+s).addClass("fl-active"),l.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),l.find("a[href*="+s+"]").addClass("fl-active"),FLBuilder._focusFirstSettingsControl(),t.preventDefault()},_resetSettingsTabsState:function(){var t=e(".fl-lightbox:visible");FLBuilder._hideTabsOverflowMenu(),t.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),t.find(".fl-builder-settings-tabs-overflow-menu .fl-active").removeClass("fl-active"),t.find(".fl-contains-active").removeClass("fl-contains-active")},_calculateSettingsTabsOverflow:function(){var t=e(".fl-lightbox:visible"),i=t.outerWidth(),l=t.hasClass("fl-lightbox-width-slim"),s=t.find(".fl-builder-settings-tabs"),o=t.find(".fl-builder-settings-tabs-overflow-menu"),n=t.find(".fl-builder-settings-tabs-more"),r=s.find("a"),a=!1,d=i-60,u=0,c=l?16:30;o.html(""),FLBuilder._hideTabsOverflowMenu(),r.removeClass("fl-overflowed"),r.each(function(){if(!e(this).is(":visible"))return!0;if(!a){var t=e(this).textWidth()+c+12;u+=t,u>=d&&(a=!0)}if(a){var i=e(this).html(),l=e(this).attr("href"),s="";e(this).hasClass("fl-active")&&(s="fl-active"),e(this).hasClass("error")&&(s+=" error"),""!==s&&(s='class="'+s+'"');var n=e('<a href="'+l+'" '+s+">"+i+"</a>");o.append(n),e(this).addClass("fl-overflowed")}else e(this).removeClass("fl-overflowed")}),a?t.addClass("fl-lightbox-has-tab-overflow"):t.removeClass("fl-lightbox-has-tab-overflow"),o.find(".fl-active").length>0?n.addClass("fl-contains-active"):n.removeClass("fl-contains-active"),o.find(".error").length>0?n.addClass("fl-contains-errors"):n.removeClass("fl-contains-errors")},_settingsTabsToOverflowMenuItemClicked:function(t){var i=e(t.currentTarget),l=i.attr("href"),s=i.closest(".fl-lightbox-header-wrap").find(".fl-builder-settings-tabs"),o=s.find('a[href="'+l+'"]'),n=s.find(".fl-builder-settings-tabs-more");FLBuilder._resetSettingsTabsState(),o.trigger("click"),i.addClass("fl-active"),n.addClass("fl-contains-active"),FLBuilder._hideTabsOverflowMenu(),t.preventDefault()},_hasOverflowTabs:function(){var t=e(".fl-lightbox:visible"),i=t.find(".fl-builder-settings-tabs-overflow-menu a");return i.length>0},_showTabsOverflowMenu:function(){if(FLBuilder._hasOverflowTabs()){var t=e(".fl-lightbox:visible");t.find(".fl-builder-settings-tabs-overflow-menu").css("display","flex"),t.find(".fl-builder-settings-tabs-overflow-click-mask").show(),this.isShowingSettingsTabsOverflowMenu=!0}},_hideTabsOverflowMenu:function(){var t=e(".fl-lightbox:visible");t.find(".fl-builder-settings-tabs-overflow-menu").css("display","none"),t.find(".fl-builder-settings-tabs-overflow-click-mask").hide(),this.isShowingSettingsTabsOverflowMenu=!1},_toggleTabsOverflowMenu:function(e){FLBuilder.isShowingSettingsTabsOverflowMenu?FLBuilder._hideTabsOverflowMenu():FLBuilder._showTabsOverflowMenu(),e.stopPropagation()},_settingsCancelClicked:function(t){var i=e(".fl-builder-lightbox[data-parent]"),l=e(".fl-builder-module-settings"),s=null,o=null,n=null,r=null;return i.length>0?void FLBuilder._closeNestedSettings():(l.length>0&&"undefined"!=typeof l.data("new-module")?(s=e(FLBuilder.preview.state.html),o=e(".fl-node-"+l.data("node")),n=o.closest(".fl-col"),r=s.find(".fl-node-"+n.data("node")),r.length>0?FLBuilder._deleteModule(o):FLBuilder._deleteCol(n)):FLBuilder.preview&&FLBuilder.preview.revert(),FLBuilder.preview=null,void FLLightbox.closeParent(this))},_focusFirstSettingsControl:function(){var t=e(".fl-builder-settings:visible"),i=t.find(".fl-builder-settings-tab.fl-active"),l=i.find(".fl-field").first(),s=l.find('input:not([type="hidden"]), textarea, select, button, a, .fl-editor-field').first();if("undefined"!=typeof tinyMCE&&s.hasClass("fl-editor-field")){var o=s.find("textarea.wp-editor-area").attr("id");tinyMCE.get(o).focus()}else setTimeout(function(){s.focus().css("animation-name","fl-grab-attention")},300);l.css("animation-name","fl-grab-attention"),l.on("animationend",function(){l.css("animation-name","")})},_initSettingsValidation:function(t,i){var l=e(".fl-builder-settings").last();l.validate({ignore:".fl-ignore-validation",rules:t,messages:i,errorPlacement:FLBuilder._settingsErrorPlacement})},_settingsErrorPlacement:function(e,t){e.appendTo(t.parent())},_toggleSettingsTabErrors:function(){for(var t=e(".fl-builder-settings:visible"),i=t.find(".fl-builder-settings-tab"),l=null,s=null,o=0;o<i.length;o++)l=i.eq(o),s=l.find("label.error"),tabLink=t.find(".fl-builder-settings-tabs a[href*="+l.attr("id")+"]"),tabLink.find(".fl-error-icon").remove(),tabLink.removeClass("error"),s.length>0&&(tabLink.append('<span class="fl-error-icon"></span>'),tabLink.addClass("error"));FLBuilder._calculateSettingsTabsOverflow()},_getSettings:function(t){FLBuilder._updateEditorFields();var i=t.serializeArray(),l=0,s=0,o="",n="",r="",a=[],d=[],u={};for(l=0;l<i.length;l++)if(o=i[l].value.replace(/\r/gm,""),!(i[l].name.indexOf("flrich")>-1))if(i[l].name.indexOf("[")>-1){for(n=i[l].name.replace(/\[(.*)\]/,""),r=i[l].name.replace(n,""),a=[],d=r.match(/\[[^\]]*\]/g),s=0;s<d.length;s++)"[]"!=d[s]&&a.push(d[s].replace(/\[|\]/g,""));r.match(/\[\]\[[^\]]*\]\[[^\]]+\]/)?("undefined"==typeof u[n]&&(u[n]={}),"undefined"==typeof u[n][a[0]]&&(u[n][a[0]]={}),"undefined"==typeof u[n][a[0]][a[1]]&&(u[n][a[0]][a[1]]={}),u[n][a[0]][a[1]]=o):r.match(/\[\]\[[^\]]*\]\[\]/)?("undefined"==typeof u[n]&&(u[n]={}),"undefined"==typeof u[n][a[0]]&&(u[n][a[0]]=[]),u[n][a[0]].push(o)):r.match(/\[\]\[[^\]]*\]/)?("undefined"==typeof u[n]&&(u[n]={}),u[n][a[0]]=o):r.match(/\[\]/)&&("undefined"==typeof u[n]&&(u[n]=[]),u[n].push(o))}else u[i[l].name]=o;for(r in u)if("undefined"!=typeof u["as_values_"+r]){u[r]=e.grep(u["as_values_"+r].split(","),function(e){return""!==e}).join(",");try{delete u["as_values_"+r]}catch(c){}}return u=e.extend({},FLBuilder._getOriginalSettings(t),u)},_getSettingsJSONForHTML:function(e){return JSON.stringify(e).replace(/\'/g,"&#39;").replace("<wbr />","<wbr>")},_getOriginalSettings:function(t,i){var l=t.find(".fl-builder-settings-json"),s={};if(l.length){l=JSON.parse(l.val().replace(/&#39;/g,"'"));for(key in l)(e("#fl-field-"+key).length||i)&&(s[key]=l[key])}return s},_saveSettings:function(t){var i=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=i.data("new-module"),s=i.attr("data-node"),o=FLBuilder._getSettings(i),n=FLBuilder.preview;return!_.isUndefined(t)&&_.isBoolean(t)||(t=!0),n&&!n._settingsHaveChanged()&&_.isUndefined(l)?void FLBuilder._lightbox.close():(FLBuilder._showNodeLoading(s),FLBuilderSettingsConfig.nodes[s]=o,FLBuilder.ajax({action:"save_settings",node_id:s,settings:o},FLBuilder._saveSettingsComplete.bind(this,t,n)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:s,settings:o}),void FLBuilder._lightbox.close())},_saveSettingsComplete:function(e,t,i){var l=JSON.parse(i),s=function(){t&&l.layout.partial&&l.layout.nodeId===t.nodeId&&(t.clear(),t=null)};!0===e?FLBuilder._renderLayout(l.layout,s):s(),FLBuilder.triggerHook("didSaveNodeSettingsComplete",{nodeId:l.node_id,settings:l.settings})},_triggerSettingsSave:function(t,i,l){var s=FLBuilder._lightbox._node.find("form.fl-builder-settings"),o=FLBuilder._lightbox._node.data("instance-id"),n=FLLightbox._instances[o],r=e(".fl-lightbox-wrap[data-parent]:visible"),a=!1,d=!0;return t=!_.isUndefined(t)&&t,i=!_.isUndefined(i)&&i,l=!!_.isUndefined(l)||l,s.length&&(r.length&&(r.find(".fl-builder-settings-save").trigger("click"),(r.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),d&&!s.validate().form()&&(d=!1),a=FLBuilderSettingsForms.settingsHaveChanged(),d&&a&&(t&&n.disableClose(),s.find(".fl-builder-settings-save").trigger("click"),t&&n.enableClose(),(s.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),l&&(FLBuilder._destroySettingsForms(),!a&&FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)),a||t||n.close()),d||(FLBuilder.triggerHook("didFailSettingsSave"),FLBuilder._toggleSettingsTabErrors(),i&&!e(".fl-builder-alert-lightbox:visible").length&&FLBuilder.alert(FLBuilderStrings.settingsHaveErrors)),d},_refreshSettingsPreviewReference:function(){FLBuilder.preview&&FLBuilder.preview._initElementsAndClasses()},_openNestedSettings:function(t){t.className&&-1===t.className.indexOf("fl-builder-settings-lightbox")&&(t.className+=" fl-builder-settings-lightbox"),t=e.extend({className:"fl-builder-lightbox fl-builder-settings-lightbox",destroyOnClose:!0,resizable:!0},t);var i=e(".fl-lightbox-wrap:visible"),l=i.find(".fl-lightbox"),s=new FLLightbox(t),o=s._node,n=o.find(".fl-lightbox");return i.hide(),o.attr("data-parent",i.attr("data-instance-id")),n.attr("style",l.attr("style")),s.on("resized",FLBuilder._calculateSettingsTabsOverflow),s.open('<div class="fl-builder-lightbox-loading"></div>'),s},_closeNestedSettings:function(){var t=e(".fl-builder-lightbox[data-parent]:visible"),i=t.find(".fl-lightbox"),l=t.attr("data-instance-id"),s=FLLightbox._instances[l],o=t.attr("data-parent"),n=e('[data-instance-id="'+o+'"]'),r=n.find(".fl-lightbox"),a=n.find("form"),d=FLLightbox._instances[o];s.on("close",function(){r.attr("style",i.attr("style")),n.show(),d._resize(),n.find("label.error").remove(),a.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors()}),s.close()},_showHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeOut()},_initAutoSuggestFields:function(){var t=e(".fl-builder-settings:visible .fl-suggest-field"),i=null,l=null,s=null,o=[];t.each(function(){i=e(this),""!==i.attr("data-value")&&(FLBuilderSettingsForms.showFieldLoader(i),o.push({name:i.attr("name"),value:i.attr("data-value"),action:i.attr("data-action"),data:i.attr("data-action-data")}))}),o.length?FLBuilder.ajax({action:"get_autosuggest_values",fields:o},function(i){l=JSON.parse(i);for(s in l)e('.fl-suggest-field[name="'+s+'"]').attr("data-value",l[s]);t.each(FLBuilder._initAutoSuggestField)}):t.each(FLBuilder._initAutoSuggestField)},_initAutoSuggestField:function(){var t=e(this);t.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:t.data("action"),fl_as_action_data:t.data("action-data"),_wpnonce:FLBuilderConfig.ajaxNonce}),e.extend({},{asHtmlID:t.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:3,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,preFill:t.data("value"),queryParam:"fl_as_query",afterSelectionAdd:FLBuilder._updateAutoSuggestField,afterSelectionRemove:FLBuilder._updateAutoSuggestField,selectionLimit:t.data("limit")},t.data("args"))),FLBuilderSettingsForms.hideFieldLoader(t)},_updateAutoSuggestField:function(t,i,l){e(this).siblings(".as-values").val(l.join(",")).trigger("change")},_initCodeFields:function(){e(".fl-builder-settings:visible").find(".fl-code-field").each(FLBuilder._initCodeField)},_initCodeField:function(){var t=e(this),i=t.find("textarea"),l=(i.attr("id"),i.data("editor")),s=i.data("wrap"),o=e("<div>",{position:"absolute",height:20*parseInt(i.attr("rows"),10)}),n=null;o.insertBefore(i),i.css("display","none"),ace.require("ace/ext/language_tools"),n=ace.edit(o[0]),n.$blockScrolling=1/0,n.getSession().setValue(i.val()),n.getSession().setMode("ace/mode/"+l),s&&n.getSession().setUseWrapMode(!0),n.setOptions({enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!1,showLineNumbers:!1,showFoldWidgets:!1}),n.getSession().on("change",function(e){i.val(n.getSession().getValue()).trigger("change")}),i.closest(".fl-field").data("editor",n)},_initMultipleFields:function(){for(var t=e(".fl-builder-settings:visible .fl-builder-field-multiples"),i=null,l=null,s=0,o=FLBuilderConfig.isRtl?{left:10}:{right:10};s<t.length;s++)i=t.eq(s),l=i.find(".fl-builder-field-multiple"),1===l.length?l.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):l.find(".fl-builder-field-actions").removeClass("fl-builder-field-actions-single");e(".fl-builder-field-multiples").sortable({items:".fl-builder-field-multiple",cursor:"move",cursorAt:o,distance:5,opacity:.5,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer",axis:"y"})},_addFieldClicked:function(){var t=e(this),i=t.attr("data-field"),l=t.closest("tr").siblings("tr[data-field="+i+"]").last(),s=l.clone(),o=s.find(".fl-form-field"),n=null,r=parseInt(l.find("label span.fl-builder-field-index").html(),10)+1;s.find("th label span.fl-builder-field-index").html(r),s.find(".fl-form-field-preview-text").html(""),s.find("input, textarea, select").val(""),l.after(s),FLBuilder._initMultipleFields(),o.length&&(n=o.find(".fl-form-field-edit").data("type"),o.find("input").val(JSON.stringify(FLBuilderSettingsConfig.defaults.forms[n])))},_copyFieldClicked:function(){var t=e(this),i=t.closest("tr"),l=i.clone(),s=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;l.find("th label span.fl-builder-field-index").html(s),i.after(l),FLBuilder._renumberFields(i.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var t=e(this).closest("tr"),i=t.parent(),l=confirm(FLBuilderStrings.deleteFieldMessage);l&&(t.remove(),FLBuilder._renumberFields(i),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){for(var t=e.find(".fl-builder-field-multiple"),i=0;i<t.length;i++)t.eq(i).find("th label span.fl-builder-field-index").html(i+1)},_fieldDragHelper:function(){return e('<div class="fl-builder-field-dd-helper"></div>')},_fieldDragStop:function(e,t){FLBuilder._renumberFields(t.item.parent()),FLBuilder.preview.delayPreview()},_initSelectFields:function(){e(".fl-builder-settings:visible").find(".fl-builder-settings-fields select").trigger("change")},_settingsSelectChanged:function(){var t=e(this),i=t.attr("data-toggle"),l=t.attr("data-hide"),s=t.attr("data-trigger"),o=t.val(),n=0;if("undefined"!=typeof i){i=JSON.parse(i);for(n in i)FLBuilder._settingsSelectToggle(i[n].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[n].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[n].tabs,"hide","a[href*=fl-builder-settings-tab-","]");"undefined"!=typeof i[o]&&(FLBuilder._settingsSelectToggle(i[o].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(i[o].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[o].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof l&&(l=JSON.parse(l),"undefined"!=typeof l[o]&&(FLBuilder._settingsSelectToggle(l[o].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l[o].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[o].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))),"undefined"!=typeof s&&(s=JSON.parse(s),"undefined"!=typeof s[o]&&"undefined"!=typeof s[o].fields))for(n=0;n<s[o].fields.length;n++)e("#fl-field-"+s[o].fields[n]).find("select").trigger("change");FLBuilder._calculateSettingsTabsOverflow()},_settingsSelectToggle:function(t,i,l,s){var o=0;if(s="undefined"==typeof s?"":s,"undefined"!=typeof t)for(;o<t.length;o++)e(".fl-builder-settings:visible").find(l+t[o]+s)[i](),e(l+t[o]+s).parent().find('.fl-field[data-type="code"]').each(function(){e(this).data("editor").resize()})},_initColorPickers:function(){var t=FLBuilderConfig.colorPresets?FLBuilderConfig.colorPresets:[];FLBuilder.colorPicker=new FLBuilderColorPicker({mode:"hsv",elements:".fl-color-picker .fl-color-picker-value",presets:t,labels:{colorPresets:FLBuilderStrings.colorPresets,colorPicker:FLBuilderStrings.colorPicker,placeholder:FLBuilderStrings.placeholder,removePresetConfirm:FLBuilderStrings.removePresetConfirm,noneColorSelected:FLBuilderStrings.noneColorSelected,alreadySaved:FLBuilderStrings.alreadySaved,noPresets:FLBuilderStrings.noPresets,presetAdded:FLBuilderStrings.presetAdded}}),e(FLBuilder.colorPicker).on("presetRemoved presetAdded",function(e,t){FLBuilder.ajax({action:"save_color_presets",presets:t.presets})})},_initSinglePhotoSelector:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:"image"},multiple:!1}),FLBuilder._singlePhotoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="photo")},_selectSinglePhoto:function(){FLBuilder._initSinglePhotoSelector(),FLBuilder._singlePhotoSelector.once("open",e.proxy(FLBuilder._singlePhotoOpened,this)),FLBuilder._singlePhotoSelector.once("select",e.proxy(FLBuilder._singlePhotoSelected,this)),FLBuilder._singlePhotoSelector.open()},_singlePhotoOpened:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection"),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),s=l.val(),o=null;e(this).hasClass("fl-photo-replace")?(t.reset(),i.addClass("fl-photo-empty"),l.val("")):""!==s?(o=wp.media.attachment(s),o.fetch(),t.add(o?[o]:[])):t.reset()},_singlePhotoSelected:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),s=i.find(".fl-photo-preview img"),o=i.find("select");l.val(t.id),s.attr("src",FLBuilder._getPhotoSrc(t)),i.removeClass("fl-photo-empty").removeClass("fl-photo-no-attachment"),i.find("label.error").remove(),o.show(),o.html(FLBuilder._getPhotoSizeOptions(t)),o.trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_singlePhotoRemoved:function(){FLBuilder._initSinglePhotoSelector();var t=FLBuilder._singlePhotoSelector.state(),i="undefined"!=typeof t?t.get("selection"):null,l=e(this).closest(".fl-photo-field"),s=l.find("input[type=hidden]"),o=l.find("select");i&&i.reset(),l.addClass("fl-photo-empty"),s.val(""),o.html('<option value="" selected></option>'),o.trigger("change")},_getPhotoSrc:function(e){return"undefined"==typeof e.sizes?e.url:"undefined"!=typeof e.sizes.thumbnail?e.sizes.thumbnail.url:e.sizes.full.url},_getPhotoSizeOptions:function(e,t){var i="",l=null,s=null,o="",n={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if("undefined"==typeof e.sizes||0===e.sizes.length)i+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else{t&&(t=t.replace(/https?/,""));for(l in e.sizes)o="undefined"!=typeof n[l]?n[l]+" - ":"undefined"!=typeof FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]+" - ":"",s="",t?t===e.sizes[l].url.replace(/https?/,"")&&(s=' selected="selected"'):s="full"==l?' selected="selected"':"",i+='<option value="'+e.sizes[l].url+'"'+s+">"+o+e.sizes[l].width+" x "+e.sizes[l].height+"</option>"}return i},_selectMultiplePhotos:function(){var t=e(this).closest(".fl-multiple-photos-field"),i=t.find("input[type=hidden]"),l=i.val(),s=""===l?"":JSON.parse(l),o=wp.media.gallery.defaults.id,n='[gallery ids="-1"]',r=null,a=null,d=null,u=null,c=[];if("object"==typeof s){for(u in s)c.push(s[u]);n='[gallery ids="'+c.join()+'"]'}r=wp.shortcode.next("gallery",n).shortcode,_.isUndefined(r.get("id"))&&!_.isUndefined(o)&&r.set("id",o),a=wp.media.gallery.attachments(r),d=new wp.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:!0}),d.gallery=a.gallery,d.more().done(function(){d.length||FLBuilder._multiplePhotoSelector.setState("gallery-library"),d.props.set({query:!1}),d.unmirror(),d.props.unset("orderby");
5
  }),FLBuilder._multiplePhotoSelector&&FLBuilder._multiplePhotoSelector.dispose(),FLBuilder._multiplePhotoSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-photos-edit")?"gallery-edit":"gallery-library",title:wp.media.view.l10n.editGalleryTitle,editing:!0,multiple:!0,selection:d}).open(),e(FLBuilder._multiplePhotoSelector.views.view.el).addClass("fl-multiple-photos-lightbox"),FLBuilder._multiplePhotoSelector.once("update",e.proxy(FLBuilder._multiplePhotosSelected,this))},_multiplePhotosSelected:function(t){for(var i=e(this).closest(".fl-multiple-photos-field"),l=i.find("input[type=hidden]"),s=i.find(".fl-multiple-photos-count"),o=[],n=0;n<t.models.length;n++)o.push(t.models[n].id);1==o.length?s.html("1 "+FLBuilderStrings.photoSelected):s.html(o.length+" "+FLBuilderStrings.photosSelected),i.removeClass("fl-multiple-photos-empty"),i.find("label.error").remove(),l.val(JSON.stringify(o)).trigger("change")},_selectSingleVideo:function(){null===FLBuilder._singleVideoSelector&&(FLBuilder._singleVideoSelector=wp.media({title:FLBuilderStrings.selectVideo,button:{text:FLBuilderStrings.selectVideo},library:{type:"video"},multiple:!1}),FLBuilder._singleVideoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="video"),FLBuilder._singleVideoSelector.once("select",e.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var t=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-video-field"),l=i.find(".fl-video-preview-img"),s=i.find(".fl-video-preview-filename"),o=i.find("input[type=hidden]");l.html('<span class="dashicons dashicons-media-video"></span>'),s.html(t.filename),i.removeClass("fl-video-empty"),i.find("label.error").remove(),o.val(t.id).trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_selectMultipleAudios:function(){var t=e(this).closest(".fl-multiple-audios-field"),i=t.find("input[type=hidden]"),l=i.val(),s=""==l?'[playlist ids="-1"]':'[playlist ids="'+JSON.parse(l).join()+'"]',o=wp.shortcode.next("playlist",s).shortcode,n=wp.media.playlist.defaults.id,r=null,a=null;_.isUndefined(o.get("id"))&&!_.isUndefined(n)&&o.set("id",n),r=wp.media.playlist.attachments(o),a=new wp.media.model.Selection(r.models,{props:r.props.toJSON(),multiple:!0}),a.playlist=r.playlist,a.more().done(function(){a.props.set({query:!1}),a.unmirror(),a.props.unset("orderby")}),FLBuilder._multipleAudiosSelector&&FLBuilder._multipleAudiosSelector.dispose(),FLBuilder._multipleAudiosSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-audios-edit")?"playlist-edit":"playlist-library",title:wp.media.view.l10n.editPlaylistTitle,editing:!0,multiple:!0,selection:a}).open(),FLBuilder._multipleAudiosSelector.content.get("view").sidebar.unset("playlist"),FLBuilder._multipleAudiosSelector.on("content:render:browse",function(e){e&&e.sidebar.on("ready",function(){e.sidebar.unset("playlist")})}),FLBuilder._multipleAudiosSelector.once("update",e.proxy(FLBuilder._multipleAudiosSelected,this))},_multipleAudiosSelected:function(t){for(var i=e(this).closest(".fl-multiple-audios-field"),l=i.find(".fl-multiple-audios-count"),s=i.find("input[type=hidden]"),o=[],n=0;n<t.models.length;n++)o.push(t.models[n].id);1==o.length?l.html("1 "+FLBuilderStrings.audioSelected):l.html(o.length+" "+FLBuilderStrings.audiosSelected),s.val(JSON.stringify(o)).trigger("change"),i.removeClass("fl-multiple-audios-empty"),i.find("label.error").remove()},_selectIcon:function(){var e=this;FLIconSelector.open(function(t){FLBuilder._iconSelected.apply(e,[t])})},_iconSelected:function(t){var i=e(this).closest(".fl-icon-field"),l=i.find("input[type=hidden]"),s=i.find("i"),o=s.attr("data-icon");l.val(t).trigger("change"),s.removeClass(o),s.addClass(t),s.attr("data-icon",t),i.removeClass("fl-icon-empty"),i.find("label.error").remove()},_removeIcon:function(){var t=e(this).closest(".fl-icon-field"),i=t.find("input[type=hidden]"),l=t.find("i");i.val("").trigger("change"),l.removeClass(),l.attr("data-icon",""),t.addClass("fl-icon-empty")},_formFieldClicked:function(){var t=e(this),i=t.closest(".fl-builder-settings"),l=t.attr("data-type"),s=t.siblings("input").val(),o=FLBuilder._moduleHelpers[l],n=(FLBuilderSettingsConfig.forms[l],FLBuilder._openNestedSettings({className:"fl-builder-lightbox fl-form-field-settings"}));""===s&&(s=JSON.stringify(FLBuilderSettingsConfig.forms[l])),FLBuilderSettingsForms.render({id:l,nodeId:i.attr("data-node"),nodeSettings:FLBuilder._getSettings(i),settings:JSON.parse(s.replace(/&#39;/g,"'")),lightbox:n,helper:o,rules:o?o.rules:null},function(){t.attr("id","fl-"+n._node.attr("data-instance-id")),n._node.find("form.fl-builder-settings").attr("data-type",l)})},_saveFormFieldClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),l=t.attr("data-type"),s=FLBuilder._getSettings(t),o={},n=FLBuilder._moduleHelpers[l],r=e(".fl-builder-settings #fl-"+i),a=r.parent().attr("data-preview-text"),d=t.find("#fl-field-"+a),u=s[a],c=e('select[name="'+a+'"]'),h=document.createElement("div"),f=!0;return c.length>0&&(u=c.find('option[value="'+s[a]+'"]').text()),"undefined"!=typeof n&&(t.find("label.error").remove(),t.validate().hideErrors(),f=t.validate().form(),f&&(f=n.submit())),f?("undefined"!=typeof a&&"undefined"!=typeof u&&("icon"===d.data("type")?u='<i class="'+u+'"></i>':u.length>35&&(h.innerHTML=u,u=(h.textContent||h.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),r.siblings(".fl-form-field-preview-text").html(u)),o=r.siblings("input").val().replace(/&#39;/g,"'"),""!=o&&(s=e.extend(JSON.parse(o),s)),r.siblings("input").val(JSON.stringify(s)).trigger("change"),FLBuilder._closeNestedSettings(),!0):(FLBuilder._toggleSettingsTabErrors(),!1)},_layoutFieldClicked:function(){var t=e(this);t.siblings().removeClass("fl-layout-field-option-selected"),t.addClass("fl-layout-field-option-selected"),t.siblings("input").val(t.attr("data-value"))},_initLinkFields:function(){e(".fl-builder-settings:visible .fl-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var t=e(this),i=t.find(".fl-link-field-search-input");i.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links",_wpnonce:FLBuilderConfig.ajaxNonce}),{asHtmlID:i.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:3,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,queryParam:"fl_as_query",selectionLimit:1,afterSelectionAdd:FLBuilder._updateLinkField})},_updateLinkField:function(e,t,i){var l=e.closest(".fl-link-field"),s=l.find(".fl-link-field-search"),o=l.find(".fl-link-field-search-input"),n=l.find(".fl-link-field-input");n.val(t.value).trigger("keyup"),o.autoSuggest("remove",t.value),s.hide()},_linkFieldSelectClicked:function(){var t=e(this).closest(".fl-link-field").find(".fl-link-field-search");t.show(),t.find("input").focus()},_linkFieldSelectCancelClicked:function(){var t=e(this);t.parent().hide(),t.closest(".fl-link-field").find("input.fl-link-field-input").focus()},_initFontFields:function(){e(".fl-builder-settings:visible .fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var t=e(this),i=t.attr("data-value"),l=t.find(".fl-font-field-font"),s=t.find(".fl-font-field-weight");l.on("change",function(){FLBuilder._getFontWeights(l)}),i.indexOf("family")>-1&&(i=JSON.parse(i),l.val(i.family),l.trigger("change"),s.find("option[value="+i.weight+"]").length&&s.val(i.weight))},_getFontWeights:function(t){var i=t.next(".fl-font-field-weight"),l=t.val(),s={"default":"Default",regular:"Regular",100:"Thin 100",200:"Extra-Light 200",300:"Light 300",400:"Normal 400",500:"Medium 500",600:"Semi-Bold 600",700:"Bold 700",800:"Extra-Bold 800",900:"Ultra-Bold 900"},o={};i.html(""),o="undefined"!=typeof FLBuilderFontFamilies.system[l]?FLBuilderFontFamilies.system[l].weights:"undefined"!=typeof FLBuilderFontFamilies.google[l]?FLBuilderFontFamilies.google[l]:FLBuilderFontFamilies["default"][l],e.each(o,function(e,t){i.append('<option value="'+t+'">'+s[t]+"</option>")})},_initTinyMCE:function(){tinymce.ui.FloatPanel.zIndex=100100,e(".fl-builder-hidden-editor").each(FLBuilder._initEditorField)},_initEditorFields:function(){e(".fl-builder-settings:visible .fl-editor-field").each(FLBuilder._initEditorField)},_initEditorField:function(){var t=e(this),i=t.find("textarea"),l=t.attr("data-name"),s="flrich"+(new Date).getTime()+"_"+l,o=FLBuilderConfig.wp_editor,n=tinyMCEPreInit,r=Number(t.attr("data-buttons")),a=t.attr("data-rows"),d=null,u=null;o=o.replace(/flbuildereditor/g,s),n=JSON.parse(JSON.stringify(n).replace(/flbuildereditor/g,s)),i.after(o).remove(),e("textarea#"+s).val(i.val()),void 0!==typeof tinymce&&void 0!==n.mceInit[s]&&(d=n.mceInit[s],u=tinymce.$("#wp-"+s+"-wrap"),u.find("textarea").attr("rows",a),r||u.find(".wp-media-buttons").remove(),!u.hasClass("tmce-active")&&n.qtInit.hasOwnProperty(s)||d.wp_skip_init||tinymce.init(d)),void 0!==typeof quicktags&&quicktags(n.qtInit[s]),window.wpActiveEditor=s},_reinitEditorFields:function(){e(".fl-lightbox-resizable:visible").length&&setTimeout(function(){var t,i;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)i=tinymce.editors[t].id,tinyMCE.execCommand("mceRemoveEditor",!0,i),tinyMCE.execCommand("mceAddEditor",!0,i);FLBuilder.preview&&FLBuilder.preview._initDefaultFieldPreviews(e('.fl-field[data-type="editor"]'))}},1)},_destroyEditorFields:function(){var t;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[t].id);e(".wplink-autocomplete").remove(),e(".ui-helper-hidden-accessible").remove()}},_updateEditorFields:function(){var t=e(".fl-builder-settings:visible textarea.wp-editor-area");t.each(FLBuilder._updateEditorField)},_updateEditorField:function(){var t=e(this),i=t.closest(".fl-editor-field"),l=(t.closest(".fl-builder-settings"),t.closest(".wp-editor-wrap")),s=t.attr("id"),o=i.attr("data-name"),n="undefined"!=typeof tinyMCE&&tinyMCE.get(s),r=t.siblings('textarea[name="'+o+'"]'),a=i.data("wpautop");0===r.length&&(r=e('<textarea name="'+o+'"></textarea>').hide(),t.after(r)),a?n&&l.hasClass("tmce-active")?r.val(n.getContent()):"undefined"!=typeof switchEditors?r.val(switchEditors.wpautop(t.val())):r.val(t.val()):(n&&l.hasClass("tmce-active")&&n.save(),r.val(t.val()))},_loopDataSourceChange:function(){var t=e(this).val();e(".fl-loop-data-source").hide(),e('.fl-loop-data-source[data-source="'+t+'"]').show()},_customQueryPostTypeChange:function(){var t=e(this).val();e(".fl-custom-query-filter").hide(),e(".fl-custom-query-"+t+"-filter").show()},_initOrderingFields:function(){e(".fl-builder-settings:visible .fl-ordering-field-options").each(FLBuilder._initOrderingField)},_initOrderingField:function(){e(this).sortable({items:".fl-ordering-field-option",containment:"parent",tolerance:"pointer",stop:FLBuilder._updateOrderingField})},_updateOrderingField:function(t){var i=e(t.target),l=i.siblings("input[type=hidden]"),s=[];i.find(".fl-ordering-field-option").each(function(){s.push(e(this).attr("data-key"))}),l.val(JSON.stringify(s)).trigger("change")},_onNumberFieldFocus:function(t){var i=e(t.currentTarget);i.addClass("mousetrap"),Mousetrap.bind("up",function(){i.attr("step",1)}),Mousetrap.bind("down",function(){i.attr("step",1)}),Mousetrap.bind("shift+up",function(){i.attr("step",10)}),Mousetrap.bind("shift+down",function(){i.attr("step",10)})},_onNumberFieldBlur:function(t){var i=e(t.currentTarget);i.attr("step",1).removeClass("mousetrap")},_initTimezoneFields:function(){e(".fl-builder-settings:visible .fl-field[data-type=timezone]").each(FLBuilder._initTimezoneField)},_initTimezoneField:function(){var t=e(this).find("select"),i=t.attr("data-value");t.find('option[value="'+i+'"]').attr("selected","selected")},ajax:function(t,i){var l;FLBuilder.triggerHook("didBeginAJAX",t);for(l in t)"undefined"==typeof t[l]&&(t[l]=null);return t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=FLBuilderConfig.postId,t.fl_builder=1,t.fl_action=t.action,"undefined"!=typeof t.settings&&(t.settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.settings))),"undefined"!=typeof t.node_settings&&(t.node_settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.node_settings))),t={fl_builder_data:t},e.post(FLBuilder._ajaxUrl(),t,function(e){FLBuilder._ajaxComplete(),"undefined"!=typeof i&&i.call(this,e),FLBuilder.triggerHook("didCompleteAJAX",t)})},_ajaxComplete:function(){FLBuilder.hideAjaxLoader()},_ajaxUrl:function(e){var t=window.location.href.split("#").shift(),i=null;if("undefined"!=typeof e)for(i in e)t+=t.indexOf("?")>-1?"&":"?",t+=i+"="+e[i];return t},showAjaxLoader:function(){0===e(".fl-builder-lightbox-loading").length&&e(".fl-builder-loading").show()},hideAjaxLoader:function(){e(".fl-builder-loading").hide()},_showNodeLoading:function(t){var i=e(".fl-node-"+t);i.addClass("fl-builder-node-loading")},_hideNodeLoading:function(t){var i=e(".fl-node-"+t);i.removeClass("fl-builder-node-loading")},_showNodeLoadingPlaceholder:function(t,i){var l=e('<div class="fl-builder-node-loading-placeholder"></div>');t.hasClass("fl-builder-content")?siblings=t.find(".fl-row"):t.hasClass("fl-row-content")?siblings=t.find(" > .fl-col-group"):t.hasClass("fl-col-group")?(t.addClass("fl-col-group-has-child-loading"),siblings=t.find(" > .fl-col")):siblings=t.find(" > .fl-col-group, > .fl-module"),0===siblings.length||siblings.length==i?t.append(l):siblings.eq(i).before(l)},_removeNodeLoadingPlaceholder:function(e){var t=e.prev(".fl-builder-node-loading-placeholder"),i=e.next(".fl-builder-node-loading-placeholder");t.length?t.remove():i.remove()},_ajaxModSecFix:function(e){var t;if(FLBuilderConfig.modSecFix&&"undefined"!=typeof btoa)if("string"==typeof e)e=FLBuilder._btoa(e);else for(t in e)"string"==typeof e[t]?e[t]=FLBuilder._btoa(e[t]):"object"==typeof e[t]&&(e[t]=FLBuilder._ajaxModSecFix(e[t]));return e},_btoa:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},_wpmedia_reset_errors:function(){e(".upload-error").remove(),e(".media-uploader-status").removeClass("errors").hide()},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox",resizable:!0}),FLBuilder._lightbox.on("resized",FLBuilder._calculateSettingsTabsOverflow),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._lightbox.on("beforeCloseLightbox",FLBuilder._destroyEditorFields),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_showLightbox:function(){FLBuilder._lightbox.open('<div class="fl-builder-lightbox-loading"></div>'),FLBuilder._removeAllOverlays(),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder.triggerHook("settings-lightbox-closed"),FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout)},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder.triggerHook("actions-lightbox-settings",e),FLBuilder._actionsLightbox.open(t(e))},alert:function(e){var t=new FLLightbox({className:"fl-builder-alert-lightbox",destroyOnClose:!0}),i=wp.template("fl-alert-lightbox");t.open(i({message:e}))},_alertClose:function(){FLLightbox.closeParent(this)},confirm:function(t){var i={message:"",ok:function(){},cancel:function(){},strings:{ok:FLBuilderStrings.ok,cancel:FLBuilderStrings.cancel}},l=e.extend({},i,"undefined"==typeof t?{}:t);lightbox=new FLLightbox({className:"fl-builder-confirm-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),template=wp.template("fl-confirm-lightbox"),lightbox.open(template(l)),lightbox._node.find(".fl-builder-confirm-ok").on("click",l.ok),lightbox._node.find(".fl-builder-confirm-cancel").on("click",l.cancel)},triggerHook:function(t,i){e("body").trigger("fl-builder."+t,i)},addHook:function(t,i){e("body").on("fl-builder."+t,i)},removeHook:function(t,i){e("body").off("fl-builder."+t,i)},log:function(e){"undefined"!=typeof window.console&&"undefined"!=typeof window.console.log&&console.log(e)},logError:function(e){var t=null;"undefined"!=typeof e&&("undefined"!=typeof e.stack?t=e.stack:"undefined"!=typeof e.message&&(t=e.message),t&&(FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(t),FLBuilder.log("************************************************************************")))},logGlobalError:function(e,t,i,l,s){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",i).replace("{file}",t)),"undefined"!=typeof s&&"undefined"!=typeof s.stack&&(FLBuilder.log(s.stack),FLBuilder.log("************************************************************************"))}},e(function(){FLBuilder._init()})}(jQuery),function(e){FLBuilderAJAXLayout=function(t,i){this._data=e.extend({},this._defaults,"string"==typeof t?JSON.parse(t):t),this._callback=i,this._post=FLBuilderConfig.postId,this._head=e("head").eq(0),this._body=e("body").eq(0),this._data.css&&(this._loader=e('<img src="'+this._data.css+'" />'),this._oldCss=e('link[href*="/cache/'+this._post+'"]'),this._newCss=e('<link rel="stylesheet" id="fl-builder-layout-'+this._post+'-css" href="'+this._data.css+'" />')),this._data.partial?(this._data.js&&(this._oldJs=e("#fl-builder-partial-refresh-js"),this._newJs=e('<script type="text/javascript" id="fl-builder-partial-refresh-js">'+this._data.js+"</script>")),this._data.nodeId&&(this._data.oldNodeId?(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.oldNodeId+'"]'),this._content=e(".fl-node-"+this._data.oldNodeId)):(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.nodeId+'"]'),this._content=e(".fl-node-"+this._data.nodeId).eq(0)))):(this._oldJs=e('script[src*="/cache/'+this._post+'"]'),this._newJs=e('<script src="'+this._data.js+'"></script>'),this._oldScriptsStyles=e(".fl-builder-layout-scripts-styles"),this._content=e(FLBuilder._contentClass)),this._init()},FLBuilderAJAXLayout.prototype={_defaults:{partial:!1,nodeId:null,nodeType:null,nodeParent:null,nodePosition:null,oldNodeId:null,html:null,scriptsStyles:null,css:null,js:null},_data:null,_callback:function(){},_post:null,_head:null,_body:null,_loader:null,_oldCss:null,_newCss:null,_oldJs:null,_newJs:null,_oldScriptsStyles:null,_content:null,_init:function(){this._body.height(this._body.height()),this._loader?(this._loader.on("error",e.proxy(this._loadNewCSSComplete,this)),this._body.append(this._loader)):this._finish()},_loadNewCSSComplete:function(){this._loader.remove(),this._oldCss.length>0?this._oldCss.after(this._newCss):this._head.append(this._newCss),setTimeout(e.proxy(this._finish,this),250)},_finish:function(){this._removeOldContentAndAssets(),this._cleanNewHTML(),this._cleanNewAssets(),this._addNewHTML(),this._addNewScriptsStyles(),this._addNewJS(),e(FLBuilder._contentClass).trigger("fl-builder.layout-rendered"),FLBuilder.hideAjaxLoader(),"undefined"!=typeof this._callback&&this._callback(),FLBuilder.triggerHook("didRenderLayoutComplete")},_removeOldContentAndAssets:function(){this._content&&this._content.empty(),this._oldCss&&this._oldCss.remove(),this._oldJs&&this._oldJs.remove(),this._oldScriptsStyles&&this._oldScriptsStyles.remove()},_cleanNewHTML:function(){if(this._data.scriptsStyles){var t=e("<div>"+this._data.html+"</div>"),i="fl-row",l=this._data.scriptsStyles,s="";this._data.partial&&(i="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),t.find("> *, script").each(function(){e(this).hasClass(i)||(s=e(this).remove(),l+=s[0].outerHTML)}),""!==l&&(l=this._data.partial?'<div class="fl-builder-node-scripts-styles" data-node="'+this._data.nodeId+'">'+l+"<div>":'<div class="fl-builder-node-scripts-styles">'+l+"<div>"),this._data.html=t.html(),this._data.scriptsStyles=l}},_addNewHTML:function(){var t;this._data.partial?this._data.nodeParent?(t=this._data.nodeParent.hasClass("fl-builder-content")?this._data.nodeParent.find(".fl-row"):this._data.nodeParent.hasClass("fl-row-content")?this._data.nodeParent.find(" > .fl-col-group"):this._data.nodeParent.hasClass("fl-col-group")?this._data.nodeParent.find(" > .fl-col"):this._data.nodeParent.find(" > .fl-col-group, > .fl-module"),t=t.filter(":not(.fl-builder-node-clone)"),0===t.length||t.length==this._data.nodePosition?this._data.nodeParent.append(this._data.html):t.eq(this._data.nodePosition).before(this._data.html),this._data.nodeId&&FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+this._data.nodeId))):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.html),FLBuilder.preview&&this._data.nodeId&&this._data.nodeId!=FLBuilder.preview.nodeId&&e(FLBuilder.preview.classes.node).length&&e(FLBuilder.preview.classes.node).html(FLBuilder.preview.elements.node.html())},_cleanNewAssets:function(){var t=this;this._data.html=this._removeDuplicateAssets(this._data.html),this._data.scriptsStyles&&""!==this._data.scriptsStyles&&(this._data.scriptsStyles=this._removeDuplicateAssets(this._data.scriptsStyles)),this._data.partial?e(".fl-builder-node-scripts-styles").each(function(){t._data.html.indexOf("fl-node-"+e(this).data("node"))>-1&&e(this).remove()}):(e("#fl-builder-partial-refresh-js").remove(),e(".fl-builder-node-scripts-styles").remove())},_removeDuplicateAssets:function(t){var i=e("<div>"+t+"</div>"),l="",s=null,o="",n=null,r=window.location,a=r.protocol+"//"+r.hostname+(r.port?":"+r.port:"");return i.find("script").each(function(){l=e(this).attr("src"),"undefined"!=typeof l&&(l=l.replace(a,""),s=e('script[src*="'+l+'"]'),s.length>0&&e(this).remove())}),i.find("link").each(function(){o=e(this).attr("href"),"undefined"!=typeof o&&(o=o.replace(a,""),n=e('link[href*="'+o+'"]'),n.length>0&&e(this).remove())}),i.html()},_addNewScriptsStyles:function(){this._data.scriptsStyles&&""!==this._data.scriptsStyles&&this._body.append(this._data.scriptsStyles)},_addNewJS:function(){setTimeout(e.proxy(function(){this._newJs&&this._head.append(this._newJs)},this),50)},_complete:function(){FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._resizeLayout(),FLBuilder._initMediaElements(),FLBuilderLayout.init(),FLBuilderResponsiveEditing.refreshPreview(),this._body.height("auto")}}}(jQuery),function(e){FLBuilderPreview=function(e){this.type=e.type,this._saveState(),e.layout?FLBuilder._renderLayout(e.layout,function(){this._init(),e.callback&&e.callback()}.bind(this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.prototype={type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_styleSheetMedium:null,_styleSheetResponsive:null,_timeout:null,_loaderTimeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=e(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),this._createSheets(),this._initResponsivePreviews(),this._initDefaultFieldPreviews(),this.type){case"row":this._initRow();break;case"col":this._initColumn();break;case"module":this._initModule()}},_saveSettings:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings");this._savedSettings=FLBuilder._getSettings(t)},_settingsHaveChanged:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=FLBuilder._getSettings(t);return JSON.stringify(this._savedSettings)!=JSON.stringify(i)},_initElementsAndClasses:function(){var t;t="row"==this.type?".fl-row-content-wrap":".fl-"+this.type+"-content",e.extend(this.classes,{settings:".fl-builder-"+this.type+"-settings",settingsHeader:".fl-builder-"+this.type+"-settings .fl-lightbox-header",node:FLBuilder._contentClass+" .fl-node-"+this.nodeId,content:FLBuilder._contentClass+" .fl-node-"+this.nodeId+" > "+t}),e.extend(this.elements,{settings:e(this.classes.settings),settingsHeader:e(this.classes.settingsHeader),node:e(this.classes.node),content:e(this.classes.content)})},_createSheets:function(){this._destroySheets(),this._styleSheet||(this._styleSheet=new FLStyleSheet({id:"fl-builder-preview",className:"fl-builder-preview-style"})),this._styleSheetMedium||(this._styleSheetMedium=new FLStyleSheet({id:"fl-builder-preview-medium",className:"fl-builder-preview-style"})),this._styleSheetResponsive||(this._styleSheetResponsive=new FLStyleSheet({id:"fl-builder-preview-responsive",className:"fl-builder-preview-style"}))},_destroySheets:function(){this._styleSheet&&(this._styleSheet.destroy(),this._styleSheet=null),this._styleSheetMedium&&(this._styleSheetMedium.destroy(),this._styleSheetMedium=null),this._styleSheetResponsive&&(this._styleSheetResponsive.destroy(),this._styleSheetResponsive=null)},updateCSSRule:function(e,t,i){this._styleSheet.updateRule(e,t,i)},delay:function(e,t){this._cancelDelay(),this._timeout=setTimeout(t,e)},_cancelDelay:function(){null!==this._timeout&&clearTimeout(this._timeout)},hexToRgb:function(e){var t=parseInt(e,16),i=t>>16&255,l=t>>8&255,s=255&t;return[i,l,s]},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_initResponsivePreviews:function(){FLBuilder.addHook("responsive-editing-switched",e.proxy(this._responsiveEditingSwitched,this))},_destroyResponsivePreviews:function(){FLBuilder.removeHook("responsive-editing-switched")},_responsiveEditingSwitched:function(e,t){"default"==t?(this._styleSheetMedium.disable(),this._styleSheetResponsive.disable()):"medium"==t?(this._styleSheetMedium.enable(),this._styleSheetResponsive.disable()):"responsive"==t&&(this._styleSheetMedium.disable(),this._styleSheetResponsive.enable())},updateResponsiveCSSRule:function(e,t,i){var l=FLBuilderResponsiveEditing._mode,s="default"==l?"":l.charAt(0).toUpperCase()+l.slice(1);this["_styleSheet"+s].updateRule(e,t,i)},_saveState:function(){var t=FLBuilderConfig.postId,i=e('link[href*="/cache/'+t+'"]').attr("href"),l=e('script[src*="/cache/'+t+'"]').attr("src"),s=e(FLBuilder._contentClass).html();this.state={css:i,js:l,html:s}},preview:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=t.attr("data-node"),l=FLBuilder._getSettings(t);FLBuilder._showNodeLoading(i),this._cancelPreview(),this._xhr=FLBuilder.ajax({action:"render_layout",node_id:i,node_preview:l},e.proxy(this._renderPreview,this))},delayPreview:function(t){var i="undefined"==typeof t?[]:e(t.target).closest("tr").find("th"),l=e(".fl-builder-widget-settings .fl-builder-settings-title"),s=e(".fl-builder-settings .fl-lightbox-header"),o=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.svg",n=e('<img class="fl-builder-preview-loader" src="'+o+'" />');this.delay(1e3,e.proxy(this.preview,this)),this._loaderTimeout=setTimeout(function(){e(".fl-builder-preview-loader").remove(),i.length>0?i.append(n):l.length>0?l.append(n):s.length>0&&s.append(n)},1500)},_cancelPreview:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)},_renderPreview:function(t){this._xhr=null,FLBuilder._renderLayout(t,e.proxy(this._renderPreviewComplete,this))},_renderPreviewComplete:function(){this._createSheets(),this._initElementsAndClasses(),null!==this._loaderTimeout&&clearTimeout(this._loaderTimeout),e(".fl-builder-preview-loader").remove(),e(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){return this._settingsHaveChanged()?void FLBuilder._updateNode(this.nodeId,function(){this.clear()}.bind(this)):void this.clear()},cancel:function(){this._cancelDelay(),this._cancelPreview()},clear:function(){this.cancel(),this._destroySheets(),this._destroyResponsivePreviews()},_initNodeTextColor:function(){e.extend(this.elements,{textColor:e(this.classes.settings+" input[name=text_color]"),linkColor:e(this.classes.settings+" input[name=link_color]"),hoverColor:e(this.classes.settings+" input[name=hover_color]"),headingColor:e(this.classes.settings+" input[name=heading_color]")}),this.elements.textColor.on("change",e.proxy(this._textColorChange,this)),this.elements.linkColor.on("change",e.proxy(this._textColorChange,this)),this.elements.hoverColor.on("change",e.proxy(this._textColorChange,this)),this.elements.headingColor.on("change",e.proxy(this._textColorChange,this))},_textColorChange:function(t){var i=this.elements.textColor.val(),l=this.elements.linkColor.val(),s=this.elements.hoverColor.val(),o=this.elements.headingColor.val();l=""===l?i:l,s=""===s?i:s,o=""===o?i:o,this.delay(100,e.proxy(function(){""===i?this.updateCSSRule(this.classes.node,"color","inherit"):this.updateCSSRule(this.classes.node,"color","#"+i),""===l?this.updateCSSRule(this.classes.node+" a","color","inherit"):this.updateCSSRule(this.classes.node+" a","color","#"+l),""===s?this.updateCSSRule(this.classes.node+" a:hover","color","inherit"):this.updateCSSRule(this.classes.node+" a:hover","color","#"+s),""===o?(this.updateCSSRule(this.classes.node+" h1","color","inherit"),this.updateCSSRule(this.classes.node+" h2","color","inherit"),this.updateCSSRule(this.classes.node+" h3","color","inherit"),this.updateCSSRule(this.classes.node+" h4","color","inherit"),this.updateCSSRule(this.classes.node+" h5","color","inherit"),this.updateCSSRule(this.classes.node+" h6","color","inherit"),this.updateCSSRule(this.classes.node+" h1 a","color","inherit"),this.updateCSSRule(this.classes.node+" h2 a","color","inherit"),this.updateCSSRule(this.classes.node+" h3 a","color","inherit"),this.updateCSSRule(this.classes.node+" h4 a","color","inherit"),this.updateCSSRule(this.classes.node+" h5 a","color","inherit"),this.updateCSSRule(this.classes.node+" h6 a","color","inherit")):(this.updateCSSRule(this.classes.node+" h1","color","#"+o),this.updateCSSRule(this.classes.node+" h2","color","#"+o),this.updateCSSRule(this.classes.node+" h3","color","#"+o),this.updateCSSRule(this.classes.node+" h4","color","#"+o),this.updateCSSRule(this.classes.node+" h5","color","#"+o),this.updateCSSRule(this.classes.node+" h6","color","#"+o),this.updateCSSRule(this.classes.node+" h1 a","color","#"+o),this.updateCSSRule(this.classes.node+" h2 a","color","#"+o),this.updateCSSRule(this.classes.node+" h3 a","color","#"+o),this.updateCSSRule(this.classes.node+" h4 a","color","#"+o),this.updateCSSRule(this.classes.node+" h5 a","color","#"+o),this.updateCSSRule(this.classes.node+" h6 a","color","#"+o))},this))},_initNodeBg:function(){e.extend(this.elements,{bgType:e(this.classes.settings+" select[name=bg_type]"),bgColor:e(this.classes.settings+" input[name=bg_color]"),bgColorPicker:e(this.classes.settings+" .fl-picker-bg_color"),bgOpacity:e(this.classes.settings+" input[name=bg_opacity]"),bgImageSrc:e(this.classes.settings+" select[name=bg_image_src]"),bgRepeat:e(this.classes.settings+" select[name=bg_repeat]"),bgPosition:e(this.classes.settings+" select[name=bg_position]"),bgAttachment:e(this.classes.settings+" select[name=bg_attachment]"),bgSize:e(this.classes.settings+" select[name=bg_size]"),bgVideoSource:e(this.classes.settings+" select[name=bg_video_source]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:e(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:e(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:e(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:e(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:e(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:e(this.classes.settings+" input[name=ss_speed]"),
6
  bgSlideshowTrans:e(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:e(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:e(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayColor:e(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayOpacity:e(this.classes.settings+" input[name=bg_overlay_opacity]")}),this.elements.bgType.on("change",e.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",e.proxy(this._bgColorChange,this)),this.elements.bgOpacity.on("keyup",e.proxy(this._bgOpacityChange,this)),this.elements.bgImageSrc.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgRepeat.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgPosition.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgAttachment.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgSize.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgVideoServiceUrl.on("change",e.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",e.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayColor.on("change",e.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayOpacity.on("keyup",e.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val();this.elements.node.removeClass("fl-row-bg-video"),this.elements.node.removeClass("fl-row-bg-slideshow"),this.elements.node.removeClass("fl-row-bg-parallax"),this.elements.node.find(".fl-bg-video").remove(),this.elements.node.find(".fl-bg-slideshow").remove(),this.elements.content.css("background-image",""),this.updateCSSRule(this.classes.content,{"background-color":"transparent","background-image":"none"}),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.bgImageSrc.trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(t){var i,l,s;""===this.elements.bgColor.val()||isNaN(this.elements.bgOpacity.val())?this.updateCSSRule(this.classes.content,"background-color","transparent"):(i=this.hexToRgb(this.elements.bgColor.val()),l=this.parseFloat(this.elements.bgOpacity.val())/100,s="rgba("+i.join()+", "+l+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",s)},this)))},_bgOpacityChange:function(e){this.elements.bgColor.trigger("change")},_bgPhotoChange:function(e){this.elements.bgImageSrc.val()?this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgImageSrc.val()+")","background-repeat":this.elements.bgRepeat.val(),"background-position":this.elements.bgPosition.val(),"background-attachment":this.elements.bgAttachment.val(),"background-size":this.elements.bgSize.val()}):this.updateCSSRule(this.classes.content,{"background-image":"none"})},_bgVideoChange:function(t){var i=this.elements,l=i.bgVideoSource.val(),s=i.bgVideo.val(),o=i.bgVideoServiceUrl.val(),n="https://www.youtube.com/iframe_api",r="https://player.vimeo.com/api/player.js",a=e("<script>");"video_service"==l&&""!=o?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(o)&&e('script[src*="youtube.com"').length<1?a.attr("src",n):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(o)&&e('script[src*="vimeo.com"').length<1&&a.attr("src",r),a.attr("type","text/javascript").appendTo("head"),this.delay(500,e.proxy(this.preview,this))):""!=s&&this.preview()},_bgSlideshowChange:function(t){var i=this.elements,l=i.bgSlideshowSource.val(),s=i.bgSlideshowPhotos.val(),o=i.bgSlideshowFeedUrl.val(),n=i.bgSlideshowSpeed.val(),r=i.bgSlideshowTransSpeed.val();"wordpress"==l&&""===s||"smugmug"==l&&""===o||isNaN(parseInt(n))||isNaN(parseInt(r))||this.delay(500,e.proxy(this.preview,this))},_bgParallaxChange:function(e){this.elements.bgParallaxImageSrc.val()&&this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgParallaxImageSrc.val()+")","background-repeat":"no-repeat","background-position":"center center","background-attachment":"fixed","background-size":"cover"})},_bgOverlayChange:function(t){var i,l,s;""===this.elements.bgOverlayColor.val()||isNaN(this.elements.bgOverlayOpacity.val())?(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+":after","background-color","transparent")):(i=this.hexToRgb(this.elements.bgOverlayColor.val()),l=this.parseFloat(this.elements.bgOverlayOpacity.val())/100,s="rgba("+i.join()+", "+l+")",this.delay(100,e.proxy(function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay"),this.updateCSSRule(this.classes.content+":after","background-color",s)},this)))},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click")},_initNodeBorder:function(){e.extend(this.elements,{borderType:e(this.classes.settings+" select[name=border_type]"),borderColor:e(this.classes.settings+" input[name=border_color]"),borderColorPicker:e(this.classes.settings+" .fl-picker-border_color"),borderOpacity:e(this.classes.settings+" input[name=border_opacity]")}),this.elements.borderType.on("change",e.proxy(this._borderTypeChange,this)),this.elements.borderColor.on("change",e.proxy(this._borderColorChange,this)),this.elements.borderOpacity.on("keyup",e.proxy(this._borderOpacityChange,this))},_borderTypeChange:function(e){var t=this.elements.borderType.val();this.updateCSSRule(this.classes.content,{"border-style":""===t?"none":t}),this.elements.borderColor.trigger("change"),this.elements.borderTop.trigger("keyup")},_borderColorChange:function(t){var i,l,s;""===this.elements.borderColor.val()||isNaN(this.elements.borderOpacity.val())?this.updateCSSRule(this.classes.content,"border-color","transparent"):(i=this.hexToRgb(this.elements.borderColor.val()),l=parseInt(this.elements.borderOpacity.val())/100,s="rgba("+i.join()+", "+l+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"border-color",s)},this)))},_borderOpacityChange:function(e){this.elements.borderColor.trigger("change")},_initNodeClassName:function(){e.extend(this.elements,{className:e(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",e.proxy(this._classNameChange,this)),this._lastClassName=this.elements.className.val()},_classNameChange:function(e){var t=this.elements.className.val();null!==this._lastClassName&&this.elements.node.removeClass(this._lastClassName),this.elements.node.addClass(t),this._lastClassName=t},_initResponsiveDimensions:function(t){var i={},l=["Top","Bottom","Left","Right"],s=["","Medium","Responsive"],o=this.classes.settings,n="",r="",a=null,d=null;for(a=0;a<l.length;a++)for(d=0;d<s.length;d++)n=t+l[a]+s[d],r=t+"_"+l[a].toLowerCase(),""!=s[d]&&(r+="_"+s[d].toLowerCase()),i[n]=e(o+" input[name="+r+"]"),i[n].on("keyup",e.proxy(this._responsiveDimensionChange,this,t));e.extend(this.elements,i)},_getDimensions:function(e){for(var t=FLBuilderResponsiveEditing._mode,i=["Top","Bottom","Left","Right"],l="default"==t?"":t.charAt(0).toUpperCase()+t.slice(1),s={},o=0;o<i.length;o++)s[i[o].toLowerCase()]=this.elements[e+i[o]+l].val();return this._normalizeDimensionValues(s,e)},_responsiveDimensionChange:function(t){var i=this._getDimensions(t),l={},s="border"==t;e.each(i,function(e,i){l[t+"-"+e+(s?"-width":"")]=i}),this.updateResponsiveCSSRule(this.classes.content,l),this._positionAbsoluteBgs()},_normalizeDimensionValues:function(t,i){var l=this,s=FLBuilderResponsiveEditing._mode,o="default"==s?"":s.charAt(0).toUpperCase()+s.slice(1),i=i.split("-");return"undefined"==typeof i[1]?i[1]="":i[1]=i[1].charAt(0).toUpperCase()+i[1].slice(1),e.map(t,function(e,s){if(e=e.toLowerCase().replace(/[^a-z0-9%.\-]/g,""),""===e){var n=i[0]+s.charAt(0).toUpperCase()+s.slice(1)+i[1]+o,r=l.elements[n].attr("placeholder");r&&(e=r)}null===e||""===e||isNaN(e)||(e=parseFloat(e)+"px"),t[s]=e}),t},_positionAbsoluteBgs:function(){var t=this.elements.node.find(".fl-bg-slideshow"),i=this.elements.node.find(".fl-bg-video"),l=null,s=null,o={top:0,bottom:0,left:0,right:0};(t.length>0||i.length>0)&&(l=this._getDimensions("margin"),s=this._getDimensions("border"),e.map(o,function(e,t){l[t]&&s[t]?o[t]="calc("+l[t]+"+"+s[t]+")":l[t]?o[t]=l[t]:s[t]&&(o[t]=s[t])}),t.length>0&&(this.updateCSSRule(this.classes.node+" .fl-bg-slideshow",o),FLBuilder._resizeLayout()),i.length>0&&this.updateCSSRule(this.classes.node+" .fl-bg-video",o))},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),contentWidth:e(this.classes.settings+" select[name=content_width]"),maxContentWidth:e(this.classes.settings+" input[name=max_content_width]"),height:e(this.classes.settings+" select[name=full_height]"),align:e(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("keyup",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.align.on("change",e.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeBorder(),this._initResponsiveDimensions("border"),this._initResponsiveDimensions("margin"),this._initResponsiveDimensions("padding")},_rowWidthChange:function(e){var t=this.elements.node,i=this.elements.maxContentWidth.val();"full"==this.elements.width.val()?(t.css("max-width","none"),t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"),""!==i?t.css("max-width",i+"px"):t.css("max-width",FLBuilderConfig.global.row_width+"px"))},_rowHeightChange:function(e){var t=this.elements.node;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val())):t.removeClass("fl-row-full-height")},_rowContentWidthChange:function(e){var t=this.elements.content.find(".fl-row-content"),i=this.elements.maxContentWidth.val();"full"==this.elements.contentWidth.val()?(t.css("max-width","none"),t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"),""!==i?t.css("max-width",i+"px"):t.css("max-width",FLBuilderConfig.global.row_width+"px"))},_rowMaxContentWidthChange:function(e){var t=this.elements.node,i=this.elements.content.find(".fl-row-content"),l=this.elements.maxContentWidth.val();""==l?l=FLBuilderConfig.global.row_width+"px":l+="px","fixed"==this.elements.width.val()&&t.css("max-width",l),"fixed"==this.elements.contentWidth.val()&&i.css("max-width",l)},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),columnHeight:e(this.classes.settings+" select[name=equal_height]"),columnAlign:e(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:e(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("keyup",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",e.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",e.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeBorder(),this._initResponsiveDimensions("border"),this._initResponsiveDimensions("margin"),this._initResponsiveDimensions("padding")},_colSizeChange:function(){var t=8,i=100-t,l=parseFloat(this.elements.size.val()),s=this.elements.node.prev(".fl-col"),o=this.elements.node.next(".fl-col"),n=0===o.length?s:o,r=this.elements.node.siblings(".fl-col"),a=0;0===r.length||isNaN(l)||(r.each(function(){e(this).data("node")!=n.data("node")&&(i-=parseFloat(e(this)[0].style.width),a+=parseFloat(e(this)[0].style.width))}),l<t&&(l=t),l>i&&(l=i),n.css("width",100-a-l+"%"),this.elements.node.css("width",l+"%"))},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initResponsiveDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var e=_.isUndefined(e)?this.elements.settings.find(".fl-field"):e,t=null,i=null,l=0;l<e.length;l++)t=e.eq(l),i=t.data("preview"),"refresh"==i.type&&this._initFieldRefreshPreview(t),"text"==i.type&&this._initFieldTextPreview(t),"css"==i.type&&this._initFieldCSSPreview(t),"widget"==i.type&&this._initFieldWidgetPreview(t),"font"==i.type&&this._initFieldFontPreview(t)},_initFieldRefreshPreview:function(t){var i=t.data("type"),l=t.data("preview"),s=e.proxy(this.delayPreview,this);switch(i){case"text":t.find("input[type=text]").on("keyup",s);break;case"textarea":t.find("textarea").on("keyup",s);break;case"select":t.find("select").on("change",s);break;case"color":t.find(".fl-color-picker-value").on("change",s);break;case"photo":t.find("select").on("change",s);break;case"multiple-photos":t.find("input").on("change",s);break;case"photo-sizes":t.find("select").on("change",s);break;case"video":t.find("input").on("change",s);break;case"multiple-audios":t.find("input").on("change",s);break;case"icon":t.find("input").on("change",s);break;case"form":t.delegate("input","change",s);break;case"editor":this._addTextEditorCallback(t,l);break;case"code":t.find("textarea").on("change",s);break;case"post-type":t.find("select").on("change",s);break;case"suggest":t.find(".as-values").on("change",s),t.find("select").on("change",s);break;case"unit":t.find("input[type=number]").on("keyup",s);break;case"ordering":t.find("input[type=hidden]").on("change",s)}},_initFieldTextPreview:function(t){var i=t.data("type"),l=t.data("preview"),s=e.proxy(this._previewText,this,l);switch(i){case"text":t.find("input[type=text]").on("keyup",s);break;case"unit":t.find("input[type=number]").on("keyup",s);break;case"textarea":t.find("textarea").on("keyup",s);break;case"code":t.find("textarea").on("change",s);break;case"editor":this._addTextEditorCallback(t,l)}},_previewText:function(t,i){var l=this.elements.node.find(t.selector),s=e("<div>"+e(i.target).val()+"</div>");l.length>0&&(s.find("script").remove(),l.html(s.html()))},_previewTextEditor:function(t,i,l){var s=this.elements.node.find(t.selector),o="undefined"!=typeof tinyMCE?tinyMCE.get(i):null,n=e("#"+i),r="";s.length>0&&(r=e(o&&"none"==n.css("display")?"<div>"+o.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+n.val()+"</div>":"<div>"+switchEditors.wpautop(n.val())+"</div>"),r.find("script").remove(),s.html(r.html()))},_addTextEditorCallback:function(t,i){var l=t.find("textarea.wp-editor-area").attr("id"),s=null;if("refresh"==i.type)s=e.proxy(this.delayPreview,this);else{if("text"!=i.type)return;s=e.proxy(this._previewTextEditor,this,i,l)}e("#"+l).on("keyup",s),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(l),editor.on("change",s),editor.on("keyup",s))},_initFieldFontPreview:function(t){var i=t.data("type"),l=t.data("preview");l.id=t.attr("id");var s=e.proxy(this._previewFont,this,l);"font"==i&&t.find(".fl-font-field").on("change","select",s)},_previewFont:function(t,i){var l=e(i.delegateTarget),s=l.find(".fl-font-field-font"),o=e(s).find(":selected"),n=o.parent().attr("label"),r=l.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector);"Google"==n&&this._buildFontStylesheet(a,s.val(),r.val()),"Default"==s.val()?(this.updateCSSRule(d,"font-family",""),this.updateCSSRule(d,"font-weight","")):(this.updateCSSRule(d,"font-family",s.val()),this.updateCSSRule(d,"font-weight",r.val()))},_buildFontStylesheet:function(t,i,l){var s=FLBuilderConfig.googleFontsUrl,o="",n={},r={};n[i]=[l],FLBuilderPreview._fontsList[t]=n,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var i=t[e];r[e]=r[e]||[],i=i.filter(function(t){return r[e].indexOf(t)<0}),r[e]=r[e].concat(i)})}),e.each(r,function(e,t){o+=e+":"+t.join()+"|"}),o=s+o.slice(0,-1).replace(" ","+"),e("#fl-builder-google-fonts-preview").length<1?e("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",o).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",o)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if("undefined"!=typeof t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,i){switch(t.data("type")){case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,i));break;case"unit":t.find("input[type=number]").on("keyup",e.proxy(this._previewCSS,this,i));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,i));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColor,this,i))}},_previewCSS:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),s=t.property,o="undefined"==typeof t.unit?"":t.unit,n=e(i.target),r=n.val();"%"==o?r=parseInt(r)/100:""!==r&&(r+=o),n.closest(".fl-field-responsive-setting").length?this.updateResponsiveCSSRule(l,s,r):this.updateCSSRule(l,s,r)},_previewColor:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),s=e(i.target),o=s.val(),n=""===o?"inherit":"#"+o;/^rgb/.test(o.replace(/\s+/g,""))&&(n=o),s.closest(".fl-field-responsive-setting").length?this.updateResponsiveCSSRule(l,t.property,n):this.updateCSSRule(l,t.property,n)},_initFieldWidgetPreview:function(t){var i=e.proxy(this.delayPreview,this);t.find("input").on("keyup",i),t.find("input[type=checkbox]").on("click",i),t.find("textarea").on("keyup",i),t.find("select").on("change",i)},_getPreviewSelector:function(e,t){for(var i="",l=t.split(","),s=0;s<l.length;s++)l[s].indexOf("{node}")>-1?i=l[s].replace("{node}",e):i+=e+" "+l[s],s!=l.length-1&&(i+=", ");return i}}}(jQuery),function(e){var t={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+[^\}]+\}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,i.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var t=e("link"),i=null,l=null,s=null,o=null,n=!1,r=0,a=0;r<t.length;r++)if(i=t[r],l=i.href,s=i.media,o=i.rel&&"stylesheet"===i.rel.toLowerCase(),n=!1,l&&o){for(a=0;a<this.ignored.length;a++)if(l.indexOf(this.ignored[a])>-1){n=!0;break}if(n)continue;for(a=0;a<this.reparsed.length;a++)if(l.indexOf(this.reparsed[a])>-1){this.sheets[l]=null;break}void 0!==this.sheets[l]&&this.sheets[l]||this.queue.push({link:t.eq(r),href:l,media:s})}return this.queue.length},runQueue:function(){var t;this.queue.length?(t=this.queue.shift(),e.get(t.href,e.proxy(function(e){this.parse(e,t),this.runQueue()},this))):this.applyStyles()},parse:function(e,t){var i=this.regex,l=e.replace(i.comments,"").replace(i.keyframes,"").match(i.media),s=l&&l.length||0,o=!s&&t.media,n=null,r=null,a=null,d="",u=0,c=0;for(l?d=e.replace(i.media,""):o&&"all"!=t.media?s=1:d=e,this.sheets[t.href]={link:t.link,href:t.href,link:t.link,all:d,queries:[]},u=0;u<s;u++)for(o?(n=t.media,e=this.convertURLs(e,t.href)):(n=l[u].match(i.findStyles)&&RegExp.$1,e=RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),r=n.split(","),c=0;c<r.length;c++)n=r[c],a=n.split("(")[0].match(i.only)&&RegExp.$2,"print"!=a&&(n.replace(i.minmaxwh,"").match(i.other)||this.sheets[t.href].queries.push({minw:n.match(i.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:n.match(i.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:e}))},applyStyles:function(){var t=e("head"),i=null,l=null,s=null,o=null,n=null,r=null,a=null,d=null,u=!1;this.clearStyles();for(o in this.sheets)if(i="",l=e("<style></style>"),s=this.sheets[o],s.queries.length&&this.width){for(i+=s.all,r=0;r<s.queries.length;r++)n=s.queries[r],a=n.minw,d=n.maxw,u=!1,a&&(a=parseFloat(a)*(a.indexOf("em")>-1?this.getEmPxValue():1),this.width>=a&&(i+=n.styles,u=!0)),d&&!u&&(d=parseFloat(d)*(d.indexOf("em")>-1?this.getEmPxValue():1),this.width<=d&&(i+=n.styles));this.styles.push(l),t.append(l),l.html(i),s.link.remove()}},clearStyles:function(){var t=e("head"),i=null,l=this.styles.slice(0);this.styles=[];for(i in this.sheets)this.sheets[i].link.parent().length||t.append(this.sheets[i].link);setTimeout(function(){for(var e=0;e<l.length;e++)l[e].empty(),l[e].remove()},50)},convertURLs:function(e,t){return t=t.substring(0,t.lastIndexOf("/")),t.length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=null,t=window.document,i=t.documentElement,l=t.body,s=t.createElement("div"),o=i.style.fontSize,n=l&&l.style.fontSize,r=!1;return s.style.cssText="position:absolute;font-size:1em;width:1em",l||(l=r=t.createElement("body"),l.style.background="none"),i.style.fontSize="100%",l.style.fontSize="100%",l.appendChild(s),r&&i.insertBefore(l,i.firstChild),e=parseFloat(s.offsetWidth),r?i.removeChild(l):l.removeChild(s),i.style.fontSize=o,n?l.style.fontSize=n:l.style.fontSize="",this.emPxValue=e,e}},i={_functions:null,update:function(){var e;if(!this._functions){this._functions={};for(e in l)this._functions[e]=jQuery.fn[e]}if(t.width)for(e in l)jQuery.fn[e]=l[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},l={width:function(l){return void 0!=l?i._functions.width.call(this,l):e.isWindow(this[0])?t.width:i._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){t.ignore(e)},reparse:function(e){t.reparse(e)},update:function(e,i){t.update(e,i)}}}(jQuery),function(e){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(){var t;e(".fl-responsive-preview").length&&"default"!=this._mode&&("responsive"==this._mode?(t=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(t)):"medium"==this._mode&&(t=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(t)),FLBuilder._resizeLayout())},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("responsive-editing-switched",this._previewSpacingFields),FLBuilder.addHook("settings-form-init",this._initSettingsForms),FLBuilder.addHook("settings-lightbox-closed",this._clearPreview),e("body").delegate(".fl-field-responsive-toggle","click",this._settingToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,"fl-theme-builder","/wp-includes/","/wp-admin/"]),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css?",FLBuilderConfig.postId+"-layout-draft-partial.css?",FLBuilderConfig.postId+"-layout-preview.css?",FLBuilderConfig.postId+"-layout-preview-partial.css?"])},_switchTo:function(t,i){var l=e("body"),s=e(FLBuilder._contentClass),o=e(".fl-responsive-preview"),n=e(".fl-responsive-preview-mask"),r=e(".fl-content-placeholder"),a=null;if(FLBuilderResponsiveEditing._mode=t,"default"==t){if(0===r.length)return;r.after(s),r.remove(),o.remove(),n.remove()}else 0===o.length?(s.after('<div class="fl-content-placeholder"></div>'),l.prepend(wp.template("fl-responsive-preview")()),e(".fl-responsive-preview").addClass("fl-preview-"+t),e(".fl-responsive-preview-content").append(s)):(o.removeClass("fl-preview-responsive fl-preview-medium"),o.addClass("fl-preview-"+t));"responsive"==t?(a=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,s.width(a),FLBuilderSimulateMediaQuery.update(a,i)):"medium"==t?(a=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,s.width(a),FLBuilderSimulateMediaQuery.update(a,i)):(s.width(""),FLBuilderSimulateMediaQuery.update(null,i)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("responsive-editing-switched",t)},_setContentBackgroundColor:function(){var t=e(FLBuilder._contentClass),i=e(".fl-responsive-preview"),l=e(".fl-content-placeholder"),s=l.parents(),o="#fff",n=0;if(0===i.length)t.css("background-color","");else{for(;n<s.length&&(o=s.eq(n).css("background-color"),"rgba(0, 0, 0, 0)"==o);n++);t.css("background-color",o)}},_switchToAndScroll:function(t){var i=e(".fl-builder-settings").data("node"),l=void 0===i?void 0:e(".fl-node-"+i);FLBuilderResponsiveEditing._switchTo(t,function(){void 0!==l&&l&&setTimeout(function(){var t=e(window),i=e(".fl-responsive-preview-content");!i.length||t.height()<i.height()?e("html, body").animate({scrollTop:l.offset().top-100},250):scrollTo(0,0)},250)})},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_settingToggleClicked:function(){var t=e(this),i=t.data("mode");i="default"==i?"medium":"medium"==i?"responsive":"default",FLBuilderResponsiveEditing._switchAllSettingsTo(i),t.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_switchAllSettingsTo:function(t){var i="dashicons-desktop dashicons-tablet dashicons-smartphone";e(".fl-field-responsive-toggle").removeClass(i),e(".fl-field-responsive-setting").hide(),i="default"==t?"dashicons-desktop":"medium"==t?"dashicons-tablet":"dashicons-smartphone",e(".fl-field-responsive-toggle").addClass(i).data("mode",t),e(".fl-field-responsive-setting-"+t).css("display","inline-block"),FLBuilderResponsiveEditing._switchToAndScroll(t)},_initSettingsForms:function(){var e=FLBuilderResponsiveEditing;Number(FLBuilderConfig.global.responsive_enabled)&&(e._initFields("dimension","input","keyup",e._spacingFieldKeyup,["margin","padding"]),e._initFields("dimension","input","keyup",e._textFieldKeyup),e._initFields("unit","input","keyup",e._textFieldKeyup)),e._switchAllSettingsTo(e._mode)},_initFields:function(t,i,l,s,o){for(var n=e(".fl-builder-settings"),r=n.find(".fl-field").has(".fl-field-responsive-setting"),a=null,d=null,u=0;u<r.length;u++)a=r.eq(u),d=a.attr("id").replace("fl-field-",""),"object"==typeof o&&e.inArray(d,o)<0||t==a.attr("data-type")&&void 0===a.attr("data-responsive-init")&&(a.find(".fl-field-responsive-setting-default "+i).on(l,s),a.find(".fl-field-responsive-setting-medium "+i).on(l,s),a.find(".fl-field-responsive-setting-responsive "+i).on(l,s),a.find(".fl-field-responsive-setting-default "+i).trigger(l),a.attr("data-responsive-init",1))},_getFields:function(t,i){var l=e(t).closest(".fl-field");return{"default":l.find(".fl-field-responsive-setting-default "+i),medium:l.find(".fl-field-responsive-setting-medium "+i),responsive:l.find(".fl-field-responsive-setting-responsive "+i)}},_textFieldKeyup:function(){var e=FLBuilderResponsiveEditing._getFields(this,"input");e["default"].each(function(t){var i=e["default"].eq(t).attr("placeholder"),l=e["default"].eq(t).val(),s=e.medium.eq(t).val();""==l?e.medium.eq(t).attr("placeholder",void 0===i?"":i):e.medium.eq(t).attr("placeholder",l),""==s?e.responsive.eq(t).attr("placeholder",e.medium.eq(t).attr("placeholder")):e.responsive.eq(t).attr("placeholder",s)})},_spacingFieldKeyup:function(){var t=e(".fl-builder-settings"),i="row",l=e(this).closest(".fl-field").attr("id").replace("fl-field-",""),s=FLBuilderResponsiveEditing._getFields(this,"input"),o=FLBuilderConfig.global,n=null,r=null,a=null,d=null;t.hasClass("fl-builder-row-settings")?i="row":t.hasClass("fl-builder-col-settings")?i="col":t.hasClass("fl-builder-module-settings")&&(i="module"),e.extend(o,{col_margins:0,col_margins_medium:"",col_margins_responsive:"",col_padding:0,col_padding_medium:"",col_padding_responsive:""}),n=i+"_"+l+("margin"==l?"s":""),r=o[n],a=o[n+"_medium"],d=o[n+"_responsive"],s["default"].each(function(e){var t=s["default"].eq(e).attr("name").split("_").pop(),n=s["default"].eq(e).val(),u=s.medium.eq(e).val(),c=(s.responsive.eq(e).val(),null),h=null;""==a&&(""!=n?s.medium.eq(e).attr("placeholder",n):""!=r&&s.medium.eq(e).attr("placeholder",r)),""==d&&("module"==i&&Number(o.auto_spacing)?(c=""==a?Number(r):a,h=""==u?Number(n):u,""!=h&&(h>c||h<0)?s.responsive.eq(e).attr("placeholder",c):""!=h?s.responsive.eq(e).attr("placeholder",h):s.responsive.eq(e).attr("placeholder",c)):(!Number(o.auto_spacing)||"padding"==l&&"top|bottom".indexOf(t)>-1)&&(""!=u?s.responsive.eq(e).attr("placeholder",u):""!=a?s.responsive.eq(e).attr("placeholder",a):""!=n?s.responsive.eq(e).attr("placeholder",n):""!=r&&s.responsive.eq(e).attr("placeholder",r)))})},_previewSpacingFields:function(){var t=FLBuilderResponsiveEditing._mode,i=e(".fl-builder-settings");0!==i.length&&void 0!==i.attr("data-node")&&i.find(".fl-field").has(".fl-field-responsive-setting").each(function(){var e=FLBuilderResponsiveEditing._getFields(this,"input"),i=e.responsive.closest(".fl-field").data("preview");"refresh"!=i.type&&e[t].trigger("keyup")})}},e(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(e){var t={init:function(){var t=e("body");t.delegate(".fl-builder-service-select","change",this._serviceChange),t.delegate(".fl-builder-service-connect-button","click",this._connectClicked),t.delegate(".fl-builder-service-account-select","change",this._accountChange),t.delegate(".fl-builder-service-account-delete","click",this._accountDeleteClicked),t.delegate(".fl-builder-campaign-monitor-client-select","change",this._campaignMonitorClientChange),t.delegate(".fl-builder-mailchimp-list-select","change",this._mailChimpListChange),t.delegate(".fl-builder-activecampaign-list_type-select","change",this._activeCampaignChange)},_startSettingsLoading:function(t){var i=e(".fl-builder-settings"),l=t.closest(".fl-builder-service-settings"),s=e(".fl-builder-service-error");i.append('<div class="fl-builder-loading"></div>'),
7
  l.addClass("fl-builder-service-settings-loading"),s.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),i=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),i.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this),s=l.closest("tr"),o=l.val();s.siblings("tr.fl-builder-service-account-row").remove(),s.siblings("tr.fl-builder-service-connect-row").remove(),s.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==o&&(t._startSettingsLoading(l),FLBuilder.ajax({action:"render_service_settings",node_id:i,service:o},t._serviceChangeComplete))},_serviceChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-select-row");o.after(l.html),t._addAccountDelete(s),t._finishSettingsLoading()},_connectClicked:function(){for(var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-connect-row"),n=l.find(".fl-builder-service-connect-input"),r=null,a=null,d=0,u={action:"connect_service",node_id:i,service:s.val(),fields:{}};d<n.length;d++)r=n.eq(d),a=r.attr("name"),u.fields[a]=r.val();o.hide(),t._startSettingsLoading(s),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-select-row"),n=s.find(".fl-builder-service-select"),r=s.find(".fl-builder-service-account-row"),a=s.find(".fl-builder-service-account-select"),d=s.find(".fl-builder-service-connect-row");l.error?(d.show(),0===a.length?n.after('<div class="fl-builder-service-error">'+l.error+"</div>"):a.after('<div class="fl-builder-service-error">'+l.error+"</div>")):(d.remove(),r.remove(),o.after(l.html)),t._addAccountDelete(s),t._finishSettingsLoading()},_accountChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=l.find(".fl-builder-service-connect-row"),r=l.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=o.val(),u=null;n.remove(),r.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:i,service:s.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:i,service:s.val(),account:d}),u&&(t._startSettingsLoading(s),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(l)},_accountChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-account-row");o.after(l.html),t._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");t.length>0&&(e.find(".fl-builder-service-account-delete").remove(),""!==t.val()&&"add_new_account"!=t.val()&&t.after('<a href="javascript:void(0);" class="fl-builder-service-account-delete">'+FLBuilderStrings.deleteAccount+"</a>"))},_accountDeleteClicked:function(){var i=e(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:l.val(),account:s.val()},t._accountDeleteComplete),t._startSettingsLoading(s))},_accountDeleteComplete:function(){var i=e(".fl-builder-service-settings-loading"),l=i.find(".fl-builder-service-select");t._finishSettingsLoading(),l.trigger("change")},_campaignMonitorClientChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=e(this),r=l.find(".fl-builder-service-list-select"),a=n.val();0!==r.length&&r.closest("tr").remove(),""!==a&&(t._startSettingsLoading(s),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:s.val(),account:o.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-campaign-monitor-client-select");o.closest("tr").after(l.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=l.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==n.val()&&(t._startSettingsLoading(s),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:s.val(),account:o.val(),list_id:n.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-list-select");o.closest("tr").after(l.html),t._finishSettingsLoading()},_activeCampaignChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=l.find(".fl-builder-service-list-select");list_type=l.find('select[name="list_type"]'),0!==n.length&&n.closest("tr").remove(),""!==list_type.val()&&(t._startSettingsLoading(s),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:s.val(),account:o.val(),list_type:list_type.val()},t._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-field-row");o.after(l.html),t._finishSettingsLoading()}};e(function(){t.init()})}(jQuery),function(e){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var t={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fa fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row:first-of-type",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row:first-of-type .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-templates-button",placement:"bottom",title:FLBuilderStrings.tourTemplatesButtonTitle,content:FLBuilderStrings.tourTemplatesButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-tools-button",placement:"bottom",title:FLBuilderStrings.tourToolsButtonTitle,content:FLBuilderStrings.tourToolsButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-done-button",placement:"bottom",title:FLBuilderStrings.tourDoneButtonTitle,content:FLBuilderStrings.tourDoneButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,orphan:!0,backdrop:!0,title:FLBuilderStrings.tourFinishedTitle,content:FLBuilderStrings.tourFinished,template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <i class="fa fa-times" data-role="end"></i> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="end">'+FLBuilderStrings.tourEnd+"</button> </div> </div>"}]};return FLBuilderConfig.lite?t.steps.shift():"disabled"==FLBuilderConfig.enabledTemplates?t.steps.shift():"fl-builder-template"==FLBuilderConfig.postType&&t.steps.shift(),t},_onStart:function(){var t=e("body");t.scrollTop(0),t.append('<div class="fl-builder-tour-mask"></div>'),0===e(".fl-row").length&&"module"!=FLBuilderConfig.userTemplateType&&(e(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-row fl-row-fixed-width fl-row-bg-none"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-fixed-width fl-node-content"> <div class="fl-col-group"> <div class="fl-col" style="width:100%"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text" data-type="rich-text" data-name="Text Editor"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque ut lorem non cursus. Sed mauris nunc, porttitor iaculis lorem a, sollicitudin lacinia sapien. Proin euismod orci lacus, et sollicitudin leo posuere ac. In hac habitasse platea dictumst. Maecenas elit magna, consequat in turpis suscipit, ultrices rhoncus arcu. Phasellus finibus sapien nec elit tempus venenatis. Maecenas tincidunt sapien non libero maximus, in aliquam felis tincidunt. Mauris mollis ultricies facilisis. Duis condimentum dignissim tortor sit amet facilisis. Aenean gravida lacus eu risus molestie egestas. Donec ut dolor dictum, fringilla metus malesuada, viverra nunc. Maecenas ut purus ac justo aliquet lacinia. Cras vestibulum elementum tincidunt. Maecenas mattis tortor neque, consectetur dignissim neque tempor nec.</p></div> </div> </div> </div> </div> </div> </div> </div> </div>'),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols())},_onPrev:function(){e(".fl-builder-tour-dimmed").remove()},_onNext:function(){e(".fl-builder-tour-dimmed").remove()},_onEnd:function(){e("body").off("fl-builder.template-selector-loaded"),e(".fl-builder-tour-mask").remove(),e(".fl-builder-tour-dimmed").remove(),e(".fl-builder-tour-demo-content").remove(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(t){e(t).find(".fl-builder-tour-dimmed").remove(),e(t).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(e,t){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),e.fn.textWidth=function(t,i){return e.fn.textWidth.fakeEl||(e.fn.textWidth.fakeEl=e("<span>").hide().appendTo(document.body)),e.fn.textWidth.fakeEl.text(t||this.val()||this.text()).css("font",i||this.css("font")),e.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(t){var i=Object.create(this);return i=e.extend(i,t),e(this).trigger("onCreate"),i}},e.fn.switchClass=function(t,i){return this.each(function(){return e(this).removeClass(function(e,i){var l=[],s=i.split(" ");for(var e in s)s[e].startsWith(t)&&l.push(s[e]);return l.join(" ")}),e(this).addClass(t+i)})};var i={init:function(){t.addHook("cancelTask",this.onCancelTask.bind(this)),t.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),t.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),t.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),t.addHook("endEditingSession",this.onEndEditingSession.bind(this)),t.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(t,i,l){var s=e.proxy(this,"onTriggerKey",t);l?Mousetrap.bindGlobal(i,s):Mousetrap.bind(i,s)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){this.reset();for(var e in FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,i){t.triggerHook(e),i.preventDefault?i.preventDefault():i.returnValue=!1},onCancelTask:function(){return o.isPreviewing?void o.endPreview():s.isShowing?void s.hide():t.ContentPanel.isShowing?void t.ContentPanel.hide():void 0},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){if(t.SaveManager.layoutNeedsPublish()){var e=FLBuilderStrings.savedStatus.hasAlreadySaved;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}else{var e=FLBuilderStrings.savedStatus.nothingToSave;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}},onNextPrevTabShortcut:function(i,l){var s,o,n=e(".fl-lightbox:visible"),r=n.find(".fl-builder-settings-tabs a");n.length>0&&(s=r.filter("a.fl-active"),o="next"==i?s.is(r.last())?r.first():s.next("a"):s.is(r.first())?r.last():s.prev("a"),o.trigger("click")),t._calculateSettingsTabsOverflow(),l.preventDefault()}},l={isShowing:!1,init:function(){this.render(),t.addHook("showKeyboardShortcuts",this.show.bind(this))},render:function(){var t=wp.template("fl-keyboard-shortcuts"),i=FLBuilderConfig.keyboardShortcuts;this.$el=e(t(i)),e("body").append(this.$el),this.$el.find(".dismiss-shortcut-ui").on("click",this.hide.bind(this)),this.$el.on("click",this.hide.bind(this))},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.isShowing=!0)},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.isShowing=!1)},toggle:function(){this.isShowing?this.hide():this.show()}},s=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=e(".fl-builder-publish-actions"),this.$defaultBarButtons=e(".fl-builder-bar-actions"),this.$clickAwayMask=e(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click",this.onActionClicked.bind(this)),t.addHook("triggerDone",this.onDoneTriggered.bind(this));var i=this.hide.bind(this);t.addHook("cancelPublishActions",i),t.addHook("endEditingSession",i),this.$clickAwayMask.on("click",i)},onDoneTriggered:function(){t.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?t._exit():t._exitWithoutRefresh()},show:function(){this.isShowing||t._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,t.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(i){var l=e(i.currentTarget).data("action");switch(l){case"dismiss":this.hide();break;case"discard":this.hide(),o.muteToolbar(),t._discardButtonClicked();break;case"publish":this.hide(),o.muteToolbar(),t._publishButtonClicked(),t._destroyOverlayEvents();break;case"draft":this.hide(),o.muteToolbar(),t._draftButtonClicked();break;default:this.hide(),o.muteToolbar(),t._draftButtonClicked()}t.triggerHook(l+"ButtonClicked")}}),o={isPreviewing:!1,init:function(){this.$el=e("body"),this.$mainToolbar=e(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=e("#wpadminbar"),this.$endPreviewBtn=e(".fl-builder--preview-actions .end-preview-btn"),t.addHook("endEditingSession",this.endEditingSession.bind(this)),t.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=e(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this));var i=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a");i.on("click",this.onClickPageBuilderToolbarLink.bind(this)),e("#wpadminbar a").attr("tabindex","-1");var l=this.restartEditingSession.bind(this);t.addHook("restartEditingSession",l),t.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),t.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),t.addHook("didEnterRevisionPreview",this.hide.bind(this)),t.addHook("didExitRevisionPreview",this.show.bind(this)),t.addHook("didPublishLayout",this.onPublish.bind(this))},endEditingSession:function(){t._destroyOverlayEvents(),t._removeAllOverlays(),t._removeEmptyColHighlights(),t._removeColHighlightGuides(),t._unbindEvents(),e("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),e("body").removeClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex",null),e(t._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(i){t._initTemplateSelector(),t._bindOverlayEvents(),t._highlightEmptyCols(),e("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),e("body").addClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex","-1"),e(t._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),i.preventDefault()},onClickPageBuilderToolbarLink:function(e){t.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){var e=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span");e.css("color","#6bc373")},hide:function(){e("html").hasClass("fl-builder-edit")&&(t._unbindEvents(),t._destroyOverlayEvents(),t._removeAllOverlays(),e("html").removeClass("fl-builder-edit"),e("body").removeClass("admin-bar"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init(),t.triggerHook("didHideEditingUI"))},show:function(){e("html").hasClass("fl-builder-edit")||(t._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),e("html").addClass("fl-builder-edit"),e("body").addClass("admin-bar"),t.triggerHook("didShowEditingUI"))},beginPreview:function(){t._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),e("html").addClass("fl-builder-preview"),e("html, body").removeClass("fl-builder-edit"),t._removeEmptyColHighlights(),t._removeColHighlightGuides(),t.triggerHook("didBeginPreview"))},endPreview:function(){this.isPreviewing=!1,this.show(),t._highlightEmptyCols(),e("html").removeClass("fl-builder-preview"),e("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),e("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),e("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(t){var i=e(t.target).data("mode");FLBuilderResponsiveEditing._switchTo(i)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),t._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},n={isEditing:!0,init:function(){history.pushState&&(t.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),t.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url),this.isEditing=!1}},r={$row:null,$rowContent:null,row:null,drag:{},init:function(){if(this.userCanResize()){var i=e(t._contentClass);i.delegate(".fl-block-row-resize","mouseenter",this.onDragHandleHover.bind(this)),i.delegate(".fl-block-row-resize","mousedown",this.onDragHandleDown.bind(this))}},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(t){if(!this.drag.isDragging){var i=e(t.target);this.$row=i.closest(".fl-row"),this.$rowContent=this.$row.find(".fl-row-content"),this.row={node:this.$row.data("node"),isFixedWidth:this.$row.hasClass("fl-row-fixed-width"),settings:e(".fl-builder-row-settings[data-node="+this.$row.data("node")+"]")},this.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),this.dragInit()}},onDragHandleDown:function(){e("body").addClass("fl-builder-row-resizing")},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(i,l){var s=e("body"),o=e(l.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),o.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=o.find(".fl-block-col-resize-feedback-left")),o.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=o.find(".fl-block-col-resize-feedback-right")),s.addClass("fl-builder-row-resizing"),t._colResizing=!0,t._destroyOverlayEvents(),t._closePanel()},dragging:function(e,t){var i=t.position.left,l=t.originalPosition.left,s=this.drag.originalWidth,o=0,n=this.drag.edge,r=FLBuilderConfig.rowResize.minAllowedWidth,a=FLBuilderConfig.rowResize.maxAllowedWidth;l!==i&&(FLBuilderConfig.isRtl&&(n="w"==n?"e":"w"),l>i?"w"===n?this.drag.operation="+":this.drag.operation="-":"e"===n?this.drag.operation="+":this.drag.operation="-",o=Math.abs(l-i),"+"===this.drag.operation?this.drag.calculatedWidth=s+2*o:this.drag.calculatedWidth=s-2*o,!1!==r&&this.drag.calculatedWidth<r&&(this.drag.calculatedWidth=r),!1!==a&&this.drag.calculatedWidth>a&&(this.drag.calculatedWidth=a),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+"px").show(),this.row.settings.length&&this.row.settings.find("[name=max_content_width]").val(this.drag.calculatedWidth))},dragStop:function(i,l){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();var s={action:"resize_row_content",node:this.row.node,width:this.drag.calculatedWidth},o=e("body");t.ajax(s),t._bindOverlayEvents(),o.removeClass("fl-builder-row-resizing"),e(".fl-block-overlay").each(function(){t._buildOverlayOverflowMenu(e(this))}),e("body").removeClass("fl-builder-row-resizing"),setTimeout(function(){t._colResizing=!1},50),t.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},a={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips();var e=this.$el.find(".fl-builder-content-panel-button");e.on("click",t._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",t._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",t._upgradeClicked)},render:function(t){var i=e(this.template(t));this.$el=i,this.el=i.get(0),o.$mainToolbar=this.$el,e("body").prepend(i),e("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),e(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})}};e(function(){t.ContentPanel.init(),FLBuilderConfig.simpleUi||t.MainMenu.init(),FLBuilderConfig.showToolbar?(a.init(),t.ContentPanel.alignPanelArrow()):e("html").addClass("fl-builder-no-toolbar"),i.init(),l.init(),o.init(),n.init(),r.init(),s.init(),t.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing")},hide:function(){this.$el.removeClass("is-showing")},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),l=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){this.template=wp.template(this.templateName),e("body").prepend(this.template(this)),this.$el=e(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html("");for(var i in FLBuilderConfig.mainMenu){this.renderPanel(i);var l="render"+i.charAt(0).toUpperCase()+i.slice(1)+"Panel";t.addHook(l,e.proxy(function(){this.renderPanel(i)},this))}e("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=e(".fl-builder-bar-title"),e("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var n=this.hide.bind(this);t.addHook("didShowPublishActions",n),t.addHook("didBeginSearch",n),t.addHook("didBeginPreview",n),t.addHook("didShowContentPanel",n),t.addHook("endEditingSession",n),t.addHook("didFocusSearchBox",n),t.addHook("didEnterRevisionPreview",n),t.addHook("didFailSettingsSave",n),t.addHook("showKeyboardShortcuts",n),this.$mask=e(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",n),s.init(),o.init()},renderPanel:function(t){var l,s,o;e('fl-builder--main-menu-panel-view[data-name="'+t+'"]').remove(),l=FLBuilderConfig.mainMenu[t],l.handle=t,s=i.create(l),s.init(),o=e(s.render()),s.$el=o,e(".fl-builder--main-menu-panel-views").append(o),s.bindEvents(),s.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),s.isRootView&&(this.rootView=s,this.currentView=s),this.views[t]=s},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),t.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(i){var l=e(i.currentTarget),s=l.data("type");switch(s){case"view":var o=l.data("view");this.goToView(o);break;case"event":var n=l.data("event");t.triggerHook(n,l);break;case"link":}},goToView:function(e){var t=this.currentView,i=this.views[e];t.transitionOut(),i.transitionIn(),this.currentView=i,this.viewNavigationStack.push(t)},goToPreviousView:function(){var t=this.currentView,i=this.viewNavigationStack.pop();t.transitionOut(!0),i.transitionIn(!0),this.currentView=i,e(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}});t.MainMenu=l;var s={init:function(){t.addHook("saveTemplate",this.saveTemplate.bind(this)),t.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),t.addHook("duplicateLayout",this.duplicateLayout.bind(this)),t.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),t.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),t.addHook("toggleUISkin",this.toggleUISkin.bind(this)),t.addHook("clearLayoutCache",this.clearLayoutCache.bind(this))},saveTemplate:function(){t._saveUserTemplateClicked(),l.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),l.hide()},duplicateLayout:function(){t._duplicateLayoutClicked(),l.hide()},showGlobalSettings:function(){t._globalSettingsClicked(),l.hide()},showLayoutSettings:function(){t._layoutSettingsClicked(),l.hide()},clearLayoutCache:function(){t.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),t.showAjaxLoader(),l.hide()},toggleUISkin:function(i){e('a[data-event="toggleUISkin"]');if(e("body").hasClass("fl-builder-ui-skin--light"))var l="light",s="dark";if(e("body").hasClass("fl-builder-ui-skin--dark"))var l="dark",s="light";e("body").removeClass("fl-builder-ui-skin--"+l).addClass("fl-builder-ui-skin--"+s),t.ajax({action:"save_ui_skin",skin_name:s})}},o={init:function(){t.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),l.hide()}}}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(i){this.categorySelector=a.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),e(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));i.views;if(this.initViews(i.views),0===Object.keys(this.views).length){var l={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"};this.addView(l)}if(!this.activeView){var s=Object.keys(this.views)[0],l=this.views[s];this.activeView=l}this.defaultView=this.activeView,e(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),e(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),t.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){var i=e[t];this.categorySelector.addItem(i),"separator"!==i.type&&this.addView(i)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=s;break;case"rows":t=o;break;case"templates":t=n;break;case"saved":t=r;break;default:t=l}_.isNull(this.viewController)||_.isUndefined(this.viewController)||(t=window[this.viewController]);var i=t.create(e),a=i.handle;i.init(),this.views[a]=i,i.isShowing&&(this.activeView=i)},renderView:function(e){if(this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),_.isObject(e))var i=e;else var i=this.views[e];if(_.isObject(i)&&_.isFunction(i.render)){var l=i.render();this.$el.find(".fl-nanoscroller-content").html(l),this.activeView=i,t._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0)}},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){e(this.activeView).trigger("onBeforeShow"),
8
  this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e=this.panel.$groupSelect,t=this.panel.$el.find(".fl-builder-panel-search");if(this.isSearchEnabled?t.show():t.hide(),Object.keys(this.views).length>1&&!_.isUndefined(this.categorySelector)){var i=this.categorySelector.render();this.panel.$el.find(".fl-builder-content-group-select");e.html(i),e.show(),this.panel.$el.removeClass("single-view")}else e.hide(),t.hide(),this.panel.$el.addClass("single-view")},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=t.Search.byQuery(this.query)),e},render:function(){e(this).trigger("beforeRender");var t=this;t=this.filterTemplateData(t);var i=e(this.template(t));return this.$el=i,e(this).trigger("afterRender"),i},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),s=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),o=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),n=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=e(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(t){var i=e(t.currentTarget),l=i.val(),s=i.siblings("button");""!==l?s.show():s.hide()},onSaveButtonClick:function(i){var l=e(i.currentTarget),s=l.siblings('input[name="template-name"]').val(),o=l.siblings('input[name="template-category"]').val(),n={name:s,category:o};""!==s&&t.ajax({action:"save_user_template",settings:n},t._saveUserTemplateSettingsComplete)},onTemplateClick:function(i){var l=e(i.currentTarget),s=l.data("id"),o=l.data("type");t._requestTemplateInsert(s,o)}}),r=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=t.Search.byQuery({kind:"template",type:"user",content:["module","row"]}),e}}),a=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var t=e(this.template(this));return this.$el=t,e(this).trigger("afterRender"),t},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t;t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle,this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(t){var i=e(t.target).data("view");e(this).trigger("categorySelected",i)}});t.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e=FLBuilderConfig.panelData.tabs;for(var l in e){var s=e[l];if(n=i.create(s),n.panel=this,n.views={},n.init(s),this.tabs[l]=n,n.isShowing&&(this.activeTab=n),!this.activeTab){var o=Object.keys(this.tabs)[0],n=this.tabs[o];n.isShowing=!0,this.activeTab=n}}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),t.triggerHook("contentPanelDidInit")}},render:function(){e("body").prepend(this.template(this)),this.$el=e(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),e(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),t.addHook("showContentPanel",this.show.bind(this)),t.addHook("showModules",this.show.bind(this,"modules")),t.addHook("showRows",this.show.bind(this,"rows")),t.addHook("showTemplates",this.show.bind(this,"templates")),t.addHook("showSaved",this.show.bind(this,"saved")),t.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this);t.addHook("hideContentPanel",e),t.addHook("didShowLightbox",e),t.addHook("didShowPublishActions",e),t.addHook("didBeginSearch",e),t.addHook("didInitDrag",e),t.addHook("didOpenMainMenu",e),t.addHook("didApplyTemplate",e);var i=this.toggleShowHide.bind(this);t.addHook("toggleContentPanel",i),t.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var t,i,l=this.$el,s=null,o=this.$el.find(".fl-builder--panel-arrow"),n=e(".fl-builder-content-panel-button"),r=this.$el.css("animation-duration");if(0!=n.length){this.$el.css("animation-duration","0s"),this.show(),s=l[0].getBoundingClientRect(),t=o[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",r),buttonOffset=n[0].getBoundingClientRect();var a=buttonOffset.x+buttonOffset.width/2;i=a<s.x?20:a-s.x-t.width/2,o.css({right:"auto",left:i+"px"})}},show:function(i){t.triggerHook("willShowContentPanel"),"undefined"!=typeof i&&this.showTab(i),this.isShowing||t._triggerSettingsSave(!1,!0)&&(e("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,e(this).trigger("onShow"),t.triggerHook("didShowContentPanel"))},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(e("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,e(this).trigger("onHide"),t.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(t){var i=this.tabs[t];_.isObject(i)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),i.show(),this.$tabs.filter('[data-tab="'+i.handle+'"]').addClass("is-showing"),this.activeTab=i,e(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(t){e(t.currentTarget).blur()},onTabItemClick:function(t){var i=e(t.target),l=i.data("tab");this.showTab(l)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),e(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),e(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),e(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var i=this.$searchInput.val();if(""!==i){var l=t.Search.byTerm(i);""!=l.term?this.showSearchResults(l):this.hideSearchResults()}else this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(i){if(i.total>0){var l=e(this.renderSearchResults(i));this.$searchPanel.html(l),t._initSortables()}else{var l=e(this.renderNoResults(i));this.$searchPanel.html(l)}e("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){e("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(e){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(t,i){var l=FLBuilderSettingsConfig.forms,s=FLBuilderSettingsConfig.modules,o={type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null};if(t=e.extend(o,t),i=void 0===i?function(){}:i,t.id){if("general"===t.type&&void 0!==l[t.id])t=e.extend(!0,t,l[t.id]);else{if("module"!==t.type||void 0===s[t.id])return;t=e.extend(!0,t,s[t.id])}this.config=t,this.renderLightbox(t)&&(t.legacy||!this.renderLegacySettings(t,i)?this.renderComplete(t,i):this.showLightboxLoader())}},renderLightbox:function(t){var i=wp.template("fl-builder-settings"),l=FLBuilder._lightbox._node.find("form.fl-builder-settings");e(".fl-lightbox-wrap[data-parent]");if(t.nodeId&&t.nodeId===l.data("node")&&!t.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(t.lightbox)t.lightbox.setContent(i(t));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder._setLightboxContent(i(t))}return!0},renderComplete:function(t,i){var l=e(".fl-builder-settings:visible");setTimeout(function(){t.legacy&&this.renderLegacySettingsComplete(t.legacy),i(),FLBuilder._initSettingsForms(),t.rules&&FLBuilder._initSettingsValidation(t.rules),t.preview&&(FLBuilder.preview=new FLBuilderPreview(t.preview)),t.helper&&t.helper.init(),l.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettings(l))}.bind(this),1)},renderFields:function(t,i){var l=wp.template("fl-builder-settings-row"),s="",o=null,n=null,r=null,a=!1,d=null,u=["dimension","unit"],i=i?i:this.config.settings,c=FLBuilderConfig.global;for(n in t)o=t[n],a=!!o.multiple,supportsResponsive=e.inArray(o.type,u)>-1,r=_.isUndefined(i[n])?"":i[n],_.isUndefined(i[n])&&o["default"]&&(r=o["default"]),d=o.responsive&&c.responsive_enabled&&!a&&supportsResponsive?o.responsive:null,s+=l({field:o,name:n,rootName:n,value:r,preview:JSON.stringify(o.preview?o.preview:{type:"refresh"}),responsive:d,rowClass:o.row_class?" "+o.row_class:"",isMultiple:a,supportsMultiple:"editor"!==o.type&&"photo"!==o.type&&"service"!==o.type,settings:i,globalSettings:c,template:e("#tmpl-fl-builder-field-"+o.type)});return s},renderField:function(e){var t=wp.template("fl-builder-field");return t(e)},renderSectionTemplate:function(e,t){var i=wp.template(e.template.id);return i({section:e,settings:t})},renderTabTemplate:function(e,t){var i=wp.template(e.template.id);return i({tab:e,settings:t})},renderLegacySettings:function(t,i){var l=e(".fl-builder-settings:visible"),s=null,o=!1,n={tabs:[],sections:[],fields:[],settings:null,node_id:null};return l.find(".fl-legacy-field").each(function(){s=e(this),n.fields.push(s.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(s),o=!0}),l.find(".fl-legacy-settings-section").each(function(){s=e(this),n.sections.push({tab:s.attr("data-tab"),section:s.attr("data-section")}),o=!0}),l.find(".fl-legacy-settings-tab").each(function(){s=e(this),n.tabs.push(s.attr("data-tab")),o=!0}),l.attr("data-node")?n.node_id=l.attr("data-node"):n.settings=FLBuilder._getOriginalSettings(l,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(e.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:n,form:l.attr("data-form-id"),group:l.attr("data-form-group"),lightbox:l.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),o&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),o},renderLegacySettingsComplete:function(t){var i="object"==typeof t?t:JSON.parse(t),l=null,s=null,o="",n=null,r=null,a=null;if(i.lightbox?(l=e(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]"),s=l.length?l.find(".fl-builder-settings"):null):(s=e(".fl-builder-settings:visible"),l=s.closest(".fl-builder-lightbox")),s&&s.length){for(o in i.fields)n=e("#fl-field-"+o).attr("id",""),n.after(i.fields[o]).remove();for(o in i.extras)n=e("#fl-field-"+o).find(".fl-field-control-wrapper"),n.prepend(i.extras[o].before),n.append(i.extras[o].after);for(a in i.sections)for(o in i.sections[a])r=e("#fl-builder-settings-section-"+o),r.html(i.sections[a][o]);for(o in i.tabs)a=e("#fl-builder-settings-tab-"+o),a.html(i.tabs[o]);l.data("parent")||(this.settings=FLBuilder._getSettings(s),FLBuilder.preview&&(FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var t=e(".fl-builder-settings:visible"),i=t.closest(".fl-builder-lightbox"),l=i.attr("data-parent"),s=null,o=null,n={};return l&&(l=e(".fl-builder-lightbox[data-instance-id="+l+"]"),t=l.find("form.fl-builder-settings"),s=FLBuilder._getSettings(t),o=t.attr("data-node"),o&&(n.node_id=o,n.node_settings=s)),n},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),i=!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(t);return i},closeOnDeleteNode:function(t,i){var l=e(".fl-builder-settings[data-node]"),s=FLBuilder._contentClass+" .fl-node-"+l.data("node");l.length&&!e(s).length&&FLLightbox.closeAll()},showLightboxLoader:function(){e(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(t){e(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){var t=e.closest(".fl-field-control").find(".fl-field-control-wrapper");t.hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field"),i=e.closest(".fl-field-control").find(".fl-field-control-wrapper");i.show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,e.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this))},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];e.namespace.indexOf("didAdd")>-1?this.addNode(arguments[1]):e.namespace.indexOf("didSaveNodeSettings")>-1?this.updateNode(arguments[1].nodeId,arguments[1].settings):e.namespace.indexOf("didDelete")>-1?this.deleteNodes():e.namespace.indexOf("didDuplicate")>-1&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(t,i){var l=this;i.cols.each(function(){var t=e(this),i=t.attr("data-node");l.nodes[i]&&(l.nodes[i].size=parseFloat(t[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},addNode:function(t,i){var l=e(".fl-node-"+t),s=l.hasClass("fl-row"),o=l.hasClass("fl-col"),n=l.hasClass("fl-col-group"),r=l.hasClass("fl-module"),a=this;this.nodes[t]||(i||(s?i=e.extend({},this.defaults.row):o?i=e.extend({},this.defaults.column):r&&(i=e.extend({},this.defaults.modules[l.attr("data-type")])),s||n?l.find(".fl-col").each(function(){var t=e(this),i=e.extend({},a.defaults.column);i.size=parseFloat(t[0].style.width),a.addNode(t.attr("data-node"),i)}):r&&(a.addNode(l.closest(".fl-row").attr("data-node")),a.addNode(l.closest(".fl-col").attr("data-node")),a.updateOnResetColumnWidths(null,{cols:l.closest(".fl-col-group").find("> .fl-col")}))),i&&(this.nodes[t]=i))},updateNode:function(t,i){var l=e(".fl-node-"+t),s=this;l.hasClass("fl-col")&&l.closest(".fl-col-group").find("> .fl-col").each(function(){var t=e(this),l=t.attr("data-node");s.nodes[l].size=parseFloat(t[0].style.width),s.nodes[l].equal_height=i.equal_height,s.nodes[l].content_alignment=i.content_alignment,s.nodes[l].responsive_order=i.responsive_order}),this.nodes[t]=i},duplicateNode:function(t,i){var l=e(".fl-node-"+i),s=l.find("[data-node]"),o=e(".fl-node-"+t),n=o.find("[data-node]"),r=this;this.nodes[i]=this.nodes[t],s.each(function(l){t=n.eq(l).attr("data-node"),i=e(this).attr("data-node"),r.nodes[t]&&(r.nodes[i]=r.nodes[t])})},deleteNodes:function(){var t="",i=e(FLBuilder._contentClass).html();for(t in this.nodes)i.indexOf(t)===-1&&(this.nodes[t]=null,delete this.nodes[t])}}),e(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(e){var t={init:function(){"module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi||(this.initPanel(),this.pinOrUnpin(),this.bind())},bind:function(){var t=e(window),i=e("body");t.on("resize",_.throttle(this.windowResize.bind(this),250)),i.delegate(".fl-builder-ui-pinned-collapse","click",this.collapse),i.delegate(".fl-builder--content-library-panel .fl-builder--tabs","click",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return e(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout()},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout()},pinOrUnpin:function(){var t=(e(".fl-builder--content-library-panel"),this.isPinned());window.innerWidth<=500?(t&&this.unpin(!1),this.disableDragAndResize()):(t||this.restorePosition(),this.enableDragAndResize())},show:function(){var t=e(".fl-builder--content-library-panel");t.hasClass("fl-builder-ui-pinned-hidden")&&(t.removeClass("fl-builder-ui-pinned-hidden"),t.show(),this.restorePosition())},hide:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),i.addClass("fl-builder-ui-pinned-hidden"),i.hide(),t.css("margin",""))},collapse:function(){var t=e(this).find("i:visible"),i=e("body"),l=t.data("toggle"),s=t.data("position"),o=e(".fl-builder--content-library-panel"),n=o.outerWidth();"hide"===l?(o.css(s,"-"+n+"px"),i.css("margin-"+s,""),i.addClass("fl-builder-ui-pinned-is-collapsed")):(o.css(s,"0px"),i.css("margin-"+s,n+"px"),i.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&e(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return e("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var t=e(".fl-builder--content-library-panel");t.draggable({cursor:"move",handle:".fl-builder--tabs",cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:400,minWidth:380,maxWidth:500,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),t.addClass("fl-builder-ui-pinned-container"),t.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(t){var i=e(".fl-builder--content-library-panel"),l=i.width(),s=e("body"),o=e(".fl-responsive-preview, .fl-responsive-preview-mask"),n=e(FLBuilder._contentClass).parentsUntil("body").last();s.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+t),s.addClass("fl-builder-content-panel-is-showing"),s.css("margin-"+t,l+"px"),o.css("margin-"+t,l+"px"),n.addClass("fl-builder-ui-pinned-content-transform"),i.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+t),i.find(".ui-resizable-"+("left"===t?"e":"w")).show(),i.on("resize",_.throttle(this.resize.bind(this),250)),i.attr("style",""),FLBuilder.ContentPanel.isShowing=!0},unpinPanel:function(){var t=e(".fl-builder--content-library-panel"),i=t.find(".fl-builder--panel-content .is-showing").data("tab"),l=e("body"),s=e(".fl-responsive-preview, .fl-responsive-preview-mask"),o=e(FLBuilder._contentClass).parentsUntil("body").last();l.css("margin-left",""),l.css("margin-right",""),l.removeClass("fl-builder-ui-is-pinned"),l.removeClass("fl-builder-ui-is-pinned-left"),l.removeClass("fl-builder-ui-is-pinned-right"),s.css("margin-left",""),s.css("margin-right",""),o.removeClass("fl-lightbox-content-transform"),t.removeClass("fl-builder-ui-pinned"),t.removeClass("fl-builder-ui-pinned-left"),t.removeClass("fl-builder-ui-pinned-right"),t.find(".ui-resizable-handle").hide(),t.off("resize"),t.attr("style",""),t.find(".fl-builder--tabs [data-tab="+i+"]").addClass("is-showing")},pinLightboxes:function(){var t=this;e(".fl-lightbox-resizable").each(function(){t.pinLightbox(e(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(t){var i=e(".fl-builder--content-library-panel"),l=t.closest(".fl-lightbox-wrap");l.closest(".fl-builder-ui-pinned").length||(i.append(l),t.attr("style",""),t.draggable("disable"),t.resizable("disable")),t.is(":visible")&&i.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){var i=t._node.find(".fl-lightbox-resizable");i.length&&(i.hasClass("fl-builder-ui-pinning-initialized")||(i.draggable("option","start",this.dragStart.bind(this)),i.draggable("option","drag",this.drag.bind(this)),i.draggable("option","stop",this.dragStop.bind(this)),i.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(i),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var t=e(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=t.find(".fl-builder--panel-content .is-showing").data("tab"),t.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),e(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");i.find(".fl-lightbox-wrap").each(function(){var l=e(this),s=l.find(".fl-lightbox"),o=0,n=0,r=0;s.draggable("enable"),s.resizable("enable"),s.find(".ui-resizable-handle").show(),t.append(l),s.is(":visible")?(o=parseInt(i.css("top"))-parseInt(l.css("top"))-parseInt(l.css("padding-top")),n=parseInt(i.css("left"))-parseInt(l.css("padding-left")),r=parseInt(i.css("right"))-parseInt(l.css("padding-right")),s.css("top",(o<0?0:o)+"px"),s.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?r:n)+"px"),s.addClass("fl-lightbox-prevent-animation"),t.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):s.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var t=e("body"),i=e(".fl-responsive-preview, .fl-responsive-preview-mask"),l=e(".fl-builder--content-library-panel"),s=l.outerWidth();l.hasClass("fl-builder-ui-pinned-left")?(t.css("margin-left",s+"px"),i.css("margin-left",s+"px")):l.hasClass("fl-builder-ui-pinned-right")&&(t.css("margin-right",s+"px"),i.css("margin-right",s+"px"))},resizeStop:function(){e("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(t,i){var l=e("body"),s=(e(t.target),e(".fl-builder-bar-actions"));e(".fl-lightbox-resizable:visible").length||s.addClass("fl-builder-content-panel-pin-zone"),l.addClass("fl-builder-draggable-is-dragging"),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(t,i){var l=e("body"),s=e(".fl-responsive-preview"),o=e(window),n=s.length?s.width():o.width(),r=o.scrollTop(),a=e(".fl-builder--content-library-panel"),d=a.offset().top,u=e(".fl-builder-bar-actions"),c=e(t.target);c.hasClass("fl-builder--content-library-panel")&&(t.clientX<n-75&&d-r<46?u.addClass("fl-builder-content-panel-pin-zone-hover"):u.removeClass("fl-builder-content-panel-pin-zone-hover")),c.hasClass("fl-builder-ui-pinned")?this.unpinPanel():t.clientX<75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):t.clientX>n-75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(t,i){var l=(e(window),e("body")),s=e(".fl-builder-bar-actions"),o=e(".fl-builder-ui-pin-zone"),n=e(".fl-builder--content-library-panel"),r=e(".fl-lightbox-resizable:visible");e(t.target);l.removeClass("fl-builder-draggable-is-dragging"),s.removeClass("fl-builder-content-panel-pin-zone"),s.removeClass("fl-builder-content-panel-pin-zone-hover"),o.remove(),r.length&&parseInt(r.css("top"))<0&&r.css("top","0"),l.hasClass("fl-builder-ui-show-pin-zone")?(l.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right")):n.find(".fl-lightbox").length?this.unpin(!0):(n.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable");t.draggable("disable"),t.resizable("disable"),i.draggable("disable"),i.resizable("disable")},enableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");t.draggable("enable"),t.resizable("enable"),this.isPinned()||(i.draggable("enable"),i.resizable("enable"))},savePosition:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:visible"),l={pinned:{width:t.width(),position:null}};t.hasClass("fl-builder-ui-pinned-left")?l.pinned.position="left":t.hasClass("fl-builder-ui-pinned-right")?l.pinned.position="right":i.length&&(l.lightbox={width:i.width(),height:i.height(),top:parseInt(i.css("top"))<0?"0px":i.css("top"),left:i.css("left")}),FLBuilderConfig.userSettings.pinned=l.pinned,l.lightbox&&(FLBuilderConfig.userSettings.lightbox=l.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:l})},restorePosition:function(){var t=e(".fl-builder--content-library-panel"),i=FLBuilderConfig.userSettings.pinned;i&&i.position&&(t.width(i.width),this.pin(i.position,!1),t.width(i.width))}};e(function(){t.init()})}(jQuery),function(e){var t={init:function(){this.setupMainMenuData(),e(".fl-builder--revision-actions select").on("change",this.selectChanged),e(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),e(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var t=FLBuilderConfig.revisions.posts,i=FLBuilderConfig.revisions.authors,l=wp.template("fl-revision-list-item"),s=e(".fl-builder--revision-actions select"),o="",n="",r=0;if(FLBuilderConfig.mainMenu.revisions.items=[],s.html(""),0===t.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()
9
- });else for(r in t)o=FLBuilderStrings.revisionDate.replace("%s",t[r].date.diff),o+=" ("+t[r].date.published+")",n=FLBuilderStrings.revisionAuthor.replace("%s",i[t[r].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:l({id:t[r].id,date:o,author:n,avatar:i[t[r].author].avatar})}),s.append('<option value="'+t[r].id+'">'+o+"</option>");FLBuilder.triggerHook("renderRevisionsPanel")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=JSON.parse(e),this.setupMainMenuData()},itemClicked:function(t,i){var l=e(i).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(e(".fl-builder--revision-actions select").val(l),this.preview(l))},selectChanged:function(i){t.preview(e(this).val())},applyClicked:function(i){var l=e(".fl-builder--revision-actions select").val();t.restore(l)},preview:function(t){e(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:t},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(i){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:i},t.restoreComplete)},restoreComplete:function(e){var t=JSON.parse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",t.config)}};e(function(){t.init()})}(jQuery),function(e){var t={query:function(e){var t={},i=null,l={library:{}},s=null;if(e=this.normalizeQuery(e),_.isNull(e.kind))t=FLBuilderConfig.contentItems;else for(var o in e.kind)i=e.kind[o],t[i]=FLBuilderConfig.contentItems[i];return s=this.findMatches(e,t),l.library=this.formatResults(s,e),l},normalizeQuery:function(e){var t={kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1};return e=_.extend(t,e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i={},l=null,s=null,o=null,n=null,r=null,a=null;for(l in t){s=t[l],i[l]={items:[]};for(a in s)if(o=s[a],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(o.category,e.category)){switch(l){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(n=_.contains(e.content,o.content),r=e.content===o.content,n||r)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==o.type)continue;if(!_.isNull(e.group)){var d=e.group,u=o.group;if(_.isString(d)&&(d=[d]),_.isString(u)&&(u=[u]),_.isEmpty(d)||_.isEmpty(u))continue;var c=!1;for(a in d){var h=d[a];_.contains(u,h)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(e.group===!1&&o.group.length>0)continue;if(e.group!==!1&&!_.contains(o.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(o,e.searchTerm))&&i[l].items.push(o)}}return i},matchesCategory:function(e,t){var i,l,s,o,n,r;if(e===t)return!0;_.isString(t)&&(t=[t]);for(l in t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(s in e)if(o=e[s],o===i)return!0;if(_.isObject(e))for(n in e)if(r=e[n],r===i||n===i)return!0}return!1},matchesSearchTerm:function(e,t){var i,l,s=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(s))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(s))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(s))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(s))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||(i="widget",!i.includes(s)))||!(_.isUndefined(e.editor_export)||(l="module",!l.includes(s))))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,t){var i,l,s={};return _.forEach(e,function(e,o,n){i=e[t],_.isNull(i)||_.isUndefined(i)||_.isString(i)&&""===e[i]||(_.isString(i)&&(s[i]=s[i]||[],s[i].push(e)),_.isArray(i)&&(l=i,_.forEach(l,function(t,i,l){s[t]=s[t]||[],s[t].push(e)})),_.isObject(i)&&(l=i,_.forEach(l,function(t,i,l){s[t]=s[t]||[],s[t].push(e)})))}),s},search:function(e){var t={searchTerm:e},i=this.query(t),l={total:0,term:e,sections:{}};if(!_.isUndefined(i.library.module.items)){var s={};for(var o in i.library.module.items){var n=i.library.module.items[o],r=n.group[0],a=n.category;n.name;_.isUndefined(s[r])&&(s[r]={}),_.isUndefined(s[r][a])&&(s[r][a]=[]),s[r][a].push(n)}l.grouped=s}for(var o in i.library){var d=i.library[o];!_.isUndefined(d.items)&&d.items.length>0&&(l.sections[o]={name:FLBuilderStrings.typeLabels[o],handle:o,type:"",items:d.items},l.total+=d.items.length)}return l}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){var i=t.search(e);return i}}}(jQuery),function(e,t){var i={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=e(".fl-builder--saving-indicator"),t.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),t.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),t.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),t.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),t.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabledd||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,e("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&"save_pinned_ui_position"!=e))))},onLayoutSaved:function(e,t){if(this.isUpdatingLayout(t.fl_builder_data.action)){this.showStatusMessage(this.messages.saved,this.messages.savedTooltip);var i=this;setTimeout(function(){i.resetStatusMessage()},2e3)}},onLayoutPublished:function(){this.layoutNeedsPublish=!1,e("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(t,i){this.$savingIndicator.html(t),_.isUndefined(i)||(this.$savingIndicator.attr("title",i),e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fa fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){if(this.layoutNeedsPublish)t._publishLayout(!1);else{this.showStatusMessage(this.messages.noChanges);var e=this;setTimeout(function(){e.resetStatusMessage()},2e3)}}};t.SaveManager={layoutNeedsPublish:function(){return i.layoutNeedsPublish},showStatusMessage:function(e,t){i.showStatusMessage(e,t)},resetStatusMessage:function(){i.resetStatusMessage()}},e(function(){i.init()})}(jQuery,FLBuilder);
1
  var FLBuilderColorPicker;!function(e,t){function i(){var t,i,l="backgroundImage";h?f="filter":(t=e('<div id="iris-gradtest" />'),i="linear-gradient(top,#fff,#000)",e.each(g,function(e,s){if(t.css(l,s+i),t.css(l).match("gradient"))return f=e,!1}),f===!1&&(t.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),t.css(this.bgImageString).match("gradient")&&(f="webkit")),t.remove())}function l(t,i){return t="top"===t?"top":"left",i=e.isArray(i)?i:Array.prototype.slice.call(arguments,1),"webkit"===f?o(t,i):g[f]+"linear-gradient("+t+", "+i.join(", ")+")"}function s(t,i){var l,s,o,r,a,d,u,c,h;t="top"===t?"top":"left",i=e.isArray(i)?i:Array.prototype.slice.call(arguments,1),l="top"===t?0:1,s=e(this),o=i.length-1,r="filter",a=1===l?"left":"top",d=1===l?"right":"bottom",u=1===l?"height":"width",c='<div class="iris-ie-gradient-shim" style="position:absolute;'+u+":100%;"+a+":%start%;"+d+":%end%;"+r+':%filter%;" data-color:"%color%"></div>',h="","static"===s.css("position")&&s.css({position:"relative"}),i=n(i),e.each(i,function(e,t){var s,n,r;return e!==o&&(s=i[e+1],void(t.stop!==s.stop&&(n=100-parseFloat(s.stop)+"%",t.octoHex=new Color(t.color).toIEOctoHex(),s.octoHex=new Color(s.color).toIEOctoHex(),r="progid:DXImageTransform.Microsoft.Gradient(GradientType="+l+", StartColorStr='"+t.octoHex+"', EndColorStr='"+s.octoHex+"')",h+=c.replace("%start%",t.stop).replace("%end%",n).replace("%filter%",r))))}),s.find(".iris-ie-gradient-shim").remove(),e(h).prependTo(s)}function o(t,i){var l=[];return t="top"===t?"0% 0%,0% 100%,":"0% 100%,100% 100%,",i=n(i),e.each(i,function(e,t){l.push("color-stop("+parseFloat(t.stop)/100+", "+t.color+")")}),"-webkit-gradient(linear,"+t+l.join(",")+")"}function n(t){var i=[],l=[],s=[],o=t.length-1;return e.each(t,function(e,t){var s=t,o=!1,n=t.match(/1?[0-9]{1,2}%$/);n&&(s=t.replace(/\s?1?[0-9]{1,2}%$/,""),o=n.shift()),i.push(s),l.push(o)}),l[0]===!1&&(l[0]="0%"),l[o]===!1&&(l[o]="100%"),l=r(l),e.each(l,function(e){s[e]={color:i[e],stop:l[e]}}),s}function r(t){var i,l,s,o,n=0,a=t.length-1,d=0,u=!1;if(t.length<=2||e.inArray(!1,t)<0)return t;for(;d<t.length-1;)u||t[d]!==!1?u&&t[d]!==!1&&(a=d,d=t.length):(n=d-1,u=!0),d++;for(l=a-n,o=parseInt(t[n].replace("%"),10),i=(parseFloat(t[a].replace("%"))-o)/l,d=n+1,s=1;d<a;)t[d]=o+s*i+"%",s++,d++;return r(t)}var a=[],d=navigator.userAgent.toLowerCase(),u="Microsoft Internet Explorer"===navigator.appName,c=u?parseFloat(d.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,h=u&&c<10,f=!1,g=["-moz-","-webkit-","-o-","-ms-"];flBuilderParseColorValue=function(e){var t=e.replace(/\s+/g,""),i=t.indexOf("rgba")!==-1?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100,l=i<100;return{value:t,alpha:i,rgba:l}},e.fn.flBuilderColorPickerGradient=function(){var t=arguments;return this.each(function(){h?s.apply(this,t):e(this).css("backgroundImage",l.apply(this,t))})},e.fn.flBuilderColorPickerRaninbowGradient=function(t,i){var l,s,o,n;for(t=t||"top",l=e.extend({},{s:100,l:50},i),s="hsl(%h%,"+l.s+"%,"+l.l+"%)",o=0,n=[];o<=360;)n.push(s.replace("%h%",o)),o+=30;return this.each(function(){e(this).flBuilderColorPickerGradient(t,n)})},FLBuilderColorPicker=function(t){this._html='<div class="fl-color-picker-ui"><div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="javascript:void(0);"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div></div>';var i={elements:null,color:"",mode:"hsl",controls:{horiz:"s",vert:"l",strip:"h"},target:!1,width:200,presets:[],labels:{colorPresets:"Color Presets",colorPicker:"Color Picker",placeholder:"Paste color here...",removePresetConfirm:"Are you sure?",noneColorSelected:"None color selected.",alreadySaved:"%s is already a saved preset.",noPresets:"Add a color preset first.",presetAdded:"%s added to presets!"}};this.options=e.extend({},i,t),(h===!1||h===!0&&c>7)&&this._init()},FLBuilderColorPicker.prototype={_html:"",_color:"",_currentElement:"",_inited:!1,_defaultHSLControls:{horiz:"s",vert:"l",strip:"h"},_defaultHSVControls:{horiz:"h",vert:"v",strip:"s"},_scale:{h:360,s:100,l:100,v:100},_init:function(){var t=this;e(t.options.elements);this._color=new Color("#ff0000").setHSpace(t.options.mode),a=this.options.presets,f===!1&&i(),e("html").hasClass("fl-color-picker-init")?t.picker=e(".fl-color-picker-ui"):t.picker=e(this._html).appendTo("body"),u?9===c?t.picker.addClass("iris-ie-9"):c<=8&&t.picker.addClass("iris-ie-lt9"):d.indexOf("compatible")<0&&d.indexOf("khtml")<0&&d.match(/mozilla/)&&t.picker.addClass("iris-mozilla"),t.controls={square:t.picker.find(".iris-square"),squareDrag:t.picker.find(".iris-square-value"),horiz:t.picker.find(".iris-square-horiz"),vert:t.picker.find(".iris-square-vert"),strip:t.picker.find(".iris-strip"),stripSlider:t.picker.find(".iris-strip .iris-slider-offset")},"hsv"===t.options.mode&&t._has("l",t.options.controls)?t.options.controls=t._defaultHSVControls:"hsl"===t.options.mode&&t._has("v",t.options.controls)&&(t.options.controls=t._defaultHSLControls),t.hue=t._color.h(),this._setTemplates(),this._ui=e(".fl-color-picker-ui"),this._iris=e(".iris-picker"),this._wrapper=e("body"),e("html").hasClass("fl-color-picker-init")||this._ui.prepend(this._hexHtml).append(this._presetsHtml),t.element=this._ui.find(".fl-color-picker-input"),t._initControls(),t.active="external",t._change(),t._addInputListeners(t.element),this._buildUI(),this._prepareColorFields(),this._pickerControls(),this._presetsControls(),this._buildAlphaUI(),e("html").addClass("fl-color-picker-init")},_prepareColorFields:function(){var t=this;e(".fl-color-picker-value").each(function(){var i=e(this),l=i.val(),s=i.parent().find(".fl-color-picker-color"),o=flBuilderParseColorValue(l),n="";if(l){if(s.hasClass("fl-color-picker-alpha-enabled")&&o.rgba)n=i.val().toString();else if(!s.hasClass("fl-color-picker-alpha-enabled")&&o.rgba){var r=l.replace("rgba","rgb");r=r.substr(0,r.lastIndexOf(","))+")",t._color._alpha=1,n=r,i.val(r)}else n="#"+i.val().toString();s.css({backgroundColor:n})}})},_setTemplates:function(){this._alphaHtml='<div class="fl-alpha-wrap"><div class="fl-alpha-slider"></div><div class="fl-alpha-slider-offset"></div><div class="fl-alpha-text"></div></div>',this._presetsHtml='<div class="fl-color-picker-presets"><div class="fl-color-picker-presets-toggle"><div class="fl-color-picker-presets-open-label fl-color-picker-active">'+this.options.labels.colorPresets+' <span class="fl-color-picker-icon-arrow-up"></span></div><div class="fl-color-picker-presets-close-label">'+this.options.labels.colorPicker+' <span class="fl-color-picker-icon-arrow-down"></span></div></div><ul class="fl-color-picker-presets-list"></ul></div>',this._hexHtml='<input type="text" class="fl-color-picker-input" maxlength="7" placeholder="'+this.options.labels.placeholder+'"><div class="fl-color-picker-preset-add"></div>',this._presetsTpl='<li class="fl-color-picker-preset"><span class="fl-color-picker-preset-color"></span> <span class="fl-color-picker-preset-label"></span> <span class="fl-color-picker-preset-remove fl-color-picker-icon-remove"></span></li>',this._noPresetsTpl='<li class="fl-color-picker-no-preset"><span class="fl-color-picker-preset-label">'+this.options.labels.noPresets+"</span></li>"},_has:function(t,i){var l=!1;return e.each(i,function(e,i){if(t===i)return l=!0,!1}),l},_buildUI:function(){var t=this;t._presetsList=this._ui.find(".fl-color-picker-presets-list"),t._presetsList.html(""),this.options.presets.length>0?e.each(this.options.presets,function(e,i){t._addPresetView(i)}):t._presetsList.append(this._noPresetsTpl)},_addPresetView:function(t){var i=this._presetsList.find(".fl-color-picker-no-preset");i.length>0&&i.remove();var l=e(this._presetsTpl),s=Color(t);l.attr("data-color",t).find(".fl-color-picker-preset-color").css({backgroundColor:s.toString()}).end().find(".fl-color-picker-preset-label").html(s.toString()),this._presetsList.append(l)},_addPresetFeedback:function(){this._ui.append('<div class="fl-color-picker-added"><div class="fl-color-picker-added-text"><div class="fl-color-picker-icon-check"></div> "'+this.options.labels.presetAdded.replace("%s",this._color.toString())+'"</div></div>'),this._ui.find(".fl-color-picker-added").hide().fadeIn(200).delay(2e3).fadeOut(200,function(){e(this).remove()})},_pickerControls:function(){var t=this;this._wrapper.on("click",".fl-color-picker-color",function(){var i=e(this);t._currentElement=i.parent().find(".fl-color-picker-value"),t._ui.position({my:"left top",at:"left bottom",of:i,collision:"flipfit",using:function(e,i){t._togglePicker(e)}})}).on("click",".fl-color-picker-clear",function(){var i=e(this);t._currentElement=i.parent().find(".fl-color-picker-value"),i.prev(".fl-color-picker-color").css({backgroundColor:"transparent"}).addClass("fl-color-picker-empty"),t._setColor(""),t.element.val(""),t._currentElement.val("").trigger("change")}),e(document).on("mousedown",function(t){0===e(t.target).closest(".fl-color-picker-ui").length&&e(".fl-color-picker-ui.fl-color-picker-active").removeClass("fl-color-picker-active")})},_presetsControls:function(){var t=this,i=t._ui.find(".fl-color-picker-preset-add"),l=t._ui.find(".fl-color-picker-presets"),s=l.find(".fl-color-picker-presets-open-label"),o=l.find(".fl-color-picker-presets-close-label"),n=l.find(".fl-color-picker-presets-list");i.off("click").on("click",function(){t._addPreset(t.element.val())}),n.css({height:t.element.innerHeight()+t._iris.innerHeight()+14+"px"}).hide(),l.off("click").on("click",".fl-color-picker-presets-toggle",function(){s.toggleClass("fl-color-picker-active"),o.toggleClass("fl-color-picker-active"),n.slideToggle(500)}).on("click",".fl-color-picker-preset",function(i){var l=new Color(e(this).data("color").toString());t._setColor(l),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:l.toString()}).removeClass("fl-color-picker-empty"),s.toggleClass("fl-color-picker-active"),o.toggleClass("fl-color-picker-active"),n.slideToggle(500)}).on("click",".fl-color-picker-preset-remove",function(i){i.stopPropagation(),t._removePreset(e(this).parent().data("color"))})},_removePreset:function(t){if(confirm(this.options.labels.removePresetConfirm)){var i=t.toString(),l=a.indexOf(i);l>-1&&(a.splice(l,1),this.options.presets=a,this._presetsList.find('.fl-color-picker-preset[data-color="'+i+'"]').slideUp(function(){e(this).remove()})),a.length<1&&this._presetsList.append(this._noPresetsTpl),e(this).trigger("presetRemoved",{presets:a})}},_addPreset:function(t){var i=t.toString().replace(/^#/,"");""===i?alert(this.options.labels.noneColorSelected):a.indexOf(i)>-1?alert(this.options.labels.alreadySaved.replace("%s","#"+i)):(this._addPresetView(i),this._addPresetFeedback(),a.push(i),this.options.presets=a,e(this).trigger("presetAdded",{presets:a}))},_togglePicker:function(e){var t=this;this._ui.hasClass("fl-color-picker-active")?(this._ui.removeClass("fl-color-picker-active"),e&&setTimeout(function(){t._ui.css(e),t._ui.addClass("fl-color-picker-active"),t._setColor(t._currentElement.val())},200)):(e&&t._ui.css(e),setTimeout(function(){t._ui.addClass("fl-color-picker-active"),t._setColor(t._currentElement.val())},200))},_paint:function(){var e=this;e._paintDimension("right","strip"),e._paintDimension("top","vert"),e._paintDimension("left","horiz")},_paintDimension:function(e,t){var i,l=this,s=l._color,o=l.options.mode,n=l._getHSpaceColor(),r=l.controls[t],a=l.options.controls;if(t!==l.active&&("square"!==l.active||"strip"===t))switch(a[t]){case"h":if("hsv"===o){switch(n=s.clone(),t){case"horiz":n[a.vert](100);break;case"vert":n[a.horiz](100);break;case"strip":n.setHSpace("hsl")}i=n.toHsl()}else i="strip"===t?{s:n.s,l:n.l}:{s:100,l:n.l};r.flBuilderColorPickerRaninbowGradient(e,i);break;case"s":"hsv"===o?"vert"===t?i=[s.clone().a(0).s(0).toCSS("rgba"),s.clone().a(1).s(0).toCSS("rgba")]:"strip"===t?i=[s.clone().s(100).toCSS("hsl"),s.clone().s(0).toCSS("hsl")]:"horiz"===t&&(i=["#fff","hsl("+n.h+",100%,50%)"]):i="vert"===t&&"h"===l.options.controls.horiz?["hsla(0, 0%, "+n.l+"%, 0)","hsla(0, 0%, "+n.l+"%, 1)"]:["hsl("+n.h+",0%,50%)","hsl("+n.h+",100%,50%)"],r.flBuilderColorPickerGradient(e,i);break;case"l":i="strip"===t?["hsl("+n.h+",100%,100%)","hsl("+n.h+", "+n.s+"%,50%)","hsl("+n.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],r.flBuilderColorPickerGradient(e,i);break;case"v":i="strip"===t?[s.clone().v(100).toCSS(),s.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],r.flBuilderColorPickerGradient(e,i)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(e){var t,i=this,l=i.options,s=i.controls,o=s.square,n=i.picker.find(".iris-strip"),r="77.5%",a="12%",d=20,u=l.border?l.width-d:l.width;if(e&&(o.css("width",""),n.css("width",""),i.picker.css({width:"",height:""})),r=u*(parseFloat(r)/100),a=u*(parseFloat(a)/100),t=l.border?r+d:r,o.width(r).height(r),n.height(r).width(a),i.picker.css({width:l.width,height:t}),!l.palettes)return i.picker.css("paddingBottom","")},_addInputListeners:function(e){var t=this,i=100,l=function(i){var l=new Color(e.val()),s=e.val().replace(/^#/,""),o=t._currentElement.hasClass("fl-color-picker-empty");if(e.removeClass("iris-error"),l.error)""!==s&&e.addClass("iris-error");else if(l.toString()!==t._color.toString()||""!==t._color.toString()&&o)if("keyup"===i.type){if(s.match(/^[0-9a-fA-F]{3}$/))return;t._setColor(s),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:Color(s).toString()}).removeClass("fl-color-picker-empty"),t._currentElement.val(s).trigger("change")}else if("paste"===i.type)return s=i.originalEvent.clipboardData.getData("text").replace(/^#/,""),hex=Color(s).toString(),t._setColor(s),e.val(hex),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:hex}).removeClass("fl-color-picker-empty"),t._currentElement.val(s).trigger("change"),!1};e.on("change",l).on("keyup",t._debounce(l,i))},_initControls:function(){var t=this,i=t.controls,l=i.square,s=t.options.controls,o=t._scale[s.strip];i.stripSlider.slider({orientation:"horizontal",max:o,slide:function(e,i){t.active="strip","h"===s.strip&&(i.value=o-i.value),t._color[s.strip](i.value),t._change.apply(t,arguments)}}),i.squareDrag.draggable({containment:i.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(e,i){t._squareDrag(e,i)},start:function(){l.addClass("iris-dragging"),e(this).addClass("ui-state-focus")},stop:function(){l.removeClass("iris-dragging"),e(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(i){var l="ui-state-focus";i.preventDefault(),"mousedown"===i.type?(t.picker.find("."+l).removeClass(l).blur(),e(this).addClass(l).focus()):e(this).removeClass(l)}).on("keydown",function(e){var l=i.square,s=i.squareDrag,o=s.position(),n=2;switch(e.altKey&&(n*=10),e.keyCode){case 37:o.left-=n;break;case 38:o.top-=n;break;case 39:o.left+=n;break;case 40:o.top+=n;break;default:return!0}o.left=Math.max(0,Math.min(o.left,l.width())),o.top=Math.max(0,Math.min(o.top,l.height())),s.css(o),t._squareDrag(e,{position:o}),e.preventDefault()}),l.mousedown(function(i){var l,s;1===i.which&&e(i.target).is("div")&&(l=t.controls.square.offset(),s={top:i.pageY-l.top,left:i.pageX-l.left},i.preventDefault(),t._squareDrag(i,{position:s}),i.target=t.controls.squareDrag.get(0),t.controls.squareDrag.css(s).trigger(i))})},_squareDrag:function(e,t){var i=this,l=i.options.controls,s=i._squareDimensions(),o=Math.round((s.h-t.position.top)/s.h*i._scale[l.vert]),n=i._scale[l.horiz]-Math.round((s.w-t.position.left)/s.w*i._scale[l.horiz]);i._color[l.horiz](n)[l.vert](o),i.active="square",i._change.apply(i,arguments)},_setColor:function(e){var t,i,l=this,s=l.options.color;l.options.color=e,e=""+e,t=e.replace(/^#/,""),i=new Color(e).setHSpace(l.options.mode),i.error?l.options.color=s:(l._color=i,l.options.color=l._color.toString(),l.active="external",l._change())},_squareDimensions:function(e){var i,l,s=this.controls.square;return e!==t&&s.data("dimensions")?s.data("dimensions"):(l=this.controls.squareDrag,i={w:s.width(),h:s.height()},s.data("dimensions",i),i)},_isNonHueControl:function(e,t){return"square"===e&&"h"===this.options.controls.strip||"external"!==t&&("h"!==t||"strip"!==e)},_change:function(){var t=this,i=t.controls,l=t._getHSpaceColor(),s=["square","strip"],o=t.options.controls,n=o[t.active]||"external",r=t.hue;"strip"===t.active?s=[]:"external"!==t.active&&s.pop(),e.each(s,function(e,s){var n,r,a;if(s!==t.active)switch(s){case"strip":n="h"===o.strip?t._scale[o.strip]-l[o.strip]:l[o.strip],i.stripSlider.slider("value",n);break;case"square":r=t._squareDimensions(),a={left:l[o.horiz]/t._scale[o.horiz]*r.w,top:r.h-l[o.vert]/t._scale[o.vert]*r.h},t.controls.squareDrag.css(a)}}),l.h!==r&&t._isNonHueControl(t.active,n)&&t._color.h(r),t.hue=t._color.h(),t.options.color=t._color.toString(),t.element.is(":input")&&!t._color.error&&(t.element.removeClass("iris-error"),t.element.val()!==t._color.toString()&&(t.element.val(t._color.toString()),this._currentElement&&(this._currentElement.val(t._color.toString().replace(/^#/,"")).parent().find(".fl-color-picker-color").css({backgroundColor:t._color.toString()}).removeClass("fl-color-picker-empty"),t._wrapper.find(".fl-alpha-slider-offset").css("background-color",t._color.toString()),this._currentElement.trigger("change")))),t._paint(),t._inited=!0,t.active=!1},_debounce:function(e,t,i){var l,s;return function(){var o,n,r=this,a=arguments;return o=function(){l=null,i||(s=e.apply(r,a))},n=i&&!l,clearTimeout(l),l=setTimeout(o,t),n&&(s=e.apply(r,a)),s}},_buildAlphaUI:function(){var t=this;t._wrapper.on("click",".fl-color-picker-color",function(){var i=e(this);t._currentElement.val();i.hasClass("fl-color-picker-alpha-enabled")?(t._ui.find(".fl-alpha-wrap").length<=0&&e(t._alphaHtml).insertAfter(t._iris),t.picker.addClass("fl-color-alpha-enabled"),t._pickerAlphaControls()):t._ui.find(".fl-alpha-wrap").remove()})},_pickerAlphaControls:function(){var e=this,t=e._currentElement,i=flBuilderParseColorValue(t.val()),l=parseFloat(i.alpha/100),s=e._wrapper,o=e._ui,n=o.find(".fl-alpha-wrap"),r=n.find(".fl-alpha-slider"),a=n.find(".fl-alpha-text"),d=n.find(".fl-alpha-slider-offset");alphaHandle=n.find(".ui-slider-handle"),a.text(l<1?l:""),r.slider({orientation:"vertical",slide:function(t,i){var l=parseFloat(i.value/100);e._color._alpha=l,a.text(l<1?l:""),e._change.apply(e,arguments)},create:function(){d.css({backgroundColor:i.value}),s.on("click",".fl-color-picker-clear",function(){e._color._alpha=1,a.text(""),r.slider("value",100).trigger("slide")})},value:i.alpha,step:1,min:1,max:100})}}}(jQuery),function(e,t){var i=function(e,t){return this instanceof i?this._init(e,t):new i(e,t)};i.fn=i.prototype={_color:0,_alpha:1,error:!1,_hsl:{h:0,s:0,l:0},_hsv:{h:0,s:0,v:0},_hSpace:"hsl",_init:function(e){var i="noop";switch(typeof e){case"object":return e.a!==t&&this.a(e.a),i=e.r!==t?"fromRgb":e.l!==t?"fromHsl":e.v!==t?"fromHsv":i,this[i](e);case"string":return this.fromCSS(e);case"number":return this.fromInt(parseInt(e,10))}return this},_error:function(){return this.error=!0,this},clone:function(){for(var e=new i(this.toInt()),t=["_alpha","_hSpace","_hsl","_hsv","error"],l=t.length-1;l>=0;l--)e[t[l]]=this[t[l]];return e},setHSpace:function(e){return this._hSpace="hsv"===e?e:"hsl",this},noop:function(){return this},fromCSS:function(e){var t,i=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,e=e.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),e.match(i)&&e.match(/\)$/)){if(t=e.replace(/(\s|%)/g,"").replace(i,"").replace(/,?\);?$/,"").split(","),t.length<3)return this._error();if(4===t.length&&(this.a(parseFloat(t.pop())),this.error))return this;for(var l=t.length-1;l>=0;l--)if(t[l]=parseInt(t[l],10),isNaN(t[l]))return this._error();return e.match(/^rgb/)?this.fromRgb({r:t[0],g:t[1],b:t[2]}):e.match(/^hsv/)?this.fromHsv({h:t[0],s:t[1],v:t[2]}):this.fromHsl({h:t[0],s:t[1],l:t[2]})}return this.fromHex(e)},fromRgb:function(e,i){return"object"!=typeof e||e.r===t||e.g===t||e.b===t?this._error():(this.error=!1,this.fromInt(parseInt((e.r<<16)+(e.g<<8)+e.b,10),i))},fromHex:function(e){return e=e.replace(/^#/,"").replace(/^0x/,""),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),this.error=!/^[0-9A-F]{6}$/i.test(e),this.fromInt(parseInt(e,16))},fromHsl:function(e){var i,l,s,o,n,r,a,d;return"object"!=typeof e||e.h===t||e.s===t||e.l===t?this._error():(this._hsl=e,this._hSpace="hsl",r=e.h/360,a=e.s/100,d=e.l/100,0===a?i=l=s=d:(o=d<.5?d*(1+a):d+a-d*a,n=2*d-o,i=this.hue2rgb(n,o,r+1/3),l=this.hue2rgb(n,o,r),s=this.hue2rgb(n,o,r-1/3)),this.fromRgb({r:255*i,g:255*l,b:255*s},!0))},fromHsv:function(e){var i,l,s,o,n,r,a,d,u,c,h;if("object"!=typeof e||e.h===t||e.s===t||e.v===t)return this._error();switch(this._hsv=e,this._hSpace="hsv",i=e.h/360,l=e.s/100,s=e.v/100,a=Math.floor(6*i),d=6*i-a,u=s*(1-l),c=s*(1-d*l),h=s*(1-(1-d)*l),a%6){case 0:o=s,n=h,r=u;break;case 1:o=c,n=s,r=u;break;case 2:o=u,n=s,r=h;break;case 3:o=u,n=c,r=s;break;case 4:o=h,n=u,r=s;break;case 5:o=s,n=u,r=c}return this.fromRgb({r:255*o,g:255*n,b:255*r},!0)},fromInt:function(e,i){return this._color=parseInt(e,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),i===t&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},toString:function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;t>=0;t--)e="0"+e;return"#"+e},toCSS:function(e,t){switch(e=e||"hex",t=parseFloat(t||this._alpha),e){case"rgb":case"rgba":var i=this.toRgb();return t<1?"rgba( "+i.r+", "+i.g+", "+i.b+", "+t+" )":"rgb( "+i.r+", "+i.g+", "+i.b+" )";case"hsl":case"hsla":var l=this.toHsl();return t<1?"hsla( "+l.h+", "+l.s+"%, "+l.l+"%, "+t+" )":"hsl( "+l.h+", "+l.s+"%, "+l.l+"% )";default:return this.toString()}},toRgb:function(){return{r:255&this._color>>16,g:255&this._color>>8,b:255&this._color}},toHsl:function(){var e,t,i=this.toRgb(),l=i.r/255,s=i.g/255,o=i.b/255,n=Math.max(l,s,o),r=Math.min(l,s,o),a=(n+r)/2;if(n===r)e=t=0;else{var d=n-r;switch(t=a>.5?d/(2-n-r):d/(n+r),n){case l:e=(s-o)/d+(s<o?6:0);break;case s:e=(o-l)/d+2;break;case o:e=(l-s)/d+4}e/=6}return e=Math.round(360*e),0===e&&this._hsl.h!==e&&(e=this._hsl.h),t=Math.round(100*t),0===t&&this._hsl.s&&(t=this._hsl.s),{h:e,s:t,l:Math.round(100*a)}},toHsv:function(){var e,t,i=this.toRgb(),l=i.r/255,s=i.g/255,o=i.b/255,n=Math.max(l,s,o),r=Math.min(l,s,o),a=n,d=n-r;if(t=0===n?0:d/n,n===r)e=t=0;else{switch(n){case l:e=(s-o)/d+(s<o?6:0);break;case s:e=(o-l)/d+2;break;case o:e=(l-s)/d+4}e/=6}return e=Math.round(360*e),0===e&&this._hsv.h!==e&&(e=this._hsv.h),t=Math.round(100*t),0===t&&this._hsv.s&&(t=this._hsv.s),{h:e,s:t,v:Math.round(100*a)}},toInt:function(){return this._color},toIEOctoHex:function(){var e=this.toString(),t=parseInt(255*this._alpha,10).toString(16);return 1===t.length&&(t="0"+t),"#"+t+e.replace(/^#/,"")},toLuminosity:function(){var e=this.toRgb();return.2126*Math.pow(e.r/255,2.2)+.7152*Math.pow(e.g/255,2.2)+.0722*Math.pow(e.b/255,2.2)},getDistanceLuminosityFrom:function(e){if(!(e instanceof i))throw"getDistanceLuminosityFrom requires a Color object";var t=this.toLuminosity(),l=e.toLuminosity();return t>l?(t+.05)/(l+.05):(l+.05)/(t+.05)},getMaxContrastColor:function(){var e=this.toLuminosity(),t=e>=.5?"000000":"ffffff";return new i(t)},getReadableContrastingColor:function(e,l){if(!(e instanceof i))return this;var s=l===t?5:l,o=e.getDistanceLuminosityFrom(this),n=e.getMaxContrastColor(),r=n.getDistanceLuminosityFrom(e);if(r<=s)return n;if(o>=s)return this;for(var a=0===n.toInt()?-1:1;o<s&&(this.l(a,!0),o=this.getDistanceLuminosityFrom(e),0!==this._color&&16777215!==this._color););return this},a:function(e){if(e===t)return this._alpha;var i=parseFloat(e);return isNaN(i)?this._error():(this._alpha=i,this)},darken:function(e){return e=e||5,this.l(-e,!0)},lighten:function(e){return e=e||5,this.l(e,!0)},saturate:function(e){return e=e||15,this.s(e,!0)},desaturate:function(e){return e=e||15,this.s(-e,!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(e){e=e||1;var t=180+30*e;return this.h(t,!0)},getAnalog:function(e){e=e||1;var t=30*e;return this.h(t,!0)},getTetrad:function(e){e=e||1;var t=60*e;return this.h(t,!0)},getTriad:function(e){e=e||1;var t=120*e;return this.h(t,!0)},_partial:function(e){var i=l[e];return function(l,s){var o=this._spaceFunc("to",i.space);return l===t?o[e]:(s===!0&&(l=o[e]+l),i.mod&&(l%=i.mod),i.range&&(l=l<i.range[0]?i.range[0]:l>i.range[1]?i.range[1]:l),o[e]=l,this._spaceFunc("from",i.space,o))}},_spaceFunc:function(e,t,i){var l=t||this._hSpace,s=e+l.charAt(0).toUpperCase()+l.substr(1);return this[s](i)}};var l={h:{mod:360},s:{range:[0,100]},l:{space:"hsl",range:[0,100]},v:{space:"hsv",range:[0,100]},r:{space:"rgb",range:[0,255]},g:{space:"rgb",range:[0,255]},b:{space:"rgb",range:[0,255]}};for(var s in l)l.hasOwnProperty(s)&&(i.fn[s]=i.fn._partial(s));"object"==typeof exports?module.exports=i:e.Color=i}(this),function(e){FLLightbox=function(e){this._init(e)},FLLightbox.closeParent=function(t){var i=e(t).closest(".fl-lightbox-wrap").attr("data-instance-id");_.isUndefined(i)||FLLightbox._instances[i].close()},FLLightbox.getResizableControlClass=function(){var t=e(".fl-lightbox-resizable").eq(0),i="fa fa-window-maximize";return t.length&&t.hasClass("fl-lightbox-width-full")&&(i="fa fa-window-minimize"),i},FLLightbox.unbindAll=function(){var e;for(e in FLLightbox._instances)FLLightbox._instances[e]._unbind()},FLLightbox.bindAll=function(){var e;for(e in FLLightbox._instances)FLLightbox._instances[e]._bind()},FLLightbox.closeAll=function(){var e;for(e in FLLightbox._instances)FLLightbox._instances[e].close()},FLLightbox._instances={},FLLightbox.prototype={_id:null,_node:null,_visible:!1,_allowClosing:!0,_resizeTimer:null,_defaults:{className:"",destroyOnClose:!1,resizable:!1},open:function(e){this._bind(),this._node.show(),this._visible=!0,"undefined"!=typeof e?this.setContent(e):this._resize(),this.trigger("open"),FLBuilder.triggerHook("didShowLightbox",this)},close:function(){var e=this._node.data("parent");this._allowClosing&&(this.trigger("beforeCloseLightbox"),this._unbind(),this._node.hide(),this._visible=!1,this.trigger("close"),FLBuilder.triggerHook("didHideLightbox"),this._defaults.resizable&&_.isUndefined(e)&&FLBuilder.triggerHook("didHideAllLightboxes"),this._defaults.destroyOnClose&&this.destroy())},disableClose:function(){this._allowClosing=!1},enableClose:function(){this._allowClosing=!0},setContent:function(e){this._node.find(".fl-lightbox-content").html(e),this._resize()},empty:function(){this._node.find(".fl-lightbox-content").empty()},on:function(e,t){this._node.on(e,t)},off:function(e,t){this._node.off(e,t)},trigger:function(e,t){this._node.trigger(e,t)},destroy:function(){this._node.empty(),this._node.remove(),FLLightbox._instances[this._id]="undefined";try{delete FLLightbox._instances[this._id]}catch(e){}},_init:function(t){var i=0,l=null;for(l in FLLightbox._instances)i++;this._defaults=e.extend({},this._defaults,t),this._id=(new Date).getTime()+i,FLLightbox._instances[this._id]=this,this._render(),this._resizable()},_render:function(){this._node=e('<div class="fl-lightbox-wrap" data-instance-id="'+this._id+'"><div class="fl-lightbox-mask"></div><div class="fl-lightbox"><div class="fl-lightbox-content-wrap"><div class="fl-lightbox-content"></div></div></div></div>'),this._node.addClass(this._defaults.className),e("body").append(this._node)},_bind:function(){e(window).on("resize.fl-lightbox-"+this._id,this._delayedResize.bind(this))},_unbind:function(){e(window).off("resize.fl-lightbox-"+this._id)},_resizable:function(){var t=(e("body"),this._node.find(".fl-lightbox-mask")),i=this._node.find(".fl-lightbox"),l=e(".fl-lightbox-resizable").eq(0);this._defaults.resizable?(t.hide(),i.addClass("fl-lightbox-resizable"),i.delegate(".fl-lightbox-resize-toggle","click",this._resizeClicked.bind(this)),i.draggable({cursor:"move",handle:".fl-lightbox-header"}).resizable({handles:"all",minHeight:500,minWidth:380,start:this._resizeStart.bind(this),stop:this._resizeStop.bind(this)}),l.length&&l.hasClass("fl-lightbox-width-full")?(i.addClass("fl-lightbox-width-full"),i.draggable("disable")):this._restorePosition()):t.show(),this._resize()},_delayedResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._resize.bind(this),250)},_resize:function(){var t=this._node.find(".fl-lightbox"),i=parseInt(this._node.css("padding-top")),l=parseInt(this._node.css("padding-bottom")),s=parseInt(this._node.css("padding-left")),o=parseInt(this._node.css("padding-right")),n=t.height(),r=t.width(),a=e(window),d=a.height()-i-l,u=(a.width()-s-o,"0px");this._defaults.resizable?(r<600?t.addClass("fl-lightbox-width-slim"):t.removeClass("fl-lightbox-width-slim"),this._resizeEditors()):(d>n&&(u=(d-n-46)/2+"px"),t.attr("style","").css("margin",u+" auto 0")),this.trigger("resized")},_resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),e(".fl-builder-lightbox:visible").append('<div class="fl-builder-resizable-iframe-fix"></div>'),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},_resizeStop:function(t,i){var l=e(".fl-lightbox-resizable:visible");parseInt(l.css("top"))<0&&l.css("top","0"),this._savePosition(),e("body").removeClass("fl-builder-resizable-is-resizing"),e(".fl-builder-resizable-iframe-fix").remove(),FLBuilder._bindOverlayEvents()},_resizeClicked:function(){var t=e(".fl-lightbox-resizable"),i=(t.find(".fl-lightbox-resize-toggle"),this._node.find(".fl-lightbox"));i.hasClass("fl-lightbox-width-full")?this._resizeExitFull():this._resizeEnterFull(),this._resize()},_resizeEnterFull:function(){var t=e(".fl-lightbox-resizable"),i=t.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");i.removeClass("fa-window-maximize").addClass("fa-window-minimize"),t.addClass("fl-lightbox-width-full"),t.draggable("disable"),t.resizable("disable")},_resizeExitFull:function(){var t=e(".fl-lightbox-resizable"),i=t.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");i.removeClass("fa-window-minimize").addClass("fa-window-maximize"),t.removeClass("fl-lightbox-width-full"),t.draggable("enable"),t.resizable("enable")},_resizeEditors:function(){e(".fl-lightbox-resizable").each(function(){var t=e(this),i=t.find(".fl-builder-settings-fields").height(),l=t.find(".mce-edit-area > iframe, textarea.wp-editor-area, .ace_editor"),s=null;i<350&&(i=350),l.each(function(){s=e(this),s.hasClass("ace_editor")?(s.height(i-60),s.closest(".fl-field").data("editor").resize()):s.closest(".mce-container-body").find(".mce-toolbar-grp .mce-toolbar.mce-last").is(":visible")?s.height(i-175):s.height(i-150)})})},_savePosition:function(){var e=this._node.find(".fl-lightbox"),t={width:e.width(),height:e.height(),top:parseInt(e.css("top"))<0?"0px":e.css("top"),left:e.css("left")};e.closest(".fl-builder-ui-pinned").length||(FLBuilderConfig.userSettings.lightbox=t,FLBuilder.ajax({action:"save_lightbox_position",data:t}))},_restorePosition:function(){var e=this._node.find(".fl-lightbox"),t=FLBuilderConfig.userSettings.lightbox;t?e.css(t):e.css({top:25,left:FLBuilderConfig.isRtl?"-25":25})}}}(jQuery),function(e){FLIconSelector={_content:null,_lightbox:null,_rendered:!1,_filterText:"",open:function(e){FLIconSelector._rendered||FLIconSelector._render(),null===FLIconSelector._content?(FLIconSelector._lightbox.open('<div class="fl-builder-lightbox-loading"></div>'),FLBuilder.ajax({
2
  action:"render_icon_selector"},FLIconSelector._getContentComplete)):FLIconSelector._lightbox.open(),FLIconSelector._lightbox.on("icon-selected",function(t,i){FLIconSelector._lightbox.off("icon-selected"),FLIconSelector._lightbox.close(),e(i)})},_render:function(){FLIconSelector._lightbox=new FLLightbox({className:"fl-icon-selector"}),FLIconSelector._rendered=!0},_getContentComplete:function(t){var i=JSON.parse(t);FLIconSelector._content=i.html,FLIconSelector._lightbox.setContent(i.html),e(".fl-icons-filter-select").on("change",FLIconSelector._filter),e(".fl-icons-filter-text").on("keyup",FLIconSelector._filter),e(".fl-icons-list i").on("click",FLIconSelector._select),e(".fl-icon-selector-cancel").on("click",e.proxy(FLIconSelector._lightbox.close,FLIconSelector._lightbox))},_filter:function(){var t=e(".fl-icons-filter-select").val(),i=e(".fl-icons-filter-text").val();"all"==t?e(".fl-icons-section").show():(e(".fl-icons-section").hide(),e(".fl-"+t).show()),FLIconSelector._filterText=i,""!==i?e(".fl-icons-list i").each(FLIconSelector._filterIcon):e(".fl-icons-list i").show()},_filterIcon:function(){var t=e(this);-1==t.attr("class").indexOf(FLIconSelector._filterText)?t.hide():t.show()},_select:function(){var t=e(this).attr("class");FLIconSelector._lightbox.trigger("icon-selected",t)}}}(jQuery),function(e){FLStyleSheet=function(t){"object"==typeof t&&e.extend(this,t),this._createSheet()},FLStyleSheet.prototype={id:null,_sheet:null,_sheetElement:null,updateRule:function(e,t,i){for(var l=this._sheet.cssRules?this._sheet.cssRules:this._sheet.rules,s=null,o=0;o<l.length;o++)l[o].selectorText.toLowerCase()==e.toLowerCase()&&(s=l[o]);if(s)if("object"==typeof t)for(o in t)s.style[this._toCamelCase(o)]=t[o];else s.style[this._toCamelCase(t)]=i;else this.addRule(e,t,i)},addRule:function(e,t,i){var l="",s="";if("object"==typeof t)for(s in t)l+=s+":"+t[s]+";";else l=t+":"+i+";";this._sheet.insertRule?this._sheet.insertRule(e+" { "+l+" }",this._sheet.cssRules.length):this._sheet.addRule(e,l)},destroy:function(){this._sheetElement&&(this._sheetElement.remove(),this._sheetElement=null),this._sheet&&(this._sheet=null)},disable:function(){this._sheet.disabled=!0},enable:function(){this._sheet.disabled=!1},_createSheet:function(){var t=this.id?' id="'+this.id+'"':"",i=this.className?' class="'+this.className+'"':"";this._sheet||(this._sheetElement=e('<style type="text/css"'+t+i+"></style>"),e("body").append(this._sheetElement),this._sheet=this._sheetElement[0].sheet)},_toCamelCase:function(e){return e.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}}(jQuery),function(e){FLBuilder={preview:null,_actionsLightbox:null,_addModuleAfterNodeRender:null,_colResizeData:null,_colResizing:!1,_contentClass:!1,_dragEnabled:!1,_dragging:!1,_dragInitialScrollTop:0,_exitUrl:null,_layout:null,_layoutSettingsCSSCache:null,_layoutSettingsCSSTimeout:null,_lightbox:null,_lightboxScrollbarTimeout:null,_loadedModuleAssets:[],_moduleHelpers:{},_multiplePhotoSelector:null,_newColParent:null,_newColPosition:0,_newColGroupParent:null,_newColGroupPosition:0,_newModuleParent:null,_newModulePosition:0,_newRowPosition:0,_selectedTemplateId:null,_selectedTemplateType:null,_singlePhotoSelector:null,_singleVideoSelector:null,_multipleAudiosSelector:null,_init:function(){FLBuilder._initJQueryReadyFix(),FLBuilder._initGlobalErrorHandling(),FLBuilder._initPostLock(),FLBuilder._initClassNames(),FLBuilder._initMediaUploader(),FLBuilder._initOverflowFix(),FLBuilder._initScrollbars(),FLBuilder._initLightboxes(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._initStrings(),FLBuilder._initTipTips(),FLBuilder._initTinyMCE(),FLBuilder._bindEvents(),FLBuilder._bindOverlayEvents(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder.addHook("didInitUI",FLBuilder._showTourOrTemplates.bind(FLBuilder)),FLBuilder.triggerHook("init")},_initJQueryReadyFix:function(){FLBuilderConfig.debug||(jQuery.fn.oldReady=jQuery.fn.ready,jQuery.fn.ready=function(t){return jQuery.fn.oldReady(function(){try{"function"==typeof t&&t(e)}catch(i){FLBuilder.logError(i)}})})},_initGlobalErrorHandling:function(){FLBuilderConfig.debug||(window.onerror=function(e,t,i,l,s){return FLBuilder.logGlobalError(e,t,i,l,s),!0})},_initPostLock:function(){"undefined"!=typeof wp.heartbeat&&(wp.heartbeat.interval(30),wp.heartbeat.enqueue("fl_builder_post_lock",{post_id:FLBuilderConfig.postId}))},_initClassNames:function(){e("html").addClass("fl-builder-edit"),e("body").addClass("fl-builder"),FLBuilderConfig.simpleUi&&e("body").addClass("fl-builder-simple"),FLBuilder._contentClass=".fl-builder-content-"+FLBuilderConfig.postId,e(FLBuilder._contentClass).addClass("fl-builder-content-editing")},_initMediaUploader:function(){wp.media.model.settings.post.id=FLBuilderConfig.postId},_initOverflowFix:function(){e(FLBuilder._contentClass).parents().css("overflow","visible")},_initScrollbars:function(){e(".fl-nanoscroller").nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},_initSortables:function(){var t={appendTo:"body",cursor:"move",cursorAt:{left:85,top:20},distance:1,helper:FLBuilder._blockDragHelper,start:FLBuilder._blockDragStart,sort:FLBuilder._blockDragSort,change:FLBuilder._blockDragChange,stop:FLBuilder._blockDragStop,placeholder:"fl-builder-drop-zone",tolerance:"intersect"},i="",l="";l="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-col-content":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-node-global) .fl-col-content",i=FLBuilderConfig.nestedColumns?l:"row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target",e(".fl-builder-rows").sortable(e.extend({},t,{connectWith:i,items:".fl-builder-block-row",stop:FLBuilder._rowDragStop})),e(".fl-builder-row-templates").sortable(e.extend({},t,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-row-template",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-saved-rows").sortable(e.extend({},t,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-saved-row",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-modules, .fl-builder-widgets").sortable(e.extend({},t,{connectWith:l,items:".fl-builder-block-module",stop:FLBuilder._moduleDragStop})),e(".fl-builder-module-templates").sortable(e.extend({},t,{connectWith:l,items:".fl-builder-block-module-template",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-saved-modules").sortable(e.extend({},t,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:l,items:".fl-builder-block-saved-module",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-row-sortable-proxy").sortable(e.extend({},t,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",helper:FLBuilder._rowDragHelper,start:FLBuilder._rowDragStart,stop:FLBuilder._rowDragStop})),e(".fl-col-sortable-proxy").sortable(e.extend({},t,{connectWith:l,helper:FLBuilder._colDragHelper,start:FLBuilder._colDragStart,stop:FLBuilder._colDragStop})),e(FLBuilder._contentClass+" .fl-col-content").sortable(e.extend({},t,{connectWith:l,handle:".fl-module-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._moduleDragHelper,items:".fl-module, .fl-col-group",start:FLBuilder._moduleDragStart,stop:FLBuilder._moduleDragStop})),e(FLBuilder._contentClass+" .fl-row-drop-target").sortable(t),e(FLBuilder._contentClass+" .fl-col-group-drop-target").sortable(t),e(FLBuilder._contentClass+" .fl-col-drop-target").sortable(t)},_initStrings:function(){e.validator.messages.required=FLBuilderStrings.validateRequiredMessage},_bindEvents:function(){$excludedLinks=e(".fl-builder-bar a, .fl-builder--content-library-panel a, .fl-page-nav .nav a"),e("a").not($excludedLinks).on("click",FLBuilder._preventDefault),e(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),e("body").delegate("button.fl-builder-button","mouseup",this._buttonMouseUp.bind(this)),e(document).on("heartbeat-tick",FLBuilder._initPostLock),e(window).on("beforeunload",FLBuilder._warnBeforeUnload),e("body").delegate(".fl-builder-has-submenu","click",FLBuilder._submenuParentClicked),e("body").delegate(".fl-builder-has-submenu a","click",FLBuilder._submenuChildClicked),e("body").delegate(".fl-builder-submenu","mouseenter",FLBuilder._submenuMouseenter),e("body").delegate(".fl-builder-submenu","mouseleave",FLBuilder._submenuMouseleave),e("body").delegate(".fl-builder-submenu .fl-builder-has-submenu","mouseenter",FLBuilder._submenuNestedParentMouseenter),e(".fl-builder-panel-actions .fl-builder-panel-close").on("click",FLBuilder._closePanel),e(".fl-builder-blocks-section-title").on("click",FLBuilder._blockSectionTitleClicked),e("body").delegate(".fl-builder-node-template-actions","mousedown",FLBuilder._stopPropagation),e("body").delegate(".fl-builder-node-template-edit","mousedown",FLBuilder._stopPropagation),e("body").delegate(".fl-builder-node-template-delete","mousedown",FLBuilder._stopPropagation),e("body").delegate(".fl-builder-node-template-edit","click",FLBuilder._editNodeTemplateClicked),e("body").delegate(".fl-builder-node-template-delete","click",FLBuilder._deleteNodeTemplateClicked),e("body").delegate(".fl-builder-block","mousedown",FLBuilder._blockDragInit),e("body").on("mouseup",FLBuilder._blockDragCancel),e("body").delegate(".fl-builder-actions .fl-builder-cancel-button","click",FLBuilder._cancelButtonClicked),e("body").delegate(".fl-builder-save-user-template-button","click",FLBuilder._saveUserTemplateClicked),e("body").delegate(".fl-builder-duplicate-layout-button","click",FLBuilder._duplicateLayoutClicked),e("body").delegate(".fl-builder-layout-settings-button","click",FLBuilder._layoutSettingsClicked),e("body").delegate(".fl-builder-layout-settings .fl-builder-settings-save","click",FLBuilder._saveLayoutSettingsClicked),e("body").delegate(".fl-builder-layout-settings .fl-builder-settings-cancel","click",FLBuilder._cancelLayoutSettingsClicked),e("body").delegate(".fl-builder-global-settings-button","click",FLBuilder._globalSettingsClicked),e("body").delegate(".fl-builder-global-settings .fl-builder-settings-save","click",FLBuilder._saveGlobalSettingsClicked),e("body").delegate(".fl-builder-global-settings .fl-builder-settings-cancel","click",FLBuilder._cancelLayoutSettingsClicked),e("body").delegate(".fl-user-template","click",FLBuilder._userTemplateClicked),e("body").delegate(".fl-user-template-edit","click",FLBuilder._editUserTemplateClicked),e("body").delegate(".fl-user-template-delete","click",FLBuilder._deleteUserTemplateClicked),e("body").delegate(".fl-builder-template-replace-button","click",FLBuilder._templateReplaceClicked),e("body").delegate(".fl-builder-template-append-button","click",FLBuilder._templateAppendClicked),e("body").delegate(".fl-builder-template-actions .fl-builder-cancel-button","click",FLBuilder._templateCancelClicked),e("body").delegate(".fl-builder-user-template-settings .fl-builder-settings-save","click",FLBuilder._saveUserTemplateSettings),e("body").delegate(".fl-builder-help-tour-button","click",FLBuilder._startHelpTour),e("body").delegate(".fl-builder-knowledge-base-button","click",FLBuilder._viewKnowledgeBaseClicked),e("body").delegate(".fl-builder-forums-button","click",FLBuilder._visitForumsClicked),e("body").delegate(".fl-builder-no-tour-button","click",FLBuilder._noTourButtonClicked),e("body").delegate(".fl-builder-yes-tour-button","click",FLBuilder._yesTourButtonClicked),e("body").delegate(".fl-builder-alert-close","click",FLBuilder._alertClose),e("body").delegate(".fl-block-overlay","contextmenu",FLBuilder._removeAllOverlays),e("body").delegate(".fl-row-overlay .fl-block-remove","click",FLBuilder._deleteRowClicked),e("body").delegate(".fl-row-overlay .fl-block-copy","click",FLBuilder._rowCopyClicked),e("body").delegate(".fl-row-overlay .fl-block-move","mousedown",FLBuilder._rowDragInit),e("body").delegate(".fl-row-overlay .fl-block-settings","click",FLBuilder._rowSettingsClicked),e("body").delegate(".fl-row-overlay","click",FLBuilder._rowSettingsClicked),e("body").delegate(".fl-builder-row-settings .fl-builder-settings-save","click",FLBuilder._saveSettings),e("body").delegate(".fl-block-col-submenu .fl-block-row-reset","click",FLBuilder._resetRowWidthClicked),e("body").delegate(".fl-col-overlay .fl-block-move","mousedown",FLBuilder._colDragInit),e("body").delegate(".fl-block-col-copy","click",FLBuilder._copyColClicked),e("body").delegate(".fl-col-overlay .fl-block-remove","click",FLBuilder._deleteColClicked),e("body").delegate(".fl-col-overlay","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-builder-col-settings .fl-builder-settings-save","click",FLBuilder._saveSettings),e("body").delegate(".fl-block-col-submenu .fl-block-col-move","mousedown",FLBuilder._colDragInit),e("body").delegate(".fl-block-col-submenu .fl-block-col-edit","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-delete","click",FLBuilder._deleteColClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-reset","click",FLBuilder._resetColumnWidthsClicked),e("body").delegate(".fl-block-col-submenu li","mouseenter",FLBuilder._showColHighlightGuide),e("body").delegate(".fl-block-col-submenu li","mouseleave",FLBuilder._removeColHighlightGuides),e("body").delegate(".fl-block-col-submenu .fl-block-col-move-parent","mousedown",FLBuilder._colDragInit),e("body").delegate(".fl-block-col-submenu .fl-block-col-edit-parent","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-module-overlay .fl-block-remove","click",FLBuilder._deleteModuleClicked),e("body").delegate(".fl-module-overlay .fl-block-copy","click",FLBuilder._moduleCopyClicked),e("body").delegate(".fl-module-overlay .fl-block-move","mousedown",FLBuilder._blockDragInit),e("body").delegate(".fl-module-overlay .fl-block-settings","click",FLBuilder._moduleSettingsClicked),e("body").delegate(".fl-module-overlay","click",FLBuilder._moduleSettingsClicked),e("body").delegate(".fl-builder-module-settings .fl-builder-settings-save","click",FLBuilder._saveModuleClicked),e("body").delegate(".fl-builder-settings-save-as","click",FLBuilder._showNodeTemplateSettings),e("body").delegate(".fl-builder-node-template-settings .fl-builder-settings-save","click",FLBuilder._saveNodeTemplate),e("body").delegate(".fl-builder-settings-tabs a","click",FLBuilder._settingsTabClicked),e("body").delegate(".fl-builder-settings-tabs a","show",FLBuilder._calculateSettingsTabsOverflow),e("body").delegate(".fl-builder-settings-tabs a","hide",FLBuilder._calculateSettingsTabsOverflow),e("body").delegate(".fl-builder-settings-cancel","click",FLBuilder._settingsCancelClicked),e("body").delegate(".fl-builder-settings-tabs-overflow-menu > a","click",FLBuilder._settingsTabsToOverflowMenuItemClicked.bind(this)),e("body").delegate(".fl-builder-settings-tabs-more","click",FLBuilder._toggleTabsOverflowMenu.bind(this)),e("body").delegate(".fl-builder-settings-tabs-overflow-click-mask","click",FLBuilder._hideTabsOverflowMenu.bind(this)),e("body").delegate(".fl-help-tooltip-icon","mouseover",FLBuilder._showHelpTooltip),e("body").delegate(".fl-help-tooltip-icon","mouseout",FLBuilder._hideHelpTooltip),e("body").delegate(".fl-builder-field-add","click",FLBuilder._addFieldClicked),e("body").delegate(".fl-builder-field-copy","click",FLBuilder._copyFieldClicked),e("body").delegate(".fl-builder-field-delete","click",FLBuilder._deleteFieldClicked),e("body").delegate(".fl-builder-settings-fields select","change",FLBuilder._settingsSelectChanged),e("body").delegate(".fl-photo-field .fl-photo-select","click",FLBuilder._selectSinglePhoto),e("body").delegate(".fl-photo-field .fl-photo-edit","click",FLBuilder._selectSinglePhoto),e("body").delegate(".fl-photo-field .fl-photo-replace","click",FLBuilder._selectSinglePhoto),e("body").delegate(".fl-photo-field .fl-photo-remove","click",FLBuilder._singlePhotoRemoved),e("body").delegate(".fl-multiple-photos-field .fl-multiple-photos-select","click",FLBuilder._selectMultiplePhotos),e("body").delegate(".fl-multiple-photos-field .fl-multiple-photos-edit","click",FLBuilder._selectMultiplePhotos),e("body").delegate(".fl-multiple-photos-field .fl-multiple-photos-add","click",FLBuilder._selectMultiplePhotos),e("body").delegate(".fl-video-field .fl-video-select","click",FLBuilder._selectSingleVideo),e("body").delegate(".fl-video-field .fl-video-replace","click",FLBuilder._selectSingleVideo),e("body").delegate(".fl-multiple-audios-field .fl-multiple-audios-select","click",FLBuilder._selectMultipleAudios),e("body").delegate(".fl-multiple-audios-field .fl-multiple-audios-edit","click",FLBuilder._selectMultipleAudios),e("body").delegate(".fl-multiple-audios-field .fl-multiple-audios-add","click",FLBuilder._selectMultipleAudios),e("body").delegate(".fl-icon-field .fl-icon-select","click",FLBuilder._selectIcon),e("body").delegate(".fl-icon-field .fl-icon-replace","click",FLBuilder._selectIcon),e("body").delegate(".fl-icon-field .fl-icon-remove","click",FLBuilder._removeIcon),e("body").delegate(".fl-form-field .fl-form-field-edit","click",FLBuilder._formFieldClicked),e("body").delegate(".fl-form-field-settings .fl-builder-settings-save","click",FLBuilder._saveFormFieldClicked),e("body").delegate(".fl-layout-field-option","click",FLBuilder._layoutFieldClicked),e("body").delegate(".fl-link-field-select","click",FLBuilder._linkFieldSelectClicked),e("body").delegate(".fl-link-field-search-cancel","click",FLBuilder._linkFieldSelectCancelClicked),e("body").delegate(".fl-loop-data-source-select select[name=data_source]","change",FLBuilder._loopDataSourceChange),e("body").delegate(".fl-custom-query select[name=post_type]","change",FLBuilder._customQueryPostTypeChange),e("body").delegate(".fl-field input[type=number]","focus",FLBuilder._onNumberFieldFocus),e("body").delegate(".fl-field input[type=number]","blur",FLBuilder._onNumberFieldBlur),FLBuilder.addHook("didCompleteAJAX",FLBuilder._refreshSettingsPreviewReference),FLBuilder.addHook("didRenderLayoutComplete",FLBuilder._refreshSettingsPreviewReference)},_unbindEvents:function(){e("a").off("click",FLBuilder._preventDefault),e(".fl-page-nav .nav a").off("click",FLBuilder._headerLinkClicked)},_bindOverlayEvents:function(){var t=e(FLBuilder._contentClass);t.delegate(".fl-row","mouseenter",FLBuilder._rowMouseenter),t.delegate(".fl-row","mouseleave",FLBuilder._rowMouseleave),t.delegate(".fl-row-overlay","mouseleave",FLBuilder._rowMouseleave),t.delegate(".fl-col","mouseenter",FLBuilder._colMouseenter),t.delegate(".fl-col","mouseleave",FLBuilder._colMouseleave),t.delegate(".fl-module","mouseenter",FLBuilder._moduleMouseenter),t.delegate(".fl-module","mouseleave",FLBuilder._moduleMouseleave)},_destroyOverlayEvents:function(){var t=e(FLBuilder._contentClass);t.undelegate(".fl-row","mouseenter",FLBuilder._rowMouseenter),t.undelegate(".fl-row","mouseleave",FLBuilder._rowMouseleave),t.undelegate(".fl-row-overlay","mouseleave",FLBuilder._rowMouseleave),t.undelegate(".fl-col","mouseenter",FLBuilder._colMouseenter),t.undelegate(".fl-col","mouseleave",FLBuilder._colMouseleave),t.undelegate(".fl-module","mouseenter",FLBuilder._moduleMouseenter),t.undelegate(".fl-module","mouseleave",FLBuilder._moduleMouseleave)},_preventDefault:function(e){e.preventDefault()},_stopPropagation:function(e){e.stopPropagation()},_headerLinkClicked:function(t){var i=e(this),l=i.attr("href");this.hash||(t.preventDefault(),FLBuilderConfig.isUserTemplate||(FLBuilder._exitUrl=l.indexOf("?")>-1?l:l+"?fl_builder",FLBuilder.triggerHook("triggerDone")))},_warnBeforeUnload:function(){var t=e(".fl-builder-row-settings").length>0,i=e(".fl-builder-col-settings").length>0,l=e(".fl-builder-module-settings").length>0;if(t||i||l)return FLBuilderStrings.unloadWarning},_initTipTips:function(){e(".fl-tip:not(.fl-has-tip)").each(function(){var t=e(this);t.addClass("fl-has-tip"),void 0==t.attr("data-title")&&t.attr("data-title",t.attr("title"))}).tipTip({defaultPosition:"top",delay:1e3})},_hideTipTips:function(){e("#tiptip_holder").stop().hide()},_submenuParentClicked:function(t){var i=e("body"),l=e(this),s=l.find(".fl-builder-submenu");l.hasClass("fl-builder-submenu-open")?(i.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-right")):(l.offset().left+s.width()>e(window).width()&&l.addClass("fl-builder-submenu-right"),i.addClass("fl-builder-submenu-open"),l.addClass("fl-builder-submenu-open")),s.closest(".fl-row-overlay").addClass("fl-row-menu-active"),FLBuilder._hideTipTips(),t.preventDefault(),t.stopPropagation()},_submenuChildClicked:function(t){var i=e("body"),l=e(this).parents(".fl-builder-has-submenu");l.parents(".fl-builder-has-submenu").length||(i.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-open"))},_submenuMouseenter:function(t){var i=e(this),l=i.data("timeout");"undefined"!=typeof l&&clearTimeout(l)},_submenuMouseleave:function(t){var i=e("body"),l=e(this),s=setTimeout(function(){i.removeClass("fl-builder-submenu-open"),l.closest(".fl-builder-has-submenu").removeClass("fl-builder-submenu-open")},500);l.closest(".fl-row-overlay").removeClass("fl-row-menu-active"),l.data("timeout",s)},_submenuNestedParentMouseenter:function(t){var i=e(this),l=i.find(".fl-builder-submenu");i.width()+i.offset().left+l.width()>e(window).width()&&i.addClass("fl-builder-submenu-right")},_closeAllSubmenus:function(){e(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},_upgradeClicked:function(){window.open(FLBuilderConfig.upgradeUrl)},_buttonMouseUp:function(t){e(t.currentTarget).blur()},_closePanel:function(){FLBuilder.triggerHook("hideContentPanel")},_showPanel:function(){FLBuilder.triggerHook("showContentPanel")},_togglePanel:function(){FLBuilder.triggerHook("toggleContentPanel")},_blockSectionTitleClicked:function(){var t=e(this),i=t.parent();i.hasClass("fl-active")?i.removeClass("fl-active"):(e(".fl-builder-blocks-section").removeClass("fl-active"),i.addClass("fl-active")),FLBuilder._initScrollbars()},_publishLayout:function(e){if(FLBuilder._triggerSettingsSave(!1,!0)){if(_.isUndefined(e))var e=!0;FLBuilder.ajax({action:"save_layout"},this._onPublishComplete.bind(this,e))}},_publishButtonClicked:function(e){FLBuilder._publishLayout(e)},_onPublishComplete:function(t){t&&(FLBuilderConfig.shouldRefreshOnPublish?FLBuilder._exit():FLBuilder._exitWithoutRefresh()),e("#wp-admin-bar-fl-builder-frontend-edit-link .fl-builder-admin-bar-status-dot").css("color","#6bc373"),FLBuilder.triggerHook("didPublishLayout")},_draftButtonClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_draft"},FLBuilder._exit)},_discardButtonClicked:function(){var e=confirm(FLBuilderStrings.discardMessage);e?(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"clear_draft_layout"},FLBuilder._exit)):FLBuilder.triggerHook("didCancelDiscard")},_cancelButtonClicked:function(){FLBuilder._exitUrl=null,FLBuilder._actionsLightbox.close()},_exit:function(){var e=window.location.href;FLBuilderConfig.isUserTemplate&&"undefined"!=typeof window.opener&&window.opener?("undefined"!=typeof window.opener.FLBuilder&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):(FLBuilder._exitUrl?e=FLBuilder._exitUrl:(e=e.replace("?fl_builder&","?"),e=e.replace("?fl_builder",""),e=e.replace("&fl_builder","")),window.location.href=e)},_exitWithoutRefresh:function(){window.location.href;FLBuilderConfig.isUserTemplate&&"undefined"!=typeof window.opener&&window.opener?("undefined"!=typeof window.opener.FLBuilder&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):FLBuilder.triggerHook("endEditingSession")},_duplicateLayoutClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"duplicate_post"},FLBuilder._duplicateLayoutComplete)},_duplicateLayoutComplete:function(e){var t=FLBuilderConfig.adminUrl;window.location.href=t+"post.php?post="+e+"&action=edit"},_layoutSettingsClicked:function(){FLBuilderSettingsForms.render({id:"layout",className:"fl-builder-layout-settings",settings:FLBuilderSettingsConfig.settings.layout},function(){FLBuilder._layoutSettingsInitCSS()})},_layoutSettingsInitCSS:function(){var t=e(".fl-builder-settings #fl-field-css textarea:not(.ace_text-input)");t.on("change",FLBuilder._layoutSettingsCSSChanged),FLBuilder._layoutSettingsCSSCache=t.val()},_layoutSettingsCSSChanged:function(){FLBuilder._layoutSettingsCSSTimeout&&clearTimeout(FLBuilder._layoutSettingsCSSTimeout),FLBuilder._layoutSettingsCSSTimeout=setTimeout(e.proxy(FLBuilder._layoutSettingsCSSDoChange,this),600)},_layoutSettingsCSSDoChange:function(){var t=e(".fl-builder-settings"),i=e(this),l=i.parents("#fl-field-css");l.find(".ace_error").length>0||(t.hasClass("fl-builder-layout-settings")?e("#fl-builder-layout-css").html(i.val()):e("#fl-builder-global-css").html(i.val()),FLBuilder._layoutSettingsCSSTimeout=null)},_saveLayoutSettingsClicked:function(){for(var t=e(this).closest(".fl-builder-settings"),i=t.serializeArray(),l={},s=0;s<i.length;s++)l[i[s].name]=i[s].value;FLBuilder.showAjaxLoader(),FLBuilder._lightbox.close(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_layout_settings",settings:l},function(){FLBuilder.triggerHook("didSaveLayoutSettingsComplete",l),FLBuilder._updateLayout()})},_cancelLayoutSettingsClicked:function(){var t=e(".fl-builder-settings");t.hasClass("fl-builder-layout-settings")?e("#fl-builder-layout-css").html(FLBuilder._layoutSettingsCSSCache):e("#fl-builder-global-css").html(FLBuilder._layoutSettingsCSSCache),FLBuilder._layoutSettingsCSSCache=null},_globalSettingsClicked:function(){FLBuilderSettingsForms.render({id:"global",className:"fl-builder-global-settings",settings:FLBuilderSettingsConfig.settings.global},function(){FLBuilder._layoutSettingsInitCSS()})},_saveGlobalSettingsClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=t.validate().form(),l=FLBuilder._getSettings(t);i&&(FLBuilder.showAjaxLoader(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_global_settings",settings:l},FLBuilder._saveGlobalSettingsComplete),FLBuilder._lightbox.close())},_saveGlobalSettingsComplete:function(e){FLBuilderConfig.global=JSON.parse(e),FLBuilder.triggerHook("didSaveGlobalSettingsComplete",FLBuilderConfig.global),FLBuilder._updateLayout()},_initTemplateSelector:function(){var t=e(FLBuilder._contentClass).find(".fl-row"),i=t.length>0;i||FLBuilder.ContentPanel.show("modules")},_requestTemplateInsert:function(e,t){FLBuilder.layoutHasContent()?0==e?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate(0,!1,t)):(FLBuilder._selectedTemplateId=e,FLBuilder._selectedTemplateType=t,FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(e,!1,t)},_showTemplateActions:function(){var e=[];e[10]={key:"template-replace",label:FLBuilderStrings.templateReplace},e[20]={key:"template-append",label:FLBuilderStrings.templateAppend},FLBuilder._showActionsLightbox({className:"fl-builder-template-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_templateReplaceClicked:function(){confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!1,FLBuilder._selectedTemplateType))},_templateAppendClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!0,FLBuilder._selectedTemplateType)},_templateCancelClicked:function(){FLBuilder.triggerHook("showContentPanel")},_applyTemplate:function(e,t,i){t="undefined"!=typeof t&&t?"1":"0",i="undefined"==typeof i?"core":i,FLBuilder._lightbox.close(),FLBuilder.showAjaxLoader(),"core"==i?FLBuilder.ajax({action:"apply_template",template_id:e,append:t},FLBuilder._applyTemplateComplete):FLBuilder.ajax({action:"apply_user_template",template_id:e,append:t},FLBuilder._applyUserTemplateComplete),FLBuilder.triggerHook("didApplyTemplate")},_applyTemplateComplete:function(e){var t=JSON.parse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didApplyTemplateComplete",t.config)},_applyUserTemplateComplete:function(t){var i=JSON.parse(t);null!==i.layout_css&&e("#fl-builder-layout-css").html(i.layout_css),FLBuilder._renderLayout(i.layout),FLBuilder.triggerHook("didApplyTemplateComplete",i.config)},_saveUserTemplateClicked:function(){FLBuilderSettingsForms.render({id:"user_template",className:"fl-builder-user-template-settings",rules:{name:{required:!0}}})},_saveUserTemplateSettings:function(){var t=e(this).closest(".fl-builder-settings"),i=t.validate().form(),l=FLBuilder._getSettings(t);i&&(FLBuilder.ajax({action:"save_user_template",settings:l},FLBuilder._saveUserTemplateSettingsComplete),FLBuilder._lightbox.close())},_saveUserTemplateSettingsComplete:function(e){if(e){var e=JSON.parse(e);FLBuilderConfig.contentItems.template.push(e),FLBuilder.triggerHook("contentItemsChanged")}},_userTemplateClicked:function(){var t=e(this).attr("data-id");e(FLBuilder._contentClass).children(".fl-row").length>0?"blank"==t?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate("blank",!1,"user")):(FLBuilder._selectedTemplateId=t,FLBuilder._selectedTemplateType="user",FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(t,!1,"user")},_editUserTemplateClicked:function(t){t.preventDefault(),t.stopPropagation(),window.open(e(this).attr("href"))},_deleteUserTemplateClicked:function(t){var i=e(this).closest(".fl-user-template"),l=i.attr("data-id"),s=(e(".fl-user-template[data-id="+l+"]"),null),o=null,n=null;if(confirm(FLBuilderStrings.deleteTemplate)){FLBuilder.ajax({action:"delete_user_template",template_id:l});for(o in FLBuilderConfig.contentItems.template)n=FLBuilderConfig.contentItems.template[o],n.postId==l&&(s=o);_.isNull(s)||(FLBuilderConfig.contentItems.template.splice(s,1),FLBuilder.triggerHook("contentItemsChanged"))}t.stopPropagation()},_viewKnowledgeBaseClicked:function(){window.open(FLBuilderConfig.help.knowledge_base_url)},_visitForumsClicked:function(){window.open(FLBuilderConfig.help.forums_url)},_showTourOrTemplates:function(){FLBuilderConfig.simpleUi||FLBuilderConfig.isUserTemplate||(FLBuilderConfig.help.tour&&FLBuilderConfig.newUser?FLBuilder._showTourLightbox():FLBuilder._initTemplateSelector())},_showTourLightbox:function(){var e=wp.template("fl-tour-lightbox");FLBuilder._actionsLightbox.open(e())},_noTourButtonClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._initTemplateSelector()},_yesTourButtonClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilderTour.start()},_startHelpTour:function(){FLBuilder._actionsLightbox.close(),FLBuilderTour.start()},_setupEmptyLayout:function(){var t=e(FLBuilder._contentClass);FLBuilderConfig.isUserTemplate&&"module"==FLBuilderConfig.userTemplateType||(t.removeClass("fl-builder-empty"),t.find(".fl-builder-empty-message").remove(),t.find(".fl-row, .fl-builder-block").length||(t.addClass("fl-builder-empty"),t.append('<span class="fl-builder-empty-message">'+FLBuilderStrings.emptyMessage+"</span>"),
3
+ FLBuilder._initSortables()))},_updateNode:function(t,i){e(".fl-node-"+t).length&&(FLBuilder._showNodeLoading(t),FLBuilder.ajax({action:"render_node",node_id:t},function(e){FLBuilder._renderLayout(JSON.parse(e),i)}.bind(this)))},_updateLayout:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_layout"},FLBuilder._renderLayout)},_renderLayout:function(e,t){FLBuilder._layout=new FLBuilderAJAXLayout(e,t)},_renderLayoutComplete:function(){FLBuilder._layout&&(FLBuilder._layout._complete(),FLBuilder._layout=null)},_resizeLayout:function(){e(window).trigger("resize"),"undefined"!=typeof YUI&&YUI().use("node-event-simulate",function(e){e.one(window).simulate("resize")})},layoutHasContent:function(){return e(FLBuilder._contentClass).children(".fl-row").length>0},_initMediaElements:function(){var t={};"undefined"!=typeof e.fn.mediaelementplayer&&("undefined"!=typeof _wpmejsSettings&&(t.pluginPath=_wpmejsSettings.pluginPath),e(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").mediaelementplayer(t))},_initDropTargets:function(){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",i=e(FLBuilder._contentClass+" .fl-row"),l=null,s=e(FLBuilder._contentClass+" .fl-row"+t).find(".fl-col-group"),o=null,n=null,r=0;for(e(".fl-col-drop-target").remove(),e(".fl-col-group-drop-target").remove(),e(".fl-row-drop-target").remove(),e(FLBuilder._contentClass).append('<div class="fl-drop-target fl-row-drop-target"></div>'),i.prepend('<div class="fl-drop-target fl-row-drop-target"></div>'),i.append('<div class="fl-drop-target fl-drop-target-last fl-row-drop-target fl-row-drop-target-last"></div>');r<i.length;r++)l=i.eq(r),0===l.find(".fl-col-group").length&&l.find(".fl-row-content").prepend('<div class="fl-drop-target fl-col-group-drop-target"></div>');for(r=0;r<s.length;r++)o=s.eq(r),n=o.find("> .fl-col"),o.hasClass("fl-col-group-nested")||(o.append('<div class="fl-drop-target fl-col-group-drop-target"></div>'),o.append('<div class="fl-drop-target fl-drop-target-last fl-col-group-drop-target fl-col-group-drop-target-last"></div>')),n.append('<div class="fl-drop-target fl-col-drop-target"></div>'),n.append('<div class="fl-drop-target fl-drop-target-last fl-col-drop-target fl-col-drop-target-last"></div>')},_blockDragHelper:function(e,t){var i=t.clone();return t.clone().insertAfter(t),i.addClass("fl-builder-block-drag-helper"),i},_blockDragInit:function(t){var i=e(t.currentTarget),l=null,s=e(window).scrollTop(),o=0;FLBuilder._dragEnabled=!0,FLBuilder._dragInitialScrollTop=s,i.closest("[data-node]").length>0?(l=i.closest("[data-node]"),l.addClass("fl-node-drag-init")):i.hasClass("fl-builder-block")&&e(".fl-row").each(function(){null===l&&e(this).offset().top-s>0&&(l=e(this))}),null!==l&&(o=l.offset().top-s),FLBuilder._highlightRowsAndColsForDrag(i),FLBuilder._adjustColHeightsForDrag(),FLBuilder._disableGlobalRows(),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays(),FLBuilder._initSortables(),e("body").addClass("fl-builder-dragging"),e(".fl-builder-empty-message").hide(),e(".fl-sortable-disabled").removeClass("fl-sortable-disabled"),o>0&&scrollTo(0,l.offset().top-o),FLBuilder.triggerHook("didInitDrag")},_blockDragStart:function(t,i){FLBuilder._dragging=!0,e(".fl-node-drag-init").removeClass("fl-node-drag-init"),FLBuilder.triggerHook("didStartDrag")},_blockDragSort:function(t,i){var l=i.placeholder.parent(),s=FLBuilderStrings.insert;FLBuilder._blockPreventSort(i.item,l)||(l.hasClass("fl-col-content")?s=i.item.hasClass("fl-builder-block-row")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-col-sortable-proxy-item")?FLBuilderStrings.column:i.item.hasClass("fl-builder-block-module")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-builder-block-saved-module")||i.item.hasClass("fl-builder-block-module-template")?i.item.find(".fl-builder-block-title").text():i.item.attr("data-name"):l.hasClass("fl-col-drop-target")?s="":l.hasClass("fl-col-group-drop-target")?s="":l.hasClass("fl-row-drop-target")&&(s=i.item.hasClass("fl-builder-block-row")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-builder-block-saved-row")?i.item.find(".fl-builder-block-title").text():i.item.hasClass("fl-row-sortable-proxy-item")?FLBuilderStrings.row:FLBuilderStrings.newRow),i.placeholder.html(s),i.item.hasClass("fl-node-global")||i.item.hasClass("fl-builder-block-global")||e(".fl-node-dragging").hasClass("fl-node-global")?i.placeholder.addClass("fl-builder-drop-zone-global"):i.placeholder.removeClass("fl-builder-drop-zone-global"))},_blockDragChange:function(e,t){t.placeholder.css("opacity","0"),t.placeholder.animate({opacity:"1"},100)},_blockPreventSort:function(t,i){var l=!1,s=t.hasClass("fl-builder-block-row"),o=t.hasClass("fl-col-sortable-proxy-item"),n=i.hasClass("fl-col-content"),r=i.hasClass("fl-col-drop-target"),a=i.parents(".fl-col-group:not(.fl-col-group-nested)"),d=i.parents(".fl-col-group-nested");return(s||o)&&n&&d.length>0&&(l=!0),n&&!i.find(".fl-module, .fl-col").length&&(s&&"1-col"==t.data("cols")?l=!0:o&&(l=!0)),s&&n&&e.inArray(t.data("cols"),["5-cols","6-cols"])>-1&&(l=!0),o&&e(".fl-node-dragging").find(".fl-col-group-nested").length>0&&(n||r&&d.length>0)&&(l=!0),r&&a.length>0&&0===d.length&&a.find("> .fl-col:visible").length>11&&(l=!0),r&&d.length>0&&d.find(".fl-col:visible").length>3&&(l=!0),l&&i.addClass("fl-sortable-disabled"),l},_blockDragStop:function(t,i){var l=e(window).scrollTop(),s=i.item.parent(),o=null;s.hasClass("fl-drop-target")&&s.closest("[data-node]").length?(s=s.closest("[data-node]"),o=s.offset().top-l):o=s.offset().top-l,s.hasClass("fl-builder-blocks-section-content")&&FLBuilder._showPanel(),FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._setupEmptyLayout(),e("body").removeClass("fl-builder-dragging"),scrollTo(0,s.offset().top-o),FLBuilder.triggerHook("didStopDrag")},_blockDragCancel:function(){FLBuilder._dragEnabled&&!FLBuilder._dragging&&(FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._setupEmptyLayout(),e("body").removeClass("fl-builder-dragging"),e(".fl-node-drag-init").removeClass("fl-node-drag-init"),e(".fl-node-dragging").removeClass("fl-node-dragging"),scrollTo(0,FLBuilder._dragInitialScrollTop))},_reorderNode:function(e,t){FLBuilder.ajax({action:"reorder_node",node_id:e,position:t})},_moveNode:function(e,t,i){FLBuilder.ajax({action:"move_node",new_parent:e,node_id:t,position:i})},_removeAllOverlays:function(){FLBuilder._removeRowOverlays(),FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._removeModuleOverlays(),FLBuilder._hideTipTips(),FLBuilder._closeAllSubmenus()},_appendOverlay:function(e,t){var i=0,l=null,s=e.hasClass("fl-row"),o=s?e.find("> .fl-row-content-wrap"):e.find("> .fl-node-content"),n={top:parseInt(o.css("margin-top"),10),bottom:parseInt(o.css("margin-bottom"),10)};return e.append(t),e.addClass("fl-block-overlay-active"),FLBuilder._initTipTips(),l=e.find("> .fl-block-overlay"),n.top<0&&(i=parseInt(l.css("top"),10),i=isNaN(i)?0:i,l.css("top",n.top+i+"px")),n.bottom<0&&(i=parseInt(l.css("bottom"),10),i=isNaN(i)?0:i,l.css("bottom",n.bottom+i+"px")),l},_buildOverlayOverflowMenu:function(e){var t=e.find(".fl-block-overlay-actions"),i=t.data("original"),l=0,s=null,o=0,n=null,r=0,a=[],d=[],u=[],c=wp.template("fl-overlay-overflow-menu");for(void 0!=i&&(t.after(i),t.remove(),t=i),t.data("original",t.clone()),l=Math.floor(t[0].getBoundingClientRect().width)-8,s=t.find(" > i, > span.fl-builder-has-submenu");r<s.length;r++)n=s.eq(r),o+=Math.floor(n[0].getBoundingClientRect().width),o>l?(d.push(n),n.remove()):a.push(n);if(d.length>0){for(d.unshift(a.pop().remove()),r=0;r<d.length;r++)d[r].is(".fl-builder-has-submenu")?u.push({type:"submenu",label:d[r].find(".fa").data("title"),submenu:d[r].find(".fl-builder-submenu")[0].outerHTML}):u.push({type:"action",label:d[r].data("title"),className:d[r].removeClass(function(e,t){return t.replace(/fl-block-([^\s]+)/,"")}).attr("class")});t.append(c(u)),FLBuilder._initTipTips()}},_removeRowOverlays:function(){e(".fl-row").removeClass("fl-block-overlay-active"),e(".fl-row-overlay").remove(),e(".fl-module").removeClass("fl-module-adjust-height"),e("body").removeClass("fl-builder-row-resizing"),FLBuilder._closeAllSubmenus()},_disableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&e(".fl-row.fl-node-global").addClass("fl-node-disabled")},_enableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&e(".fl-node-disabled").removeClass("fl-node-disabled")},_rowMouseenter:function(){var t=e(this),i=t.offset().top,l=null,s=null,o=wp.template("fl-row-overlay");t.closest(".fl-builder-node-loading").length||t.hasClass("fl-block-overlay-active")||(s=FLBuilder._appendOverlay(t,o({global:t.hasClass("fl-node-global"),node:t.attr("data-node")})),t.find(".fl-node-content:visible").each(function(){var t=e(this).offset().top;l=null===l||l>t?t:l}),null!==l&&l<i&&s.css("top",l-i-30+"px"),s.offset().top<43&&s.addClass("fl-row-overlay-header-bottom"),t.find(".fl-module").each(function(){var t=e(this);t.outerHeight(!0)<20&&t.addClass("fl-module-adjust-height")}),FLBuilder._buildOverlayOverflowMenu(s))},_rowMouseleave:function(t){var i=e(t.toElement)||e(t.relatedTarget),l=i.hasClass("fl-row-overlay"),s=i.closest(".fl-row-overlay").length>0,o=i.is("#tiptip_holder"),n=i.closest("#tiptip_holder").length>0;l||s||o||n||FLBuilder._removeRowOverlays()},_rowDragHelper:function(){return e('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.row+"</div>")},_rowDragInit:function(t){var i=e(t.target),l=e(".fl-row-sortable-proxy-item"),s=i.closest(".fl-row");s.addClass("fl-node-dragging"),FLBuilder._blockDragInit(t),t.target=l[0],l.trigger(t)},_rowDragStart:function(t,i){var l=e(FLBuilder._contentClass+" .fl-row"),s=e(".fl-node-dragging");1===l.length&&e(FLBuilder._contentClass).addClass("fl-builder-empty"),s.hide(),FLBuilder._blockDragStart(t,i)},_rowDragStop:function(t,i){var l=i.item,s=l.parent(),o=null,n=null,r=0;if(FLBuilder._blockDragStop(t,i),s.hasClass("fl-builder-rows"))return void l.remove();if(s.hasClass("fl-row-sortable-proxy"))return void e(".fl-node-dragging").removeClass("fl-node-dragging").show();if(l.hasClass("fl-builder-block")){if(s.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();s.hasClass("fl-col-content")?FLBuilder._addColGroup(l.closest(".fl-col").attr("data-node"),l.attr("data-cols"),s.find("> .fl-module, .fl-col-group, .fl-builder-block").index(l)):s.hasClass("fl-col-drop-target")?FLBuilder._addCols(s.closest(".fl-col"),s.hasClass("fl-col-drop-target-last")?"after":"before",l.attr("data-cols"),s.closest(".fl-col-group-nested").length>0):s.hasClass("fl-col-group-drop-target")?(n=l.closest(".fl-col-group"),r=l.closest(".fl-row").find(".fl-row-content > .fl-col-group").index(n),FLBuilder._addColGroup(l.closest(".fl-row").attr("data-node"),l.attr("data-cols"),s.hasClass("fl-drop-target-last")?r+1:r)):(o=l.closest(".fl-row"),r=o.length?e(FLBuilder._contentClass+" .fl-row").index(o):0,FLBuilder._addRow(l.attr("data-cols"),s.hasClass("fl-drop-target-last")?r+1:r)),l.remove(),FLBuilder._showPanel(),e(".fl-builder-modules").siblings(".fl-builder-blocks-section-title").eq(0).trigger("click")}else o=e(".fl-node-dragging").removeClass("fl-node-dragging").show(),s.parent().hasClass("fl-builder-content")||(s.hasClass("fl-drop-target-last")?s.parent().after(o):s.parent().before(o),FLBuilder._reorderNode(o.attr("data-node"),o.index())),e(".fl-row-sortable-proxy").append(i.item)},_addRow:function(t,i){FLBuilder._showNodeLoadingPlaceholder(e(FLBuilder._contentClass),i),FLBuilder._newRowPosition=i,FLBuilder.ajax({action:"render_new_row",cols:t,position:i},FLBuilder._addRowComplete)},_addRowComplete:function(t){var i="object"==typeof t?t:JSON.parse(t),l=e(FLBuilder._contentClass),s=e(i.html).data("node"),o=FLBuilder._addModuleAfterNodeRender;i.nodeParent=l,i.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(i,function(){null!==o&&(e(".fl-node-"+s+" .fl-col-content").append(o),FLBuilder._reorderModule(o),FLBuilder._addModuleAfterNodeRender=null),FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+s)),FLBuilder.triggerHook("didAddRow",s)})},_deleteRowClicked:function(t){var i=e(this).closest(".fl-row"),l=null;i.find(".fl-module").length?(l=confirm(FLBuilderStrings.deleteRowMessage),l&&FLBuilder._deleteRow(i)):FLBuilder._deleteRow(i),FLBuilder._removeAllOverlays(),t.stopPropagation()},_deleteRow:function(e){var t=e.attr("data-node");FLBuilder.ajax({action:"delete_node",node_id:t}),e.empty(),e.remove(),FLBuilder._setupEmptyLayout(),FLBuilder._removeRowOverlays(),FLBuilder.triggerHook("didDeleteRow",t)},_rowCopyClicked:function(t){var i=e(this).closest(".fl-row"),l=i.attr("data-node"),s=e(FLBuilder._contentClass+" .fl-row").index(i)+1,o=i.clone(),n=e(".fl-builder-settings[data-node]"),r=n.attr("data-node"),a=r===l?i:i.find('[data-node="'+r+'"]'),d=null;n.length&&a.length&&(d=FLBuilder._getSettings(n),FLBuilderSettingsConfig.nodes[r]=d),o.addClass("fl-node-"+l+"-clone fl-builder-node-clone"),o.find(".fl-block-overlay").remove(),i.after(o),e("html, body").animate({scrollTop:o.offset().top-75},500),FLBuilder._showNodeLoading(l+"-clone"),FLBuilder._newRowPosition=s,FLBuilder.ajax({action:"copy_row",node_id:l,settings:d,settings_id:r},function(e){var t=JSON.parse(e);t.duplicatedRow=l,FLBuilder._rowCopyComplete(t)}),t.stopPropagation()},_rowCopyComplete:function(t){t.nodeParent=e(FLBuilder._contentClass),t.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(t,function(){FLBuilder.triggerHook("didDuplicateRow",{newNodeId:t.nodeId,oldNodeId:t.duplicatedRow}),t.nodeParent.find(".fl-builder-node-loading").eq(0).remove()})},_rowSettingsClicked:function(t){var i=e(this),l=i.closest(".fl-row").attr("data-node"),s=i.closest(".fl-block-overlay-global").length>0,o=null;s&&"row"!=FLBuilderConfig.userTemplateType?FLBuilderConfig.userCanEditGlobalTemplates&&(o=window.open(e('.fl-row[data-node="'+l+'"]').attr("data-template-url")),o.FLBuilderGlobalNodeId=l):i.hasClass("fl-block-settings")&&FLBuilderSettingsForms.render({id:"row",nodeId:l,className:"fl-builder-row-settings",attrs:'data-node="'+l+'"',buttons:s||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:s?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[l],preview:{type:"row"}},function(){e("#fl-field-width select").on("change",FLBuilder._rowWidthChanged),e("#fl-field-content_width select").on("change",FLBuilder._rowWidthChanged)}),t.stopPropagation()},_rowWidthChanged:function(){var t=e("#fl-field-width select").val(),i=e("#fl-field-content_width select").val(),l=e("#fl-field-max_content_width");"fixed"==t||"full"==t&&"fixed"==i?l.show():l.hide()},_resetRowWidthClicked:function(t){var i=e(this),l=i.closest(".fl-row"),s=l.attr("data-node"),o=l.find(".fl-row-content"),n=FLBuilderConfig.global.row_width+"px",r=e(".fl-builder-row-settings");l.hasClass("fl-row-fixed-width")&&l.css("max-width",n),o.css("max-width",n),r.length&&r.find("[name=max_content_width]").val(""),FLBuilder.ajax({action:"resize_row_content",node:s,width:""}),FLBuilder._closeAllSubmenus(),FLBuilder.triggerHook("didResetRowWidth",s),t.stopPropagation()},_highlightEmptyCols:function(){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",i=(e(FLBuilder._contentClass+" .fl-row"+t),e(FLBuilder._contentClass+" .fl-col"+t));e(".fl-row-highlight").removeClass("fl-row-highlight"),i.removeClass("fl-col-highlight").find(".fl-col-content").css("height",""),i.each(function(){var t=e(this);0===t.find(".fl-module, .fl-col").length&&t.addClass("fl-col-highlight")})},_removeEmptyColHighlights:function(){e(".fl-row-highlight").removeClass("fl-row-highlight"),e(".fl-col-highlight").removeClass("fl-col-highlight")},_highlightRowsAndColsForDrag:function(t){var i="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)";e(FLBuilder._contentClass+" .fl-row").addClass("fl-row-highlight"),t.closest(".fl-row-overlay").length||e(FLBuilder._contentClass+" .fl-col"+i).addClass("fl-col-highlight")},_adjustColHeightsForDrag:function(){var t="row"==FLBuilderConfig.userTemplateType?"":".fl-row:not(.fl-node-global) ",i=e(FLBuilder._contentClass),l=i.find(t+".fl-col-group:not(.fl-col-group-nested) > .fl-col > .fl-col-content"),s=i.find(t+".fl-col-group-nested .fl-col-content"),o=0;for(e(".fl-node-drag-init").hide();o<s.length;o++)FLBuilder._adjustColHeightForDrag(s.eq(o));for(o=0;o<l.length;o++)FLBuilder._adjustColHeightForDrag(l.eq(o));e(".fl-node-drag-init").show()},_adjustColHeightForDrag:function(e){e.find(".fl-module:visible, .fl-col:visible").length&&e.height(e.height()+45)},_showColHighlightGuide:function(){var t=e(this),i=t.find("a"),l=t.closest(".fl-col"),s=l.parents(".fl-col"),o=e('<div class="fl-col-highlight-guide"></div>'),n=null,r=t.closest(".fl-block-overlay").offset().top;(i.hasClass("fl-block-col-move-parent")||i.hasClass("fl-block-col-edit-parent"))&&(l=s),l.hasClass("fl-col-highlight")||(l.find("> .fl-col-content").append(o),l.addClass("fl-col-has-highlight-guide"),n=o.offset().top,n>r&&o.css("top",r-n+4+"px"))},_removeColHighlightGuides:function(){e(".fl-col-has-highlight-guide").removeClass("fl-col-has-highlight-guide"),e(".fl-col-highlight-guide").remove()},_colMouseenter:function(){var t=e(this),i=t.closest(".fl-col-group"),l=i.hasClass("fl-col-group-has-child-loading"),s=t.hasClass("fl-node-global"),o=t.parents(".fl-node-global").length>0,n=t.closest(".fl-col-group").find("> .fl-col").length,r=i.find("> .fl-col").index(t),a=0===r,d=n===r+1,u=t.find(".fl-col").length>0,c=t.parents(".fl-col"),h=c.closest(".fl-col-group"),f=c.length>0,g=f?h.find("> .fl-col").length:0,p=h.find("> .fl-col").index(c),b=!!f&&0===p,m=!!f&&g===p+1,v=t.find("> .fl-col-content").width(),_=t.closest(".fl-row"),L=!!_.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,w=FLBuilderConfig.rowResize.userCanResizeRows,C=wp.template("fl-col-overlay"),F=null;FLBuilderConfig.simpleUi||s&&o&&"row"!=FLBuilderConfig.userTemplateType||t.find(".fl-module, .fl-builder-node-loading-placeholder").length>0||t.find(".fl-col").length>0||t.closest(".fl-builder-node-loading").length||(t.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),F=FLBuilder._appendOverlay(t,C({global:s,groupLoading:l,numCols:n,first:a,last:d,hasChildCols:u,hasParentCol:f,parentFirst:b,parentLast:m,numParentCols:g,contentWidth:v,rowIsFixedWidth:L,userCanResizeRows:w})),FLBuilder._buildOverlayOverflowMenu(F),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_colMouseleave:function(t){var i=e(this),l=e(t.toElement)||e(t.relatedTarget),s=i.find(".fl-module").length>0,o=l.is("#tiptip_holder"),n=l.closest("#tiptip_holder").length>0;o||n||s||(FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._closeAllSubmenus())},_removeColOverlays:function(){var t=e(".fl-col");t.removeClass("fl-block-overlay-active"),t.find(".fl-col-overlay").remove(),e("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_colDragHelper:function(){return e('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.column+"</div>")},_colDragInit:function(t){var i=e(t.target),l=e(".fl-col-sortable-proxy-item"),s=i.closest(".fl-col");i.hasClass("fl-block-col-move-parent")&&(s=s.parents(".fl-col")),s.addClass("fl-node-dragging"),FLBuilder._blockDragInit(t),FLBuilder._removeColHighlightGuides(),t.target=l[0],l.trigger(t)},_colDragStart:function(t,i){var l=e(".fl-node-dragging");l.hide(),FLBuilder._resetColumnWidths(l.parent()),FLBuilder._blockDragStart(t,i)},_colDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var l=e(".fl-node-dragging").removeClass("fl-node-dragging").show(),s=l.attr("data-node"),o=i.item.parent(),n=l.parent(),r=n.attr("data-node");newGroup=o.closest(".fl-col-group"),newGroupId=newGroup.attr("data-node"),newRow=o.closest(".fl-row"),position=0,o.hasClass("fl-sortable-disabled")?FLBuilder._resetColumnWidths(n):o.hasClass("fl-col-sortable-proxy")?FLBuilder._resetColumnWidths(n):o.hasClass("fl-col-content")?(l.remove(),0===n.find(".fl-col").length&&n.remove(),position=o.find("> .fl-module, .fl-col-group, .fl-col-sortable-proxy-item").index(i.item),FLBuilder._addColGroup(o.closest(".fl-col").attr("data-node"),s,position)):o.hasClass("fl-col-drop-target")?(o.hasClass("fl-col-drop-target-last")?o.parent().after(l):o.parent().before(l),FLBuilder._resetColumnWidths(newGroup),r==newGroupId?FLBuilder.ajax({action:"reorder_col",node_id:s,position:l.index()}):FLBuilder.ajax({action:"move_col",node_id:s,new_parent:newGroupId,position:l.index(),resize:[r,newGroupId]}),FLBuilder._resizeLayout()):o.hasClass("fl-col-group-drop-target")?(l.remove(),0===n.find(".fl-col").length&&n.remove(),position=newRow.find(".fl-row-content > .fl-col-group").index(newGroup),position=o.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addColGroup(newRow.attr("data-node"),s,position)):o.hasClass("fl-row-drop-target")&&(l.remove(),position=o.closest(".fl-builder-content").find(".fl-row").index(newRow),position=o.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addRow(s,position)),0===n.find(".fl-col").length&&n.remove(),e(".fl-col-sortable-proxy").append(i.item),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._closeAllSubmenus()},_colSettingsClicked:function(t){var i=e(this),l=i.closest(".fl-col"),s=l.find("> .fl-col-content"),o=i.closest(".fl-block-overlay-global").length>0,n=null;FLBuilder._colResizing||(i.hasClass("fl-block-col-edit-parent")&&(l=l.parents(".fl-col")),n=l.attr("data-node"),FLBuilderSettingsForms.render({id:"col",nodeId:n,className:"fl-builder-col-settings",attrs:'data-node="'+n+'"',badges:o?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[n],preview:{type:"col"}},function(){0===l.siblings(".fl-col").length?e("#fl-builder-settings-section-general").hide():s.width()<=40&&e("#fl-field-size").hide()}),t.stopPropagation())},_copyColClicked:function(t){var i=e(this).closest(".fl-col"),l=i.attr("data-node"),s=i.clone(),o=i.parent(),n=e(".fl-builder-settings[data-node]"),r=n.attr("data-node"),a=r===l?i:i.find('[data-node="'+r+'"]'),d=null;n.length&&a.length&&(d=FLBuilder._getSettings(n),FLBuilderSettingsConfig.nodes[r]=d),s.addClass("fl-node-"+l+"-clone fl-builder-node-clone"),s.find(".fl-block-overlay").remove(),i.after(s),FLBuilder._showNodeLoading(l+"-clone"),FLBuilder._newColParent=o,FLBuilder._newColPosition=i.index()+1,FLBuilder._resetColumnWidths(o),FLBuilder.ajax({action:"copy_col",node_id:l,settings:d,settings_id:r},function(e){var t=JSON.parse(e);t.duplicatedColumn=l,FLBuilder._copyColComplete(t)}),t.stopPropagation()},_copyColComplete:function(e){e.nodeParent=FLBuilder._newColParent,e.nodePosition=FLBuilder._newColPosition,FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateColumn",{newNodeId:e.nodeId,oldNodeId:e.duplicatedColumn}),e.nodeParent.find(".fl-builder-node-loading").eq(0).remove()})},_deleteColClicked:function(t){var i=e(this),l=i.closest(".fl-col"),s=l.closest(".fl-col-group"),o=l.parents(".fl-col"),n=o.length>0,r=o.find("> .fl-col-content > .fl-module, > .fl-col-content > .fl-col-group"),a=l.siblings(".fl-col"),d=!0;l.find(".fl-module").length>0&&(d=confirm(FLBuilderStrings.deleteColumnMessage)),n&&1===r.length&&(0===a.length?l=o:1!==a.length||a.find(".fl-module").length||(l=s)),d&&(FLBuilder._deleteCol(l),FLBuilder._removeAllOverlays(),FLBuilder._highlightEmptyCols()),t.stopPropagation()},_deleteCol:function(e){var t=e.attr("data-node"),i=e.closest(".fl-row"),l=e.closest(".fl-col-group"),s=0;e.remove(),rowCols=i.find(".fl-row-content > .fl-col-group > .fl-col"),groupCols=l.find(" > .fl-col"),0===rowCols.length&&"row"!=FLBuilderConfig.userTemplateType?FLBuilder._deleteRow(i):(0===groupCols.length?l.remove():(s=6===groupCols.length?16.65:7===groupCols.length?14.28:Math.round(100/groupCols.length*100)/100,groupCols.css("width",s+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:groupCols})),FLBuilder.ajax({action:"delete_col",node_id:t,new_width:s}),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder.triggerHook("didDeleteColumn",t))},_addCols:function(e,t,i,l){var s=e.closest(".fl-col-group"),o=s.find(".fl-col").index(e);i="undefined"==typeof i?"1-col":i,l="undefined"!=typeof l&&l,"after"==t&&o++,FLBuilder._showNodeLoadingPlaceholder(s,o),FLBuilder._removeAllOverlays(),FLBuilder.ajax({action:"render_new_columns",node_id:e.attr("data-node"),insert:t,type:i,nested:l?1:0},FLBuilder._addColsComplete)},_addColsComplete:function(t){var i=JSON.parse(t),l=null,s=FLBuilder._addModuleAfterNodeRender;FLBuilder._renderLayout(i,function(){null!==s&&(e('.fl-module[data-node="'+s.module.data("node")+'"]').remove(),l=e('.fl-col[data-node="'+s.colId+'"]'),"after"==s.position?l.next().find(".fl-col-content").append(s.module):l.prev().find(".fl-col-content").append(s.module),FLBuilder._reorderModule(s.module),FLBuilder._addModuleAfterNodeRender=null),FLBuilder.triggerHook("didAddColumn",i.nodeId),FLBuilder.triggerHook("didResetColumnWidths",{cols:e(".fl-node-"+i.nodeId).find("> .fl-col")})})},_addColGroup:function(t,i,l){var s=e(".fl-node-"+t);FLBuilder._newColGroupPosition=l,s.hasClass("fl-col")?FLBuilder._newColGroupParent=s.find(" > .fl-col-content"):FLBuilder._newColGroupParent=s.find(".fl-row-content"),FLBuilder._showNodeLoadingPlaceholder(FLBuilder._newColGroupParent,l),FLBuilder.ajax({action:"render_new_column_group",cols:i,node_id:t,position:l},FLBuilder._addColGroupComplete)},_addColGroupComplete:function(t){var i=JSON.parse(t),l=e(i.html),s=l.data("node"),o=l.find(".fl-col").data("node"),n=FLBuilder._addModuleAfterNodeRender;i.nodeParent=FLBuilder._newColGroupParent,i.nodePosition=FLBuilder._newColGroupPosition,FLBuilder._renderLayout(i,function(){i.nodeParent.hasClass("fl-col-content")&&i.nodeParent.parents(".fl-col").addClass("fl-col-has-cols"),null!==n&&(e(".fl-node-"+o+" .fl-col-content").append(n),FLBuilder._reorderModule(n),FLBuilder._addModuleAfterNodeRender=null),FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+s)),FLBuilder.triggerHook("didAddColumnGroup",s)})},_initColDragResizing:function(){e(".fl-block-col-resize").not(".fl-block-row-resize").draggable({axis:"x",start:FLBuilder._colDragResizeStart,drag:FLBuilder._colDragResize,stop:FLBuilder._colDragResizeStop})},_colDragResizeStart:function(t,i){var l=e(i.helper),s="",o=l.hasClass("fl-block-col-resize-parent"),n=o?l.closest(".fl-col").parents(".fl-col"):null,r=o?n.parents(".fl-col-group"):l.closest(".fl-col-group"),a=r.find("> .fl-col"),d=o?n:l.closest(".fl-col"),u=d.attr("data-node"),c=e("[data-node="+u+"] #fl-field-size input"),h=null,f=null,g=null,p=100,b=0,m=null,v=null;for(l.hasClass("fl-block-col-resize-e")?(s="e",h=d.nextAll(".fl-col").first()):(s="w",h=d.prevAll(".fl-col").first()),f=h.attr("data-node"),g=e("[data-node="+f+"] #fl-field-size input");b<a.length;b++)a.eq(b).data("node")!=d.data("node")&&a.eq(b).data("node")!=h.data("node")&&(p-=parseFloat(a.eq(b)[0].style.width));c.length?(m=c,v="col"):g.length&&(m=g,v="sibling"),FLBuilder._colResizeData={handle:l,feedbackLeft:l.find(".fl-block-col-resize-feedback-left"),feedbackRight:l.find(".fl-block-col-resize-feedback-right"),direction:s,groupWidth:r.outerWidth(),col:d,colWidth:parseFloat(d[0].style.width)/100,sibling:h,offset:i.position.left,availWidth:p,setting:m,settingType:v},FLBuilder._colResizing=!0,e("body").addClass("fl-builder-col-resizing"),FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents(),FLBuilder.triggerHook("col-resize-start")},_colDragResize:function(e,t){var i=FLBuilder._colResizeData,l=FLBuilderConfig.isRtl?"w":"e",s=i.handle.closest(".fl-block-overlay"),o=(i.offset-t.position.left)/i.groupWidth,n=l==i.direction?100*(i.colWidth-o):100*(i.colWidth+o),r=Math.round(100*n)/100,a=i.availWidth-n,d=Math.round(100*a)/100,u=8,c=Math.round(100*(i.availWidth-u))/100;r<u?(r=u,d=c):d<u&&(r=c,d=u),l==i.direction?(i.feedbackLeft.html(r.toFixed(1)+"%").show(),i.feedbackRight.html(d.toFixed(1)+"%").show()):(i.feedbackLeft.html(d.toFixed(1)+"%").show(),i.feedbackRight.html(r.toFixed(1)+"%").show()),i.col.css("width",r+"%"),i.sibling.css("width",d+"%"),i.setting&&("col"===i.settingType?i.setting.val(parseFloat(i.col[0].style.width)):"sibling"===i.settingType&&i.setting.val(parseFloat(i.sibling[0].style.width))),FLBuilder._buildOverlayOverflowMenu(s),FLBuilder.triggerHook("col-resize-drag")},_colDragResizeStop:function(t,i){var l=FLBuilder._colResizeData,s=FLBuilder._colResizeData.handle.closest(".fl-block-overlay"),o=l.col.data("node"),n=parseFloat(l.col[0].style.width),r=l.sibling.data("node"),a=parseFloat(l.sibling[0].style.width);FLBuilder._colResizeData.feedbackLeft.hide(),FLBuilder._colResizeData.feedbackRight.hide(),FLBuilder.ajax({action:"resize_cols",col_id:o,col_width:n,sibling_id:r,sibling_width:a}),FLBuilder._buildOverlayOverflowMenu(s),FLBuilder._colResizeData=null,e("body").removeClass("fl-builder-col-resizing"),FLBuilder._bindOverlayEvents(),setTimeout(function(){FLBuilder._colResizing=!1},50),FLBuilder.triggerHook("col-resize-stop"),FLBuilder.triggerHook("didResizeColumn",{colId:o,colWidth:n,siblingId:r,siblingWidth:a})},_resetColumnWidthsClicked:function(t){var i=e(this),l=!!i.closest(".fl-row-overlay").length,s=null,o=null,n=[],r=null,a=0,d=e(".fl-builder-col-settings"),u=null;o=l?i.closest(".fl-row").find(".fl-row-content > .fl-col-group"):i.parents(".fl-col-group").last(),o.each(function(){for(s=e(this),r=s.find(".fl-col-group"),n.push(s.data("node")),FLBuilder._resetColumnWidths(s),a=0;a<r.length;a++)FLBuilder._resetColumnWidths(r.eq(a)),n.push(r.eq(a).data("node"))}),d.length&&(u=e(".fl-node-"+d.attr("data-node")),d.find("#fl-field-size input").val(parseFloat(u[0].style.width))),FLBuilder.ajax({action:"reset_col_widths",group_id:n}),FLBuilder.triggerHook("col-reset-widths"),FLBuilder._closeAllSubmenus(),t.stopPropagation()},_resetColumnWidths:function(e){var t=e.find(" > .fl-col:visible"),i=0;i=6===t.length?16.65:7===t.length?14.28:Math.round(100/t.length*100)/100,t.css("width",i+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:t})},_moduleMouseenter:function(){var t=e(this),i=t.attr("data-name"),l=t.hasClass("fl-node-global"),s=t.parents(".fl-node-global").length>0,o=t.parents(".fl-col-group").last(),n=o.hasClass("fl-col-group-has-child-loading"),r=t.closest(".fl-col-group").find("> .fl-col").length,a=t.closest(".fl-col"),d=0===a.index(),u=r===a.index()+1,c=a.parents(".fl-col"),h=c.length>0,f=h?c.closest(".fl-col-group").find("> .fl-col").length:0,g=!!h&&0===c.index(),p=!!h&&f===c.index()+1,b=a.find("> .fl-col-content").width(),m=t.closest(".fl-row"),v=!!m.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,_=FLBuilderConfig.rowResize.userCanResizeRows,L=wp.template("fl-module-overlay"),w=null;FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),l&&s&&"row"!=FLBuilderConfig.userTemplateType||t.closest(".fl-builder-node-loading").length||(t.hasClass("fl-block-overlay-active")||(w=FLBuilder._appendOverlay(t,L({global:l,moduleName:i,groupLoading:n,numCols:r,colFirst:d,colLast:u,hasParentCol:h,numParentCols:f,parentFirst:g,parentLast:p,contentWidth:b,rowIsFixedWidth:v,userCanResizeRows:_})),FLBuilder._buildOverlayOverflowMenu(w),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_moduleMouseleave:function(t){var i=(e(this),e(t.toElement)||e(t.relatedTarget)),l=i.is("#tiptip_holder"),s=i.closest("#tiptip_holder").length>0;l||s||(FLBuilder._removeModuleOverlays(),FLBuilder._removeColHighlightGuides())},_removeModuleOverlays:function(){var t=e(".fl-module");t.removeClass("fl-block-overlay-active"),t.find(".fl-module-overlay").remove(),
4
  e("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_moduleDragHelper:function(t,i){return e('<div class="fl-builder-block-drag-helper">'+i.attr("data-name")+"</div>")},_moduleDragStart:function(t,i){e(i.item).data("original-position",i.item.index()),FLBuilder._blockDragStart(t,i)},_moduleDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var l=i.item,s=l.parent(),o=null,n=0,r=0;if(s.hasClass("fl-builder-modules")||s.hasClass("fl-builder-widgets"))return void l.remove();if(l.hasClass("fl-builder-block")){if(s.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();s.hasClass("fl-row-drop-target")?(s=l.closest(".fl-builder-content"),r=0,o=l.closest(".fl-row"),n=s.find(".fl-row").index(o)):s.hasClass("fl-col-group-drop-target")?(s=l.closest(".fl-row-content"),r=s.closest(".fl-row").attr("data-node"),o=l.closest(".fl-col-group"),n=s.find(" > .fl-col-group").index(o)):s.hasClass("fl-col-drop-target")?(s=l.closest(".fl-col-group"),r=s.attr("data-node"),o=l.closest(".fl-col"),n=s.find(" > .fl-col").index(o)):(n=s.find("> .fl-module, .fl-col-group, .fl-builder-block").index(l),r=l.closest(".fl-col").attr("data-node")),l.closest(".fl-drop-target-last").length&&(n+=1),FLBuilder._addModule(s,r,l.attr("data-type"),n,l.attr("data-widget"),l.attr("data-alias")),l.remove()}else{if(s.hasClass("fl-sortable-disabled"))return e(t.target).append(i.item),e(t.target).children().eq(i.item.data("original-position")).before(i.item),void FLBuilder._highlightEmptyCols();s.hasClass("fl-row-drop-target")?(o=l.closest(".fl-row"),n=l.closest(".fl-builder-content").children(".fl-row").index(o),n=l.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addModuleAfterNodeRender=l,FLBuilder._addRow("1-col",n),l.remove()):s.hasClass("fl-col-group-drop-target")?(o=l.closest(".fl-col-group"),n=l.closest(".fl-row-content ").find(" > .fl-col-group").index(o),n=l.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addModuleAfterNodeRender=l,FLBuilder._addColGroup(l.closest(".fl-row").attr("data-node"),"1-col",n),l.remove()):s.hasClass("fl-col-drop-target")?(o=l.closest(".fl-col"),n=l.closest(".fl-col-drop-target-last").length?"after":"before",FLBuilder._addModuleAfterNodeRender={module:l,colId:o.data("node"),position:n},FLBuilder._addCols(o,n,"1-col",l.closest(".fl-col-group-nested").length>0),l.remove()):FLBuilder._reorderModule(l)}FLBuilder._resizeLayout()},_reorderModule:function(e){var t=e.closest(".fl-col").attr("data-node"),i=e.attr("data-parent"),l=e.attr("data-node"),s=e.index();t==i?FLBuilder._reorderNode(l,s):(e.attr("data-parent",t),FLBuilder._moveNode(t,l,s))},_deleteModuleClicked:function(t){var i=e(this).closest(".fl-module"),l=confirm(FLBuilderStrings.deleteModuleMessage);l&&(FLBuilder._deleteModule(i),FLBuilder._removeAllOverlays()),t.stopPropagation()},_deleteModule:function(e){var t=e.closest(".fl-row"),i=e.attr("data-node");FLBuilder.ajax({action:"delete_node",node_id:i}),e.empty(),e.remove(),t.removeClass("fl-block-overlay-muted"),FLBuilder._highlightEmptyCols(),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didDeleteModule",i)},_moduleCopyClicked:function(t){var i=e(this).closest(".fl-module");nodeId=i.attr("data-node"),position=i.index()+1,clone=i.clone(),form=e(".fl-builder-module-settings[data-node="+nodeId+"]"),settings=null,form.length&&(settings=FLBuilder._getSettings(form),FLBuilderSettingsConfig.nodes[nodeId]=settings),clone.addClass("fl-node-"+nodeId+"-clone fl-builder-node-clone"),clone.find(".fl-block-overlay").remove(),i.after(clone),e("html, body").animate({scrollTop:clone.offset().top-75},500),FLBuilder._showNodeLoading(nodeId+"-clone"),FLBuilder._newModuleParent=i.parent(),FLBuilder._newModulePosition=position,FLBuilder.ajax({action:"copy_module",node_id:nodeId,settings:settings},function(e){var t=JSON.parse(e);t.duplicatedModule=nodeId,FLBuilder._moduleCopyComplete(t)}),t.stopPropagation()},_moduleCopyComplete:function(e){e.nodeParent=FLBuilder._newModuleParent,e.nodePosition=FLBuilder._newModulePosition,FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateModule",{newNodeId:e.nodeId,oldNodeId:e.duplicatedModule}),e.nodeParent.find(".fl-builder-node-loading").eq(0).remove()})},_moduleSettingsClicked:function(t){var i=e(this),l=i.closest(".fl-module").attr("data-type"),s=i.closest(".fl-module").attr("data-node"),o=i.closest(".fl-col").attr("data-node"),n=i.closest(".fl-block-overlay-global").length>0;t.stopPropagation(),FLBuilder._colResizing||n&&!FLBuilderConfig.userCanEditGlobalTemplates||FLBuilder._showModuleSettings({type:l,nodeId:s,parentId:o,global:n})},_showModuleSettings:function(t,i){var l=FLBuilderSettingsConfig.modules[t.type],s=t.settings?t.settings:FLBuilderSettingsConfig.nodes[t.nodeId],o=e("head");-1===e.inArray(t.type,FLBuilder._loadedModuleAssets)&&(""!==l.assets.css&&o.append(l.assets.css),""!==l.assets.js&&o.append(l.assets.js),FLBuilder._loadedModuleAssets.push(t.type)),FLBuilderSettingsForms.render({type:"module",id:t.type,nodeId:t.nodeId,className:"fl-builder-module-settings fl-builder-"+t.type+"-settings",attrs:'data-node="'+t.nodeId+'" data-parent="'+t.parentId+'" data-type="'+t.type+'"',buttons:t.global||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:t.global?[FLBuilderStrings.global]:[],settings:s?s:FLBuilderSettingsConfig.defaults.modules[t.type],legacy:t.legacy,helper:FLBuilder._moduleHelpers[t.type],rules:FLBuilder._moduleHelpers[t.type]?FLBuilder._moduleHelpers[t.type].rules:null,preview:{type:"module",layout:t.layout,callback:function(){FLBuilder.triggerHook("didAddModule",t.nodeId)}}},i)},_saveModuleClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=t.attr("data-type"),l=(t.attr("data-node"),FLBuilder._moduleHelpers[i]),s=!0;"undefined"!=typeof l&&(t.find("label.error").remove(),t.validate().hideErrors(),s=t.validate().form(),s&&(s=l.submit())),s?FLBuilder._saveSettings():FLBuilder._toggleSettingsTabErrors()},_addModule:function(e,t,i,l,s,o){FLBuilder._showNodeLoadingPlaceholder(e,l),e.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=e,FLBuilder._newModulePosition=l),FLBuilder.ajax({action:"render_new_module",parent_id:t,type:i,position:l,node_preview:1,widget:"undefined"==typeof s?"":s,alias:"undefined"==typeof o?"":o},FLBuilder._addModuleComplete)},_addModuleComplete:function(t){var i=JSON.parse(t);i.layout&&(i.layout.nodeParent=FLBuilder._newModuleParent,i.layout.nodePosition=FLBuilder._newModulePosition),e("form.fl-builder-settings").length?i.layout&&FLBuilder._renderLayout(i.layout):FLBuilder._showModuleSettings(i,function(){e(".fl-builder-module-settings").data("new-module","1")})},registerModuleHelper:function(t,i){var l={rules:{},init:function(){},submit:function(){return!0},preview:function(){}};FLBuilder._moduleHelpers[t]=e.extend({},l,i)},_registerModuleHelper:function(e,t){FLBuilder.registerModuleHelper(e,t)},_showNodeTemplateSettings:function(t){var i=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=i.attr("data-node"),s=FLBuilderStrings.saveModule;return i.hasClass("fl-builder-row-settings")&&(s=FLBuilderStrings.saveRow),!!FLBuilder._triggerSettingsSave(!1,!1,!1)&&void FLBuilderSettingsForms.render({id:"node_template",nodeId:l,title:s,attrs:'data-node="'+l+'"',className:"fl-builder-node-template-settings",rules:{name:{required:!0}}},function(){FLBuilderConfig.userCanEditGlobalTemplates||e("#fl-field-global").hide()})},_saveNodeTemplate:function(){var t=e(".fl-builder-node-template-settings"),i=t.attr("data-node"),l=t.validate().form();l&&(FLBuilder._showNodeLoading(i),FLBuilder.ajax({action:"save_node_template",node_id:i,settings:FLBuilder._getSettings(t)},function(e){FLBuilder._saveNodeTemplateComplete(e),FLBuilder._hideNodeLoading(i)}),FLBuilder._lightbox.close())},_saveNodeTemplateComplete:function(t){var i=JSON.parse(t),l=e(".fl-builder-saved-"+i.type+"s"),s=l.find(".fl-builder-block"),o=null,n="",r=i.name.toLowerCase(),a=0,d=wp.template("fl-node-template-block"),u={name:i.name,isGlobal:i.global,content:i.type,id:i.id,postID:i.postID,kind:"template",type:"user",link:i.link,category:{uncategorized:FLBuilderStrings.uncategorized}};if(FLBuilderConfig.contentItems.template.push(u),FLBuilder.triggerHook("contentItemsChanged"),i.layout&&(FLBuilder._renderLayout(i.layout),FLBuilder.triggerHook("didSaveGlobalNodeTemplate",i.config)),0===s.length)l.append(d(i));else for(;a<s.length;a++){if(o=s.eq(a),n=o.text().toLowerCase().trim(),0===a&&r<n){l.prepend(d(i));break}if(r<n){o.before(d(i));break}if(s.length-1===a){l.append(d(i));break}}l.find(".fl-builder-block-no-node-templates").remove()},_nodeTemplateDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var l=i.item,s=l.parent(),o=null,n=0,r=null,a="",d=null;if(s.hasClass("fl-builder-blocks-section-content"))return void l.remove();if(l.hasClass("fl-builder-block-saved-row")||l.hasClass("fl-builder-block-row-template"))r=l.closest(".fl-row"),n=r.length?e(FLBuilder._contentClass+" .fl-row").index(r):0,n=s.hasClass("fl-drop-target-last")?n+1:n,o=null,a="render_new_row",d=FLBuilder._addRowComplete,FLBuilder._newRowPosition=n,FLBuilder._showNodeLoadingPlaceholder(e(FLBuilder._contentClass),n);else if(l.hasClass("fl-builder-block-saved-module")||l.hasClass("fl-builder-block-module-template")){if(a="render_new_module",d=FLBuilder._addModuleComplete,s.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();s.hasClass("fl-row-drop-target")?(s=l.closest(".fl-builder-content"),o=0,n=s.find(".fl-row").index(l.closest(".fl-row"))):s.hasClass("fl-col-group-drop-target")?(s=l.closest(".fl-row-content"),o=s.closest(".fl-row").attr("data-node"),n=s.find(" > .fl-col-group").index(l.closest(".fl-col-group"))):s.hasClass("fl-col-drop-target")?(s=l.closest(".fl-col-group"),n=s.children(".fl-col").index(l.closest(".fl-col")),o=s.attr("data-node")):(n=s.children(".fl-module, .fl-builder-block").index(l),o=l.closest(".fl-col").attr("data-node")),l.closest(".fl-drop-target-last").length&&(n+=1),s.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=s,FLBuilder._newModulePosition=n),FLBuilder._showNodeLoadingPlaceholder(s,n)}FLBuilder.ajax({action:a,template_id:l.attr("data-id"),template_type:l.attr("data-type"),parent_id:o,position:n},function(e){if(a.indexOf("row")>-1){var t=JSON.parse(e);FLBuilder.triggerHook("didApplyRowTemplateComplete",t.config),d(t.layout)}else d(e)}),l.remove()},_editNodeTemplateClicked:function(t){t.preventDefault(),t.stopPropagation(),window.open(e(this).attr("href"))},_deleteNodeTemplateClicked:function(t){var i=e(t.target),l=i.closest(".fl-builder-blocks-section"),s=l.find(".fl-builder-blocks-section-content"),o=s.find(".fl-builder-block"),n=i.closest(".fl-builder-block"),r=n.hasClass("fl-builder-block-global"),a=r?FLBuilder._updateLayout:void 0,d=r?FLBuilderStrings.deleteGlobalTemplate:FLBuilderStrings.deleteTemplate,u=null;confirm(d)&&(n.remove(),1===o.length&&(n.hasClass("fl-builder-block-saved-row")?s.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedRows+"</span>"):s.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedModules+"</span>")),n.hasClass("fl-builder-block-global")&&FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"delete_node_template",template_id:n.attr("data-id")},a),u=_.findIndex(FLBuilderConfig.contentItems.template,{id:n.attr("data-id"),type:"user"}),FLBuilderConfig.contentItems.template.splice(u,1),FLBuilder.triggerHook("contentItemsChanged"))},_initSettingsForms:function(){FLBuilder._initCodeFields(),FLBuilder._initColorPickers(),FLBuilder._initSelectFields(),FLBuilder._initEditorFields(),FLBuilder._initMultipleFields(),FLBuilder._initAutoSuggestFields(),FLBuilder._initLinkFields(),FLBuilder._initFontFields(),FLBuilder._initOrderingFields(),FLBuilder._initTimezoneFields(),FLBuilder._focusFirstSettingsControl(),FLBuilder._lightbox._resizeEditors(),e(".fl-builder-settings-fields").css("visibility","visible"),FLBuilder.triggerHook("settings-form-init")},_destroySettingsForms:function(){FLBuilder._destroyEditorFields()},_setSettingsFormContent:function(t){e(".fl-legacy-settings").remove(),e("body").append(t)},_settingsTabClicked:function(t){var i=e(this),l=i.closest(".fl-builder-settings"),s=i.attr("href").split("#").pop();FLBuilder._resetSettingsTabsState(),l.find(".fl-builder-settings-tab").removeClass("fl-active"),l.find("#"+s).addClass("fl-active"),l.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),l.find("a[href*="+s+"]").addClass("fl-active"),FLBuilder._focusFirstSettingsControl(),t.preventDefault()},_resetSettingsTabsState:function(){var t=e(".fl-lightbox:visible");FLBuilder._hideTabsOverflowMenu(),t.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),t.find(".fl-builder-settings-tabs-overflow-menu .fl-active").removeClass("fl-active"),t.find(".fl-contains-active").removeClass("fl-contains-active")},_calculateSettingsTabsOverflow:function(){var t=e(".fl-lightbox:visible"),i=t.outerWidth(),l=t.hasClass("fl-lightbox-width-slim"),s=t.find(".fl-builder-settings-tabs"),o=t.find(".fl-builder-settings-tabs-overflow-menu"),n=t.find(".fl-builder-settings-tabs-more"),r=s.find("a"),a=!1,d=i-60,u=0,c=l?16:30;o.html(""),FLBuilder._hideTabsOverflowMenu(),r.removeClass("fl-overflowed"),r.each(function(){if(!e(this).is(":visible"))return!0;if(!a){var t=e(this).textWidth()+c+12;u+=t,u>=d&&(a=!0)}if(a){var i=e(this).html(),l=e(this).attr("href"),s="";e(this).hasClass("fl-active")&&(s="fl-active"),e(this).hasClass("error")&&(s+=" error"),""!==s&&(s='class="'+s+'"');var n=e('<a href="'+l+'" '+s+">"+i+"</a>");o.append(n),e(this).addClass("fl-overflowed")}else e(this).removeClass("fl-overflowed")}),a?t.addClass("fl-lightbox-has-tab-overflow"):t.removeClass("fl-lightbox-has-tab-overflow"),o.find(".fl-active").length>0?n.addClass("fl-contains-active"):n.removeClass("fl-contains-active"),o.find(".error").length>0?n.addClass("fl-contains-errors"):n.removeClass("fl-contains-errors")},_settingsTabsToOverflowMenuItemClicked:function(t){var i=e(t.currentTarget),l=i.attr("href"),s=i.closest(".fl-lightbox-header-wrap").find(".fl-builder-settings-tabs"),o=s.find('a[href="'+l+'"]'),n=s.find(".fl-builder-settings-tabs-more");FLBuilder._resetSettingsTabsState(),o.trigger("click"),i.addClass("fl-active"),n.addClass("fl-contains-active"),FLBuilder._hideTabsOverflowMenu(),t.preventDefault()},_hasOverflowTabs:function(){var t=e(".fl-lightbox:visible"),i=t.find(".fl-builder-settings-tabs-overflow-menu a");return i.length>0},_showTabsOverflowMenu:function(){if(FLBuilder._hasOverflowTabs()){var t=e(".fl-lightbox:visible");t.find(".fl-builder-settings-tabs-overflow-menu").css("display","flex"),t.find(".fl-builder-settings-tabs-overflow-click-mask").show(),this.isShowingSettingsTabsOverflowMenu=!0}},_hideTabsOverflowMenu:function(){var t=e(".fl-lightbox:visible");t.find(".fl-builder-settings-tabs-overflow-menu").css("display","none"),t.find(".fl-builder-settings-tabs-overflow-click-mask").hide(),this.isShowingSettingsTabsOverflowMenu=!1},_toggleTabsOverflowMenu:function(e){FLBuilder.isShowingSettingsTabsOverflowMenu?FLBuilder._hideTabsOverflowMenu():FLBuilder._showTabsOverflowMenu(),e.stopPropagation()},_settingsCancelClicked:function(t){var i=e(".fl-builder-lightbox[data-parent]"),l=e(".fl-builder-module-settings"),s=null,o=null,n=null,r=null;return i.length>0?void FLBuilder._closeNestedSettings():(l.length>0&&"undefined"!=typeof l.data("new-module")?(s=e(FLBuilder.preview.state.html),o=e(".fl-node-"+l.data("node")),n=o.closest(".fl-col"),r=s.find(".fl-node-"+n.data("node")),r.length>0?FLBuilder._deleteModule(o):FLBuilder._deleteCol(n)):FLBuilder.preview&&FLBuilder.preview.revert(),FLBuilder.preview=null,void FLLightbox.closeParent(this))},_focusFirstSettingsControl:function(){var t=e(".fl-builder-settings:visible"),i=t.find(".fl-builder-settings-tab.fl-active"),l=i.find(".fl-field").first(),s=l.find('input:not([type="hidden"]), textarea, select, button, a, .fl-editor-field').first();if("undefined"!=typeof tinyMCE&&s.hasClass("fl-editor-field")){var o=s.find("textarea.wp-editor-area").attr("id");tinyMCE.get(o).focus()}else setTimeout(function(){s.focus().css("animation-name","fl-grab-attention")},300);l.css("animation-name","fl-grab-attention"),l.on("animationend",function(){l.css("animation-name","")})},_initSettingsValidation:function(t,i){var l=e(".fl-builder-settings").last();l.validate({ignore:".fl-ignore-validation",rules:t,messages:i,errorPlacement:FLBuilder._settingsErrorPlacement})},_settingsErrorPlacement:function(e,t){e.appendTo(t.parent())},_toggleSettingsTabErrors:function(){for(var t=e(".fl-builder-settings:visible"),i=t.find(".fl-builder-settings-tab"),l=null,s=null,o=0;o<i.length;o++)l=i.eq(o),s=l.find("label.error"),tabLink=t.find(".fl-builder-settings-tabs a[href*="+l.attr("id")+"]"),tabLink.find(".fl-error-icon").remove(),tabLink.removeClass("error"),s.length>0&&(tabLink.append('<span class="fl-error-icon"></span>'),tabLink.addClass("error"));FLBuilder._calculateSettingsTabsOverflow()},_getSettings:function(t){FLBuilder._updateEditorFields();var i=t.serializeArray(),l=0,s=0,o="",n="",r="",a=[],d=[],u={};for(l=0;l<i.length;l++)if(o=i[l].value.replace(/\r/gm,""),!(i[l].name.indexOf("flrich")>-1))if(i[l].name.indexOf("[")>-1){for(n=i[l].name.replace(/\[(.*)\]/,""),r=i[l].name.replace(n,""),a=[],d=r.match(/\[[^\]]*\]/g),s=0;s<d.length;s++)"[]"!=d[s]&&a.push(d[s].replace(/\[|\]/g,""));r.match(/\[\]\[[^\]]*\]\[[^\]]+\]/)?("undefined"==typeof u[n]&&(u[n]={}),"undefined"==typeof u[n][a[0]]&&(u[n][a[0]]={}),"undefined"==typeof u[n][a[0]][a[1]]&&(u[n][a[0]][a[1]]={}),u[n][a[0]][a[1]]=o):r.match(/\[\]\[[^\]]*\]\[\]/)?("undefined"==typeof u[n]&&(u[n]={}),"undefined"==typeof u[n][a[0]]&&(u[n][a[0]]=[]),u[n][a[0]].push(o)):r.match(/\[\]\[[^\]]*\]/)?("undefined"==typeof u[n]&&(u[n]={}),u[n][a[0]]=o):r.match(/\[\]/)&&("undefined"==typeof u[n]&&(u[n]=[]),u[n].push(o))}else u[i[l].name]=o;for(r in u)if("undefined"!=typeof u["as_values_"+r]){u[r]=e.grep(u["as_values_"+r].split(","),function(e){return""!==e}).join(",");try{delete u["as_values_"+r]}catch(c){}}return u=e.extend({},FLBuilder._getOriginalSettings(t),u)},_getSettingsJSONForHTML:function(e){return JSON.stringify(e).replace(/\'/g,"&#39;").replace("<wbr />","<wbr>")},_getOriginalSettings:function(t,i){var l=t.find(".fl-builder-settings-json"),s={};if(l.length){l=JSON.parse(l.val().replace(/&#39;/g,"'"));for(key in l)(e("#fl-field-"+key).length||i)&&(s[key]=l[key])}return s},_saveSettings:function(t){var i=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=i.data("new-module"),s=i.attr("data-node"),o=FLBuilder._getSettings(i),n=FLBuilder.preview;return!_.isUndefined(t)&&_.isBoolean(t)||(t=!0),n&&!n._settingsHaveChanged()&&_.isUndefined(l)?void FLBuilder._lightbox.close():(FLBuilder._showNodeLoading(s),FLBuilderSettingsConfig.nodes[s]=o,FLBuilder.ajax({action:"save_settings",node_id:s,settings:o},FLBuilder._saveSettingsComplete.bind(this,t,n)),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:s,settings:o}),void FLBuilder._lightbox.close())},_saveSettingsComplete:function(e,t,i){var l=JSON.parse(i),s=function(){t&&l.layout.partial&&l.layout.nodeId===t.nodeId&&(t.clear(),t=null)};!0===e?FLBuilder._renderLayout(l.layout,s):s(),FLBuilder.triggerHook("didSaveNodeSettingsComplete",{nodeId:l.node_id,settings:l.settings})},_triggerSettingsSave:function(t,i,l){var s=FLBuilder._lightbox._node.find("form.fl-builder-settings"),o=FLBuilder._lightbox._node.data("instance-id"),n=FLLightbox._instances[o],r=e(".fl-lightbox-wrap[data-parent]:visible"),a=!1,d=!0;return t=!_.isUndefined(t)&&t,i=!_.isUndefined(i)&&i,l=!!_.isUndefined(l)||l,s.length&&(r.length&&(r.find(".fl-builder-settings-save").trigger("click"),(r.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),d&&!s.validate().form()&&(d=!1),a=FLBuilderSettingsForms.settingsHaveChanged(),d&&a&&(t&&n.disableClose(),s.find(".fl-builder-settings-save").trigger("click"),t&&n.enableClose(),(s.find("label.error").length||e(".fl-builder-alert-lightbox:visible").length)&&(d=!1)),l&&(FLBuilder._destroySettingsForms(),!a&&FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)),a||t||n.close()),d||(FLBuilder.triggerHook("didFailSettingsSave"),FLBuilder._toggleSettingsTabErrors(),i&&!e(".fl-builder-alert-lightbox:visible").length&&FLBuilder.alert(FLBuilderStrings.settingsHaveErrors)),d},_refreshSettingsPreviewReference:function(){FLBuilder.preview&&FLBuilder.preview._initElementsAndClasses()},_openNestedSettings:function(t){t.className&&-1===t.className.indexOf("fl-builder-settings-lightbox")&&(t.className+=" fl-builder-settings-lightbox"),t=e.extend({className:"fl-builder-lightbox fl-builder-settings-lightbox",destroyOnClose:!0,resizable:!0},t);var i=e(".fl-lightbox-wrap:visible"),l=i.find(".fl-lightbox"),s=new FLLightbox(t),o=s._node,n=o.find(".fl-lightbox");return i.hide(),o.attr("data-parent",i.attr("data-instance-id")),n.attr("style",l.attr("style")),s.on("resized",FLBuilder._calculateSettingsTabsOverflow),s.open('<div class="fl-builder-lightbox-loading"></div>'),s},_closeNestedSettings:function(){var t=e(".fl-builder-lightbox[data-parent]:visible"),i=t.find(".fl-lightbox"),l=t.attr("data-instance-id"),s=FLLightbox._instances[l],o=t.attr("data-parent"),n=e('[data-instance-id="'+o+'"]'),r=n.find(".fl-lightbox"),a=n.find("form"),d=FLLightbox._instances[o];s.on("close",function(){r.attr("style",i.attr("style")),n.show(),d._resize(),n.find("label.error").remove(),a.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors()}),s.close()},_showHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeOut()},_initAutoSuggestFields:function(){var t=e(".fl-builder-settings:visible .fl-suggest-field"),i=null,l=null,s=null,o=[];t.each(function(){i=e(this),""!==i.attr("data-value")&&(FLBuilderSettingsForms.showFieldLoader(i),o.push({name:i.attr("name"),value:i.attr("data-value"),action:i.attr("data-action"),data:i.attr("data-action-data")}))}),o.length?FLBuilder.ajax({action:"get_autosuggest_values",fields:o},function(i){l=JSON.parse(i);for(s in l)e('.fl-suggest-field[name="'+s+'"]').attr("data-value",l[s]);t.each(FLBuilder._initAutoSuggestField)}):t.each(FLBuilder._initAutoSuggestField)},_initAutoSuggestField:function(){var t=e(this);t.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:t.data("action"),fl_as_action_data:t.data("action-data"),_wpnonce:FLBuilderConfig.ajaxNonce}),e.extend({},{asHtmlID:t.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:3,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,preFill:t.data("value"),queryParam:"fl_as_query",afterSelectionAdd:FLBuilder._updateAutoSuggestField,afterSelectionRemove:FLBuilder._updateAutoSuggestField,selectionLimit:t.data("limit")},t.data("args"))),FLBuilderSettingsForms.hideFieldLoader(t)},_updateAutoSuggestField:function(t,i,l){e(this).siblings(".as-values").val(l.join(",")).trigger("change")},_initCodeFields:function(){e(".fl-builder-settings:visible").find(".fl-code-field").each(FLBuilder._initCodeField)},_initCodeField:function(){var t=e(this),i=t.find("textarea"),l=(i.attr("id"),i.data("editor")),s=i.data("wrap"),o=e("<div>",{position:"absolute",height:20*parseInt(i.attr("rows"),10)}),n=null;o.insertBefore(i),i.css("display","none"),ace.require("ace/ext/language_tools"),n=ace.edit(o[0]),n.$blockScrolling=1/0,n.getSession().setValue(i.val()),n.getSession().setMode("ace/mode/"+l),s&&n.getSession().setUseWrapMode(!0),n.setOptions({enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,enableSnippets:!1,showLineNumbers:!1,showFoldWidgets:!1}),n.getSession().on("change",function(e){i.val(n.getSession().getValue()).trigger("change")}),i.closest(".fl-field").data("editor",n)},_initMultipleFields:function(){for(var t=e(".fl-builder-settings:visible .fl-builder-field-multiples"),i=null,l=null,s=0,o=FLBuilderConfig.isRtl?{left:10}:{right:10};s<t.length;s++)i=t.eq(s),l=i.find(".fl-builder-field-multiple"),1===l.length?l.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):l.find(".fl-builder-field-actions").removeClass("fl-builder-field-actions-single");e(".fl-builder-field-multiples").sortable({items:".fl-builder-field-multiple",cursor:"move",cursorAt:o,distance:5,opacity:.5,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer",axis:"y"})},_addFieldClicked:function(){var t=e(this),i=t.attr("data-field"),l=t.closest("tr").siblings("tr[data-field="+i+"]").last(),s=l.clone(),o=s.find(".fl-form-field"),n=null,r=parseInt(l.find("label span.fl-builder-field-index").html(),10)+1;s.find("th label span.fl-builder-field-index").html(r),s.find(".fl-form-field-preview-text").html(""),s.find("input, textarea, select").val(""),l.after(s),FLBuilder._initMultipleFields(),o.length&&(n=o.find(".fl-form-field-edit").data("type"),o.find("input").val(JSON.stringify(FLBuilderSettingsConfig.defaults.forms[n])))},_copyFieldClicked:function(){var t=e(this),i=t.closest("tr"),l=i.clone(),s=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;l.find("th label span.fl-builder-field-index").html(s),i.after(l),FLBuilder._renumberFields(i.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var t=e(this).closest("tr"),i=t.parent(),l=confirm(FLBuilderStrings.deleteFieldMessage);l&&(t.remove(),FLBuilder._renumberFields(i),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){for(var t=e.find(".fl-builder-field-multiple"),i=0;i<t.length;i++)t.eq(i).find("th label span.fl-builder-field-index").html(i+1)},_fieldDragHelper:function(){return e('<div class="fl-builder-field-dd-helper"></div>')},_fieldDragStop:function(e,t){FLBuilder._renumberFields(t.item.parent()),FLBuilder.preview.delayPreview()},_initSelectFields:function(){e(".fl-builder-settings:visible").find(".fl-builder-settings-fields select").trigger("change")},_settingsSelectChanged:function(){var t=e(this),i=t.attr("data-toggle"),l=t.attr("data-hide"),s=t.attr("data-trigger"),o=t.val(),n=0;if("undefined"!=typeof i){i=JSON.parse(i);for(n in i)FLBuilder._settingsSelectToggle(i[n].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[n].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[n].tabs,"hide","a[href*=fl-builder-settings-tab-","]");"undefined"!=typeof i[o]&&(FLBuilder._settingsSelectToggle(i[o].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(i[o].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[o].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof l&&(l=JSON.parse(l),"undefined"!=typeof l[o]&&(FLBuilder._settingsSelectToggle(l[o].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l[o].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[o].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))),"undefined"!=typeof s&&(s=JSON.parse(s),"undefined"!=typeof s[o]&&"undefined"!=typeof s[o].fields))for(n=0;n<s[o].fields.length;n++)e("#fl-field-"+s[o].fields[n]).find("select").trigger("change");FLBuilder._calculateSettingsTabsOverflow()},_settingsSelectToggle:function(t,i,l,s){var o=0;if(s="undefined"==typeof s?"":s,"undefined"!=typeof t)for(;o<t.length;o++)e(".fl-builder-settings:visible").find(l+t[o]+s)[i](),e(l+t[o]+s).parent().find('.fl-field[data-type="code"]').each(function(){e(this).data("editor").resize()})},_initColorPickers:function(){var t=FLBuilderConfig.colorPresets?FLBuilderConfig.colorPresets:[];FLBuilder.colorPicker=new FLBuilderColorPicker({mode:"hsv",elements:".fl-color-picker .fl-color-picker-value",presets:t,labels:{colorPresets:FLBuilderStrings.colorPresets,colorPicker:FLBuilderStrings.colorPicker,placeholder:FLBuilderStrings.placeholder,removePresetConfirm:FLBuilderStrings.removePresetConfirm,noneColorSelected:FLBuilderStrings.noneColorSelected,alreadySaved:FLBuilderStrings.alreadySaved,noPresets:FLBuilderStrings.noPresets,presetAdded:FLBuilderStrings.presetAdded}}),e(FLBuilder.colorPicker).on("presetRemoved presetAdded",function(e,t){FLBuilder.ajax({action:"save_color_presets",presets:t.presets})})},_initSinglePhotoSelector:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:"image"},multiple:!1}),FLBuilder._singlePhotoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="photo")},_selectSinglePhoto:function(){FLBuilder._initSinglePhotoSelector(),FLBuilder._singlePhotoSelector.once("open",e.proxy(FLBuilder._singlePhotoOpened,this)),FLBuilder._singlePhotoSelector.once("select",e.proxy(FLBuilder._singlePhotoSelected,this)),FLBuilder._singlePhotoSelector.open()},_singlePhotoOpened:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection"),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),s=l.val(),o=null;e(this).hasClass("fl-photo-replace")?(t.reset(),i.addClass("fl-photo-empty"),l.val("")):""!==s?(o=wp.media.attachment(s),o.fetch(),t.add(o?[o]:[])):t.reset()},_singlePhotoSelected:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),s=i.find(".fl-photo-preview img"),o=i.find("select");l.val(t.id),s.attr("src",FLBuilder._getPhotoSrc(t)),i.removeClass("fl-photo-empty").removeClass("fl-photo-no-attachment"),i.find("label.error").remove(),o.show(),o.html(FLBuilder._getPhotoSizeOptions(t)),o.trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_singlePhotoRemoved:function(){FLBuilder._initSinglePhotoSelector();var t=FLBuilder._singlePhotoSelector.state(),i="undefined"!=typeof t?t.get("selection"):null,l=e(this).closest(".fl-photo-field"),s=l.find("input[type=hidden]"),o=l.find("select");i&&i.reset(),l.addClass("fl-photo-empty"),s.val(""),o.html('<option value="" selected></option>'),o.trigger("change")},_getPhotoSrc:function(e){return"undefined"==typeof e.sizes?e.url:"undefined"!=typeof e.sizes.thumbnail?e.sizes.thumbnail.url:e.sizes.full.url},_getPhotoSizeOptions:function(e,t){var i="",l=null,s=null,o="",n={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if("undefined"==typeof e.sizes||0===e.sizes.length)i+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else{t&&(t=t.replace(/https?/,""));for(l in e.sizes)o="undefined"!=typeof n[l]?n[l]+" - ":"undefined"!=typeof FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]+" - ":"",s="",t?t===e.sizes[l].url.replace(/https?/,"")&&(s=' selected="selected"'):s="full"==l?' selected="selected"':"",i+='<option value="'+e.sizes[l].url+'"'+s+">"+o+e.sizes[l].width+" x "+e.sizes[l].height+"</option>"}return i},_selectMultiplePhotos:function(){var t=e(this).closest(".fl-multiple-photos-field"),i=t.find("input[type=hidden]"),l=i.val(),s=""===l?"":JSON.parse(l),o=wp.media.gallery.defaults.id,n='[gallery ids="-1"]',r=null,a=null,d=null,u=null,c=[];if("object"==typeof s){for(u in s)c.push(s[u]);n='[gallery ids="'+c.join()+'"]'}r=wp.shortcode.next("gallery",n).shortcode,_.isUndefined(r.get("id"))&&!_.isUndefined(o)&&r.set("id",o),a=wp.media.gallery.attachments(r),d=new wp.media.model.Selection(a.models,{props:a.props.toJSON(),multiple:!0}),d.gallery=a.gallery,d.more().done(function(){d.length||FLBuilder._multiplePhotoSelector.setState("gallery-library"),d.props.set({query:!1}),d.unmirror(),d.props.unset("orderby");
5
  }),FLBuilder._multiplePhotoSelector&&FLBuilder._multiplePhotoSelector.dispose(),FLBuilder._multiplePhotoSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-photos-edit")?"gallery-edit":"gallery-library",title:wp.media.view.l10n.editGalleryTitle,editing:!0,multiple:!0,selection:d}).open(),e(FLBuilder._multiplePhotoSelector.views.view.el).addClass("fl-multiple-photos-lightbox"),FLBuilder._multiplePhotoSelector.once("update",e.proxy(FLBuilder._multiplePhotosSelected,this))},_multiplePhotosSelected:function(t){for(var i=e(this).closest(".fl-multiple-photos-field"),l=i.find("input[type=hidden]"),s=i.find(".fl-multiple-photos-count"),o=[],n=0;n<t.models.length;n++)o.push(t.models[n].id);1==o.length?s.html("1 "+FLBuilderStrings.photoSelected):s.html(o.length+" "+FLBuilderStrings.photosSelected),i.removeClass("fl-multiple-photos-empty"),i.find("label.error").remove(),l.val(JSON.stringify(o)).trigger("change")},_selectSingleVideo:function(){null===FLBuilder._singleVideoSelector&&(FLBuilder._singleVideoSelector=wp.media({title:FLBuilderStrings.selectVideo,button:{text:FLBuilderStrings.selectVideo},library:{type:"video"},multiple:!1}),FLBuilder._singleVideoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="video"),FLBuilder._singleVideoSelector.once("select",e.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var t=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),i=e(this).closest(".fl-video-field"),l=i.find(".fl-video-preview-img"),s=i.find(".fl-video-preview-filename"),o=i.find("input[type=hidden]");l.html('<span class="dashicons dashicons-media-video"></span>'),s.html(t.filename),i.removeClass("fl-video-empty"),i.find("label.error").remove(),o.val(t.id).trigger("change"),FLBuilderSettingsConfig.attachments[t.id]=t},_selectMultipleAudios:function(){var t=e(this).closest(".fl-multiple-audios-field"),i=t.find("input[type=hidden]"),l=i.val(),s=""==l?'[playlist ids="-1"]':'[playlist ids="'+JSON.parse(l).join()+'"]',o=wp.shortcode.next("playlist",s).shortcode,n=wp.media.playlist.defaults.id,r=null,a=null;_.isUndefined(o.get("id"))&&!_.isUndefined(n)&&o.set("id",n),r=wp.media.playlist.attachments(o),a=new wp.media.model.Selection(r.models,{props:r.props.toJSON(),multiple:!0}),a.playlist=r.playlist,a.more().done(function(){a.props.set({query:!1}),a.unmirror(),a.props.unset("orderby")}),FLBuilder._multipleAudiosSelector&&FLBuilder._multipleAudiosSelector.dispose(),FLBuilder._multipleAudiosSelector=wp.media({frame:"post",state:e(this).hasClass("fl-multiple-audios-edit")?"playlist-edit":"playlist-library",title:wp.media.view.l10n.editPlaylistTitle,editing:!0,multiple:!0,selection:a}).open(),FLBuilder._multipleAudiosSelector.content.get("view").sidebar.unset("playlist"),FLBuilder._multipleAudiosSelector.on("content:render:browse",function(e){e&&e.sidebar.on("ready",function(){e.sidebar.unset("playlist")})}),FLBuilder._multipleAudiosSelector.once("update",e.proxy(FLBuilder._multipleAudiosSelected,this))},_multipleAudiosSelected:function(t){for(var i=e(this).closest(".fl-multiple-audios-field"),l=i.find(".fl-multiple-audios-count"),s=i.find("input[type=hidden]"),o=[],n=0;n<t.models.length;n++)o.push(t.models[n].id);1==o.length?l.html("1 "+FLBuilderStrings.audioSelected):l.html(o.length+" "+FLBuilderStrings.audiosSelected),s.val(JSON.stringify(o)).trigger("change"),i.removeClass("fl-multiple-audios-empty"),i.find("label.error").remove()},_selectIcon:function(){var e=this;FLIconSelector.open(function(t){FLBuilder._iconSelected.apply(e,[t])})},_iconSelected:function(t){var i=e(this).closest(".fl-icon-field"),l=i.find("input[type=hidden]"),s=i.find("i"),o=s.attr("data-icon");l.val(t).trigger("change"),s.removeClass(o),s.addClass(t),s.attr("data-icon",t),i.removeClass("fl-icon-empty"),i.find("label.error").remove()},_removeIcon:function(){var t=e(this).closest(".fl-icon-field"),i=t.find("input[type=hidden]"),l=t.find("i");i.val("").trigger("change"),l.removeClass(),l.attr("data-icon",""),t.addClass("fl-icon-empty")},_formFieldClicked:function(){var t=e(this),i=t.closest(".fl-builder-settings"),l=t.attr("data-type"),s=t.siblings("input").val(),o=FLBuilder._moduleHelpers[l],n=(FLBuilderSettingsConfig.forms[l],FLBuilder._openNestedSettings({className:"fl-builder-lightbox fl-form-field-settings"}));""===s&&(s=JSON.stringify(FLBuilderSettingsConfig.forms[l])),FLBuilderSettingsForms.render({id:l,nodeId:i.attr("data-node"),nodeSettings:FLBuilder._getSettings(i),settings:JSON.parse(s.replace(/&#39;/g,"'")),lightbox:n,helper:o,rules:o?o.rules:null},function(){t.attr("id","fl-"+n._node.attr("data-instance-id")),n._node.find("form.fl-builder-settings").attr("data-type",l)})},_saveFormFieldClicked:function(){var t=e(this).closest(".fl-builder-settings"),i=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),l=t.attr("data-type"),s=FLBuilder._getSettings(t),o={},n=FLBuilder._moduleHelpers[l],r=e(".fl-builder-settings #fl-"+i),a=r.parent().attr("data-preview-text"),d=t.find("#fl-field-"+a),u=s[a],c=e('select[name="'+a+'"]'),h=document.createElement("div"),f=!0;return c.length>0&&(u=c.find('option[value="'+s[a]+'"]').text()),"undefined"!=typeof n&&(t.find("label.error").remove(),t.validate().hideErrors(),f=t.validate().form(),f&&(f=n.submit())),f?("undefined"!=typeof a&&"undefined"!=typeof u&&("icon"===d.data("type")?u='<i class="'+u+'"></i>':u.length>35&&(h.innerHTML=u,u=(h.textContent||h.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),r.siblings(".fl-form-field-preview-text").html(u)),o=r.siblings("input").val().replace(/&#39;/g,"'"),""!=o&&(s=e.extend(JSON.parse(o),s)),r.siblings("input").val(JSON.stringify(s)).trigger("change"),FLBuilder._closeNestedSettings(),!0):(FLBuilder._toggleSettingsTabErrors(),!1)},_layoutFieldClicked:function(){var t=e(this);t.siblings().removeClass("fl-layout-field-option-selected"),t.addClass("fl-layout-field-option-selected"),t.siblings("input").val(t.attr("data-value"))},_initLinkFields:function(){e(".fl-builder-settings:visible .fl-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var t=e(this),i=t.find(".fl-link-field-search-input");i.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links",_wpnonce:FLBuilderConfig.ajaxNonce}),{asHtmlID:i.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:3,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,queryParam:"fl_as_query",selectionLimit:1,afterSelectionAdd:FLBuilder._updateLinkField})},_updateLinkField:function(e,t,i){var l=e.closest(".fl-link-field"),s=l.find(".fl-link-field-search"),o=l.find(".fl-link-field-search-input"),n=l.find(".fl-link-field-input");n.val(t.value).trigger("keyup"),o.autoSuggest("remove",t.value),s.hide()},_linkFieldSelectClicked:function(){var t=e(this).closest(".fl-link-field").find(".fl-link-field-search");t.show(),t.find("input").focus()},_linkFieldSelectCancelClicked:function(){var t=e(this);t.parent().hide(),t.closest(".fl-link-field").find("input.fl-link-field-input").focus()},_initFontFields:function(){e(".fl-builder-settings:visible .fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var t=e(this),i=t.attr("data-value"),l=t.find(".fl-font-field-font"),s=t.find(".fl-font-field-weight");l.on("change",function(){FLBuilder._getFontWeights(l)}),i.indexOf("family")>-1&&(i=JSON.parse(i),l.val(i.family),l.trigger("change"),s.find("option[value="+i.weight+"]").length&&s.val(i.weight))},_getFontWeights:function(t){var i=t.next(".fl-font-field-weight"),l=t.val(),s={"default":"Default",regular:"Regular",100:"Thin 100",200:"Extra-Light 200",300:"Light 300",400:"Normal 400",500:"Medium 500",600:"Semi-Bold 600",700:"Bold 700",800:"Extra-Bold 800",900:"Ultra-Bold 900"},o={};i.html(""),o="undefined"!=typeof FLBuilderFontFamilies.system[l]?FLBuilderFontFamilies.system[l].weights:"undefined"!=typeof FLBuilderFontFamilies.google[l]?FLBuilderFontFamilies.google[l]:FLBuilderFontFamilies["default"][l],e.each(o,function(e,t){i.append('<option value="'+t+'">'+s[t]+"</option>")})},_initTinyMCE:function(){tinymce.ui.FloatPanel.zIndex=100100,e(".fl-builder-hidden-editor").each(FLBuilder._initEditorField)},_initEditorFields:function(){e(".fl-builder-settings:visible .fl-editor-field").each(FLBuilder._initEditorField)},_initEditorField:function(){var t=e(this),i=t.find("textarea"),l=t.attr("data-name"),s="flrich"+(new Date).getTime()+"_"+l,o=FLBuilderConfig.wp_editor,n=tinyMCEPreInit,r=Number(t.attr("data-buttons")),a=t.attr("data-rows"),d=null,u=null;o=o.replace(/flbuildereditor/g,s),n=JSON.parse(JSON.stringify(n).replace(/flbuildereditor/g,s)),i.after(o).remove(),e("textarea#"+s).val(i.val()),void 0!==typeof tinymce&&void 0!==n.mceInit[s]&&(d=n.mceInit[s],u=tinymce.$("#wp-"+s+"-wrap"),u.find("textarea").attr("rows",a),r||u.find(".wp-media-buttons").remove(),!u.hasClass("tmce-active")&&n.qtInit.hasOwnProperty(s)||d.wp_skip_init||tinymce.init(d)),void 0!==typeof quicktags&&quicktags(n.qtInit[s]),window.wpActiveEditor=s},_reinitEditorFields:function(){e(".fl-lightbox-resizable:visible").length&&setTimeout(function(){var t,i;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)i=tinymce.editors[t].id,tinyMCE.execCommand("mceRemoveEditor",!0,i),tinyMCE.execCommand("mceAddEditor",!0,i);FLBuilder.preview&&FLBuilder.preview._initDefaultFieldPreviews(e('.fl-field[data-type="editor"]'))}},1)},_destroyEditorFields:function(){var t;if("undefined"!=typeof tinymce){for(t=tinymce.editors.length-1;t>-1;t--)tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[t].id);e(".wplink-autocomplete").remove(),e(".ui-helper-hidden-accessible").remove()}},_updateEditorFields:function(){var t=e(".fl-builder-settings:visible textarea.wp-editor-area");t.each(FLBuilder._updateEditorField)},_updateEditorField:function(){var t=e(this),i=t.closest(".fl-editor-field"),l=(t.closest(".fl-builder-settings"),t.closest(".wp-editor-wrap")),s=t.attr("id"),o=i.attr("data-name"),n="undefined"!=typeof tinyMCE&&tinyMCE.get(s),r=t.siblings('textarea[name="'+o+'"]'),a=i.data("wpautop");0===r.length&&(r=e('<textarea name="'+o+'"></textarea>').hide(),t.after(r)),a?n&&l.hasClass("tmce-active")?r.val(n.getContent()):"undefined"!=typeof switchEditors?r.val(switchEditors.wpautop(t.val())):r.val(t.val()):(n&&l.hasClass("tmce-active")&&n.save(),r.val(t.val()))},_loopDataSourceChange:function(){var t=e(this).val();e(".fl-loop-data-source").hide(),e('.fl-loop-data-source[data-source="'+t+'"]').show()},_customQueryPostTypeChange:function(){var t=e(this).val();e(".fl-custom-query-filter").hide(),e(".fl-custom-query-"+t+"-filter").show()},_initOrderingFields:function(){e(".fl-builder-settings:visible .fl-ordering-field-options").each(FLBuilder._initOrderingField)},_initOrderingField:function(){e(this).sortable({items:".fl-ordering-field-option",containment:"parent",tolerance:"pointer",stop:FLBuilder._updateOrderingField})},_updateOrderingField:function(t){var i=e(t.target),l=i.siblings("input[type=hidden]"),s=[];i.find(".fl-ordering-field-option").each(function(){s.push(e(this).attr("data-key"))}),l.val(JSON.stringify(s)).trigger("change")},_onNumberFieldFocus:function(t){var i=e(t.currentTarget);i.addClass("mousetrap"),Mousetrap.bind("up",function(){i.attr("step",1)}),Mousetrap.bind("down",function(){i.attr("step",1)}),Mousetrap.bind("shift+up",function(){i.attr("step",10)}),Mousetrap.bind("shift+down",function(){i.attr("step",10)})},_onNumberFieldBlur:function(t){var i=e(t.currentTarget);i.attr("step",1).removeClass("mousetrap")},_initTimezoneFields:function(){e(".fl-builder-settings:visible .fl-field[data-type=timezone]").each(FLBuilder._initTimezoneField)},_initTimezoneField:function(){var t=e(this).find("select"),i=t.attr("data-value");t.find('option[value="'+i+'"]').attr("selected","selected")},ajax:function(t,i){var l;FLBuilder.triggerHook("didBeginAJAX",t);for(l in t)"undefined"==typeof t[l]&&(t[l]=null);return t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=FLBuilderConfig.postId,t.fl_builder=1,t.fl_action=t.action,"undefined"!=typeof t.settings&&(t.settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.settings))),"undefined"!=typeof t.node_settings&&(t.node_settings=FLBuilder._ajaxModSecFix(e.extend(!0,{},t.node_settings))),t={fl_builder_data:t},e.post(FLBuilder._ajaxUrl(),t,function(e){FLBuilder._ajaxComplete(),"undefined"!=typeof i&&i.call(this,e),FLBuilder.triggerHook("didCompleteAJAX",t)})},_ajaxComplete:function(){FLBuilder.hideAjaxLoader()},_ajaxUrl:function(e){var t=window.location.href.split("#").shift(),i=null;if("undefined"!=typeof e)for(i in e)t+=t.indexOf("?")>-1?"&":"?",t+=i+"="+e[i];return t},showAjaxLoader:function(){0===e(".fl-builder-lightbox-loading").length&&e(".fl-builder-loading").show()},hideAjaxLoader:function(){e(".fl-builder-loading").hide()},_showNodeLoading:function(t){var i=e(".fl-node-"+t);i.addClass("fl-builder-node-loading")},_hideNodeLoading:function(t){var i=e(".fl-node-"+t);i.removeClass("fl-builder-node-loading")},_showNodeLoadingPlaceholder:function(t,i){var l=e('<div class="fl-builder-node-loading-placeholder"></div>');t.hasClass("fl-builder-content")?siblings=t.find(".fl-row"):t.hasClass("fl-row-content")?siblings=t.find(" > .fl-col-group"):t.hasClass("fl-col-group")?(t.addClass("fl-col-group-has-child-loading"),siblings=t.find(" > .fl-col")):siblings=t.find(" > .fl-col-group, > .fl-module"),0===siblings.length||siblings.length==i?t.append(l):siblings.eq(i).before(l)},_removeNodeLoadingPlaceholder:function(e){var t=e.prev(".fl-builder-node-loading-placeholder"),i=e.next(".fl-builder-node-loading-placeholder");t.length?t.remove():i.remove()},_ajaxModSecFix:function(e){var t;if(FLBuilderConfig.modSecFix&&"undefined"!=typeof btoa)if("string"==typeof e)e=FLBuilder._btoa(e);else for(t in e)"string"==typeof e[t]?e[t]=FLBuilder._btoa(e[t]):"object"==typeof e[t]&&(e[t]=FLBuilder._ajaxModSecFix(e[t]));return e},_btoa:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},_wpmedia_reset_errors:function(){e(".upload-error").remove(),e(".media-uploader-status").removeClass("errors").hide()},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox",resizable:!0}),FLBuilder._lightbox.on("resized",FLBuilder._calculateSettingsTabsOverflow),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._lightbox.on("beforeCloseLightbox",FLBuilder._destroyEditorFields),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_showLightbox:function(){FLBuilder._lightbox.open('<div class="fl-builder-lightbox-loading"></div>'),FLBuilder._removeAllOverlays(),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder.triggerHook("settings-lightbox-closed"),FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout)},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder.triggerHook("actions-lightbox-settings",e),FLBuilder._actionsLightbox.open(t(e))},alert:function(e){var t=new FLLightbox({className:"fl-builder-alert-lightbox",destroyOnClose:!0}),i=wp.template("fl-alert-lightbox");t.open(i({message:e}))},_alertClose:function(){FLLightbox.closeParent(this)},confirm:function(t){var i={message:"",ok:function(){},cancel:function(){},strings:{ok:FLBuilderStrings.ok,cancel:FLBuilderStrings.cancel}},l=e.extend({},i,"undefined"==typeof t?{}:t);lightbox=new FLLightbox({className:"fl-builder-confirm-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),template=wp.template("fl-confirm-lightbox"),lightbox.open(template(l)),lightbox._node.find(".fl-builder-confirm-ok").on("click",l.ok),lightbox._node.find(".fl-builder-confirm-cancel").on("click",l.cancel)},triggerHook:function(t,i){e("body").trigger("fl-builder."+t,i)},addHook:function(t,i){e("body").on("fl-builder."+t,i)},removeHook:function(t,i){e("body").off("fl-builder."+t,i)},log:function(e){"undefined"!=typeof window.console&&"undefined"!=typeof window.console.log&&console.log(e)},logError:function(e){var t=null;"undefined"!=typeof e&&("undefined"!=typeof e.stack?t=e.stack:"undefined"!=typeof e.message&&(t=e.message),t&&(FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(t),FLBuilder.log("************************************************************************")))},logGlobalError:function(e,t,i,l,s){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",i).replace("{file}",t)),"undefined"!=typeof s&&"undefined"!=typeof s.stack&&(FLBuilder.log(s.stack),FLBuilder.log("************************************************************************"))}},e(function(){FLBuilder._init()})}(jQuery),function(e){FLBuilderAJAXLayout=function(t,i){this._data=e.extend({},this._defaults,"string"==typeof t?JSON.parse(t):t),this._callback=i,this._post=FLBuilderConfig.postId,this._head=e("head").eq(0),this._body=e("body").eq(0),this._data.css&&(this._loader=e('<img src="'+this._data.css+'" />'),this._oldCss=e('link[href*="/cache/'+this._post+'"]'),this._newCss=e('<link rel="stylesheet" id="fl-builder-layout-'+this._post+'-css" href="'+this._data.css+'" />')),this._data.partial?(this._data.js&&(this._oldJs=e("#fl-builder-partial-refresh-js"),this._newJs=e('<script type="text/javascript" id="fl-builder-partial-refresh-js">'+this._data.js+"</script>")),this._data.nodeId&&(this._data.oldNodeId?(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.oldNodeId+'"]'),this._content=e(".fl-node-"+this._data.oldNodeId)):(this._oldScriptsStyles=e('.fl-builder-node-scripts-styles[data-node="'+this._data.nodeId+'"]'),this._content=e(".fl-node-"+this._data.nodeId).eq(0)))):(this._oldJs=e('script[src*="/cache/'+this._post+'"]'),this._newJs=e('<script src="'+this._data.js+'"></script>'),this._oldScriptsStyles=e(".fl-builder-layout-scripts-styles"),this._content=e(FLBuilder._contentClass)),this._init()},FLBuilderAJAXLayout.prototype={_defaults:{partial:!1,nodeId:null,nodeType:null,nodeParent:null,nodePosition:null,oldNodeId:null,html:null,scriptsStyles:null,css:null,js:null},_data:null,_callback:function(){},_post:null,_head:null,_body:null,_loader:null,_oldCss:null,_newCss:null,_oldJs:null,_newJs:null,_oldScriptsStyles:null,_content:null,_init:function(){this._body.height(this._body.height()),this._loader?(this._loader.on("error",e.proxy(this._loadNewCSSComplete,this)),this._body.append(this._loader)):this._finish()},_loadNewCSSComplete:function(){this._loader.remove(),this._oldCss.length>0?this._oldCss.after(this._newCss):this._head.append(this._newCss),setTimeout(e.proxy(this._finish,this),250)},_finish:function(){this._removeOldContentAndAssets(),this._cleanNewHTML(),this._cleanNewAssets(),this._addNewHTML(),this._addNewScriptsStyles(),this._addNewJS(),e(FLBuilder._contentClass).trigger("fl-builder.layout-rendered"),FLBuilder.hideAjaxLoader(),"undefined"!=typeof this._callback&&this._callback(),FLBuilder.triggerHook("didRenderLayoutComplete")},_removeOldContentAndAssets:function(){this._content&&this._content.empty(),this._oldCss&&this._oldCss.remove(),this._oldJs&&this._oldJs.remove(),this._oldScriptsStyles&&this._oldScriptsStyles.remove()},_cleanNewHTML:function(){if(this._data.scriptsStyles){var t=e("<div>"+this._data.html+"</div>"),i="fl-row",l=this._data.scriptsStyles,s="";this._data.partial&&(i="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),t.find("> *, script").each(function(){e(this).hasClass(i)||(s=e(this).remove(),l+=s[0].outerHTML)}),""!==l&&(l=this._data.partial?'<div class="fl-builder-node-scripts-styles" data-node="'+this._data.nodeId+'">'+l+"<div>":'<div class="fl-builder-node-scripts-styles">'+l+"<div>"),this._data.html=t.html(),this._data.scriptsStyles=l}},_addNewHTML:function(){var t;this._data.partial?this._data.nodeParent?(t=this._data.nodeParent.hasClass("fl-builder-content")?this._data.nodeParent.find(".fl-row"):this._data.nodeParent.hasClass("fl-row-content")?this._data.nodeParent.find(" > .fl-col-group"):this._data.nodeParent.hasClass("fl-col-group")?this._data.nodeParent.find(" > .fl-col"):this._data.nodeParent.find(" > .fl-col-group, > .fl-module"),t=t.filter(":not(.fl-builder-node-clone)"),0===t.length||t.length==this._data.nodePosition?this._data.nodeParent.append(this._data.html):t.eq(this._data.nodePosition).before(this._data.html),this._data.nodeId&&FLBuilder._removeNodeLoadingPlaceholder(e(".fl-node-"+this._data.nodeId))):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.html),FLBuilder.preview&&this._data.nodeId&&this._data.nodeId!=FLBuilder.preview.nodeId&&e(FLBuilder.preview.classes.node).length&&e(FLBuilder.preview.classes.node).html(FLBuilder.preview.elements.node.html())},_cleanNewAssets:function(){var t=this;this._data.html=this._removeDuplicateAssets(this._data.html),this._data.scriptsStyles&&""!==this._data.scriptsStyles&&(this._data.scriptsStyles=this._removeDuplicateAssets(this._data.scriptsStyles)),this._data.partial?e(".fl-builder-node-scripts-styles").each(function(){t._data.html.indexOf("fl-node-"+e(this).data("node"))>-1&&e(this).remove()}):(e("#fl-builder-partial-refresh-js").remove(),e(".fl-builder-node-scripts-styles").remove())},_removeDuplicateAssets:function(t){var i=e("<div>"+t+"</div>"),l="",s=null,o="",n=null,r=window.location,a=r.protocol+"//"+r.hostname+(r.port?":"+r.port:"");return i.find("script").each(function(){l=e(this).attr("src"),"undefined"!=typeof l&&(l=l.replace(a,""),s=e('script[src*="'+l+'"]'),s.length>0&&e(this).remove())}),i.find("link").each(function(){o=e(this).attr("href"),"undefined"!=typeof o&&(o=o.replace(a,""),n=e('link[href*="'+o+'"]'),n.length>0&&e(this).remove())}),i.html()},_addNewScriptsStyles:function(){this._data.scriptsStyles&&""!==this._data.scriptsStyles&&this._body.append(this._data.scriptsStyles)},_addNewJS:function(){setTimeout(e.proxy(function(){this._newJs&&this._head.append(this._newJs)},this),50)},_complete:function(){FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._resizeLayout(),FLBuilder._initMediaElements(),FLBuilderLayout.init(),FLBuilderResponsiveEditing.refreshPreview(),this._body.height("auto")}}}(jQuery),function(e){FLBuilderPreview=function(e){this.type=e.type,this._saveState(),e.layout?FLBuilder._renderLayout(e.layout,function(){this._init(),e.callback&&e.callback()}.bind(this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.prototype={type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_styleSheetMedium:null,_styleSheetResponsive:null,_timeout:null,_loaderTimeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=e(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),this._createSheets(),this._initResponsivePreviews(),this._initDefaultFieldPreviews(),this.type){case"row":this._initRow();break;case"col":this._initColumn();break;case"module":this._initModule()}},_saveSettings:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings");this._savedSettings=FLBuilder._getSettings(t)},_settingsHaveChanged:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=FLBuilder._getSettings(t);return JSON.stringify(this._savedSettings)!=JSON.stringify(i)},_initElementsAndClasses:function(){var t;t="row"==this.type?".fl-row-content-wrap":".fl-"+this.type+"-content",e.extend(this.classes,{settings:".fl-builder-"+this.type+"-settings",settingsHeader:".fl-builder-"+this.type+"-settings .fl-lightbox-header",node:FLBuilder._contentClass+" .fl-node-"+this.nodeId,content:FLBuilder._contentClass+" .fl-node-"+this.nodeId+" > "+t}),e.extend(this.elements,{settings:e(this.classes.settings),settingsHeader:e(this.classes.settingsHeader),node:e(this.classes.node),content:e(this.classes.content)})},_createSheets:function(){this._destroySheets(),this._styleSheet||(this._styleSheet=new FLStyleSheet({id:"fl-builder-preview",className:"fl-builder-preview-style"})),this._styleSheetMedium||(this._styleSheetMedium=new FLStyleSheet({id:"fl-builder-preview-medium",className:"fl-builder-preview-style"})),this._styleSheetResponsive||(this._styleSheetResponsive=new FLStyleSheet({id:"fl-builder-preview-responsive",className:"fl-builder-preview-style"}))},_destroySheets:function(){this._styleSheet&&(this._styleSheet.destroy(),this._styleSheet=null),this._styleSheetMedium&&(this._styleSheetMedium.destroy(),this._styleSheetMedium=null),this._styleSheetResponsive&&(this._styleSheetResponsive.destroy(),this._styleSheetResponsive=null)},updateCSSRule:function(e,t,i){this._styleSheet.updateRule(e,t,i)},delay:function(e,t){this._cancelDelay(),this._timeout=setTimeout(t,e)},_cancelDelay:function(){null!==this._timeout&&clearTimeout(this._timeout)},hexToRgb:function(e){var t=parseInt(e,16),i=t>>16&255,l=t>>8&255,s=255&t;return[i,l,s]},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_initResponsivePreviews:function(){FLBuilder.addHook("responsive-editing-switched",e.proxy(this._responsiveEditingSwitched,this))},_destroyResponsivePreviews:function(){FLBuilder.removeHook("responsive-editing-switched")},_responsiveEditingSwitched:function(e,t){"default"==t?(this._styleSheetMedium.disable(),this._styleSheetResponsive.disable()):"medium"==t?(this._styleSheetMedium.enable(),this._styleSheetResponsive.disable()):"responsive"==t&&(this._styleSheetMedium.disable(),this._styleSheetResponsive.enable())},updateResponsiveCSSRule:function(e,t,i){var l=FLBuilderResponsiveEditing._mode,s="default"==l?"":l.charAt(0).toUpperCase()+l.slice(1);this["_styleSheet"+s].updateRule(e,t,i)},_saveState:function(){var t=FLBuilderConfig.postId,i=e('link[href*="/cache/'+t+'"]').attr("href"),l=e('script[src*="/cache/'+t+'"]').attr("src"),s=e(FLBuilder._contentClass).html();this.state={css:i,js:l,html:s}},preview:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),i=t.attr("data-node"),l=FLBuilder._getSettings(t);FLBuilder._showNodeLoading(i),this._cancelPreview(),this._xhr=FLBuilder.ajax({action:"render_layout",node_id:i,node_preview:l},e.proxy(this._renderPreview,this))},delayPreview:function(t){var i="undefined"==typeof t?[]:e(t.target).closest("tr").find("th"),l=e(".fl-builder-widget-settings .fl-builder-settings-title"),s=e(".fl-builder-settings .fl-lightbox-header"),o=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.svg",n=e('<img class="fl-builder-preview-loader" src="'+o+'" />');this.delay(1e3,e.proxy(this.preview,this)),this._loaderTimeout=setTimeout(function(){e(".fl-builder-preview-loader").remove(),i.length>0?i.append(n):l.length>0?l.append(n):s.length>0&&s.append(n)},1500)},_cancelPreview:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)},_renderPreview:function(t){this._xhr=null,FLBuilder._renderLayout(t,e.proxy(this._renderPreviewComplete,this))},_renderPreviewComplete:function(){this._createSheets(),this._initElementsAndClasses(),null!==this._loaderTimeout&&clearTimeout(this._loaderTimeout),e(".fl-builder-preview-loader").remove(),e(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){return this._settingsHaveChanged()?void FLBuilder._updateNode(this.nodeId,function(){this.clear()}.bind(this)):void this.clear()},cancel:function(){this._cancelDelay(),this._cancelPreview()},clear:function(){this.cancel(),this._destroySheets(),this._destroyResponsivePreviews()},_initNodeTextColor:function(){e.extend(this.elements,{textColor:e(this.classes.settings+" input[name=text_color]"),linkColor:e(this.classes.settings+" input[name=link_color]"),hoverColor:e(this.classes.settings+" input[name=hover_color]"),headingColor:e(this.classes.settings+" input[name=heading_color]")}),this.elements.textColor.on("change",e.proxy(this._textColorChange,this)),this.elements.linkColor.on("change",e.proxy(this._textColorChange,this)),this.elements.hoverColor.on("change",e.proxy(this._textColorChange,this)),this.elements.headingColor.on("change",e.proxy(this._textColorChange,this))},_textColorChange:function(t){var i=this.elements.textColor.val(),l=this.elements.linkColor.val(),s=this.elements.hoverColor.val(),o=this.elements.headingColor.val();l=""===l?i:l,s=""===s?i:s,o=""===o?i:o,this.delay(100,e.proxy(function(){""===i?this.updateCSSRule(this.classes.node,"color","inherit"):this.updateCSSRule(this.classes.node,"color","#"+i),""===l?this.updateCSSRule(this.classes.node+" a","color","inherit"):this.updateCSSRule(this.classes.node+" a","color","#"+l),""===s?this.updateCSSRule(this.classes.node+" a:hover","color","inherit"):this.updateCSSRule(this.classes.node+" a:hover","color","#"+s),""===o?(this.updateCSSRule(this.classes.node+" h1","color","inherit"),this.updateCSSRule(this.classes.node+" h2","color","inherit"),this.updateCSSRule(this.classes.node+" h3","color","inherit"),this.updateCSSRule(this.classes.node+" h4","color","inherit"),this.updateCSSRule(this.classes.node+" h5","color","inherit"),this.updateCSSRule(this.classes.node+" h6","color","inherit"),this.updateCSSRule(this.classes.node+" h1 a","color","inherit"),this.updateCSSRule(this.classes.node+" h2 a","color","inherit"),this.updateCSSRule(this.classes.node+" h3 a","color","inherit"),this.updateCSSRule(this.classes.node+" h4 a","color","inherit"),this.updateCSSRule(this.classes.node+" h5 a","color","inherit"),this.updateCSSRule(this.classes.node+" h6 a","color","inherit")):(this.updateCSSRule(this.classes.node+" h1","color","#"+o),this.updateCSSRule(this.classes.node+" h2","color","#"+o),this.updateCSSRule(this.classes.node+" h3","color","#"+o),this.updateCSSRule(this.classes.node+" h4","color","#"+o),this.updateCSSRule(this.classes.node+" h5","color","#"+o),this.updateCSSRule(this.classes.node+" h6","color","#"+o),this.updateCSSRule(this.classes.node+" h1 a","color","#"+o),this.updateCSSRule(this.classes.node+" h2 a","color","#"+o),this.updateCSSRule(this.classes.node+" h3 a","color","#"+o),this.updateCSSRule(this.classes.node+" h4 a","color","#"+o),this.updateCSSRule(this.classes.node+" h5 a","color","#"+o),this.updateCSSRule(this.classes.node+" h6 a","color","#"+o))},this))},_initNodeBg:function(){e.extend(this.elements,{bgType:e(this.classes.settings+" select[name=bg_type]"),bgColor:e(this.classes.settings+" input[name=bg_color]"),bgColorPicker:e(this.classes.settings+" .fl-picker-bg_color"),bgOpacity:e(this.classes.settings+" input[name=bg_opacity]"),bgImageSrc:e(this.classes.settings+" select[name=bg_image_src]"),bgRepeat:e(this.classes.settings+" select[name=bg_repeat]"),bgPosition:e(this.classes.settings+" select[name=bg_position]"),bgAttachment:e(this.classes.settings+" select[name=bg_attachment]"),bgSize:e(this.classes.settings+" select[name=bg_size]"),bgVideoSource:e(this.classes.settings+" select[name=bg_video_source]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:e(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:e(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:e(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:e(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:e(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:e(this.classes.settings+" input[name=ss_speed]"),
6
  bgSlideshowTrans:e(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:e(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:e(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayColor:e(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayOpacity:e(this.classes.settings+" input[name=bg_overlay_opacity]")}),this.elements.bgType.on("change",e.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",e.proxy(this._bgColorChange,this)),this.elements.bgOpacity.on("keyup",e.proxy(this._bgOpacityChange,this)),this.elements.bgImageSrc.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgRepeat.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgPosition.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgAttachment.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgSize.on("change",e.proxy(this._bgPhotoChange,this)),this.elements.bgVideoServiceUrl.on("change",e.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",e.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",e.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",e.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayColor.on("change",e.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayOpacity.on("keyup",e.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val();this.elements.node.removeClass("fl-row-bg-video"),this.elements.node.removeClass("fl-row-bg-slideshow"),this.elements.node.removeClass("fl-row-bg-parallax"),this.elements.node.find(".fl-bg-video").remove(),this.elements.node.find(".fl-bg-slideshow").remove(),this.elements.content.css("background-image",""),this.updateCSSRule(this.classes.content,{"background-color":"transparent","background-image":"none"}),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.bgImageSrc.trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(t){var i,l,s;""===this.elements.bgColor.val()||isNaN(this.elements.bgOpacity.val())?this.updateCSSRule(this.classes.content,"background-color","transparent"):(i=this.hexToRgb(this.elements.bgColor.val()),l=this.parseFloat(this.elements.bgOpacity.val())/100,s="rgba("+i.join()+", "+l+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",s)},this)))},_bgOpacityChange:function(e){this.elements.bgColor.trigger("change")},_bgPhotoChange:function(e){this.elements.bgImageSrc.val()?this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgImageSrc.val()+")","background-repeat":this.elements.bgRepeat.val(),"background-position":this.elements.bgPosition.val(),"background-attachment":this.elements.bgAttachment.val(),"background-size":this.elements.bgSize.val()}):this.updateCSSRule(this.classes.content,{"background-image":"none"})},_bgVideoChange:function(t){var i=this.elements,l=i.bgVideoSource.val(),s=i.bgVideo.val(),o=i.bgVideoServiceUrl.val(),n="https://www.youtube.com/iframe_api",r="https://player.vimeo.com/api/player.js",a=e("<script>");"video_service"==l&&""!=o?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(o)&&e('script[src*="youtube.com"').length<1?a.attr("src",n):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(o)&&e('script[src*="vimeo.com"').length<1&&a.attr("src",r),a.attr("type","text/javascript").appendTo("head"),this.delay(500,e.proxy(this.preview,this))):""!=s&&this.preview()},_bgSlideshowChange:function(t){var i=this.elements,l=i.bgSlideshowSource.val(),s=i.bgSlideshowPhotos.val(),o=i.bgSlideshowFeedUrl.val(),n=i.bgSlideshowSpeed.val(),r=i.bgSlideshowTransSpeed.val();"wordpress"==l&&""===s||"smugmug"==l&&""===o||isNaN(parseInt(n))||isNaN(parseInt(r))||this.delay(500,e.proxy(this.preview,this))},_bgParallaxChange:function(e){this.elements.bgParallaxImageSrc.val()&&this.updateCSSRule(this.classes.content,{"background-image":"url("+this.elements.bgParallaxImageSrc.val()+")","background-repeat":"no-repeat","background-position":"center center","background-attachment":"fixed","background-size":"cover"})},_bgOverlayChange:function(t){var i,l,s;""===this.elements.bgOverlayColor.val()||isNaN(this.elements.bgOverlayOpacity.val())?(this.elements.node.removeClass("fl-row-bg-overlay"),this.elements.node.removeClass("fl-col-bg-overlay"),this.updateCSSRule(this.classes.content+":after","background-color","transparent")):(i=this.hexToRgb(this.elements.bgOverlayColor.val()),l=this.parseFloat(this.elements.bgOverlayOpacity.val())/100,s="rgba("+i.join()+", "+l+")",this.delay(100,e.proxy(function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay"),this.updateCSSRule(this.classes.content+":after","background-color",s)},this)))},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click")},_initNodeBorder:function(){e.extend(this.elements,{borderType:e(this.classes.settings+" select[name=border_type]"),borderColor:e(this.classes.settings+" input[name=border_color]"),borderColorPicker:e(this.classes.settings+" .fl-picker-border_color"),borderOpacity:e(this.classes.settings+" input[name=border_opacity]")}),this.elements.borderType.on("change",e.proxy(this._borderTypeChange,this)),this.elements.borderColor.on("change",e.proxy(this._borderColorChange,this)),this.elements.borderOpacity.on("keyup",e.proxy(this._borderOpacityChange,this))},_borderTypeChange:function(e){var t=this.elements.borderType.val();this.updateCSSRule(this.classes.content,{"border-style":""===t?"none":t}),this.elements.borderColor.trigger("change"),this.elements.borderTop.trigger("keyup")},_borderColorChange:function(t){var i,l,s;""===this.elements.borderColor.val()||isNaN(this.elements.borderOpacity.val())?this.updateCSSRule(this.classes.content,"border-color","transparent"):(i=this.hexToRgb(this.elements.borderColor.val()),l=parseInt(this.elements.borderOpacity.val())/100,s="rgba("+i.join()+", "+l+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"border-color",s)},this)))},_borderOpacityChange:function(e){this.elements.borderColor.trigger("change")},_initNodeClassName:function(){e.extend(this.elements,{className:e(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",e.proxy(this._classNameChange,this)),this._lastClassName=this.elements.className.val()},_classNameChange:function(e){var t=this.elements.className.val();null!==this._lastClassName&&this.elements.node.removeClass(this._lastClassName),this.elements.node.addClass(t),this._lastClassName=t},_initResponsiveDimensions:function(t){var i={},l=["Top","Bottom","Left","Right"],s=["","Medium","Responsive"],o=this.classes.settings,n="",r="",a=null,d=null;for(a=0;a<l.length;a++)for(d=0;d<s.length;d++)n=t+l[a]+s[d],r=t+"_"+l[a].toLowerCase(),""!=s[d]&&(r+="_"+s[d].toLowerCase()),i[n]=e(o+" input[name="+r+"]"),i[n].on("keyup",e.proxy(this._responsiveDimensionChange,this,t));e.extend(this.elements,i)},_getDimensions:function(e){for(var t=FLBuilderResponsiveEditing._mode,i=["Top","Bottom","Left","Right"],l="default"==t?"":t.charAt(0).toUpperCase()+t.slice(1),s={},o=0;o<i.length;o++)s[i[o].toLowerCase()]=this.elements[e+i[o]+l].val();return this._normalizeDimensionValues(s,e)},_responsiveDimensionChange:function(t){var i=this._getDimensions(t),l={},s="border"==t;e.each(i,function(e,i){l[t+"-"+e+(s?"-width":"")]=i}),this.updateResponsiveCSSRule(this.classes.content,l),this._positionAbsoluteBgs()},_normalizeDimensionValues:function(t,i){var l=this,s=FLBuilderResponsiveEditing._mode,o="default"==s?"":s.charAt(0).toUpperCase()+s.slice(1),i=i.split("-");return"undefined"==typeof i[1]?i[1]="":i[1]=i[1].charAt(0).toUpperCase()+i[1].slice(1),e.map(t,function(e,s){if(e=e.toLowerCase().replace(/[^a-z0-9%.\-]/g,""),""===e){var n=i[0]+s.charAt(0).toUpperCase()+s.slice(1)+i[1]+o,r=l.elements[n].attr("placeholder");r&&(e=r)}null===e||""===e||isNaN(e)||(e=parseFloat(e)+"px"),t[s]=e}),t},_positionAbsoluteBgs:function(){var t=this.elements.node.find(".fl-bg-slideshow"),i=this.elements.node.find(".fl-bg-video"),l=null,s=null,o={top:0,bottom:0,left:0,right:0};(t.length>0||i.length>0)&&(l=this._getDimensions("margin"),s=this._getDimensions("border"),e.map(o,function(e,t){l[t]&&s[t]?o[t]="calc("+l[t]+"+"+s[t]+")":l[t]?o[t]=l[t]:s[t]&&(o[t]=s[t])}),t.length>0&&(this.updateCSSRule(this.classes.node+" .fl-bg-slideshow",o),FLBuilder._resizeLayout()),i.length>0&&this.updateCSSRule(this.classes.node+" .fl-bg-video",o))},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),contentWidth:e(this.classes.settings+" select[name=content_width]"),maxContentWidth:e(this.classes.settings+" input[name=max_content_width]"),height:e(this.classes.settings+" select[name=full_height]"),align:e(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("keyup",e.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.align.on("change",e.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeBorder(),this._initResponsiveDimensions("border"),this._initResponsiveDimensions("margin"),this._initResponsiveDimensions("padding")},_rowWidthChange:function(e){var t=this.elements.node,i=this.elements.maxContentWidth.val();"full"==this.elements.width.val()?(t.css("max-width","none"),t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"),""!==i?t.css("max-width",i+"px"):t.css("max-width",FLBuilderConfig.global.row_width+"px"))},_rowHeightChange:function(e){var t=this.elements.node;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val())):t.removeClass("fl-row-full-height")},_rowContentWidthChange:function(e){var t=this.elements.content.find(".fl-row-content"),i=this.elements.maxContentWidth.val();"full"==this.elements.contentWidth.val()?(t.css("max-width","none"),t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"),""!==i?t.css("max-width",i+"px"):t.css("max-width",FLBuilderConfig.global.row_width+"px"))},_rowMaxContentWidthChange:function(e){var t=this.elements.node,i=this.elements.content.find(".fl-row-content"),l=this.elements.maxContentWidth.val();""==l?l=FLBuilderConfig.global.row_width+"px":l+="px","fixed"==this.elements.width.val()&&t.css("max-width",l),"fixed"==this.elements.contentWidth.val()&&i.css("max-width",l)},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),columnHeight:e(this.classes.settings+" select[name=equal_height]"),columnAlign:e(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:e(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("keyup",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",e.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",e.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeBorder(),this._initResponsiveDimensions("border"),this._initResponsiveDimensions("margin"),this._initResponsiveDimensions("padding")},_colSizeChange:function(){var t=8,i=100-t,l=parseFloat(this.elements.size.val()),s=this.elements.node.prev(".fl-col"),o=this.elements.node.next(".fl-col"),n=0===o.length?s:o,r=this.elements.node.siblings(".fl-col"),a=0;0===r.length||isNaN(l)||(r.each(function(){e(this).data("node")!=n.data("node")&&(i-=parseFloat(e(this)[0].style.width),a+=parseFloat(e(this)[0].style.width))}),l<t&&(l=t),l>i&&(l=i),n.css("width",100-a-l+"%"),this.elements.node.css("width",l+"%"))},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initResponsiveDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var e=_.isUndefined(e)?this.elements.settings.find(".fl-field"):e,t=null,i=null,l=0;l<e.length;l++)t=e.eq(l),i=t.data("preview"),"refresh"==i.type&&this._initFieldRefreshPreview(t),"text"==i.type&&this._initFieldTextPreview(t),"css"==i.type&&this._initFieldCSSPreview(t),"widget"==i.type&&this._initFieldWidgetPreview(t),"font"==i.type&&this._initFieldFontPreview(t)},_initFieldRefreshPreview:function(t){var i=t.data("type"),l=t.data("preview"),s=e.proxy(this.delayPreview,this);switch(i){case"text":t.find("input[type=text]").on("keyup",s);break;case"textarea":t.find("textarea").on("keyup",s);break;case"select":t.find("select").on("change",s);break;case"color":t.find(".fl-color-picker-value").on("change",s);break;case"photo":t.find("select").on("change",s);break;case"multiple-photos":t.find("input").on("change",s);break;case"photo-sizes":t.find("select").on("change",s);break;case"video":t.find("input").on("change",s);break;case"multiple-audios":t.find("input").on("change",s);break;case"icon":t.find("input").on("change",s);break;case"form":t.delegate("input","change",s);break;case"editor":this._addTextEditorCallback(t,l);break;case"code":t.find("textarea").on("change",s);break;case"post-type":t.find("select").on("change",s);break;case"suggest":t.find(".as-values").on("change",s),t.find("select").on("change",s);break;case"unit":t.find("input[type=number]").on("keyup",s);break;case"ordering":t.find("input[type=hidden]").on("change",s)}},_initFieldTextPreview:function(t){var i=t.data("type"),l=t.data("preview"),s=e.proxy(this._previewText,this,l);switch(i){case"text":t.find("input[type=text]").on("keyup",s);break;case"unit":t.find("input[type=number]").on("keyup",s);break;case"textarea":t.find("textarea").on("keyup",s);break;case"code":t.find("textarea").on("change",s);break;case"editor":this._addTextEditorCallback(t,l)}},_previewText:function(t,i){var l=this.elements.node.find(t.selector),s=e("<div>"+e(i.target).val()+"</div>");l.length>0&&(s.find("script").remove(),l.html(s.html()))},_previewTextEditor:function(t,i,l){var s=this.elements.node.find(t.selector),o="undefined"!=typeof tinyMCE?tinyMCE.get(i):null,n=e("#"+i),r="";s.length>0&&(r=e(o&&"none"==n.css("display")?"<div>"+o.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+n.val()+"</div>":"<div>"+switchEditors.wpautop(n.val())+"</div>"),r.find("script").remove(),s.html(r.html()))},_addTextEditorCallback:function(t,i){var l=t.find("textarea.wp-editor-area").attr("id"),s=null;if("refresh"==i.type)s=e.proxy(this.delayPreview,this);else{if("text"!=i.type)return;s=e.proxy(this._previewTextEditor,this,i,l)}e("#"+l).on("keyup",s),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(l),editor.on("change",s),editor.on("keyup",s))},_initFieldFontPreview:function(t){var i=t.data("type"),l=t.data("preview");l.id=t.attr("id");var s=e.proxy(this._previewFont,this,l);"font"==i&&t.find(".fl-font-field").on("change","select",s)},_previewFont:function(t,i){var l=e(i.delegateTarget),s=l.find(".fl-font-field-font"),o=e(s).find(":selected"),n=o.parent().attr("label"),r=l.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector);"Google"==n&&this._buildFontStylesheet(a,s.val(),r.val()),"Default"==s.val()?(this.updateCSSRule(d,"font-family",""),this.updateCSSRule(d,"font-weight","")):(this.updateCSSRule(d,"font-family",s.val()),this.updateCSSRule(d,"font-weight",r.val()))},_buildFontStylesheet:function(t,i,l){var s=FLBuilderConfig.googleFontsUrl,o="",n={},r={};n[i]=[l],FLBuilderPreview._fontsList[t]=n,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var i=t[e];r[e]=r[e]||[],i=i.filter(function(t){return r[e].indexOf(t)<0}),r[e]=r[e].concat(i)})}),e.each(r,function(e,t){o+=e+":"+t.join()+"|"}),o=s+o.slice(0,-1).replace(" ","+"),e("#fl-builder-google-fonts-preview").length<1?e("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",o).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",o)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if("undefined"!=typeof t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,i){switch(t.data("type")){case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,i));break;case"unit":t.find("input[type=number]").on("keyup",e.proxy(this._previewCSS,this,i));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,i));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColor,this,i))}},_previewCSS:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),s=t.property,o="undefined"==typeof t.unit?"":t.unit,n=e(i.target),r=n.val();"%"==o?r=parseInt(r)/100:""!==r&&(r+=o),n.closest(".fl-field-responsive-setting").length?this.updateResponsiveCSSRule(l,s,r):this.updateCSSRule(l,s,r)},_previewColor:function(t,i){var l=this._getPreviewSelector(this.classes.node,t.selector),s=e(i.target),o=s.val(),n=""===o?"inherit":"#"+o;/^rgb/.test(o.replace(/\s+/g,""))&&(n=o),s.closest(".fl-field-responsive-setting").length?this.updateResponsiveCSSRule(l,t.property,n):this.updateCSSRule(l,t.property,n)},_initFieldWidgetPreview:function(t){var i=e.proxy(this.delayPreview,this);t.find("input").on("keyup",i),t.find("input[type=checkbox]").on("click",i),t.find("textarea").on("keyup",i),t.find("select").on("change",i)},_getPreviewSelector:function(e,t){for(var i="",l=t.split(","),s=0;s<l.length;s++)l[s].indexOf("{node}")>-1?i=l[s].replace("{node}",e):i+=e+" "+l[s],s!=l.length-1&&(i+=", ");return i}}}(jQuery),function(e){var t={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+[^\}]+\}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^\/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,i.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var t=e("link"),i=null,l=null,s=null,o=null,n=!1,r=0,a=0;r<t.length;r++)if(i=t[r],l=i.href,s=i.media,o=i.rel&&"stylesheet"===i.rel.toLowerCase(),n=!1,l&&o){for(a=0;a<this.ignored.length;a++)if(l.indexOf(this.ignored[a])>-1){n=!0;break}if(n)continue;for(a=0;a<this.reparsed.length;a++)if(l.indexOf(this.reparsed[a])>-1){this.sheets[l]=null;break}void 0!==this.sheets[l]&&this.sheets[l]||this.queue.push({link:t.eq(r),href:l,media:s})}return this.queue.length},runQueue:function(){var t;this.queue.length?(t=this.queue.shift(),e.get(t.href,e.proxy(function(e){this.parse(e,t),this.runQueue()},this))):this.applyStyles()},parse:function(e,t){var i=this.regex,l=e.replace(i.comments,"").replace(i.keyframes,"").match(i.media),s=l&&l.length||0,o=!s&&t.media,n=null,r=null,a=null,d="",u=0,c=0;for(l?d=e.replace(i.media,""):o&&"all"!=t.media?s=1:d=e,this.sheets[t.href]={link:t.link,href:t.href,link:t.link,all:d,queries:[]},u=0;u<s;u++)for(o?(n=t.media,e=this.convertURLs(e,t.href)):(n=l[u].match(i.findStyles)&&RegExp.$1,e=RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),r=n.split(","),c=0;c<r.length;c++)n=r[c],a=n.split("(")[0].match(i.only)&&RegExp.$2,"print"!=a&&(n.replace(i.minmaxwh,"").match(i.other)||this.sheets[t.href].queries.push({minw:n.match(i.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:n.match(i.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:e}))},applyStyles:function(){var t=e("head"),i=null,l=null,s=null,o=null,n=null,r=null,a=null,d=null,u=!1;this.clearStyles();for(o in this.sheets)if(i="",l=e("<style></style>"),s=this.sheets[o],s.queries.length&&this.width){for(i+=s.all,r=0;r<s.queries.length;r++)n=s.queries[r],a=n.minw,d=n.maxw,u=!1,a&&(a=parseFloat(a)*(a.indexOf("em")>-1?this.getEmPxValue():1),this.width>=a&&(i+=n.styles,u=!0)),d&&!u&&(d=parseFloat(d)*(d.indexOf("em")>-1?this.getEmPxValue():1),this.width<=d&&(i+=n.styles));this.styles.push(l),t.append(l),l.html(i),s.link.remove()}},clearStyles:function(){var t=e("head"),i=null,l=this.styles.slice(0);this.styles=[];for(i in this.sheets)this.sheets[i].link.parent().length||t.append(this.sheets[i].link);setTimeout(function(){for(var e=0;e<l.length;e++)l[e].empty(),l[e].remove()},50)},convertURLs:function(e,t){return t=t.substring(0,t.lastIndexOf("/")),t.length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=null,t=window.document,i=t.documentElement,l=t.body,s=t.createElement("div"),o=i.style.fontSize,n=l&&l.style.fontSize,r=!1;return s.style.cssText="position:absolute;font-size:1em;width:1em",l||(l=r=t.createElement("body"),l.style.background="none"),i.style.fontSize="100%",l.style.fontSize="100%",l.appendChild(s),r&&i.insertBefore(l,i.firstChild),e=parseFloat(s.offsetWidth),r?i.removeChild(l):l.removeChild(s),i.style.fontSize=o,n?l.style.fontSize=n:l.style.fontSize="",this.emPxValue=e,e}},i={_functions:null,update:function(){var e;if(!this._functions){this._functions={};for(e in l)this._functions[e]=jQuery.fn[e]}if(t.width)for(e in l)jQuery.fn[e]=l[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},l={width:function(l){return void 0!=l?i._functions.width.call(this,l):e.isWindow(this[0])?t.width:i._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){t.ignore(e)},reparse:function(e){t.reparse(e)},update:function(e,i){t.update(e,i)}}}(jQuery),function(e){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(){var t;e(".fl-responsive-preview").length&&"default"!=this._mode&&("responsive"==this._mode?(t=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(t)):"medium"==this._mode&&(t=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(t)),FLBuilder._resizeLayout())},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("responsive-editing-switched",this._previewSpacingFields),FLBuilder.addHook("settings-form-init",this._initSettingsForms),FLBuilder.addHook("settings-lightbox-closed",this._clearPreview),e("body").delegate(".fl-field-responsive-toggle","click",this._settingToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,"fl-theme-builder","/wp-includes/","/wp-admin/"]),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css?",FLBuilderConfig.postId+"-layout-draft-partial.css?",FLBuilderConfig.postId+"-layout-preview.css?",FLBuilderConfig.postId+"-layout-preview-partial.css?"])},_switchTo:function(t,i){var l=e("body"),s=e(FLBuilder._contentClass),o=e(".fl-responsive-preview"),n=e(".fl-responsive-preview-mask"),r=e(".fl-content-placeholder"),a=null;if(FLBuilderResponsiveEditing._mode=t,"default"==t){if(0===r.length)return;r.after(s),r.remove(),o.remove(),n.remove()}else 0===o.length?(s.after('<div class="fl-content-placeholder"></div>'),l.prepend(wp.template("fl-responsive-preview")()),e(".fl-responsive-preview").addClass("fl-preview-"+t),e(".fl-responsive-preview-content").append(s)):(o.removeClass("fl-preview-responsive fl-preview-medium"),o.addClass("fl-preview-"+t));"responsive"==t?(a=FLBuilderConfig.global.responsive_breakpoint>=320?320:FLBuilderConfig.global.responsive_breakpoint,s.width(a),FLBuilderSimulateMediaQuery.update(a,i)):"medium"==t?(a=FLBuilderConfig.global.medium_breakpoint>=769?769:FLBuilderConfig.global.medium_breakpoint,s.width(a),FLBuilderSimulateMediaQuery.update(a,i)):(s.width(""),FLBuilderSimulateMediaQuery.update(null,i)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("responsive-editing-switched",t)},_setContentBackgroundColor:function(){var t=e(FLBuilder._contentClass),i=e(".fl-responsive-preview"),l=e(".fl-content-placeholder"),s=l.parents(),o="#fff",n=0;if(0===i.length)t.css("background-color","");else{for(;n<s.length&&(o=s.eq(n).css("background-color"),"rgba(0, 0, 0, 0)"==o);n++);t.css("background-color",o)}},_switchToAndScroll:function(t){var i=e(".fl-builder-settings").data("node"),l=void 0===i?void 0:e(".fl-node-"+i);FLBuilderResponsiveEditing._switchTo(t,function(){void 0!==l&&l&&setTimeout(function(){var t=e(window),i=e(".fl-responsive-preview-content");!i.length||t.height()<i.height()?e("html, body").animate({scrollTop:l.offset().top-100},250):scrollTo(0,0)},250)})},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_settingToggleClicked:function(){var t=e(this),i=t.data("mode");i="default"==i?"medium":"medium"==i?"responsive":"default",FLBuilderResponsiveEditing._switchAllSettingsTo(i),t.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_switchAllSettingsTo:function(t){var i="dashicons-desktop dashicons-tablet dashicons-smartphone";e(".fl-field-responsive-toggle").removeClass(i),e(".fl-field-responsive-setting").hide(),i="default"==t?"dashicons-desktop":"medium"==t?"dashicons-tablet":"dashicons-smartphone",e(".fl-field-responsive-toggle").addClass(i).data("mode",t),e(".fl-field-responsive-setting-"+t).css("display","inline-block"),FLBuilderResponsiveEditing._switchToAndScroll(t)},_initSettingsForms:function(){var e=FLBuilderResponsiveEditing;Number(FLBuilderConfig.global.responsive_enabled)&&(e._initFields("dimension","input","keyup",e._spacingFieldKeyup,["margin","padding"]),e._initFields("dimension","input","keyup",e._textFieldKeyup),e._initFields("unit","input","keyup",e._textFieldKeyup)),e._switchAllSettingsTo(e._mode)},_initFields:function(t,i,l,s,o){for(var n=e(".fl-builder-settings"),r=n.find(".fl-field").has(".fl-field-responsive-setting"),a=null,d=null,u=0;u<r.length;u++)a=r.eq(u),d=a.attr("id").replace("fl-field-",""),"object"==typeof o&&e.inArray(d,o)<0||t==a.attr("data-type")&&void 0===a.attr("data-responsive-init")&&(a.find(".fl-field-responsive-setting-default "+i).on(l,s),a.find(".fl-field-responsive-setting-medium "+i).on(l,s),a.find(".fl-field-responsive-setting-responsive "+i).on(l,s),a.find(".fl-field-responsive-setting-default "+i).trigger(l),a.attr("data-responsive-init",1))},_getFields:function(t,i){var l=e(t).closest(".fl-field");return{"default":l.find(".fl-field-responsive-setting-default "+i),medium:l.find(".fl-field-responsive-setting-medium "+i),responsive:l.find(".fl-field-responsive-setting-responsive "+i)}},_textFieldKeyup:function(){var e=FLBuilderResponsiveEditing._getFields(this,"input");e["default"].each(function(t){var i=e["default"].eq(t).attr("placeholder"),l=e["default"].eq(t).val(),s=e.medium.eq(t).val();""==l?e.medium.eq(t).attr("placeholder",void 0===i?"":i):e.medium.eq(t).attr("placeholder",l),""==s?e.responsive.eq(t).attr("placeholder",e.medium.eq(t).attr("placeholder")):e.responsive.eq(t).attr("placeholder",s)})},_spacingFieldKeyup:function(){var t=e(".fl-builder-settings"),i="row",l=e(this).closest(".fl-field").attr("id").replace("fl-field-",""),s=FLBuilderResponsiveEditing._getFields(this,"input"),o=FLBuilderConfig.global,n=null,r=null,a=null,d=null;t.hasClass("fl-builder-row-settings")?i="row":t.hasClass("fl-builder-col-settings")?i="col":t.hasClass("fl-builder-module-settings")&&(i="module"),e.extend(o,{col_margins:0,col_margins_medium:"",col_margins_responsive:"",col_padding:0,col_padding_medium:"",col_padding_responsive:""}),n=i+"_"+l+("margin"==l?"s":""),r=o[n],a=o[n+"_medium"],d=o[n+"_responsive"],s["default"].each(function(e){var t=s["default"].eq(e).attr("name").split("_").pop(),n=s["default"].eq(e).val(),u=s.medium.eq(e).val(),c=(s.responsive.eq(e).val(),null),h=null;""==a&&(""!=n?s.medium.eq(e).attr("placeholder",n):""!=r&&s.medium.eq(e).attr("placeholder",r)),""==d&&("module"==i&&Number(o.auto_spacing)?(c=""==a?Number(r):a,h=""==u?Number(n):u,""!=h&&(h>c||h<0)?s.responsive.eq(e).attr("placeholder",c):""!=h?s.responsive.eq(e).attr("placeholder",h):s.responsive.eq(e).attr("placeholder",c)):(!Number(o.auto_spacing)||"padding"==l&&"top|bottom".indexOf(t)>-1)&&(""!=u?s.responsive.eq(e).attr("placeholder",u):""!=a?s.responsive.eq(e).attr("placeholder",a):""!=n?s.responsive.eq(e).attr("placeholder",n):""!=r&&s.responsive.eq(e).attr("placeholder",r)))})},_previewSpacingFields:function(){var t=FLBuilderResponsiveEditing._mode,i=e(".fl-builder-settings");0!==i.length&&void 0!==i.attr("data-node")&&i.find(".fl-field").has(".fl-field-responsive-setting").each(function(){var e=FLBuilderResponsiveEditing._getFields(this,"input"),i=e.responsive.closest(".fl-field").data("preview");"refresh"!=i.type&&e[t].trigger("keyup")})}},e(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(e){var t={init:function(){var t=e("body");t.delegate(".fl-builder-service-select","change",this._serviceChange),t.delegate(".fl-builder-service-connect-button","click",this._connectClicked),t.delegate(".fl-builder-service-account-select","change",this._accountChange),t.delegate(".fl-builder-service-account-delete","click",this._accountDeleteClicked),t.delegate(".fl-builder-campaign-monitor-client-select","change",this._campaignMonitorClientChange),t.delegate(".fl-builder-mailchimp-list-select","change",this._mailChimpListChange),t.delegate(".fl-builder-activecampaign-list_type-select","change",this._activeCampaignChange)},_startSettingsLoading:function(t){var i=e(".fl-builder-settings"),l=t.closest(".fl-builder-service-settings"),s=e(".fl-builder-service-error");i.append('<div class="fl-builder-loading"></div>'),
7
  l.addClass("fl-builder-service-settings-loading"),s.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),i=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),i.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this),s=l.closest("tr"),o=l.val();s.siblings("tr.fl-builder-service-account-row").remove(),s.siblings("tr.fl-builder-service-connect-row").remove(),s.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==o&&(t._startSettingsLoading(l),FLBuilder.ajax({action:"render_service_settings",node_id:i,service:o},t._serviceChangeComplete))},_serviceChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-select-row");o.after(l.html),t._addAccountDelete(s),t._finishSettingsLoading()},_connectClicked:function(){for(var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-connect-row"),n=l.find(".fl-builder-service-connect-input"),r=null,a=null,d=0,u={action:"connect_service",node_id:i,service:s.val(),fields:{}};d<n.length;d++)r=n.eq(d),a=r.attr("name"),u.fields[a]=r.val();o.hide(),t._startSettingsLoading(s),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-select-row"),n=s.find(".fl-builder-service-select"),r=s.find(".fl-builder-service-account-row"),a=s.find(".fl-builder-service-account-select"),d=s.find(".fl-builder-service-connect-row");l.error?(d.show(),0===a.length?n.after('<div class="fl-builder-service-error">'+l.error+"</div>"):a.after('<div class="fl-builder-service-error">'+l.error+"</div>")):(d.remove(),r.remove(),o.after(l.html)),t._addAccountDelete(s),t._finishSettingsLoading()},_accountChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=l.find(".fl-builder-service-connect-row"),r=l.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=o.val(),u=null;n.remove(),r.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:i,service:s.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:i,service:s.val(),account:d}),u&&(t._startSettingsLoading(s),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(l)},_accountChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-account-row");o.after(l.html),t._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");t.length>0&&(e.find(".fl-builder-service-account-delete").remove(),""!==t.val()&&"add_new_account"!=t.val()&&t.after('<a href="javascript:void(0);" class="fl-builder-service-account-delete">'+FLBuilderStrings.deleteAccount+"</a>"))},_accountDeleteClicked:function(){var i=e(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:l.val(),account:s.val()},t._accountDeleteComplete),t._startSettingsLoading(s))},_accountDeleteComplete:function(){var i=e(".fl-builder-service-settings-loading"),l=i.find(".fl-builder-service-select");t._finishSettingsLoading(),l.trigger("change")},_campaignMonitorClientChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=e(this),r=l.find(".fl-builder-service-list-select"),a=n.val();0!==r.length&&r.closest("tr").remove(),""!==a&&(t._startSettingsLoading(s),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:s.val(),account:o.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-campaign-monitor-client-select");o.closest("tr").after(l.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=l.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==n.val()&&(t._startSettingsLoading(s),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:s.val(),account:o.val(),list_id:n.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-list-select");o.closest("tr").after(l.html),t._finishSettingsLoading()},_activeCampaignChange:function(){var i=e(".fl-builder-settings").data("node"),l=e(this).closest(".fl-builder-service-settings"),s=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select"),n=l.find(".fl-builder-service-list-select");list_type=l.find('select[name="list_type"]'),0!==n.length&&n.closest("tr").remove(),""!==list_type.val()&&(t._startSettingsLoading(s),FLBuilder.ajax({action:"render_service_fields",node_id:i,service:s.val(),account:o.val(),list_type:list_type.val()},t._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(i){var l=JSON.parse(i),s=e(".fl-builder-service-settings-loading"),o=s.find(".fl-builder-service-field-row");o.after(l.html),t._finishSettingsLoading()}};e(function(){t.init()})}(jQuery),function(e){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var t={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fa fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row:first-of-type",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row:first-of-type .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),e(".fl-row").eq(0).trigger("mouseenter"),e(".fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-templates-button",placement:"bottom",title:FLBuilderStrings.tourTemplatesButtonTitle,content:FLBuilderStrings.tourTemplatesButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-tools-button",placement:"bottom",title:FLBuilderStrings.tourToolsButtonTitle,content:FLBuilderStrings.tourToolsButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,element:".fl-builder-done-button",placement:"bottom",title:FLBuilderStrings.tourDoneButtonTitle,content:FLBuilderStrings.tourDoneButton,onShow:function(){FLBuilderTour._dimSection("body")}},{animation:!1,orphan:!0,backdrop:!0,title:FLBuilderStrings.tourFinishedTitle,content:FLBuilderStrings.tourFinished,template:'<div class="popover" role="tooltip"> <div class="arrow"></div> <i class="fa fa-times" data-role="end"></i> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="end">'+FLBuilderStrings.tourEnd+"</button> </div> </div>"}]};return FLBuilderConfig.lite?t.steps.shift():"disabled"==FLBuilderConfig.enabledTemplates?t.steps.shift():"fl-builder-template"==FLBuilderConfig.postType&&t.steps.shift(),t},_onStart:function(){var t=e("body");t.scrollTop(0),t.append('<div class="fl-builder-tour-mask"></div>'),0===e(".fl-row").length&&"module"!=FLBuilderConfig.userTemplateType&&(e(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-row fl-row-fixed-width fl-row-bg-none"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-fixed-width fl-node-content"> <div class="fl-col-group"> <div class="fl-col" style="width:100%"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text" data-type="rich-text" data-name="Text Editor"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus pellentesque ut lorem non cursus. Sed mauris nunc, porttitor iaculis lorem a, sollicitudin lacinia sapien. Proin euismod orci lacus, et sollicitudin leo posuere ac. In hac habitasse platea dictumst. Maecenas elit magna, consequat in turpis suscipit, ultrices rhoncus arcu. Phasellus finibus sapien nec elit tempus venenatis. Maecenas tincidunt sapien non libero maximus, in aliquam felis tincidunt. Mauris mollis ultricies facilisis. Duis condimentum dignissim tortor sit amet facilisis. Aenean gravida lacus eu risus molestie egestas. Donec ut dolor dictum, fringilla metus malesuada, viverra nunc. Maecenas ut purus ac justo aliquet lacinia. Cras vestibulum elementum tincidunt. Maecenas mattis tortor neque, consectetur dignissim neque tempor nec.</p></div> </div> </div> </div> </div> </div> </div> </div> </div>'),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols())},_onPrev:function(){e(".fl-builder-tour-dimmed").remove()},_onNext:function(){e(".fl-builder-tour-dimmed").remove()},_onEnd:function(){e("body").off("fl-builder.template-selector-loaded"),e(".fl-builder-tour-mask").remove(),e(".fl-builder-tour-dimmed").remove(),e(".fl-builder-tour-demo-content").remove(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(t){e(t).find(".fl-builder-tour-dimmed").remove(),e(t).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(e,t){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),e.fn.textWidth=function(t,i){return e.fn.textWidth.fakeEl||(e.fn.textWidth.fakeEl=e("<span>").hide().appendTo(document.body)),e.fn.textWidth.fakeEl.text(t||this.val()||this.text()).css("font",i||this.css("font")),e.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(t){var i=Object.create(this);return i=e.extend(i,t),e(this).trigger("onCreate"),i}},e.fn.switchClass=function(t,i){return this.each(function(){return e(this).removeClass(function(e,i){var l=[],s=i.split(" ");for(var e in s)s[e].startsWith(t)&&l.push(s[e]);return l.join(" ")}),e(this).addClass(t+i)})};var i={init:function(){t.addHook("cancelTask",this.onCancelTask.bind(this)),t.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),t.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),t.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),t.addHook("endEditingSession",this.onEndEditingSession.bind(this)),t.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(t,i,l){var s=e.proxy(this,"onTriggerKey",t);l?Mousetrap.bindGlobal(i,s):Mousetrap.bind(i,s)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){this.reset();for(var e in FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,i){t.triggerHook(e),i.preventDefault?i.preventDefault():i.returnValue=!1},onCancelTask:function(){return o.isPreviewing?void o.endPreview():s.isShowing?void s.hide():t.ContentPanel.isShowing?void t.ContentPanel.hide():void 0},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){if(t.SaveManager.layoutNeedsPublish()){var e=FLBuilderStrings.savedStatus.hasAlreadySaved;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}else{var e=FLBuilderStrings.savedStatus.nothingToSave;t.SaveManager.showStatusMessage(e),setTimeout(function(){t.SaveManager.resetStatusMessage()},2e3)}},onNextPrevTabShortcut:function(i,l){var s,o,n=e(".fl-lightbox:visible"),r=n.find(".fl-builder-settings-tabs a");n.length>0&&(s=r.filter("a.fl-active"),o="next"==i?s.is(r.last())?r.first():s.next("a"):s.is(r.first())?r.last():s.prev("a"),o.trigger("click")),t._calculateSettingsTabsOverflow(),l.preventDefault()}},l={isShowing:!1,init:function(){this.render(),t.addHook("showKeyboardShortcuts",this.show.bind(this))},render:function(){var t=wp.template("fl-keyboard-shortcuts"),i=FLBuilderConfig.keyboardShortcuts;this.$el=e(t(i)),e("body").append(this.$el),this.$el.find(".dismiss-shortcut-ui").on("click",this.hide.bind(this)),this.$el.on("click",this.hide.bind(this))},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.isShowing=!0)},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.isShowing=!1)},toggle:function(){this.isShowing?this.hide():this.show()}},s=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=e(".fl-builder-publish-actions"),this.$defaultBarButtons=e(".fl-builder-bar-actions"),this.$clickAwayMask=e(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click",this.onActionClicked.bind(this)),t.addHook("triggerDone",this.onDoneTriggered.bind(this));var i=this.hide.bind(this);t.addHook("cancelPublishActions",i),t.addHook("endEditingSession",i),this.$clickAwayMask.on("click",i)},onDoneTriggered:function(){t.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?t._exit():t._exitWithoutRefresh()},show:function(){this.isShowing||t._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,t.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(i){var l=e(i.currentTarget).data("action");switch(l){case"dismiss":this.hide();break;case"discard":this.hide(),o.muteToolbar(),t._discardButtonClicked();break;case"publish":this.hide(),o.muteToolbar(),t._publishButtonClicked(),t._destroyOverlayEvents();break;case"draft":this.hide(),o.muteToolbar(),t._draftButtonClicked();break;default:this.hide(),o.muteToolbar(),t._draftButtonClicked()}t.triggerHook(l+"ButtonClicked")}}),o={isPreviewing:!1,init:function(){this.$el=e("body"),this.$mainToolbar=e(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=e("#wpadminbar"),this.$endPreviewBtn=e(".fl-builder--preview-actions .end-preview-btn"),t.addHook("endEditingSession",this.endEditingSession.bind(this)),t.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=e(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this));var i=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a");i.on("click",this.onClickPageBuilderToolbarLink.bind(this)),e("#wpadminbar a").attr("tabindex","-1");var l=this.restartEditingSession.bind(this);t.addHook("restartEditingSession",l),t.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),t.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),t.addHook("didEnterRevisionPreview",this.hide.bind(this)),t.addHook("didExitRevisionPreview",this.show.bind(this)),t.addHook("didPublishLayout",this.onPublish.bind(this))},endEditingSession:function(){t._destroyOverlayEvents(),t._removeAllOverlays(),t._removeEmptyColHighlights(),t._removeColHighlightGuides(),t._unbindEvents(),e("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),e("body").removeClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex",null),e(t._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(i){t._initTemplateSelector(),t._bindOverlayEvents(),t._highlightEmptyCols(),e("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),e("body").addClass("fl-builder-edit"),e("#wpadminbar a").attr("tabindex","-1"),e(t._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),i.preventDefault()},onClickPageBuilderToolbarLink:function(e){t.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){var e=this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span");e.css("color","#6bc373")},hide:function(){e("html").hasClass("fl-builder-edit")&&(t._unbindEvents(),t._destroyOverlayEvents(),t._removeAllOverlays(),e("html").removeClass("fl-builder-edit"),e("body").removeClass("admin-bar"),this.hideMainToolbar(),t.ContentPanel.hide(),FLBuilderLayout.init(),t.triggerHook("didHideEditingUI"))},show:function(){e("html").hasClass("fl-builder-edit")||(t._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),e("html").addClass("fl-builder-edit"),e("body").addClass("admin-bar"),t.triggerHook("didShowEditingUI"))},beginPreview:function(){t._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),e("html").addClass("fl-builder-preview"),e("html, body").removeClass("fl-builder-edit"),t._removeEmptyColHighlights(),t._removeColHighlightGuides(),t.triggerHook("didBeginPreview"))},endPreview:function(){this.isPreviewing=!1,this.show(),t._highlightEmptyCols(),e("html").removeClass("fl-builder-preview"),e("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),e("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),e("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(t){var i=e(t.target).data("mode");FLBuilderResponsiveEditing._switchTo(i)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),t._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},n={isEditing:!0,init:function(){history.pushState&&(t.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),t.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url),this.isEditing=!1}},r={$row:null,$rowContent:null,row:null,drag:{},init:function(){if(this.userCanResize()){var i=e(t._contentClass);i.delegate(".fl-block-row-resize","mouseenter",this.onDragHandleHover.bind(this)),i.delegate(".fl-block-row-resize","mousedown",this.onDragHandleDown.bind(this))}},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(t){if(!this.drag.isDragging){var i=e(t.target);this.$row=i.closest(".fl-row"),this.$rowContent=this.$row.find(".fl-row-content"),this.row={node:this.$row.data("node"),isFixedWidth:this.$row.hasClass("fl-row-fixed-width"),settings:e(".fl-builder-row-settings[data-node="+this.$row.data("node")+"]")},this.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),this.dragInit()}},onDragHandleDown:function(){e("body").addClass("fl-builder-row-resizing")},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(i,l){var s=e("body"),o=e(l.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),o.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=o.find(".fl-block-col-resize-feedback-left")),o.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=o.find(".fl-block-col-resize-feedback-right")),s.addClass("fl-builder-row-resizing"),t._colResizing=!0,t._destroyOverlayEvents(),t._closePanel()},dragging:function(e,t){var i=t.position.left,l=t.originalPosition.left,s=this.drag.originalWidth,o=0,n=this.drag.edge,r=FLBuilderConfig.rowResize.minAllowedWidth,a=FLBuilderConfig.rowResize.maxAllowedWidth;l!==i&&(FLBuilderConfig.isRtl&&(n="w"==n?"e":"w"),l>i?"w"===n?this.drag.operation="+":this.drag.operation="-":"e"===n?this.drag.operation="+":this.drag.operation="-",o=Math.abs(l-i),"+"===this.drag.operation?this.drag.calculatedWidth=s+2*o:this.drag.calculatedWidth=s-2*o,!1!==r&&this.drag.calculatedWidth<r&&(this.drag.calculatedWidth=r),!1!==a&&this.drag.calculatedWidth>a&&(this.drag.calculatedWidth=a),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+"px").show(),this.row.settings.length&&this.row.settings.find("[name=max_content_width]").val(this.drag.calculatedWidth))},dragStop:function(i,l){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();var s={action:"resize_row_content",node:this.row.node,width:this.drag.calculatedWidth},o=e("body");t.ajax(s),t._bindOverlayEvents(),o.removeClass("fl-builder-row-resizing"),e(".fl-block-overlay").each(function(){t._buildOverlayOverflowMenu(e(this))}),e("body").removeClass("fl-builder-row-resizing"),setTimeout(function(){t._colResizing=!1},50),t.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},a={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips();var e=this.$el.find(".fl-builder-content-panel-button");e.on("click",t._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",t._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",t._upgradeClicked)},render:function(t){var i=e(this.template(t));this.$el=i,this.el=i.get(0),o.$mainToolbar=this.$el,e("body").prepend(i),e("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),e(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})}};e(function(){t.ContentPanel.init(),FLBuilderConfig.simpleUi||t.MainMenu.init(),FLBuilderConfig.showToolbar?(a.init(),t.ContentPanel.alignPanelArrow()):e("html").addClass("fl-builder-no-toolbar"),i.init(),l.init(),o.init(),n.init(),r.init(),s.init(),t.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing")},hide:function(){this.$el.removeClass("is-showing")},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),l=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){this.template=wp.template(this.templateName),e("body").prepend(this.template(this)),this.$el=e(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html("");for(var i in FLBuilderConfig.mainMenu){this.renderPanel(i);var l="render"+i.charAt(0).toUpperCase()+i.slice(1)+"Panel";t.addHook(l,e.proxy(function(){this.renderPanel(i)},this))}e("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=e(".fl-builder-bar-title"),e("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var n=this.hide.bind(this);t.addHook("didShowPublishActions",n),t.addHook("didBeginSearch",n),t.addHook("didBeginPreview",n),t.addHook("didShowContentPanel",n),t.addHook("endEditingSession",n),t.addHook("didFocusSearchBox",n),t.addHook("didEnterRevisionPreview",n),t.addHook("didFailSettingsSave",n),t.addHook("showKeyboardShortcuts",n),this.$mask=e(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",n),s.init(),o.init()},renderPanel:function(t){var l,s,o;e('fl-builder--main-menu-panel-view[data-name="'+t+'"]').remove(),l=FLBuilderConfig.mainMenu[t],l.handle=t,s=i.create(l),s.init(),o=e(s.render()),s.$el=o,e(".fl-builder--main-menu-panel-views").append(o),s.bindEvents(),s.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),s.isRootView&&(this.rootView=s,this.currentView=s),this.views[t]=s},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),t.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(i){var l=e(i.currentTarget),s=l.data("type");switch(s){case"view":var o=l.data("view");this.goToView(o);break;case"event":var n=l.data("event");t.triggerHook(n,l);break;case"link":}},goToView:function(e){var t=this.currentView,i=this.views[e];t.transitionOut(),i.transitionIn(),this.currentView=i,this.viewNavigationStack.push(t)},goToPreviousView:function(){var t=this.currentView,i=this.viewNavigationStack.pop();t.transitionOut(!0),i.transitionIn(!0),this.currentView=i,e(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}});t.MainMenu=l;var s={init:function(){t.addHook("saveTemplate",this.saveTemplate.bind(this)),t.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),t.addHook("duplicateLayout",this.duplicateLayout.bind(this)),t.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),t.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),t.addHook("toggleUISkin",this.toggleUISkin.bind(this)),t.addHook("clearLayoutCache",this.clearLayoutCache.bind(this))},saveTemplate:function(){t._saveUserTemplateClicked(),l.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),l.hide()},duplicateLayout:function(){t._duplicateLayoutClicked(),l.hide()},showGlobalSettings:function(){t._globalSettingsClicked(),l.hide()},showLayoutSettings:function(){t._layoutSettingsClicked(),l.hide()},clearLayoutCache:function(){t.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),t.showAjaxLoader(),l.hide()},toggleUISkin:function(i){e('a[data-event="toggleUISkin"]');if(e("body").hasClass("fl-builder-ui-skin--light"))var l="light",s="dark";if(e("body").hasClass("fl-builder-ui-skin--dark"))var l="dark",s="light";e("body").removeClass("fl-builder-ui-skin--"+l).addClass("fl-builder-ui-skin--"+s),t.ajax({action:"save_ui_skin",skin_name:s})}},o={init:function(){t.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),l.hide()}}}(jQuery,FLBuilder),function(e,t){var i=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(i){this.categorySelector=a.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),e(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));i.views;if(this.initViews(i.views),0===Object.keys(this.views).length){var l={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"};this.addView(l)}if(!this.activeView){var s=Object.keys(this.views)[0],l=this.views[s];this.activeView=l}this.defaultView=this.activeView,e(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),e(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),t.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){var i=e[t];this.categorySelector.addItem(i),"separator"!==i.type&&this.addView(i)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=s;break;case"rows":t=o;break;case"templates":t=n;break;case"saved":t=r;break;default:t=l}_.isNull(this.viewController)||_.isUndefined(this.viewController)||(t=window[this.viewController]);var i=t.create(e),a=i.handle;i.init(),this.views[a]=i,i.isShowing&&(this.activeView=i)},renderView:function(e){if(this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),_.isObject(e))var i=e;else var i=this.views[e];if(_.isObject(i)&&_.isFunction(i.render)){var l=i.render();this.$el.find(".fl-nanoscroller-content").html(l),this.activeView=i,t._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0)}},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){e(this.activeView).trigger("onBeforeShow"),
8
  this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e=this.panel.$groupSelect,t=this.panel.$el.find(".fl-builder-panel-search");if(this.isSearchEnabled?t.show():t.hide(),Object.keys(this.views).length>1&&!_.isUndefined(this.categorySelector)){var i=this.categorySelector.render();this.panel.$el.find(".fl-builder-content-group-select");e.html(i),e.show(),this.panel.$el.removeClass("single-view")}else e.hide(),t.hide(),this.panel.$el.addClass("single-view")},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=t.Search.byQuery(this.query)),e},render:function(){e(this).trigger("beforeRender");var t=this;t=this.filterTemplateData(t);var i=e(this.template(t));return this.$el=i,e(this).trigger("afterRender"),i},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),s=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),o=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),n=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=e(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(t){var i=e(t.currentTarget),l=i.val(),s=i.siblings("button");""!==l?s.show():s.hide()},onSaveButtonClick:function(i){var l=e(i.currentTarget),s=l.siblings('input[name="template-name"]').val(),o=l.siblings('input[name="template-category"]').val(),n={name:s,category:o};""!==s&&t.ajax({action:"save_user_template",settings:n},t._saveUserTemplateSettingsComplete)},onTemplateClick:function(i){var l=e(i.currentTarget),s=l.data("id"),o=l.data("type");t._requestTemplateInsert(s,o)}}),r=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=t.Search.byQuery({kind:"template",type:"user",content:["module","row"]}),e}}),a=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),e(this).on("afterRender",this.bindEvents.bind(this)),e(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var t=e(this.template(this));return this.$el=t,e(this).trigger("afterRender"),t},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t;t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle,this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(t){var i=e(t.target).data("view");e(this).trigger("categorySelected",i)}});t.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e=FLBuilderConfig.panelData.tabs;for(var l in e){var s=e[l];if(n=i.create(s),n.panel=this,n.views={},n.init(s),this.tabs[l]=n,n.isShowing&&(this.activeTab=n),!this.activeTab){var o=Object.keys(this.tabs)[0],n=this.tabs[o];n.isShowing=!0,this.activeTab=n}}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),t.triggerHook("contentPanelDidInit")}},render:function(){e("body").prepend(this.template(this)),this.$el=e(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),e(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),t.addHook("showContentPanel",this.show.bind(this)),t.addHook("showModules",this.show.bind(this,"modules")),t.addHook("showRows",this.show.bind(this,"rows")),t.addHook("showTemplates",this.show.bind(this,"templates")),t.addHook("showSaved",this.show.bind(this,"saved")),t.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this);t.addHook("hideContentPanel",e),t.addHook("didShowLightbox",e),t.addHook("didShowPublishActions",e),t.addHook("didBeginSearch",e),t.addHook("didInitDrag",e),t.addHook("didOpenMainMenu",e),t.addHook("didApplyTemplate",e);var i=this.toggleShowHide.bind(this);t.addHook("toggleContentPanel",i),t.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var t,i,l=this.$el,s=null,o=this.$el.find(".fl-builder--panel-arrow"),n=e(".fl-builder-content-panel-button"),r=this.$el.css("animation-duration");if(0!=n.length){this.$el.css("animation-duration","0s"),this.show(),s=l[0].getBoundingClientRect(),t=o[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",r),buttonOffset=n[0].getBoundingClientRect();var a=buttonOffset.x+buttonOffset.width/2;i=a<s.x?20:a-s.x-t.width/2,o.css({right:"auto",left:i+"px"})}},show:function(i){t.triggerHook("willShowContentPanel"),"undefined"!=typeof i&&this.showTab(i),this.isShowing||t._triggerSettingsSave(!1,!0)&&(e("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,e(this).trigger("onShow"),t.triggerHook("didShowContentPanel"))},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(e("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,e(this).trigger("onHide"),t.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(t){var i=this.tabs[t];_.isObject(i)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),i.show(),this.$tabs.filter('[data-tab="'+i.handle+'"]').addClass("is-showing"),this.activeTab=i,e(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(t){e(t.currentTarget).blur()},onTabItemClick:function(t){var i=e(t.target),l=i.data("tab");this.showTab(l)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),e(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),e(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),e(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var i=this.$searchInput.val();if(""!==i){var l=t.Search.byTerm(i);""!=l.term?this.showSearchResults(l):this.hideSearchResults()}else this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(i){if(i.total>0){var l=e(this.renderSearchResults(i));this.$searchPanel.html(l),t._initSortables()}else{var l=e(this.renderNoResults(i));this.$searchPanel.html(l)}e("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){e("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(e){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(t,i){var l=FLBuilderSettingsConfig.forms,s=FLBuilderSettingsConfig.modules,o={type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null};if(t=e.extend(o,t),i=void 0===i?function(){}:i,t.id){if("general"===t.type&&void 0!==l[t.id])t=e.extend(!0,t,l[t.id]);else{if("module"!==t.type||void 0===s[t.id])return;t=e.extend(!0,t,s[t.id])}this.config=t,this.renderLightbox(t)&&(t.legacy||!this.renderLegacySettings(t,i)?this.renderComplete(t,i):this.showLightboxLoader())}},renderLightbox:function(t){var i=wp.template("fl-builder-settings"),l=FLBuilder._lightbox._node.find("form.fl-builder-settings");e(".fl-lightbox-wrap[data-parent]");if(t.nodeId&&t.nodeId===l.data("node")&&!t.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(t.lightbox)t.lightbox.setContent(i(t));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder._setLightboxContent(i(t))}return!0},renderComplete:function(t,i){var l=e(".fl-builder-settings:visible");setTimeout(function(){t.legacy&&this.renderLegacySettingsComplete(t.legacy),i(),FLBuilder._initSettingsForms(),t.rules&&FLBuilder._initSettingsValidation(t.rules),t.preview&&(FLBuilder.preview=new FLBuilderPreview(t.preview)),t.helper&&t.helper.init(),l.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettings(l))}.bind(this),1)},renderFields:function(t,i){var l=wp.template("fl-builder-settings-row"),s="",o=null,n=null,r=null,a=!1,d=null,u=["dimension","unit"],i=i?i:this.config.settings,c=FLBuilderConfig.global;for(n in t)o=t[n],a=!!o.multiple,supportsResponsive=e.inArray(o.type,u)>-1,r=_.isUndefined(i[n])?"":i[n],_.isUndefined(i[n])&&o["default"]&&(r=o["default"]),d=o.responsive&&c.responsive_enabled&&!a&&supportsResponsive?o.responsive:null,s+=l({field:o,name:n,rootName:n,value:r,preview:JSON.stringify(o.preview?o.preview:{type:"refresh"}),responsive:d,rowClass:o.row_class?" "+o.row_class:"",isMultiple:a,supportsMultiple:"editor"!==o.type&&"photo"!==o.type&&"service"!==o.type,settings:i,globalSettings:c,template:e("#tmpl-fl-builder-field-"+o.type)});return s},renderField:function(e){var t=wp.template("fl-builder-field");return t(e)},renderSectionTemplate:function(e,t){var i=wp.template(e.template.id);return i({section:e,settings:t})},renderTabTemplate:function(e,t){var i=wp.template(e.template.id);return i({tab:e,settings:t})},renderLegacySettings:function(t,i){var l=e(".fl-builder-settings:visible"),s=null,o=!1,n={tabs:[],sections:[],fields:[],settings:null,node_id:null};return l.find(".fl-legacy-field").each(function(){s=e(this),n.fields.push(s.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(s),o=!0}),l.find(".fl-legacy-settings-section").each(function(){s=e(this),n.sections.push({tab:s.attr("data-tab"),section:s.attr("data-section")}),o=!0}),l.find(".fl-legacy-settings-tab").each(function(){s=e(this),n.tabs.push(s.attr("data-tab")),o=!0}),l.attr("data-node")?n.node_id=l.attr("data-node"):n.settings=FLBuilder._getOriginalSettings(l,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(e.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:n,form:l.attr("data-form-id"),group:l.attr("data-form-group"),lightbox:l.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),o&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),o},renderLegacySettingsComplete:function(t){var i="object"==typeof t?t:JSON.parse(t),l=null,s=null,o="",n=null,r=null,a=null;if(i.lightbox?(l=e(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]"),s=l.length?l.find(".fl-builder-settings"):null):(s=e(".fl-builder-settings:visible"),l=s.closest(".fl-builder-lightbox")),s&&s.length){for(o in i.fields)n=e("#fl-field-"+o).attr("id",""),n.after(i.fields[o]).remove();for(o in i.extras)n=e("#fl-field-"+o).find(".fl-field-control-wrapper"),n.prepend(i.extras[o].before),n.append(i.extras[o].after);for(a in i.sections)for(o in i.sections[a])r=e("#fl-builder-settings-section-"+o),r.html(i.sections[a][o]);for(o in i.tabs)a=e("#fl-builder-settings-tab-"+o),a.html(i.tabs[o]);l.data("parent")||(this.settings=FLBuilder._getSettings(s),FLBuilder.preview&&(FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var t=e(".fl-builder-settings:visible"),i=t.closest(".fl-builder-lightbox"),l=i.attr("data-parent"),s=null,o=null,n={};return l&&(l=e(".fl-builder-lightbox[data-instance-id="+l+"]"),t=l.find("form.fl-builder-settings"),s=FLBuilder._getSettings(t),o=t.attr("data-node"),o&&(n.node_id=o,n.node_settings=s)),n},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),i=!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(t);return i},closeOnDeleteNode:function(t,i){var l=e(".fl-builder-settings[data-node]"),s=FLBuilder._contentClass+" .fl-node-"+l.data("node");l.length&&!e(s).length&&FLLightbox.closeAll()},showLightboxLoader:function(){e(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(t){e(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){var t=e.closest(".fl-field-control").find(".fl-field-control-wrapper");t.hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field"),i=e.closest(".fl-field-control").find(".fl-field-control-wrapper");i.show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,e.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this))},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];e.namespace.indexOf("didAdd")>-1?this.addNode(arguments[1]):e.namespace.indexOf("didSaveNodeSettings")>-1?this.updateNode(arguments[1].nodeId,arguments[1].settings):e.namespace.indexOf("didDelete")>-1?this.deleteNodes():e.namespace.indexOf("didDuplicate")>-1&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(t,i){var l=this;i.cols.each(function(){var t=e(this),i=t.attr("data-node");l.nodes[i]&&(l.nodes[i].size=parseFloat(t[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},addNode:function(t,i){var l=e(".fl-node-"+t),s=l.hasClass("fl-row"),o=l.hasClass("fl-col"),n=l.hasClass("fl-col-group"),r=l.hasClass("fl-module"),a=this;this.nodes[t]||(i||(s?i=e.extend({},this.defaults.row):o?i=e.extend({},this.defaults.column):r&&(i=e.extend({},this.defaults.modules[l.attr("data-type")])),s||n?l.find(".fl-col").each(function(){var t=e(this),i=e.extend({},a.defaults.column);i.size=parseFloat(t[0].style.width),a.addNode(t.attr("data-node"),i)}):r&&(a.addNode(l.closest(".fl-row").attr("data-node")),a.addNode(l.closest(".fl-col").attr("data-node")),a.updateOnResetColumnWidths(null,{cols:l.closest(".fl-col-group").find("> .fl-col")}))),i&&(this.nodes[t]=i))},updateNode:function(t,i){var l=e(".fl-node-"+t),s=this;l.hasClass("fl-col")&&l.closest(".fl-col-group").find("> .fl-col").each(function(){var t=e(this),l=t.attr("data-node");s.nodes[l].size=parseFloat(t[0].style.width),s.nodes[l].equal_height=i.equal_height,s.nodes[l].content_alignment=i.content_alignment,s.nodes[l].responsive_order=i.responsive_order}),this.nodes[t]=i},duplicateNode:function(t,i){var l=e(".fl-node-"+i),s=l.find("[data-node]"),o=e(".fl-node-"+t),n=o.find("[data-node]"),r=this;this.nodes[i]=this.nodes[t],s.each(function(l){t=n.eq(l).attr("data-node"),i=e(this).attr("data-node"),r.nodes[t]&&(r.nodes[i]=r.nodes[t])})},deleteNodes:function(){var t="",i=e(FLBuilder._contentClass).html();for(t in this.nodes)i.indexOf(t)===-1&&(this.nodes[t]=null,delete this.nodes[t])}}),e(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(e){var t={init:function(){"module"===FLBuilderConfig.userTemplateType||FLBuilderConfig.simpleUi||(this.initPanel(),this.pinOrUnpin(),this.bind())},bind:function(){var t=e(window),i=e("body");t.on("resize",_.throttle(this.windowResize.bind(this),250)),i.delegate(".fl-builder-ui-pinned-collapse","click",this.collapse),i.delegate(".fl-builder--content-library-panel .fl-builder--tabs","click",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return e(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout()},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout()},pinOrUnpin:function(){var t=(e(".fl-builder--content-library-panel"),this.isPinned());window.innerWidth<=500?(t&&this.unpin(!1),this.disableDragAndResize()):(t||this.restorePosition(),this.enableDragAndResize())},show:function(){var t=e(".fl-builder--content-library-panel");t.hasClass("fl-builder-ui-pinned-hidden")&&(t.removeClass("fl-builder-ui-pinned-hidden"),t.show(),this.restorePosition())},hide:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),i.addClass("fl-builder-ui-pinned-hidden"),i.hide(),t.css("margin",""))},collapse:function(){var t=e(this).find("i:visible"),i=e("body"),l=t.data("toggle"),s=t.data("position"),o=e(".fl-builder--content-library-panel"),n=o.outerWidth();"hide"===l?(o.css(s,"-"+n+"px"),i.css("margin-"+s,""),i.addClass("fl-builder-ui-pinned-is-collapsed")):(o.css(s,"0px"),i.css("margin-"+s,n+"px"),i.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&e(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return e("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var t=e(".fl-builder--content-library-panel");t.draggable({cursor:"move",handle:".fl-builder--tabs",cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:400,minWidth:380,maxWidth:500,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),t.addClass("fl-builder-ui-pinned-container"),t.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(t){var i=e(".fl-builder--content-library-panel"),l=i.width(),s=e("body"),o=e(".fl-responsive-preview, .fl-responsive-preview-mask"),n=e(FLBuilder._contentClass).parentsUntil("body").last();s.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+t),s.addClass("fl-builder-content-panel-is-showing"),s.css("margin-"+t,l+"px"),o.css("margin-"+t,l+"px"),n.addClass("fl-builder-ui-pinned-content-transform"),i.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+t),i.find(".ui-resizable-"+("left"===t?"e":"w")).show(),i.on("resize",_.throttle(this.resize.bind(this),250)),i.attr("style",""),FLBuilder.ContentPanel.isShowing=!0},unpinPanel:function(){var t=e(".fl-builder--content-library-panel"),i=t.find(".fl-builder--panel-content .is-showing").data("tab"),l=e("body"),s=e(".fl-responsive-preview, .fl-responsive-preview-mask"),o=e(FLBuilder._contentClass).parentsUntil("body").last();l.css("margin-left",""),l.css("margin-right",""),l.removeClass("fl-builder-ui-is-pinned"),l.removeClass("fl-builder-ui-is-pinned-left"),l.removeClass("fl-builder-ui-is-pinned-right"),s.css("margin-left",""),s.css("margin-right",""),o.removeClass("fl-lightbox-content-transform"),t.removeClass("fl-builder-ui-pinned"),t.removeClass("fl-builder-ui-pinned-left"),t.removeClass("fl-builder-ui-pinned-right"),t.find(".ui-resizable-handle").hide(),t.off("resize"),t.attr("style",""),t.find(".fl-builder--tabs [data-tab="+i+"]").addClass("is-showing")},pinLightboxes:function(){var t=this;e(".fl-lightbox-resizable").each(function(){t.pinLightbox(e(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(t){var i=e(".fl-builder--content-library-panel"),l=t.closest(".fl-lightbox-wrap");l.closest(".fl-builder-ui-pinned").length||(i.append(l),t.attr("style",""),t.draggable("disable"),t.resizable("disable")),t.is(":visible")&&i.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){var i=t._node.find(".fl-lightbox-resizable");i.length&&(i.hasClass("fl-builder-ui-pinning-initialized")||(i.draggable("option","start",this.dragStart.bind(this)),i.draggable("option","drag",this.drag.bind(this)),i.draggable("option","stop",this.dragStop.bind(this)),i.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(i),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var t=e(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=t.find(".fl-builder--panel-content .is-showing").data("tab"),t.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),e(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var t=e("body"),i=e(".fl-builder--content-library-panel");i.find(".fl-lightbox-wrap").each(function(){var l=e(this),s=l.find(".fl-lightbox"),o=0,n=0,r=0;s.draggable("enable"),s.resizable("enable"),s.find(".ui-resizable-handle").show(),t.append(l),s.is(":visible")?(o=parseInt(i.css("top"))-parseInt(l.css("top"))-parseInt(l.css("padding-top")),n=parseInt(i.css("left"))-parseInt(l.css("padding-left")),r=parseInt(i.css("right"))-parseInt(l.css("padding-right")),s.css("top",(o<0?0:o)+"px"),s.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?r:n)+"px"),s.addClass("fl-lightbox-prevent-animation"),t.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):s.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){e("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var t=e("body"),i=e(".fl-responsive-preview, .fl-responsive-preview-mask"),l=e(".fl-builder--content-library-panel"),s=l.outerWidth();l.hasClass("fl-builder-ui-pinned-left")?(t.css("margin-left",s+"px"),i.css("margin-left",s+"px")):l.hasClass("fl-builder-ui-pinned-right")&&(t.css("margin-right",s+"px"),i.css("margin-right",s+"px"))},resizeStop:function(){e("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(t,i){var l=e("body"),s=(e(t.target),e(".fl-builder-bar-actions"));e(".fl-lightbox-resizable:visible").length||s.addClass("fl-builder-content-panel-pin-zone"),l.addClass("fl-builder-draggable-is-dragging"),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),l.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(t,i){var l=e("body"),s=e(".fl-responsive-preview"),o=e(window),n=s.length?s.width():o.width(),r=o.scrollTop(),a=e(".fl-builder--content-library-panel"),d=a.offset().top,u=e(".fl-builder-bar-actions"),c=e(t.target);c.hasClass("fl-builder--content-library-panel")&&(t.clientX<n-75&&d-r<46?u.addClass("fl-builder-content-panel-pin-zone-hover"):u.removeClass("fl-builder-content-panel-pin-zone-hover")),c.hasClass("fl-builder-ui-pinned")?this.unpinPanel():t.clientX<75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):t.clientX>n-75?l.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(t,i){var l=(e(window),e("body")),s=e(".fl-builder-bar-actions"),o=e(".fl-builder-ui-pin-zone"),n=e(".fl-builder--content-library-panel"),r=e(".fl-lightbox-resizable:visible");e(t.target);l.removeClass("fl-builder-draggable-is-dragging"),s.removeClass("fl-builder-content-panel-pin-zone"),s.removeClass("fl-builder-content-panel-pin-zone-hover"),o.remove(),r.length&&parseInt(r.css("top"))<0&&r.css("top","0"),l.hasClass("fl-builder-ui-show-pin-zone")?(l.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),l.removeClass("fl-builder-ui-show-pin-zone"),l.removeClass("fl-builder-ui-show-pin-zone-left"),l.removeClass("fl-builder-ui-show-pin-zone-right")):n.find(".fl-lightbox").length?this.unpin(!0):(n.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable");t.draggable("disable"),t.resizable("disable"),i.draggable("disable"),i.resizable("disable")},enableDragAndResize:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");t.draggable("enable"),t.resizable("enable"),this.isPinned()||(i.draggable("enable"),i.resizable("enable"))},savePosition:function(){var t=e(".fl-builder--content-library-panel"),i=e(".fl-lightbox-resizable:visible"),l={pinned:{width:t.width(),position:null}};t.hasClass("fl-builder-ui-pinned-left")?l.pinned.position="left":t.hasClass("fl-builder-ui-pinned-right")?l.pinned.position="right":i.length&&(l.lightbox={width:i.width(),height:i.height(),top:parseInt(i.css("top"))<0?"0px":i.css("top"),left:i.css("left")}),FLBuilderConfig.userSettings.pinned=l.pinned,l.lightbox&&(FLBuilderConfig.userSettings.lightbox=l.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:l})},restorePosition:function(){var t=e(".fl-builder--content-library-panel"),i=FLBuilderConfig.userSettings.pinned;i&&i.position&&(t.width(i.width),this.pin(i.position,!1),t.width(i.width))}};e(function(){t.init()})}(jQuery),function(e){var t={init:function(){this.setupMainMenuData(),e(".fl-builder--revision-actions select").on("change",this.selectChanged),e(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),e(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var t=FLBuilderConfig.revisions.posts,i=FLBuilderConfig.revisions.authors,l=wp.template("fl-revision-list-item"),s=e(".fl-builder--revision-actions select"),o="",n="",r=0;if(FLBuilderConfig.mainMenu.revisions.items=[],s.html(""),0===t.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()
9
+ });else for(;r<t.length;r++)o=FLBuilderStrings.revisionDate.replace("%s",t[r].date.diff),o+=" ("+t[r].date.published+")",n=FLBuilderStrings.revisionAuthor.replace("%s",i[t[r].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:l({id:t[r].id,date:o,author:n,avatar:i[t[r].author].avatar})}),s.append('<option value="'+t[r].id+'">'+o+"</option>");FLBuilder.triggerHook("renderRevisionsPanel")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=JSON.parse(e),this.setupMainMenuData()},itemClicked:function(t,i){var l=e(i).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(e(".fl-builder--revision-actions select").val(l),this.preview(l))},selectChanged:function(i){t.preview(e(this).val())},applyClicked:function(i){var l=e(".fl-builder--revision-actions select").val();t.restore(l)},preview:function(t){e(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:t},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(i){e(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:i},t.restoreComplete)},restoreComplete:function(e){var t=JSON.parse(e);FLBuilder._renderLayout(t.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",t.config)}};e(function(){t.init()})}(jQuery),function(e){var t={query:function(e){var t={},i=null,l={library:{}},s=null;if(e=this.normalizeQuery(e),_.isNull(e.kind))t=FLBuilderConfig.contentItems;else for(var o in e.kind)i=e.kind[o],t[i]=FLBuilderConfig.contentItems[i];return s=this.findMatches(e,t),l.library=this.formatResults(s,e),l},normalizeQuery:function(e){var t={kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1};return e=_.extend(t,e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i={},l=null,s=null,o=null,n=null,r=null,a=null;for(l in t){s=t[l],i[l]={items:[]};for(a in s)if(o=s[a],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(o.category,e.category)){switch(l){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(n=_.contains(e.content,o.content),r=e.content===o.content,n||r)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==o.type)continue;if(!_.isNull(e.group)){var d=e.group,u=o.group;if(_.isString(d)&&(d=[d]),_.isString(u)&&(u=[u]),_.isEmpty(d)||_.isEmpty(u))continue;var c=!1;for(a in d){var h=d[a];_.contains(u,h)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(e.group===!1&&o.group.length>0)continue;if(e.group!==!1&&!_.contains(o.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(o,e.searchTerm))&&i[l].items.push(o)}}return i},matchesCategory:function(e,t){var i,l,s,o,n,r;if(e===t)return!0;_.isString(t)&&(t=[t]);for(l in t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(s in e)if(o=e[s],o===i)return!0;if(_.isObject(e))for(n in e)if(r=e[n],r===i||n===i)return!0}return!1},matchesSearchTerm:function(e,t){var i,l,s=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(s))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(s))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(s))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(s))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||(i="widget",!i.includes(s)))||!(_.isUndefined(e.editor_export)||(l="module",!l.includes(s))))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,t){var i,l,s={};return _.forEach(e,function(e,o,n){i=e[t],_.isNull(i)||_.isUndefined(i)||_.isString(i)&&""===e[i]||(_.isString(i)&&(s[i]=s[i]||[],s[i].push(e)),_.isArray(i)&&(l=i,_.forEach(l,function(t,i,l){s[t]=s[t]||[],s[t].push(e)})),_.isObject(i)&&(l=i,_.forEach(l,function(t,i,l){s[t]=s[t]||[],s[t].push(e)})))}),s},search:function(e){var t={searchTerm:e},i=this.query(t),l={total:0,term:e,sections:{}};if(!_.isUndefined(i.library.module.items)){var s={};for(var o in i.library.module.items){var n=i.library.module.items[o],r=n.group[0],a=n.category;n.name;_.isUndefined(s[r])&&(s[r]={}),_.isUndefined(s[r][a])&&(s[r][a]=[]),s[r][a].push(n)}l.grouped=s}for(var o in i.library){var d=i.library[o];!_.isUndefined(d.items)&&d.items.length>0&&(l.sections[o]={name:FLBuilderStrings.typeLabels[o],handle:o,type:"",items:d.items},l.total+=d.items.length)}return l}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){var i=t.search(e);return i}}}(jQuery),function(e,t){var i={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=e(".fl-builder--saving-indicator"),t.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),t.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),t.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),t.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),t.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabledd||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,e("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&"save_pinned_ui_position"!=e))))},onLayoutSaved:function(e,t){if(this.isUpdatingLayout(t.fl_builder_data.action)){this.showStatusMessage(this.messages.saved,this.messages.savedTooltip);var i=this;setTimeout(function(){i.resetStatusMessage()},2e3)}},onLayoutPublished:function(){this.layoutNeedsPublish=!1,e("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(t,i){this.$savingIndicator.html(t),_.isUndefined(i)||(this.$savingIndicator.attr("title",i),e(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fa fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){if(this.layoutNeedsPublish)t._publishLayout(!1);else{this.showStatusMessage(this.messages.noChanges);var e=this;setTimeout(function(){e.resetStatusMessage()},2e3)}}};t.SaveManager={layoutNeedsPublish:function(){return i.layoutNeedsPublish},showStatusMessage:function(e,t){i.showStatusMessage(e,t)},resetStatusMessage:function(){i.resetStatusMessage()}},e(function(){i.init()})}(jQuery,FLBuilder);
js/fl-slideshow.js CHANGED
@@ -5,23 +5,23 @@
5
  YUI.add('fl-event-move', function(Y) {
6
 
7
  /**
8
- * Adds gesturemovevertical, gesturemoveverticalend, gesturemovehorizontal
9
  * and gesturemovehorizontalend events.
10
- *
11
  * @module fl-event-move
12
- */
13
  var _eventBase = {
14
 
15
  _isEndEvent: false,
16
-
17
- on: function(node, subscriber, ce)
18
  {
19
  if(this.type.indexOf('end') > -1) {
20
  this._isEndEvent = true;
21
  }
22
-
23
  subscriber._direction = this.type.replace('gesturemove', '').replace('end', '');
24
-
25
  if(window.navigator.msPointerEnabled) {
26
  subscriber._startHandle = node.on('MSPointerDown', this._onStart, this, node, subscriber, ce);
27
  subscriber._moveHandle = node.on('MSPointerMove', this._onMove, this, node, subscriber, ce);
@@ -30,28 +30,28 @@ var _eventBase = {
30
  else {
31
  subscriber._startHandle = node.on('gesturemovestart', this._onStart, null, this, node, subscriber, ce);
32
  subscriber._moveHandle = node.on('gesturemove', this._onMove, null, this, node, subscriber, ce);
33
- subscriber._endHandle = node.on('gesturemoveend', this._onEnd, { standAlone: true }, this, node, subscriber, ce);
34
  }
35
  },
36
-
37
- detach: function(node, subscriber, ce)
38
  {
39
  subscriber._startHandle.detach();
40
  subscriber._startHandle = null;
41
  subscriber._moveHandle.detach();
42
  subscriber._moveHandle = null;
43
  subscriber._endHandle.detach();
44
- subscriber._endHandle = null;
45
  },
46
-
47
- _onStart: function(e, node, subscriber, ce)
48
  {
49
  subscriber._doMove = null;
50
  subscriber._startX = e.pageX;
51
  subscriber._startY = e.pageY;
52
  },
53
-
54
- _onMove: function(e, node, subscriber, ce)
55
  {
56
  if(this._checkDirection(e, subscriber)) {
57
  subscriber._doMove = true;
@@ -63,23 +63,23 @@ var _eventBase = {
63
  ce.fire(e);
64
  }
65
  },
66
-
67
- _onEnd: function(e, node, subscriber, ce)
68
  {
69
  if(subscriber._doMove && this._isEndEvent) {
70
  e.startPageX = subscriber._startX;
71
  e.startPageY = subscriber._startY;
72
  ce.fire(e);
73
  }
74
-
75
  subscriber._doMove = null;
76
  },
77
-
78
  _checkDirection: function(e, subscriber)
79
  {
80
  var xDelta = Math.abs(subscriber._startX - e.pageX),
81
  yDelta = Math.abs(subscriber._startY - e.pageY);
82
-
83
  if(yDelta > xDelta && subscriber._startY > e.pageY && subscriber._direction == 'vertical') {
84
  return true;
85
  }
@@ -92,7 +92,7 @@ var _eventBase = {
92
  else if(yDelta < xDelta && subscriber._startX < e.pageX && subscriber._direction == 'horizontal') {
93
  return true;
94
  }
95
-
96
  return false;
97
  }
98
  };
@@ -141,7 +141,7 @@ YUI.add('fl-slideshow', function(Y) {
141
 
142
  /**
143
  * Caption widget used in slideshows.
144
- *
145
  * @namespace FL
146
  * @class SlideshowCaption
147
  * @constructor
@@ -149,7 +149,7 @@ YUI.add('fl-slideshow', function(Y) {
149
  * @extends Widget
150
  */
151
  Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Widget, [Y.WidgetChild], {
152
-
153
  /**
154
  * Flag for whether the text has been
155
  * toggled or not.
@@ -160,7 +160,7 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
160
  * @protected
161
  */
162
  _textToggled: false,
163
-
164
  /**
165
  * An anchor node used for the toggle link.
166
  *
@@ -170,7 +170,7 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
170
  * @protected
171
  */
172
  _textToggleLink: null,
173
-
174
  /**
175
  * @method renderUI
176
  * @protected
@@ -179,14 +179,14 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
179
  {
180
  var root = this.get('root'),
181
  bb = this.get('boundingBox');
182
-
183
  this._textToggleLink = Y.Node.create('<a href="javascript:void(0);"></a>');
184
  this._textToggleLink.addClass('fl-slideshow-caption-toggle');
185
  this._textToggleLink.set('innerHTML', root.get('captionMoreLinkText'));
186
 
187
  bb.appendChild(this._textToggleLink);
188
  },
189
-
190
  /**
191
  * @method bindUI
192
  * @protected
@@ -196,22 +196,22 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
196
  this.get('root').on('imageLoadComplete', Y.bind(this._setText, this));
197
  this._textToggleLink.on('click', Y.bind(this._toggleText, this));
198
  },
199
-
200
  /**
201
  * Sets the caption text and displays the
202
  * toggle link if necessary.
203
- *
204
  * @method _setText
205
  * @protected
206
  */
207
-
208
  _setText: function()
209
  {
210
  var root = this.get('root'),
211
  text = root.imageInfo.caption,
212
  textLength = root.get('captionTextLength'),
213
  cb = this.get('contentBox');
214
-
215
  if(!root.imageInfo.caption || root.imageInfo.caption === '') {
216
  cb.set('innerHTML', '');
217
  this._textToggleLink.setStyle('display', 'none');
@@ -234,14 +234,14 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
234
  else {
235
  text = this._stripTags(text);
236
  }
237
-
238
  cb.set('innerHTML', text);
239
  },
240
-
241
  /**
242
  * Shows or hides the full text when the
243
  * toggle link is clicked.
244
- *
245
  * @method _toggleText
246
  * @protected
247
  */
@@ -250,7 +250,7 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
250
  var root = this.get('root'),
251
  text = root.imageInfo.caption,
252
  cb = this.get('contentBox');
253
-
254
  if(this._textToggled) {
255
  text = this._shortenText(text);
256
  this._textToggleLink.set('innerHTML', root.get('captionMoreLinkText'));
@@ -261,48 +261,48 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
261
  this._textToggleLink.set('innerHTML', root.get('captionLessLinkText'));
262
  this._textToggled = true;
263
  }
264
-
265
  cb.set('innerHTML', text);
266
  },
267
-
268
  /**
269
  * Strips out HTML tags from the caption text.
270
- *
271
  * @method _stripTags
272
  * @param text {String} The text to strip HTML tags from.
273
- * @param ignoreSettings {Boolean} If true, will strip tags even if
274
  * the stripTags attribute is set to false.
275
  * @protected
276
  */
277
  _stripTags: function(text, ignoreSettings)
278
  {
279
  var root = this.get('root'), textDiv;
280
-
281
  if(ignoreSettings || root.get('captionStripTags')) {
282
  textDiv = document.createElement('div');
283
  textDiv.innerHTML = text;
284
  text = textDiv.textContent || textDiv.innerText;
285
  }
286
-
287
  return text;
288
  },
289
-
290
  /**
291
- * Shortens the caption text to the length of
292
  * the textLength attribute.
293
- *
294
  * @method _shortenText
295
  * @protected
296
  */
297
  _shortenText: function(text)
298
  {
299
  var root = this.get('root');
300
-
301
  text = this._stripTags(text, true).substring(0, root.get('captionTextLength'));
302
-
303
  return Y.Lang.trim(text.substring(0, text.lastIndexOf(' '))) + ' ...';
304
  }
305
-
306
  }, {
307
 
308
  /**
@@ -314,7 +314,7 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
314
  * @static
315
  */
316
  CSS_PREFIX: 'fl-slideshow-caption',
317
-
318
  /**
319
  * Static property used to define the default attribute configuration of
320
  * the Widget.
@@ -330,9 +330,9 @@ Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Wid
330
  });
331
 
332
  /**
333
- * A widget for loading and transitioning between SlideshowImage
334
  * instances. Each SlideshowImage instance is a child widget of
335
- * SlideshowFrame. SlideshowFrame is a child widget of the main
336
  * slideshow widget.
337
  *
338
  * @namespace FL
@@ -352,7 +352,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
352
  * @protected
353
  */
354
  _imageInfo: null,
355
-
356
  /**
357
  * The active FL.SlideshowImage instance in the frame.
358
  *
@@ -362,9 +362,9 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
362
  * @protected
363
  */
364
  _activeImage: null,
365
-
366
  /**
367
- * A FL.SlideshowImage instance used to load the
368
  * next image and transition it into the frame.
369
  *
370
  * @property _nextImage
@@ -373,9 +373,9 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
373
  * @protected
374
  */
375
  _nextImage: null,
376
-
377
  /**
378
- * Used to store imageInfo if a load request is
379
  * made while the frame is transitioning. If not null
380
  * when the transition completes, a new image will
381
  * be loaded using the imageInfo.
@@ -386,9 +386,9 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
386
  * @protected
387
  */
388
  _loadQueue: null,
389
-
390
  /**
391
- * An instance of FL.SlideshowTransition used for
392
  * the current transition in progress.
393
  *
394
  * @property _transition
@@ -397,7 +397,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
397
  * @protected
398
  */
399
  _transition: null,
400
-
401
  /**
402
  * A flag for whether the frame is currently transitioning or not.
403
  *
@@ -407,9 +407,9 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
407
  * @protected
408
  */
409
  _transitioning: false,
410
-
411
  /**
412
- * Flag for whether to resize when the current transition
413
  * completes. Set to true when a resize request is made
414
  * during a transition.
415
  *
@@ -419,7 +419,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
419
  * @protected
420
  */
421
  _resizeAfterTransition: false,
422
-
423
  /**
424
  * Provides functionality for gesture based transitions
425
  * between the active and next images.
@@ -430,7 +430,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
430
  * @protected
431
  */
432
  _gestures: null,
433
-
434
  /**
435
  * Creates new instances of FL.SlideshowImage used in the frame.
436
  *
@@ -440,11 +440,11 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
440
  initializer: function()
441
  {
442
  var imageConfig = this.get('imageConfig');
443
-
444
  this._activeImage = new Y.FL.SlideshowImage(imageConfig);
445
  this._nextImage = new Y.FL.SlideshowImage(imageConfig);
446
  },
447
-
448
  /**
449
  * Renders the FL.SlideshowImage instances used in the frame.
450
  *
@@ -456,7 +456,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
456
  this.add(this._activeImage);
457
  this.add(this._nextImage);
458
  },
459
-
460
  /**
461
  * @method bindUI
462
  * @protected
@@ -466,23 +466,23 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
466
  var activeBB = this._activeImage.get('boundingBox'),
467
  nextBB = this._nextImage.get('boundingBox'),
468
  transition = this.get('transition');
469
-
470
  if(('ontouchstart' in window || window.navigator.msPointerEnabled) && this.get('touchSupport')) {
471
-
472
  this._gestures = new Y.FL.SlideshowGestures({
473
  direction: transition == 'slideVertical' ? 'vertical' : 'horizontal',
474
  activeItem: activeBB,
475
  nextItem: nextBB
476
  });
477
-
478
  this._gestures.on('moveStart', this._gesturesMoveStart, this);
479
  this._gestures.on('endComplete', this._gesturesEndComplete, this);
480
  }
481
  },
482
-
483
  /**
484
  * Functional styles for the UI.
485
- *
486
  * @method syncUI
487
  * @protected
488
  */
@@ -491,30 +491,30 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
491
  var activeBB = this._activeImage.get('boundingBox'),
492
  nextBB = this._nextImage.get('boundingBox'),
493
  cb = this.get('contentBox');
494
-
495
  activeBB.setStyle('position', 'absolute');
496
  activeBB.setStyle('top', '0px');
497
  activeBB.setStyle('left', '-9999px');
498
-
499
  nextBB.setStyle('position', 'absolute');
500
  nextBB.setStyle('top', '0px');
501
  nextBB.setStyle('left', '-9999px');
502
-
503
  cb.setStyle('position', 'relative');
504
  cb.setStyle('overflow', 'hidden');
505
  },
506
-
507
  /**
508
  * Checks whether the imageInfo should be loaded or queued.
509
  * Initializes a new transition if loading is ok.
510
  *
511
  * @method load
512
  * @param imageInfo {Object} The image info to load.
513
- */
514
  load: function(imageInfo)
515
  {
516
  var activeInfo = this._activeImage._imageInfo;
517
-
518
  if(this._transitioning) {
519
  this._loadQueue = imageInfo;
520
  return;
@@ -522,59 +522,59 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
522
  else if(activeInfo && activeInfo.largeURL == imageInfo.largeURL) {
523
  return;
524
  }
525
-
526
  this._imageInfo = imageInfo;
527
  this._transitionInit(imageInfo);
528
  },
529
-
530
  /**
531
  * Preloads the next image using the provided imageInfo.
532
- *
533
  * @method preload
534
  * @param imageInfo {Object} The imageInfo to preload.
535
  * @param width {Number} The width to preload.
536
  * @param height {Number} The height to preload.
537
- */
538
  preload: function(imageInfo, width, height)
539
  {
540
  this._imageInfo = imageInfo;
541
  this._nextImage.preload(imageInfo, width, height);
542
  },
543
-
544
  /**
545
  * Unloads the active and next image instances.
546
- *
547
  * @method unload
548
- */
549
  unload: function()
550
  {
551
  this._imageInfo = null;
552
  this._loadQueue = null;
553
  this._transitioning = false;
554
  this._transition = null;
555
-
556
  this._activeImage.detachAll();
557
  this._activeImage.unload();
558
  this._activeImage.get('boundingBox').setStyle('left', '-9999px');
559
-
560
  this._nextImage.detachAll();
561
  this._nextImage.unload();
562
  this._nextImage.get('boundingBox').setStyle('left', '-9999px');
563
  },
564
-
565
  /**
566
  * Resizes the bounding box and active image.
567
- *
568
  * @method resize
569
  * @param width {Number} The width value.
570
  * @param height {Number} The height value.
571
- */
572
  resize: function(width, height)
573
  {
574
  if(!width || !height) {
575
  return;
576
  }
577
-
578
  var bb = this.get('boundingBox'),
579
  padding = [
580
  parseInt(bb.getComputedStyle('paddingTop'), 10),
@@ -582,13 +582,13 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
582
  parseInt(bb.getComputedStyle('paddingBottom'), 10),
583
  parseInt(bb.getComputedStyle('paddingLeft'), 10)
584
  ];
585
-
586
  width = width - padding[1] - padding[3];
587
  height = height - padding[0] - padding[2];
588
-
589
  this.set('width', width);
590
  this.set('height', height);
591
-
592
  if(this._transitioning) {
593
  this._resizeAfterTransition = true;
594
  }
@@ -597,20 +597,20 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
597
  this._nextImage.resize(width, height);
598
  }
599
  },
600
-
601
  /**
602
  * Gets the current transition to use.
603
- *
604
  * @method _getTransition
605
  * @protected
606
- */
607
  _getTransition: function()
608
  {
609
  var root = this.get('root'),
610
  lastIndex = root.albumInfo.images.length - 1,
611
  direction = 'next',
612
  transition = root.get('transition');
613
-
614
  if(root.lastImageIndex === null) {
615
  direction = '';
616
  }
@@ -626,7 +626,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
626
  else if(root.lastImageIndex < root.imageIndex) {
627
  direction = 'next';
628
  }
629
-
630
  if(direction == 'next') {
631
  transition = transition.replace('slideHorizontal', 'slideLeft');
632
  transition = transition.replace('slideVertical', 'slideUp');
@@ -635,35 +635,35 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
635
  transition = transition.replace('slideHorizontal', 'slideRight');
636
  transition = transition.replace('slideVertical', 'slideDown');
637
  }
638
-
639
  return transition;
640
  },
641
-
642
  /**
643
  * Fires the transitionInit event and loads the next image.
644
- * The transition starts when the image's loadComplete
645
  * event is fired.
646
  *
647
  * @method _transitionInit
648
  * @param imageInfo {Object} The imageInfo to load before transitioning.
649
  * @protected
650
- */
651
  _transitionInit: function(imageInfo)
652
  {
653
  this._transitioning = true;
654
-
655
  // Disable gestures if set.
656
  if(this._gestures) {
657
  this._gestures.disable();
658
  }
659
-
660
  /**
661
  * Fires when the next image is loading before a new transition.
662
- *
663
  * @event transitionInit
664
- */
665
  this.fire('transitionInit');
666
-
667
  if(imageInfo) {
668
  this._nextImage.once('loadComplete', this._transitionStart, this);
669
  this._nextImage.load(imageInfo);
@@ -672,28 +672,28 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
672
  this._transitionStart();
673
  }
674
  },
675
-
676
  /**
677
  * Fires the transitionStart event and starts the transition
678
  * using a new instance of FL.SlideshowTransition.
679
- *
680
  * @method _transitionStart
681
  * @protected
682
- */
683
  _transitionStart: function()
684
  {
685
  var root = this.get('root');
686
-
687
  /**
688
- * Fires when the next image has finished loading
689
  * and a new transition starts.
690
- *
691
  * @event transitionStart
692
- */
693
  this.fire('transitionStart');
694
-
695
  this._transition = new Y.FL.SlideshowTransition({
696
- itemIn: this._nextImage._imageInfo ? this._nextImage.get('boundingBox') : null,
697
  itemOut: this._activeImage._imageInfo ? this._activeImage.get('boundingBox') : null,
698
  type: this._getTransition(),
699
  duration: root.get('transitionDuration'),
@@ -701,39 +701,39 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
701
  kenBurnsDuration: root.get('speed')/1000,
702
  kenBurnsZoom: root.get('kenBurnsZoom')
703
  });
704
-
705
  if(this._nextImage._imageInfo) {
706
  this._nextImage.get('boundingBox').setStyle('left', '0px');
707
  }
708
-
709
  this._transition.once('complete', this._transitionComplete, this);
710
  this._transition.run();
711
  },
712
-
713
  /**
714
- * Switches the next and active image variables, unloads the
715
- * last image, fires the transitionComplete event and loads
716
  * or resizes if appropriate.
717
- *
718
  * @method _transitionComplete
719
  * @protected
720
- */
721
  _transitionComplete: function()
722
  {
723
  var root = this.get('root');
724
-
725
  // Swap image container references.
726
  this._swapImageRefs();
727
-
728
  /**
729
  * Fired when the current transition completes.
730
- *
731
  * @event transitionComplete
732
- */
733
  this.fire('transitionComplete');
734
  this._transition = null;
735
  this._transitioning = false;
736
-
737
  // Enable gestures if set.
738
  if(this._gestures) {
739
  if(root && root.albumInfo.images.length <= 1) {
@@ -743,7 +743,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
743
  this._gestures.enable();
744
  }
745
  }
746
-
747
  // Load from the queue?
748
  if(this._loadQueue) {
749
  this.load(this._loadQueue);
@@ -756,7 +756,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
756
  this._nextImage.resize(this.get('width'), this.get('height'));
757
  }
758
  },
759
-
760
  /**
761
  * @method _gesturesMoveStart
762
  * @param e {Object} The event object.
@@ -767,24 +767,24 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
767
  var index = 0,
768
  root = this.get('root');
769
 
770
- index = e.direction == 'next' ? root.imageIndex + 1 : root.imageIndex - 1;
771
  index = index < 0 ? root.albumInfo.images.length - 1 : index;
772
- index = index >= root.albumInfo.images.length ? 0 : index;
773
-
774
  root.pause();
775
  root._hideLoadingImage();
776
  root._showLoadingImageWithDelay();
777
-
778
  Y.FL.SlideshowImageLoader.removeGroup(this._nextImage.get('loadGroup'));
779
-
780
  this._nextImage.once('loadComplete', root._hideLoadingImage, root);
781
  this._nextImage.load(root.albumInfo.images[index]);
782
  },
783
-
784
  /**
785
  * @method _gesturesEndComplete
786
  * @protected
787
- */
788
  _gesturesEndComplete: function()
789
  {
790
  var root = this.get('root'),
@@ -795,19 +795,19 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
795
  this._swapImageRefs();
796
  this._imageInfo = root.albumInfo.images[index];
797
  root.loadImage(index);
798
- }
799
  },
800
-
801
  /**
802
  * @method _swapImageRefs
803
  * @protected
804
- */
805
  _swapImageRefs: function()
806
  {
807
  var active = this._activeImage;
808
  this._activeImage = this._nextImage;
809
  this._nextImage = active;
810
-
811
  if(this._nextImage._imageInfo) {
812
  this._nextImage.unload();
813
  this._nextImage.get('boundingBox').setStyle('left', '-9999px');
@@ -817,19 +817,19 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
817
  this._gestures.set('nextItem', this._nextImage.get('boundingBox'));
818
  }
819
  }
820
-
821
  }, {
822
 
823
  /**
824
  * Custom CSS class name for the widget.
825
-
826
  * @property CSS_PREFIX
827
  * @type String
828
  * @protected
829
  * @static
830
  */
831
  CSS_PREFIX: 'fl-slideshow-frame',
832
-
833
  /**
834
  * Static property used to define the default attribute configuration of
835
  * the Widget.
@@ -840,11 +840,11 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
840
  * @static
841
  */
842
  ATTRS: {
843
-
844
  /**
845
- * The configuration object used to create new instances of
846
  * FL.SlideshowImage. See the API docs for {@link FL.SlideshowImage}
847
- * for a complete list of configuration attributes.
848
  *
849
  * @attribute imageConfig
850
  * @type Object
@@ -853,9 +853,9 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
853
  imageConfig: {
854
  value: null
855
  },
856
-
857
  /**
858
- * Whether to use touch gestures, when available,
859
  * to transition between images or not.
860
  *
861
  * @attribute touchSupport
@@ -870,7 +870,7 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
870
 
871
  /**
872
  * A plugin for fullscreen slideshow functionality.
873
- *
874
  * @namespace FL
875
  * @class SlideshowFullscreen
876
  * @constructor
@@ -878,9 +878,9 @@ Y.namespace('FL').SlideshowFrame = Y.Base.create('fl-slideshow-frame', Y.Widget,
878
  * @extends Plugin.Base
879
  */
880
  Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen', Y.Plugin.Base, [], {
881
-
882
  /**
883
- * Flag for whether the slideshow is in
884
  * fullscreen mode.
885
  *
886
  * @property active
@@ -888,7 +888,7 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
888
  * @default false
889
  */
890
  active: false,
891
-
892
  /**
893
  * A div containing the close message.
894
  *
@@ -898,7 +898,7 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
898
  * @protected
899
  */
900
  _closeMessage: null,
901
-
902
  /**
903
  * A timer for hiding the close message.
904
  *
@@ -908,7 +908,7 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
908
  * @protected
909
  */
910
  _closeMessageTimer: null,
911
-
912
  /**
913
  * The initial styles of the host's bounding box
914
  * before entering fullscreen mode.
@@ -927,14 +927,14 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
927
  * @method initializer
928
  * @protected
929
  */
930
- initializer: function()
931
  {
932
  var host = this.get('host'),
933
  bb = host.get('boundingBox'),
934
  self = this;
935
-
936
  bb.addClass('fl-fullscreen-enabled');
937
-
938
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
939
  document.addEventListener('fullscreenchange', function(){ self._osChange(); }, false);
940
  document.addEventListener('mozfullscreenchange', function(){ self._osChange(); }, false);
@@ -947,10 +947,10 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
947
 
948
  /**
949
  * Exits fullscreen if it is currently active
950
- * otherwise it enters fullscreen.
951
  *
952
  * @method toggle
953
- */
954
  toggle: function()
955
  {
956
  if(this.active) {
@@ -966,7 +966,7 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
966
  * the slideshow takes over the browser window.
967
  *
968
  * @method enter
969
- */
970
  enter: function()
971
  {
972
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
@@ -981,7 +981,7 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
981
  * Exits fullscreen mode.
982
  *
983
  * @method exit
984
- */
985
  exit: function()
986
  {
987
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
@@ -997,11 +997,11 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
997
  *
998
  * @method _osEnter
999
  * @protected
1000
- */
1001
  _osEnter: function()
1002
  {
1003
  var bbNode = this.get('host').get('boundingBox')._node;
1004
-
1005
  if(bbNode.webkitRequestFullScreen) {
1006
  bbNode.webkitRequestFullScreen();
1007
  }
@@ -1018,7 +1018,7 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1018
  *
1019
  * @method _osExit
1020
  * @protected
1021
- */
1022
  _osExit: function()
1023
  {
1024
  if(document.exitFullscreen) {
@@ -1034,26 +1034,26 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1034
 
1035
  /**
1036
  * Called when the OS fullscreenchange event fires and enters
1037
- * or exits standard fullscreen mode which positions and
1038
- * resizes the slideshow.
1039
  *
1040
  * @method _osChange
1041
  * @protected
1042
- */
1043
  _osChange: function()
1044
  {
1045
  var host = this.get('host');
1046
-
1047
- // Transitions break on Safari while entering and
1048
- // exiting fullscreen. This fixes them!
1049
  if(host.frame && host.frame._transitioning) {
1050
  host.frame._transitionComplete();
1051
  }
1052
-
1053
  if(this.active) {
1054
  this._exit();
1055
  }
1056
- else {
1057
  this._enter();
1058
  }
1059
  },
@@ -1063,27 +1063,27 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1063
  *
1064
  * @method _browserEnter
1065
  * @protected
1066
- */
1067
  _browserEnter: function()
1068
  {
1069
  var bb = this.get('host').get('boundingBox');
1070
-
1071
  this._initialStyles = {
1072
  position: bb.getStyle('position'),
1073
  top: bb.getStyle('top'),
1074
  left: bb.getStyle('left'),
1075
  zIndex: bb.getStyle('zIndex')
1076
  };
1077
-
1078
  bb.setStyles({
1079
  position: 'fixed',
1080
  top: '0px',
1081
  left: '0px',
1082
  zIndex: 10000
1083
  });
1084
-
1085
  Y.Node.one('body').on('fl-fullscreen|keydown', Y.bind(this._onKey, this));
1086
-
1087
  this._showCloseMessage();
1088
  this._enter();
1089
  },
@@ -1093,20 +1093,20 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1093
  *
1094
  * @method _browserExit
1095
  * @protected
1096
- */
1097
  _browserExit: function()
1098
  {
1099
  var bb = this.get('host').get('boundingBox');
1100
-
1101
  bb.setStyles({
1102
  position: this._initialStyles.position,
1103
  top: this._initialStyles.top,
1104
  left: this._initialStyles.left,
1105
  zIndex: this._initialStyles.zIndex
1106
  });
1107
-
1108
  Y.Node.one('body').detach('fl-fullscreen|keydown');
1109
-
1110
  this._hideCloseMessage();
1111
  this._exit();
1112
  },
@@ -1116,37 +1116,37 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1116
  *
1117
  * @method _enter
1118
  * @protected
1119
- */
1120
  _enter: function()
1121
  {
1122
  var host = this.get('host'),
1123
  bb = host.get('boundingBox');
1124
-
1125
  bb.addClass('fl-fullscreen-active');
1126
-
1127
  this.active = true;
1128
-
1129
  host.resize();
1130
  },
1131
-
1132
  /**
1133
  * Exits fullscreen mode.
1134
  *
1135
  * @method _exit
1136
  * @protected
1137
- */
1138
  _exit: function()
1139
  {
1140
  var host = this.get('host'),
1141
  bb = host.get('boundingBox');
1142
-
1143
- bb.removeClass('fl-fullscreen-active');
1144
-
1145
  this.active = false;
1146
-
1147
  host.resize();
1148
  },
1149
-
1150
  /**
1151
  * Keyboard input for the esc button.
1152
  *
@@ -1160,9 +1160,9 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1160
  return false;
1161
  }
1162
  },
1163
-
1164
  /**
1165
- * Creates the close message if one is
1166
  * not already available in the document.
1167
  *
1168
  * @method _initCloseMessage
@@ -1175,7 +1175,7 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1175
  this._closeMessage.setStyle('display', 'none');
1176
  this.get('host').get('boundingBox').insert(this._closeMessage);
1177
  },
1178
-
1179
  /**
1180
  * Shows the close message.
1181
  *
@@ -1188,11 +1188,11 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1188
  this._closeMessageTimer.cancel();
1189
  this._closeMessageTimer = null;
1190
  }
1191
-
1192
  this._closeMessage.show(true);
1193
  this._closeMessageTimer = Y.later(4000, this, this._hideCloseMessage);
1194
  },
1195
-
1196
  /**
1197
  * Hides the close message.
1198
  *
@@ -1205,10 +1205,10 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1205
  this._closeMessageTimer.cancel();
1206
  this._closeMessageTimer = null;
1207
  }
1208
-
1209
  this._closeMessage.hide(true);
1210
  }
1211
-
1212
  }, {
1213
 
1214
  /**
@@ -1220,18 +1220,18 @@ Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen',
1220
  * @static
1221
  */
1222
  NS: 'fullscreen',
1223
-
1224
  OS_SUPPORT: (function(){
1225
-
1226
  var doc = document.documentElement;
1227
-
1228
  return doc.webkitRequestFullScreen || doc.mozRequestFullScreen || doc.requestFullScreen;
1229
  })()
1230
  });
1231
 
1232
  /**
1233
  * Provides functionality for gesture based transitions
1234
- * between two slideshow components.
1235
  *
1236
  * @namespace FL
1237
  * @class SlideshowGestures
@@ -1250,7 +1250,7 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1250
  * @protected
1251
  */
1252
  _startX: null,
1253
-
1254
  /**
1255
  * The y coordinate for where a gesture event starts.
1256
  *
@@ -1260,9 +1260,9 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1260
  * @protected
1261
  */
1262
  _startY: null,
1263
-
1264
  /**
1265
- * A flag for whether a gesture is moving or not.
1266
  *
1267
  * @property _moving
1268
  * @type Boolean
@@ -1270,7 +1270,7 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1270
  * @protected
1271
  */
1272
  _touchMoving: false,
1273
-
1274
  /**
1275
  * Whether the gesture is moving or not.
1276
  *
@@ -1280,9 +1280,9 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1280
  * @protected
1281
  */
1282
  _moving: false,
1283
-
1284
  /**
1285
- * The direction the current gesture event
1286
  * is moving in (either next or prev).
1287
  *
1288
  * @property _movingDirection
@@ -1291,9 +1291,9 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1291
  * @protected
1292
  */
1293
  _movingDirection: null,
1294
-
1295
  /**
1296
- * A flag for whether a gesture gesture is currently
1297
  * transitioning or not.
1298
  *
1299
  * @property _transitioning
@@ -1306,12 +1306,12 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1306
  /**
1307
  * @method initializer
1308
  * @protected
1309
- */
1310
- initializer: function()
1311
  {
1312
  this.enable();
1313
  },
1314
-
1315
  /**
1316
  * @method enable
1317
  */
@@ -1321,13 +1321,13 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1321
  direction = this.get('direction'),
1322
  active = this.get('activeItem'),
1323
  next = this.get('nextItem');
1324
-
1325
  active.on(id + '|gesturemovestart', Y.bind(this._onStart, this));
1326
  next.on(id + '|gesturemovestart', Y.bind(this._onStart, this));
1327
  next.on(id + '|transitionend', Y.bind(this._onEndComplete, this) );
1328
  next.on(id + '|oTransitionEnd', Y.bind(this._onEndComplete, this) );
1329
  next.on(id + '|webkitTransitionEnd', Y.bind(this._onEndComplete, this) );
1330
-
1331
  if(direction == 'horizontal') {
1332
  active.on(id + '|gesturemovehorizontal', Y.bind(this._onMoveHorizontal, this));
1333
  active.on(id + '|gesturemovehorizontalend', Y.bind(this._onEndHorizontal, this));
@@ -1341,7 +1341,7 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1341
  next.on(id + '|gesturemoveverticalend', Y.bind(this._onEndVertical, this));
1342
  }
1343
  },
1344
-
1345
  /**
1346
  * @method disable
1347
  */
@@ -1350,11 +1350,11 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1350
  var id = this.get('id'),
1351
  active = this.get('activeItem'),
1352
  next = this.get('nextItem');
1353
-
1354
  active.detach(id + '|*');
1355
  next.detach(id + '|*');
1356
  },
1357
-
1358
  /**
1359
  * @method _onStart
1360
  * @param e {Object} The event object.
@@ -1363,24 +1363,24 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1363
  _onStart: function(e)
1364
  {
1365
  var direction = this.get('direction');
1366
-
1367
  if(this._transitioning) {
1368
  this._onEndComplete();
1369
  }
1370
-
1371
  if(direction == 'horizontal') {
1372
  this._startX = e.pageX;
1373
  }
1374
  else {
1375
  this._startY = e.pageY;
1376
  }
1377
-
1378
  /**
1379
  * @event start
1380
  */
1381
  this.fire('start');
1382
  },
1383
-
1384
  /**
1385
  * @method _onMoveHorizontal
1386
  * @param e {Object} The event object.
@@ -1394,38 +1394,38 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1394
  width = parseInt(active.getComputedStyle('width'), 10),
1395
  translate = x < 0 ? Math.abs(x) : -x,
1396
  direction = x < 0 ? 'prev' : 'next';
1397
-
1398
  e.preventDefault();
1399
-
1400
  if(!this._moving || this._movingDirection != direction) {
1401
-
1402
  active.setStyle('left', 0);
1403
-
1404
  next.setStyles({
1405
  'opacity': 1,
1406
  'left': x < 0 ? -width : width
1407
  });
1408
-
1409
  this._moving = true;
1410
  this._movingDirection = direction;
1411
-
1412
  /**
1413
  * @event moveStart
1414
  */
1415
  this.fire('moveStart', { direction: direction });
1416
  }
1417
-
1418
  active.setStyle('-webkit-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1419
  active.setStyle('-ms-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1420
  next.setStyle('-webkit-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1421
  next.setStyle('-ms-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1422
-
1423
  /**
1424
  * @event move
1425
  */
1426
  this.fire('move');
1427
  },
1428
-
1429
  /**
1430
  * @method _onMoveVertical
1431
  * @param e {Object} The event object.
@@ -1441,37 +1441,37 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1441
  direction = y < 0 ? 'prev' : 'next';
1442
 
1443
  e.preventDefault();
1444
-
1445
  if(!this._moving || this._movingDirection != direction) {
1446
-
1447
  active.setStyle('top', 0);
1448
-
1449
  next.setStyles({
1450
  'opacity': 1,
1451
  'left' : 'auto',
1452
  'top': y < 0 ? -height : height
1453
  });
1454
-
1455
  this._moving = true;
1456
  this._movingDirection = direction;
1457
-
1458
  /**
1459
  * @event moveStart
1460
  */
1461
  this.fire('moveStart', { direction: direction });
1462
  }
1463
-
1464
  active.setStyle('-webkit-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1465
  active.setStyle('-ms-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1466
  next.setStyle('-webkit-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1467
  next.setStyle('-ms-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1468
-
1469
  /**
1470
  * @event move
1471
  */
1472
  this.fire('move');
1473
  },
1474
-
1475
  /**
1476
  * @method _onEndHorizontal
1477
  * @param e {Object} The event object.
@@ -1482,29 +1482,29 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1482
  if(!this._moving) {
1483
  return;
1484
  }
1485
-
1486
  var x = this._startX - e.pageX,
1487
  active = this.get('activeItem'),
1488
  next = this.get('nextItem'),
1489
  width = parseInt(next.getComputedStyle('width'), 10),
1490
  translate = x < 0 ? width : -width;
1491
-
1492
- active.transition({
1493
- 'transform': 'translate('+ translate +'px, 0px)'
1494
  });
1495
-
1496
- next.transition({
1497
- 'transform': 'translate('+ translate +'px, 0px)'
1498
  });
1499
-
1500
  this._transitioning = true;
1501
-
1502
  /**
1503
  * @event end
1504
  */
1505
  this.fire('end');
1506
  },
1507
-
1508
  /**
1509
  * @method _onEndVertical
1510
  * @param e {Object} The event object.
@@ -1515,39 +1515,39 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1515
  if(!this._moving) {
1516
  return;
1517
  }
1518
-
1519
  var y = this._startY - e.pageY,
1520
  active = this.get('activeItem'),
1521
  next = this.get('nextItem'),
1522
  height = parseInt(next.getComputedStyle('height'), 10),
1523
  translate = y < 0 ? height : -height;
1524
-
1525
- active.transition({
1526
- 'transform': 'translate(0px, '+ translate +'px)'
1527
  });
1528
-
1529
- next.transition({
1530
- 'transform': 'translate(0px, '+ translate +'px)'
1531
  });
1532
-
1533
  this._transitioning = true;
1534
-
1535
  /**
1536
  * @event end
1537
  */
1538
  this.fire('end');
1539
  },
1540
-
1541
  /**
1542
  * @method _onEndComplete
1543
  * @protected
1544
- */
1545
  _onEndComplete: function()
1546
  {
1547
  var direction = this.get('direction'),
1548
  active = this.get('activeItem'),
1549
  next = this.get('nextItem');
1550
-
1551
  active.setStyles({
1552
  'opacity': 0,
1553
  '-webkit-transform': '',
@@ -1555,14 +1555,14 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1555
  '-ms-transform': '',
1556
  '-ms-transition': ''
1557
  });
1558
-
1559
  next.setStyles({
1560
  '-webkit-transform': '',
1561
  '-webkit-transition': '',
1562
  '-ms-transform': '',
1563
  '-ms-transition': ''
1564
  });
1565
-
1566
  if(direction == 'horizontal') {
1567
  active.setStyle('left', '-9999px');
1568
  next.setStyle('left', '0px');
@@ -1577,7 +1577,7 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1577
  this._moving = false;
1578
  this._movingDirection = null;
1579
  this._transitioning = false;
1580
-
1581
  /**
1582
  * @event endComplete
1583
  */
@@ -1585,7 +1585,7 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1585
  }
1586
 
1587
  }, {
1588
-
1589
  /**
1590
  * Static property used to define the default attribute configuration of
1591
  * the Widget.
@@ -1608,7 +1608,7 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1608
  direction: {
1609
  value: 'horizontal'
1610
  },
1611
-
1612
  /**
1613
  * The Node that is currently visible.
1614
  *
@@ -1619,7 +1619,7 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1619
  activeItem: {
1620
  value: null
1621
  },
1622
-
1623
  /**
1624
  * The Node that will be transitioned in.
1625
  *
@@ -1635,13 +1635,13 @@ Y.namespace('FL').SlideshowGestures = Y.Base.create('fl-slideshow-gestures', Y.B
1635
 
1636
  /**
1637
  * A load queue for slideshow images.
1638
- *
1639
  * @namespace FL
1640
  * @class SlideshowImageLoader
1641
  * @static
1642
  */
1643
  Y.namespace('FL').SlideshowImageLoader = {
1644
-
1645
  /**
1646
  * Whether an image is being loaded or not.
1647
  *
@@ -1651,7 +1651,7 @@ Y.namespace('FL').SlideshowImageLoader = {
1651
  * @protected
1652
  */
1653
  _loading: false,
1654
-
1655
  /**
1656
  * An node for loading the next image.
1657
  *
@@ -1661,7 +1661,7 @@ Y.namespace('FL').SlideshowImageLoader = {
1661
  * @protected
1662
  */
1663
  _currentImage: null,
1664
-
1665
  /**
1666
  * An object containing the group, src and callback
1667
  * for the current image that is being loaded.
@@ -1672,9 +1672,9 @@ Y.namespace('FL').SlideshowImageLoader = {
1672
  * @protected
1673
  */
1674
  _currentImageData: null,
1675
-
1676
  /**
1677
- * An array of image data objects that contain the group,
1678
  * src and callback for each image that will be loaded.
1679
  *
1680
  * @property _queue
@@ -1683,17 +1683,17 @@ Y.namespace('FL').SlideshowImageLoader = {
1683
  * @protected
1684
  */
1685
  _queue: [],
1686
-
1687
  /**
1688
  * Adds an image to the queue.
1689
  *
1690
  * @method add
1691
- * @param group {String} The group this image is associated with.
1692
  * Used to remove images in bulk.
1693
  * @param src {String} The image url to load.
1694
- * @param callback {Function} A function to call when the image
1695
  * has finished loading.
1696
- * @param bump {Boolean} If true, the image will be added to
1697
  * the first position in the queue.
1698
  */
1699
  add: function(group, src, callback, bump)
@@ -1703,19 +1703,19 @@ Y.namespace('FL').SlideshowImageLoader = {
1703
  src : src,
1704
  callback : callback
1705
  };
1706
-
1707
  if(bump) {
1708
  this._queue.unshift(imgData);
1709
  }
1710
  else {
1711
  this._queue.push(imgData);
1712
  }
1713
-
1714
  if(!this._loading) {
1715
  this._load();
1716
  }
1717
  },
1718
-
1719
  /**
1720
  * Removes a group of images from the queue.
1721
  *
@@ -1725,18 +1725,18 @@ Y.namespace('FL').SlideshowImageLoader = {
1725
  removeGroup: function(group)
1726
  {
1727
  var i = this._queue.length - 1;
1728
-
1729
  for( ; i > -1 ; i--) {
1730
  if(this._queue[i].group == group) {
1731
  this._queue.splice(i, 1);
1732
  }
1733
  }
1734
-
1735
  if(this._currentImageData && this._currentImageData.group == group) {
1736
  this._currentImage.detachAll();
1737
  this._currentImage = null;
1738
  this._currentImageData = null;
1739
-
1740
  if(this._queue.length > 0) {
1741
  this._load();
1742
  }
@@ -1745,7 +1745,7 @@ Y.namespace('FL').SlideshowImageLoader = {
1745
  }
1746
  }
1747
  },
1748
-
1749
  /**
1750
  * Loads the next image in the queue.
1751
  *
@@ -1761,7 +1761,7 @@ Y.namespace('FL').SlideshowImageLoader = {
1761
  this._currentImage.on('load', Y.bind(this._loadComplete, this));
1762
  this._currentImage.set('src', this._currentImageData.src);
1763
  },
1764
-
1765
  /**
1766
  * Calls the current image's callback function if set
1767
  * and loads the next image if the queue is not empty.
@@ -1774,7 +1774,7 @@ Y.namespace('FL').SlideshowImageLoader = {
1774
  if(this._currentImageData.callback) {
1775
  this._currentImageData.callback(this._currentImage);
1776
  }
1777
-
1778
  if(this._queue.length > 0) {
1779
  this._load();
1780
  }
@@ -1796,9 +1796,9 @@ Y.namespace('FL').SlideshowImageLoader = {
1796
  * @extends Widget
1797
  */
1798
  Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget, [Y.WidgetChild], {
1799
-
1800
  /**
1801
- * The imageInfo object used to load the image and
1802
  * its various sizes.
1803
  *
1804
  * @property info
@@ -1807,7 +1807,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1807
  * @protected
1808
  */
1809
  _imageInfo: null,
1810
-
1811
  /**
1812
  * A reference to the current image node in the bounding box.
1813
  *
@@ -1817,7 +1817,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1817
  * @protected
1818
  */
1819
  _image: null,
1820
-
1821
  /**
1822
  * Whether or not new imageInfo is loading.
1823
  *
@@ -1827,7 +1827,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1827
  * @protected
1828
  */
1829
  _loading: false,
1830
-
1831
  /**
1832
  * The URL that is currently being loaded.
1833
  *
@@ -1837,7 +1837,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1837
  * @protected
1838
  */
1839
  _loadingURL: null,
1840
-
1841
  /**
1842
  * An anchor node used for the video play button.
1843
  *
@@ -1845,9 +1845,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1845
  * @type Node
1846
  * @default null
1847
  * @protected
1848
- */
1849
  _videoButton: null,
1850
-
1851
  /**
1852
  * A div node used to hold the video iframe.
1853
  *
@@ -1855,9 +1855,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1855
  * @type Node
1856
  * @default null
1857
  * @protected
1858
- */
1859
  _videoBox: null,
1860
-
1861
  /**
1862
  * An iframe node used to render the video.
1863
  *
@@ -1865,12 +1865,12 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1865
  * @type Node
1866
  * @default null
1867
  * @protected
1868
- */
1869
  _video: null,
1870
-
1871
  /**
1872
  * The default content template for the image
1873
- * inherited from Y.Widget. Set to null since
1874
  * only the bounding box is needed.
1875
  *
1876
  * @property CONTENT_TEMPLATE
@@ -1879,7 +1879,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1879
  * @protected
1880
  */
1881
  CONTENT_TEMPLATE: null,
1882
-
1883
  /**
1884
  * Initial styling for the bounding box.
1885
  *
@@ -1895,7 +1895,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1895
  bb.addClass('fl-slideshow-image-cropped');
1896
  }
1897
  },
1898
-
1899
  /**
1900
  * Sets the imageInfo object and
1901
  * loads the appropriate image size.
@@ -1909,9 +1909,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1909
  this._loading = true;
1910
  this._load();
1911
  },
1912
-
1913
  /**
1914
- * Sets the width and height of the bounding box and
1915
  * preloads an image using the provided imageInfo object.
1916
  *
1917
  * @method preload
@@ -1924,22 +1924,22 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1924
  var isVideo = this._isVideo(),
1925
  loadVideos = this.get('loadVideos'),
1926
  showVideoButton = this.get('showVideoButton');
1927
-
1928
  this.unload();
1929
  this.set('width', width);
1930
  this.set('height', height);
1931
  this._imageInfo = imageInfo;
1932
-
1933
  if(!isVideo || !loadVideos || (isVideo && loadVideos && showVideoButton)) {
1934
  Y.FL.SlideshowImageLoader.add(
1935
- this.get('loadGroup'),
1936
- this._getImageURL(),
1937
- Y.bind(this._imagePreloaded, this),
1938
  this.get('loadPriority')
1939
  );
1940
  }
1941
  },
1942
-
1943
  /**
1944
  * Called when preloading completes.
1945
  *
@@ -1951,7 +1951,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1951
  {
1952
  this._image = img;
1953
  },
1954
-
1955
  /**
1956
  * Unloads the image if there is one loaded
1957
  * and sets the imageInfo object to null.
@@ -1977,12 +1977,12 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1977
  if(this._videoBox) {
1978
  this._removeVideoBox();
1979
  }
1980
-
1981
  this._imageInfo = null;
1982
  this._loading = false;
1983
  this._loadingURL = null;
1984
  },
1985
-
1986
  /**
1987
  * Resizes the bounding box and loads the
1988
  * appropriate image size if necessary.
@@ -1995,7 +1995,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
1995
  {
1996
  var borderWidth = parseInt(this.get('boundingBox').getComputedStyle('borderTopWidth'), 10) * 2,
1997
  bb = this.get('boundingBox');
1998
-
1999
  this.set('width', width - borderWidth);
2000
  this.set('height', height - borderWidth);
2001
  bb.setStyle('width', width - borderWidth + 'px');
@@ -2014,9 +2014,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2014
  if(this._image) {
2015
  this._positionImage();
2016
  }
2017
- }
2018
  },
2019
-
2020
  /**
2021
  * Loads (or reloads) the image or video.
2022
  *
@@ -2027,7 +2027,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2027
  {
2028
  var loadVideos = this.get('loadVideos'),
2029
  showVideoButton = this.get('showVideoButton');
2030
-
2031
  if(this._isVideo() && loadVideos && !showVideoButton && !('ontouchstart' in window)) {
2032
  this._loadVideo();
2033
  }
@@ -2035,10 +2035,10 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2035
  this._loadImage();
2036
  }
2037
  },
2038
-
2039
  /**
2040
  * Loads the appropriate image size if
2041
- * it is not already loading.
2042
  *
2043
  * @method _loadImage
2044
  * @protected
@@ -2047,30 +2047,30 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2047
  {
2048
  var url = this._getImageURL(),
2049
  loadVideos = this.get('loadVideos');
2050
-
2051
  // Already loading.
2052
  if(url == this._loadingURL) {
2053
  return;
2054
  }
2055
-
2056
  // New URL to load.
2057
  this._loadingURL = url;
2058
-
2059
  // Load the new image.
2060
  Y.FL.SlideshowImageLoader.add(
2061
- this.get('loadGroup'),
2062
- this._loadingURL,
2063
- Y.bind(this._loadImageComplete, this),
2064
  this.get('loadPriority')
2065
  );
2066
-
2067
  // Initial load?
2068
  if(this._loading) {
2069
-
2070
  if(this._isVideo() && loadVideos) {
2071
  this._insertVideoButton();
2072
  }
2073
-
2074
  /**
2075
  * Only fires when a new image is being
2076
  * loaded, not a different size.
@@ -2080,7 +2080,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2080
  this.fire('loadStart');
2081
  }
2082
  },
2083
-
2084
  /**
2085
  * Fires when the image has finished loading.
2086
  *
@@ -2091,38 +2091,38 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2091
  {
2092
  var bb = this.get('boundingBox'),
2093
  showVideoButton = this.get('showVideoButton');
2094
-
2095
  this._image = img;
2096
  this._image.setStyle('visibility', 'hidden');
2097
  this._image.addClass('fl-slideshow-image-img');
2098
-
2099
  // Remove load events.
2100
  this._image.detachAll();
2101
-
2102
  // Remove previous videos.
2103
  if(this._video && !showVideoButton) {
2104
  this._video.remove();
2105
  this._video = null;
2106
  }
2107
-
2108
  // Remove the old image.
2109
  bb.all('img').remove();
2110
-
2111
  // Append the new image.
2112
  bb.append(this._image);
2113
-
2114
  // Setup, scale and position the new image.
2115
  this._setupImage();
2116
  this._resizeImage();
2117
  this._positionImage();
2118
  this._image.setStyle('visibility', 'visible');
2119
-
2120
  // Clear the loading url.
2121
  this._loadingURL = null;
2122
-
2123
  // Finish an initial load?
2124
  if(this._loading) {
2125
-
2126
  this._loading = false;
2127
 
2128
  /**
@@ -2134,7 +2134,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2134
  this.fire('loadComplete');
2135
  }
2136
  },
2137
-
2138
  /**
2139
  * UI setup for the new image.
2140
  *
@@ -2144,22 +2144,22 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2144
  _setupImage: function()
2145
  {
2146
  var bb = this.get('boundingBox');
2147
-
2148
  // IE interpolation
2149
  if(typeof this._image._node.style.msInterpolationMode != 'undefined') {
2150
  this._image._node.style.msInterpolationMode = 'bicubic';
2151
  }
2152
-
2153
  // Protection
2154
  if(this.get('protect')) {
2155
  bb.delegate('contextmenu', this._protectImage, 'img');
2156
  bb.delegate('mousedown', this._protectImage, 'img');
2157
  }
2158
  },
2159
-
2160
  /**
2161
  * Fires on contextmenu or mousedown in attempt
2162
- * to keep the image from being copied.
2163
  *
2164
  * @method _protectImage
2165
  * @return {Boolean} Returns false to prevent the default event.
@@ -2170,7 +2170,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2170
  e.preventDefault();
2171
  return false;
2172
  },
2173
-
2174
  /**
2175
  * Resizes the image node.
2176
  *
@@ -2195,20 +2195,20 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2195
  if(this._imageInfo && this.get('checkFilenamesForNoCrop')) {
2196
  noCrop = this._imageInfo.filename.indexOf('nocrop') > -1;
2197
  }
2198
-
2199
  if(this.get('crop') && !(cropHorizontalsOnly && isHorizontal) && !noCrop) {
2200
  newWidth = targetWidth;
2201
- newHeight = Math.round(imageHeight * targetWidth/imageWidth);
2202
-
2203
  if(newHeight < targetHeight) {
2204
  newHeight = targetHeight;
2205
- newWidth = Math.round(imageWidth * targetHeight/imageHeight);
2206
  }
2207
  }
2208
  else {
2209
  xScale = imageWidth/targetWidth;
2210
  yScale = imageHeight/targetHeight;
2211
-
2212
  if (yScale > xScale){
2213
  newWidth = Math.round(imageWidth * (1/yScale));
2214
  newHeight = Math.round(imageHeight * (1/yScale));
@@ -2218,21 +2218,21 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2218
  newHeight = Math.round(imageHeight * (1/xScale));
2219
  }
2220
  }
2221
-
2222
  // Don't resize past the original size?
2223
  if(!this.get('crop') && !this.get('upsize') && (newWidth > imageWidth || newHeight > imageHeight)) {
2224
  newWidth = imageWidth;
2225
  newHeight = imageHeight;
2226
  }
2227
-
2228
  // Compensate for borders.
2229
  newWidth -= borderWidth;
2230
  newHeight -= borderWidth;
2231
-
2232
  // Resize the image.
2233
  this._image.setStyle('width', newWidth + 'px');
2234
  this._image.setStyle('height', newHeight + 'px');
2235
-
2236
  // Constrain bounding box to image size.
2237
  if(!this.get('crop') && this.get('constrainWidth')) {
2238
  this.set('width', newWidth + 'px');
@@ -2241,7 +2241,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2241
  this.set('height', newHeight + 'px');
2242
  }
2243
  },
2244
-
2245
  /**
2246
  * Positions the image within the bounding box.
2247
  *
@@ -2251,7 +2251,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2251
  _positionImage: function()
2252
  {
2253
  var pos = this.get('position').split(' '),
2254
- x = pos[0] === '' ? 'center' : pos[0],
2255
  y = pos[1] === '' ? 'center' : pos[1],
2256
  newX = 0,
2257
  newY = 0,
@@ -2260,42 +2260,42 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2260
  borderWidth = parseInt(this._image.getComputedStyle('borderTopWidth'), 10) * 2,
2261
  imageWidth = parseInt(this._image.getComputedStyle('width'), 10) + borderWidth,
2262
  imageHeight = parseInt(this._image.getComputedStyle('height'), 10) + borderWidth;
2263
-
2264
  if(isNaN(imageWidth) && isNaN(imageHeight)) {
2265
  return;
2266
  }
2267
  if(x == 'left') {
2268
- newX = 0;
2269
  }
2270
  if(x == 'center') {
2271
  newX = (bbWidth - imageWidth)/2;
2272
  }
2273
  if(x == 'right') {
2274
- newX = bbWidth - imageWidth;
2275
  }
2276
-
2277
  if(y == 'top') {
2278
- newY = 0;
2279
  }
2280
  if(y == 'center') {
2281
  newY = (bbHeight - imageHeight)/2;
2282
  }
2283
  if(y == 'bottom') {
2284
- newY = bbHeight - imageHeight;
2285
  }
2286
-
2287
  this._image.setStyles({
2288
  'left': newX,
2289
  'top': newY
2290
  });
2291
  },
2292
-
2293
  /**
2294
- * Gets the appropriate image url based
2295
- * on the size of the bounding box.
2296
  *
2297
  * @method _getImageURL
2298
- * @return {String} The url to load.
2299
  * @protected
2300
  */
2301
  _getImageURL: function()
@@ -2308,8 +2308,8 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2308
  useThumbSizes = this.get('useThumbSizes'),
2309
  i = this._imageInfo,
2310
  sizes = [
2311
- i.tinyURL || i.thumbURL || i.largeURL,
2312
- i.thumbURL || i.largeURL,
2313
  i.smallURL || i.largeURL,
2314
  i.mediumURL || i.largeURL || i.smallURL,
2315
  i.largeURL || i.mediumURL || i.smallURL,
@@ -2317,7 +2317,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2317
  i.x2largeURL || i.largeURL || i.mediumURL || i.smallURL,
2318
  i.x3largeURL || i.x2largeURL || i.largeURL || i.mediumURL || i.smallURL
2319
  ];
2320
-
2321
  // Width
2322
  if(useThumbSizes && targetWidth <= 100) {
2323
  imageWidth = 0;
@@ -2343,7 +2343,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2343
  else {
2344
  imageWidth = 7;
2345
  }
2346
-
2347
  // Height
2348
  if(useThumbSizes && targetHeight <= 100) {
2349
  imageHeight = 0;
@@ -2369,15 +2369,15 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2369
  else {
2370
  imageHeight = 7;
2371
  }
2372
-
2373
  // Get the size number.
2374
  size = Math.max(imageWidth, imageHeight);
2375
-
2376
  return sizes[size];
2377
  },
2378
-
2379
  /**
2380
- * Checks whether this is a video or not.
2381
  *
2382
  * @method _isVideo
2383
  * @protected
@@ -2393,26 +2393,26 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2393
  else if(this._imageInfo.iframe !== '') {
2394
  return true;
2395
  }
2396
-
2397
  return false;
2398
  },
2399
-
2400
  /**
2401
  * @method _loadVideo
2402
  * @protected
2403
- */
2404
  _loadVideo: function()
2405
  {
2406
  var bb = this.get('boundingBox'),
2407
  showVideoButton = this.get('showVideoButton'),
2408
  autoPlay = showVideoButton ? true : false;
2409
-
2410
  // Remove previous videos
2411
  if(this._video) {
2412
  this._video.remove();
2413
  this._video = null;
2414
  }
2415
-
2416
  // Get the video code
2417
  if(this._imageInfo.format == 'mp4' && this._imageInfo.sourceType == 'smugmug') {
2418
  this._video = this._getSmugMugVideoEmbed(this._imageInfo, autoPlay);
@@ -2420,59 +2420,59 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2420
  else if(this._imageInfo.iframe !== '') {
2421
  this._video = this._getIframeVideoEmbed(this._imageInfo, autoPlay);
2422
  }
2423
-
2424
  // Insert the video
2425
  if(this._videoBox) {
2426
- this._videoBox.one('.fl-slideshow-video-wrap').insert(this._video);
2427
  }
2428
  else {
2429
  bb.all('img').remove();
2430
  bb.append(this._video);
2431
  }
2432
-
2433
  // Finish an initial load?
2434
  if(this._loading) {
2435
  this._loading = false;
2436
  this.fire('loadComplete');
2437
  }
2438
  },
2439
-
2440
  /**
2441
  * @method _insertVideoButton
2442
  * @protected
2443
- */
2444
  _insertVideoButton: function()
2445
  {
2446
  var bb = this.get('boundingBox'),
2447
  event = 'ontouchstart' in window ? 'touchstart' : 'click';
2448
-
2449
  this._videoButton = Y.Node.create('<a class="fl-slideshow-video-button" href="javascript:void(0);"></a>');
2450
  this._videoButton.on(event, Y.bind(this._showVideoBox, this));
2451
  bb.insert(this._videoButton);
2452
  this._positionVideoButton();
2453
  },
2454
-
2455
  /**
2456
  * @method _positionVideoButton
2457
  * @protected
2458
- */
2459
  _positionVideoButton: function()
2460
  {
2461
  var bbWidth = this.get('width'),
2462
  bbHeight = this.get('height'),
2463
  buttonWidth = parseInt(this._videoButton.getStyle('width'), 10),
2464
  buttonHeight = parseInt(this._videoButton.getStyle('height'), 10);
2465
-
2466
  this._videoButton.setStyles({
2467
  left: (bbWidth - buttonWidth)/2,
2468
  top: (bbHeight - buttonHeight)/2
2469
  });
2470
  },
2471
-
2472
  /**
2473
  * @method _showVideoBox
2474
  * @protected
2475
- */
2476
  _showVideoBox: function()
2477
  {
2478
  var root = this.get('root'),
@@ -2486,17 +2486,17 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2486
  this._videoBox.insert(close);
2487
  this._videoBox.on(event, Y.bind(this._removeVideoBox, this));
2488
  close.on(event, Y.bind(this._removeVideoBox, this));
2489
-
2490
  if(typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
2491
  close.addClass('sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome');
2492
  }
2493
-
2494
  Y.one('body').insert(this._videoBox);
2495
  this._loadVideo();
2496
-
2497
  Y.one('body').on('fl-slideshow-image|keydown', this._onKey, this);
2498
  },
2499
-
2500
  /**
2501
  * Get the embed code for a SmugMug video.
2502
  *
@@ -2504,24 +2504,24 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2504
  * @param imageInfo {Object} The image info for the embed.
2505
  * @param autoPlay {Boolean} Whether to auto play videos or not.
2506
  * @protected
2507
- */
2508
  _getSmugMugVideoEmbed: function(imageInfo, autoPlay)
2509
  {
2510
  var test = document.createElement('video'),
2511
  width = 0,
2512
- mp4 = '',
2513
  vars = '',
2514
  code = '';
2515
-
2516
  if(Y.UA.mobile !== null && !!test.canPlayType && test.canPlayType('video/mp4')) {
2517
  width = this.get('width');
2518
- mp4 = 'http://www.smugmug.com/photos/' + imageInfo.id + '_' + imageInfo.key + '-' + width + '.mp4';
2519
  code += '<video width="100%" height="100%" poster="'+ this._getImageURL() +'" controls preload="none"';
2520
-
2521
  if(autoPlay) {
2522
  code += ' autoplay';
2523
  }
2524
-
2525
  code += '>';
2526
  code += '<source src="'+ mp4 +'" type="video/mp4" />';
2527
  code += '</video>';
@@ -2529,26 +2529,26 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2529
  else {
2530
  vars = 'imageId=' + imageInfo.id;
2531
  vars += '&amp;imageKey=' + imageInfo.key;
2532
- vars += '&amp;albumId=' + imageInfo.albumId;
2533
- vars += '&amp;albumKey=' + imageInfo.albumKey;
2534
- vars += '&amp;apiURL=http://api.smugmug.com/&amp;hostLevel=live&amp;isPro=true';
2535
-
2536
  if(autoPlay) {
2537
  vars += '&amp;autoPlay=true';
2538
  }
2539
  else {
2540
  vars += '&amp;autoPlay=false';
2541
  }
2542
-
2543
- code += '<object type="application/x-shockwave-flash" width="100%" height="100%" data="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">';
2544
- code += '<param name="movie" value="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">';
2545
  code += '<param name="allowFullScreen" value="true">';
2546
  code += '<param name="wmode" value="transparent">';
2547
  code += '<param name="flashVars" value="' + vars + '">';
2548
- code += '<embed src="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf" flashvars="'+ vars +'" width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent">';
2549
  code += '</object>';
2550
  }
2551
-
2552
  return Y.Node.create(code);
2553
  },
2554
 
@@ -2559,25 +2559,25 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2559
  * @param imageInfo {Object} The image info for the embed.
2560
  * @param autoPlay {Boolean} Whether to auto play videos or not.
2561
  * @protected
2562
- */
2563
  _getIframeVideoEmbed: function(imageInfo, autoPlay)
2564
  {
2565
  var code = '<iframe width="100%" height="100%" frameborder="0" allowfullscreen ',
2566
  url = imageInfo.iframe;
2567
-
2568
  if(autoPlay) {
2569
  url += url.indexOf('?') > -1 ? '&autoplay=1' : '?autoplay=1';
2570
  }
2571
-
2572
  code += 'src="'+ url +'"></iframe>';
2573
 
2574
  return Y.Node.create(code);
2575
  },
2576
-
2577
  /**
2578
  * @method _removeVideoBox
2579
  * @protected
2580
- */
2581
  _removeVideoBox: function(e)
2582
  {
2583
  if(typeof e !== 'undefined' && e.target) {
@@ -2585,16 +2585,16 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2585
  return;
2586
  }
2587
  }
2588
-
2589
  if(this._videoBox !== null) {
2590
  this._videoBox.remove();
2591
  this._videoBox = null;
2592
  this._video = null;
2593
  }
2594
-
2595
  Y.one('body').detach('fl-slideshow-image|keydown', this._onKey);
2596
  },
2597
-
2598
  /**
2599
  * Keyboard input for the esc button.
2600
  *
@@ -2608,12 +2608,12 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2608
  return false;
2609
  }
2610
  }
2611
-
2612
  }, {
2613
 
2614
  /**
2615
  * Custom CSS class name for the widget.
2616
-
2617
  * @property CSS_PREFIX
2618
  * @type String
2619
  * @protected
@@ -2631,7 +2631,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2631
  * @static
2632
  */
2633
  ATTRS: {
2634
-
2635
  /**
2636
  * @attribute loadGroup
2637
  * @type String
@@ -2640,7 +2640,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2640
  loadGroup: {
2641
  value: 'none'
2642
  },
2643
-
2644
  /**
2645
  * @attribute loadPriority
2646
  * @type Boolean
@@ -2649,7 +2649,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2649
  loadPriority: {
2650
  value: false
2651
  },
2652
-
2653
  /**
2654
  * Whether to crop the image.
2655
  *
@@ -2660,7 +2660,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2660
  crop: {
2661
  value: false
2662
  },
2663
-
2664
  /**
2665
  * Checks whether the filename has nocrop in it or not.
2666
  * If it does, the image will not be cropped.
@@ -2672,7 +2672,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2672
  checkFilenamesForNoCrop: {
2673
  value: true
2674
  },
2675
-
2676
  /**
2677
  * Whether to only crop horizontal images or not.
2678
  *
@@ -2683,9 +2683,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2683
  cropHorizontalsOnly: {
2684
  value: false
2685
  },
2686
-
2687
  /**
2688
- * The x and y position of the image
2689
  * within the bounding box.
2690
  *
2691
  * @attribute position
@@ -2695,7 +2695,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2695
  position: {
2696
  value: 'center center'
2697
  },
2698
-
2699
  /**
2700
  * Whether to right click protect the image.
2701
  *
@@ -2706,7 +2706,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2706
  protect: {
2707
  value: true
2708
  },
2709
-
2710
  /**
2711
  * Whether to resize the image past
2712
  * its original width and height.
@@ -2718,7 +2718,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2718
  upsize: {
2719
  value: true
2720
  },
2721
-
2722
  /**
2723
  * Whether to load thumb sizes. Defaults
2724
  * to false since thumb sizes are square.
@@ -2730,9 +2730,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2730
  useThumbSizes: {
2731
  value: false
2732
  },
2733
-
2734
  /**
2735
- * Whether to constrain the width of the
2736
  * bounding box to the width of the image.
2737
  *
2738
  * @attribute constrainWidth
@@ -2742,9 +2742,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2742
  constrainWidth: {
2743
  value: false
2744
  },
2745
-
2746
  /**
2747
- * Whether to constrain the height of the
2748
  * bounding box to the height of the image.
2749
  *
2750
  * @attribute constrainHeight
@@ -2754,7 +2754,7 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2754
  constrainHeight: {
2755
  value: false
2756
  },
2757
-
2758
  /**
2759
  * Whether to load videos or not. The poster
2760
  * image will be loaded if set to false.
@@ -2762,14 +2762,14 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2762
  * @attribute loadVideos
2763
  * @type Boolean
2764
  * @default true
2765
- */
2766
  loadVideos: {
2767
  value: true
2768
  },
2769
-
2770
  /**
2771
  * Whether to show the video play button or not.
2772
- * When clicked, videos will be displayed in a
2773
  * lightbox instead of the slideshow itself.
2774
  *
2775
  * @attribute showVideoButton
@@ -2783,9 +2783,9 @@ Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget,
2783
  });
2784
 
2785
  /**
2786
- * A plugin that turns the cursor into a prev or next arrow when
2787
  * it is over the left or right side of the slideshow.
2788
- *
2789
  * @namespace FL
2790
  * @class SlideshowMouseNav
2791
  * @constructor
@@ -2798,7 +2798,7 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2798
  * @method initializer
2799
  * @protected
2800
  */
2801
- initializer: function()
2802
  {
2803
  var trigger = this.get('trigger');
2804
 
@@ -2806,11 +2806,11 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2806
  trigger.on('mousemove', this._showArrow, this);
2807
  trigger.on('mouseleave', this._hideArrow, this);
2808
  },
2809
-
2810
  /**
2811
  * @method _triggerClick
2812
  * @protected
2813
- */
2814
  _triggerClick: function(e)
2815
  {
2816
  var host = this.get('host'),
@@ -2818,7 +2818,7 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2818
  triggerWidth = parseInt(trigger.getStyle('width'), 10),
2819
  triggerRegion = trigger.get('region'),
2820
  layerX = e.pageX - triggerRegion.left + 5;
2821
-
2822
  if(layerX >= triggerWidth/2) {
2823
  host.nextImage();
2824
  }
@@ -2826,11 +2826,11 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2826
  host.prevImage();
2827
  }
2828
  },
2829
-
2830
  /**
2831
  * @method _showArrow
2832
  * @protected
2833
- */
2834
  _showArrow: function(e)
2835
  {
2836
  var host = this.get('host'),
@@ -2850,19 +2850,19 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2850
  }
2851
  }
2852
  },
2853
-
2854
  /**
2855
  * @method _hideArrow
2856
  * @protected
2857
- */
2858
  _hideArrow: function()
2859
  {
2860
  var trigger = this.get('trigger');
2861
-
2862
  trigger.removeClass('fl-slideshow-mouse-nav-next');
2863
  trigger.removeClass('fl-slideshow-mouse-nav-prev');
2864
  }
2865
-
2866
  }, {
2867
 
2868
  /**
@@ -2874,7 +2874,7 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2874
  * @static
2875
  */
2876
  NS: 'mouseNav',
2877
-
2878
  /**
2879
  * Static property used to define the default attribute configuration of
2880
  * the Plugin.
@@ -2885,7 +2885,7 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2885
  * @static
2886
  */
2887
  ATTRS: {
2888
-
2889
  /**
2890
  * A Node that triggers the arrows.
2891
  *
@@ -2909,25 +2909,25 @@ Y.namespace('FL').SlideshowMouseNav = Y.Base.create('fl-slideshow-mouse-nav', Y.
2909
  * @extends Base
2910
  */
2911
  Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.Base, [], {
2912
-
2913
  /**
2914
  * Runs the Ken Burns effect.
2915
  *
2916
  * @method run
2917
- */
2918
  run: function()
2919
  {
2920
  var imageNode = null,
2921
  transform = null;
2922
-
2923
  if(Y.FL.Utils.cssSupport('transform')) {
2924
-
2925
  // Image node
2926
  imageNode = this.get('image').one('img');
2927
-
2928
  // Transform object
2929
  transform = this._getTransform();
2930
-
2931
  // Apply the start transform
2932
  imageNode.setStyles({
2933
  '-webkit-transform-origin': transform.origin,
@@ -2936,7 +2936,7 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
2936
  'transform-origin': transform.origin,
2937
  'transform': transform.start
2938
  });
2939
-
2940
  // Transition to the end transform
2941
  imageNode.transition({
2942
  easing: 'ease-out',
@@ -2945,13 +2945,13 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
2945
  });
2946
  }
2947
  },
2948
-
2949
  /**
2950
  * @method _getTransform
2951
  * @protected
2952
- */
2953
  _getTransform: function()
2954
- {
2955
  var zoom = this.get('zoom'),
2956
  image = this.get('image'),
2957
  i = 0,
@@ -2961,11 +2961,11 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
2961
  // Random zoom direction
2962
  i = Math.floor(Math.random() * Y.FL.SlideshowKenBurns.ZOOM_DIRECTIONS.length);
2963
  zoomDirection = Y.FL.SlideshowKenBurns.ZOOM_DIRECTIONS[i];
2964
-
2965
  // Random transform
2966
  i = Math.floor(Math.random() * Y.FL.SlideshowKenBurns.TRANSFORMS.length);
2967
  transform = Y.FL.SlideshowKenBurns.TRANSFORMS[i];
2968
-
2969
  // Get the start and end transforms
2970
  if(!image.hasClass('fl-slideshow-image-cropped') && zoomDirection == 'in') {
2971
  i = Math.floor(Math.random() * 2);
@@ -2981,12 +2981,12 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
2981
  transform.start = 'scale(1) translate(0, 0)';
2982
  transform.end = 'scale(' + zoom + ') ' + transform.translate;
2983
  }
2984
-
2985
  return transform;
2986
  }
2987
 
2988
  }, {
2989
-
2990
  /**
2991
  * Static property used to define the default attribute configuration of
2992
  * the Widget.
@@ -2999,8 +2999,8 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
2999
  ATTRS: {
3000
 
3001
  /**
3002
- * An instance of FL.Slideshow image to apply the
3003
- * Ken Burns effect on.
3004
  *
3005
  * @attribute image
3006
  * @type FL.Slideshow
@@ -3017,11 +3017,11 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
3017
  * @attribute scale
3018
  * @type Number
3019
  * @default 1.2
3020
- */
3021
  zoom: {
3022
  value: 1.2
3023
  },
3024
-
3025
  /**
3026
  * The duration of the effect in seconds.
3027
  *
@@ -3033,7 +3033,7 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
3033
  value: 2
3034
  }
3035
  },
3036
-
3037
  /**
3038
  * The zoom directions that can be applied to an image.
3039
  *
@@ -3042,12 +3042,12 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
3042
  * @readOnly
3043
  * @protected
3044
  * @static
3045
- */
3046
  ZOOM_DIRECTIONS: [
3047
- 'in',
3048
  'out'
3049
  ],
3050
-
3051
  /**
3052
  * The types of transforms that can be applied to an image.
3053
  *
@@ -3056,7 +3056,7 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
3056
  * @readOnly
3057
  * @protected
3058
  * @static
3059
- */
3060
  TRANSFORMS: [
3061
  {
3062
  origin : 'left top',
@@ -3081,9 +3081,9 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
3081
  });
3082
 
3083
  /**
3084
- * Navigation buttons widget for controlling a slideshow instance
3085
  * and its child widgets.
3086
- *
3087
  * @namespace FL
3088
  * @class SlideshowNav
3089
  * @constructor
@@ -3091,7 +3091,7 @@ Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.
3091
  * @extends Widget
3092
  */
3093
  Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.WidgetChild], {
3094
-
3095
  /**
3096
  * An object containing the anchor nodes for all buttons.
3097
  *
@@ -3101,7 +3101,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3101
  * @protected
3102
  */
3103
  _buttons: null,
3104
-
3105
  /**
3106
  * An div node containing the anchor nodes for the main buttons.
3107
  *
@@ -3111,7 +3111,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3111
  * @protected
3112
  */
3113
  _buttonsContainer: null,
3114
-
3115
  /**
3116
  * An div node containing the anchor nodes for the left buttons.
3117
  *
@@ -3121,7 +3121,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3121
  * @protected
3122
  */
3123
  _buttonsLeftContainer: null,
3124
-
3125
  /**
3126
  * An div node containing the anchor nodes for the right buttons.
3127
  *
@@ -3131,14 +3131,14 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3131
  * @protected
3132
  */
3133
  _buttonsRightContainer: null,
3134
-
3135
  /**
3136
  * Property map for rendering SmugMug font icons.
3137
  *
3138
  * @property _fontIcons
3139
  * @type Object
3140
  * @protected
3141
- */
3142
  _fontIcons: {
3143
  buy: 'Cart',
3144
  caption: 'InfoEncircled',
@@ -3153,10 +3153,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3153
  social: 'Heart',
3154
  thumbs: 'ViewThumbGrid'
3155
  },
3156
-
3157
  /**
3158
  * The default content template for the nav
3159
- * inherited from Y.Widget. Set to null since
3160
  * only the bounding box is needed.
3161
  *
3162
  * @property CONTENT_TEMPLATE
@@ -3165,10 +3165,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3165
  * @protected
3166
  */
3167
  CONTENT_TEMPLATE: null,
3168
-
3169
  /**
3170
  * Renders the buttons.
3171
- *
3172
  * @method renderUI
3173
  * @protected
3174
  */
@@ -3178,10 +3178,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3178
  this._renderButtons();
3179
  this._renderFontIcons();
3180
  },
3181
-
3182
  /**
3183
  * Binds events to the root slideshow for each button.
3184
- *
3185
  * @method bindUI
3186
  * @protected
3187
  */
@@ -3189,7 +3189,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3189
  {
3190
  var root = this.get('root'),
3191
  id = this.get('id');
3192
-
3193
  if(this._buttons.prev) {
3194
  this._buttons.prev.on('click', root.prevImage, root);
3195
  }
@@ -3200,7 +3200,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3200
  this._buttons.play.on('click', this._playClicked, this);
3201
  root.on(id + '|played', this._showPauseButton, this);
3202
  root.on(id + '|paused', this._showPlayButton, this);
3203
-
3204
  if(root._playing) {
3205
  this._showPauseButton();
3206
  }
@@ -3209,9 +3209,9 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3209
  }
3210
  }
3211
  if(this._buttons.buy) {
3212
-
3213
  root.on(id + '|albumLoadComplete', this._updateBuy, this);
3214
-
3215
  if(root.albumInfo !== null) {
3216
  this._updateBuy();
3217
  }
@@ -3236,7 +3236,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3236
  this._buttons.close.on('click', root.hide, root);
3237
  }
3238
  },
3239
-
3240
  /**
3241
  * @method destructor
3242
  * @protected
@@ -3245,13 +3245,13 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3245
  {
3246
  var root = this.get('root'),
3247
  id = this.get('id');
3248
-
3249
  root.detach(id + '|*');
3250
  },
3251
-
3252
  /**
3253
  * Renders the button left, right and main button containers.
3254
- *
3255
  * @method _renderContainers
3256
  * @protected
3257
  */
@@ -3260,11 +3260,11 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3260
  var cb = this.get('contentBox'),
3261
  buttonsLeft = this.get('buttonsLeft'),
3262
  buttonsRight = this.get('buttonsRight');
3263
-
3264
  this._buttonsContainer = Y.Node.create('<div></div>');
3265
  this._buttonsContainer.addClass('fl-slideshow-nav-buttons');
3266
  cb.appendChild(this._buttonsContainer);
3267
-
3268
  if(buttonsLeft.length > 0) {
3269
  this._buttonsLeftContainer = Y.Node.create('<div></div>');
3270
  this._buttonsLeftContainer.addClass('fl-slideshow-nav-buttons-left');
@@ -3276,11 +3276,11 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3276
  cb.appendChild(this._buttonsRightContainer);
3277
  }
3278
  },
3279
-
3280
  /**
3281
- * Renders the buttons based on the buttons array
3282
  * passed in the configuration object.
3283
- *
3284
  * @method _renderButtons
3285
  * @protected
3286
  */
@@ -3303,14 +3303,14 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3303
  container: this._buttonsRightContainer
3304
  }
3305
  ];
3306
-
3307
  this._buttons = {};
3308
-
3309
  for( ; i < b.length; i++) {
3310
  for(k = 0; k < b[i].names.length; k++) {
3311
-
3312
  name = b[i].names[k];
3313
-
3314
  if(name.indexOf('count') > -1) {
3315
  this._buttons[name] = Y.Node.create('<span></span>');
3316
  this._updateCount();
@@ -3318,28 +3318,28 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3318
  else {
3319
  this._buttons[name] = Y.Node.create('<a href="javascript:void(0);"></a>');
3320
  }
3321
-
3322
  if(name.indexOf('buy') > -1) {
3323
  this._buttons[name].setStyle('display', 'none');
3324
  }
3325
-
3326
  this._buttons[name].set('name', name);
3327
  this._buttons[name].addClass('fl-slideshow-nav-' + name);
3328
  b[i].container.appendChild(this._buttons[name]);
3329
  }
3330
  }
3331
  },
3332
-
3333
  /**
3334
  * Renders SmugMug font icons for each button.
3335
- *
3336
  * @method _renderFontIcons
3337
  * @protected
3338
  */
3339
  _renderFontIcons: function()
3340
  {
3341
  var name = null;
3342
-
3343
  if(this.get('useFontIcons') && typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3344
  for(name in this._buttons) {
3345
  if(typeof this._buttons[name] !== 'undefined' && typeof this._fontIcons[name] !== 'undefined') {
@@ -3352,10 +3352,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3352
  }
3353
  }
3354
  },
3355
-
3356
  /**
3357
- * Updates the image count.
3358
- *
3359
  * @method _updateCount
3360
  * @protected
3361
  */
@@ -3365,21 +3365,21 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3365
  countText = Y.FL.SlideshowNav.COUNT_TEXT,
3366
  current = 1,
3367
  total = 1;
3368
-
3369
  if(this.get('root').albumInfo) {
3370
  current = this.get('root').imageInfo.index + 1;
3371
  total = this.get('root').albumInfo.images.length;
3372
  }
3373
-
3374
  html = countText.replace('{current}', current).replace('{total}', total);
3375
  this._buttons.count.set('innerHTML', html);
3376
  },
3377
-
3378
  /**
3379
  * Shows the caption button if the current image
3380
  * has a caption, hides it if the image does not
3381
- * have a caption.
3382
- *
3383
  * @method _updateCaption
3384
  * @protected
3385
  */
@@ -3387,7 +3387,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3387
  {
3388
  var root = this.get('root'),
3389
  imageInfo = root.imageInfo;
3390
-
3391
  if(imageInfo && imageInfo.caption === '') {
3392
  root.caption.slideshowOverlay.enable();
3393
  root.caption.slideshowOverlay.hide();
@@ -3399,10 +3399,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3399
  this._buttons.caption.removeClass('fl-slideshow-nav-caption-disabled');
3400
  }
3401
  },
3402
-
3403
  /**
3404
  * Checks if buying has been enabled for the current album.
3405
- *
3406
  * @method _updateBuy
3407
  * @protected
3408
  */
@@ -3413,7 +3413,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3413
  rootSource = root.get('source')[root.albumIndex],
3414
  albumIndex = root.albumIndex,
3415
  source = root.get('source')[albumIndex];
3416
-
3417
  if(rootSource && rootSource.type == 'smugmug') {
3418
  if(typeof root.albumInfo.printable !== 'undefined') {
3419
  this._updateBuyComplete();
@@ -3428,11 +3428,11 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3428
  }
3429
  }
3430
  },
3431
-
3432
  /**
3433
  * Shows the buy button and updates the buy url
3434
  * if buying has been enabled.
3435
- *
3436
  * @method _updateBuyComplete
3437
  * @param e {Object} The custom event object passed to this function.
3438
  * @protected
@@ -3442,7 +3442,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3442
  var root = this.get('root'),
3443
  printable = typeof e == 'undefined' ? root.albumInfo.printable : e.Album.Printable,
3444
  link = root.albumInfo.link;
3445
-
3446
  if(printable) {
3447
  root.albumInfo.printable = true;
3448
  this._buttons.buy.set('href', 'https://secure.smugmug.com/cart/batchadd/?url=' + encodeURIComponent(link));
@@ -3452,7 +3452,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3452
  root.albumInfo.printable = false;
3453
  this._buttons.buy.setStyle('display', 'none');
3454
  }
3455
-
3456
  this.fire('resize');
3457
  },
3458
 
@@ -3462,11 +3462,11 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3462
  *
3463
  * @method _playClicked
3464
  * @protected
3465
- */
3466
  _playClicked: function()
3467
  {
3468
  var root = this.get('root');
3469
-
3470
  if(root._playing) {
3471
  root.pause();
3472
  }
@@ -3474,11 +3474,11 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3474
  root.play();
3475
  }
3476
  },
3477
-
3478
  /**
3479
- * Toggles the button class for the play button
3480
- * so pause is hidden and play is shown.
3481
- *
3482
  * @method _showPlayButton
3483
  * @protected
3484
  */
@@ -3486,17 +3486,17 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3486
  {
3487
  this._buttons.play.removeClass('fl-slideshow-nav-pause');
3488
  this._buttons.play.addClass('fl-slideshow-nav-play');
3489
-
3490
  if(this.get('useFontIcons') && typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3491
  this._buttons.play.removeClass('sm-fonticon-PlayerPause');
3492
  this._buttons.play.addClass('sm-fonticon-PlayerPlay');
3493
  }
3494
  },
3495
-
3496
  /**
3497
- * Toggles the button class for the play button
3498
- * so pause is shown and play is hidden.
3499
- *
3500
  * @method _showPauseButton
3501
  * @protected
3502
  */
@@ -3504,13 +3504,13 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3504
  {
3505
  this._buttons.play.removeClass('fl-slideshow-nav-play');
3506
  this._buttons.play.addClass('fl-slideshow-nav-pause');
3507
-
3508
  if(this.get('useFontIcons') && typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3509
  this._buttons.play.removeClass('sm-fonticon-PlayerPlay');
3510
  this._buttons.play.addClass('sm-fonticon-PlayerPause');
3511
  }
3512
  }
3513
-
3514
  }, {
3515
 
3516
  /**
@@ -3522,10 +3522,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3522
  * @static
3523
  */
3524
  CSS_PREFIX: 'fl-slideshow-nav',
3525
-
3526
  /**
3527
- * Static string used for displaying the image count. Use {current}
3528
- * for the current image and {total} for the total number of images.
3529
  * Those placeholders will be replaced when the count node is created.
3530
  *
3531
  * @property COUNT_TEXT
@@ -3534,7 +3534,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3534
  * @static
3535
  */
3536
  COUNT_TEXT: '{current} of {total}',
3537
-
3538
  /**
3539
  * Static property used to define the default attribute configuration of
3540
  * the Widget.
@@ -3545,10 +3545,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3545
  * @static
3546
  */
3547
  ATTRS: {
3548
-
3549
  /**
3550
  * An array of button names that is used to render the main buttons.
3551
- *
3552
  * @attribute buttons
3553
  * @type Array
3554
  * @default []
@@ -3558,10 +3558,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3558
  value: [],
3559
  writeOnce: true
3560
  },
3561
-
3562
  /**
3563
  * An array of button names that is used to render the left buttons.
3564
- *
3565
  * @attribute buttonsLeft
3566
  * @type Array
3567
  * @default []
@@ -3571,10 +3571,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3571
  value: [],
3572
  writeOnce: true
3573
  },
3574
-
3575
  /**
3576
  * An array of button names that is used to render the right buttons.
3577
- *
3578
  * @attribute buttonsRight
3579
  * @type Array
3580
  * @default []
@@ -3584,10 +3584,10 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3584
  value: [],
3585
  writeOnce: true
3586
  },
3587
-
3588
  /**
3589
  * Whether to use font icons when available.
3590
- *
3591
  * @attribute useFontIcons
3592
  * @type Boolean
3593
  * @default true
@@ -3603,7 +3603,7 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3603
  /**
3604
  * A plugin for overlaying widgets in a slideshow
3605
  * with specialized show and hide functionality.
3606
- *
3607
  * @namespace FL
3608
  * @class SlideshowOverlay
3609
  * @constructor
@@ -3611,9 +3611,9 @@ Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.
3611
  * @extends Plugin.Base
3612
  */
3613
  Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plugin.Base, [], {
3614
-
3615
  /**
3616
- * Flag for whether the mouse has entered
3617
  * the host's bounding box.
3618
  *
3619
  * @property _focus
@@ -3622,7 +3622,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3622
  * @protected
3623
  */
3624
  _focus: false,
3625
-
3626
  /**
3627
  * Flag for whether the host's bounding box is visible.
3628
  *
@@ -3632,9 +3632,9 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3632
  * @protected
3633
  */
3634
  _visible: true,
3635
-
3636
  /**
3637
- * Flag for whether show and hide functionality
3638
  * has been disabled.
3639
  *
3640
  * @property _disabled
@@ -3643,9 +3643,9 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3643
  * @protected
3644
  */
3645
  _disabled: false,
3646
-
3647
  /**
3648
- * An object containing properties for the show transition.
3649
  *
3650
  * @property _showProps
3651
  * @type Object
@@ -3656,9 +3656,9 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3656
  easing: 'ease-out',
3657
  opacity: 1
3658
  },
3659
-
3660
  /**
3661
- * An object containing properties for the hide transition.
3662
  *
3663
  * @property _hideProps
3664
  * @type Object
@@ -3679,25 +3679,25 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3679
  * @protected
3680
  */
3681
  _hideTimer: null,
3682
-
3683
  /**
3684
  * @method initializer
3685
  * @protected
3686
  */
3687
- initializer: function()
3688
  {
3689
  var bb = this.get('host').get('boundingBox');
3690
-
3691
  this.afterHostEvent('render', this._initFocus);
3692
  this.afterHostEvent('render', this._initVisibility);
3693
-
3694
  if(this.get('closeButton')) {
3695
  this._initCloseButton();
3696
  }
3697
-
3698
  bb.addClass('fl-slideshow-overlay');
3699
  },
3700
-
3701
  /**
3702
  * @method destructor
3703
  * @protected
@@ -3706,7 +3706,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3706
  {
3707
  this._hideTimerCancel();
3708
  },
3709
-
3710
  /**
3711
  * Binds the mouseenter and mouseleave events for setting focus.
3712
  *
@@ -3719,7 +3719,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3719
  bb.on('mouseenter', Y.bind(this._setFocusOnMouseenter, this));
3720
  bb.on('mouseleave', Y.bind(this._setFocusOnMouseleave, this));
3721
  },
3722
-
3723
  /**
3724
  * Sets the initial visibility of the host's bounding box.
3725
  *
@@ -3730,21 +3730,21 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3730
  {
3731
  var bb = this.get('host').get('boundingBox'),
3732
  hideStyle = this.get('hideStyle');
3733
-
3734
  if(!this.get('visible')) {
3735
-
3736
  if(hideStyle == 'display') {
3737
  bb.setStyle('display', 'none');
3738
  }
3739
  else if(hideStyle == 'left') {
3740
  bb.setStyle('left', '-99999px');
3741
  }
3742
-
3743
  bb.setStyle('opacity', '0');
3744
  this._visible = false;
3745
  }
3746
  },
3747
-
3748
  /**
3749
  * Creates and inserts the close button.
3750
  *
@@ -3755,17 +3755,17 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3755
  {
3756
  var bb = this.get('host').get('boundingBox'),
3757
  closeButton = null;
3758
-
3759
  closeButton = Y.Node.create('<a class="fl-slideshow-overlay-close" href="javascript:void(0);"></a>');
3760
  closeButton.on('click', Y.bind(this._closeButtonClick, this));
3761
-
3762
  if(typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3763
  closeButton.addClass('sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome');
3764
  }
3765
-
3766
  bb.insert(closeButton);
3767
  },
3768
-
3769
  /**
3770
  * Hides the overlay when the close button is clicked.
3771
  *
@@ -3777,7 +3777,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3777
  var bb = this.get('host').get('boundingBox');
3778
  bb.transition(this._hideProps, Y.bind(this._hideComplete, this));
3779
  },
3780
-
3781
  /**
3782
  * Sets the focus flag to true.
3783
  *
@@ -3788,7 +3788,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3788
  {
3789
  this._focus = true;
3790
  },
3791
-
3792
  /**
3793
  * Sets the focus flag to false.
3794
  *
@@ -3799,7 +3799,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3799
  {
3800
  this._focus = false;
3801
  },
3802
-
3803
  /**
3804
  * Disables show and hide functionality.
3805
  *
@@ -3810,7 +3810,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3810
  {
3811
  this._disabled = true;
3812
  },
3813
-
3814
  /**
3815
  * Enables show and hide functionality.
3816
  *
@@ -3821,7 +3821,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3821
  {
3822
  this._disabled = false;
3823
  },
3824
-
3825
  /**
3826
  * Shows the host's bounding box with a fade in transition.
3827
  *
@@ -3832,26 +3832,26 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3832
  {
3833
  var bb = this.get('host').get('boundingBox'),
3834
  hideStyle = this.get('hideStyle');
3835
-
3836
  if(this._disabled) {
3837
  return;
3838
  }
3839
-
3840
  if(hideStyle == 'display') {
3841
  bb.setStyle('display', 'block');
3842
  }
3843
  else if(hideStyle == 'left') {
3844
  bb.setStyle('left', 'auto');
3845
  }
3846
-
3847
  bb.transition(this._showProps, Y.bind(this._showComplete, this));
3848
-
3849
  /**
3850
  * @event hideStart
3851
  */
3852
  this.fire('showStart');
3853
  },
3854
-
3855
  /**
3856
  * @method _showComplete
3857
  * @protected
@@ -3860,13 +3860,13 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3860
  {
3861
  this._visible = true;
3862
  this.hideWithTimer();
3863
-
3864
  /**
3865
  * @event showComplete
3866
  */
3867
  this.fire('showComplete');
3868
  },
3869
-
3870
  /**
3871
  * Hides the host's bounding box with a fade out transition.
3872
  *
@@ -3878,16 +3878,16 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3878
  if(this._focus || this._disabled) {
3879
  return;
3880
  }
3881
-
3882
  var bb = this.get('host').get('boundingBox');
3883
  bb.transition(this._hideProps, Y.bind(this._hideComplete, this));
3884
-
3885
  /**
3886
  * @event hideStart
3887
  */
3888
  this.fire('hideStart');
3889
  },
3890
-
3891
  /**
3892
  * Hides the host's bounding box with a fade out transition
3893
  * after a timer completes.
@@ -3900,7 +3900,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3900
  this._hideTimerCancel();
3901
  this._hideTimer = Y.later(this.get('hideDelay'), this, this.hide);
3902
  },
3903
-
3904
  /**
3905
  * Cancels the hide timer.
3906
  *
@@ -3914,7 +3914,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3914
  this._hideTimer = null;
3915
  }
3916
  },
3917
-
3918
  /**
3919
  * @method _hideComplete
3920
  * @protected
@@ -3923,22 +3923,22 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3923
  {
3924
  var bb = this.get('host').get('boundingBox'),
3925
  hideStyle = this.get('hideStyle');
3926
-
3927
  if(hideStyle == 'display') {
3928
  bb.setStyle('display', 'none');
3929
  }
3930
  else if(hideStyle == 'left') {
3931
  bb.setStyle('left', '-99999px');
3932
  }
3933
-
3934
  this._visible = false;
3935
-
3936
  /**
3937
  * @event hideComplete
3938
  */
3939
  this.fire('hideComplete');
3940
  }
3941
-
3942
  }, {
3943
 
3944
  /**
@@ -3950,7 +3950,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3950
  * @static
3951
  */
3952
  NS: 'slideshowOverlay',
3953
-
3954
  /**
3955
  * Static property used to define the default attribute configuration of
3956
  * the plugin.
@@ -3961,7 +3961,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3961
  * @static
3962
  */
3963
  ATTRS: {
3964
-
3965
  /**
3966
  * Whether to use the close button or not.
3967
  *
@@ -3974,7 +3974,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3974
  value: false,
3975
  writeOnce: true
3976
  },
3977
-
3978
  /**
3979
  * The time to wait before hiding the host's bounding box.
3980
  * Measured in milliseconds.
@@ -3988,7 +3988,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
3988
  value: 3000,
3989
  writeOnce: true
3990
  },
3991
-
3992
  /**
3993
  * The style to use for hiding the image. Possible
3994
  * values are display and left.
@@ -4002,10 +4002,10 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
4002
  value: 'display',
4003
  writeOnce: true
4004
  },
4005
-
4006
  /**
4007
  * Sets the initial visibility of the host's boudning box.
4008
- *
4009
  * @attribute visible
4010
  * @type Boolean
4011
  * @default true
@@ -4020,7 +4020,7 @@ Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plu
4020
 
4021
  /**
4022
  * Social buttons widget used in slideshows.
4023
- *
4024
  * @namespace FL
4025
  * @class SlideshowSocial
4026
  * @constructor
@@ -4039,7 +4039,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4039
  * @protected
4040
  */
4041
  _buttons: null,
4042
-
4043
  /**
4044
  * @method renderUI
4045
  * @protected
@@ -4047,12 +4047,12 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4047
  renderUI: function()
4048
  {
4049
  this._buttons = {};
4050
-
4051
  if(this.get('root').get('googlePlusButtonEnabled')) {
4052
  this._renderGooglePlusButton();
4053
  }
4054
  },
4055
-
4056
  /**
4057
  * @method bindUI
4058
  * @protected
@@ -4060,7 +4060,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4060
  bindUI: function()
4061
  {
4062
  var root = this.get('root');
4063
-
4064
  if(root.get('likeButtonEnabled')) {
4065
  root.on('imageLoadComplete', Y.bind(this._updateLikeButton, this));
4066
  }
@@ -4074,7 +4074,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4074
  root.on('imageLoadComplete', Y.bind(this._updatePinterestButton, this));
4075
  }
4076
  },
4077
-
4078
  /**
4079
  * @method _updateLikeButton
4080
  * @protected
@@ -4087,22 +4087,22 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4087
  albumIndex = root.albumIndex,
4088
  rootSource = root.get('source')[albumIndex],
4089
  imageInfo = root.imageInfo;
4090
-
4091
  if(this._buttons.like) {
4092
  this._buttons.like.remove();
4093
  this._buttons.like = null;
4094
  }
4095
-
4096
  if(rootSource.type == 'smugmug') {
4097
  src = 'https://www.facebook.com/plugins/like.php?';
4098
- src += 'href=' + 'http://www.smugmug.com/services/graph/gallery/';
4099
  src += rootSource.id + '_' + rootSource.key +'/' + imageInfo.id + '_' + imageInfo.key;
4100
  }
4101
  else {
4102
  src = 'https://www.facebook.com/plugins/like.php?';
4103
  src += 'href=' + encodeURIComponent(imageInfo.largeURL);
4104
  }
4105
-
4106
  src += '&send=false';
4107
  src += '&layout=button_count';
4108
  src += '&width=90';
@@ -4110,9 +4110,9 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4110
  src += '&action=like';
4111
  src += '&colorscheme=light';
4112
  src += '&height=21';
4113
-
4114
  this._buttons.like = Y.Node.create('<iframe src="'+ src +'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>');
4115
-
4116
  this._buttons.like.setStyles({
4117
  overflow: 'hidden',
4118
  width: '90px',
@@ -4121,7 +4121,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4121
 
4122
  cb.appendChild(this._buttons.like);
4123
  },
4124
-
4125
  /**
4126
  * @method _updateTweetButton
4127
  * @protected
@@ -4131,18 +4131,18 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4131
  var src = null,
4132
  imageInfo = this.get('root').imageInfo,
4133
  cb = this.get('contentBox');
4134
-
4135
  if(this._buttons.tweet) {
4136
  this._buttons.tweet.remove();
4137
  this._buttons.tweet = null;
4138
  }
4139
-
4140
  src = 'https://platform.twitter.com/widgets/tweet_button.html?';
4141
  src += 'url=' + encodeURIComponent(imageInfo.largeURL);
4142
  src += '&count=none';
4143
-
4144
  this._buttons.tweet = Y.Node.create('<iframe src="'+ src +'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>');
4145
-
4146
  this._buttons.tweet.setStyles({
4147
  overflow: 'hidden',
4148
  width: '90px',
@@ -4151,7 +4151,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4151
 
4152
  cb.appendChild(this._buttons.tweet);
4153
  },
4154
-
4155
  /**
4156
  * @method _renderGooglePlusButton
4157
  * @protected
@@ -4159,15 +4159,15 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4159
  _renderGooglePlusButton: function()
4160
  {
4161
  var po, head;
4162
-
4163
- po = document.createElement('script');
4164
- po.type = 'text/javascript';
4165
  po.src = 'https://apis.google.com/js/plusone.js';
4166
-
4167
- head = document.getElementsByTagName('head')[0];
4168
  head.parentNode.appendChild(po);
4169
  },
4170
-
4171
  /**
4172
  * @method _updateGooglePlusButton
4173
  * @protected
@@ -4181,7 +4181,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4181
  this._updateGooglePlusButtonCallback();
4182
  }
4183
  },
4184
-
4185
  /**
4186
  * @method _updateGooglePlusButtonCallback
4187
  * @protected
@@ -4190,7 +4190,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4190
  {
4191
  var imageInfo = this.get('root').imageInfo,
4192
  cb = this.get('contentBox');
4193
-
4194
  if(this._buttons.plus) {
4195
  this._buttons.plus.remove();
4196
  this._buttons.plus = null;
@@ -4198,7 +4198,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4198
  if(typeof gapi != 'undefined') {
4199
  this._buttons.plus = Y.Node.create('<div></div>');
4200
  cb.appendChild(this._buttons.plus);
4201
-
4202
  gapi.plusone.render(this._buttons.plus._node, {
4203
  href: encodeURIComponent(imageInfo.largeURL),
4204
  annotation: 'bubble',
@@ -4206,7 +4206,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4206
  });
4207
  }
4208
  },
4209
-
4210
  /**
4211
  * @method _updatePinterestButton
4212
  * @protected
@@ -4216,16 +4216,16 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4216
  var href = 'https://pinterest.com/pin/create/button/',
4217
  imageInfo = this.get('root').imageInfo,
4218
  cb = this.get('contentBox');
4219
-
4220
  if(this._buttons.pin) {
4221
  this._buttons.pin.remove();
4222
  this._buttons.pin = null;
4223
  }
4224
-
4225
  href += '?url=' + encodeURIComponent(window.location.href);
4226
  href += '&media='+ encodeURIComponent(imageInfo.mediumURL);
4227
  href += '&description='+ encodeURIComponent(imageInfo.caption);
4228
-
4229
  this._buttons.pin = Y.Node.create('<a></a>');
4230
  this._buttons.pin.setAttribute('data-pin-config', 'none');
4231
  this._buttons.pin.setAttribute('data-pin-do', 'buttonPin');
@@ -4235,7 +4235,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4235
 
4236
  cb.appendChild(this._buttons.pin);
4237
  }
4238
-
4239
  }, {
4240
 
4241
  /**
@@ -4247,7 +4247,7 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4247
  * @static
4248
  */
4249
  CSS_PREFIX: 'fl-slideshow-social',
4250
-
4251
  /**
4252
  * Static property used to define the default attribute configuration of
4253
  * the Widget.
@@ -4258,13 +4258,13 @@ Y.namespace('FL').SlideshowSocial = Y.Base.create('fl-slideshow-social', Y.Widge
4258
  * @static
4259
  */
4260
  ATTRS: {
4261
-
4262
  }
4263
  });
4264
 
4265
  /**
4266
  * Creates a grid of FL.SlideshowImage instances.
4267
- *
4268
  * @namespace FL
4269
  * @class SlideshowThumbs
4270
  * @constructor
@@ -4293,7 +4293,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4293
  * @protected
4294
  */
4295
  _pagesBox: null,
4296
-
4297
  /**
4298
  * A reference to the active page div node. Holds a grid
4299
  * of FL.SlideshowImage instances.
@@ -4304,7 +4304,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4304
  * @protected
4305
  */
4306
  _activePageBox: null,
4307
-
4308
  /**
4309
  * The index of the active page of thumbs.
4310
  *
@@ -4314,7 +4314,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4314
  * @protected
4315
  */
4316
  _activePageIndex: 0,
4317
-
4318
  /**
4319
  * A reference to the next page div node. Holds a grid
4320
  * of FL.SlideshowImage instances.
@@ -4325,7 +4325,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4325
  * @protected
4326
  */
4327
  _nextPageBox: null,
4328
-
4329
  /**
4330
  * An array of FL.SlideshowImage instances in the active page.
4331
  *
@@ -4335,7 +4335,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4335
  * @protected
4336
  */
4337
  _activeImages: null,
4338
-
4339
  /**
4340
  * An array of FL.SlideshowImage instances used to
4341
  * preload the next page of images.
@@ -4346,7 +4346,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4346
  * @protected
4347
  */
4348
  _nextImages: null,
4349
-
4350
  /**
4351
  * An array of FL.SlideshowImage instances used to
4352
  * preload the previous page of images.
@@ -4357,7 +4357,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4357
  * @protected
4358
  */
4359
  _prevImages: null,
4360
-
4361
  /**
4362
  * An instance of FL.SlideshowNav used for the left nav.
4363
  *
@@ -4367,7 +4367,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4367
  * @protected
4368
  */
4369
  _leftNav: null,
4370
-
4371
  /**
4372
  * An instance of FL.SlideshowNav used for the right nav.
4373
  *
@@ -4377,7 +4377,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4377
  * @protected
4378
  */
4379
  _rightNav: null,
4380
-
4381
  /**
4382
  * An instance of FL.SlideshowNav used for the top nav.
4383
  *
@@ -4387,7 +4387,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4387
  * @protected
4388
  */
4389
  _topNav: null,
4390
-
4391
  /**
4392
  * An instance of FL.SlideshowNav used for the bottom nav.
4393
  *
@@ -4397,7 +4397,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4397
  * @protected
4398
  */
4399
  _bottomNav: null,
4400
-
4401
  /**
4402
  * Height of the bounding box.
4403
  *
@@ -4407,7 +4407,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4407
  * @protected
4408
  */
4409
  _bbHeight: 0,
4410
-
4411
  /**
4412
  * Width of the bounding box.
4413
  *
@@ -4417,7 +4417,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4417
  * @protected
4418
  */
4419
  _bbWidth: 0,
4420
-
4421
  /**
4422
  * Width of the content box.
4423
  *
@@ -4427,7 +4427,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4427
  * @protected
4428
  */
4429
  _cbWidth: 0,
4430
-
4431
  /**
4432
  * Left margin of the clip box.
4433
  *
@@ -4437,7 +4437,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4437
  * @protected
4438
  */
4439
  _clipBoxMarginLeft: 0,
4440
-
4441
  /**
4442
  * Top position of the clip box.
4443
  *
@@ -4447,7 +4447,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4447
  * @protected
4448
  */
4449
  _clipBoxTop: 0,
4450
-
4451
  /**
4452
  * The number of columns per page.
4453
  *
@@ -4457,7 +4457,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4457
  * @protected
4458
  */
4459
  _colsPerPage: 0,
4460
-
4461
  /**
4462
  * The number of rows per page.
4463
  *
@@ -4467,7 +4467,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4467
  * @protected
4468
  */
4469
  _rowsPerPage: 0,
4470
-
4471
  /**
4472
  * The number of images per page.
4473
  *
@@ -4477,7 +4477,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4477
  * @protected
4478
  */
4479
  _imagesPerPage: 0,
4480
-
4481
  /**
4482
  * The number of pages.
4483
  *
@@ -4487,7 +4487,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4487
  * @protected
4488
  */
4489
  _numPages: 0,
4490
-
4491
  /**
4492
  * Height of the pages.
4493
  *
@@ -4497,7 +4497,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4497
  * @protected
4498
  */
4499
  _pageHeight: 0,
4500
-
4501
  /**
4502
  * Width of the pages.
4503
  *
@@ -4507,7 +4507,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4507
  * @protected
4508
  */
4509
  _pageWidth: 0,
4510
-
4511
  /**
4512
  * The horizontal spacing between thumbs.
4513
  *
@@ -4517,7 +4517,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4517
  * @protected
4518
  */
4519
  _horizontalSpacing: 0,
4520
-
4521
  /**
4522
  * The vertical spacing between thumbs.
4523
  *
@@ -4527,7 +4527,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4527
  * @protected
4528
  */
4529
  _verticalSpacing: 0,
4530
-
4531
  /**
4532
  * Width of the left nav.
4533
  *
@@ -4537,7 +4537,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4537
  * @protected
4538
  */
4539
  _leftNavWidth: 0,
4540
-
4541
  /**
4542
  * Width of the right nav.
4543
  *
@@ -4547,7 +4547,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4547
  * @protected
4548
  */
4549
  _rightNavWidth: 0,
4550
-
4551
  /**
4552
  * An instance of FL.SlideshowTransition for the current transition.
4553
  *
@@ -4557,7 +4557,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4557
  * @protected
4558
  */
4559
  _transition: null,
4560
-
4561
  /**
4562
  * Whether the pages are currently transitioning or not.
4563
  *
@@ -4567,7 +4567,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4567
  * @protected
4568
  */
4569
  _transitioning: false,
4570
-
4571
  /**
4572
  * Direction of the current transition.
4573
  *
@@ -4577,7 +4577,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4577
  * @protected
4578
  */
4579
  _transitionDirection: 'next',
4580
-
4581
  /**
4582
  * Provides functionality for gesture based transitions
4583
  * between the active and next pages.
@@ -4588,7 +4588,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4588
  * @protected
4589
  */
4590
  _gestures: null,
4591
-
4592
  /**
4593
  * Initialize image vars.
4594
  *
@@ -4601,7 +4601,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4601
  this._nextImages = [];
4602
  this._prevImages = [];
4603
  },
4604
-
4605
  /**
4606
  * Renders the UI boxes.
4607
  *
@@ -4613,10 +4613,10 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4613
  this._renderBoxes();
4614
  this._renderNavs();
4615
  },
4616
-
4617
  /**
4618
  * Binds the UI events.
4619
- *
4620
  * @method bindUI
4621
  * @protected
4622
  */
@@ -4625,22 +4625,22 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4625
  var root = this.get('root'),
4626
  id = this.get('id'),
4627
  transition = this.get('transition');
4628
-
4629
  root.on(id + '|albumLoadComplete', this._albumLoadComplete, this);
4630
-
4631
  if('ontouchstart' in window && this.get('touchSupport')) {
4632
-
4633
  this._gestures = new Y.FL.SlideshowGestures({
4634
  direction: transition == 'slideVertical' ? 'vertical' : 'horizontal',
4635
  activeItem: this._activePageBox,
4636
  nextItem: this._nextPageBox
4637
  });
4638
-
4639
  this._gestures.on('moveStart', this._gesturesMoveStart, this);
4640
  this._gestures.on('endComplete', this._gesturesEndComplete, this);
4641
  }
4642
  },
4643
-
4644
  /**
4645
  * Syncs the UI boxes.
4646
  *
@@ -4652,7 +4652,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4652
  this._syncBoxes();
4653
  this._syncNavs();
4654
  },
4655
-
4656
  /**
4657
  * @method destructor
4658
  * @protected
@@ -4661,12 +4661,12 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4661
  {
4662
  var root = this.get('root'),
4663
  id = this.get('id');
4664
-
4665
  root.detach(id + '|*');
4666
-
4667
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
4668
  },
4669
-
4670
  /**
4671
  * Unload all images.
4672
  *
@@ -4677,16 +4677,16 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4677
  var root = this.get('root'),
4678
  id = this.get('id'),
4679
  i = 0;
4680
-
4681
  root.detach(id + '|imageLoadComplete');
4682
-
4683
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
4684
-
4685
  for( ; i < this._activeImages.length; i++) {
4686
  this._activeImages[i].unload();
4687
  }
4688
  },
4689
-
4690
  /**
4691
  * Resizes the UI boxes.
4692
  *
@@ -4698,14 +4698,14 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4698
  this._togglePageButtons();
4699
  this._resizeBoxes();
4700
  this._resizeNavs();
4701
-
4702
  if(this.get('root').albumInfo) {
4703
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
4704
  this._renderActivePage();
4705
  this._preloadNextPage();
4706
  this._preloadPrevPage();
4707
  }
4708
-
4709
  // Enable or disable gestures.
4710
  if(this._gestures && this._numPages < 2) {
4711
  this._gestures.disable();
@@ -4714,7 +4714,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4714
  this._gestures.enable();
4715
  }
4716
  },
4717
-
4718
  /**
4719
  * Transitions to the previous page.
4720
  *
@@ -4724,9 +4724,9 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4724
  prevPage: function()
4725
  {
4726
  if(this._transitioning) {
4727
- return;
4728
  }
4729
-
4730
  this._transitionStart('prev');
4731
  },
4732
 
@@ -4739,15 +4739,15 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4739
  nextPage: function()
4740
  {
4741
  if(this._transitioning) {
4742
- return;
4743
  }
4744
-
4745
  this._transitionStart('next');
4746
  },
4747
-
4748
  /**
4749
  * Called when an album is loaded into the root slideshow widget.
4750
- *
4751
  * @method _albumLoadComplete
4752
  * @protected
4753
  */
@@ -4755,14 +4755,14 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4755
  {
4756
  var root = this.get('root'),
4757
  id = this.get('id');
4758
-
4759
  root.once(id + '|imageLoadComplete', this.resize, this);
4760
  root.on(id + '|imageLoadComplete', this._imageLoadComplete, this);
4761
  },
4762
-
4763
  /**
4764
  * Called when an image is loaded into the root slideshow widget.
4765
- *
4766
  * @method _imageLoadComplete
4767
  * @protected
4768
  */
@@ -4773,11 +4773,11 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4773
  lastInfo = lastActive ? lastActive._imageInfo : null,
4774
  nextActive = null,
4775
  nextInfo = this.get('root').imageInfo;
4776
-
4777
  this._setActiveImage(this._activeImages);
4778
-
4779
  nextActive = Y.one('.fl-slideshow-image-active');
4780
-
4781
  if(lastActive && !nextActive) {
4782
  if(nextInfo.index === 0 && lastInfo.index === albumInfo.images.length - 1) {
4783
  this.nextPage();
@@ -4793,7 +4793,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4793
  }
4794
  }
4795
  },
4796
-
4797
  /**
4798
  * Renders the boxes.
4799
  *
@@ -4806,23 +4806,23 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4806
  this._clipBox = Y.Node.create('<div></div>');
4807
  this._clipBox.addClass('fl-slideshow-thumbs-clip');
4808
  this.get('contentBox').insert(this._clipBox);
4809
-
4810
  // Pages box
4811
  this._pagesBox = Y.Node.create('<div></div>');
4812
  this._pagesBox.addClass('fl-slideshow-thumbs-pages');
4813
  this._clipBox.insert(this._pagesBox);
4814
-
4815
  // Active page box
4816
  this._activePageBox = Y.Node.create('<div></div>');
4817
  this._activePageBox.addClass('fl-slideshow-thumbs-page');
4818
  this._pagesBox.insert(this._activePageBox);
4819
-
4820
  // Next page box
4821
  this._nextPageBox = Y.Node.create('<div></div>');
4822
  this._nextPageBox.addClass('fl-slideshow-thumbs-page');
4823
  this._pagesBox.insert(this._nextPageBox);
4824
  },
4825
-
4826
  /**
4827
  * Syncs the boxes.
4828
  *
@@ -4833,11 +4833,11 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4833
  {
4834
  // Active page box
4835
  this._activePageBox.setStyle('left', '0');
4836
-
4837
  // Next page box
4838
  this._nextPageBox.setStyle('left', '-9999px');
4839
  },
4840
-
4841
  /**
4842
  * Resizes the boxes.
4843
  *
@@ -4848,28 +4848,28 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4848
  {
4849
  this.set('width', this._bbWidth);
4850
  this.set('height', this._bbHeight);
4851
-
4852
  this.get('contentBox').setStyle('width', this._cbWidth + 'px');
4853
-
4854
  this._clipBox.setStyle('width', this._pageWidth + 'px');
4855
  this._clipBox.setStyle('height', this._pageHeight + 'px');
4856
  this._clipBox.setStyle('padding', this._verticalSpacing + 'px 0 0 ' + this._horizontalSpacing + 'px ');
4857
  this._clipBox.setStyle('margin', '0 0 0 ' + this._clipBoxMarginLeft + 'px');
4858
  this._clipBox.setStyle('top', this._clipBoxTop);
4859
-
4860
  this._pagesBox.setStyle('width', this._pageWidth + 'px');
4861
  this._pagesBox.setStyle('height', this._pageHeight + 'px');
4862
-
4863
  this._activePageBox.setStyle('width', this._pageWidth + 'px');
4864
  this._activePageBox.setStyle('height', this._pageHeight + 'px');
4865
-
4866
  this._nextPageBox.setStyle('width', this._pageWidth + 'px');
4867
  this._nextPageBox.setStyle('height', this._pageHeight + 'px');
4868
  },
4869
-
4870
  /**
4871
  * Renders the active page of images.
4872
- *
4873
  * @method _renderActivePage
4874
  * @protected
4875
  */
@@ -4880,9 +4880,9 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4880
  imageIndex = this._imagesPerPage * this._activePageIndex,
4881
  endIndex = imageIndex + this._imagesPerPage,
4882
  images = root.albumInfo.images;
4883
-
4884
  this._clearActiveImage();
4885
-
4886
  // Remove current images
4887
  for( ; i < this._activeImages.length; i++) {
4888
  this._activeImages[i].remove();
@@ -4890,34 +4890,34 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4890
  this._activeImages[i].get('boundingBox')._imageInfo = null;
4891
  this._activeImages[i].get('boundingBox').remove();
4892
  }
4893
-
4894
  // Draw images
4895
  for(i = 0; imageIndex < endIndex; imageIndex++) {
4896
-
4897
  if(!images[imageIndex]) {
4898
  break;
4899
  }
4900
-
4901
  this._renderImage(this._activeImages, i, this._activePageBox, images[imageIndex]);
4902
  i++;
4903
  }
4904
-
4905
  this._setActiveImage(this._activeImages);
4906
  },
4907
-
4908
  /**
4909
  * Renders the next page of images.
4910
- *
4911
  * @method _renderNextPage
4912
  * @protected
4913
- */
4914
  _renderNextPage: function()
4915
  {
4916
- var i = 0,
4917
  imageArray = this._transitionDirection == 'next' ? this._nextImages : this._prevImages;
4918
-
4919
  this._nextPageBox.get('children').remove();
4920
-
4921
  for( ; i < imageArray.length; i++) {
4922
  if(imageArray[i]._imageInfo) {
4923
  this._renderImage(imageArray, i, this._nextPageBox, imageArray[i]._imageInfo);
@@ -4926,13 +4926,13 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4926
  break;
4927
  }
4928
  }
4929
-
4930
  this._setActiveImage(imageArray);
4931
  },
4932
-
4933
  /**
4934
  * Preloads the next page of images.
4935
- *
4936
  * @method _preloadNextPage
4937
  * @protected
4938
  */
@@ -4942,23 +4942,23 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4942
 
4943
  this._preloadPage(pageIndex, this._nextImages);
4944
  },
4945
-
4946
  /**
4947
  * Preloads the previous page of images.
4948
- *
4949
  * @method _preloadPrevPage
4950
  * @protected
4951
  */
4952
  _preloadPrevPage: function()
4953
  {
4954
  var pageIndex = this._activePageIndex - 1 < 0 ? this._numPages - 1 : this._activePageIndex - 1;
4955
-
4956
  this._preloadPage(pageIndex, this._prevImages);
4957
  },
4958
-
4959
  /**
4960
  * Preloads a page of images.
4961
- *
4962
  * @method _preloadPage
4963
  * @param imageIndex {Number} The image index to start preloading from.
4964
  * @param imageArray {Array} The array to store the preloaded images.
@@ -4974,40 +4974,40 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
4974
  imageConfig = this.get('imageConfig'),
4975
  width = imageConfig.width,
4976
  height = imageConfig.height;
4977
-
4978
  if(this._numPages > 1) {
4979
-
4980
  // Unload existing images
4981
  for( ; i < imageArray.length; i++) {
4982
  imageArray[i].remove();
4983
  imageArray[i].unload();
4984
  }
4985
-
4986
  // Preload the images
4987
  for(i = 0; imageIndex < endIndex; imageIndex++) {
4988
-
4989
  if(!images[imageIndex]) {
4990
  continue;
4991
  }
4992
-
4993
  this._renderImage(imageArray, i);
4994
  imageArray[i].preload(images[imageIndex], width, height);
4995
  i++;
4996
  }
4997
  }
4998
  },
4999
-
5000
  /**
5001
  * Renders an image.
5002
- *
5003
  * @method _renderImage
5004
  * @protected
5005
  */
5006
  _renderImage: function(imageArray, i, page, imageInfo)
5007
  {
5008
- var imageBB = null,
5009
  imageConfig = this.get('imageConfig');
5010
-
5011
  // Create the image?
5012
  if(typeof imageArray[i] == 'undefined') {
5013
  imageConfig.loadGroup = 'thumbs';
@@ -5019,25 +5019,25 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5019
  imageBB.on('mouseover', this._imageMouseover, this);
5020
  imageBB.on('mouseout', this._imageMouseout, this);
5021
  }
5022
-
5023
  // Image bounding box
5024
  imageBB = imageArray[i].get('boundingBox');
5025
  imageBB.setStyle('margin', '0 ' + this._horizontalSpacing + 'px ' + this._verticalSpacing + 'px 0');
5026
-
5027
- // Add the image to a page?
5028
  if(page) {
5029
  this._childrenContainer = page;
5030
  this.add(imageArray[i]);
5031
  imageArray[i].resize(imageConfig.width, imageConfig.height);
5032
  }
5033
-
5034
  // Load the image?
5035
  if(imageInfo) {
5036
  imageArray[i].load(imageInfo);
5037
  imageBB._imageInfo = imageInfo;
5038
  }
5039
  },
5040
-
5041
  /**
5042
  * Overrides the WidgetParent _uiAddChild method so _renderImage
5043
  * will render to the appropriate page.
@@ -5045,32 +5045,32 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5045
  * @method _uiAddChild
5046
  * @protected
5047
  * @param child {Widget} The child Widget instance to render.
5048
- * @param parentNode {Object} The Node under which the
5049
  * child Widget is to be rendered. Set to the appropriate page
5050
  * in the _renderImage method by setting _childrenContainer.
5051
- */
5052
- _uiAddChild: function (child, parentNode)
5053
  {
5054
  child.render(parentNode);
5055
  parentNode.appendChild(child.get('boundingBox'));
5056
  },
5057
-
5058
  /**
5059
  * Called when an image is clicked.
5060
- *
5061
  * @method _imageClick
5062
  * @protected
5063
  */
5064
  _imageClick: function(e)
5065
  {
5066
  var root = this.get('root');
5067
-
5068
  if(this.get('pauseOnClick')) {
5069
  root.pause();
5070
  }
5071
-
5072
  root.loadImage(e.currentTarget._imageInfo.index);
5073
-
5074
  /**
5075
  * Fires when an image is clicked.
5076
  *
@@ -5078,10 +5078,10 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5078
  */
5079
  this.fire('imageClick');
5080
  },
5081
-
5082
  /**
5083
  * Sets the active image.
5084
- *
5085
  * @method _setActiveImage
5086
  * @param imageArray {Array} The image array to check for the active image.
5087
  * @protected
@@ -5089,9 +5089,9 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5089
  _setActiveImage: function(imageArray)
5090
  {
5091
  var i = 0;
5092
-
5093
  this._clearActiveImage();
5094
-
5095
  for( ; i < imageArray.length; i++) {
5096
  if(imageArray[i]._imageInfo) {
5097
  if(imageArray[i]._imageInfo.index == this.get('root').imageInfo.index) {
@@ -5101,33 +5101,33 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5101
  }
5102
  }
5103
  },
5104
-
5105
  /**
5106
  * Removes the class name 'fl-slideshow-image-active'
5107
  * from the active image.
5108
- *
5109
  * @method _clearActiveImage
5110
  * @protected
5111
  */
5112
  _clearActiveImage: function()
5113
  {
5114
  var active = Y.one('.fl-slideshow-image-active');
5115
-
5116
  if(active) {
5117
  active.removeClass('fl-slideshow-image-active');
5118
  }
5119
  },
5120
-
5121
  /**
5122
  * Gets the transition type.
5123
- *
5124
  * @method _getTransition
5125
  * @protected
5126
  */
5127
  _getTransition: function()
5128
  {
5129
  var transition = this.get('transition');
5130
-
5131
  if(transition == 'slideHorizontal' && this._transitionDirection == 'next') {
5132
  return 'slideLeft';
5133
  }
@@ -5140,10 +5140,10 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5140
  else if(transition == 'slideVertical' && this._transitionDirection == 'prev') {
5141
  return 'slideDown';
5142
  }
5143
-
5144
  return transition;
5145
  },
5146
-
5147
  /**
5148
  * Starts the transition, moving in the provided direction.
5149
  *
@@ -5154,32 +5154,32 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5154
  _transitionStart: function(direction)
5155
  {
5156
  if(this._numPages > 1) {
5157
-
5158
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
5159
-
5160
  this._transitionDirection = direction;
5161
  this._transitioning = true;
5162
  this._nextPageBox.setStyle('left', '0px');
5163
  this._renderNextPage();
5164
-
5165
  this._transition = new Y.FL.SlideshowTransition({
5166
- itemIn: this._nextPageBox,
5167
  itemOut: this._activePageBox,
5168
- type: this._getTransition(),
5169
  duration: this.get('transitionDuration'),
5170
  easing: this.get('transitionEasing')
5171
  });
5172
-
5173
  this._transition.once('complete', this._transitionComplete, this);
5174
  this._transition.run();
5175
-
5176
  // Disable gestures if set.
5177
  if(this._gestures) {
5178
  this._gestures.disable();
5179
  }
5180
  }
5181
  },
5182
-
5183
  /**
5184
  * Transition cleanup called when the current transition ends.
5185
  *
@@ -5192,12 +5192,12 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5192
  this._transitioning = false;
5193
  this._transitionDirection = '';
5194
  this._transition = null;
5195
-
5196
  // Enable gestures if set.
5197
  if(this._gestures) {
5198
  this._gestures.enable();
5199
  }
5200
-
5201
  /**
5202
  * Fires when a page transition completes.
5203
  *
@@ -5205,7 +5205,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5205
  */
5206
  this.fire('transitionComplete');
5207
  },
5208
-
5209
  /**
5210
  * @method _gesturesMoveStart
5211
  * @param e {Object} The event object.
@@ -5214,26 +5214,26 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5214
  _gesturesMoveStart: function(e)
5215
  {
5216
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
5217
-
5218
  this._transitionDirection = e.direction;
5219
  this._renderNextPage();
5220
  },
5221
-
5222
  /**
5223
  * @method _gesturesEndComplete
5224
  * @protected
5225
- */
5226
  _gesturesEndComplete: function()
5227
  {
5228
  this._swapPageRefs();
5229
  this._transitionDirection = '';
5230
  this.fire('transitionComplete');
5231
  },
5232
-
5233
  /**
5234
- * Swaps the active page and next page references when
5235
  * a transition completes and sets the active page index.
5236
- *
5237
  * @method _swapPageRefs
5238
  * @protected
5239
  */
@@ -5241,11 +5241,11 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5241
  {
5242
  var lastBox = this._activePageBox,
5243
  lastImages = this._activeImages;
5244
-
5245
  this._activePageBox = this._nextPageBox;
5246
  this._nextPageBox = lastBox;
5247
  this._nextPageBox.setStyle('left', '-9999px');
5248
-
5249
  if(this._transitionDirection == 'next') {
5250
  this._activeImages = this._nextImages;
5251
  this._nextImages = lastImages;
@@ -5254,11 +5254,11 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5254
  this._activeImages = this._prevImages;
5255
  this._prevImages = lastImages;
5256
  }
5257
-
5258
  // Active page index
5259
  if(this._transitionDirection == 'next' && this._activePageIndex + 1 < this._numPages) {
5260
  this._activePageIndex++;
5261
- }
5262
  else if(this._transitionDirection == 'next') {
5263
  this._activePageIndex = 0;
5264
  }
@@ -5268,17 +5268,17 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5268
  else if(this._transitionDirection == 'prev') {
5269
  this._activePageIndex = this._numPages - 1;
5270
  }
5271
-
5272
  // Swap gesture refs
5273
  if(this._gestures) {
5274
  this._gestures.set('activeItem', this._activePageBox);
5275
  this._gestures.set('nextItem', this._nextPageBox);
5276
  }
5277
-
5278
  this._preloadNextPage();
5279
  this._preloadPrevPage();
5280
  },
5281
-
5282
  /**
5283
  * Renders the enabled navs.
5284
  *
@@ -5291,7 +5291,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5291
  rightNavButtons = this.get('rightNavButtons'),
5292
  bottomNavButtons = this.get('bottomNavButtons'),
5293
  leftNavButtons = this.get('leftNavButtons');
5294
-
5295
  if(this.get('topNavEnabled') && topNavButtons.length > 0) {
5296
  this._topNav = new Y.FL.SlideshowNav({ buttons: topNavButtons });
5297
  this._topNav.get('boundingBox').addClass('fl-slideshow-thumbs-top-nav');
@@ -5322,7 +5322,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5322
  this._bindNavEvents(this._leftNav);
5323
  }
5324
  },
5325
-
5326
  /**
5327
  * Syncs the navs.
5328
  *
@@ -5332,7 +5332,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5332
  _syncNavs: function()
5333
  {
5334
  var rightNavBB, bottomNavBB, leftNavBB;
5335
-
5336
  if(this._rightNav) {
5337
  rightNavBB = this._rightNav.get('boundingBox');
5338
  rightNavBB.setStyle('position', 'absolute');
@@ -5352,7 +5352,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5352
  leftNavBB.setStyle('left', '0px');
5353
  }
5354
  },
5355
-
5356
  /**
5357
  * Resizes the navs.
5358
  *
@@ -5364,7 +5364,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5364
  var rightNavBB,
5365
  leftNavBB,
5366
  marginTop;
5367
-
5368
  if(this._rightNav) {
5369
  rightNavBB = this._rightNav.get('boundingBox');
5370
  marginTop = this._bbHeight/2 - parseInt(rightNavBB.getComputedStyle('height'), 10)/2;
@@ -5376,7 +5376,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5376
  leftNavBB.setStyle('marginTop', marginTop + 'px');
5377
  }
5378
  },
5379
-
5380
  /**
5381
  * Binds events to the provided nav.
5382
  *
@@ -5392,10 +5392,10 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5392
  if(nav._buttons.nextPage) {
5393
  nav._buttons.nextPage.on('click', this.nextPage, this);
5394
  }
5395
-
5396
  nav.on('resize', this.resize, this);
5397
  },
5398
-
5399
  /**
5400
  * Hides the prev page and next page buttons
5401
  * if there is only one page of thumbs.
@@ -5417,7 +5417,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5417
  this._setSizeInfo();
5418
  }
5419
  },
5420
-
5421
  /**
5422
  * Sets the size info used when resizing and loading pages.
5423
  *
@@ -5464,25 +5464,25 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5464
  clipBoxTop = 0,
5465
  availHorizSpace = 0,
5466
  availVerticalSpace = 0;
5467
-
5468
  // Position absolute causes some resizing bugs.
5469
  bb.setStyle('position', 'relative');
5470
-
5471
  // Bounding box width
5472
  if(!isNaN(columns)) {
5473
  bbWidth = pageWidth = columns * (imageConfig.width + horizontalSpacing) + horizontalSpacing;
5474
  }
5475
-
5476
  // Bounding box height
5477
  if(!isNaN(rows)) {
5478
  bbHeight = pageHeight = rows * (imageConfig.height + verticalSpacing) + verticalSpacing;
5479
  }
5480
-
5481
  // Compensate for the navs
5482
  if(this._leftNav) {
5483
-
5484
  leftNavWidth = parseInt(this._leftNav.get('boundingBox').getComputedStyle('width'), 10);
5485
-
5486
  if(isNaN(columns)) {
5487
  pageWidth -= leftNavWidth;
5488
  }
@@ -5491,9 +5491,9 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5491
  }
5492
  }
5493
  if(this._rightNav) {
5494
-
5495
  rightNavWidth = parseInt(this._rightNav.get('boundingBox').getComputedStyle('width'), 10);
5496
-
5497
  if(isNaN(columns)) {
5498
  pageWidth -= rightNavWidth;
5499
  }
@@ -5504,7 +5504,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5504
  if(this._topNav) {
5505
 
5506
  topNavHeight = parseInt(this._topNav.get('boundingBox').getComputedStyle('height'), 10);
5507
-
5508
  if(isNaN(rows)) {
5509
  pageHeight -= topNavHeight;
5510
  }
@@ -5515,7 +5515,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5515
  if(this._bottomNav) {
5516
 
5517
  bottomNavHeight = parseInt(this._bottomNav.get('boundingBox').getComputedStyle('height'), 10);
5518
-
5519
  if(isNaN(rows)) {
5520
  pageHeight -= bottomNavHeight;
5521
  }
@@ -5523,43 +5523,43 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5523
  bbHeight += bottomNavHeight;
5524
  }
5525
  }
5526
-
5527
  // Columns per page
5528
  if(isNaN(columns)) {
5529
  colsPerPage = Math.floor(pageWidth/(imageConfig.width + horizontalSpacing));
5530
  colsPerPage = colsPerPage < 1 ? 1 : colsPerPage;
5531
  }
5532
-
5533
  // Rows per page
5534
  if(isNaN(rows)) {
5535
  rowsPerPage = Math.floor(pageHeight/(imageConfig.height + verticalSpacing));
5536
  rowsPerPage = rowsPerPage < 1 ? 1 : rowsPerPage;
5537
  }
5538
-
5539
  // Images per page
5540
  imagesPerPage = colsPerPage * rowsPerPage;
5541
-
5542
  // Number of pages
5543
  if(root.albumInfo) {
5544
  numPages = Math.ceil(root.albumInfo.images.length/imagesPerPage);
5545
  }
5546
-
5547
  // Horizontal spacing
5548
  if(isNaN(columns) && spaceEvenly) {
5549
- horizontalSpacing = Math.floor((pageWidth - (imageConfig.width * colsPerPage))/(colsPerPage + 1));
5550
  }
5551
-
5552
  // Vertical spacing
5553
  if(isNaN(rows) && spaceEvenly) {
5554
  verticalSpacing = Math.floor((pageHeight - (imageConfig.height * rowsPerPage))/(rowsPerPage + 1));
5555
  }
5556
-
5557
  // Content container width
5558
  if(root.albumInfo && centerSinglePage && numPages == 1 && rowsPerPage == 1) {
5559
-
5560
  cbWidth = root.albumInfo.images.length * imageConfig.width;
5561
  cbWidth += horizontalSpacing * (root.albumInfo.images.length + 1);
5562
-
5563
  if(this._leftNav) {
5564
  cbWidth += leftNavWidth;
5565
  }
@@ -5570,7 +5570,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5570
  else {
5571
  cbWidth = bbWidth;
5572
  }
5573
-
5574
  // Final page width and height
5575
  if(root.albumInfo && centerSinglePage && numPages == 1 && rowsPerPage == 1) {
5576
  pageWidth = root.albumInfo.images.length * imageConfig.width;
@@ -5579,16 +5579,16 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5579
  else {
5580
  pageWidth = colsPerPage * (imageConfig.width + horizontalSpacing);
5581
  }
5582
-
5583
  pageHeight = rowsPerPage * (imageConfig.height + verticalSpacing);
5584
-
5585
- // Clip box margin left
5586
  if(numPages < 2) {
5587
  clipBoxMarginLeft = leftNavWidth;
5588
  }
5589
  else {
5590
  availHorizSpace = bbWidth;
5591
-
5592
  if(this._rightNav) {
5593
  availHorizSpace -= rightNavWidth;
5594
  }
@@ -5600,22 +5600,22 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5600
  clipBoxMarginLeft = (availHorizSpace - pageWidth - horizontalSpacing)/2;
5601
  }
5602
  }
5603
-
5604
- // Clip box margin top
5605
  if(numPages > 1 && !spaceEvenly) {
5606
 
5607
  availVerticalSpace = bbHeight;
5608
-
5609
  if(this._topNav) {
5610
  availVerticalSpace -= topNavHeight;
5611
  }
5612
  if(this._bottomNav) {
5613
  availVerticalSpace -= bottomNavHeight;
5614
  }
5615
-
5616
  clipBoxTop = (availVerticalSpace - (verticalSpacing + pageHeight))/2;
5617
  }
5618
-
5619
  // Set the info
5620
  this._bbHeight = bbHeight;
5621
  this._bbWidth = bbWidth;
@@ -5633,11 +5633,11 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5633
  this._horizontalSpacing = horizontalSpacing;
5634
  this._verticalSpacing = verticalSpacing;
5635
  this._activePageIndex = Math.floor(root.imageIndex/this._imagesPerPage);
5636
-
5637
  // Set back to the initial position.
5638
  bb.setStyle('position', bbPosition);
5639
  }
5640
-
5641
  }, {
5642
 
5643
  /**
@@ -5649,7 +5649,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5649
  * @static
5650
  */
5651
  CSS_PREFIX: 'fl-slideshow-thumbs',
5652
-
5653
  /**
5654
  * Static property used to define the default attribute configuration of
5655
  * the Widget.
@@ -5660,9 +5660,9 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5660
  * @static
5661
  */
5662
  ATTRS: {
5663
-
5664
  /**
5665
- * The number of thumbnail columns. If set to auto, the number of
5666
  * columns will be calculated based on the width of the parent node.
5667
  *
5668
  * @attribute columns
@@ -5672,9 +5672,9 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5672
  columns: {
5673
  value: 'auto'
5674
  },
5675
-
5676
  /**
5677
- * The number of thumbnail rows. If set to auto, the number of
5678
  * rows will be calculated based on the height of the parent node.
5679
  *
5680
  * @attribute rows
@@ -5684,7 +5684,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5684
  rows: {
5685
  value: 'auto'
5686
  },
5687
-
5688
  /**
5689
  * The horizontal spacing between thumbs.
5690
  *
@@ -5695,7 +5695,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5695
  horizontalSpacing: {
5696
  value: 15
5697
  },
5698
-
5699
  /**
5700
  * The vertical spacing between thumbs.
5701
  *
@@ -5706,7 +5706,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5706
  verticalSpacing: {
5707
  value: 15
5708
  },
5709
-
5710
  /**
5711
  * Whether to space the thumbs evenly within a page.
5712
  *
@@ -5717,7 +5717,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5717
  spaceEvenly: {
5718
  value: true
5719
  },
5720
-
5721
  /**
5722
  * Whether to center single pages of thumbs.
5723
  *
@@ -5728,7 +5728,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5728
  centerSinglePage: {
5729
  value: true
5730
  },
5731
-
5732
  /**
5733
  * Whether to pause the parent slideshow when a thumb is clicked.
5734
  *
@@ -5739,7 +5739,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5739
  pauseOnClick: {
5740
  value: false
5741
  },
5742
-
5743
  /**
5744
  * The type of transition to use between pages.
5745
  *
@@ -5750,7 +5750,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5750
  transition: {
5751
  value: 'slideHorizontal'
5752
  },
5753
-
5754
  /**
5755
  * The duration of the transition between pages.
5756
  *
@@ -5761,10 +5761,10 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5761
  transitionDuration: {
5762
  value: 0.8
5763
  },
5764
-
5765
  /**
5766
  * The type of transition easing to use between pages.
5767
- *
5768
  * @attribute transitionEasing
5769
  * @type String
5770
  * @default ease-out
@@ -5772,11 +5772,11 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5772
  transitionEasing: {
5773
  value: 'ease-out'
5774
  },
5775
-
5776
  /**
5777
- * The configuration object used to create new instances of
5778
  * FL.SlideshowImage. See the API docs for {@link FL.SlideshowImage}
5779
- * for a complete list of configuration attributes.
5780
  *
5781
  * @attribute imageConfig
5782
  * @type Object
@@ -5789,7 +5789,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5789
  height: 50
5790
  }
5791
  },
5792
-
5793
  /**
5794
  * Whether to use the top nav or not.
5795
  *
@@ -5800,7 +5800,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5800
  topNavEnabled: {
5801
  value: false
5802
  },
5803
-
5804
  /**
5805
  * An array of button names used to render the top nav buttons.
5806
  *
@@ -5811,18 +5811,18 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5811
  topNavButtons: {
5812
  value: ['prevPage', 'nextPage']
5813
  },
5814
-
5815
  /**
5816
  * Whether to use the right nav or not.
5817
  *
5818
  * @attribute rightNavEnabled
5819
  * @type Boolean
5820
  * @default true
5821
- */
5822
  rightNavEnabled: {
5823
  value: true
5824
  },
5825
-
5826
  /**
5827
  * An array of button names used to render the right nav buttons.
5828
  *
@@ -5833,7 +5833,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5833
  rightNavButtons: {
5834
  value: ['nextPage']
5835
  },
5836
-
5837
  /**
5838
  * Whether to use the bottom nav or not.
5839
  *
@@ -5844,7 +5844,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5844
  bottomNavEnabled: {
5845
  value: false
5846
  },
5847
-
5848
  /**
5849
  * An array of button names used to render the bottom nav buttons.
5850
  *
@@ -5855,7 +5855,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5855
  bottomNavButtons:{
5856
  value: ['prevPage', 'nextPage']
5857
  },
5858
-
5859
  /**
5860
  * Whether to use the left nav or not.
5861
  *
@@ -5866,7 +5866,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5866
  leftNavEnabled: {
5867
  value: true
5868
  },
5869
-
5870
  /**
5871
  * An array of button names used to render the left nav buttons.
5872
  *
@@ -5877,9 +5877,9 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5877
  leftNavButtons:{
5878
  value: ['prevPage']
5879
  },
5880
-
5881
  /**
5882
- * Whether to use touch gestures, when available,
5883
  * to transition between pages or not.
5884
  *
5885
  * @attribute touchSupport
@@ -5902,7 +5902,7 @@ Y.namespace('FL').SlideshowThumbs = Y.Base.create('fl-slideshow-thumbs', Y.Widge
5902
  * @extends Base
5903
  */
5904
  Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition', Y.Base, [], {
5905
-
5906
  /**
5907
  * The transition function to use when run is called.
5908
  *
@@ -5912,7 +5912,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
5912
  * @protected
5913
  */
5914
  _transitionFunction: '_transitionFade',
5915
-
5916
  /**
5917
  * The current transition type.
5918
  *
@@ -5924,13 +5924,13 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
5924
  _type: 'fade',
5925
 
5926
  /**
5927
- * Parses the transition type and sets the _transitionFunction
5928
  * used when run is called.
5929
  *
5930
  * @method initializer
5931
  * @protected
5932
- */
5933
- initializer: function()
5934
  {
5935
  var type = this.get('type'),
5936
  typeArray = [],
@@ -5940,14 +5940,14 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
5940
  isSlideshowImage = this._isSlideshowImage(),
5941
  itemIn = this.get('itemIn'),
5942
  itemOut = this.get('itemOut');
5943
-
5944
  // Check for random transitions.
5945
  if(type.indexOf(',') > -1) {
5946
  typeArray = type.split(',');
5947
  typeArray.sort(function() { return 0.5 - Math.random(); });
5948
  type = typeArray[0];
5949
  }
5950
-
5951
  // Make sure we can run this transition, otherwise set a fallback.
5952
  if(!isSlideshowImage && isSlideshowImageTransition) {
5953
  type = 'fade';
@@ -5962,40 +5962,40 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
5962
  }
5963
  }
5964
  }
5965
-
5966
  // Set the transition function and type.
5967
  if(Y.FL.SlideshowTransition.TYPES[type]) {
5968
  this._transitionFunction = types[type];
5969
  this._type = type;
5970
  }
5971
-
5972
  // Setup the items.
5973
  this._setupItems();
5974
  },
5975
-
5976
  /**
5977
  * Fires the start event and calls the transition function.
5978
  *
5979
  * @method run
5980
- */
5981
  run: function()
5982
  {
5983
  /**
5984
  * Fires when the transition starts.
5985
  *
5986
  * @event start
5987
- */
5988
  this.fire('start');
5989
-
5990
  this[this._transitionFunction].call(this);
5991
  },
5992
-
5993
  /**
5994
  * Set initial styles for the items.
5995
  *
5996
  * @method _setupItems
5997
  * @protected
5998
- */
5999
  _setupItems: function()
6000
  {
6001
  var itemIn = this.get('itemIn'),
@@ -6004,7 +6004,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6004
  if(itemIn) {
6005
  itemIn.setStyle('zIndex', 2);
6006
  itemIn.setStyle('opacity', 1);
6007
-
6008
  if(Y.FL.Utils.cssSupport('transform')) {
6009
  itemIn.setStyle('transform', 'translate(0, 0)');
6010
  }
@@ -6017,29 +6017,29 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6017
  itemOut.setStyle('zIndex', 1);
6018
  }
6019
  },
6020
-
6021
  /**
6022
  * Checks if the transition is being run
6023
  * on an instance of FL.SlideshowImage or not.
6024
  *
6025
  * @method _isSlideshowImage
6026
  * @protected
6027
- */
6028
  _isSlideshowImage: function()
6029
  {
6030
  var itemIn = this.get('itemIn'),
6031
  itemOut = this.get('itemOut');
6032
-
6033
  if(itemIn && itemIn.hasClass('fl-slideshow-image')) {
6034
  return true;
6035
  }
6036
  else if(itemOut && itemOut.hasClass('fl-slideshow-image')) {
6037
  return true;
6038
  }
6039
-
6040
  return false;
6041
  },
6042
-
6043
  /**
6044
  * Starts the transtion using the provided property objects.
6045
  *
@@ -6047,7 +6047,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6047
  * @param propsIn {Object} The properties to animate in.
6048
  * @param propsOut {Object} The properties to animate out.
6049
  * @protected
6050
- */
6051
  _transitionStart: function(propsIn, propsOut)
6052
  {
6053
  var itemIn = this.get('itemIn'),
@@ -6056,7 +6056,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6056
  itemOutCallback = !itemIn ? itemInCallback : null,
6057
  duration = this.get('duration'),
6058
  easing = this.get('easing');
6059
-
6060
  if(itemIn) {
6061
  propsIn.duration = propsIn.duration || duration;
6062
  propsIn.easing = propsIn.easing || easing;
@@ -6067,7 +6067,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6067
  propsOut.easing = propsOut.easing || easing;
6068
  itemOut.transition(propsOut);
6069
  }
6070
-
6071
  if(itemInCallback) {
6072
  Y.later(propsIn.duration * 1000 + 100, null, itemInCallback);
6073
  }
@@ -6075,53 +6075,53 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6075
  Y.later(propsOut.duration * 1000 + 100, null, itemOutCallback);
6076
  }
6077
  },
6078
-
6079
  /**
6080
  * Clean up method called when the transition completes.
6081
  *
6082
  * @method _transitionComplete
6083
  * @protected
6084
- */
6085
  _transitionComplete: function()
6086
  {
6087
  this._set('itemIn', null);
6088
  this._set('itemOut', null);
6089
-
6090
  /**
6091
  * Fires when the transition completes.
6092
  *
6093
  * @event complete
6094
- */
6095
  this.fire('complete');
6096
  },
6097
-
6098
  /**
6099
  * No transition.
6100
  *
6101
  * @method _transitionNone
6102
  * @protected
6103
- */
6104
  _transitionNone: function()
6105
  {
6106
  var itemIn = this.get('itemIn'),
6107
  itemOut = this.get('itemOut');
6108
-
6109
  if(itemIn) {
6110
  itemIn.setStyle('opacity', 1);
6111
  }
6112
  if(itemOut) {
6113
  itemOut.setStyle('opacity', 0);
6114
  }
6115
-
6116
  this._transitionComplete();
6117
  },
6118
-
6119
  /**
6120
  * Fade transition.
6121
  *
6122
  * @method _transitionFade
6123
  * @protected
6124
- */
6125
  _transitionFade: function()
6126
  {
6127
  var itemIn = this.get('itemIn');
@@ -6129,16 +6129,16 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6129
  if(itemIn) {
6130
  itemIn.setStyle('opacity', 0);
6131
  }
6132
-
6133
  this._transitionStart({ opacity: 1 },{ opacity: 0 });
6134
  },
6135
-
6136
  /**
6137
  * Slide left transition.
6138
  *
6139
  * @method _transitionSlideLeft
6140
  * @protected
6141
- */
6142
  _transitionSlideLeft: function()
6143
  {
6144
  if(Y.FL.Utils.cssSupport('transform')) {
@@ -6153,13 +6153,13 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6153
  this._jsTransitionSlide('left');
6154
  }
6155
  },
6156
-
6157
  /**
6158
  * Slide right transition.
6159
  *
6160
  * @method _transitionSlideRight
6161
  * @protected
6162
- */
6163
  _transitionSlideRight: function()
6164
  {
6165
  if(Y.FL.Utils.cssSupport('transform')) {
@@ -6174,13 +6174,13 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6174
  this._jsTransitionSlide('right');
6175
  }
6176
  },
6177
-
6178
  /**
6179
  * Slide up transition.
6180
  *
6181
  * @method _transitionSlideUp
6182
  * @protected
6183
- */
6184
  _transitionSlideUp: function()
6185
  {
6186
  if(Y.FL.Utils.cssSupport('transform')) {
@@ -6195,15 +6195,15 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6195
  this._jsTransitionSlide('up');
6196
  }
6197
  },
6198
-
6199
  /**
6200
  * Slide down transition.
6201
  *
6202
  * @method _transitionSlideDown
6203
  * @protected
6204
- */
6205
  _transitionSlideDown: function()
6206
- {
6207
  if(Y.FL.Utils.cssSupport('transform')) {
6208
  this._cssTransitionSlide({
6209
  inStart: 'translate(0, -100%)',
@@ -6216,19 +6216,19 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6216
  this._jsTransitionSlide('down');
6217
  }
6218
  },
6219
-
6220
  /**
6221
  * JavaScript slide transition.
6222
  *
6223
  * @method _jsTransitionSlide
6224
  * @protected
6225
- */
6226
  _jsTransitionSlide: function(direction)
6227
  {
6228
  var itemIn = this.get('itemIn'),
6229
  itemOut = this.get('itemOut'),
6230
  itemOutEnd = 0;
6231
-
6232
  // Item Out
6233
  if(itemOut && direction == 'left') {
6234
  itemOutEnd = -parseInt(itemOut.getStyle('width'), 10);
@@ -6242,7 +6242,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6242
  if(itemOut && direction == 'down') {
6243
  itemOutEnd = parseInt(itemOut.getStyle('height'), 10);
6244
  }
6245
-
6246
  // Item In
6247
  if(itemIn) {
6248
  itemIn.setStyle('opacity', 1);
@@ -6259,7 +6259,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6259
  if(itemIn && direction == 'down') {
6260
  itemIn.setStyle('top', '-' + itemIn.getStyle('height'));
6261
  }
6262
-
6263
  // Transition Start
6264
  if(direction == 'left' || direction == 'right') {
6265
  this._transitionStart({ left: 0 },{ left: itemOutEnd });
@@ -6268,21 +6268,21 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6268
  this._transitionStart({ top: 0 },{ top: itemOutEnd });
6269
  }
6270
  },
6271
-
6272
  /**
6273
  * CSS slide transition.
6274
  *
6275
  * @method _cssTransitionSlide
6276
  * @protected
6277
- */
6278
  _cssTransitionSlide: function(props)
6279
- {
6280
  var itemIn = this.get('itemIn'),
6281
  itemOut = this.get('itemOut'),
6282
  transformProp = Y.UA.chrome < 36 ? 'transform' : '-webkit-transform',
6283
  inProps = {},
6284
  outProps = {};
6285
-
6286
  inProps[transformProp] = props.inEnd;
6287
  outProps[transformProp] = props.outEnd;
6288
 
@@ -6295,21 +6295,21 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6295
  itemOut.setStyle('transition', '');
6296
  itemOut.setStyle(transformProp, props.outStart);
6297
  }
6298
-
6299
  this._transitionStart(inProps, outProps);
6300
  },
6301
-
6302
  /**
6303
  * Bars and blinds transition.
6304
  *
6305
  * @method _transitionBars
6306
  * @protected
6307
- */
6308
  _transitionBars: function()
6309
  {
6310
  // Hide the image until the slices have transitioned in.
6311
  this.get('itemIn').one('.fl-slideshow-image-img').setStyle('opacity', 0);
6312
-
6313
  var numBars = this.get('bars'),
6314
  slices = this._renderSlices(1, numBars),
6315
  duration = this.get('duration'),
@@ -6318,11 +6318,11 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6318
  last = false,
6319
  i = 0,
6320
  clone = null,
6321
- props = {
6322
  duration: duration,
6323
  opacity: 1
6324
  };
6325
-
6326
  // barsRandom
6327
  if(this._type == 'barsRandom') {
6328
  slices = this._randomizeSlices(slices);
@@ -6330,23 +6330,23 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6330
 
6331
  // Transition the slices.
6332
  for( ; i < slices.length; i++) {
6333
-
6334
  // Make a clone of our transition properties.
6335
  clone = Y.clone(props);
6336
-
6337
  // blinds
6338
  if(this._type == 'blinds') {
6339
  clone.width = parseFloat(slices[i].getComputedStyle('width'), 10) + 'px';
6340
  slices[i].setStyle('width', '0px');
6341
  increment = 50;
6342
  }
6343
-
6344
  // Run the transition.
6345
  last = i == slices.length - 1 ? true : false;
6346
  Y.later(delay, this, this._transitionSlice, [slices[i], clone, last]);
6347
  delay += increment;
6348
  }
6349
-
6350
  this._transitionSlicesFadeLast(delay);
6351
  },
6352
 
@@ -6355,12 +6355,12 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6355
  *
6356
  * @method _transitionBoxes
6357
  * @protected
6358
- */
6359
  _transitionBoxes: function()
6360
  {
6361
  // Hide the image until the slices have transitioned in.
6362
  this.get('itemIn').one('.fl-slideshow-image-img').setStyle('opacity', 0);
6363
-
6364
  var numCols = this.get('boxCols'),
6365
  numRows = this.get('boxRows'),
6366
  numSlices = numCols * numRows,
@@ -6375,17 +6375,17 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6375
  col = 0,
6376
  startCol = -1,
6377
  clone = null,
6378
- props = {
6379
  duration: duration,
6380
  opacity: 1
6381
  };
6382
-
6383
  // boxesRandom
6384
  if(!multi) {
6385
-
6386
  slices = this._randomizeSlices(slices);
6387
  increment = 30;
6388
-
6389
  for( ; i < slices.length; i++) {
6390
  clone = Y.clone(props);
6391
  last = i == slices.length - 1 ? true : false;
@@ -6404,7 +6404,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6404
  if(col > -1 && col < numCols) {
6405
  i++;
6406
  clone = Y.clone(props);
6407
-
6408
  // boxesGrow
6409
  if(this._type == 'boxesGrow') {
6410
  clone.height = parseFloat(slices[row][col].getComputedStyle('height'), 10) + 'px';
@@ -6413,7 +6413,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6413
  slices[row][col].setStyle('width', '0px');
6414
  increment = 50;
6415
  }
6416
-
6417
  last = i == numSlices - 1 ? true : false;
6418
  Y.later(delay, this, this._transitionSlice, [slices[row][col], clone, last]);
6419
  }
@@ -6422,16 +6422,16 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6422
  delay += increment;
6423
  }
6424
  }
6425
-
6426
  this._transitionSlicesFadeLast(delay);
6427
  },
6428
-
6429
  /**
6430
  * Renders the divs for slice based transitions.
6431
  *
6432
  * @method _renderSlices
6433
  * @protected
6434
- */
6435
  _renderSlices: function(numRows, numCols, multidimensional)
6436
  {
6437
  var itemIn = this.get('itemIn'),
@@ -6452,33 +6452,33 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6452
  slices = [];
6453
 
6454
  for( ; row < numRows; row++) {
6455
-
6456
  if(typeof multidimensional !== 'undefined' && multidimensional) {
6457
  slices[row] = [];
6458
  }
6459
  for(col = 0; col < numCols; col++) {
6460
-
6461
  slice = Y.Node.create('<div class="fl-slideshow-transition-slice"></div>');
6462
  sliceImg = Y.Node.create('<img src="'+ imgSrc +'" />');
6463
-
6464
  slice.setStyles({
6465
  left: (sliceWidth * col) + 'px',
6466
- top: (sliceHeight * row) + 'px',
6467
  width: col == numCols - 1 ? (itemWidth - (sliceWidth * col)) + 'px' : sliceWidth + 'px',
6468
  height: row == numRows - 1 ? (itemHeight - (sliceHeight * row)) + 'px' : sliceHeight + 'px',
6469
  opacity: 0
6470
  });
6471
-
6472
  sliceImg.setStyles({
6473
  height: imgHeight + 'px',
6474
  width: imgWidth + 'px',
6475
  top: imgTop - ((sliceHeight + (row * sliceHeight)) - sliceHeight) + 'px',
6476
  left: imgLeft - ((sliceWidth + (col * sliceWidth)) - sliceWidth) + 'px'
6477
  });
6478
-
6479
  slice.append(sliceImg);
6480
  itemIn.append(slice);
6481
-
6482
  if(typeof multidimensional !== 'undefined' && multidimensional) {
6483
  slices[row].push(slice);
6484
  }
@@ -6490,17 +6490,17 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6490
 
6491
  return slices;
6492
  },
6493
-
6494
  /**
6495
  * Fade the itemOut node.
6496
  *
6497
  * @method _transitionSlicesFadeLast
6498
  * @protected
6499
- */
6500
  _transitionSlicesFadeLast: function(delay)
6501
  {
6502
  var itemOut = this.get('itemOut');
6503
-
6504
  if(itemOut && !itemOut.hasClass('fl-slideshow-image-cropped')) {
6505
  itemOut.transition({
6506
  duration: delay/1000 + this.get('duration'),
@@ -6508,45 +6508,45 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6508
  });
6509
  }
6510
  },
6511
-
6512
  /**
6513
  * Transitions a single slice.
6514
  *
6515
  * @method _transitionSlice
6516
  * @protected
6517
- */
6518
  _transitionSlice: function(slice, props, last)
6519
  {
6520
  var callback = last ? Y.bind(this._transitionSlicesComplete, this) : null;
6521
-
6522
  slice.transition(props, callback);
6523
  },
6524
-
6525
  /**
6526
  * Complete callback for slice based transitions.
6527
  *
6528
  * @method _transitionSlicesComplete
6529
  * @protected
6530
- */
6531
  _transitionSlicesComplete: function()
6532
  {
6533
  var itemIn = this.get('itemIn');
6534
-
6535
  itemIn.all('.fl-slideshow-transition-slice').remove();
6536
  itemIn.one('.fl-slideshow-image-img').setStyle('opacity', 1);
6537
  this._transitionComplete();
6538
  },
6539
-
6540
  /**
6541
  * Randomizes a slices array.
6542
  *
6543
  * @method _radomizeSlices
6544
  * @protected
6545
- */
6546
  _randomizeSlices: function(slices)
6547
  {
6548
  var i = slices.length, j, temp;
6549
-
6550
  if(i === 0) {
6551
  return;
6552
  }
@@ -6556,17 +6556,17 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6556
  slices[i] = slices[j];
6557
  slices[j] = temp;
6558
  }
6559
-
6560
  return slices;
6561
  },
6562
-
6563
  _transitionKenBurns: function()
6564
  {
6565
- var kbDuration = this.get('kenBurnsDuration'),
6566
  duration = this.get('duration'),
6567
  itemIn = this.get('itemIn'),
6568
  zoom = this.get('kenBurnsZoom');
6569
-
6570
  this._transitionFade();
6571
 
6572
  (new Y.FL.SlideshowKenBurns({
@@ -6577,7 +6577,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6577
  }
6578
 
6579
  }, {
6580
-
6581
  /**
6582
  * Static property used to define the default attribute configuration of
6583
  * the Widget.
@@ -6599,7 +6599,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6599
  itemIn: {
6600
  value: null
6601
  },
6602
-
6603
  /**
6604
  * The Node to transition out.
6605
  *
@@ -6610,7 +6610,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6610
  itemOut: {
6611
  value: null
6612
  },
6613
-
6614
  /**
6615
  * The duration of the transition in seconds.
6616
  *
@@ -6621,7 +6621,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6621
  duration: {
6622
  value: 0.5
6623
  },
6624
-
6625
  /**
6626
  * The type of easing to use.
6627
  *
@@ -6632,7 +6632,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6632
  easing: {
6633
  value: 'ease-out'
6634
  },
6635
-
6636
  /**
6637
  * The type of transition to use.
6638
  *
@@ -6643,9 +6643,9 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6643
  type: {
6644
  value: 'fade'
6645
  },
6646
-
6647
  /**
6648
- * The number of bars to use for
6649
  * transitions such as blinds.
6650
  *
6651
  * @attribute bars
@@ -6655,9 +6655,9 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6655
  bars: {
6656
  value: 15
6657
  },
6658
-
6659
  /**
6660
- * The number of columns to use for
6661
  * transitions such as boxes.
6662
  *
6663
  * @attribute boxCols
@@ -6667,9 +6667,9 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6667
  boxCols: {
6668
  value: 8
6669
  },
6670
-
6671
  /**
6672
- * The number of rows to use for
6673
  * transitions such as boxes.
6674
  *
6675
  * @attribute boxRows
@@ -6679,31 +6679,31 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6679
  boxRows: {
6680
  value: 4
6681
  },
6682
-
6683
  /**
6684
- * The duration the ken burns effect will
6685
  * last, measured in seconds.
6686
  *
6687
  * @attribute kenBurnsDuration
6688
- * @type Number
6689
  * @default 4
6690
- */
6691
  kenBurnsDuration: {
6692
  value: 4
6693
  },
6694
-
6695
  /**
6696
  * The amount of zoom to use for the Ken Burns effect.
6697
  *
6698
  * @attribute kenBurnsZoom
6699
- * @type Number
6700
  * @default 1.2
6701
- */
6702
  kenBurnsZoom: {
6703
  value: 1.2
6704
  }
6705
  },
6706
-
6707
  /**
6708
  * The types of transitions and associated functions.
6709
  *
@@ -6712,7 +6712,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6712
  * @readOnly
6713
  * @protected
6714
  * @static
6715
- */
6716
  TYPES: {
6717
  fade: '_transitionFade',
6718
  none: '_transitionNone',
@@ -6728,7 +6728,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6728
  boxesGrow: '_transitionBoxes',
6729
  kenBurns: '_transitionKenBurns'
6730
  },
6731
-
6732
  /**
6733
  * The types of transitions that can only be
6734
  * run on FL.SlideshowImage widgets.
@@ -6738,7 +6738,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6738
  * @readOnly
6739
  * @protected
6740
  * @static
6741
- */
6742
  SLIDESHOW_IMAGE_TYPES: [
6743
  'blinds',
6744
  'bars',
@@ -6752,7 +6752,7 @@ Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition',
6752
 
6753
  /**
6754
  * A highly configurable slideshow widget.
6755
- *
6756
  * @namespace FL
6757
  * @class Slideshow
6758
  * @constructor
@@ -6769,7 +6769,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6769
  * @default null
6770
  */
6771
  frame: null,
6772
-
6773
  /**
6774
  * A FL.SlideshowNav instance used for the main nav.
6775
  *
@@ -6778,7 +6778,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6778
  * @default null
6779
  */
6780
  nav: null,
6781
-
6782
  /**
6783
  * A FL.SlideshowNav instance used for the image nav's left button.
6784
  *
@@ -6787,7 +6787,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6787
  * @default null
6788
  */
6789
  imageNavLeft: null,
6790
-
6791
  /**
6792
  * A FL.SlideshowNav instance used for the image nav's right button.
6793
  *
@@ -6796,45 +6796,45 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6796
  * @default null
6797
  */
6798
  imageNavRight: null,
6799
-
6800
  /**
6801
  * A FL.SlideshowThumbs instance used for the thumbnail grid.
6802
- *
6803
  * @property thumbs
6804
  * @type FL.SlideshowThumbs
6805
  * @default null
6806
  */
6807
  thumbs: null,
6808
-
6809
  /**
6810
  * A FL.SlideshowThumbs instance used for the vertical thumbnail grid.
6811
- *
6812
  * @property verticalThumbs
6813
  * @type FL.SlideshowThumbs
6814
  * @default null
6815
  */
6816
  verticalThumbs: null,
6817
-
6818
  /**
6819
  * A FL.SlideshowCaption instance.
6820
- *
6821
  * @property caption
6822
  * @type FL.SlideshowCaption
6823
  * @default null
6824
  */
6825
  caption: null,
6826
-
6827
  /**
6828
  * A FL.SlideshowSocial instance.
6829
- *
6830
  * @property social
6831
  * @type FL.SlideshowSocial
6832
  * @default null
6833
  */
6834
  social: null,
6835
-
6836
  /**
6837
- * A FL.SlideshowImage instance used to preload
6838
  * the next image.
6839
  *
6840
  * @property _nextImagePreloader
@@ -6843,7 +6843,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6843
  * @protected
6844
  */
6845
  _nextImagePreloader: null,
6846
-
6847
  /**
6848
  * An object that holds the initial nav settings
6849
  * when the mini nav has been enabled for a responsive layout.
@@ -6871,17 +6871,17 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6871
  protect: this.get('protect'),
6872
  upsize: this.get('upsize')
6873
  };
6874
-
6875
  // Preloader
6876
  this._nextImagePreloader = new Y.FL.SlideshowImage(imageConfig);
6877
-
6878
  // Nav buttons not needed for touch
6879
  if(this._isMobile()) {
6880
  this._removeNavButton('prevPage');
6881
  this._removeNavButton('nextPage');
6882
  this._removeNavButton('fullscreen');
6883
  }
6884
-
6885
  // Fullscreen
6886
  if(this._hasNavButton('fullscreen')) {
6887
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
@@ -6894,7 +6894,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6894
  },
6895
 
6896
  /**
6897
- * Calls the FL.SlideshowBase superclass renderUI method
6898
  * and renders the child widgets.
6899
  *
6900
  * @method renderUI
@@ -6903,7 +6903,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6903
  renderUI: function()
6904
  {
6905
  Y.FL.Slideshow.superclass.renderUI.apply(this, arguments);
6906
-
6907
  this._renderFrame();
6908
  this._renderVerticalThumbs();
6909
  this._renderNavAndThumbs();
@@ -6912,10 +6912,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6912
  this._renderCaption();
6913
  this._renderSocial();
6914
  },
6915
-
6916
  /**
6917
- * Calls the FL.SlideshowBase superclass bindUI method, binds
6918
- * _resizeChildWidgets to fire after the resize method inherited
6919
  * from FL.SlideshowBase, shows the loading image, binds overlay events
6920
  * and binds an event to load an image into the frame.
6921
  *
@@ -6930,24 +6930,24 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6930
  navType = this.get('navType'),
6931
  nav = this._getNav(),
6932
  clickAction = this.get('clickAction');
6933
-
6934
  // Call superclass bindUI
6935
  Y.FL.Slideshow.superclass.bindUI.apply(this, arguments);
6936
-
6937
  // Resize child widgets after the superclass resize method.
6938
  Y.Do.after(this._resizeChildWidgets, this, 'resize');
6939
-
6940
  // Loading events
6941
  this.on('albumLoadStart', this._albumLoadStart, this);
6942
  this.on('albumLoadComplete', this._albumLoadComplete, this);
6943
  this.on('imageLoadComplete', this._loadFrame, this);
6944
-
6945
  // Loading image
6946
  if(this.get('loadingImageAlwaysEnabled')) {
6947
  this.frame.on('transitionInit', Y.bind(this._showLoadingImageWithDelay, this));
6948
  this.frame.on('transitionStart', Y.bind(this._hideLoadingImage, this));
6949
  }
6950
-
6951
  // Overlay events
6952
  if(this.get('overlayHideOnMousemove')) {
6953
  if(nav && navOverlay) {
@@ -6959,15 +6959,15 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6959
  ssBB.on('mouseleave', Y.bind(this._hideAllOverlays, this));
6960
  }
6961
  }
6962
-
6963
  ssBB.delegate('click', Y.bind(this._overlayCloseClick, this), '.fl-slideshow-overlay-close');
6964
-
6965
  // Click action
6966
  if(clickAction == 'gallery' || clickAction == 'url') {
6967
  frameBB.delegate('click', Y.bind(this._frameClick, this), '.fl-slideshow-image-img');
6968
  }
6969
  },
6970
-
6971
  /**
6972
  * Calls the FL.SlideshowBase superclass syncUI method
6973
  * and makes the bounding box unselectable.
@@ -6978,13 +6978,13 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6978
  syncUI: function()
6979
  {
6980
  var bb = this.get('boundingBox');
6981
-
6982
  Y.FL.Slideshow.superclass.syncUI.apply(this, arguments);
6983
 
6984
  bb._node.onselectstart = function() { return false; };
6985
  bb._node.unselectable = "on";
6986
  bb._node.style.MozUserSelect = "none";
6987
-
6988
  if(this.get('clickAction') != 'none') {
6989
  this.frame.get('boundingBox').addClass('fl-click-action-enabled');
6990
  }
@@ -6997,14 +6997,14 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
6997
  * @access private
6998
  * @method _isMobile
6999
  * @return {Boolean}
7000
- */
7001
  _isMobile: function()
7002
  {
7003
  return /Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test( navigator.userAgent );
7004
  },
7005
-
7006
  /**
7007
- * Unload all slideshow images and pause
7008
  * the slideshow.
7009
  *
7010
  * @method unload
@@ -7013,12 +7013,12 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7013
  {
7014
  this.pause();
7015
  this.frame.unload();
7016
-
7017
  if(this.thumbs !== null) {
7018
  this.thumbs.unload();
7019
  }
7020
  },
7021
-
7022
  /**
7023
  * @method _albumLoadStart
7024
  * @protected
@@ -7027,7 +7027,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7027
  {
7028
  this._showLoadingImage();
7029
  },
7030
-
7031
  /**
7032
  * @method _albumLoadComplete
7033
  * @protected
@@ -7036,7 +7036,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7036
  {
7037
  this.frame.once('transitionStart', Y.bind(this._hideLoadingImage, this));
7038
  },
7039
-
7040
  /**
7041
  * Resizes all enabled child widgets.
7042
  *
@@ -7048,9 +7048,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7048
  var bb = this.get('boundingBox'),
7049
  cb = this.get('contentBox'),
7050
  imageNavEnabled = this.get('imageNavEnabled');
7051
-
7052
  this._renderNavAndThumbs();
7053
-
7054
  if(this.get('verticalThumbsOverlay')) {
7055
  this._resizeFrame(cb.get('offsetWidth'), bb.get('offsetHeight'));
7056
  this._resizeVerticalThumbs();
@@ -7063,38 +7063,38 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7063
  if(imageNavEnabled) {
7064
  this._positionImageNav();
7065
  }
7066
-
7067
  this._positionLoadingImage();
7068
  },
7069
 
7070
  /**
7071
  * @method _renderVerticalThumbs
7072
  * @protected
7073
- */
7074
  _renderVerticalThumbs: function()
7075
  {
7076
  var threshold = this.get('responsiveThreshold'),
7077
  ssBB = this.get('boundingBox'),
7078
- bbWidth = ssBB.get('offsetWidth'),
7079
  vtBB;
7080
 
7081
  if(this.get('verticalThumbsEnabled') && bbWidth > threshold) {
7082
 
7083
- this.verticalThumbs = new Y.FL.SlideshowThumbs(this._getVerticalThumbsConfig());
7084
  this.add(this.verticalThumbs);
7085
  this.verticalThumbs.render(ssBB);
7086
-
7087
  vtBB = this.verticalThumbs.get('boundingBox');
7088
  vtBB.addClass('fl-slideshow-vertical-thumbs');
7089
  vtBB.setStyle(this.get('verticalThumbsPosition'), 0);
7090
  ssBB.append(vtBB);
7091
-
7092
  if(this.get('verticalThumbsOverlay')) {
7093
  this.verticalThumbs.plug(Y.FL.SlideshowOverlay, {
7094
  hideDelay: this.get('overlayHideDelay'),
7095
  hideStyle: 'left'
7096
  });
7097
-
7098
  this.frame.get('boundingBox').append(vtBB);
7099
  this.verticalThumbs.resize();
7100
  }
@@ -7102,14 +7102,14 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7102
  this.verticalThumbs.resize();
7103
  this._adjustContentForVerticalThumbs();
7104
  }
7105
-
7106
  this._bindVerticalThumbs();
7107
  }
7108
  },
7109
-
7110
  /**
7111
- * Prepares and returns the vertical thumbs config object.
7112
- *
7113
  * @method _getVerticalThumbsConfig
7114
  * @protected
7115
  * @returns Object
@@ -7141,27 +7141,27 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7141
  height: attrs.verticalThumbsImageHeight
7142
  }
7143
  };
7144
-
7145
  return config;
7146
  },
7147
-
7148
  _bindVerticalThumbs: function()
7149
  {
7150
  var ssBB = this.get('boundingBox'),
7151
  hideOnMouse = this.get('overlayHideOnMousemove'),
7152
  vtOverlay = this.get('verticalThumbsOverlay'),
7153
  vt = this.verticalThumbs;
7154
-
7155
  if(vt && hideOnMouse && vtOverlay) {
7156
  this.frame.once('transitionComplete', vt.slideshowOverlay.hideWithTimer, vt.slideshowOverlay);
7157
  ssBB.on('mousemove', Y.bind(this._toggleVerticalThumbs, this));
7158
  ssBB.on('mouseenter', Y.bind(this._toggleVerticalThumbs, this));
7159
  }
7160
  },
7161
-
7162
  /**
7163
  * Resizes the vertical thumbs.
7164
- *
7165
  * @method _resizeVerticalThumbs
7166
  * @protected
7167
  */
@@ -7176,7 +7176,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7176
  navType,
7177
  nav,
7178
  navBB;
7179
-
7180
  if(vtEnabled) {
7181
  vtOverlay = this.get('verticalThumbsOverlay');
7182
  threshold = this.get('responsiveThreshold');
@@ -7185,19 +7185,19 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7185
  navOverlay = this.get('navOverlay');
7186
  navType = this.get('navType');
7187
  nav = this._getNav();
7188
-
7189
  if(this.verticalThumbs && bbWidth > threshold) {
7190
-
7191
  this.verticalThumbs.get('boundingBox').setStyle('display', 'block');
7192
  this.verticalThumbs.resize();
7193
-
7194
  if(!vtOverlay) {
7195
  this._adjustContentForVerticalThumbs();
7196
  }
7197
  else if(nav && navOverlay) {
7198
-
7199
  navBB = nav.get('boundingBox');
7200
-
7201
  if(navType == 'thumbs') {
7202
  this._adjustOverlayForVerticalThumbs(navBB, true);
7203
  this.thumbs.resize();
@@ -7211,9 +7211,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7211
  this._renderVerticalThumbs();
7212
  }
7213
  else if(this.verticalThumbs && bbWidth <= threshold) {
7214
-
7215
  this.verticalThumbs.get('boundingBox').setStyle('display', 'none');
7216
-
7217
  if(!vtOverlay) {
7218
  this.get('contentBox').setStyles({
7219
  left: 'auto',
@@ -7225,10 +7225,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7225
  }
7226
  }
7227
  },
7228
-
7229
  /**
7230
  * Toggles the visibility of the vertical thumbs.
7231
- *
7232
  * @method _toggleVerticalThumbs
7233
  * @protected
7234
  */
@@ -7243,11 +7243,11 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7243
  }
7244
  }
7245
  },
7246
-
7247
  /**
7248
  * Adjusts the content position and width
7249
  * for the vertical thumbs.
7250
- *
7251
  * @method _adjustContentForVerticalThumbs
7252
  * @protected
7253
  */
@@ -7259,16 +7259,16 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7259
  ssCB = this.get('contentBox'),
7260
  cbPos = vtPos == 'left' ? 'right' : 'left',
7261
  cbWidth = ssBB.get('offsetWidth') - vtBB.get('offsetWidth');
7262
-
7263
  ssCB.setStyle('position', 'absolute');
7264
  ssCB.setStyle(cbPos, 0);
7265
  ssCB.setStyle('width', cbWidth);
7266
  },
7267
-
7268
  /**
7269
  * Adjusts an overlay's position for the vertical
7270
  * thumbs when they are overlaid as well.
7271
- *
7272
  * @method _adjustOverlayForVerticalThumbs
7273
  * @protected
7274
  */
@@ -7280,7 +7280,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7280
  vtPos = null,
7281
  margin = typeof useMargin === 'undefined' ? '' : 'margin-',
7282
  vtWidth = 0;
7283
-
7284
  if(this.verticalThumbs && vtEnabled && vtOverlay) {
7285
  vtBB = this.verticalThumbs.get('boundingBox');
7286
  vtWidth = vtBB.get('offsetWidth');
@@ -7294,9 +7294,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7294
  }
7295
  }
7296
  },
7297
-
7298
  /**
7299
- * Creates and renders a new instance of FL.SlideshowFrame
7300
  * used for the main image.
7301
  *
7302
  * @method _renderFrame
@@ -7317,14 +7317,14 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7317
  },
7318
  touchSupport: this.get('touchSupport')
7319
  });
7320
-
7321
  this.add(this.frame);
7322
  this.frame.render(this.get('contentBox'));
7323
  this.frame.get('boundingBox').addClass('fl-slideshow-main-image');
7324
  this._setPlayingTimerEvent(this.frame, 'transitionComplete');
7325
  this._loadingImageContainer = this.frame.get('contentBox');
7326
  },
7327
-
7328
  /**
7329
  * Resizes the frame used for the main image.
7330
  *
@@ -7337,14 +7337,14 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7337
  {
7338
  var navOverlay = this.get('navOverlay'),
7339
  nav = this._getNav();
7340
-
7341
  if(nav && !navOverlay) {
7342
  height -= parseInt(nav.get('boundingBox').getComputedStyle('height'), 10);
7343
  }
7344
-
7345
  this.frame.resize(width, height);
7346
  },
7347
-
7348
  /**
7349
  * Called when the imageLoadComplete event fires.
7350
  * Loads an image into the frame and preloads the next image.
@@ -7360,28 +7360,28 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7360
  nextIndex = activeIndex + 1 >= images.length ? 0 : activeIndex + 1,
7361
  width = this.frame.get('width'),
7362
  height = this.frame.get('height');
7363
-
7364
  // Load the frame.
7365
  this.frame.load(e.imageInfo);
7366
-
7367
  // Remove main preload images from the load queue.
7368
  Y.FL.SlideshowImageLoader.removeGroup('main-preload');
7369
-
7370
  // Preload the next image.
7371
  this._nextImagePreloader.preload(images[nextIndex], width, height);
7372
  },
7373
-
7374
  /**
7375
  * Fired when the frame img tag is clicked.
7376
- *
7377
  * @method _frameClick
7378
  * @protected
7379
- */
7380
  _frameClick: function()
7381
  {
7382
  var clickAction = this.get('clickAction'),
7383
  clickActionUrl = this.get('clickActionUrl');
7384
-
7385
  if(clickAction == 'url') {
7386
  window.location.href = clickActionUrl;
7387
  }
@@ -7389,11 +7389,11 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7389
  window.location.href = this.imageInfo.link;
7390
  }
7391
  },
7392
-
7393
  /**
7394
  * Sets attributes to display a compact nav
7395
  * for responsive layouts.
7396
- *
7397
  * @method _initMiniNav
7398
  * @protected
7399
  */
@@ -7425,24 +7425,24 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7425
  if(this._hasNavButton('next')) {
7426
  buttons.push('next');
7427
  }
7428
-
7429
  this._initialNavSettings = {
7430
  buttons: this.get('navButtons'),
7431
  buttonsLeft: this.get('navButtonsLeft'),
7432
  buttonsRight: this.get('navButtonsRight'),
7433
  type: this.get('navType')
7434
  };
7435
-
7436
  this._set('navButtons', buttons);
7437
  this._set('navButtonsLeft', []);
7438
  this._set('navButtonsRight', []);
7439
  this._set('navType', 'buttons');
7440
  },
7441
-
7442
  /**
7443
- * Renders the nav and thumbs layout based on the
7444
  * current window size.
7445
- *
7446
  * @method _renderNavAndThumbs
7447
  * @protected
7448
  */
@@ -7456,7 +7456,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7456
  if(navType == 'buttons' || navType == 'thumbs') {
7457
  bbWidth = this.get('boundingBox').get('offsetWidth');
7458
  threshold = this.get('responsiveThreshold');
7459
-
7460
  if(bbWidth <= threshold && this._initialNavSettings === null) {
7461
  this._initMiniNav();
7462
  renderNav = true;
@@ -7469,12 +7469,12 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7469
  this._initialNavSettings = null;
7470
  renderNav = true;
7471
  }
7472
-
7473
  // Button nav
7474
  if(renderNav || this.nav === null) {
7475
  this._renderNav();
7476
  }
7477
-
7478
  // Thumbs nav
7479
  if(renderNav || this.thumbs === null) {
7480
  this._renderThumbs();
@@ -7482,23 +7482,23 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7482
  else if(this._thumbsEnabled()) {
7483
  this._resizeThumbs();
7484
  }
7485
-
7486
  // Caption
7487
  if(renderNav && this.caption !== null) {
7488
  this._syncCaption();
7489
  }
7490
-
7491
  // Social
7492
  if(renderNav && this.social !== null) {
7493
  this._syncSocial();
7494
  }
7495
  }
7496
  },
7497
-
7498
  /**
7499
- * Creates and renders a new instance of FL.SlideshowNav
7500
  * used for the main nav.
7501
- *
7502
  * @method _renderNav
7503
  * @protected
7504
  */
@@ -7508,35 +7508,35 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7508
  navBB = null,
7509
  navOverlay = this.get('navOverlay'),
7510
  navPosition = this.get('navPosition');
7511
-
7512
  // Destroy old instances
7513
  this._destroyNav();
7514
-
7515
  // Create a new instance
7516
  if(this.get('navType') == 'buttons') {
7517
-
7518
  // Create the nav
7519
- this.nav = new Y.FL.SlideshowNav({
7520
  buttons: this.get('navButtons'),
7521
  buttonsLeft: this.get('navButtonsLeft'),
7522
  buttonsRight: this.get('navButtonsRight')
7523
  });
7524
-
7525
  // Add to widget parent and render
7526
  this.add(this.nav);
7527
  this.nav.render(this.get('contentBox'));
7528
  navBB = this.nav.get('boundingBox');
7529
-
7530
  // Plug overlay?
7531
  if(navOverlay) {
7532
  this.nav.plug(Y.FL.SlideshowOverlay, {
7533
  hideDelay: this.get('overlayHideDelay')
7534
  });
7535
-
7536
  navBB.setStyle('position', 'absolute');
7537
  navBB.setStyle(navPosition, '0px');
7538
  }
7539
-
7540
  // Insert
7541
  if(navPosition == 'top') {
7542
  frameBB.insert(navBB, 'before');
@@ -7544,7 +7544,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7544
  else {
7545
  frameBB.insert(navBB, 'after');
7546
  }
7547
-
7548
  // CSS class name
7549
  navBB.addClass('fl-slideshow-main-nav');
7550
  }
@@ -7552,35 +7552,35 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7552
 
7553
  /**
7554
  * Destroy the current nav instance.
7555
- *
7556
  * @method _destroyNav
7557
  * @protected
7558
- */
7559
  _destroyNav: function()
7560
  {
7561
  if(this.nav !== null) {
7562
  if(this.nav.slideshowOverlay) {
7563
  this.nav.slideshowOverlay.destroy();
7564
  }
7565
-
7566
  this.nav.get('boundingBox').remove();
7567
  this.remove(this.nav);
7568
  try { this.nav.destroy(true); } catch(e) {}
7569
  this.nav = null;
7570
  }
7571
  },
7572
-
7573
  /**
7574
  * Returns the nav object or null if navType is
7575
  * set to none or custom.
7576
- *
7577
  * @method _getNav
7578
  * @protected
7579
  */
7580
  _getNav: function()
7581
  {
7582
  var navType = this.get('navType');
7583
-
7584
  if(navType == 'buttons') {
7585
  return this.nav;
7586
  }
@@ -7591,18 +7591,18 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7591
  return null;
7592
  }
7593
  },
7594
-
7595
  /**
7596
- * Toggles the visibility of the nav or thumbs nav
7597
  * if navOverlay is set to true.
7598
- *
7599
  * @method _toggleNav
7600
  * @protected
7601
  */
7602
  _toggleNav: function()
7603
  {
7604
  var nav = this._getNav();
7605
-
7606
  if(nav.slideshowOverlay) {
7607
  if(nav.slideshowOverlay._visible) {
7608
  nav.slideshowOverlay.hideWithTimer();
@@ -7612,57 +7612,57 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7612
  }
7613
  }
7614
  },
7615
-
7616
  /**
7617
- * Creates and renders two instances of FL.SlideshowNav for the
7618
- * prev and next button that will be overlaid on the main image.
7619
- *
7620
  * @method _renderImageNav
7621
  * @protected
7622
  */
7623
  _renderImageNav: function()
7624
  {
7625
  var ssBB;
7626
-
7627
  if(this.get('imageNavEnabled')) {
7628
  if(this._isMobile()) {
7629
  this._set('imageNavEnabled', false);
7630
  }
7631
  else {
7632
  ssBB = this.get('boundingBox');
7633
-
7634
- this.imageNavLeft = new Y.FL.SlideshowNav({
7635
  buttons: ['prev'],
7636
  useFontIcons: false
7637
  });
7638
-
7639
- this.imageNavRight = new Y.FL.SlideshowNav({
7640
  buttons: ['next'],
7641
  useFontIcons: false
7642
  });
7643
-
7644
  this.add(this.imageNavLeft);
7645
  this.add(this.imageNavRight);
7646
-
7647
  this.imageNavLeft.render(this.frame.get('boundingBox'));
7648
  this.imageNavRight.render(this.frame.get('boundingBox'));
7649
-
7650
  this.imageNavLeft.plug(Y.FL.SlideshowOverlay, { hideDelay: this.get('overlayHideDelay') });
7651
  this.imageNavRight.plug(Y.FL.SlideshowOverlay, { hideDelay: this.get('overlayHideDelay') });
7652
-
7653
  if(this.get('overlayHideOnMousemove')) {
7654
  this.frame.once('transitionComplete', this.imageNavLeft.slideshowOverlay.hideWithTimer, this.imageNavLeft.slideshowOverlay);
7655
  this.frame.once('transitionComplete', this.imageNavRight.slideshowOverlay.hideWithTimer, this.imageNavRight.slideshowOverlay);
7656
  ssBB.on('mousemove', Y.bind(this._toggleImageNav, this));
7657
  ssBB.on('mouseenter', Y.bind(this._toggleImageNav, this));
7658
  }
7659
-
7660
  this.imageNavLeft.get('boundingBox').addClass('fl-slideshow-image-nav-left');
7661
  this.imageNavRight.get('boundingBox').addClass('fl-slideshow-image-nav-right');
7662
  }
7663
  }
7664
  },
7665
-
7666
  /**
7667
  * @method _positionImageNav
7668
  * @protected
@@ -7678,17 +7678,17 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7678
  top: top + 'px',
7679
  display: 'block'
7680
  };
7681
-
7682
  leftBB.setStyles(styles);
7683
  rightBB.setStyles(styles);
7684
-
7685
  this._adjustOverlayForVerticalThumbs(leftBB);
7686
  this._adjustOverlayForVerticalThumbs(rightBB);
7687
  },
7688
-
7689
  /**
7690
  * Toggles the visibility of the image nav buttons.
7691
- *
7692
  * @method _toggleImageNav
7693
  * @protected
7694
  */
@@ -7700,7 +7700,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7700
  else {
7701
  this.imageNavLeft.slideshowOverlay.show();
7702
  }
7703
-
7704
  if(this.imageNavRight.slideshowOverlay._visible) {
7705
  this.imageNavRight.slideshowOverlay.hideWithTimer();
7706
  }
@@ -7708,7 +7708,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7708
  this.imageNavRight.slideshowOverlay.show();
7709
  }
7710
  },
7711
-
7712
  /**
7713
  * @method _renderMouseNav
7714
  * @protected
@@ -7721,10 +7721,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7721
  });
7722
  }
7723
  },
7724
-
7725
  /**
7726
  * Checks whether the thumbs are enabled.
7727
- *
7728
  * @method _thumbsEnabled
7729
  * @protected
7730
  * @returns Boolean
@@ -7732,7 +7732,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7732
  _thumbsEnabled: function()
7733
  {
7734
  var navType = this.get('navType');
7735
-
7736
  if(navType == 'thumbs') {
7737
  return true;
7738
  }
@@ -7743,33 +7743,33 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7743
  return false;
7744
  }
7745
  },
7746
-
7747
  /**
7748
  * Creates and renders a new instance of FL.SlideshowThumbs.
7749
- *
7750
  * @method _renderThumbs
7751
  * @protected
7752
  */
7753
  _renderThumbs: function()
7754
  {
7755
  var frameBB, navOverlay, navPosition, navType;
7756
-
7757
  // Destroy old instances
7758
  this._destroyThumbs();
7759
-
7760
  // Create a new instance
7761
  if(this._thumbsEnabled()) {
7762
  frameBB = this.frame.get('boundingBox');
7763
  navOverlay = this.get('navOverlay');
7764
  navPosition = this.get('navPosition');
7765
  navType = this.get('navType');
7766
-
7767
  // Create the thumbs
7768
  this.thumbs = new Y.FL.SlideshowThumbs(this._getThumbsConfig());
7769
-
7770
  // This breaks sometimes on SM Next. Try/catch bandaid for now.
7771
  try { this.add(this.thumbs); } catch(e) {}
7772
-
7773
  // Overlay setup
7774
  if(navType == 'buttons' || navType == 'custom') {
7775
  this.thumbs.plug(Y.FL.SlideshowOverlay, {
@@ -7784,32 +7784,32 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7784
  hideStyle: 'left'
7785
  });
7786
  }
7787
-
7788
  // Insert
7789
  this.thumbs.render(this.get('contentBox'));
7790
-
7791
  if(navPosition == 'top') {
7792
  frameBB.insert(this.thumbs.get('boundingBox'), 'before');
7793
  }
7794
  else {
7795
  frameBB.insert(this.thumbs.get('boundingBox'), 'after');
7796
  }
7797
-
7798
  // Hide overlay thumbs on click
7799
  if(this.get('thumbsHideOnClick') && navType != 'thumbs') {
7800
  this.thumbs.on('imageClick', Y.bind(this._hideThumbsOnImageClick, this));
7801
  }
7802
-
7803
  this._syncThumbs();
7804
  }
7805
  },
7806
-
7807
  /**
7808
  * Destroy the current thumbs instance.
7809
- *
7810
  * @method _destroyThumbs
7811
  * @protected
7812
- */
7813
  _destroyThumbs: function()
7814
  {
7815
  if(this.thumbs !== null) {
@@ -7823,10 +7823,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7823
  this.thumbs = null;
7824
  }
7825
  },
7826
-
7827
  /**
7828
  * Syncs the thumbs UI styles.
7829
- *
7830
  * @method _syncThumbs
7831
  * @protected
7832
  */
@@ -7838,11 +7838,11 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7838
  navType = this.get('navType'),
7839
  paddingType = 'padding' + navPosition.charAt(0).toUpperCase() + navPosition.slice(1),
7840
  navHeight = 0;
7841
-
7842
  if(navType == 'buttons') {
7843
  navHeight = parseInt(this.nav.get('boundingBox').getComputedStyle('height'), 10);
7844
  thumbsBB.setStyle('position', 'absolute');
7845
-
7846
  if(navOverlay) {
7847
  thumbsBB.setStyle(paddingType, navHeight + 'px');
7848
  thumbsBB.setStyle(navPosition, '0px');
@@ -7855,13 +7855,13 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7855
  thumbsBB.setStyle('position', 'absolute');
7856
  thumbsBB.setStyle(navPosition, '0px');
7857
  }
7858
-
7859
  this.thumbs.resize();
7860
  },
7861
-
7862
  /**
7863
- * Prepares and returns the thumbs config object.
7864
- *
7865
  * @method _getThumbsConfig
7866
  * @protected
7867
  * @returns Object
@@ -7891,7 +7891,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7891
  imageConfig: imageConfig,
7892
  touchSupport: true
7893
  };
7894
-
7895
  if(navType == 'buttons' || navType == 'custom') {
7896
  if('ontouchstart' in window) {
7897
  config.leftNavEnabled = false;
@@ -7903,13 +7903,13 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7903
  config.rightNavButtons = ['nextPage'];
7904
  }
7905
  }
7906
-
7907
  return config;
7908
  },
7909
-
7910
  /**
7911
  * Resizes the thumbs.
7912
- *
7913
  * @method _resizeThumbs
7914
  * @protected
7915
  */
@@ -7919,7 +7919,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7919
  this.thumbs.resize();
7920
  }
7921
  },
7922
-
7923
  /**
7924
  * Shows or hides the thumbs.
7925
  *
@@ -7930,7 +7930,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7930
  {
7931
  this._toggleOverlay(this.thumbs.slideshowOverlay);
7932
  },
7933
-
7934
  /**
7935
  * Hides the thumbs when a thumb image is clicked.
7936
  *
@@ -7943,13 +7943,13 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7943
  this.thumbs.slideshowOverlay._focus = false;
7944
  this.thumbs.slideshowOverlay.enable();
7945
  this.thumbs.slideshowOverlay.hide();
7946
-
7947
  if(this.nav && this.nav.slideshowOverlay) {
7948
  this.nav.slideshowOverlay.enable();
7949
  }
7950
  }
7951
  },
7952
-
7953
  /**
7954
  * Creates and renders a new instance of FL.SlideshowCaption.
7955
  *
@@ -7959,29 +7959,29 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7959
  _renderCaption: function()
7960
  {
7961
  if(this._hasNavButton('caption')) {
7962
-
7963
  this.caption = new Y.FL.SlideshowCaption({
7964
- lessLinkText: this.get('captionLessLinkText'),
7965
- moreLinkText: this.get('captionMoreLinkText'),
7966
- textLength: this.get('captionTextLength'),
7967
- stripTags: this.get('captionStripTags')
7968
  });
7969
-
7970
  this.add(this.caption);
7971
-
7972
  this.caption.plug(Y.FL.SlideshowOverlay, {
7973
  hideDelay: this.get('overlayHideDelay'),
7974
  visible: false,
7975
  closeButton: true
7976
  });
7977
-
7978
  this._syncCaption();
7979
  }
7980
  },
7981
-
7982
  /**
7983
  * Syncs the caption UI styles.
7984
- *
7985
  * @method _syncCaption
7986
  * @protected
7987
  */
@@ -7993,13 +7993,13 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
7993
  nav = this._getNav(),
7994
  paddingType = 'padding' + navPosition.charAt(0).toUpperCase() + navPosition.slice(1),
7995
  navHeight = 0;
7996
-
7997
  captionBB.setStyle('position', 'absolute');
7998
-
7999
  if(nav) {
8000
  navHeight = parseInt(nav.get('boundingBox').getComputedStyle('height'), 10);
8001
  }
8002
-
8003
  if(nav && navOverlay) {
8004
  captionBB.setStyle(paddingType, navHeight + 'px');
8005
  captionBB.setStyle(navPosition, '0px');
@@ -8008,7 +8008,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8008
  captionBB.setStyle(navPosition, navHeight + 'px');
8009
  }
8010
  },
8011
-
8012
  /**
8013
  * Shows or hides the caption.
8014
  *
@@ -8019,7 +8019,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8019
  {
8020
  this._toggleOverlay(this.caption.slideshowOverlay);
8021
  },
8022
-
8023
  /**
8024
  * Creates and renders a new instance of FL.SlideshowSocial.
8025
  *
@@ -8031,20 +8031,20 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8031
  if(this._hasNavButton('social')) {
8032
  this.social = new Y.FL.SlideshowSocial();
8033
  this.add(this.social);
8034
-
8035
  this.social.plug(Y.FL.SlideshowOverlay, {
8036
  hideDelay: this.get('overlayHideDelay'),
8037
  visible: false,
8038
  closeButton: true
8039
  });
8040
-
8041
  this._syncSocial();
8042
  }
8043
  },
8044
-
8045
  /**
8046
  * Syncs the social UI styles.
8047
- *
8048
  * @method _syncSocial
8049
  * @protected
8050
  */
@@ -8056,13 +8056,13 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8056
  nav = this._getNav(),
8057
  paddingType = 'padding' + navPosition.charAt(0).toUpperCase() + navPosition.slice(1),
8058
  navHeight = 0;
8059
-
8060
  socialBB.setStyle('position', 'absolute');
8061
-
8062
  if(nav) {
8063
  navHeight = parseInt(nav.get('boundingBox').getComputedStyle('height'), 10);
8064
  }
8065
-
8066
  if(nav && navOverlay) {
8067
  socialBB.setStyle(paddingType, navHeight + 'px');
8068
  socialBB.setStyle(navPosition, '0px');
@@ -8071,7 +8071,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8071
  socialBB.setStyle(navPosition, navHeight + 'px');
8072
  }
8073
  },
8074
-
8075
  /**
8076
  * Shows or hides the social buttons.
8077
  *
@@ -8082,11 +8082,11 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8082
  {
8083
  this._toggleOverlay(this.social.slideshowOverlay);
8084
  },
8085
-
8086
  /**
8087
  * Shows or hides an overlaid widget based
8088
  * on its current visibility.
8089
- *
8090
  * @method _toggleOverlay
8091
  * @param overlay {Object} The overlay to toggle.
8092
  * @protected
@@ -8095,7 +8095,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8095
  {
8096
  var navType = this.get('navType'),
8097
  nav = this._getNav();
8098
-
8099
  if(overlay._visible) {
8100
  if(nav && nav.slideshowOverlay) {
8101
  nav.slideshowOverlay.enable();
@@ -8110,7 +8110,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8110
  overlay.show();
8111
  overlay.disable();
8112
  }
8113
-
8114
  if(this.thumbs && navType != 'thumbs' && this.thumbs.slideshowOverlay !== overlay) {
8115
  this.thumbs.slideshowOverlay.enable();
8116
  this.thumbs.slideshowOverlay.hide();
@@ -8124,10 +8124,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8124
  this.social.slideshowOverlay.hide();
8125
  }
8126
  },
8127
-
8128
  /**
8129
  * Called when an overlay's close button is clicked.
8130
- *
8131
  * @method _overlayCloseClick
8132
  * @protected
8133
  */
@@ -8150,10 +8150,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8150
  this.imageNavRight.slideshowOverlay.enable();
8151
  }
8152
  },
8153
-
8154
  /**
8155
  * Hides all overlaid widgets.
8156
- *
8157
  * @method _hideAllOverlays
8158
  * @protected
8159
  */
@@ -8182,13 +8182,13 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8182
  this.imageNavRight.slideshowOverlay.hideWithTimer();
8183
  }
8184
  },
8185
-
8186
  /**
8187
- * Checks if overlays are still visible when the mouse enters
8188
  * the bounding box. If they are, overlay functionality is disabled
8189
  * until the overlays are closed by a button or the mouse leaves
8190
- * the bounding box. If only the nav overlay is visible, this
8191
- * function does nothing.
8192
  *
8193
  * @method _checkOverlaysOnMouseenter
8194
  * @protected
@@ -8199,7 +8199,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8199
  navOverlay = this.get('navOverlay'),
8200
  nav = this._getNav(),
8201
  overlayVisible = false;
8202
-
8203
  if(this.thumbs && navType != 'thumbs' && this.thumbs.slideshowOverlay._visible) {
8204
  overlayVisible = true;
8205
  this.thumbs.slideshowOverlay.disable();
@@ -8212,15 +8212,15 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8212
  overlayVisible = true;
8213
  this.social.slideshowOverlay.disable();
8214
  }
8215
-
8216
  if(nav && overlayVisible && navOverlay) {
8217
  nav.slideshowOverlay.disable();
8218
  }
8219
  },
8220
-
8221
  /**
8222
  * Checks whether a nav button is set or not.
8223
- *
8224
  * @method _hasNavButton
8225
  * @protected
8226
  * @param button {String} The button to look for.
@@ -8229,7 +8229,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8229
  _hasNavButton: function(button)
8230
  {
8231
  var navType = this.get('navType');
8232
-
8233
  if(navType == 'buttons' || navType == 'thumbs' || navType == 'custom') {
8234
  if(Y.Array.indexOf(this.get('navButtons'), button) > -1) {
8235
  return true;
@@ -8240,7 +8240,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8240
  else if(Y.Array.indexOf(this.get('navButtonsRight'), button) > -1) {
8241
  return true;
8242
  }
8243
- else {
8244
  return false;
8245
  }
8246
  }
@@ -8248,7 +8248,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8248
  return false;
8249
  }
8250
  },
8251
-
8252
  /**
8253
  * @method _removeNavButton
8254
  * @param button {String} The name of the button to remove.
@@ -8261,7 +8261,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8261
  buttonsRight = this.get('navButtonsRight'),
8262
  vtTopNavButtons = this.get('verticalThumbsTopNavButtons'),
8263
  vtBottomNavButtons = this.get('verticalThumbsBottomNavButtons');
8264
-
8265
  if(Y.Array.indexOf(buttons, button) > -1) {
8266
  buttons.splice(Y.Array.indexOf(buttons, button), 1);
8267
  }
@@ -8277,14 +8277,14 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8277
  if(Y.Array.indexOf(vtBottomNavButtons, button) > -1) {
8278
  vtBottomNavButtons.splice(Y.Array.indexOf(vtBottomNavButtons, button), 1);
8279
  }
8280
-
8281
  this._set('navButtons', buttons);
8282
  this._set('navButtonsLeft', buttonsLeft);
8283
  this._set('navButtonsRight', buttonsRight);
8284
  this._set('verticalThumbsTopNavButtons', vtTopNavButtons);
8285
  this._set('verticalThumbsBottomNavButtons', vtBottomNavButtons);
8286
  }
8287
-
8288
  }, {
8289
 
8290
  /**
@@ -8296,7 +8296,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8296
  * @static
8297
  */
8298
  CSS_PREFIX: 'fl-slideshow',
8299
-
8300
  /**
8301
  * Static property used to define the default attribute configuration of
8302
  * the Widget.
@@ -8307,9 +8307,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8307
  * @static
8308
  */
8309
  ATTRS: {
8310
-
8311
  /**
8312
- * What should happen when the main image is clicked.
8313
  * Options are none, gallery and url. If url is chosen,
8314
  * clickActionUrl must be set.
8315
  *
@@ -8320,7 +8320,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8320
  clickAction: {
8321
  value: 'none'
8322
  },
8323
-
8324
  /**
8325
  * The redirect url to use when clickAction is set to url.
8326
  *
@@ -8331,7 +8331,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8331
  clickActionUrl: {
8332
  value: ''
8333
  },
8334
-
8335
  /**
8336
  * Whether to crop the main image.
8337
  *
@@ -8342,7 +8342,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8342
  crop: {
8343
  value: false
8344
  },
8345
-
8346
  /**
8347
  * Whether to only crop horizontal images or not.
8348
  *
@@ -8353,7 +8353,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8353
  cropHorizontalsOnly: {
8354
  value: false
8355
  },
8356
-
8357
  /**
8358
  * Whether to always use the loading image between images
8359
  * or to only use it between albums.
@@ -8365,9 +8365,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8365
  loadingImageAlwaysEnabled: {
8366
  value: true
8367
  },
8368
-
8369
  /**
8370
- * The x and y position of the main image
8371
  * within the bounding box.
8372
  *
8373
  * @attribute position
@@ -8377,7 +8377,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8377
  position: {
8378
  value: 'center center'
8379
  },
8380
-
8381
  /**
8382
  * Whether to right click protect the main image.
8383
  *
@@ -8388,7 +8388,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8388
  protect: {
8389
  value: true
8390
  },
8391
-
8392
  /**
8393
  * Whether to resize the main image past
8394
  * its original width and height.
@@ -8400,12 +8400,12 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8400
  upsize: {
8401
  value: true
8402
  },
8403
-
8404
  /**
8405
- * The type of transition to use. Possible values are
8406
  * none, fade, slideHorizontal and slideVertical. The
8407
  * value can also be a common seperated string of transitions
8408
- * that will be randomly chosen for each image.
8409
  *
8410
  * @attribute transition
8411
  * @type String
@@ -8414,7 +8414,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8414
  transition: {
8415
  value: 'fade'
8416
  },
8417
-
8418
  /**
8419
  * The duration of the transition, measured in seconds.
8420
  *
@@ -8425,7 +8425,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8425
  transitionDuration: {
8426
  value: 1
8427
  },
8428
-
8429
  /**
8430
  * The type of transition easing to use.
8431
  *
@@ -8436,20 +8436,20 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8436
  transitionEasing: {
8437
  value: 'ease-out'
8438
  },
8439
-
8440
  /**
8441
  * The amount of zoom to use for the Ken Burns effect.
8442
  *
8443
  * @attribute kenBurnsZoom
8444
- * @type Number
8445
  * @default 1.2
8446
- */
8447
  kenBurnsZoom: {
8448
  value: 1.2
8449
  },
8450
-
8451
  /**
8452
- * The type of navigation to use. Possible values are
8453
  * buttons, thumbs, custon and none.
8454
  *
8455
  * @attribute navType
@@ -8459,7 +8459,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8459
  navType: {
8460
  value: 'none'
8461
  },
8462
-
8463
  /**
8464
  * The position of the main nav. Possible values are top and bottom.
8465
  *
@@ -8470,7 +8470,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8470
  navPosition: {
8471
  value: 'bottom'
8472
  },
8473
-
8474
  /**
8475
  * Whether to overlay the nav on top of the main image.
8476
  *
@@ -8481,7 +8481,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8481
  navOverlay: {
8482
  value: false
8483
  },
8484
-
8485
  /**
8486
  * An array of button names used to render the main nav's buttons.
8487
  *
@@ -8492,7 +8492,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8492
  navButtons: {
8493
  value: []
8494
  },
8495
-
8496
  /**
8497
  * An array of button names used to render the main nav's left buttons.
8498
  *
@@ -8503,7 +8503,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8503
  navButtonsLeft: {
8504
  value: []
8505
  },
8506
-
8507
  /**
8508
  * An array of button names used to render the main nav's right buttons.
8509
  *
@@ -8514,7 +8514,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8514
  navButtonsRight: {
8515
  value: []
8516
  },
8517
-
8518
  /**
8519
  * Whether to hide the overlays when the mouse moves or not.
8520
  *
@@ -8525,7 +8525,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8525
  overlayHideOnMousemove: {
8526
  value: true
8527
  },
8528
-
8529
  /**
8530
  * How long to wait before hiding the overlays.
8531
  * Measured in milliseconds.
@@ -8537,10 +8537,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8537
  overlayHideDelay: {
8538
  value: 3000
8539
  },
8540
-
8541
  /**
8542
  * Whether to use the image nav or not. If true, a prev
8543
- * and next button will be overlaid on the main image.
8544
  *
8545
  * @attribute imageNavEnabled
8546
  * @type Boolean
@@ -8549,7 +8549,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8549
  imageNavEnabled: {
8550
  value: false
8551
  },
8552
-
8553
  /**
8554
  * Whether to use the mouse nav or not. If true, the cursor
8555
  * will turn into a prev or next button when over the slideshow.
@@ -8561,7 +8561,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8561
  mouseNavEnabled: {
8562
  value: false
8563
  },
8564
-
8565
  /**
8566
  * Whether to hide the thumbs when clicking on a thumbnail
8567
  * image or not. Thumbs always hide navType is set to buttons.
@@ -8573,7 +8573,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8573
  thumbsHideOnClick: {
8574
  value: true
8575
  },
8576
-
8577
  /**
8578
  * The horizontal spacing between thumbs.
8579
  *
@@ -8584,7 +8584,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8584
  thumbsHorizontalSpacing: {
8585
  value: 15
8586
  },
8587
-
8588
  /**
8589
  * The vertical spacing between thumbs.
8590
  *
@@ -8595,7 +8595,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8595
  thumbsVerticalSpacing: {
8596
  value: 15
8597
  },
8598
-
8599
  /**
8600
  * Whether to space the thumbs evenly within a page.
8601
  *
@@ -8606,7 +8606,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8606
  thumbsSpaceEvenly: {
8607
  value: true
8608
  },
8609
-
8610
  /**
8611
  * Whether to center single pages of thumbs.
8612
  *
@@ -8617,7 +8617,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8617
  thumbsCenterSinglePage: {
8618
  value: true
8619
  },
8620
-
8621
  /**
8622
  * Whether to pause the slideshow when a thumb is clicked.
8623
  *
@@ -8628,7 +8628,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8628
  thumbsPauseOnClick: {
8629
  value: false
8630
  },
8631
-
8632
  /**
8633
  * The type of transition to use between pages of thumbs.
8634
  *
@@ -8639,7 +8639,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8639
  thumbsTransition: {
8640
  value: 'slideHorizontal'
8641
  },
8642
-
8643
  /**
8644
  * The duration of the transition between pages of thumbs.
8645
  *
@@ -8650,10 +8650,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8650
  thumbsTransitionDuration: {
8651
  value: 0.8
8652
  },
8653
-
8654
  /**
8655
  * The type of transition easing to use between pages of thumbs.
8656
- *
8657
  * @attribute thumbsTransitionEasing
8658
  * @type String
8659
  * @default ease-out
@@ -8661,7 +8661,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8661
  thumbsTransitionEasing: {
8662
  value: 'ease-out'
8663
  },
8664
-
8665
  /**
8666
  * Whether to crop the thumbnails.
8667
  *
@@ -8672,7 +8672,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8672
  thumbsImageCrop: {
8673
  value: true
8674
  },
8675
-
8676
  /**
8677
  * The width of each thumbnail.
8678
  *
@@ -8683,7 +8683,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8683
  thumbsImageWidth: {
8684
  value: 50
8685
  },
8686
-
8687
  /**
8688
  * The height of each thumbnail.
8689
  *
@@ -8694,10 +8694,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8694
  thumbsImageHeight: {
8695
  value: 50
8696
  },
8697
-
8698
  /**
8699
  * The text to use for the "read less" toggle link.
8700
- *
8701
  * @attribute captionLessLinkText
8702
  * @type String
8703
  * @default Read Less
@@ -8705,10 +8705,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8705
  captionLessLinkText: {
8706
  value: 'Read Less'
8707
  },
8708
-
8709
  /**
8710
  * The text to use for the "read more" toggle link.
8711
- *
8712
  * @attribute captionMoreLinkText
8713
  * @type String
8714
  * @default Read More
@@ -8716,10 +8716,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8716
  captionMoreLinkText: {
8717
  value: 'Read More'
8718
  },
8719
-
8720
  /**
8721
  * The length of the caption to show. If greater than -1,
8722
- * the text will be truncated and a read more link will
8723
  * be displayed. If set to -1, the entire caption will be shown.
8724
  *
8725
  * @attribute captionTextLength
@@ -8729,7 +8729,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8729
  captionTextLength: {
8730
  value: 200
8731
  },
8732
-
8733
  /**
8734
  * Whether to strip out HTML tags in the caption
8735
  * text or not.
@@ -8741,7 +8741,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8741
  captionStripTags: {
8742
  value: false
8743
  },
8744
-
8745
  /**
8746
  * Whether to use the vertical thumbs or not.
8747
  *
@@ -8752,9 +8752,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8752
  verticalThumbsEnabled: {
8753
  value: false
8754
  },
8755
-
8756
  /**
8757
- * Position of the vertical thumbs. Possible values
8758
  * are either left or right.
8759
  *
8760
  * @attribute verticalThumbsPosition
@@ -8764,9 +8764,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8764
  verticalThumbsPosition: {
8765
  value: 'left'
8766
  },
8767
-
8768
  /**
8769
- * Whether to overlay the vertical thumbs
8770
  * on the main image or not.
8771
  *
8772
  * @attribute verticalThumbsOverlay
@@ -8776,7 +8776,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8776
  verticalThumbsOverlay: {
8777
  value: false
8778
  },
8779
-
8780
  /**
8781
  * The number of columns for the vertical thumbs.
8782
  *
@@ -8787,7 +8787,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8787
  verticalThumbsColumns: {
8788
  value: 1
8789
  },
8790
-
8791
  /**
8792
  * Whether to use the vertical thumbs top nav or not.
8793
  *
@@ -8798,9 +8798,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8798
  verticalThumbsTopNavEnabled: {
8799
  value: false
8800
  },
8801
-
8802
  /**
8803
- * An array of button names used to render
8804
  * the vertical thumbs top nav buttons.
8805
  *
8806
  * @attribute verticalThumbsTopNavButtons
@@ -8810,7 +8810,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8810
  verticalThumbsTopNavButtons: {
8811
  value: ['prevPage', 'nextPage']
8812
  },
8813
-
8814
  /**
8815
  * Whether to use the vertical thumbs bottom nav or not.
8816
  *
@@ -8821,9 +8821,9 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8821
  verticalThumbsBottomNavEnabled: {
8822
  value: true
8823
  },
8824
-
8825
  /**
8826
- * An array of button names used to render
8827
  * the vertical thumbs top nav buttons.
8828
  *
8829
  * @attribute verticalThumbsBottomNavButtons
@@ -8833,7 +8833,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8833
  verticalThumbsBottomNavButtons: {
8834
  value: ['prevPage', 'nextPage']
8835
  },
8836
-
8837
  /**
8838
  * The horizontal spacing between vertical thumbs.
8839
  *
@@ -8844,7 +8844,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8844
  verticalThumbsHorizontalSpacing: {
8845
  value: 15
8846
  },
8847
-
8848
  /**
8849
  * The vertical spacing between vertical thumbs.
8850
  *
@@ -8855,7 +8855,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8855
  verticalThumbsVerticalSpacing: {
8856
  value: 15
8857
  },
8858
-
8859
  /**
8860
  * Whether to space the vertical thumbs evenly within a page.
8861
  *
@@ -8866,7 +8866,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8866
  verticalThumbsSpaceEvenly: {
8867
  value: false
8868
  },
8869
-
8870
  /**
8871
  * Whether to pause the slideshow when a vertical thumb is clicked.
8872
  *
@@ -8877,7 +8877,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8877
  verticalThumbsPauseOnClick: {
8878
  value: false
8879
  },
8880
-
8881
  /**
8882
  * Whether to crop the vertical thumbs or not.
8883
  *
@@ -8888,7 +8888,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8888
  verticalThumbsImageCrop: {
8889
  value: true
8890
  },
8891
-
8892
  /**
8893
  * The width of each vertical thumbnail.
8894
  *
@@ -8899,7 +8899,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8899
  verticalThumbsImageWidth: {
8900
  value: 75
8901
  },
8902
-
8903
  /**
8904
  * The height of each vertical thumbnail.
8905
  *
@@ -8910,7 +8910,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8910
  verticalThumbsImageHeight: {
8911
  value: 75
8912
  },
8913
-
8914
  /**
8915
  * The type of transition to use between pages of vertical thumbs.
8916
  *
@@ -8921,7 +8921,7 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8921
  verticalThumbsTransition: {
8922
  value: 'slideVertical'
8923
  },
8924
-
8925
  /**
8926
  * The duration of the transition between pages of vertical thumbs.
8927
  *
@@ -8932,10 +8932,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8932
  verticalThumbsTransitionDuration: {
8933
  value: 0.8
8934
  },
8935
-
8936
  /**
8937
  * The type of transition easing to use between pages of vertical thumbs.
8938
- *
8939
  * @attribute verticalThumbsTransitionEasing
8940
  * @type String
8941
  * @default ease-out
@@ -8943,10 +8943,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8943
  verticalThumbsTransitionEasing: {
8944
  value: 'ease-out'
8945
  },
8946
-
8947
  /**
8948
  * Whether to use the Google Plus button or not.
8949
- *
8950
  * @attribute googlePlusButtonEnabled
8951
  * @type Boolean
8952
  * @default true
@@ -8954,10 +8954,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8954
  googlePlusButtonEnabled: {
8955
  value: true
8956
  },
8957
-
8958
  /**
8959
  * Whether to use the Facebook like button or not.
8960
- *
8961
  * @attribute likeButtonEnabled
8962
  * @type Boolean
8963
  * @default true
@@ -8965,10 +8965,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8965
  likeButtonEnabled: {
8966
  value: true
8967
  },
8968
-
8969
  /**
8970
  * Whether to use the Pinterest button or not.
8971
- *
8972
  * @attribute pinterestButtonEnabled
8973
  * @type Boolean
8974
  * @default true
@@ -8976,10 +8976,10 @@ Y.namespace('FL').Slideshow = Y.Base.create('fl-slideshow', Y.FL.SlideshowBase,
8976
  pinterestButtonEnabled: {
8977
  value: true
8978
  },
8979
-
8980
  /**
8981
  * Whether to use the Tweet button or not.
8982
- *
8983
  * @attribute tweetButtonEnabled
8984
  * @type Boolean
8985
  * @default true
@@ -9022,7 +9022,7 @@ YUI.add('fl-slideshow-album-loader', function(Y) {
9022
  * @extends Base
9023
  */
9024
  Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loader', Y.Base, [], {
9025
-
9026
  /**
9027
  * The source object used for loading.
9028
  *
@@ -9032,27 +9032,27 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9032
  * @protected
9033
  */
9034
  _source: null,
9035
-
9036
  /**
9037
  * Loads slideshow album data using the provided source object.
9038
  *
9039
  * @method load
9040
  * @param source {Object} The source object to use for loading.
9041
- */
9042
  load: function(source)
9043
  {
9044
  this._source = source;
9045
-
9046
  /**
9047
  * Fires before a new load request is made.
9048
  *
9049
  * @event start
9050
  */
9051
  this.fire('start');
9052
-
9053
  this[Y.FL.SlideshowAlbumLoader.TYPES[source.type]].call(this);
9054
  },
9055
-
9056
  /**
9057
  * Called when a source type completes loading
9058
  * and fires the complete event.
@@ -9060,11 +9060,11 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9060
  * @method _loadComplete
9061
  * @param o {Object} Passed to complete event subscribers.
9062
  * @protected
9063
- */
9064
  _loadComplete: function(o)
9065
  {
9066
  o = this._randomize(o);
9067
-
9068
  /**
9069
  * Fires after a new load request is made.
9070
  *
@@ -9072,71 +9072,71 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9072
  */
9073
  this.fire('complete', o);
9074
  },
9075
-
9076
  /**
9077
  * Randomizes images in an album.
9078
  *
9079
  * @method _randomize
9080
  * @param album {Object} The album to randomize.
9081
  * @protected
9082
- */
9083
  _randomize: function(o)
9084
  {
9085
  var i;
9086
-
9087
  if(this.get('randomize')) {
9088
  o.albumInfo.images.sort(function() { return 0.5 - Math.random(); });
9089
-
9090
  for(i = 0; i < o.albumInfo.images.length; i++) {
9091
  o.albumInfo.images[i].index = i;
9092
  }
9093
  }
9094
-
9095
  return o;
9096
  },
9097
-
9098
  /**
9099
  * Loads slideshow album data from SmugMug.
9100
  *
9101
  * @method _loadSmugMug
9102
  * @protected
9103
- */
9104
- _loadSmugMug: function()
9105
  {
9106
  var sm = new Y.FL.SmugMugAPI();
9107
-
9108
  sm.on('complete', this._loadSmugMugSuccess, this);
9109
  sm.addParam('method', 'smugmug.images.get');
9110
  sm.addParam('AlbumID', this._source.id);
9111
  sm.addParam('AlbumKey', this._source.key);
9112
  sm.addParam('Extras', 'Caption,Format,FileName');
9113
-
9114
  // Gallery password
9115
  if(this._source.password) {
9116
  sm.addParam('Password', this._source.password);
9117
  }
9118
-
9119
  // Site-wide password
9120
  if(this._source.sp) {
9121
  sm.addParam('SitePassword', this._source.sp);
9122
  }
9123
-
9124
  sm.request();
9125
  },
9126
-
9127
  /**
9128
  * Processes slideshow album data loaded from SmugMug.
9129
  *
9130
  * @method _loadSmugMugSuccess
9131
  * @param e {Object} The custom event object passed to this function.
9132
  * @protected
9133
- */
9134
- _loadSmugMugSuccess: function(e)
9135
  {
9136
  var images = e.Album.Images,
9137
  album = {},
9138
  proxy = typeof this._source.proxy !== 'undefined' ? this._source.proxy : '',
9139
- buyBase = '',
9140
  baseURL = '',
9141
  ext = '',
9142
  format = '',
@@ -9150,15 +9150,15 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9150
  album.link = e.Album.URL;
9151
  album.title = this._source.title ? this._source.title : '';
9152
  album.images = [];
9153
- buyBase = album.link.replace('http://', '').split('/').shift();
9154
- buyBase = 'http://' + buyBase + '/buy/' + e.Album.id + '_' + e.Album.Key + '/';
9155
-
9156
  for(i = 0; i < images.length; i++)
9157
  {
9158
  baseURL = proxy + e.Album.URL + '/' + images[i].id + '_' + images[i].Key;
9159
  format = images[i].Format.toLowerCase();
9160
  ext = format == 'mp4' ? '.jpg' : '.' + format;
9161
-
9162
  album.images[i] = {};
9163
  album.images[i].index = i;
9164
  album.images[i].sourceType = 'smugmug';
@@ -9180,21 +9180,21 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9180
  album.images[i].x3largeURL = baseURL + '-X3' + ext;
9181
  album.images[i].buyURL = buyBase + images[i].id + '_' + images[i].Key;
9182
  album.images[i].iframe = '';
9183
-
9184
  if(album.images[i].caption.indexOf('iframe')) {
9185
  temp = Y.Node.create('<div>'+ album.images[i].caption +'</div>');
9186
  iframe = temp.one('iframe');
9187
-
9188
  if(iframe) {
9189
  album.images[i].iframe = iframe.getAttribute('src');
9190
  album.images[i].caption = album.images[i].caption.replace(/<iframe.*>.*<\/iframe>/gi, '');
9191
  }
9192
  }
9193
  }
9194
-
9195
  this._loadComplete({ 'albumInfo': album });
9196
  },
9197
-
9198
  /**
9199
  * Loads slideshow album data from an array of urls.
9200
  *
@@ -9202,16 +9202,16 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9202
  *
9203
  * @method _loadUrls
9204
  * @protected
9205
- */
9206
- _loadUrls: function()
9207
  {
9208
  var album = {},
9209
  i = 0;
9210
-
9211
  album.index = this._source.index;
9212
  album.title = this._source.title ? this._source.title : '';
9213
  album.images = [];
9214
-
9215
  for( ; i < this._source.urls.length; i++)
9216
  {
9217
  album.images[i] = {};
@@ -9231,12 +9231,12 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9231
  album.images[i].buyURL = this._source.urls[i].buyURL || '';
9232
  album.images[i].iframe = this._source.urls[i].iframe || '';
9233
  }
9234
-
9235
  this._loadComplete({ 'albumInfo': album });
9236
  }
9237
-
9238
  }, {
9239
-
9240
  /**
9241
  * Static property used to define the default attribute configuration of
9242
  * the Widget.
@@ -9247,7 +9247,7 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9247
  * @static
9248
  */
9249
  ATTRS: {
9250
-
9251
  /**
9252
  * If true, the images will be randomized after loading.
9253
  *
@@ -9259,7 +9259,7 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9259
  value: false
9260
  }
9261
  },
9262
-
9263
  /**
9264
  * The types of source data that can be loaded
9265
  * and associated functions.
@@ -9269,7 +9269,7 @@ Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loade
9269
  * @readOnly
9270
  * @protected
9271
  * @static
9272
- */
9273
  TYPES: {
9274
  'smugmug': '_loadSmugMug',
9275
  'flickr': '_loadFlickr',
@@ -9290,7 +9290,7 @@ YUI.add('fl-slideshow-base', function(Y) {
9290
  */
9291
 
9292
  /**
9293
- * The base class that gets extended when creating new
9294
  * slideshow widgets. Manages loading, playing, and resizing.
9295
  * <p>
9296
  * While SlideshowBase can be instantiated, it is only meant to
@@ -9303,7 +9303,7 @@ YUI.add('fl-slideshow-base', function(Y) {
9303
  * @extends Widget
9304
  */
9305
  Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [Y.WidgetParent], {
9306
-
9307
  /**
9308
  * FL.SlideshowAlbumLoader instance used to load albums.
9309
  *
@@ -9313,9 +9313,9 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9313
  * @protected
9314
  */
9315
  _albumLoader: null,
9316
-
9317
  /**
9318
- * An array of albums loaded from the source attribute.
9319
  * Each album is an array of objects containing image info.
9320
  *
9321
  * @property albums
@@ -9323,7 +9323,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9323
  * @default []
9324
  */
9325
  albums: [],
9326
-
9327
  /**
9328
  * Info for the active album.
9329
  *
@@ -9332,9 +9332,9 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9332
  * @default null
9333
  */
9334
  albumInfo: null,
9335
-
9336
  /**
9337
- * A number that represents the index of the active
9338
  * album in the albums array.
9339
  *
9340
  * @property albumIndex
@@ -9342,7 +9342,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9342
  * @default null
9343
  */
9344
  albumIndex: null,
9345
-
9346
  /**
9347
  * Info for the active image.
9348
  *
@@ -9351,9 +9351,9 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9351
  * @default null
9352
  */
9353
  imageInfo: null,
9354
-
9355
  /**
9356
- * A number that represents the index of the active
9357
  * image in the albumInfo array.
9358
  *
9359
  * @property imageIndex
@@ -9361,9 +9361,9 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9361
  * @default null
9362
  */
9363
  imageIndex: null,
9364
-
9365
  /**
9366
- * A number that represents the index of the last
9367
  * image that was loaded in the albumInfo array.
9368
  *
9369
  * @property lastImageIndex
@@ -9393,7 +9393,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9393
  _playing: false,
9394
 
9395
  /**
9396
- * Timer for the break in between images when
9397
  * the slideshow is playing.
9398
  *
9399
  * @property _playingTimer
@@ -9413,11 +9413,11 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9413
  * @protected
9414
  */
9415
  _playingTimerEvent: null,
9416
-
9417
  /**
9418
- * An instance of FL.Spinner that is shown and hidden
9419
- * using _showLoadingImage and _hideLoadingImage when
9420
- * a loading activity occurs.
9421
  *
9422
  * @property _loadingImage
9423
  * @type FL.Spinner
@@ -9425,7 +9425,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9425
  * @protected
9426
  */
9427
  _loadingImage: null,
9428
-
9429
  /**
9430
  * An div node that wraps the loading image.
9431
  *
@@ -9435,17 +9435,17 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9435
  * @protected
9436
  */
9437
  _loadingImageWrap: null,
9438
-
9439
  /**
9440
- * Whether the loading image is visible or not.
9441
  *
9442
  * @property _loadingImageVisible
9443
  * @type Boolean
9444
  * @default false
9445
  * @protected
9446
- */
9447
  _loadingImageVisible: false,
9448
-
9449
  /**
9450
  * A timer to delay the display of the loading image.
9451
  *
@@ -9455,7 +9455,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9455
  * @protected
9456
  */
9457
  _loadingImageTimer: null,
9458
-
9459
  /**
9460
  * The container to insert the loading image into. If
9461
  * no container is set, the loading image will be inserted
@@ -9467,7 +9467,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9467
  * @protected
9468
  */
9469
  _loadingImageContainer: null,
9470
-
9471
  /**
9472
  * The intial height of the slideshow. Used to resize
9473
  * back to the starting height when exiting stretchy.
@@ -9478,7 +9478,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9478
  * @protected
9479
  */
9480
  _initialHeight: null,
9481
-
9482
  /**
9483
  * The intial width of the slideshow. Used to resize
9484
  * back to the starting width when exiting stretchy.
@@ -9493,15 +9493,15 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9493
  /**
9494
  * @method initializer
9495
  * @protected
9496
- */
9497
- initializer: function()
9498
  {
9499
  // Loader
9500
  this._albumLoader = new Y.FL.SlideshowAlbumLoader({
9501
  randomize: this.get('randomize')
9502
  });
9503
  },
9504
-
9505
  /**
9506
  * @method renderUI
9507
  * @protected
@@ -9510,7 +9510,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9510
  {
9511
  this._renderLoadingImage();
9512
  },
9513
-
9514
  /**
9515
  * @method bindUI
9516
  * @protected
@@ -9523,11 +9523,11 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9523
  // Resize Events
9524
  Y.one(window).on('fl-slideshow-base|resize', this._delayResize, this);
9525
  Y.one(window).on('fl-slideshow-base|orientationchange', this._delayResize, this);
9526
-
9527
  // Key Events
9528
  Y.Node.one('body').on('keydown', Y.bind(this._onKey, this));
9529
  },
9530
-
9531
  /**
9532
  * @method syncUI
9533
  * @protected
@@ -9535,14 +9535,14 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9535
  syncUI: function()
9536
  {
9537
  this.get('boundingBox').addClass('fl-slideshow-' + this.get('color'));
9538
-
9539
  this.resize();
9540
-
9541
  if(this.get('loadOnRender')) {
9542
  this.loadAlbum(this.get('defaultAlbum'), this.get('defaultImage'));
9543
  }
9544
  },
9545
-
9546
  /**
9547
  * Add album data to the source object.
9548
  *
@@ -9553,13 +9553,13 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9553
  {
9554
  var source = this.get('source'),
9555
  i = source.length;
9556
-
9557
  source[i] = data;
9558
  source[i].index = i;
9559
-
9560
  this.set('source', source);
9561
  },
9562
-
9563
  /**
9564
  * Loads an album from the source array with the provided albumIndex.
9565
  * If no albumIndex is provided, the first album in the array will be loaded.
@@ -9573,21 +9573,21 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9573
  {
9574
  var source = this.get('source'),
9575
  loadImageIndex = typeof imageIndex == 'undefined' ? 0 : imageIndex;
9576
-
9577
  // Reset internal image indexes.
9578
  this.imageIndex = null;
9579
  this.lastImageIndex = null;
9580
-
9581
  /**
9582
  * Fires before a new album request is made.
9583
  *
9584
  * @event albumLoadStart
9585
  */
9586
  this.fire('albumLoadStart');
9587
-
9588
  // Load an image after the album.
9589
  this.once('albumLoadComplete', Y.bind(this.loadImage, this, loadImageIndex));
9590
-
9591
  // Load data passed from another slideshow instance.
9592
  if(source[albumIndex] && source[albumIndex].type == 'album-data') {
9593
  this.albums[albumIndex] = source[albumIndex].data;
@@ -9602,27 +9602,27 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9602
  this._albumLoader.load(source[albumIndex] || source[0]);
9603
  }
9604
  },
9605
-
9606
  /**
9607
  * Processes the loaded album and fires the albumLoadComplete event.
9608
  *
9609
  * @method _loadAlbumComplete
9610
  * @param o {Object} The custom event object passed to this method.
9611
  * @protected
9612
- */
9613
  _loadAlbumComplete: function(o)
9614
  {
9615
  this.albums[o.albumInfo.index] = o.albumInfo;
9616
  this.albumInfo = o.albumInfo;
9617
  this.albumIndex = o.albumInfo.index;
9618
-
9619
  /**
9620
  * Fires after a new album request is made.
9621
  *
9622
  * @event albumLoadComplete
9623
  */
9624
  this.fire('albumLoadComplete');
9625
-
9626
  // Auto Play
9627
  if(this.get('autoPlay')) {
9628
  this._playingTimerStart();
@@ -9630,26 +9630,26 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9630
  this._playing = true;
9631
  }
9632
  },
9633
-
9634
  /**
9635
  * Sets the active image index and fires the imageLoadComplete event.
9636
  *
9637
  * @method loadImage
9638
  * @param index {Number} The image index to load.
9639
- */
9640
  loadImage: function(index)
9641
  {
9642
  if(this._playing) {
9643
  this._playingTimerStart();
9644
  }
9645
-
9646
  index = index < 0 ? this.albumInfo.images.length - 1 : index;
9647
  index = index >= this.albumInfo.images.length ? 0 : index;
9648
-
9649
  this.lastImageIndex = this.imageIndex;
9650
  this.imageIndex = index;
9651
  this.imageInfo = this.albumInfo.images[index];
9652
-
9653
  /**
9654
  * Fires after a new image index is set.
9655
  *
@@ -9657,20 +9657,20 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9657
  */
9658
  this.fire('imageLoadComplete', { 'imageInfo': this.imageInfo });
9659
  },
9660
-
9661
  /**
9662
  * Loads the previous image.
9663
  *
9664
  * @method prevImage
9665
- */
9666
  prevImage: function()
9667
  {
9668
  if(this.get('pauseOnNextOrPrev')) {
9669
  this.pause();
9670
  }
9671
-
9672
  this.loadImage(this.imageIndex - 1);
9673
-
9674
  /**
9675
  * Fires when the previous image is loaded.
9676
  *
@@ -9678,20 +9678,20 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9678
  */
9679
  this.fire('prevImage');
9680
  },
9681
-
9682
  /**
9683
  * Loads the next image.
9684
  *
9685
  * @method nextImage
9686
- */
9687
  nextImage: function()
9688
  {
9689
  if(this.get('pauseOnNextOrPrev')) {
9690
  this.pause();
9691
  }
9692
-
9693
  this.loadImage(this.imageIndex + 1);
9694
-
9695
  /**
9696
  * Fires when the next image is loaded.
9697
  *
@@ -9699,7 +9699,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9699
  */
9700
  this.fire('nextImage');
9701
  },
9702
-
9703
  /**
9704
  * Keyboard navigation for the next and prev images.
9705
  *
@@ -9709,23 +9709,23 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9709
  _onKey: function(e)
9710
  {
9711
  switch(e.keyCode) {
9712
-
9713
  case 37:
9714
  this.prevImage();
9715
  break;
9716
-
9717
  case 39:
9718
  this.nextImage();
9719
  break;
9720
  }
9721
  },
9722
-
9723
  /**
9724
- * Resizes the slideshow using either the
9725
  * stretchy or standard functions.
9726
- *
9727
  * @method resize
9728
- */
9729
  resize: function()
9730
  {
9731
  var stretchy = this.get('stretchy'),
@@ -9733,24 +9733,24 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9733
  width = parseInt(Y.one('body').get('winWidth'), 10),
9734
  threshold = this.get('responsiveThreshold');
9735
 
9736
- // Stretchy resize to the window only if the parent width is greater
9737
- // than the responsive threshold and stretchyType is set to window.
9738
  if(width > threshold && stretchy && stretchyType == 'window') {
9739
  this._stretchyWindowResize();
9740
  }
9741
-
9742
- // Ratio resize if the parent width is less than the responsive
9743
  // threshold or if stretchyType is set to ratio.
9744
  else if((width <= threshold) || (stretchy && stretchyType == 'ratio')) {
9745
  this._stretchyRatioResize();
9746
  }
9747
-
9748
  // Do a standard resize based on the height and
9749
  // width passed to the constructor function.
9750
  else {
9751
  this._standardResize();
9752
  }
9753
-
9754
  /**
9755
  * Fires when the slideshow is resized.
9756
  *
@@ -9762,7 +9762,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9762
  /**
9763
  * @method _standardResize
9764
  * @protected
9765
- */
9766
  _standardResize: function()
9767
  {
9768
  var stretchy = this.get('stretchy'),
@@ -9779,24 +9779,24 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9779
  this._stretchyWindowResize();
9780
  return;
9781
  }
9782
-
9783
- // Resize to the width and height of the parent.
9784
  else if(stretchy && stretchyType == 'contain') {
9785
  bb.setStyle('height', parentHeight + 'px');
9786
  bb.setStyle('width', parentWidth + 'px');
9787
  }
9788
-
9789
  // Ratio resize if we don't have a height defined.
9790
  else if(!Y.Lang.isNumber(height)) {
9791
  this._stretchyRatioResize();
9792
  return;
9793
  }
9794
-
9795
  // Resize to the defined width and height.
9796
  else {
9797
-
9798
  bb.setStyle('height', height + 'px');
9799
-
9800
  if(width) {
9801
  bb.setStyle('width', width + 'px');
9802
  }
@@ -9805,14 +9805,14 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9805
  }
9806
  }
9807
  },
9808
-
9809
  /**
9810
- * Resizes to the height of the window, compensating
9811
  * for any padding.
9812
- *
9813
  * @method _stretchyWindowResize
9814
  * @protected
9815
- */
9816
  _stretchyWindowResize: function()
9817
  {
9818
  var bb = this.get('boundingBox'),
@@ -9821,26 +9821,26 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9821
  paddingBottom = parseInt(bb.getStyle('paddingBottom'), 10),
9822
  height = parseInt(Y.one('body').get('winHeight'), 10),
9823
  width = '';
9824
-
9825
- // Set the vertical space to 0 and width to the
9826
  // window's width if we are in fullscreen mode.
9827
  if(bb.hasClass('fl-fullscreen-active')) {
9828
  verticalSpace = 0;
9829
  width = parseInt(Y.one('body').get('winWidth'), 10) + 'px';
9830
  }
9831
-
9832
  height = (height - paddingTop - paddingBottom - verticalSpace) + 'px';
9833
-
9834
  bb.setStyle('height', height);
9835
  bb.setStyle('width', width);
9836
  },
9837
-
9838
  /**
9839
  * Resizes the height by multiplying the width and stretchyRatio value.
9840
- *
9841
  * @method _stretchyRatioResize
9842
  * @protected
9843
- */
9844
  _stretchyRatioResize: function()
9845
  {
9846
  var bb = this.get('boundingBox'),
@@ -9854,15 +9854,15 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9854
  winWidth = parseInt(Y.one('body').get('winWidth'), 10),
9855
  height = computedWidth * stretchyRatio,
9856
  width = '';
9857
-
9858
  // Use the window's height and width if we are in fullscreen mode.
9859
  if(bb.hasClass('fl-fullscreen-active')) {
9860
  height = winHeight;
9861
  width = winWidth;
9862
  }
9863
-
9864
  height = (height - paddingTop - paddingBottom - verticalSpace) + 'px';
9865
-
9866
  bb.setStyle('height', height);
9867
  bb.setStyle('width', width);
9868
  },
@@ -9872,13 +9872,13 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9872
  *
9873
  * @method _delayResize
9874
  * @protected
9875
- */
9876
  _delayResize: function()
9877
  {
9878
  if(this._resizeTimer) {
9879
  this._resizeTimer.cancel();
9880
  }
9881
-
9882
  this._resizeTimer = Y.later(300, this, this.resize);
9883
  },
9884
 
@@ -9886,11 +9886,11 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9886
  * Starts a new playing timer and fires the played event.
9887
  *
9888
  * @method play
9889
- */
9890
  play: function()
9891
  {
9892
  this._playingTimer = Y.later(this.get('speed'), this, this._playingTimerComplete);
9893
-
9894
  /**
9895
  * Fires when the playing timer starts.
9896
  *
@@ -9899,16 +9899,16 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9899
  this.fire('played');
9900
  this._playing = true;
9901
  },
9902
-
9903
  /**
9904
  * Cancels the current playing timer and fires the paused event.
9905
  *
9906
  * @method pause
9907
- */
9908
  pause: function()
9909
  {
9910
  this._playingTimerCancel();
9911
-
9912
  /**
9913
  * Fires when the playing timer is canceled.
9914
  *
@@ -9917,7 +9917,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9917
  this.fire('paused');
9918
  this._playing = false;
9919
  },
9920
-
9921
  /**
9922
  * A new playing timer will start when this event is fired.
9923
  *
@@ -9925,7 +9925,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9925
  * @param obj {Object} The event's host object.
9926
  * @param e {String} The event to fire on the host object.
9927
  * @protected
9928
- */
9929
  _setPlayingTimerEvent: function(obj, e)
9930
  {
9931
  this._playingTimerEvent = {
@@ -9933,18 +9933,18 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9933
  'e': e
9934
  };
9935
  },
9936
-
9937
  /**
9938
- * Cancels the playing timer if it is running and starts a new one.
9939
  * The next image is loaded when the timer completes.
9940
  *
9941
  * @method _playingTimerStart
9942
  * @protected
9943
- */
9944
  _playingTimerStart: function(e)
9945
  {
9946
  this._playingTimerCancel();
9947
-
9948
  if(!e && this._playingTimerEvent !== null) {
9949
  this._playingTimerEvent.obj.once('fl-slideshow-base|' + this._playingTimerEvent.e, Y.bind(this._playingTimerStart, this));
9950
  }
@@ -9952,18 +9952,18 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9952
  this._playingTimer = Y.later(this.get('speed'), this, this._playingTimerComplete);
9953
  }
9954
  },
9955
-
9956
  /**
9957
- * Fires when the playing timer completes, starts a
9958
  * new timer and loads the next image.
9959
  *
9960
  * @method _playingTimerComplete
9961
  * @protected
9962
- */
9963
  _playingTimerComplete: function()
9964
  {
9965
  this.loadImage(this.imageIndex + 1);
9966
-
9967
  /**
9968
  * Fires when the playing timer completes.
9969
  *
@@ -9971,13 +9971,13 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9971
  */
9972
  this.fire('playingTimerComplete');
9973
  },
9974
-
9975
  /**
9976
  * Cancels the playing timer.
9977
  *
9978
  * @method _playingTimerCancel
9979
  * @protected
9980
- */
9981
  _playingTimerCancel: function()
9982
  {
9983
  if(this._playingTimer) {
@@ -9987,13 +9987,13 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
9987
  this._playingTimerEvent.obj.detach('fl-slideshow-base|' + this._playingTimerEvent.e);
9988
  }
9989
  },
9990
-
9991
  /**
9992
  * Creates the loading image.
9993
- *
9994
  * @method _renderLoadingImage
9995
  * @protected
9996
- */
9997
  _renderLoadingImage: function()
9998
  {
9999
  var defaults = {
@@ -10007,71 +10007,71 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10007
  shadow: false // Whether to render a shadow
10008
  },
10009
  settings = Y.merge(defaults, this.get('loadingImageSettings'));
10010
-
10011
  if(this.get('loadingImageEnabled')) {
10012
-
10013
  // Loading image
10014
  if(settings.color === '') {
10015
  settings.color = this._colorToHex(Y.one('body').getStyle('color'));
10016
  }
10017
-
10018
  this._loadingImage = new Y.FL.Spinner(settings);
10019
-
10020
  // Loading image wrap
10021
  this._loadingImageWrap = Y.Node.create('<div class="fl-loading-image"></div>');
10022
-
10023
  this._loadingImageWrap.setStyles({
10024
  position : 'absolute',
10025
  'z-index' : '1000'
10026
  });
10027
  }
10028
  },
10029
-
10030
  /**
10031
  * Inserts the loading image.
10032
  *
10033
  * @method _showLoadingImage
10034
  * @protected
10035
- */
10036
  _showLoadingImage: function()
10037
  {
10038
  if(this._loadingImage && !this._loadingImageVisible) {
10039
-
10040
  this._loadingImageVisible = true;
10041
  this._loadingImage.spin();
10042
  this._loadingImageWrap.insert(this._loadingImage.el);
10043
-
10044
  if(this._loadingImageContainer !== null) {
10045
  this._loadingImageContainer.insert(this._loadingImageWrap);
10046
  }
10047
  else {
10048
  this.get('contentBox').insert(this._loadingImageWrap);
10049
  }
10050
-
10051
  this._positionLoadingImage();
10052
  }
10053
  },
10054
-
10055
  /**
10056
- * Inserts the loading image div node after
10057
  * a timer completes.
10058
  *
10059
  * @method _showLoadingImageWithDelay
10060
  * @protected
10061
- */
10062
  _showLoadingImageWithDelay: function()
10063
  {
10064
  if(this._loadingImage) {
10065
  this._loadingImageTimer = Y.later(1000, this, this._showLoadingImage);
10066
  }
10067
  },
10068
-
10069
  /**
10070
  * Removes the loading image div node.
10071
  *
10072
  * @method _hideLoadingImage
10073
  * @protected
10074
- */
10075
  _hideLoadingImage: function()
10076
  {
10077
  if(this._loadingImageTimer) {
@@ -10084,17 +10084,17 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10084
  this._loadingImageWrap.remove();
10085
  }
10086
  },
10087
-
10088
  /**
10089
  * Centers the loading image in the content box.
10090
  *
10091
  * @method _positionLoadingImage
10092
  * @protected
10093
- */
10094
  _positionLoadingImage: function()
10095
  {
10096
  if(this._loadingImage && this._loadingImageVisible) {
10097
-
10098
  var wrap = this._loadingImageWrap,
10099
  wrapHeight = parseInt(wrap.getComputedStyle('height'), 10),
10100
  wrapWidth = parseInt(wrap.getComputedStyle('width'), 10),
@@ -10108,47 +10108,47 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10108
  left : left + 'px',
10109
  top : top + 'px'
10110
  });
10111
-
10112
  Y.one(this._loadingImage.el).setStyles({
10113
  left : '50%',
10114
  top : '50%'
10115
  });
10116
  }
10117
  },
10118
-
10119
  /**
10120
  * Convert RGB color value to a hex value.
10121
  *
10122
  * @method _colorToHex
10123
  * @protected
10124
- */
10125
- _colorToHex: function(color)
10126
  {
10127
  var digits, red, green, blue, rgb;
10128
-
10129
  if(color.substr(0, 1) === '#') {
10130
  return color;
10131
  }
10132
-
10133
  digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
10134
-
10135
  if ( null === digits ) {
10136
  return '#000';
10137
  }
10138
-
10139
  red = parseInt(digits[2], 10);
10140
  green = parseInt(digits[3], 10);
10141
  blue = parseInt(digits[4], 10);
10142
  rgb = blue | (green << 8) | (red << 16);
10143
  rgb = rgb.toString(16);
10144
-
10145
  if(rgb === '0') {
10146
  rgb = '000';
10147
  }
10148
-
10149
  return digits[1] + '#' + rgb;
10150
  }
10151
-
10152
  }, {
10153
 
10154
  /**
@@ -10160,7 +10160,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10160
  * @static
10161
  */
10162
  CSS_PREFIX: 'fl-slideshow-base',
10163
-
10164
  /**
10165
  * Static property used to define the default attribute configuration of
10166
  * the Widget.
@@ -10171,9 +10171,9 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10171
  * @static
10172
  */
10173
  ATTRS: {
10174
-
10175
  /**
10176
- * Used to create the color class that gets added to the bounding box
10177
  * when the widget is rendered. The color class is used to create new
10178
  * CSS color themes. The default CSS provided includes dark and light themes.
10179
  *
@@ -10186,16 +10186,16 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10186
  value: 'dark',
10187
  writeOnce: true
10188
  },
10189
-
10190
  /**
10191
- * An array of source objects used to load albums. Each object must have
10192
  * a type property and can have a title property as well.
10193
  * <p>
10194
  * In addition to those properties, each object has additional required
10195
  * properties specific to its type. The types currently supported are
10196
  * smugmug and urls with planned support for flickr and picasa.
10197
  * See the user guide for information on loading different types.
10198
- *
10199
  * @attribute source
10200
  * @type Array
10201
  * @default []
@@ -10208,11 +10208,11 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10208
  if(source.constructor == Object) {
10209
  source = [source];
10210
  }
10211
-
10212
  for(var i = 0; i < source.length; i++) {
10213
  source[i].index = i;
10214
  }
10215
-
10216
  return source;
10217
  }
10218
  },
@@ -10260,7 +10260,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10260
  autoPlay: {
10261
  value: true
10262
  },
10263
-
10264
  /**
10265
  * Whether to pause when the next or previous image is loaded
10266
  * using nextImage or prevImage. The slideshow will not be paused
@@ -10274,7 +10274,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10274
  pauseOnNextOrPrev: {
10275
  value: true
10276
  },
10277
-
10278
  /**
10279
  * If true, the images will be randomized after loading.
10280
  *
@@ -10285,7 +10285,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10285
  randomize: {
10286
  value: false
10287
  },
10288
-
10289
  /**
10290
  * The time between images when playing, measured in milliseconds.
10291
  *
@@ -10296,12 +10296,12 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10296
  speed: {
10297
  value: 4000
10298
  },
10299
-
10300
  /**
10301
- * The minimum width of the parent node at which
10302
- * responsive features are enabled. Set to 0 to
10303
  * disable responsive features as they are enabled
10304
- * whether stretchy is set to true or not.
10305
  *
10306
  * @attribute responsiveThreshold
10307
  * @type Number
@@ -10321,15 +10321,15 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10321
  stretchy: {
10322
  value: false
10323
  },
10324
-
10325
  /**
10326
  * The type of stretchy logic to use. Possible values are
10327
- * window and ratio. Both types resize the width of the
10328
  * slideshow to the width of its parent node. With window, the
10329
  * height of the slideshow is resized to the height of the window.
10330
  * With ratio, the height of the slideshow is resized based
10331
  * on the ratio set with stretchyRatio or the height of the window
10332
- * if the ratio height is greater than the window height.
10333
  *
10334
  * @attribute stretchyType
10335
  * @type String
@@ -10376,7 +10376,7 @@ Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [
10376
 
10377
  /**
10378
  * Property object for setting up the spin.js loading image.
10379
- * For a complete list of properties see:
10380
  * http://effinroot.eiremedia.netdna-cdn.com/repo/plugins/misc/spin.js/index.html
10381
  *
10382
  * @attribute loadingImageSettings
@@ -10400,7 +10400,7 @@ YUI.add('fl-smugmug-api', function(Y) {
10400
 
10401
  /**
10402
  * SmugMug API wrapper.
10403
- *
10404
  * NOTE: Only anonymous logins are currently supported.
10405
  *
10406
  * @namespace FL
@@ -10410,7 +10410,7 @@ YUI.add('fl-smugmug-api', function(Y) {
10410
  * @extends Base
10411
  */
10412
  Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10413
-
10414
  /**
10415
  * ID for the current session.
10416
  *
@@ -10420,7 +10420,7 @@ Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10420
  * @protected
10421
  */
10422
  _sessionID: null,
10423
-
10424
  /**
10425
  * URL with parameters for the next API request.
10426
  * Reset after each request.
@@ -10431,25 +10431,25 @@ Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10431
  * @protected
10432
  */
10433
  _requestURL: null,
10434
-
10435
  /**
10436
  * Lifecycle method. Initializes the request url.
10437
  *
10438
  * @method initializer
10439
  * @protected
10440
- */
10441
- initializer: function()
10442
  {
10443
  this._resetRequestURL();
10444
  },
10445
-
10446
  /**
10447
  * Adds a key/value pair to the request url.
10448
  *
10449
  * @method addParam
10450
  * @param key {String} The name of the parameter (example: key=val).
10451
  * @param val {String} The value of the parameter (example: key=val).
10452
- */
10453
  addParam: function(key, val)
10454
  {
10455
  this._requestURL = this._requestURL + '&' + key + '=' + val;
@@ -10459,37 +10459,37 @@ Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10459
  * Requests an anonymous login session.
10460
  *
10461
  * @method loginAnon
10462
- */
10463
  loginAnon: function()
10464
  {
10465
  this.addParam('method', 'smugmug.login.anonymously');
10466
  this.once('complete', this._loginAnonComplete);
10467
  this.request();
10468
  },
10469
-
10470
  /**
10471
  * Anonymous login success handler.
10472
  *
10473
  * @method _loginAnonComplete
10474
  * @param data {Object} A jsonp data object.
10475
  * @protected
10476
- */
10477
  _loginAnonComplete: function(data)
10478
  {
10479
  if(data.Login) {
10480
  this._sessionID = data.Login.Session.id;
10481
  }
10482
  },
10483
-
10484
  /**
10485
  * Sends an API request using the request url.
10486
  *
10487
  * @method request
10488
- */
10489
  request: function()
10490
  {
10491
  this.addParam('Callback', '{callback}');
10492
-
10493
  Y.jsonp(this._requestURL, {
10494
  on: {
10495
  success: this._requestComplete,
@@ -10500,44 +10500,44 @@ Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10500
  args: []
10501
  });
10502
  },
10503
-
10504
  /**
10505
  * API request complete handler.
10506
  *
10507
  * @method _requestComplete
10508
  * @param data {Object} A jsonp data object.
10509
  * @protected
10510
- */
10511
  _requestComplete: function(data)
10512
  {
10513
  this._resetRequestURL();
10514
-
10515
  /**
10516
  * Fires when a request is complete.
10517
  *
10518
  * @event complete
10519
- */
10520
  this.fire('complete', data);
10521
  },
10522
-
10523
  /**
10524
- * Clears all parameters on the request url except
10525
  * the API key and session ID.
10526
  *
10527
  * @method _resetRequestURL
10528
  * @protected
10529
- */
10530
  _resetRequestURL: function()
10531
  {
10532
  this._requestURL = this.get('apiURL') + '?APIKey=' + this.get('apiKey');
10533
-
10534
  if(this._sessionID) {
10535
  this.addParam('SessionID', this._sessionID);
10536
  }
10537
  }
10538
-
10539
  }, {
10540
-
10541
  /**
10542
  * Static property used to define the default attribute configuration of
10543
  * the Widget.
@@ -10548,7 +10548,7 @@ Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10548
  * @static
10549
  */
10550
  ATTRS: {
10551
-
10552
  /**
10553
  * SmugMug API url to use for requests.
10554
  *
@@ -10559,7 +10559,7 @@ Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10559
  apiURL: {
10560
  value: 'https://api.smugmug.com/services/api/json/1.3.0/'
10561
  },
10562
-
10563
  /**
10564
  * SmugMug API key.
10565
  *
@@ -10608,29 +10608,29 @@ Y.namespace('FL').Utils = {
10608
  * @method cssSupport
10609
  * @param p {String} The property to check.
10610
  * @returns Boolean
10611
- */
10612
  cssSupport: function(p)
10613
  {
10614
  var b = document.body || document.documentElement,
10615
  s = b.style,
10616
  v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms', 'Icab'],
10617
  i = 0;
10618
-
10619
  // Transform not working well in these browsers
10620
  if(p == 'transform' && Y.UA.gecko && Y.UA.gecko < 4) { return false; }
10621
  if(p == 'transform' && Y.UA.opera > 0) { return false; }
10622
  if(p == 'transform' && Y.UA.ie > 0 && Y.UA.ie < 10) { return false; }
10623
  if(p == 'transform' && navigator.userAgent.match(/Trident/)) { return false; }
10624
-
10625
  // No css support detected
10626
  if(typeof s == 'undefined') { return false; }
10627
-
10628
  // Tests for standard prop
10629
  if(typeof s[p] == 'string') { return true; }
10630
-
10631
  // Tests for vendor specific prop
10632
  p = p.charAt(0).toUpperCase() + p.substr(1);
10633
-
10634
  for( ; i < v.length; i++) {
10635
  if(typeof s[v[i] + p] == 'string') { return true; }
10636
  }
@@ -10638,4 +10638,4 @@ Y.namespace('FL').Utils = {
10638
  };
10639
 
10640
 
10641
- }, '2.0.0' );
5
  YUI.add('fl-event-move', function(Y) {
6
 
7
  /**
8
+ * Adds gesturemovevertical, gesturemoveverticalend, gesturemovehorizontal
9
  * and gesturemovehorizontalend events.
10
+ *
11
  * @module fl-event-move
12
+ */
13
  var _eventBase = {
14
 
15
  _isEndEvent: false,
16
+
17
+ on: function(node, subscriber, ce)
18
  {
19
  if(this.type.indexOf('end') > -1) {
20
  this._isEndEvent = true;
21
  }
22
+
23
  subscriber._direction = this.type.replace('gesturemove', '').replace('end', '');
24
+
25
  if(window.navigator.msPointerEnabled) {
26
  subscriber._startHandle = node.on('MSPointerDown', this._onStart, this, node, subscriber, ce);
27
  subscriber._moveHandle = node.on('MSPointerMove', this._onMove, this, node, subscriber, ce);
30
  else {
31
  subscriber._startHandle = node.on('gesturemovestart', this._onStart, null, this, node, subscriber, ce);
32
  subscriber._moveHandle = node.on('gesturemove', this._onMove, null, this, node, subscriber, ce);
33
+ subscriber._endHandle = node.on('gesturemoveend', this._onEnd, { standAlone: true }, this, node, subscriber, ce);
34
  }
35
  },
36
+
37
+ detach: function(node, subscriber, ce)
38
  {
39
  subscriber._startHandle.detach();
40
  subscriber._startHandle = null;
41
  subscriber._moveHandle.detach();
42
  subscriber._moveHandle = null;
43
  subscriber._endHandle.detach();
44
+ subscriber._endHandle = null;
45
  },
46
+
47
+ _onStart: function(e, node, subscriber, ce)
48
  {
49
  subscriber._doMove = null;
50
  subscriber._startX = e.pageX;
51
  subscriber._startY = e.pageY;
52
  },
53
+
54
+ _onMove: function(e, node, subscriber, ce)
55
  {
56
  if(this._checkDirection(e, subscriber)) {
57
  subscriber._doMove = true;
63
  ce.fire(e);
64
  }
65
  },
66
+
67
+ _onEnd: function(e, node, subscriber, ce)
68
  {
69
  if(subscriber._doMove && this._isEndEvent) {
70
  e.startPageX = subscriber._startX;
71
  e.startPageY = subscriber._startY;
72
  ce.fire(e);
73
  }
74
+
75
  subscriber._doMove = null;
76
  },
77
+
78
  _checkDirection: function(e, subscriber)
79
  {
80
  var xDelta = Math.abs(subscriber._startX - e.pageX),
81
  yDelta = Math.abs(subscriber._startY - e.pageY);
82
+
83
  if(yDelta > xDelta && subscriber._startY > e.pageY && subscriber._direction == 'vertical') {
84
  return true;
85
  }
92
  else if(yDelta < xDelta && subscriber._startX < e.pageX && subscriber._direction == 'horizontal') {
93
  return true;
94
  }
95
+
96
  return false;
97
  }
98
  };
141
 
142
  /**
143
  * Caption widget used in slideshows.
144
+ *
145
  * @namespace FL
146
  * @class SlideshowCaption
147
  * @constructor
149
  * @extends Widget
150
  */
151
  Y.namespace('FL').SlideshowCaption = Y.Base.create('fl-slideshow-caption', Y.Widget, [Y.WidgetChild], {
152
+
153
  /**
154
  * Flag for whether the text has been
155
  * toggled or not.
160
  * @protected
161
  */
162
  _textToggled: false,
163
+
164
  /**
165
  * An anchor node used for the toggle link.
166
  *
170
  * @protected
171
  */
172
  _textToggleLink: null,
173
+
174
  /**
175
  * @method renderUI
176
  * @protected
179
  {
180
  var root = this.get('root'),
181
  bb = this.get('boundingBox');
182
+
183
  this._textToggleLink = Y.Node.create('<a href="javascript:void(0);"></a>');
184
  this._textToggleLink.addClass('fl-slideshow-caption-toggle');
185
  this._textToggleLink.set('innerHTML', root.get('captionMoreLinkText'));
186
 
187
  bb.appendChild(this._textToggleLink);
188
  },
189
+
190
  /**
191
  * @method bindUI
192
  * @protected
196
  this.get('root').on('imageLoadComplete', Y.bind(this._setText, this));
197
  this._textToggleLink.on('click', Y.bind(this._toggleText, this));
198
  },
199
+
200
  /**
201
  * Sets the caption text and displays the
202
  * toggle link if necessary.
203
+ *
204
  * @method _setText
205
  * @protected
206
  */
207
+
208
  _setText: function()
209
  {
210
  var root = this.get('root'),
211
  text = root.imageInfo.caption,
212
  textLength = root.get('captionTextLength'),
213
  cb = this.get('contentBox');
214
+
215
  if(!root.imageInfo.caption || root.imageInfo.caption === '') {
216
  cb.set('innerHTML', '');
217
  this._textToggleLink.setStyle('display', 'none');
234
  else {
235
  text = this._stripTags(text);
236
  }
237
+
238
  cb.set('innerHTML', text);
239
  },
240
+
241
  /**
242
  * Shows or hides the full text when the
243
  * toggle link is clicked.
244
+ *
245
  * @method _toggleText
246
  * @protected
247
  */
250
  var root = this.get('root'),
251
  text = root.imageInfo.caption,
252
  cb = this.get('contentBox');
253
+
254
  if(this._textToggled) {
255
  text = this._shortenText(text);
256
  this._textToggleLink.set('innerHTML', root.get('captionMoreLinkText'));
261
  this._textToggleLink.set('innerHTML', root.get('captionLessLinkText'));
262
  this._textToggled = true;
263
  }
264
+
265
  cb.set('innerHTML', text);
266
  },
267
+
268
  /**
269
  * Strips out HTML tags from the caption text.
270
+ *
271
  * @method _stripTags
272
  * @param text {String} The text to strip HTML tags from.
273
+ * @param ignoreSettings {Boolean} If true, will strip tags even if
274
  * the stripTags attribute is set to false.
275
  * @protected
276
  */
277
  _stripTags: function(text, ignoreSettings)
278
  {
279
  var root = this.get('root'), textDiv;
280
+
281
  if(ignoreSettings || root.get('captionStripTags')) {
282
  textDiv = document.createElement('div');
283
  textDiv.innerHTML = text;
284
  text = textDiv.textContent || textDiv.innerText;
285
  }
286
+
287
  return text;
288
  },
289
+
290
  /**
291
+ * Shortens the caption text to the length of
292
  * the textLength attribute.
293
+ *
294
  * @method _shortenText
295
  * @protected
296
  */
297
  _shortenText: function(text)
298
  {
299
  var root = this.get('root');
300
+
301
  text = this._stripTags(text, true).substring(0, root.get('captionTextLength'));
302
+
303
  return Y.Lang.trim(text.substring(0, text.lastIndexOf(' '))) + ' ...';
304
  }
305
+
306
  }, {
307
 
308
  /**
314
  * @static
315
  */
316
  CSS_PREFIX: 'fl-slideshow-caption',
317
+
318
  /**
319
  * Static property used to define the default attribute configuration of
320
  * the Widget.
330
  });
331
 
332
  /**
333
+ * A widget for loading and transitioning between SlideshowImage
334
  * instances. Each SlideshowImage instance is a child widget of
335
+ * SlideshowFrame. SlideshowFrame is a child widget of the main
336
  * slideshow widget.
337
  *
338
  * @namespace FL
352
  * @protected
353
  */
354
  _imageInfo: null,
355
+
356
  /**
357
  * The active FL.SlideshowImage instance in the frame.
358
  *
362
  * @protected
363
  */
364
  _activeImage: null,
365
+
366
  /**
367
+ * A FL.SlideshowImage instance used to load the
368
  * next image and transition it into the frame.
369
  *
370
  * @property _nextImage
373
  * @protected
374
  */
375
  _nextImage: null,
376
+
377
  /**
378
+ * Used to store imageInfo if a load request is
379
  * made while the frame is transitioning. If not null
380
  * when the transition completes, a new image will
381
  * be loaded using the imageInfo.
386
  * @protected
387
  */
388
  _loadQueue: null,
389
+
390
  /**
391
+ * An instance of FL.SlideshowTransition used for
392
  * the current transition in progress.
393
  *
394
  * @property _transition
397
  * @protected
398
  */
399
  _transition: null,
400
+
401
  /**
402
  * A flag for whether the frame is currently transitioning or not.
403
  *
407
  * @protected
408
  */
409
  _transitioning: false,
410
+
411
  /**
412
+ * Flag for whether to resize when the current transition
413
  * completes. Set to true when a resize request is made
414
  * during a transition.
415
  *
419
  * @protected
420
  */
421
  _resizeAfterTransition: false,
422
+
423
  /**
424
  * Provides functionality for gesture based transitions
425
  * between the active and next images.
430
  * @protected
431
  */
432
  _gestures: null,
433
+
434
  /**
435
  * Creates new instances of FL.SlideshowImage used in the frame.
436
  *
440
  initializer: function()
441
  {
442
  var imageConfig = this.get('imageConfig');
443
+
444
  this._activeImage = new Y.FL.SlideshowImage(imageConfig);
445
  this._nextImage = new Y.FL.SlideshowImage(imageConfig);
446
  },
447
+
448
  /**
449
  * Renders the FL.SlideshowImage instances used in the frame.
450
  *
456
  this.add(this._activeImage);
457
  this.add(this._nextImage);
458
  },
459
+
460
  /**
461
  * @method bindUI
462
  * @protected
466
  var activeBB = this._activeImage.get('boundingBox'),
467
  nextBB = this._nextImage.get('boundingBox'),
468
  transition = this.get('transition');
469
+
470
  if(('ontouchstart' in window || window.navigator.msPointerEnabled) && this.get('touchSupport')) {
471
+
472
  this._gestures = new Y.FL.SlideshowGestures({
473
  direction: transition == 'slideVertical' ? 'vertical' : 'horizontal',
474
  activeItem: activeBB,
475
  nextItem: nextBB
476
  });
477
+
478
  this._gestures.on('moveStart', this._gesturesMoveStart, this);
479
  this._gestures.on('endComplete', this._gesturesEndComplete, this);
480
  }
481
  },
482
+
483
  /**
484
  * Functional styles for the UI.
485
+ *
486
  * @method syncUI
487
  * @protected
488
  */
491
  var activeBB = this._activeImage.get('boundingBox'),
492
  nextBB = this._nextImage.get('boundingBox'),
493
  cb = this.get('contentBox');
494
+
495
  activeBB.setStyle('position', 'absolute');
496
  activeBB.setStyle('top', '0px');
497
  activeBB.setStyle('left', '-9999px');
498
+
499
  nextBB.setStyle('position', 'absolute');
500
  nextBB.setStyle('top', '0px');
501
  nextBB.setStyle('left', '-9999px');
502
+
503
  cb.setStyle('position', 'relative');
504
  cb.setStyle('overflow', 'hidden');
505
  },
506
+
507
  /**
508
  * Checks whether the imageInfo should be loaded or queued.
509
  * Initializes a new transition if loading is ok.
510
  *
511
  * @method load
512
  * @param imageInfo {Object} The image info to load.
513
+ */
514
  load: function(imageInfo)
515
  {
516
  var activeInfo = this._activeImage._imageInfo;
517
+
518
  if(this._transitioning) {
519
  this._loadQueue = imageInfo;
520
  return;
522
  else if(activeInfo && activeInfo.largeURL == imageInfo.largeURL) {
523
  return;
524
  }
525
+
526
  this._imageInfo = imageInfo;
527
  this._transitionInit(imageInfo);
528
  },
529
+
530
  /**
531
  * Preloads the next image using the provided imageInfo.
532
+ *
533
  * @method preload
534
  * @param imageInfo {Object} The imageInfo to preload.
535
  * @param width {Number} The width to preload.
536
  * @param height {Number} The height to preload.
537
+ */
538
  preload: function(imageInfo, width, height)
539
  {
540
  this._imageInfo = imageInfo;
541
  this._nextImage.preload(imageInfo, width, height);
542
  },
543
+
544
  /**
545
  * Unloads the active and next image instances.
546
+ *
547
  * @method unload
548
+ */
549
  unload: function()
550
  {
551
  this._imageInfo = null;
552
  this._loadQueue = null;
553
  this._transitioning = false;
554
  this._transition = null;
555
+
556
  this._activeImage.detachAll();
557
  this._activeImage.unload();
558
  this._activeImage.get('boundingBox').setStyle('left', '-9999px');
559
+
560
  this._nextImage.detachAll();
561
  this._nextImage.unload();
562
  this._nextImage.get('boundingBox').setStyle('left', '-9999px');
563
  },
564
+
565
  /**
566
  * Resizes the bounding box and active image.
567
+ *
568
  * @method resize
569
  * @param width {Number} The width value.
570
  * @param height {Number} The height value.
571
+ */
572
  resize: function(width, height)
573
  {
574
  if(!width || !height) {
575
  return;
576
  }
577
+
578
  var bb = this.get('boundingBox'),
579
  padding = [
580
  parseInt(bb.getComputedStyle('paddingTop'), 10),
582
  parseInt(bb.getComputedStyle('paddingBottom'), 10),
583
  parseInt(bb.getComputedStyle('paddingLeft'), 10)
584
  ];
585
+
586
  width = width - padding[1] - padding[3];
587
  height = height - padding[0] - padding[2];
588
+
589
  this.set('width', width);
590
  this.set('height', height);
591
+
592
  if(this._transitioning) {
593
  this._resizeAfterTransition = true;
594
  }
597
  this._nextImage.resize(width, height);
598
  }
599
  },
600
+
601
  /**
602
  * Gets the current transition to use.
603
+ *
604
  * @method _getTransition
605
  * @protected
606
+ */
607
  _getTransition: function()
608
  {
609
  var root = this.get('root'),
610
  lastIndex = root.albumInfo.images.length - 1,
611
  direction = 'next',
612
  transition = root.get('transition');
613
+
614
  if(root.lastImageIndex === null) {
615
  direction = '';
616
  }
626
  else if(root.lastImageIndex < root.imageIndex) {
627
  direction = 'next';
628
  }
629
+
630
  if(direction == 'next') {
631
  transition = transition.replace('slideHorizontal', 'slideLeft');
632
  transition = transition.replace('slideVertical', 'slideUp');
635
  transition = transition.replace('slideHorizontal', 'slideRight');
636
  transition = transition.replace('slideVertical', 'slideDown');
637
  }
638
+
639
  return transition;
640
  },
641
+
642
  /**
643
  * Fires the transitionInit event and loads the next image.
644
+ * The transition starts when the image's loadComplete
645
  * event is fired.
646
  *
647
  * @method _transitionInit
648
  * @param imageInfo {Object} The imageInfo to load before transitioning.
649
  * @protected
650
+ */
651
  _transitionInit: function(imageInfo)
652
  {
653
  this._transitioning = true;
654
+
655
  // Disable gestures if set.
656
  if(this._gestures) {
657
  this._gestures.disable();
658
  }
659
+
660
  /**
661
  * Fires when the next image is loading before a new transition.
662
+ *
663
  * @event transitionInit
664
+ */
665
  this.fire('transitionInit');
666
+
667
  if(imageInfo) {
668
  this._nextImage.once('loadComplete', this._transitionStart, this);
669
  this._nextImage.load(imageInfo);
672
  this._transitionStart();
673
  }
674
  },
675
+
676
  /**
677
  * Fires the transitionStart event and starts the transition
678
  * using a new instance of FL.SlideshowTransition.
679
+ *
680
  * @method _transitionStart
681
  * @protected
682
+ */
683
  _transitionStart: function()
684
  {
685
  var root = this.get('root');
686
+
687
  /**
688
+ * Fires when the next image has finished loading
689
  * and a new transition starts.
690
+ *
691
  * @event transitionStart
692
+ */
693
  this.fire('transitionStart');
694
+
695
  this._transition = new Y.FL.SlideshowTransition({
696
+ itemIn: this._nextImage._imageInfo ? this._nextImage.get('boundingBox') : null,
697
  itemOut: this._activeImage._imageInfo ? this._activeImage.get('boundingBox') : null,
698
  type: this._getTransition(),
699
  duration: root.get('transitionDuration'),
701
  kenBurnsDuration: root.get('speed')/1000,
702
  kenBurnsZoom: root.get('kenBurnsZoom')
703
  });
704
+
705
  if(this._nextImage._imageInfo) {
706
  this._nextImage.get('boundingBox').setStyle('left', '0px');
707
  }
708
+
709
  this._transition.once('complete', this._transitionComplete, this);
710
  this._transition.run();
711
  },
712
+
713
  /**
714
+ * Switches the next and active image variables, unloads the
715
+ * last image, fires the transitionComplete event and loads
716
  * or resizes if appropriate.
717
+ *
718
  * @method _transitionComplete
719
  * @protected
720
+ */
721
  _transitionComplete: function()
722
  {
723
  var root = this.get('root');
724
+
725
  // Swap image container references.
726
  this._swapImageRefs();
727
+
728
  /**
729
  * Fired when the current transition completes.
730
+ *
731
  * @event transitionComplete
732
+ */
733
  this.fire('transitionComplete');
734
  this._transition = null;
735
  this._transitioning = false;
736
+
737
  // Enable gestures if set.
738
  if(this._gestures) {
739
  if(root && root.albumInfo.images.length <= 1) {
743
  this._gestures.enable();
744
  }
745
  }
746
+
747
  // Load from the queue?
748
  if(this._loadQueue) {
749
  this.load(this._loadQueue);
756
  this._nextImage.resize(this.get('width'), this.get('height'));
757
  }
758
  },
759
+
760
  /**
761
  * @method _gesturesMoveStart
762
  * @param e {Object} The event object.
767
  var index = 0,
768
  root = this.get('root');
769
 
770
+ index = e.direction == 'next' ? root.imageIndex + 1 : root.imageIndex - 1;
771
  index = index < 0 ? root.albumInfo.images.length - 1 : index;
772
+ index = index >= root.albumInfo.images.length ? 0 : index;
773
+
774
  root.pause();
775
  root._hideLoadingImage();
776
  root._showLoadingImageWithDelay();
777
+
778
  Y.FL.SlideshowImageLoader.removeGroup(this._nextImage.get('loadGroup'));
779
+
780
  this._nextImage.once('loadComplete', root._hideLoadingImage, root);
781
  this._nextImage.load(root.albumInfo.images[index]);
782
  },
783
+
784
  /**
785
  * @method _gesturesEndComplete
786
  * @protected
787
+ */
788
  _gesturesEndComplete: function()
789
  {
790
  var root = this.get('root'),
795
  this._swapImageRefs();
796
  this._imageInfo = root.albumInfo.images[index];
797
  root.loadImage(index);
798
+ }
799
  },
800
+
801
  /**
802
  * @method _swapImageRefs
803
  * @protected
804
+ */
805
  _swapImageRefs: function()
806
  {
807
  var active = this._activeImage;
808
  this._activeImage = this._nextImage;
809
  this._nextImage = active;
810
+
811
  if(this._nextImage._imageInfo) {
812
  this._nextImage.unload();
813
  this._nextImage.get('boundingBox').setStyle('left', '-9999px');
817
  this._gestures.set('nextItem', this._nextImage.get('boundingBox'));
818
  }
819
  }
820
+
821
  }, {
822
 
823
  /**
824
  * Custom CSS class name for the widget.
825
+
826
  * @property CSS_PREFIX
827
  * @type String
828
  * @protected
829
  * @static
830
  */
831
  CSS_PREFIX: 'fl-slideshow-frame',
832
+
833
  /**
834
  * Static property used to define the default attribute configuration of
835
  * the Widget.
840
  * @static
841
  */
842
  ATTRS: {
843
+
844
  /**
845
+ * The configuration object used to create new instances of
846
  * FL.SlideshowImage. See the API docs for {@link FL.SlideshowImage}
847
+ * for a complete list of configuration attributes.
848
  *
849
  * @attribute imageConfig
850
  * @type Object
853
  imageConfig: {
854
  value: null
855
  },
856
+
857
  /**
858
+ * Whether to use touch gestures, when available,
859
  * to transition between images or not.
860
  *
861
  * @attribute touchSupport
870
 
871
  /**
872
  * A plugin for fullscreen slideshow functionality.
873
+ *
874
  * @namespace FL
875
  * @class SlideshowFullscreen
876
  * @constructor
878
  * @extends Plugin.Base
879
  */
880
  Y.namespace('FL').SlideshowFullscreen = Y.Base.create('fl-slideshow-fullscreen', Y.Plugin.Base, [], {
881
+
882
  /**
883
+ * Flag for whether the slideshow is in
884
  * fullscreen mode.
885
  *
886
  * @property active
888
  * @default false
889
  */
890
  active: false,
891
+
892
  /**
893
  * A div containing the close message.
894
  *
898
  * @protected
899
  */
900
  _closeMessage: null,
901
+
902
  /**
903
  * A timer for hiding the close message.
904
  *
908
  * @protected
909
  */
910
  _closeMessageTimer: null,
911
+
912
  /**
913
  * The initial styles of the host's bounding box
914
  * before entering fullscreen mode.
927
  * @method initializer
928
  * @protected
929
  */
930
+ initializer: function()
931
  {
932
  var host = this.get('host'),
933
  bb = host.get('boundingBox'),
934
  self = this;
935
+
936
  bb.addClass('fl-fullscreen-enabled');
937
+
938
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
939
  document.addEventListener('fullscreenchange', function(){ self._osChange(); }, false);
940
  document.addEventListener('mozfullscreenchange', function(){ self._osChange(); }, false);
947
 
948
  /**
949
  * Exits fullscreen if it is currently active
950
+ * otherwise it enters fullscreen.
951
  *
952
  * @method toggle
953
+ */
954
  toggle: function()
955
  {
956
  if(this.active) {
966
  * the slideshow takes over the browser window.
967
  *
968
  * @method enter
969
+ */
970
  enter: function()
971
  {
972
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
981
  * Exits fullscreen mode.
982
  *
983
  * @method exit
984
+ */
985
  exit: function()
986
  {
987
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
997
  *
998
  * @method _osEnter
999
  * @protected
1000
+ */
1001
  _osEnter: function()
1002
  {
1003
  var bbNode = this.get('host').get('boundingBox')._node;
1004
+
1005
  if(bbNode.webkitRequestFullScreen) {
1006
  bbNode.webkitRequestFullScreen();
1007
  }
1018
  *
1019
  * @method _osExit
1020
  * @protected
1021
+ */
1022
  _osExit: function()
1023
  {
1024
  if(document.exitFullscreen) {
1034
 
1035
  /**
1036
  * Called when the OS fullscreenchange event fires and enters
1037
+ * or exits standard fullscreen mode which positions and
1038
+ * resizes the slideshow.
1039
  *
1040
  * @method _osChange
1041
  * @protected
1042
+ */
1043
  _osChange: function()
1044
  {
1045
  var host = this.get('host');
1046
+
1047
+ // Transitions break on Safari while entering and
1048
+ // exiting fullscreen. This fixes them!
1049
  if(host.frame && host.frame._transitioning) {
1050
  host.frame._transitionComplete();
1051
  }
1052
+
1053
  if(this.active) {
1054
  this._exit();
1055
  }
1056
+ else {
1057
  this._enter();
1058
  }
1059
  },
1063
  *
1064
  * @method _browserEnter
1065
  * @protected
1066
+ */
1067
  _browserEnter: function()
1068
  {
1069
  var bb = this.get('host').get('boundingBox');
1070
+
1071
  this._initialStyles = {
1072
  position: bb.getStyle('position'),
1073
  top: bb.getStyle('top'),
1074
  left: bb.getStyle('left'),
1075
  zIndex: bb.getStyle('zIndex')
1076
  };
1077
+
1078
  bb.setStyles({
1079
  position: 'fixed',
1080
  top: '0px',
1081
  left: '0px',
1082
  zIndex: 10000
1083
  });
1084
+
1085
  Y.Node.one('body').on('fl-fullscreen|keydown', Y.bind(this._onKey, this));
1086
+
1087
  this._showCloseMessage();
1088
  this._enter();
1089
  },
1093
  *
1094
  * @method _browserExit
1095
  * @protected
1096
+ */
1097
  _browserExit: function()
1098
  {
1099
  var bb = this.get('host').get('boundingBox');
1100
+
1101
  bb.setStyles({
1102
  position: this._initialStyles.position,
1103
  top: this._initialStyles.top,
1104
  left: this._initialStyles.left,
1105
  zIndex: this._initialStyles.zIndex
1106
  });
1107
+
1108
  Y.Node.one('body').detach('fl-fullscreen|keydown');
1109
+
1110
  this._hideCloseMessage();
1111
  this._exit();
1112
  },
1116
  *
1117
  * @method _enter
1118
  * @protected
1119
+ */
1120
  _enter: function()
1121
  {
1122
  var host = this.get('host'),
1123
  bb = host.get('boundingBox');
1124
+
1125
  bb.addClass('fl-fullscreen-active');
1126
+
1127
  this.active = true;
1128
+
1129
  host.resize();
1130
  },
1131
+
1132
  /**
1133
  * Exits fullscreen mode.
1134
  *
1135
  * @method _exit
1136
  * @protected
1137
+ */
1138
  _exit: function()
1139
  {
1140
  var host = this.get('host'),
1141
  bb = host.get('boundingBox');
1142
+
1143
+ bb.removeClass('fl-fullscreen-active');
1144
+
1145
  this.active = false;
1146
+
1147
  host.resize();
1148
  },
1149
+
1150
  /**
1151
  * Keyboard input for the esc button.
1152
  *
1160
  return false;
1161
  }
1162
  },
1163
+
1164
  /**
1165
+ * Creates the close message if one is
1166
  * not already available in the document.
1167
  *
1168
  * @method _initCloseMessage
1175
  this._closeMessage.setStyle('display', 'none');
1176
  this.get('host').get('boundingBox').insert(this._closeMessage);
1177
  },
1178
+
1179
  /**
1180
  * Shows the close message.
1181
  *
1188
  this._closeMessageTimer.cancel();
1189
  this._closeMessageTimer = null;
1190
  }
1191
+
1192
  this._closeMessage.show(true);
1193
  this._closeMessageTimer = Y.later(4000, this, this._hideCloseMessage);
1194
  },
1195
+
1196
  /**
1197
  * Hides the close message.
1198
  *
1205
  this._closeMessageTimer.cancel();
1206
  this._closeMessageTimer = null;
1207
  }
1208
+
1209
  this._closeMessage.hide(true);
1210
  }
1211
+
1212
  }, {
1213
 
1214
  /**
1220
  * @static
1221
  */
1222
  NS: 'fullscreen',
1223
+
1224
  OS_SUPPORT: (function(){
1225
+
1226
  var doc = document.documentElement;
1227
+
1228
  return doc.webkitRequestFullScreen || doc.mozRequestFullScreen || doc.requestFullScreen;
1229
  })()
1230
  });
1231
 
1232
  /**
1233
  * Provides functionality for gesture based transitions
1234
+ * between two slideshow components.
1235
  *
1236
  * @namespace FL
1237
  * @class SlideshowGestures
1250
  * @protected
1251
  */
1252
  _startX: null,
1253
+
1254
  /**
1255
  * The y coordinate for where a gesture event starts.
1256
  *
1260
  * @protected
1261
  */
1262
  _startY: null,
1263
+
1264
  /**
1265
+ * A flag for whether a gesture is moving or not.
1266
  *
1267
  * @property _moving
1268
  * @type Boolean
1270
  * @protected
1271
  */
1272
  _touchMoving: false,
1273
+
1274
  /**
1275
  * Whether the gesture is moving or not.
1276
  *
1280
  * @protected
1281
  */
1282
  _moving: false,
1283
+
1284
  /**
1285
+ * The direction the current gesture event
1286
  * is moving in (either next or prev).
1287
  *
1288
  * @property _movingDirection
1291
  * @protected
1292
  */
1293
  _movingDirection: null,
1294
+
1295
  /**
1296
+ * A flag for whether a gesture gesture is currently
1297
  * transitioning or not.
1298
  *
1299
  * @property _transitioning
1306
  /**
1307
  * @method initializer
1308
  * @protected
1309
+ */
1310
+ initializer: function()
1311
  {
1312
  this.enable();
1313
  },
1314
+
1315
  /**
1316
  * @method enable
1317
  */
1321
  direction = this.get('direction'),
1322
  active = this.get('activeItem'),
1323
  next = this.get('nextItem');
1324
+
1325
  active.on(id + '|gesturemovestart', Y.bind(this._onStart, this));
1326
  next.on(id + '|gesturemovestart', Y.bind(this._onStart, this));
1327
  next.on(id + '|transitionend', Y.bind(this._onEndComplete, this) );
1328
  next.on(id + '|oTransitionEnd', Y.bind(this._onEndComplete, this) );
1329
  next.on(id + '|webkitTransitionEnd', Y.bind(this._onEndComplete, this) );
1330
+
1331
  if(direction == 'horizontal') {
1332
  active.on(id + '|gesturemovehorizontal', Y.bind(this._onMoveHorizontal, this));
1333
  active.on(id + '|gesturemovehorizontalend', Y.bind(this._onEndHorizontal, this));
1341
  next.on(id + '|gesturemoveverticalend', Y.bind(this._onEndVertical, this));
1342
  }
1343
  },
1344
+
1345
  /**
1346
  * @method disable
1347
  */
1350
  var id = this.get('id'),
1351
  active = this.get('activeItem'),
1352
  next = this.get('nextItem');
1353
+
1354
  active.detach(id + '|*');
1355
  next.detach(id + '|*');
1356
  },
1357
+
1358
  /**
1359
  * @method _onStart
1360
  * @param e {Object} The event object.
1363
  _onStart: function(e)
1364
  {
1365
  var direction = this.get('direction');
1366
+
1367
  if(this._transitioning) {
1368
  this._onEndComplete();
1369
  }
1370
+
1371
  if(direction == 'horizontal') {
1372
  this._startX = e.pageX;
1373
  }
1374
  else {
1375
  this._startY = e.pageY;
1376
  }
1377
+
1378
  /**
1379
  * @event start
1380
  */
1381
  this.fire('start');
1382
  },
1383
+
1384
  /**
1385
  * @method _onMoveHorizontal
1386
  * @param e {Object} The event object.
1394
  width = parseInt(active.getComputedStyle('width'), 10),
1395
  translate = x < 0 ? Math.abs(x) : -x,
1396
  direction = x < 0 ? 'prev' : 'next';
1397
+
1398
  e.preventDefault();
1399
+
1400
  if(!this._moving || this._movingDirection != direction) {
1401
+
1402
  active.setStyle('left', 0);
1403
+
1404
  next.setStyles({
1405
  'opacity': 1,
1406
  'left': x < 0 ? -width : width
1407
  });
1408
+
1409
  this._moving = true;
1410
  this._movingDirection = direction;
1411
+
1412
  /**
1413
  * @event moveStart
1414
  */
1415
  this.fire('moveStart', { direction: direction });
1416
  }
1417
+
1418
  active.setStyle('-webkit-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1419
  active.setStyle('-ms-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1420
  next.setStyle('-webkit-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1421
  next.setStyle('-ms-transform', 'translate('+ translate +'px, 0px) translateZ(0px)');
1422
+
1423
  /**
1424
  * @event move
1425
  */
1426
  this.fire('move');
1427
  },
1428
+
1429
  /**
1430
  * @method _onMoveVertical
1431
  * @param e {Object} The event object.
1441
  direction = y < 0 ? 'prev' : 'next';
1442
 
1443
  e.preventDefault();
1444
+
1445
  if(!this._moving || this._movingDirection != direction) {
1446
+
1447
  active.setStyle('top', 0);
1448
+
1449
  next.setStyles({
1450
  'opacity': 1,
1451
  'left' : 'auto',
1452
  'top': y < 0 ? -height : height
1453
  });
1454
+
1455
  this._moving = true;
1456
  this._movingDirection = direction;
1457
+
1458
  /**
1459
  * @event moveStart
1460
  */
1461
  this.fire('moveStart', { direction: direction });
1462
  }
1463
+
1464
  active.setStyle('-webkit-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1465
  active.setStyle('-ms-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1466
  next.setStyle('-webkit-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1467
  next.setStyle('-ms-transform', 'translate(0px, '+ translate +'px) translateZ(0px)');
1468
+
1469
  /**
1470
  * @event move
1471
  */
1472
  this.fire('move');
1473
  },
1474
+
1475
  /**
1476
  * @method _onEndHorizontal
1477
  * @param e {Object} The event object.
1482
  if(!this._moving) {
1483
  return;
1484
  }
1485
+
1486
  var x = this._startX - e.pageX,
1487
  active = this.get('activeItem'),
1488
  next = this.get('nextItem'),
1489
  width = parseInt(next.getComputedStyle('width'), 10),
1490
  translate = x < 0 ? width : -width;
1491
+
1492
+ active.transition({
1493
+ 'transform': 'translate('+ translate +'px, 0px)'
1494
  });
1495
+
1496
+ next.transition({
1497
+ 'transform': 'translate('+ translate +'px, 0px)'
1498
  });
1499
+
1500
  this._transitioning = true;
1501
+
1502
  /**
1503
  * @event end
1504
  */
1505
  this.fire('end');
1506
  },
1507
+
1508
  /**
1509
  * @method _onEndVertical
1510
  * @param e {Object} The event object.
1515
  if(!this._moving) {
1516
  return;
1517
  }
1518
+
1519
  var y = this._startY - e.pageY,
1520
  active = this.get('activeItem'),
1521
  next = this.get('nextItem'),
1522
  height = parseInt(next.getComputedStyle('height'), 10),
1523
  translate = y < 0 ? height : -height;
1524
+
1525
+ active.transition({
1526
+ 'transform': 'translate(0px, '+ translate +'px)'
1527
  });
1528
+
1529
+ next.transition({
1530
+ 'transform': 'translate(0px, '+ translate +'px)'
1531
  });
1532
+
1533
  this._transitioning = true;
1534
+
1535
  /**
1536
  * @event end
1537
  */
1538
  this.fire('end');
1539
  },
1540
+
1541
  /**
1542
  * @method _onEndComplete
1543
  * @protected
1544
+ */
1545
  _onEndComplete: function()
1546
  {
1547
  var direction = this.get('direction'),
1548
  active = this.get('activeItem'),
1549
  next = this.get('nextItem');
1550
+
1551
  active.setStyles({
1552
  'opacity': 0,
1553
  '-webkit-transform': '',
1555
  '-ms-transform': '',
1556
  '-ms-transition': ''
1557
  });
1558
+
1559
  next.setStyles({
1560
  '-webkit-transform': '',
1561
  '-webkit-transition': '',
1562
  '-ms-transform': '',
1563
  '-ms-transition': ''
1564
  });
1565
+
1566
  if(direction == 'horizontal') {
1567
  active.setStyle('left', '-9999px');
1568
  next.setStyle('left', '0px');
1577
  this._moving = false;
1578
  this._movingDirection = null;
1579
  this._transitioning = false;
1580
+
1581
  /**
1582
  * @event endComplete
1583
  */
1585
  }
1586
 
1587
  }, {
1588
+
1589
  /**
1590
  * Static property used to define the default attribute configuration of
1591
  * the Widget.
1608
  direction: {
1609
  value: 'horizontal'
1610
  },
1611
+
1612
  /**
1613
  * The Node that is currently visible.
1614
  *
1619
  activeItem: {
1620
  value: null
1621
  },
1622
+
1623
  /**
1624
  * The Node that will be transitioned in.
1625
  *
1635
 
1636
  /**
1637
  * A load queue for slideshow images.
1638
+ *
1639
  * @namespace FL
1640
  * @class SlideshowImageLoader
1641
  * @static
1642
  */
1643
  Y.namespace('FL').SlideshowImageLoader = {
1644
+
1645
  /**
1646
  * Whether an image is being loaded or not.
1647
  *
1651
  * @protected
1652
  */
1653
  _loading: false,
1654
+
1655
  /**
1656
  * An node for loading the next image.
1657
  *
1661
  * @protected
1662
  */
1663
  _currentImage: null,
1664
+
1665
  /**
1666
  * An object containing the group, src and callback
1667
  * for the current image that is being loaded.
1672
  * @protected
1673
  */
1674
  _currentImageData: null,
1675
+
1676
  /**
1677
+ * An array of image data objects that contain the group,
1678
  * src and callback for each image that will be loaded.
1679
  *
1680
  * @property _queue
1683
  * @protected
1684
  */
1685
  _queue: [],
1686
+
1687
  /**
1688
  * Adds an image to the queue.
1689
  *
1690
  * @method add
1691
+ * @param group {String} The group this image is associated with.
1692
  * Used to remove images in bulk.
1693
  * @param src {String} The image url to load.
1694
+ * @param callback {Function} A function to call when the image
1695
  * has finished loading.
1696
+ * @param bump {Boolean} If true, the image will be added to
1697
  * the first position in the queue.
1698
  */
1699
  add: function(group, src, callback, bump)
1703
  src : src,
1704
  callback : callback
1705
  };
1706
+
1707
  if(bump) {
1708
  this._queue.unshift(imgData);
1709
  }
1710
  else {
1711
  this._queue.push(imgData);
1712
  }
1713
+
1714
  if(!this._loading) {
1715
  this._load();
1716
  }
1717
  },
1718
+
1719
  /**
1720
  * Removes a group of images from the queue.
1721
  *
1725
  removeGroup: function(group)
1726
  {
1727
  var i = this._queue.length - 1;
1728
+
1729
  for( ; i > -1 ; i--) {
1730
  if(this._queue[i].group == group) {
1731
  this._queue.splice(i, 1);
1732
  }
1733
  }
1734
+
1735
  if(this._currentImageData && this._currentImageData.group == group) {
1736
  this._currentImage.detachAll();
1737
  this._currentImage = null;
1738
  this._currentImageData = null;
1739
+
1740
  if(this._queue.length > 0) {
1741
  this._load();
1742
  }
1745
  }
1746
  }
1747
  },
1748
+
1749
  /**
1750
  * Loads the next image in the queue.
1751
  *
1761
  this._currentImage.on('load', Y.bind(this._loadComplete, this));
1762
  this._currentImage.set('src', this._currentImageData.src);
1763
  },
1764
+
1765
  /**
1766
  * Calls the current image's callback function if set
1767
  * and loads the next image if the queue is not empty.
1774
  if(this._currentImageData.callback) {
1775
  this._currentImageData.callback(this._currentImage);
1776
  }
1777
+
1778
  if(this._queue.length > 0) {
1779
  this._load();
1780
  }
1796
  * @extends Widget
1797
  */
1798
  Y.namespace('FL').SlideshowImage = Y.Base.create('fl-slideshow-image', Y.Widget, [Y.WidgetChild], {
1799
+
1800
  /**
1801
+ * The imageInfo object used to load the image and
1802
  * its various sizes.
1803
  *
1804
  * @property info
1807
  * @protected
1808
  */
1809
  _imageInfo: null,
1810
+
1811
  /**
1812
  * A reference to the current image node in the bounding box.
1813
  *
1817
  * @protected
1818
  */
1819
  _image: null,
1820
+
1821
  /**
1822
  * Whether or not new imageInfo is loading.
1823
  *
1827
  * @protected
1828
  */
1829
  _loading: false,
1830
+
1831
  /**
1832
  * The URL that is currently being loaded.
1833
  *
1837
  * @protected
1838
  */
1839
  _loadingURL: null,
1840
+
1841
  /**
1842
  * An anchor node used for the video play button.
1843
  *
1845
  * @type Node
1846
  * @default null
1847
  * @protected
1848
+ */
1849
  _videoButton: null,
1850
+
1851
  /**
1852
  * A div node used to hold the video iframe.
1853
  *
1855
  * @type Node
1856
  * @default null
1857
  * @protected
1858
+ */
1859
  _videoBox: null,
1860
+
1861
  /**
1862
  * An iframe node used to render the video.
1863
  *
1865
  * @type Node
1866
  * @default null
1867
  * @protected
1868
+ */
1869
  _video: null,
1870
+
1871
  /**
1872
  * The default content template for the image
1873
+ * inherited from Y.Widget. Set to null since
1874
  * only the bounding box is needed.
1875
  *
1876
  * @property CONTENT_TEMPLATE
1879
  * @protected
1880
  */
1881
  CONTENT_TEMPLATE: null,
1882
+
1883
  /**
1884
  * Initial styling for the bounding box.
1885
  *
1895
  bb.addClass('fl-slideshow-image-cropped');
1896
  }
1897
  },
1898
+
1899
  /**
1900
  * Sets the imageInfo object and
1901
  * loads the appropriate image size.
1909
  this._loading = true;
1910
  this._load();
1911
  },
1912
+
1913
  /**
1914
+ * Sets the width and height of the bounding box and
1915
  * preloads an image using the provided imageInfo object.
1916
  *
1917
  * @method preload
1924
  var isVideo = this._isVideo(),
1925
  loadVideos = this.get('loadVideos'),
1926
  showVideoButton = this.get('showVideoButton');
1927
+
1928
  this.unload();
1929
  this.set('width', width);
1930
  this.set('height', height);
1931
  this._imageInfo = imageInfo;
1932
+
1933
  if(!isVideo || !loadVideos || (isVideo && loadVideos && showVideoButton)) {
1934
  Y.FL.SlideshowImageLoader.add(
1935
+ this.get('loadGroup'),
1936
+ this._getImageURL(),
1937
+ Y.bind(this._imagePreloaded, this),
1938
  this.get('loadPriority')
1939
  );
1940
  }
1941
  },
1942
+
1943
  /**
1944
  * Called when preloading completes.
1945
  *
1951
  {
1952
  this._image = img;
1953
  },
1954
+
1955
  /**
1956
  * Unloads the image if there is one loaded
1957
  * and sets the imageInfo object to null.
1977
  if(this._videoBox) {
1978
  this._removeVideoBox();
1979
  }
1980
+
1981
  this._imageInfo = null;
1982
  this._loading = false;
1983
  this._loadingURL = null;
1984
  },
1985
+
1986
  /**
1987
  * Resizes the bounding box and loads the
1988
  * appropriate image size if necessary.
1995
  {
1996
  var borderWidth = parseInt(this.get('boundingBox').getComputedStyle('borderTopWidth'), 10) * 2,
1997
  bb = this.get('boundingBox');
1998
+
1999
  this.set('width', width - borderWidth);
2000
  this.set('height', height - borderWidth);
2001
  bb.setStyle('width', width - borderWidth + 'px');
2014
  if(this._image) {
2015
  this._positionImage();
2016
  }
2017
+ }
2018
  },
2019
+
2020
  /**
2021
  * Loads (or reloads) the image or video.
2022
  *
2027
  {
2028
  var loadVideos = this.get('loadVideos'),
2029
  showVideoButton = this.get('showVideoButton');
2030
+
2031
  if(this._isVideo() && loadVideos && !showVideoButton && !('ontouchstart' in window)) {
2032
  this._loadVideo();
2033
  }
2035
  this._loadImage();
2036
  }
2037
  },
2038
+
2039
  /**
2040
  * Loads the appropriate image size if
2041
+ * it is not already loading.
2042
  *
2043
  * @method _loadImage
2044
  * @protected
2047
  {
2048
  var url = this._getImageURL(),
2049
  loadVideos = this.get('loadVideos');
2050
+
2051
  // Already loading.
2052
  if(url == this._loadingURL) {
2053
  return;
2054
  }
2055
+
2056
  // New URL to load.
2057
  this._loadingURL = url;
2058
+
2059
  // Load the new image.
2060
  Y.FL.SlideshowImageLoader.add(
2061
+ this.get('loadGroup'),
2062
+ this._loadingURL,
2063
+ Y.bind(this._loadImageComplete, this),
2064
  this.get('loadPriority')
2065
  );
2066
+
2067
  // Initial load?
2068
  if(this._loading) {
2069
+
2070
  if(this._isVideo() && loadVideos) {
2071
  this._insertVideoButton();
2072
  }
2073
+
2074
  /**
2075
  * Only fires when a new image is being
2076
  * loaded, not a different size.
2080
  this.fire('loadStart');
2081
  }
2082
  },
2083
+
2084
  /**
2085
  * Fires when the image has finished loading.
2086
  *
2091
  {
2092
  var bb = this.get('boundingBox'),
2093
  showVideoButton = this.get('showVideoButton');
2094
+
2095
  this._image = img;
2096
  this._image.setStyle('visibility', 'hidden');
2097
  this._image.addClass('fl-slideshow-image-img');
2098
+
2099
  // Remove load events.
2100
  this._image.detachAll();
2101
+
2102
  // Remove previous videos.
2103
  if(this._video && !showVideoButton) {
2104
  this._video.remove();
2105
  this._video = null;
2106
  }
2107
+
2108
  // Remove the old image.
2109
  bb.all('img').remove();
2110
+
2111
  // Append the new image.
2112
  bb.append(this._image);
2113
+
2114
  // Setup, scale and position the new image.
2115
  this._setupImage();
2116
  this._resizeImage();
2117
  this._positionImage();
2118
  this._image.setStyle('visibility', 'visible');
2119
+
2120
  // Clear the loading url.
2121
  this._loadingURL = null;
2122
+
2123
  // Finish an initial load?
2124
  if(this._loading) {
2125
+
2126
  this._loading = false;
2127
 
2128
  /**
2134
  this.fire('loadComplete');
2135
  }
2136
  },
2137
+
2138
  /**
2139
  * UI setup for the new image.
2140
  *
2144
  _setupImage: function()
2145
  {
2146
  var bb = this.get('boundingBox');
2147
+
2148
  // IE interpolation
2149
  if(typeof this._image._node.style.msInterpolationMode != 'undefined') {
2150
  this._image._node.style.msInterpolationMode = 'bicubic';
2151
  }
2152
+
2153
  // Protection
2154
  if(this.get('protect')) {
2155
  bb.delegate('contextmenu', this._protectImage, 'img');
2156
  bb.delegate('mousedown', this._protectImage, 'img');
2157
  }
2158
  },
2159
+
2160
  /**
2161
  * Fires on contextmenu or mousedown in attempt
2162
+ * to keep the image from being copied.
2163
  *
2164
  * @method _protectImage
2165
  * @return {Boolean} Returns false to prevent the default event.
2170
  e.preventDefault();
2171
  return false;
2172
  },
2173
+
2174
  /**
2175
  * Resizes the image node.
2176
  *
2195
  if(this._imageInfo && this.get('checkFilenamesForNoCrop')) {
2196
  noCrop = this._imageInfo.filename.indexOf('nocrop') > -1;
2197
  }
2198
+
2199
  if(this.get('crop') && !(cropHorizontalsOnly && isHorizontal) && !noCrop) {
2200
  newWidth = targetWidth;
2201
+ newHeight = Math.round(imageHeight * targetWidth/imageWidth);
2202
+
2203
  if(newHeight < targetHeight) {
2204
  newHeight = targetHeight;
2205
+ newWidth = Math.round(imageWidth * targetHeight/imageHeight);
2206
  }
2207
  }
2208
  else {
2209
  xScale = imageWidth/targetWidth;
2210
  yScale = imageHeight/targetHeight;
2211
+
2212
  if (yScale > xScale){
2213
  newWidth = Math.round(imageWidth * (1/yScale));
2214
  newHeight = Math.round(imageHeight * (1/yScale));
2218
  newHeight = Math.round(imageHeight * (1/xScale));
2219
  }
2220
  }
2221
+
2222
  // Don't resize past the original size?
2223
  if(!this.get('crop') && !this.get('upsize') && (newWidth > imageWidth || newHeight > imageHeight)) {
2224
  newWidth = imageWidth;
2225
  newHeight = imageHeight;
2226
  }
2227
+
2228
  // Compensate for borders.
2229
  newWidth -= borderWidth;
2230
  newHeight -= borderWidth;
2231
+
2232
  // Resize the image.
2233
  this._image.setStyle('width', newWidth + 'px');
2234
  this._image.setStyle('height', newHeight + 'px');
2235
+
2236
  // Constrain bounding box to image size.
2237
  if(!this.get('crop') && this.get('constrainWidth')) {
2238
  this.set('width', newWidth + 'px');
2241
  this.set('height', newHeight + 'px');
2242
  }
2243
  },
2244
+
2245
  /**
2246
  * Positions the image within the bounding box.
2247
  *
2251
  _positionImage: function()
2252
  {
2253
  var pos = this.get('position').split(' '),
2254
+ x = pos[0] === '' ? 'center' : pos[0],
2255
  y = pos[1] === '' ? 'center' : pos[1],
2256
  newX = 0,
2257
  newY = 0,
2260
  borderWidth = parseInt(this._image.getComputedStyle('borderTopWidth'), 10) * 2,
2261
  imageWidth = parseInt(this._image.getComputedStyle('width'), 10) + borderWidth,
2262
  imageHeight = parseInt(this._image.getComputedStyle('height'), 10) + borderWidth;
2263
+
2264
  if(isNaN(imageWidth) && isNaN(imageHeight)) {
2265
  return;
2266
  }
2267
  if(x == 'left') {
2268
+ newX = 0;
2269
  }
2270
  if(x == 'center') {
2271
  newX = (bbWidth - imageWidth)/2;
2272
  }
2273
  if(x == 'right') {
2274
+ newX = bbWidth - imageWidth;
2275
  }
2276
+
2277
  if(y == 'top') {
2278
+ newY = 0;
2279
  }
2280
  if(y == 'center') {
2281
  newY = (bbHeight - imageHeight)/2;
2282
  }
2283
  if(y == 'bottom') {
2284
+ newY = bbHeight - imageHeight;
2285
  }
2286
+
2287
  this._image.setStyles({
2288
  'left': newX,
2289
  'top': newY
2290
  });
2291
  },
2292
+
2293
  /**
2294
+ * Gets the appropriate image url based
2295
+ * on the size of the bounding box.
2296
  *
2297
  * @method _getImageURL
2298
+ * @return {String} The url to load.
2299
  * @protected
2300
  */
2301
  _getImageURL: function()
2308
  useThumbSizes = this.get('useThumbSizes'),
2309
  i = this._imageInfo,
2310
  sizes = [
2311
+ i.tinyURL || i.thumbURL || i.largeURL,
2312
+ i.thumbURL || i.largeURL,
2313
  i.smallURL || i.largeURL,
2314
  i.mediumURL || i.largeURL || i.smallURL,
2315
  i.largeURL || i.mediumURL || i.smallURL,
2317
  i.x2largeURL || i.largeURL || i.mediumURL || i.smallURL,
2318
  i.x3largeURL || i.x2largeURL || i.largeURL || i.mediumURL || i.smallURL
2319
  ];
2320
+
2321
  // Width
2322
  if(useThumbSizes && targetWidth <= 100) {
2323
  imageWidth = 0;
2343
  else {
2344
  imageWidth = 7;
2345
  }
2346
+
2347
  // Height
2348
  if(useThumbSizes && targetHeight <= 100) {
2349
  imageHeight = 0;
2369
  else {
2370
  imageHeight = 7;
2371
  }
2372
+
2373
  // Get the size number.
2374
  size = Math.max(imageWidth, imageHeight);
2375
+
2376
  return sizes[size];
2377
  },
2378
+
2379
  /**
2380
+ * Checks whether this is a video or not.
2381
  *
2382
  * @method _isVideo
2383
  * @protected
2393
  else if(this._imageInfo.iframe !== '') {
2394
  return true;
2395
  }
2396
+
2397
  return false;
2398
  },
2399
+
2400
  /**
2401
  * @method _loadVideo
2402
  * @protected
2403
+ */
2404
  _loadVideo: function()
2405
  {
2406
  var bb = this.get('boundingBox'),
2407
  showVideoButton = this.get('showVideoButton'),
2408
  autoPlay = showVideoButton ? true : false;
2409
+
2410
  // Remove previous videos
2411
  if(this._video) {
2412
  this._video.remove();
2413
  this._video = null;
2414
  }
2415
+
2416
  // Get the video code
2417
  if(this._imageInfo.format == 'mp4' && this._imageInfo.sourceType == 'smugmug') {
2418
  this._video = this._getSmugMugVideoEmbed(this._imageInfo, autoPlay);
2420
  else if(this._imageInfo.iframe !== '') {
2421
  this._video = this._getIframeVideoEmbed(this._imageInfo, autoPlay);
2422
  }
2423
+
2424
  // Insert the video
2425
  if(this._videoBox) {
2426
+ this._videoBox.one('.fl-slideshow-video-wrap').insert(this._video);
2427
  }
2428
  else {
2429
  bb.all('img').remove();
2430
  bb.append(this._video);
2431
  }
2432
+
2433
  // Finish an initial load?
2434
  if(this._loading) {
2435
  this._loading = false;
2436
  this.fire('loadComplete');
2437
  }
2438
  },
2439
+
2440
  /**
2441
  * @method _insertVideoButton
2442
  * @protected
2443
+ */
2444
  _insertVideoButton: function()
2445
  {
2446
  var bb = this.get('boundingBox'),
2447
  event = 'ontouchstart' in window ? 'touchstart' : 'click';
2448
+
2449
  this._videoButton = Y.Node.create('<a class="fl-slideshow-video-button" href="javascript:void(0);"></a>');
2450
  this._videoButton.on(event, Y.bind(this._showVideoBox, this));
2451
  bb.insert(this._videoButton);
2452
  this._positionVideoButton();
2453
  },
2454
+
2455
  /**
2456
  * @method _positionVideoButton
2457
  * @protected
2458
+ */
2459
  _positionVideoButton: function()
2460
  {
2461
  var bbWidth = this.get('width'),
2462
  bbHeight = this.get('height'),
2463
  buttonWidth = parseInt(this._videoButton.getStyle('width'), 10),
2464
  buttonHeight = parseInt(this._videoButton.getStyle('height'), 10);
2465
+
2466
  this._videoButton.setStyles({
2467
  left: (bbWidth - buttonWidth)/2,
2468
  top: (bbHeight - buttonHeight)/2
2469
  });
2470
  },
2471
+
2472
  /**
2473
  * @method _showVideoBox
2474
  * @protected
2475
+ */
2476
  _showVideoBox: function()
2477
  {
2478
  var root = this.get('root'),
2486
  this._videoBox.insert(close);
2487
  this._videoBox.on(event, Y.bind(this._removeVideoBox, this));
2488
  close.on(event, Y.bind(this._removeVideoBox, this));
2489
+
2490
  if(typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
2491
  close.addClass('sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome');
2492
  }
2493
+
2494
  Y.one('body').insert(this._videoBox);
2495
  this._loadVideo();
2496
+
2497
  Y.one('body').on('fl-slideshow-image|keydown', this._onKey, this);
2498
  },
2499
+
2500
  /**
2501
  * Get the embed code for a SmugMug video.
2502
  *
2504
  * @param imageInfo {Object} The image info for the embed.
2505
  * @param autoPlay {Boolean} Whether to auto play videos or not.
2506
  * @protected
2507
+ */
2508
  _getSmugMugVideoEmbed: function(imageInfo, autoPlay)
2509
  {
2510
  var test = document.createElement('video'),
2511
  width = 0,
2512
+ mp4 = '',
2513
  vars = '',
2514
  code = '';
2515
+
2516
  if(Y.UA.mobile !== null && !!test.canPlayType && test.canPlayType('video/mp4')) {
2517
  width = this.get('width');
2518
+ mp4 = 'https://www.smugmug.com/photos/' + imageInfo.id + '_' + imageInfo.key + '-' + width + '.mp4';
2519
  code += '<video width="100%" height="100%" poster="'+ this._getImageURL() +'" controls preload="none"';
2520
+
2521
  if(autoPlay) {
2522
  code += ' autoplay';
2523
  }
2524
+
2525
  code += '>';
2526
  code += '<source src="'+ mp4 +'" type="video/mp4" />';
2527
  code += '</video>';
2529
  else {
2530
  vars = 'imageId=' + imageInfo.id;
2531
  vars += '&amp;imageKey=' + imageInfo.key;
2532
+ vars += '&amp;albumId=' + imageInfo.albumId;
2533
+ vars += '&amp;albumKey=' + imageInfo.albumKey;
2534
+ vars += '&amp;apiURL=https://api.smugmug.com/&amp;hostLevel=live&amp;isPro=true';
2535
+
2536
  if(autoPlay) {
2537
  vars += '&amp;autoPlay=true';
2538
  }
2539
  else {
2540
  vars += '&amp;autoPlay=false';
2541
  }
2542
+
2543
+ code += '<object type="application/x-shockwave-flash" width="100%" height="100%" data="https://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">';
2544
+ code += '<param name="movie" value="https://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">';
2545
  code += '<param name="allowFullScreen" value="true">';
2546
  code += '<param name="wmode" value="transparent">';
2547
  code += '<param name="flashVars" value="' + vars + '">';
2548
+ code += '<embed src="https://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf" flashvars="'+ vars +'" width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent">';
2549
  code += '</object>';
2550
  }
2551
+
2552
  return Y.Node.create(code);
2553
  },
2554
 
2559
  * @param imageInfo {Object} The image info for the embed.
2560
  * @param autoPlay {Boolean} Whether to auto play videos or not.
2561
  * @protected
2562
+ */
2563
  _getIframeVideoEmbed: function(imageInfo, autoPlay)
2564
  {
2565
  var code = '<iframe width="100%" height="100%" frameborder="0" allowfullscreen ',
2566
  url = imageInfo.iframe;
2567
+
2568
  if(autoPlay) {
2569
  url += url.indexOf('?') > -1 ? '&autoplay=1' : '?autoplay=1';
2570
  }
2571
+
2572
  code += 'src="'+ url +'"></iframe>';
2573
 
2574
  return Y.Node.create(code);
2575
  },
2576
+
2577
  /**
2578
  * @method _removeVideoBox
2579
  * @protected
2580
+ */
2581
  _removeVideoBox: function(e)
2582
  {
2583
  if(typeof e !== 'undefined' && e.target) {
2585
  return;
2586
  }
2587
  }
2588
+
2589
  if(this._videoBox !== null) {
2590
  this._videoBox.remove();
2591
  this._videoBox = null;
2592
  this._video = null;
2593
  }
2594
+
2595
  Y.one('body').detach('fl-slideshow-image|keydown', this._onKey);
2596
  },
2597
+
2598
  /**
2599
  * Keyboard input for the esc button.
2600
  *
2608
  return false;
2609
  }
2610
  }
2611
+
2612
  }, {
2613
 
2614
  /**
2615
  * Custom CSS class name for the widget.
2616
+
2617
  * @property CSS_PREFIX
2618
  * @type String
2619
  * @protected
2631
  * @static
2632
  */
2633
  ATTRS: {
2634
+
2635
  /**
2636
  * @attribute loadGroup
2637
  * @type String
2640
  loadGroup: {
2641
  value: 'none'
2642
  },
2643
+
2644
  /**
2645
  * @attribute loadPriority
2646
  * @type Boolean
2649
  loadPriority: {
2650
  value: false
2651
  },
2652
+
2653
  /**
2654
  * Whether to crop the image.
2655
  *
2660
  crop: {
2661
  value: false
2662
  },
2663
+
2664
  /**
2665
  * Checks whether the filename has nocrop in it or not.
2666
  * If it does, the image will not be cropped.
2672
  checkFilenamesForNoCrop: {
2673
  value: true
2674
  },
2675
+
2676
  /**
2677
  * Whether to only crop horizontal images or not.
2678
  *
2683
  cropHorizontalsOnly: {
2684
  value: false
2685
  },
2686
+
2687
  /**
2688
+ * The x and y position of the image
2689
  * within the bounding box.
2690
  *
2691
  * @attribute position
2695
  position: {
2696
  value: 'center center'
2697
  },
2698
+
2699
  /**
2700
  * Whether to right click protect the image.
2701
  *
2706
  protect: {
2707
  value: true
2708
  },
2709
+
2710
  /**
2711
  * Whether to resize the image past
2712
  * its original width and height.
2718
  upsize: {
2719
  value: true
2720
  },
2721
+
2722
  /**
2723
  * Whether to load thumb sizes. Defaults
2724
  * to false since thumb sizes are square.
2730
  useThumbSizes: {
2731
  value: false
2732
  },
2733
+
2734
  /**
2735
+ * Whether to constrain the width of the
2736
  * bounding box to the width of the image.
2737
  *
2738
  * @attribute constrainWidth
2742
  constrainWidth: {
2743
  value: false
2744
  },
2745
+
2746
  /**
2747
+ * Whether to constrain the height of the
2748
  * bounding box to the height of the image.
2749
  *
2750
  * @attribute constrainHeight
2754
  constrainHeight: {
2755
  value: false
2756
  },
2757
+
2758
  /**
2759
  * Whether to load videos or not. The poster
2760
  * image will be loaded if set to false.
2762
  * @attribute loadVideos
2763
  * @type Boolean
2764
  * @default true
2765
+ */
2766
  loadVideos: {
2767
  value: true
2768
  },
2769
+
2770
  /**
2771
  * Whether to show the video play button or not.
2772
+ * When clicked, videos will be displayed in a
2773
  * lightbox instead of the slideshow itself.
2774
  *
2775
  * @attribute showVideoButton
2783
  });
2784
 
2785
  /**
2786
+ * A plugin that turns the cursor into a prev or next arrow when
2787
  * it is over the left or right side of the slideshow.
2788
+ *
2789
  * @namespace FL
2790
  * @class SlideshowMouseNav
2791
  * @constructor
2798
  * @method initializer
2799
  * @protected
2800
  */
2801
+ initializer: function()
2802
  {
2803
  var trigger = this.get('trigger');
2804
 
2806
  trigger.on('mousemove', this._showArrow, this);
2807
  trigger.on('mouseleave', this._hideArrow, this);
2808
  },
2809
+
2810
  /**
2811
  * @method _triggerClick
2812
  * @protected
2813
+ */
2814
  _triggerClick: function(e)
2815
  {
2816
  var host = this.get('host'),
2818
  triggerWidth = parseInt(trigger.getStyle('width'), 10),
2819
  triggerRegion = trigger.get('region'),
2820
  layerX = e.pageX - triggerRegion.left + 5;
2821
+
2822
  if(layerX >= triggerWidth/2) {
2823
  host.nextImage();
2824
  }
2826
  host.prevImage();
2827
  }
2828
  },
2829
+
2830
  /**
2831
  * @method _showArrow
2832
  * @protected
2833
+ */
2834
  _showArrow: function(e)
2835
  {
2836
  var host = this.get('host'),
2850
  }
2851
  }
2852
  },
2853
+
2854
  /**
2855
  * @method _hideArrow
2856
  * @protected
2857
+ */
2858
  _hideArrow: function()
2859
  {
2860
  var trigger = this.get('trigger');
2861
+
2862
  trigger.removeClass('fl-slideshow-mouse-nav-next');
2863
  trigger.removeClass('fl-slideshow-mouse-nav-prev');
2864
  }
2865
+
2866
  }, {
2867
 
2868
  /**
2874
  * @static
2875
  */
2876
  NS: 'mouseNav',
2877
+
2878
  /**
2879
  * Static property used to define the default attribute configuration of
2880
  * the Plugin.
2885
  * @static
2886
  */
2887
  ATTRS: {
2888
+
2889
  /**
2890
  * A Node that triggers the arrows.
2891
  *
2909
  * @extends Base
2910
  */
2911
  Y.namespace('FL').SlideshowKenBurns = Y.Base.create('fl-slideshow-ken-burns', Y.Base, [], {
2912
+
2913
  /**
2914
  * Runs the Ken Burns effect.
2915
  *
2916
  * @method run
2917
+ */
2918
  run: function()
2919
  {
2920
  var imageNode = null,
2921
  transform = null;
2922
+
2923
  if(Y.FL.Utils.cssSupport('transform')) {
2924
+
2925
  // Image node
2926
  imageNode = this.get('image').one('img');
2927
+
2928
  // Transform object
2929
  transform = this._getTransform();
2930
+
2931
  // Apply the start transform
2932
  imageNode.setStyles({
2933
  '-webkit-transform-origin': transform.origin,
2936
  'transform-origin': transform.origin,
2937
  'transform': transform.start
2938
  });
2939
+
2940
  // Transition to the end transform
2941
  imageNode.transition({
2942
  easing: 'ease-out',
2945
  });
2946
  }
2947
  },
2948
+
2949
  /**
2950
  * @method _getTransform
2951
  * @protected
2952
+ */
2953
  _getTransform: function()
2954
+ {
2955
  var zoom = this.get('zoom'),
2956
  image = this.get('image'),
2957
  i = 0,
2961
  // Random zoom direction
2962
  i = Math.floor(Math.random() * Y.FL.SlideshowKenBurns.ZOOM_DIRECTIONS.length);
2963
  zoomDirection = Y.FL.SlideshowKenBurns.ZOOM_DIRECTIONS[i];
2964
+
2965
  // Random transform
2966
  i = Math.floor(Math.random() * Y.FL.SlideshowKenBurns.TRANSFORMS.length);
2967
  transform = Y.FL.SlideshowKenBurns.TRANSFORMS[i];
2968
+
2969
  // Get the start and end transforms
2970
  if(!image.hasClass('fl-slideshow-image-cropped') && zoomDirection == 'in') {
2971
  i = Math.floor(Math.random() * 2);
2981
  transform.start = 'scale(1) translate(0, 0)';
2982
  transform.end = 'scale(' + zoom + ') ' + transform.translate;
2983
  }
2984
+
2985
  return transform;
2986
  }
2987
 
2988
  }, {
2989
+
2990
  /**
2991
  * Static property used to define the default attribute configuration of
2992
  * the Widget.
2999
  ATTRS: {
3000
 
3001
  /**
3002
+ * An instance of FL.Slideshow image to apply the
3003
+ * Ken Burns effect on.
3004
  *
3005
  * @attribute image
3006
  * @type FL.Slideshow
3017
  * @attribute scale
3018
  * @type Number
3019
  * @default 1.2
3020
+ */
3021
  zoom: {
3022
  value: 1.2
3023
  },
3024
+
3025
  /**
3026
  * The duration of the effect in seconds.
3027
  *
3033
  value: 2
3034
  }
3035
  },
3036
+
3037
  /**
3038
  * The zoom directions that can be applied to an image.
3039
  *
3042
  * @readOnly
3043
  * @protected
3044
  * @static
3045
+ */
3046
  ZOOM_DIRECTIONS: [
3047
+ 'in',
3048
  'out'
3049
  ],
3050
+
3051
  /**
3052
  * The types of transforms that can be applied to an image.
3053
  *
3056
  * @readOnly
3057
  * @protected
3058
  * @static
3059
+ */
3060
  TRANSFORMS: [
3061
  {
3062
  origin : 'left top',
3081
  });
3082
 
3083
  /**
3084
+ * Navigation buttons widget for controlling a slideshow instance
3085
  * and its child widgets.
3086
+ *
3087
  * @namespace FL
3088
  * @class SlideshowNav
3089
  * @constructor
3091
  * @extends Widget
3092
  */
3093
  Y.namespace('FL').SlideshowNav = Y.Base.create('fl-slideshow-nav', Y.Widget, [Y.WidgetChild], {
3094
+
3095
  /**
3096
  * An object containing the anchor nodes for all buttons.
3097
  *
3101
  * @protected
3102
  */
3103
  _buttons: null,
3104
+
3105
  /**
3106
  * An div node containing the anchor nodes for the main buttons.
3107
  *
3111
  * @protected
3112
  */
3113
  _buttonsContainer: null,
3114
+
3115
  /**
3116
  * An div node containing the anchor nodes for the left buttons.
3117
  *
3121
  * @protected
3122
  */
3123
  _buttonsLeftContainer: null,
3124
+
3125
  /**
3126
  * An div node containing the anchor nodes for the right buttons.
3127
  *
3131
  * @protected
3132
  */
3133
  _buttonsRightContainer: null,
3134
+
3135
  /**
3136
  * Property map for rendering SmugMug font icons.
3137
  *
3138
  * @property _fontIcons
3139
  * @type Object
3140
  * @protected
3141
+ */
3142
  _fontIcons: {
3143
  buy: 'Cart',
3144
  caption: 'InfoEncircled',
3153
  social: 'Heart',
3154
  thumbs: 'ViewThumbGrid'
3155
  },
3156
+
3157
  /**
3158
  * The default content template for the nav
3159
+ * inherited from Y.Widget. Set to null since
3160
  * only the bounding box is needed.
3161
  *
3162
  * @property CONTENT_TEMPLATE
3165
  * @protected
3166
  */
3167
  CONTENT_TEMPLATE: null,
3168
+
3169
  /**
3170
  * Renders the buttons.
3171
+ *
3172
  * @method renderUI
3173
  * @protected
3174
  */
3178
  this._renderButtons();
3179
  this._renderFontIcons();
3180
  },
3181
+
3182
  /**
3183
  * Binds events to the root slideshow for each button.
3184
+ *
3185
  * @method bindUI
3186
  * @protected
3187
  */
3189
  {
3190
  var root = this.get('root'),
3191
  id = this.get('id');
3192
+
3193
  if(this._buttons.prev) {
3194
  this._buttons.prev.on('click', root.prevImage, root);
3195
  }
3200
  this._buttons.play.on('click', this._playClicked, this);
3201
  root.on(id + '|played', this._showPauseButton, this);
3202
  root.on(id + '|paused', this._showPlayButton, this);
3203
+
3204
  if(root._playing) {
3205
  this._showPauseButton();
3206
  }
3209
  }
3210
  }
3211
  if(this._buttons.buy) {
3212
+
3213
  root.on(id + '|albumLoadComplete', this._updateBuy, this);
3214
+
3215
  if(root.albumInfo !== null) {
3216
  this._updateBuy();
3217
  }
3236
  this._buttons.close.on('click', root.hide, root);
3237
  }
3238
  },
3239
+
3240
  /**
3241
  * @method destructor
3242
  * @protected
3245
  {
3246
  var root = this.get('root'),
3247
  id = this.get('id');
3248
+
3249
  root.detach(id + '|*');
3250
  },
3251
+
3252
  /**
3253
  * Renders the button left, right and main button containers.
3254
+ *
3255
  * @method _renderContainers
3256
  * @protected
3257
  */
3260
  var cb = this.get('contentBox'),
3261
  buttonsLeft = this.get('buttonsLeft'),
3262
  buttonsRight = this.get('buttonsRight');
3263
+
3264
  this._buttonsContainer = Y.Node.create('<div></div>');
3265
  this._buttonsContainer.addClass('fl-slideshow-nav-buttons');
3266
  cb.appendChild(this._buttonsContainer);
3267
+
3268
  if(buttonsLeft.length > 0) {
3269
  this._buttonsLeftContainer = Y.Node.create('<div></div>');
3270
  this._buttonsLeftContainer.addClass('fl-slideshow-nav-buttons-left');
3276
  cb.appendChild(this._buttonsRightContainer);
3277
  }
3278
  },
3279
+
3280
  /**
3281
+ * Renders the buttons based on the buttons array
3282
  * passed in the configuration object.
3283
+ *
3284
  * @method _renderButtons
3285
  * @protected
3286
  */
3303
  container: this._buttonsRightContainer
3304
  }
3305
  ];
3306
+
3307
  this._buttons = {};
3308
+
3309
  for( ; i < b.length; i++) {
3310
  for(k = 0; k < b[i].names.length; k++) {
3311
+
3312
  name = b[i].names[k];
3313
+
3314
  if(name.indexOf('count') > -1) {
3315
  this._buttons[name] = Y.Node.create('<span></span>');
3316
  this._updateCount();
3318
  else {
3319
  this._buttons[name] = Y.Node.create('<a href="javascript:void(0);"></a>');
3320
  }
3321
+
3322
  if(name.indexOf('buy') > -1) {
3323
  this._buttons[name].setStyle('display', 'none');
3324
  }
3325
+
3326
  this._buttons[name].set('name', name);
3327
  this._buttons[name].addClass('fl-slideshow-nav-' + name);
3328
  b[i].container.appendChild(this._buttons[name]);
3329
  }
3330
  }
3331
  },
3332
+
3333
  /**
3334
  * Renders SmugMug font icons for each button.
3335
+ *
3336
  * @method _renderFontIcons
3337
  * @protected
3338
  */
3339
  _renderFontIcons: function()
3340
  {
3341
  var name = null;
3342
+
3343
  if(this.get('useFontIcons') && typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3344
  for(name in this._buttons) {
3345
  if(typeof this._buttons[name] !== 'undefined' && typeof this._fontIcons[name] !== 'undefined') {
3352
  }
3353
  }
3354
  },
3355
+
3356
  /**
3357
+ * Updates the image count.
3358
+ *
3359
  * @method _updateCount
3360
  * @protected
3361
  */
3365
  countText = Y.FL.SlideshowNav.COUNT_TEXT,
3366
  current = 1,
3367
  total = 1;
3368
+
3369
  if(this.get('root').albumInfo) {
3370
  current = this.get('root').imageInfo.index + 1;
3371
  total = this.get('root').albumInfo.images.length;
3372
  }
3373
+
3374
  html = countText.replace('{current}', current).replace('{total}', total);
3375
  this._buttons.count.set('innerHTML', html);
3376
  },
3377
+
3378
  /**
3379
  * Shows the caption button if the current image
3380
  * has a caption, hides it if the image does not
3381
+ * have a caption.
3382
+ *
3383
  * @method _updateCaption
3384
  * @protected
3385
  */
3387
  {
3388
  var root = this.get('root'),
3389
  imageInfo = root.imageInfo;
3390
+
3391
  if(imageInfo && imageInfo.caption === '') {
3392
  root.caption.slideshowOverlay.enable();
3393
  root.caption.slideshowOverlay.hide();
3399
  this._buttons.caption.removeClass('fl-slideshow-nav-caption-disabled');
3400
  }
3401
  },
3402
+
3403
  /**
3404
  * Checks if buying has been enabled for the current album.
3405
+ *
3406
  * @method _updateBuy
3407
  * @protected
3408
  */
3413
  rootSource = root.get('source')[root.albumIndex],
3414
  albumIndex = root.albumIndex,
3415
  source = root.get('source')[albumIndex];
3416
+
3417
  if(rootSource && rootSource.type == 'smugmug') {
3418
  if(typeof root.albumInfo.printable !== 'undefined') {
3419
  this._updateBuyComplete();
3428
  }
3429
  }
3430
  },
3431
+
3432
  /**
3433
  * Shows the buy button and updates the buy url
3434
  * if buying has been enabled.
3435
+ *
3436
  * @method _updateBuyComplete
3437
  * @param e {Object} The custom event object passed to this function.
3438
  * @protected
3442
  var root = this.get('root'),
3443
  printable = typeof e == 'undefined' ? root.albumInfo.printable : e.Album.Printable,
3444
  link = root.albumInfo.link;
3445
+
3446
  if(printable) {
3447
  root.albumInfo.printable = true;
3448
  this._buttons.buy.set('href', 'https://secure.smugmug.com/cart/batchadd/?url=' + encodeURIComponent(link));
3452
  root.albumInfo.printable = false;
3453
  this._buttons.buy.setStyle('display', 'none');
3454
  }
3455
+
3456
  this.fire('resize');
3457
  },
3458
 
3462
  *
3463
  * @method _playClicked
3464
  * @protected
3465
+ */
3466
  _playClicked: function()
3467
  {
3468
  var root = this.get('root');
3469
+
3470
  if(root._playing) {
3471
  root.pause();
3472
  }
3474
  root.play();
3475
  }
3476
  },
3477
+
3478
  /**
3479
+ * Toggles the button class for the play button
3480
+ * so pause is hidden and play is shown.
3481
+ *
3482
  * @method _showPlayButton
3483
  * @protected
3484
  */
3486
  {
3487
  this._buttons.play.removeClass('fl-slideshow-nav-pause');
3488
  this._buttons.play.addClass('fl-slideshow-nav-play');
3489
+
3490
  if(this.get('useFontIcons') && typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3491
  this._buttons.play.removeClass('sm-fonticon-PlayerPause');
3492
  this._buttons.play.addClass('sm-fonticon-PlayerPlay');
3493
  }
3494
  },
3495
+
3496
  /**
3497
+ * Toggles the button class for the play button
3498
+ * so pause is shown and play is hidden.
3499
+ *
3500
  * @method _showPauseButton
3501
  * @protected
3502
  */
3504
  {
3505
  this._buttons.play.removeClass('fl-slideshow-nav-play');
3506
  this._buttons.play.addClass('fl-slideshow-nav-pause');
3507
+
3508
  if(this.get('useFontIcons') && typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3509
  this._buttons.play.removeClass('sm-fonticon-PlayerPlay');
3510
  this._buttons.play.addClass('sm-fonticon-PlayerPause');
3511
  }
3512
  }
3513
+
3514
  }, {
3515
 
3516
  /**
3522
  * @static
3523
  */
3524
  CSS_PREFIX: 'fl-slideshow-nav',
3525
+
3526
  /**
3527
+ * Static string used for displaying the image count. Use {current}
3528
+ * for the current image and {total} for the total number of images.
3529
  * Those placeholders will be replaced when the count node is created.
3530
  *
3531
  * @property COUNT_TEXT
3534
  * @static
3535
  */
3536
  COUNT_TEXT: '{current} of {total}',
3537
+
3538
  /**
3539
  * Static property used to define the default attribute configuration of
3540
  * the Widget.
3545
  * @static
3546
  */
3547
  ATTRS: {
3548
+
3549
  /**
3550
  * An array of button names that is used to render the main buttons.
3551
+ *
3552
  * @attribute buttons
3553
  * @type Array
3554
  * @default []
3558
  value: [],
3559
  writeOnce: true
3560
  },
3561
+
3562
  /**
3563
  * An array of button names that is used to render the left buttons.
3564
+ *
3565
  * @attribute buttonsLeft
3566
  * @type Array
3567
  * @default []
3571
  value: [],
3572
  writeOnce: true
3573
  },
3574
+
3575
  /**
3576
  * An array of button names that is used to render the right buttons.
3577
+ *
3578
  * @attribute buttonsRight
3579
  * @type Array
3580
  * @default []
3584
  value: [],
3585
  writeOnce: true
3586
  },
3587
+
3588
  /**
3589
  * Whether to use font icons when available.
3590
+ *
3591
  * @attribute useFontIcons
3592
  * @type Boolean
3593
  * @default true
3603
  /**
3604
  * A plugin for overlaying widgets in a slideshow
3605
  * with specialized show and hide functionality.
3606
+ *
3607
  * @namespace FL
3608
  * @class SlideshowOverlay
3609
  * @constructor
3611
  * @extends Plugin.Base
3612
  */
3613
  Y.namespace('FL').SlideshowOverlay = Y.Base.create('fl-slideshow-overlay', Y.Plugin.Base, [], {
3614
+
3615
  /**
3616
+ * Flag for whether the mouse has entered
3617
  * the host's bounding box.
3618
  *
3619
  * @property _focus
3622
  * @protected
3623
  */
3624
  _focus: false,
3625
+
3626
  /**
3627
  * Flag for whether the host's bounding box is visible.
3628
  *
3632
  * @protected
3633
  */
3634
  _visible: true,
3635
+
3636
  /**
3637
+ * Flag for whether show and hide functionality
3638
  * has been disabled.
3639
  *
3640
  * @property _disabled
3643
  * @protected
3644
  */
3645
  _disabled: false,
3646
+
3647
  /**
3648
+ * An object containing properties for the show transition.
3649
  *
3650
  * @property _showProps
3651
  * @type Object
3656
  easing: 'ease-out',
3657
  opacity: 1
3658
  },
3659
+
3660
  /**
3661
+ * An object containing properties for the hide transition.
3662
  *
3663
  * @property _hideProps
3664
  * @type Object
3679
  * @protected
3680
  */
3681
  _hideTimer: null,
3682
+
3683
  /**
3684
  * @method initializer
3685
  * @protected
3686
  */
3687
+ initializer: function()
3688
  {
3689
  var bb = this.get('host').get('boundingBox');
3690
+
3691
  this.afterHostEvent('render', this._initFocus);
3692
  this.afterHostEvent('render', this._initVisibility);
3693
+
3694
  if(this.get('closeButton')) {
3695
  this._initCloseButton();
3696
  }
3697
+
3698
  bb.addClass('fl-slideshow-overlay');
3699
  },
3700
+
3701
  /**
3702
  * @method destructor
3703
  * @protected
3706
  {
3707
  this._hideTimerCancel();
3708
  },
3709
+
3710
  /**
3711
  * Binds the mouseenter and mouseleave events for setting focus.
3712
  *
3719
  bb.on('mouseenter', Y.bind(this._setFocusOnMouseenter, this));
3720
  bb.on('mouseleave', Y.bind(this._setFocusOnMouseleave, this));
3721
  },
3722
+
3723
  /**
3724
  * Sets the initial visibility of the host's bounding box.
3725
  *
3730
  {
3731
  var bb = this.get('host').get('boundingBox'),
3732
  hideStyle = this.get('hideStyle');
3733
+
3734
  if(!this.get('visible')) {
3735
+
3736
  if(hideStyle == 'display') {
3737
  bb.setStyle('display', 'none');
3738
  }
3739
  else if(hideStyle == 'left') {
3740
  bb.setStyle('left', '-99999px');
3741
  }
3742
+
3743
  bb.setStyle('opacity', '0');
3744
  this._visible = false;
3745
  }
3746
  },
3747
+
3748
  /**
3749
  * Creates and inserts the close button.
3750
  *
3755
  {
3756
  var bb = this.get('host').get('boundingBox'),
3757
  closeButton = null;
3758
+
3759
  closeButton = Y.Node.create('<a class="fl-slideshow-overlay-close" href="javascript:void(0);"></a>');
3760
  closeButton.on('click', Y.bind(this._closeButtonClick, this));
3761
+
3762
  if(typeof YUI.Env.mods['sm-fonticon'] !== 'undefined') {
3763
  closeButton.addClass('sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome');
3764
  }
3765
+
3766
  bb.insert(closeButton);
3767
  },
3768
+
3769
  /**
3770
  * Hides the overlay when the close button is clicked.
3771
  *
3777
  var bb = this.get('host').get('boundingBox');
3778
  bb.transition(this._hideProps, Y.bind(this._hideComplete, this));
3779
  },
3780
+
3781
  /**
3782
  * Sets the focus flag to true.
3783
  *
3788
  {
3789
  this._focus = true;
3790
  },
3791
+
3792
  /**
3793
  * Sets the focus flag to false.
3794
  *
3799
  {
3800
  this._focus = false;
3801
  },
3802
+
3803
  /**
3804
  * Disables show and hide functionality.
3805
  *
3810
  {
3811
  this._disabled = true;
3812
  },
3813
+
3814
  /**
3815
  * Enables show and hide functionality.
3816
  *
3821
  {
3822
  this._disabled = false;
3823
  },
3824
+
3825
  /**
3826
  * Shows the host's bounding box with a fade in transition.
3827
  *
3832
  {
3833
  var bb = this.get('host').get('boundingBox'),
3834
  hideStyle = this.get('hideStyle');
3835
+
3836
  if(this._disabled) {
3837
  return;
3838
  }
3839
+
3840
  if(hideStyle == 'display') {
3841
  bb.setStyle('display', 'block');
3842
  }
3843
  else if(hideStyle == 'left') {
3844
  bb.setStyle('left', 'auto');
3845
  }
3846
+
3847
  bb.transition(this._showProps, Y.bind(this._showComplete, this));
3848
+
3849
  /**
3850
  * @event hideStart
3851
  */
3852
  this.fire('showStart');
3853
  },
3854
+
3855
  /**
3856
  * @method _showComplete
3857
  * @protected
3860
  {
3861
  this._visible = true;
3862
  this.hideWithTimer();
3863
+
3864
  /**
3865
  * @event showComplete
3866
  */
3867
  this.fire('showComplete');
3868
  },
3869
+
3870
  /**
3871
  * Hides the host's bounding box with a fade out transition.
3872
  *
3878
  if(this._focus || this._disabled) {
3879
  return;
3880
  }
3881
+
3882
  var bb = this.get('host').get('boundingBox');
3883
  bb.transition(this._hideProps, Y.bind(this._hideComplete, this));
3884
+
3885
  /**
3886
  * @event hideStart
3887
  */
3888
  this.fire('hideStart');
3889
  },
3890
+
3891
  /**
3892
  * Hides the host's bounding box with a fade out transition
3893
  * after a timer completes.
3900
  this._hideTimerCancel();
3901
  this._hideTimer = Y.later(this.get('hideDelay'), this, this.hide);
3902
  },
3903
+
3904
  /**
3905
  * Cancels the hide timer.
3906
  *
3914
  this._hideTimer = null;
3915
  }
3916
  },
3917
+
3918
  /**
3919
  * @method _hideComplete
3920
  * @protected
3923
  {
3924
  var bb = this.get('host').get('boundingBox'),
3925
  hideStyle = this.get('hideStyle');
3926
+
3927
  if(hideStyle == 'display') {
3928
  bb.setStyle('display', 'none');
3929
  }
3930
  else if(hideStyle == 'left') {
3931
  bb.setStyle('left', '-99999px');
3932
  }
3933
+
3934
  this._visible = false;
3935
+
3936
  /**
3937
  * @event hideComplete
3938
  */
3939
  this.fire('hideComplete');
3940
  }
3941
+
3942
  }, {
3943
 
3944
  /**
3950
  * @static
3951
  */
3952
  NS: 'slideshowOverlay',
3953
+
3954
  /**
3955
  * Static property used to define the default attribute configuration of
3956
  * the plugin.
3961
  * @static
3962
  */
3963
  ATTRS: {
3964
+
3965
  /**
3966
  * Whether to use the close button or not.
3967
  *
3974
  value: false,
3975
  writeOnce: true
3976
  },
3977
+
3978
  /**
3979
  * The time to wait before hiding the host's bounding box.
3980
  * Measured in milliseconds.
3988
  value: 3000,
3989
  writeOnce: true
3990
  },
3991
+
3992
  /**
3993
  * The style to use for hiding the image. Possible
3994
  * values are display and left.
4002
  value: 'display',
4003
  writeOnce: true
4004
  },
4005
+
4006
  /**
4007
  * Sets the initial visibility of the host's boudning box.
4008
+ *
4009
  * @attribute visible
4010
  * @type Boolean
4011
  * @default true
4020
 
4021
  /**
4022
  * Social buttons widget used in slideshows.
4023
+ *
4024
  * @namespace FL
4025
  * @class SlideshowSocial
4026
  * @constructor
4039
  * @protected
4040
  */
4041
  _buttons: null,
4042
+
4043
  /**
4044
  * @method renderUI
4045
  * @protected
4047
  renderUI: function()
4048
  {
4049
  this._buttons = {};
4050
+
4051
  if(this.get('root').get('googlePlusButtonEnabled')) {
4052
  this._renderGooglePlusButton();
4053
  }
4054
  },
4055
+
4056
  /**
4057
  * @method bindUI
4058
  * @protected
4060
  bindUI: function()
4061
  {
4062
  var root = this.get('root');
4063
+
4064
  if(root.get('likeButtonEnabled')) {
4065
  root.on('imageLoadComplete', Y.bind(this._updateLikeButton, this));
4066
  }
4074
  root.on('imageLoadComplete', Y.bind(this._updatePinterestButton, this));
4075
  }
4076
  },
4077
+
4078
  /**
4079
  * @method _updateLikeButton
4080
  * @protected
4087
  albumIndex = root.albumIndex,
4088
  rootSource = root.get('source')[albumIndex],
4089
  imageInfo = root.imageInfo;
4090
+
4091
  if(this._buttons.like) {
4092
  this._buttons.like.remove();
4093
  this._buttons.like = null;
4094
  }
4095
+
4096
  if(rootSource.type == 'smugmug') {
4097
  src = 'https://www.facebook.com/plugins/like.php?';
4098
+ src += 'href=' + 'https://www.smugmug.com/services/graph/gallery/';
4099
  src += rootSource.id + '_' + rootSource.key +'/' + imageInfo.id + '_' + imageInfo.key;
4100
  }
4101
  else {
4102
  src = 'https://www.facebook.com/plugins/like.php?';
4103
  src += 'href=' + encodeURIComponent(imageInfo.largeURL);
4104
  }
4105
+
4106
  src += '&send=false';
4107
  src += '&layout=button_count';
4108
  src += '&width=90';
4110
  src += '&action=like';
4111
  src += '&colorscheme=light';
4112
  src += '&height=21';
4113
+
4114
  this._buttons.like = Y.Node.create('<iframe src="'+ src +'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>');
4115
+
4116
  this._buttons.like.setStyles({
4117
  overflow: 'hidden',
4118
  width: '90px',
4121
 
4122
  cb.appendChild(this._buttons.like);
4123
  },
4124
+
4125
  /**
4126
  * @method _updateTweetButton
4127
  * @protected
4131
  var src = null,
4132
  imageInfo = this.get('root').imageInfo,
4133
  cb = this.get('contentBox');
4134
+
4135
  if(this._buttons.tweet) {
4136
  this._buttons.tweet.remove();
4137
  this._buttons.tweet = null;
4138
  }
4139
+
4140
  src = 'https://platform.twitter.com/widgets/tweet_button.html?';
4141
  src += 'url=' + encodeURIComponent(imageInfo.largeURL);
4142
  src += '&count=none';
4143
+
4144
  this._buttons.tweet = Y.Node.create('<iframe src="'+ src +'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>');
4145
+
4146
  this._buttons.tweet.setStyles({
4147
  overflow: 'hidden',
4148
  width: '90px',
4151
 
4152
  cb.appendChild(this._buttons.tweet);
4153
  },
4154
+
4155
  /**
4156
  * @method _renderGooglePlusButton
4157
  * @protected
4159
  _renderGooglePlusButton: function()
4160
  {
4161
  var po, head;
4162
+
4163
+ po = document.createElement('script');
4164
+ po.type = 'text/javascript';
4165
  po.src = 'https://apis.google.com/js/plusone.js';
4166
+
4167
+ head = document.getElementsByTagName('head')[0];
4168
  head.parentNode.appendChild(po);
4169
  },
4170
+
4171
  /**
4172
  * @method _updateGooglePlusButton
4173
  * @protected
4181
  this._updateGooglePlusButtonCallback();
4182
  }
4183
  },
4184
+
4185
  /**
4186
  * @method _updateGooglePlusButtonCallback
4187
  * @protected
4190
  {
4191
  var imageInfo = this.get('root').imageInfo,
4192
  cb = this.get('contentBox');
4193
+
4194
  if(this._buttons.plus) {
4195
  this._buttons.plus.remove();
4196
  this._buttons.plus = null;
4198
  if(typeof gapi != 'undefined') {
4199
  this._buttons.plus = Y.Node.create('<div></div>');
4200
  cb.appendChild(this._buttons.plus);
4201
+
4202
  gapi.plusone.render(this._buttons.plus._node, {
4203
  href: encodeURIComponent(imageInfo.largeURL),
4204
  annotation: 'bubble',
4206
  });
4207
  }
4208
  },
4209
+
4210
  /**
4211
  * @method _updatePinterestButton
4212
  * @protected
4216
  var href = 'https://pinterest.com/pin/create/button/',
4217
  imageInfo = this.get('root').imageInfo,
4218
  cb = this.get('contentBox');
4219
+
4220
  if(this._buttons.pin) {
4221
  this._buttons.pin.remove();
4222
  this._buttons.pin = null;
4223
  }
4224
+
4225
  href += '?url=' + encodeURIComponent(window.location.href);
4226
  href += '&media='+ encodeURIComponent(imageInfo.mediumURL);
4227
  href += '&description='+ encodeURIComponent(imageInfo.caption);
4228
+
4229
  this._buttons.pin = Y.Node.create('<a></a>');
4230
  this._buttons.pin.setAttribute('data-pin-config', 'none');
4231
  this._buttons.pin.setAttribute('data-pin-do', 'buttonPin');
4235
 
4236
  cb.appendChild(this._buttons.pin);
4237
  }
4238
+
4239
  }, {
4240
 
4241
  /**
4247
  * @static
4248
  */
4249
  CSS_PREFIX: 'fl-slideshow-social',
4250
+
4251
  /**
4252
  * Static property used to define the default attribute configuration of
4253
  * the Widget.
4258
  * @static
4259
  */
4260
  ATTRS: {
4261
+
4262
  }
4263
  });
4264
 
4265
  /**
4266
  * Creates a grid of FL.SlideshowImage instances.
4267
+ *
4268
  * @namespace FL
4269
  * @class SlideshowThumbs
4270
  * @constructor
4293
  * @protected
4294
  */
4295
  _pagesBox: null,
4296
+
4297
  /**
4298
  * A reference to the active page div node. Holds a grid
4299
  * of FL.SlideshowImage instances.
4304
  * @protected
4305
  */
4306
  _activePageBox: null,
4307
+
4308
  /**
4309
  * The index of the active page of thumbs.
4310
  *
4314
  * @protected
4315
  */
4316
  _activePageIndex: 0,
4317
+
4318
  /**
4319
  * A reference to the next page div node. Holds a grid
4320
  * of FL.SlideshowImage instances.
4325
  * @protected
4326
  */
4327
  _nextPageBox: null,
4328
+
4329
  /**
4330
  * An array of FL.SlideshowImage instances in the active page.
4331
  *
4335
  * @protected
4336
  */
4337
  _activeImages: null,
4338
+
4339
  /**
4340
  * An array of FL.SlideshowImage instances used to
4341
  * preload the next page of images.
4346
  * @protected
4347
  */
4348
  _nextImages: null,
4349
+
4350
  /**
4351
  * An array of FL.SlideshowImage instances used to
4352
  * preload the previous page of images.
4357
  * @protected
4358
  */
4359
  _prevImages: null,
4360
+
4361
  /**
4362
  * An instance of FL.SlideshowNav used for the left nav.
4363
  *
4367
  * @protected
4368
  */
4369
  _leftNav: null,
4370
+
4371
  /**
4372
  * An instance of FL.SlideshowNav used for the right nav.
4373
  *
4377
  * @protected
4378
  */
4379
  _rightNav: null,
4380
+
4381
  /**
4382
  * An instance of FL.SlideshowNav used for the top nav.
4383
  *
4387
  * @protected
4388
  */
4389
  _topNav: null,
4390
+
4391
  /**
4392
  * An instance of FL.SlideshowNav used for the bottom nav.
4393
  *
4397
  * @protected
4398
  */
4399
  _bottomNav: null,
4400
+
4401
  /**
4402
  * Height of the bounding box.
4403
  *
4407
  * @protected
4408
  */
4409
  _bbHeight: 0,
4410
+
4411
  /**
4412
  * Width of the bounding box.
4413
  *
4417
  * @protected
4418
  */
4419
  _bbWidth: 0,
4420
+
4421
  /**
4422
  * Width of the content box.
4423
  *
4427
  * @protected
4428
  */
4429
  _cbWidth: 0,
4430
+
4431
  /**
4432
  * Left margin of the clip box.
4433
  *
4437
  * @protected
4438
  */
4439
  _clipBoxMarginLeft: 0,
4440
+
4441
  /**
4442
  * Top position of the clip box.
4443
  *
4447
  * @protected
4448
  */
4449
  _clipBoxTop: 0,
4450
+
4451
  /**
4452
  * The number of columns per page.
4453
  *
4457
  * @protected
4458
  */
4459
  _colsPerPage: 0,
4460
+
4461
  /**
4462
  * The number of rows per page.
4463
  *
4467
  * @protected
4468
  */
4469
  _rowsPerPage: 0,
4470
+
4471
  /**
4472
  * The number of images per page.
4473
  *
4477
  * @protected
4478
  */
4479
  _imagesPerPage: 0,
4480
+
4481
  /**
4482
  * The number of pages.
4483
  *
4487
  * @protected
4488
  */
4489
  _numPages: 0,
4490
+
4491
  /**
4492
  * Height of the pages.
4493
  *
4497
  * @protected
4498
  */
4499
  _pageHeight: 0,
4500
+
4501
  /**
4502
  * Width of the pages.
4503
  *
4507
  * @protected
4508
  */
4509
  _pageWidth: 0,
4510
+
4511
  /**
4512
  * The horizontal spacing between thumbs.
4513
  *
4517
  * @protected
4518
  */
4519
  _horizontalSpacing: 0,
4520
+
4521
  /**
4522
  * The vertical spacing between thumbs.
4523
  *
4527
  * @protected
4528
  */
4529
  _verticalSpacing: 0,
4530
+
4531
  /**
4532
  * Width of the left nav.
4533
  *
4537
  * @protected
4538
  */
4539
  _leftNavWidth: 0,
4540
+
4541
  /**
4542
  * Width of the right nav.
4543
  *
4547
  * @protected
4548
  */
4549
  _rightNavWidth: 0,
4550
+
4551
  /**
4552
  * An instance of FL.SlideshowTransition for the current transition.
4553
  *
4557
  * @protected
4558
  */
4559
  _transition: null,
4560
+
4561
  /**
4562
  * Whether the pages are currently transitioning or not.
4563
  *
4567
  * @protected
4568
  */
4569
  _transitioning: false,
4570
+
4571
  /**
4572
  * Direction of the current transition.
4573
  *
4577
  * @protected
4578
  */
4579
  _transitionDirection: 'next',
4580
+
4581
  /**
4582
  * Provides functionality for gesture based transitions
4583
  * between the active and next pages.
4588
  * @protected
4589
  */
4590
  _gestures: null,
4591
+
4592
  /**
4593
  * Initialize image vars.
4594
  *
4601
  this._nextImages = [];
4602
  this._prevImages = [];
4603
  },
4604
+
4605
  /**
4606
  * Renders the UI boxes.
4607
  *
4613
  this._renderBoxes();
4614
  this._renderNavs();
4615
  },
4616
+
4617
  /**
4618
  * Binds the UI events.
4619
+ *
4620
  * @method bindUI
4621
  * @protected
4622
  */
4625
  var root = this.get('root'),
4626
  id = this.get('id'),
4627
  transition = this.get('transition');
4628
+
4629
  root.on(id + '|albumLoadComplete', this._albumLoadComplete, this);
4630
+
4631
  if('ontouchstart' in window && this.get('touchSupport')) {
4632
+
4633
  this._gestures = new Y.FL.SlideshowGestures({
4634
  direction: transition == 'slideVertical' ? 'vertical' : 'horizontal',
4635
  activeItem: this._activePageBox,
4636
  nextItem: this._nextPageBox
4637
  });
4638
+
4639
  this._gestures.on('moveStart', this._gesturesMoveStart, this);
4640
  this._gestures.on('endComplete', this._gesturesEndComplete, this);
4641
  }
4642
  },
4643
+
4644
  /**
4645
  * Syncs the UI boxes.
4646
  *
4652
  this._syncBoxes();
4653
  this._syncNavs();
4654
  },
4655
+
4656
  /**
4657
  * @method destructor
4658
  * @protected
4661
  {
4662
  var root = this.get('root'),
4663
  id = this.get('id');
4664
+
4665
  root.detach(id + '|*');
4666
+
4667
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
4668
  },
4669
+
4670
  /**
4671
  * Unload all images.
4672
  *
4677
  var root = this.get('root'),
4678
  id = this.get('id'),
4679
  i = 0;
4680
+
4681
  root.detach(id + '|imageLoadComplete');
4682
+
4683
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
4684
+
4685
  for( ; i < this._activeImages.length; i++) {
4686
  this._activeImages[i].unload();
4687
  }
4688
  },
4689
+
4690
  /**
4691
  * Resizes the UI boxes.
4692
  *
4698
  this._togglePageButtons();
4699
  this._resizeBoxes();
4700
  this._resizeNavs();
4701
+
4702
  if(this.get('root').albumInfo) {
4703
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
4704
  this._renderActivePage();
4705
  this._preloadNextPage();
4706
  this._preloadPrevPage();
4707
  }
4708
+
4709
  // Enable or disable gestures.
4710
  if(this._gestures && this._numPages < 2) {
4711
  this._gestures.disable();
4714
  this._gestures.enable();
4715
  }
4716
  },
4717
+
4718
  /**
4719
  * Transitions to the previous page.
4720
  *
4724
  prevPage: function()
4725
  {
4726
  if(this._transitioning) {
4727
+ return;
4728
  }
4729
+
4730
  this._transitionStart('prev');
4731
  },
4732
 
4739
  nextPage: function()
4740
  {
4741
  if(this._transitioning) {
4742
+ return;
4743
  }
4744
+
4745
  this._transitionStart('next');
4746
  },
4747
+
4748
  /**
4749
  * Called when an album is loaded into the root slideshow widget.
4750
+ *
4751
  * @method _albumLoadComplete
4752
  * @protected
4753
  */
4755
  {
4756
  var root = this.get('root'),
4757
  id = this.get('id');
4758
+
4759
  root.once(id + '|imageLoadComplete', this.resize, this);
4760
  root.on(id + '|imageLoadComplete', this._imageLoadComplete, this);
4761
  },
4762
+
4763
  /**
4764
  * Called when an image is loaded into the root slideshow widget.
4765
+ *
4766
  * @method _imageLoadComplete
4767
  * @protected
4768
  */
4773
  lastInfo = lastActive ? lastActive._imageInfo : null,
4774
  nextActive = null,
4775
  nextInfo = this.get('root').imageInfo;
4776
+
4777
  this._setActiveImage(this._activeImages);
4778
+
4779
  nextActive = Y.one('.fl-slideshow-image-active');
4780
+
4781
  if(lastActive && !nextActive) {
4782
  if(nextInfo.index === 0 && lastInfo.index === albumInfo.images.length - 1) {
4783
  this.nextPage();
4793
  }
4794
  }
4795
  },
4796
+
4797
  /**
4798
  * Renders the boxes.
4799
  *
4806
  this._clipBox = Y.Node.create('<div></div>');
4807
  this._clipBox.addClass('fl-slideshow-thumbs-clip');
4808
  this.get('contentBox').insert(this._clipBox);
4809
+
4810
  // Pages box
4811
  this._pagesBox = Y.Node.create('<div></div>');
4812
  this._pagesBox.addClass('fl-slideshow-thumbs-pages');
4813
  this._clipBox.insert(this._pagesBox);
4814
+
4815
  // Active page box
4816
  this._activePageBox = Y.Node.create('<div></div>');
4817
  this._activePageBox.addClass('fl-slideshow-thumbs-page');
4818
  this._pagesBox.insert(this._activePageBox);
4819
+
4820
  // Next page box
4821
  this._nextPageBox = Y.Node.create('<div></div>');
4822
  this._nextPageBox.addClass('fl-slideshow-thumbs-page');
4823
  this._pagesBox.insert(this._nextPageBox);
4824
  },
4825
+
4826
  /**
4827
  * Syncs the boxes.
4828
  *
4833
  {
4834
  // Active page box
4835
  this._activePageBox.setStyle('left', '0');
4836
+
4837
  // Next page box
4838
  this._nextPageBox.setStyle('left', '-9999px');
4839
  },
4840
+
4841
  /**
4842
  * Resizes the boxes.
4843
  *
4848
  {
4849
  this.set('width', this._bbWidth);
4850
  this.set('height', this._bbHeight);
4851
+
4852
  this.get('contentBox').setStyle('width', this._cbWidth + 'px');
4853
+
4854
  this._clipBox.setStyle('width', this._pageWidth + 'px');
4855
  this._clipBox.setStyle('height', this._pageHeight + 'px');
4856
  this._clipBox.setStyle('padding', this._verticalSpacing + 'px 0 0 ' + this._horizontalSpacing + 'px ');
4857
  this._clipBox.setStyle('margin', '0 0 0 ' + this._clipBoxMarginLeft + 'px');
4858
  this._clipBox.setStyle('top', this._clipBoxTop);
4859
+
4860
  this._pagesBox.setStyle('width', this._pageWidth + 'px');
4861
  this._pagesBox.setStyle('height', this._pageHeight + 'px');
4862
+
4863
  this._activePageBox.setStyle('width', this._pageWidth + 'px');
4864
  this._activePageBox.setStyle('height', this._pageHeight + 'px');
4865
+
4866
  this._nextPageBox.setStyle('width', this._pageWidth + 'px');
4867
  this._nextPageBox.setStyle('height', this._pageHeight + 'px');
4868
  },
4869
+
4870
  /**
4871
  * Renders the active page of images.
4872
+ *
4873
  * @method _renderActivePage
4874
  * @protected
4875
  */
4880
  imageIndex = this._imagesPerPage * this._activePageIndex,
4881
  endIndex = imageIndex + this._imagesPerPage,
4882
  images = root.albumInfo.images;
4883
+
4884
  this._clearActiveImage();
4885
+
4886
  // Remove current images
4887
  for( ; i < this._activeImages.length; i++) {
4888
  this._activeImages[i].remove();
4890
  this._activeImages[i].get('boundingBox')._imageInfo = null;
4891
  this._activeImages[i].get('boundingBox').remove();
4892
  }
4893
+
4894
  // Draw images
4895
  for(i = 0; imageIndex < endIndex; imageIndex++) {
4896
+
4897
  if(!images[imageIndex]) {
4898
  break;
4899
  }
4900
+
4901
  this._renderImage(this._activeImages, i, this._activePageBox, images[imageIndex]);
4902
  i++;
4903
  }
4904
+
4905
  this._setActiveImage(this._activeImages);
4906
  },
4907
+
4908
  /**
4909
  * Renders the next page of images.
4910
+ *
4911
  * @method _renderNextPage
4912
  * @protected
4913
+ */
4914
  _renderNextPage: function()
4915
  {
4916
+ var i = 0,
4917
  imageArray = this._transitionDirection == 'next' ? this._nextImages : this._prevImages;
4918
+
4919
  this._nextPageBox.get('children').remove();
4920
+
4921
  for( ; i < imageArray.length; i++) {
4922
  if(imageArray[i]._imageInfo) {
4923
  this._renderImage(imageArray, i, this._nextPageBox, imageArray[i]._imageInfo);
4926
  break;
4927
  }
4928
  }
4929
+
4930
  this._setActiveImage(imageArray);
4931
  },
4932
+
4933
  /**
4934
  * Preloads the next page of images.
4935
+ *
4936
  * @method _preloadNextPage
4937
  * @protected
4938
  */
4942
 
4943
  this._preloadPage(pageIndex, this._nextImages);
4944
  },
4945
+
4946
  /**
4947
  * Preloads the previous page of images.
4948
+ *
4949
  * @method _preloadPrevPage
4950
  * @protected
4951
  */
4952
  _preloadPrevPage: function()
4953
  {
4954
  var pageIndex = this._activePageIndex - 1 < 0 ? this._numPages - 1 : this._activePageIndex - 1;
4955
+
4956
  this._preloadPage(pageIndex, this._prevImages);
4957
  },
4958
+
4959
  /**
4960
  * Preloads a page of images.
4961
+ *
4962
  * @method _preloadPage
4963
  * @param imageIndex {Number} The image index to start preloading from.
4964
  * @param imageArray {Array} The array to store the preloaded images.
4974
  imageConfig = this.get('imageConfig'),
4975
  width = imageConfig.width,
4976
  height = imageConfig.height;
4977
+
4978
  if(this._numPages > 1) {
4979
+
4980
  // Unload existing images
4981
  for( ; i < imageArray.length; i++) {
4982
  imageArray[i].remove();
4983
  imageArray[i].unload();
4984
  }
4985
+
4986
  // Preload the images
4987
  for(i = 0; imageIndex < endIndex; imageIndex++) {
4988
+
4989
  if(!images[imageIndex]) {
4990
  continue;
4991
  }
4992
+
4993
  this._renderImage(imageArray, i);
4994
  imageArray[i].preload(images[imageIndex], width, height);
4995
  i++;
4996
  }
4997
  }
4998
  },
4999
+
5000
  /**
5001
  * Renders an image.
5002
+ *
5003
  * @method _renderImage
5004
  * @protected
5005
  */
5006
  _renderImage: function(imageArray, i, page, imageInfo)
5007
  {
5008
+ var imageBB = null,
5009
  imageConfig = this.get('imageConfig');
5010
+
5011
  // Create the image?
5012
  if(typeof imageArray[i] == 'undefined') {
5013
  imageConfig.loadGroup = 'thumbs';
5019
  imageBB.on('mouseover', this._imageMouseover, this);
5020
  imageBB.on('mouseout', this._imageMouseout, this);
5021
  }
5022
+
5023
  // Image bounding box
5024
  imageBB = imageArray[i].get('boundingBox');
5025
  imageBB.setStyle('margin', '0 ' + this._horizontalSpacing + 'px ' + this._verticalSpacing + 'px 0');
5026
+
5027
+ // Add the image to a page?
5028
  if(page) {
5029
  this._childrenContainer = page;
5030
  this.add(imageArray[i]);
5031
  imageArray[i].resize(imageConfig.width, imageConfig.height);
5032
  }
5033
+
5034
  // Load the image?
5035
  if(imageInfo) {
5036
  imageArray[i].load(imageInfo);
5037
  imageBB._imageInfo = imageInfo;
5038
  }
5039
  },
5040
+
5041
  /**
5042
  * Overrides the WidgetParent _uiAddChild method so _renderImage
5043
  * will render to the appropriate page.
5045
  * @method _uiAddChild
5046
  * @protected
5047
  * @param child {Widget} The child Widget instance to render.
5048
+ * @param parentNode {Object} The Node under which the
5049
  * child Widget is to be rendered. Set to the appropriate page
5050
  * in the _renderImage method by setting _childrenContainer.
5051
+ */
5052
+ _uiAddChild: function (child, parentNode)
5053
  {
5054
  child.render(parentNode);
5055
  parentNode.appendChild(child.get('boundingBox'));
5056
  },
5057
+
5058
  /**
5059
  * Called when an image is clicked.
5060
+ *
5061
  * @method _imageClick
5062
  * @protected
5063
  */
5064
  _imageClick: function(e)
5065
  {
5066
  var root = this.get('root');
5067
+
5068
  if(this.get('pauseOnClick')) {
5069
  root.pause();
5070
  }
5071
+
5072
  root.loadImage(e.currentTarget._imageInfo.index);
5073
+
5074
  /**
5075
  * Fires when an image is clicked.
5076
  *
5078
  */
5079
  this.fire('imageClick');
5080
  },
5081
+
5082
  /**
5083
  * Sets the active image.
5084
+ *
5085
  * @method _setActiveImage
5086
  * @param imageArray {Array} The image array to check for the active image.
5087
  * @protected
5089
  _setActiveImage: function(imageArray)
5090
  {
5091
  var i = 0;
5092
+
5093
  this._clearActiveImage();
5094
+
5095
  for( ; i < imageArray.length; i++) {
5096
  if(imageArray[i]._imageInfo) {
5097
  if(imageArray[i]._imageInfo.index == this.get('root').imageInfo.index) {
5101
  }
5102
  }
5103
  },
5104
+
5105
  /**
5106
  * Removes the class name 'fl-slideshow-image-active'
5107
  * from the active image.
5108
+ *
5109
  * @method _clearActiveImage
5110
  * @protected
5111
  */
5112
  _clearActiveImage: function()
5113
  {
5114
  var active = Y.one('.fl-slideshow-image-active');
5115
+
5116
  if(active) {
5117
  active.removeClass('fl-slideshow-image-active');
5118
  }
5119
  },
5120
+
5121
  /**
5122
  * Gets the transition type.
5123
+ *
5124
  * @method _getTransition
5125
  * @protected
5126
  */
5127
  _getTransition: function()
5128
  {
5129
  var transition = this.get('transition');
5130
+
5131
  if(transition == 'slideHorizontal' && this._transitionDirection == 'next') {
5132
  return 'slideLeft';
5133
  }
5140
  else if(transition == 'slideVertical' && this._transitionDirection == 'prev') {
5141
  return 'slideDown';
5142
  }
5143
+
5144
  return transition;
5145
  },
5146
+
5147
  /**
5148
  * Starts the transition, moving in the provided direction.
5149
  *
5154
  _transitionStart: function(direction)
5155
  {
5156
  if(this._numPages > 1) {
5157
+
5158
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
5159
+
5160
  this._transitionDirection = direction;
5161
  this._transitioning = true;
5162
  this._nextPageBox.setStyle('left', '0px');
5163
  this._renderNextPage();
5164
+
5165
  this._transition = new Y.FL.SlideshowTransition({
5166
+ itemIn: this._nextPageBox,
5167
  itemOut: this._activePageBox,
5168
+ type: this._getTransition(),
5169
  duration: this.get('transitionDuration'),
5170
  easing: this.get('transitionEasing')
5171
  });
5172
+
5173
  this._transition.once('complete', this._transitionComplete, this);
5174
  this._transition.run();
5175
+
5176
  // Disable gestures if set.
5177
  if(this._gestures) {
5178
  this._gestures.disable();
5179
  }
5180
  }
5181
  },
5182
+
5183
  /**
5184
  * Transition cleanup called when the current transition ends.
5185
  *
5192
  this._transitioning = false;
5193
  this._transitionDirection = '';
5194
  this._transition = null;
5195
+
5196
  // Enable gestures if set.
5197
  if(this._gestures) {
5198
  this._gestures.enable();
5199
  }
5200
+
5201
  /**
5202
  * Fires when a page transition completes.
5203
  *
5205
  */
5206
  this.fire('transitionComplete');
5207
  },
5208
+
5209
  /**
5210
  * @method _gesturesMoveStart
5211
  * @param e {Object} The event object.
5214
  _gesturesMoveStart: function(e)
5215
  {
5216
  Y.FL.SlideshowImageLoader.removeGroup('thumbs');
5217
+
5218
  this._transitionDirection = e.direction;
5219
  this._renderNextPage();
5220
  },
5221
+
5222
  /**
5223
  * @method _gesturesEndComplete
5224
  * @protected
5225
+ */
5226
  _gesturesEndComplete: function()
5227
  {
5228
  this._swapPageRefs();
5229
  this._transitionDirection = '';
5230
  this.fire('transitionComplete');
5231
  },
5232
+
5233
  /**
5234
+ * Swaps the active page and next page references when
5235
  * a transition completes and sets the active page index.
5236
+ *
5237
  * @method _swapPageRefs
5238
  * @protected
5239
  */
5241
  {
5242
  var lastBox = this._activePageBox,
5243
  lastImages = this._activeImages;
5244
+
5245
  this._activePageBox = this._nextPageBox;
5246
  this._nextPageBox = lastBox;
5247
  this._nextPageBox.setStyle('left', '-9999px');
5248
+
5249
  if(this._transitionDirection == 'next') {
5250
  this._activeImages = this._nextImages;
5251
  this._nextImages = lastImages;
5254
  this._activeImages = this._prevImages;
5255
  this._prevImages = lastImages;
5256
  }
5257
+
5258
  // Active page index
5259
  if(this._transitionDirection == 'next' && this._activePageIndex + 1 < this._numPages) {
5260
  this._activePageIndex++;
5261
+ }
5262
  else if(this._transitionDirection == 'next') {
5263
  this._activePageIndex = 0;
5264
  }
5268
  else if(this._transitionDirection == 'prev') {
5269
  this._activePageIndex = this._numPages - 1;
5270
  }
5271
+
5272
  // Swap gesture refs
5273
  if(this._gestures) {
5274
  this._gestures.set('activeItem', this._activePageBox);
5275
  this._gestures.set('nextItem', this._nextPageBox);
5276
  }
5277
+
5278
  this._preloadNextPage();
5279
  this._preloadPrevPage();
5280
  },
5281
+
5282
  /**
5283
  * Renders the enabled navs.
5284
  *
5291
  rightNavButtons = this.get('rightNavButtons'),
5292
  bottomNavButtons = this.get('bottomNavButtons'),
5293
  leftNavButtons = this.get('leftNavButtons');
5294
+
5295
  if(this.get('topNavEnabled') && topNavButtons.length > 0) {
5296
  this._topNav = new Y.FL.SlideshowNav({ buttons: topNavButtons });
5297
  this._topNav.get('boundingBox').addClass('fl-slideshow-thumbs-top-nav');
5322
  this._bindNavEvents(this._leftNav);
5323
  }
5324
  },
5325
+
5326
  /**
5327
  * Syncs the navs.
5328
  *
5332
  _syncNavs: function()
5333
  {
5334
  var rightNavBB, bottomNavBB, leftNavBB;
5335
+
5336
  if(this._rightNav) {
5337
  rightNavBB = this._rightNav.get('boundingBox');
5338
  rightNavBB.setStyle('position', 'absolute');
5352
  leftNavBB.setStyle('left', '0px');
5353
  }
5354
  },
5355
+
5356
  /**
5357
  * Resizes the navs.
5358
  *
5364
  var rightNavBB,
5365
  leftNavBB,
5366
  marginTop;
5367
+
5368
  if(this._rightNav) {
5369
  rightNavBB = this._rightNav.get('boundingBox');
5370
  marginTop = this._bbHeight/2 - parseInt(rightNavBB.getComputedStyle('height'), 10)/2;
5376
  leftNavBB.setStyle('marginTop', marginTop + 'px');
5377
  }
5378
  },
5379
+
5380
  /**
5381
  * Binds events to the provided nav.
5382
  *
5392
  if(nav._buttons.nextPage) {
5393
  nav._buttons.nextPage.on('click', this.nextPage, this);
5394
  }
5395
+
5396
  nav.on('resize', this.resize, this);
5397
  },
5398
+
5399
  /**
5400
  * Hides the prev page and next page buttons
5401
  * if there is only one page of thumbs.
5417
  this._setSizeInfo();
5418
  }
5419
  },
5420
+
5421
  /**
5422
  * Sets the size info used when resizing and loading pages.
5423
  *
5464
  clipBoxTop = 0,
5465
  availHorizSpace = 0,
5466
  availVerticalSpace = 0;
5467
+
5468
  // Position absolute causes some resizing bugs.
5469
  bb.setStyle('position', 'relative');
5470
+
5471
  // Bounding box width
5472
  if(!isNaN(columns)) {
5473
  bbWidth = pageWidth = columns * (imageConfig.width + horizontalSpacing) + horizontalSpacing;
5474
  }
5475
+
5476
  // Bounding box height
5477
  if(!isNaN(rows)) {
5478
  bbHeight = pageHeight = rows * (imageConfig.height + verticalSpacing) + verticalSpacing;
5479
  }
5480
+
5481
  // Compensate for the navs
5482
  if(this._leftNav) {
5483
+
5484
  leftNavWidth = parseInt(this._leftNav.get('boundingBox').getComputedStyle('width'), 10);
5485
+
5486
  if(isNaN(columns)) {
5487
  pageWidth -= leftNavWidth;
5488
  }
5491
  }
5492
  }
5493
  if(this._rightNav) {
5494
+
5495
  rightNavWidth = parseInt(this._rightNav.get('boundingBox').getComputedStyle('width'), 10);
5496
+
5497
  if(isNaN(columns)) {
5498
  pageWidth -= rightNavWidth;
5499
  }
5504
  if(this._topNav) {
5505
 
5506
  topNavHeight = parseInt(this._topNav.get('boundingBox').getComputedStyle('height'), 10);
5507
+
5508
  if(isNaN(rows)) {
5509
  pageHeight -= topNavHeight;
5510
  }
5515
  if(this._bottomNav) {
5516
 
5517
  bottomNavHeight = parseInt(this._bottomNav.get('boundingBox').getComputedStyle('height'), 10);
5518
+
5519
  if(isNaN(rows)) {
5520
  pageHeight -= bottomNavHeight;
5521
  }
5523
  bbHeight += bottomNavHeight;
5524
  }
5525
  }
5526
+
5527
  // Columns per page
5528
  if(isNaN(columns)) {
5529
  colsPerPage = Math.floor(pageWidth/(imageConfig.width + horizontalSpacing));
5530
  colsPerPage = colsPerPage < 1 ? 1 : colsPerPage;
5531
  }
5532
+
5533
  // Rows per page
5534
  if(isNaN(rows)) {
5535
  rowsPerPage = Math.floor(pageHeight/(imageConfig.height + verticalSpacing));
5536
  rowsPerPage = rowsPerPage < 1 ? 1 : rowsPerPage;
5537
  }
5538
+
5539
  // Images per page
5540
  imagesPerPage = colsPerPage * rowsPerPage;
5541
+
5542
  // Number of pages
5543
  if(root.albumInfo) {
5544
  numPages = Math.ceil(root.albumInfo.images.length/imagesPerPage);
5545
  }
5546
+
5547
  // Horizontal spacing
5548
  if(isNaN(columns) && spaceEvenly) {
5549
+ horizontalSpacing = Math.floor((pageWidth - (imageConfig.width * colsPerPage))/(colsPerPage + 1));
5550
  }
5551
+
5552
  // Vertical spacing
5553
  if(isNaN(rows) && spaceEvenly) {
5554
  verticalSpacing = Math.floor((pageHeight - (imageConfig.height * rowsPerPage))/(rowsPerPage + 1));
5555
  }
5556
+
5557
  // Content container width
5558
  if(root.albumInfo && centerSinglePage && numPages == 1 && rowsPerPage == 1) {
5559
+
5560
  cbWidth = root.albumInfo.images.length * imageConfig.width;
5561
  cbWidth += horizontalSpacing * (root.albumInfo.images.length + 1);
5562
+
5563
  if(this._leftNav) {
5564
  cbWidth += leftNavWidth;
5565
  }
5570
  else {
5571
  cbWidth = bbWidth;
5572
  }
5573
+
5574
  // Final page width and height
5575
  if(root.albumInfo && centerSinglePage && numPages == 1 && rowsPerPage == 1) {
5576
  pageWidth = root.albumInfo.images.length * imageConfig.width;
5579
  else {
5580
  pageWidth = colsPerPage * (imageConfig.width + horizontalSpacing);
5581
  }
5582
+
5583
  pageHeight = rowsPerPage * (imageConfig.height + verticalSpacing);
5584
+
5585
+ // Clip box margin left
5586
  if(numPages < 2) {
5587
  clipBoxMarginLeft = leftNavWidth;
5588
  }
5589
  else {
5590
  availHorizSpace = bbWidth;
5591
+
5592
  if(this._rightNav) {
5593
  availHorizSpace -= rightNavWidth;
5594
  }
5600
  clipBoxMarginLeft = (availHorizSpace - pageWidth - horizontalSpacing)/2;
5601
  }
5602
  }
5603
+
5604
+ // Clip box margin top
5605
  if(numPages > 1 && !spaceEvenly) {
5606
 
5607
  availVerticalSpace = bbHeight;
5608
+
5609
  if(this._topNav) {
5610
  availVerticalSpace -= topNavHeight;
5611
  }
5612
  if(this._bottomNav) {
5613
  availVerticalSpace -= bottomNavHeight;
5614
  }
5615
+
5616
  clipBoxTop = (availVerticalSpace - (verticalSpacing + pageHeight))/2;
5617
  }
5618
+
5619
  // Set the info
5620
  this._bbHeight = bbHeight;
5621
  this._bbWidth = bbWidth;
5633
  this._horizontalSpacing = horizontalSpacing;
5634
  this._verticalSpacing = verticalSpacing;
5635
  this._activePageIndex = Math.floor(root.imageIndex/this._imagesPerPage);
5636
+
5637
  // Set back to the initial position.
5638
  bb.setStyle('position', bbPosition);
5639
  }
5640
+
5641
  }, {
5642
 
5643
  /**
5649
  * @static
5650
  */
5651
  CSS_PREFIX: 'fl-slideshow-thumbs',
5652
+
5653
  /**
5654
  * Static property used to define the default attribute configuration of
5655
  * the Widget.
5660
  * @static
5661
  */
5662
  ATTRS: {
5663
+
5664
  /**
5665
+ * The number of thumbnail columns. If set to auto, the number of
5666
  * columns will be calculated based on the width of the parent node.
5667
  *
5668
  * @attribute columns
5672
  columns: {
5673
  value: 'auto'
5674
  },
5675
+
5676
  /**
5677
+ * The number of thumbnail rows. If set to auto, the number of
5678
  * rows will be calculated based on the height of the parent node.
5679
  *
5680
  * @attribute rows
5684
  rows: {
5685
  value: 'auto'
5686
  },
5687
+
5688
  /**
5689
  * The horizontal spacing between thumbs.
5690
  *
5695
  horizontalSpacing: {
5696
  value: 15
5697
  },
5698
+
5699
  /**
5700
  * The vertical spacing between thumbs.
5701
  *
5706
  verticalSpacing: {
5707
  value: 15
5708
  },
5709
+
5710
  /**
5711
  * Whether to space the thumbs evenly within a page.
5712
  *
5717
  spaceEvenly: {
5718
  value: true
5719
  },
5720
+
5721
  /**
5722
  * Whether to center single pages of thumbs.
5723
  *
5728
  centerSinglePage: {
5729
  value: true
5730
  },
5731
+
5732
  /**
5733
  * Whether to pause the parent slideshow when a thumb is clicked.
5734
  *
5739
  pauseOnClick: {
5740
  value: false
5741
  },
5742
+
5743
  /**
5744
  * The type of transition to use between pages.
5745
  *
5750
  transition: {
5751
  value: 'slideHorizontal'
5752
  },
5753
+
5754
  /**
5755
  * The duration of the transition between pages.
5756
  *
5761
  transitionDuration: {
5762
  value: 0.8
5763
  },
5764
+
5765
  /**
5766
  * The type of transition easing to use between pages.
5767
+ *
5768
  * @attribute transitionEasing
5769
  * @type String
5770
  * @default ease-out
5772
  transitionEasing: {
5773
  value: 'ease-out'
5774
  },
5775
+
5776
  /**
5777
+ * The configuration object used to create new instances of
5778
  * FL.SlideshowImage. See the API docs for {@link FL.SlideshowImage}
5779
+ * for a complete list of configuration attributes.
5780
  *
5781
  * @attribute imageConfig
5782
  * @type Object
5789
  height: 50
5790
  }
5791
  },
5792
+
5793
  /**
5794
  * Whether to use the top nav or not.
5795
  *
5800
  topNavEnabled: {
5801
  value: false
5802
  },
5803
+
5804
  /**
5805
  * An array of button names used to render the top nav buttons.
5806
  *
5811
  topNavButtons: {
5812
  value: ['prevPage', 'nextPage']
5813
  },
5814
+
5815
  /**
5816
  * Whether to use the right nav or not.
5817
  *
5818
  * @attribute rightNavEnabled
5819
  * @type Boolean
5820
  * @default true
5821
+ */
5822
  rightNavEnabled: {
5823
  value: true
5824
  },
5825
+
5826
  /**
5827
  * An array of button names used to render the right nav buttons.
5828
  *
5833
  rightNavButtons: {
5834
  value: ['nextPage']
5835
  },
5836
+
5837
  /**
5838
  * Whether to use the bottom nav or not.
5839
  *
5844
  bottomNavEnabled: {
5845
  value: false
5846
  },
5847
+
5848
  /**
5849
  * An array of button names used to render the bottom nav buttons.
5850
  *
5855
  bottomNavButtons:{
5856
  value: ['prevPage', 'nextPage']
5857
  },
5858
+
5859
  /**
5860
  * Whether to use the left nav or not.
5861
  *
5866
  leftNavEnabled: {
5867
  value: true
5868
  },
5869
+
5870
  /**
5871
  * An array of button names used to render the left nav buttons.
5872
  *
5877
  leftNavButtons:{
5878
  value: ['prevPage']
5879
  },
5880
+
5881
  /**
5882
+ * Whether to use touch gestures, when available,
5883
  * to transition between pages or not.
5884
  *
5885
  * @attribute touchSupport
5902
  * @extends Base
5903
  */
5904
  Y.namespace('FL').SlideshowTransition = Y.Base.create('fl-slideshow-transition', Y.Base, [], {
5905
+
5906
  /**
5907
  * The transition function to use when run is called.
5908
  *
5912
  * @protected
5913
  */
5914
  _transitionFunction: '_transitionFade',
5915
+
5916
  /**
5917
  * The current transition type.
5918
  *
5924
  _type: 'fade',
5925
 
5926
  /**
5927
+ * Parses the transition type and sets the _transitionFunction
5928
  * used when run is called.
5929
  *
5930
  * @method initializer
5931
  * @protected
5932
+ */
5933
+ initializer: function()
5934
  {
5935
  var type = this.get('type'),
5936
  typeArray = [],
5940
  isSlideshowImage = this._isSlideshowImage(),
5941
  itemIn = this.get('itemIn'),
5942
  itemOut = this.get('itemOut');
5943
+
5944
  // Check for random transitions.
5945
  if(type.indexOf(',') > -1) {
5946
  typeArray = type.split(',');
5947
  typeArray.sort(function() { return 0.5 - Math.random(); });
5948
  type = typeArray[0];
5949
  }
5950
+
5951
  // Make sure we can run this transition, otherwise set a fallback.
5952
  if(!isSlideshowImage && isSlideshowImageTransition) {
5953
  type = 'fade';
5962
  }
5963
  }
5964
  }
5965
+
5966
  // Set the transition function and type.
5967
  if(Y.FL.SlideshowTransition.TYPES[type]) {
5968
  this._transitionFunction = types[type];
5969
  this._type = type;
5970
  }
5971
+
5972
  // Setup the items.
5973
  this._setupItems();
5974
  },
5975
+
5976
  /**
5977
  * Fires the start event and calls the transition function.
5978
  *
5979
  * @method run
5980
+ */
5981
  run: function()
5982
  {
5983
  /**
5984
  * Fires when the transition starts.
5985
  *
5986
  * @event start
5987
+ */
5988
  this.fire('start');
5989
+
5990
  this[this._transitionFunction].call(this);
5991
  },
5992
+
5993
  /**
5994
  * Set initial styles for the items.
5995
  *
5996
  * @method _setupItems
5997
  * @protected
5998
+ */
5999
  _setupItems: function()
6000
  {
6001
  var itemIn = this.get('itemIn'),
6004
  if(itemIn) {
6005
  itemIn.setStyle('zIndex', 2);
6006
  itemIn.setStyle('opacity', 1);
6007
+
6008
  if(Y.FL.Utils.cssSupport('transform')) {
6009
  itemIn.setStyle('transform', 'translate(0, 0)');
6010
  }
6017
  itemOut.setStyle('zIndex', 1);
6018
  }
6019
  },
6020
+
6021
  /**
6022
  * Checks if the transition is being run
6023
  * on an instance of FL.SlideshowImage or not.
6024
  *
6025
  * @method _isSlideshowImage
6026
  * @protected
6027
+ */
6028
  _isSlideshowImage: function()
6029
  {
6030
  var itemIn = this.get('itemIn'),
6031
  itemOut = this.get('itemOut');
6032
+
6033
  if(itemIn && itemIn.hasClass('fl-slideshow-image')) {
6034
  return true;
6035
  }
6036
  else if(itemOut && itemOut.hasClass('fl-slideshow-image')) {
6037
  return true;
6038
  }
6039
+
6040
  return false;
6041
  },
6042
+
6043
  /**
6044
  * Starts the transtion using the provided property objects.
6045
  *
6047
  * @param propsIn {Object} The properties to animate in.
6048
  * @param propsOut {Object} The properties to animate out.
6049
  * @protected
6050
+ */
6051
  _transitionStart: function(propsIn, propsOut)
6052
  {
6053
  var itemIn = this.get('itemIn'),
6056
  itemOutCallback = !itemIn ? itemInCallback : null,
6057
  duration = this.get('duration'),
6058
  easing = this.get('easing');
6059
+
6060
  if(itemIn) {
6061
  propsIn.duration = propsIn.duration || duration;
6062
  propsIn.easing = propsIn.easing || easing;
6067
  propsOut.easing = propsOut.easing || easing;
6068
  itemOut.transition(propsOut);
6069
  }
6070
+
6071
  if(itemInCallback) {
6072
  Y.later(propsIn.duration * 1000 + 100, null, itemInCallback);
6073
  }
6075
  Y.later(propsOut.duration * 1000 + 100, null, itemOutCallback);
6076
  }
6077
  },
6078
+
6079
  /**
6080
  * Clean up method called when the transition completes.
6081
  *
6082
  * @method _transitionComplete
6083
  * @protected
6084
+ */
6085
  _transitionComplete: function()
6086
  {
6087
  this._set('itemIn', null);
6088
  this._set('itemOut', null);
6089
+
6090
  /**
6091
  * Fires when the transition completes.
6092
  *
6093
  * @event complete
6094
+ */
6095
  this.fire('complete');
6096
  },
6097
+
6098
  /**
6099
  * No transition.
6100
  *
6101
  * @method _transitionNone
6102
  * @protected
6103
+ */
6104
  _transitionNone: function()
6105
  {
6106
  var itemIn = this.get('itemIn'),
6107
  itemOut = this.get('itemOut');
6108
+
6109
  if(itemIn) {
6110
  itemIn.setStyle('opacity', 1);
6111
  }
6112
  if(itemOut) {
6113
  itemOut.setStyle('opacity', 0);
6114
  }
6115
+
6116
  this._transitionComplete();
6117
  },
6118
+
6119
  /**
6120
  * Fade transition.
6121
  *
6122
  * @method _transitionFade
6123
  * @protected
6124
+ */
6125
  _transitionFade: function()
6126
  {
6127
  var itemIn = this.get('itemIn');
6129
  if(itemIn) {
6130
  itemIn.setStyle('opacity', 0);
6131
  }
6132
+
6133
  this._transitionStart({ opacity: 1 },{ opacity: 0 });
6134
  },
6135
+
6136
  /**
6137
  * Slide left transition.
6138
  *
6139
  * @method _transitionSlideLeft
6140
  * @protected
6141
+ */
6142
  _transitionSlideLeft: function()
6143
  {
6144
  if(Y.FL.Utils.cssSupport('transform')) {
6153
  this._jsTransitionSlide('left');
6154
  }
6155
  },
6156
+
6157
  /**
6158
  * Slide right transition.
6159
  *
6160
  * @method _transitionSlideRight
6161
  * @protected
6162
+ */
6163
  _transitionSlideRight: function()
6164
  {
6165
  if(Y.FL.Utils.cssSupport('transform')) {
6174
  this._jsTransitionSlide('right');
6175
  }
6176
  },
6177
+
6178
  /**
6179
  * Slide up transition.
6180
  *
6181
  * @method _transitionSlideUp
6182
  * @protected
6183
+ */
6184
  _transitionSlideUp: function()
6185
  {
6186
  if(Y.FL.Utils.cssSupport('transform')) {
6195
  this._jsTransitionSlide('up');
6196
  }
6197
  },
6198
+
6199
  /**
6200
  * Slide down transition.
6201
  *
6202
  * @method _transitionSlideDown
6203
  * @protected
6204
+ */
6205
  _transitionSlideDown: function()
6206
+ {
6207
  if(Y.FL.Utils.cssSupport('transform')) {
6208
  this._cssTransitionSlide({
6209
  inStart: 'translate(0, -100%)',
6216
  this._jsTransitionSlide('down');
6217
  }
6218
  },
6219
+
6220
  /**
6221
  * JavaScript slide transition.
6222
  *
6223
  * @method _jsTransitionSlide
6224
  * @protected
6225
+ */
6226
  _jsTransitionSlide: function(direction)
6227
  {
6228
  var itemIn = this.get('itemIn'),
6229
  itemOut = this.get('itemOut'),
6230
  itemOutEnd = 0;
6231
+
6232
  // Item Out
6233
  if(itemOut && direction == 'left') {
6234
  itemOutEnd = -parseInt(itemOut.getStyle('width'), 10);
6242
  if(itemOut && direction == 'down') {
6243
  itemOutEnd = parseInt(itemOut.getStyle('height'), 10);
6244
  }
6245
+
6246
  // Item In
6247
  if(itemIn) {
6248
  itemIn.setStyle('opacity', 1);
6259
  if(itemIn && direction == 'down') {
6260
  itemIn.setStyle('top', '-' + itemIn.getStyle('height'));
6261
  }
6262
+
6263
  // Transition Start
6264
  if(direction == 'left' || direction == 'right') {
6265
  this._transitionStart({ left: 0 },{ left: itemOutEnd });
6268
  this._transitionStart({ top: 0 },{ top: itemOutEnd });
6269
  }
6270
  },
6271
+
6272
  /**
6273
  * CSS slide transition.
6274
  *
6275
  * @method _cssTransitionSlide
6276
  * @protected
6277
+ */
6278
  _cssTransitionSlide: function(props)
6279
+ {
6280
  var itemIn = this.get('itemIn'),
6281
  itemOut = this.get('itemOut'),
6282
  transformProp = Y.UA.chrome < 36 ? 'transform' : '-webkit-transform',
6283
  inProps = {},
6284
  outProps = {};
6285
+
6286
  inProps[transformProp] = props.inEnd;
6287
  outProps[transformProp] = props.outEnd;
6288
 
6295
  itemOut.setStyle('transition', '');
6296
  itemOut.setStyle(transformProp, props.outStart);
6297
  }
6298
+
6299
  this._transitionStart(inProps, outProps);
6300
  },
6301
+
6302
  /**
6303
  * Bars and blinds transition.
6304
  *
6305
  * @method _transitionBars
6306
  * @protected
6307
+ */
6308
  _transitionBars: function()
6309
  {
6310
  // Hide the image until the slices have transitioned in.
6311
  this.get('itemIn').one('.fl-slideshow-image-img').setStyle('opacity', 0);
6312
+
6313
  var numBars = this.get('bars'),
6314
  slices = this._renderSlices(1, numBars),
6315
  duration = this.get('duration'),
6318
  last = false,
6319
  i = 0,
6320
  clone = null,
6321
+ props = {
6322
  duration: duration,
6323
  opacity: 1
6324
  };
6325
+
6326
  // barsRandom
6327
  if(this._type == 'barsRandom') {
6328
  slices = this._randomizeSlices(slices);
6330
 
6331
  // Transition the slices.
6332
  for( ; i < slices.length; i++) {
6333
+
6334
  // Make a clone of our transition properties.
6335
  clone = Y.clone(props);
6336
+
6337
  // blinds
6338
  if(this._type == 'blinds') {
6339
  clone.width = parseFloat(slices[i].getComputedStyle('width'), 10) + 'px';
6340
  slices[i].setStyle('width', '0px');
6341
  increment = 50;
6342
  }
6343
+
6344
  // Run the transition.
6345
  last = i == slices.length - 1 ? true : false;
6346
  Y.later(delay, this, this._transitionSlice, [slices[i], clone, last]);
6347
  delay += increment;
6348
  }
6349
+
6350
  this._transitionSlicesFadeLast(delay);
6351
  },
6352
 
6355
  *
6356
  * @method _transitionBoxes
6357
  * @protected
6358
+ */
6359
  _transitionBoxes: function()
6360
  {
6361
  // Hide the image until the slices have transitioned in.
6362
  this.get('itemIn').one('.fl-slideshow-image-img').setStyle('opacity', 0);
6363
+
6364
  var numCols = this.get('boxCols'),
6365
  numRows = this.get('boxRows'),
6366
  numSlices = numCols * numRows,
6375
  col = 0,
6376
  startCol = -1,
6377
  clone = null,
6378
+ props = {
6379
  duration: duration,
6380
  opacity: 1
6381
  };
6382
+
6383
  // boxesRandom
6384
  if(!multi) {
6385
+
6386
  slices = this._randomizeSlices(slices);
6387
  increment = 30;
6388
+
6389
  for( ; i < slices.length; i++) {
6390
  clone = Y.clone(props);
6391
  last = i == slices.length - 1 ? true : false;
6404
  if(col > -1 && col < numCols) {
6405
  i++;
6406
  clone = Y.clone(props);
6407
+
6408
  // boxesGrow
6409
  if(this._type == 'boxesGrow') {
6410
  clone.height = parseFloat(slices[row][col].getComputedStyle('height'), 10) + 'px';
6413
  slices[row][col].setStyle('width', '0px');
6414
  increment = 50;
6415
  }
6416
+
6417
  last = i == numSlices - 1 ? true : false;
6418
  Y.later(delay, this, this._transitionSlice, [slices[row][col], clone, last]);
6419
  }
6422
  delay += increment;
6423
  }
6424
  }
6425
+
6426
  this._transitionSlicesFadeLast(delay);
6427
  },
6428
+
6429
  /**
6430
  * Renders the divs for slice based transitions.
6431
  *
6432
  * @method _renderSlices
6433
  * @protected
6434
+ */
6435
  _renderSlices: function(numRows, numCols, multidimensional)
6436
  {
6437
  var itemIn = this.get('itemIn'),
6452
  slices = [];
6453
 
6454
  for( ; row < numRows; row++) {
6455
+
6456
  if(typeof multidimensional !== 'undefined' && multidimensional) {
6457
  slices[row] = [];
6458
  }
6459
  for(col = 0; col < numCols; col++) {
6460
+
6461
  slice = Y.Node.create('<div class="fl-slideshow-transition-slice"></div>');
6462
  sliceImg = Y.Node.create('<img src="'+ imgSrc +'" />');
6463
+
6464
  slice.setStyles({
6465
  left: (sliceWidth * col) + 'px',
6466
+ top: (sliceHeight * row) + 'px',
6467
  width: col == numCols - 1 ? (itemWidth - (sliceWidth * col)) + 'px' : sliceWidth + 'px',
6468
  height: row == numRows - 1 ? (itemHeight - (sliceHeight * row)) + 'px' : sliceHeight + 'px',
6469
  opacity: 0
6470
  });
6471
+
6472
  sliceImg.setStyles({
6473
  height: imgHeight + 'px',
6474
  width: imgWidth + 'px',
6475
  top: imgTop - ((sliceHeight + (row * sliceHeight)) - sliceHeight) + 'px',
6476
  left: imgLeft - ((sliceWidth + (col * sliceWidth)) - sliceWidth) + 'px'
6477
  });
6478
+
6479
  slice.append(sliceImg);
6480
  itemIn.append(slice);
6481
+
6482
  if(typeof multidimensional !== 'undefined' && multidimensional) {
6483
  slices[row].push(slice);
6484
  }
6490
 
6491
  return slices;
6492
  },
6493
+
6494
  /**
6495
  * Fade the itemOut node.
6496
  *
6497
  * @method _transitionSlicesFadeLast
6498
  * @protected
6499
+ */
6500
  _transitionSlicesFadeLast: function(delay)
6501
  {
6502
  var itemOut = this.get('itemOut');
6503
+
6504
  if(itemOut && !itemOut.hasClass('fl-slideshow-image-cropped')) {
6505
  itemOut.transition({
6506
  duration: delay/1000 + this.get('duration'),
6508
  });
6509
  }
6510
  },
6511
+
6512
  /**
6513
  * Transitions a single slice.
6514
  *
6515
  * @method _transitionSlice
6516
  * @protected
6517
+ */
6518
  _transitionSlice: function(slice, props, last)
6519
  {
6520
  var callback = last ? Y.bind(this._transitionSlicesComplete, this) : null;
6521
+
6522
  slice.transition(props, callback);
6523
  },
6524
+
6525
  /**
6526
  * Complete callback for slice based transitions.
6527
  *
6528
  * @method _transitionSlicesComplete
6529
  * @protected
6530
+ */
6531
  _transitionSlicesComplete: function()
6532
  {
6533
  var itemIn = this.get('itemIn');
6534
+
6535
  itemIn.all('.fl-slideshow-transition-slice').remove();
6536
  itemIn.one('.fl-slideshow-image-img').setStyle('opacity', 1);
6537
  this._transitionComplete();
6538
  },
6539
+
6540
  /**
6541
  * Randomizes a slices array.
6542
  *
6543
  * @method _radomizeSlices
6544
  * @protected
6545
+ */
6546
  _randomizeSlices: function(slices)
6547
  {
6548
  var i = slices.length, j, temp;
6549
+
6550
  if(i === 0) {
6551
  return;
6552
  }
6556
  slices[i] = slices[j];
6557
  slices[j] = temp;
6558
  }
6559
+
6560
  return slices;
6561
  },
6562
+
6563
  _transitionKenBurns: function()
6564
  {
6565
+ var kbDuration = this.get('kenBurnsDuration'),
6566
  duration = this.get('duration'),
6567
  itemIn = this.get('itemIn'),
6568
  zoom = this.get('kenBurnsZoom');
6569
+
6570
  this._transitionFade();
6571
 
6572
  (new Y.FL.SlideshowKenBurns({
6577
  }
6578
 
6579
  }, {
6580
+
6581
  /**
6582
  * Static property used to define the default attribute configuration of
6583
  * the Widget.
6599
  itemIn: {
6600
  value: null
6601
  },
6602
+
6603
  /**
6604
  * The Node to transition out.
6605
  *
6610
  itemOut: {
6611
  value: null
6612
  },
6613
+
6614
  /**
6615
  * The duration of the transition in seconds.
6616
  *
6621
  duration: {
6622
  value: 0.5
6623
  },
6624
+
6625
  /**
6626
  * The type of easing to use.
6627
  *
6632
  easing: {
6633
  value: 'ease-out'
6634
  },
6635
+
6636
  /**
6637
  * The type of transition to use.
6638
  *
6643
  type: {
6644
  value: 'fade'
6645
  },
6646
+
6647
  /**
6648
+ * The number of bars to use for
6649
  * transitions such as blinds.
6650
  *
6651
  * @attribute bars
6655
  bars: {
6656
  value: 15
6657
  },
6658
+
6659
  /**
6660
+ * The number of columns to use for
6661
  * transitions such as boxes.
6662
  *
6663
  * @attribute boxCols
6667
  boxCols: {
6668
  value: 8
6669
  },
6670
+
6671
  /**
6672
+ * The number of rows to use for
6673
  * transitions such as boxes.
6674
  *
6675
  * @attribute boxRows
6679
  boxRows: {
6680
  value: 4
6681
  },
6682
+
6683
  /**
6684
+ * The duration the ken burns effect will
6685
  * last, measured in seconds.
6686
  *
6687
  * @attribute kenBurnsDuration
6688
+ * @type Number
6689
  * @default 4
6690
+ */
6691
  kenBurnsDuration: {
6692
  value: 4
6693
  },
6694
+
6695
  /**
6696
  * The amount of zoom to use for the Ken Burns effect.
6697
  *
6698
  * @attribute kenBurnsZoom
6699
+ * @type Number
6700
  * @default 1.2
6701
+ */
6702
  kenBurnsZoom: {
6703
  value: 1.2
6704
  }
6705
  },
6706
+
6707
  /**
6708
  * The types of transitions and associated functions.
6709
  *
6712
  * @readOnly
6713
  * @protected
6714
  * @static
6715
+ */
6716
  TYPES: {
6717
  fade: '_transitionFade',
6718
  none: '_transitionNone',
6728
  boxesGrow: '_transitionBoxes',
6729
  kenBurns: '_transitionKenBurns'
6730
  },
6731
+
6732
  /**
6733
  * The types of transitions that can only be
6734
  * run on FL.SlideshowImage widgets.
6738
  * @readOnly
6739
  * @protected
6740
  * @static
6741
+ */
6742
  SLIDESHOW_IMAGE_TYPES: [
6743
  'blinds',
6744
  'bars',
6752
 
6753
  /**
6754
  * A highly configurable slideshow widget.
6755
+ *
6756
  * @namespace FL
6757
  * @class Slideshow
6758
  * @constructor
6769
  * @default null
6770
  */
6771
  frame: null,
6772
+
6773
  /**
6774
  * A FL.SlideshowNav instance used for the main nav.
6775
  *
6778
  * @default null
6779
  */
6780
  nav: null,
6781
+
6782
  /**
6783
  * A FL.SlideshowNav instance used for the image nav's left button.
6784
  *
6787
  * @default null
6788
  */
6789
  imageNavLeft: null,
6790
+
6791
  /**
6792
  * A FL.SlideshowNav instance used for the image nav's right button.
6793
  *
6796
  * @default null
6797
  */
6798
  imageNavRight: null,
6799
+
6800
  /**
6801
  * A FL.SlideshowThumbs instance used for the thumbnail grid.
6802
+ *
6803
  * @property thumbs
6804
  * @type FL.SlideshowThumbs
6805
  * @default null
6806
  */
6807
  thumbs: null,
6808
+
6809
  /**
6810
  * A FL.SlideshowThumbs instance used for the vertical thumbnail grid.
6811
+ *
6812
  * @property verticalThumbs
6813
  * @type FL.SlideshowThumbs
6814
  * @default null
6815
  */
6816
  verticalThumbs: null,
6817
+
6818
  /**
6819
  * A FL.SlideshowCaption instance.
6820
+ *
6821
  * @property caption
6822
  * @type FL.SlideshowCaption
6823
  * @default null
6824
  */
6825
  caption: null,
6826
+
6827
  /**
6828
  * A FL.SlideshowSocial instance.
6829
+ *
6830
  * @property social
6831
  * @type FL.SlideshowSocial
6832
  * @default null
6833
  */
6834
  social: null,
6835
+
6836
  /**
6837
+ * A FL.SlideshowImage instance used to preload
6838
  * the next image.
6839
  *
6840
  * @property _nextImagePreloader
6843
  * @protected
6844
  */
6845
  _nextImagePreloader: null,
6846
+
6847
  /**
6848
  * An object that holds the initial nav settings
6849
  * when the mini nav has been enabled for a responsive layout.
6871
  protect: this.get('protect'),
6872
  upsize: this.get('upsize')
6873
  };
6874
+
6875
  // Preloader
6876
  this._nextImagePreloader = new Y.FL.SlideshowImage(imageConfig);
6877
+
6878
  // Nav buttons not needed for touch
6879
  if(this._isMobile()) {
6880
  this._removeNavButton('prevPage');
6881
  this._removeNavButton('nextPage');
6882
  this._removeNavButton('fullscreen');
6883
  }
6884
+
6885
  // Fullscreen
6886
  if(this._hasNavButton('fullscreen')) {
6887
  if(Y.FL.SlideshowFullscreen.OS_SUPPORT) {
6894
  },
6895
 
6896
  /**
6897
+ * Calls the FL.SlideshowBase superclass renderUI method
6898
  * and renders the child widgets.
6899
  *
6900
  * @method renderUI
6903
  renderUI: function()
6904
  {
6905
  Y.FL.Slideshow.superclass.renderUI.apply(this, arguments);
6906
+
6907
  this._renderFrame();
6908
  this._renderVerticalThumbs();
6909
  this._renderNavAndThumbs();
6912
  this._renderCaption();
6913
  this._renderSocial();
6914
  },
6915
+
6916
  /**
6917
+ * Calls the FL.SlideshowBase superclass bindUI method, binds
6918
+ * _resizeChildWidgets to fire after the resize method inherited
6919
  * from FL.SlideshowBase, shows the loading image, binds overlay events
6920
  * and binds an event to load an image into the frame.
6921
  *
6930
  navType = this.get('navType'),
6931
  nav = this._getNav(),
6932
  clickAction = this.get('clickAction');
6933
+
6934
  // Call superclass bindUI
6935
  Y.FL.Slideshow.superclass.bindUI.apply(this, arguments);
6936
+
6937
  // Resize child widgets after the superclass resize method.
6938
  Y.Do.after(this._resizeChildWidgets, this, 'resize');
6939
+
6940
  // Loading events
6941
  this.on('albumLoadStart', this._albumLoadStart, this);
6942
  this.on('albumLoadComplete', this._albumLoadComplete, this);
6943
  this.on('imageLoadComplete', this._loadFrame, this);
6944
+
6945
  // Loading image
6946
  if(this.get('loadingImageAlwaysEnabled')) {
6947
  this.frame.on('transitionInit', Y.bind(this._showLoadingImageWithDelay, this));
6948
  this.frame.on('transitionStart', Y.bind(this._hideLoadingImage, this));
6949
  }
6950
+
6951
  // Overlay events
6952
  if(this.get('overlayHideOnMousemove')) {
6953
  if(nav && navOverlay) {
6959
  ssBB.on('mouseleave', Y.bind(this._hideAllOverlays, this));
6960
  }
6961
  }
6962
+
6963
  ssBB.delegate('click', Y.bind(this._overlayCloseClick, this), '.fl-slideshow-overlay-close');
6964
+
6965
  // Click action
6966
  if(clickAction == 'gallery' || clickAction == 'url') {
6967
  frameBB.delegate('click', Y.bind(this._frameClick, this), '.fl-slideshow-image-img');
6968
  }
6969
  },
6970
+
6971
  /**
6972
  * Calls the FL.SlideshowBase superclass syncUI method
6973
  * and makes the bounding box unselectable.
6978
  syncUI: function()
6979
  {
6980
  var bb = this.get('boundingBox');
6981
+
6982
  Y.FL.Slideshow.superclass.syncUI.apply(this, arguments);
6983
 
6984
  bb._node.onselectstart = function() { return false; };
6985
  bb._node.unselectable = "on";
6986
  bb._node.style.MozUserSelect = "none";
6987
+
6988
  if(this.get('clickAction') != 'none') {
6989
  this.frame.get('boundingBox').addClass('fl-click-action-enabled');
6990
  }
6997
  * @access private
6998
  * @method _isMobile
6999
  * @return {Boolean}
7000
+ */
7001
  _isMobile: function()
7002
  {
7003
  return /Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test( navigator.userAgent );
7004
  },
7005
+
7006
  /**
7007
+ * Unload all slideshow images and pause
7008
  * the slideshow.
7009
  *
7010
  * @method unload
7013
  {
7014
  this.pause();
7015
  this.frame.unload();
7016
+
7017
  if(this.thumbs !== null) {
7018
  this.thumbs.unload();
7019
  }
7020
  },
7021
+
7022
  /**
7023
  * @method _albumLoadStart
7024
  * @protected
7027
  {
7028
  this._showLoadingImage();
7029
  },
7030
+
7031
  /**
7032
  * @method _albumLoadComplete
7033
  * @protected
7036
  {
7037
  this.frame.once('transitionStart', Y.bind(this._hideLoadingImage, this));
7038
  },
7039
+
7040
  /**
7041
  * Resizes all enabled child widgets.
7042
  *
7048
  var bb = this.get('boundingBox'),
7049
  cb = this.get('contentBox'),
7050
  imageNavEnabled = this.get('imageNavEnabled');
7051
+
7052
  this._renderNavAndThumbs();
7053
+
7054
  if(this.get('verticalThumbsOverlay')) {
7055
  this._resizeFrame(cb.get('offsetWidth'), bb.get('offsetHeight'));
7056
  this._resizeVerticalThumbs();
7063
  if(imageNavEnabled) {
7064
  this._positionImageNav();
7065
  }
7066
+
7067
  this._positionLoadingImage();
7068
  },
7069
 
7070
  /**
7071
  * @method _renderVerticalThumbs
7072
  * @protected
7073
+ */
7074
  _renderVerticalThumbs: function()
7075
  {
7076
  var threshold = this.get('responsiveThreshold'),
7077
  ssBB = this.get('boundingBox'),
7078
+ bbWidth = ssBB.get('offsetWidth'),
7079
  vtBB;
7080
 
7081
  if(this.get('verticalThumbsEnabled') && bbWidth > threshold) {
7082
 
7083
+ this.verticalThumbs = new Y.FL.SlideshowThumbs(this._getVerticalThumbsConfig());
7084
  this.add(this.verticalThumbs);
7085
  this.verticalThumbs.render(ssBB);
7086
+
7087
  vtBB = this.verticalThumbs.get('boundingBox');
7088
  vtBB.addClass('fl-slideshow-vertical-thumbs');
7089
  vtBB.setStyle(this.get('verticalThumbsPosition'), 0);
7090
  ssBB.append(vtBB);
7091
+
7092
  if(this.get('verticalThumbsOverlay')) {
7093
  this.verticalThumbs.plug(Y.FL.SlideshowOverlay, {
7094
  hideDelay: this.get('overlayHideDelay'),
7095
  hideStyle: 'left'
7096
  });
7097
+
7098
  this.frame.get('boundingBox').append(vtBB);
7099
  this.verticalThumbs.resize();
7100
  }
7102
  this.verticalThumbs.resize();
7103
  this._adjustContentForVerticalThumbs();
7104
  }
7105
+
7106
  this._bindVerticalThumbs();
7107
  }
7108
  },
7109
+
7110
  /**
7111
+ * Prepares and returns the vertical thumbs config object.
7112
+ *
7113
  * @method _getVerticalThumbsConfig
7114
  * @protected
7115
  * @returns Object
7141
  height: attrs.verticalThumbsImageHeight
7142
  }
7143
  };
7144
+
7145
  return config;
7146
  },
7147
+
7148
  _bindVerticalThumbs: function()
7149
  {
7150
  var ssBB = this.get('boundingBox'),
7151
  hideOnMouse = this.get('overlayHideOnMousemove'),
7152
  vtOverlay = this.get('verticalThumbsOverlay'),
7153
  vt = this.verticalThumbs;
7154
+
7155
  if(vt && hideOnMouse && vtOverlay) {
7156
  this.frame.once('transitionComplete', vt.slideshowOverlay.hideWithTimer, vt.slideshowOverlay);
7157
  ssBB.on('mousemove', Y.bind(this._toggleVerticalThumbs, this));
7158
  ssBB.on('mouseenter', Y.bind(this._toggleVerticalThumbs, this));
7159
  }
7160
  },
7161
+
7162
  /**
7163
  * Resizes the vertical thumbs.
7164
+ *
7165
  * @method _resizeVerticalThumbs
7166
  * @protected
7167
  */
7176
  navType,
7177
  nav,
7178
  navBB;
7179
+
7180
  if(vtEnabled) {
7181
  vtOverlay = this.get('verticalThumbsOverlay');
7182
  threshold = this.get('responsiveThreshold');
7185
  navOverlay = this.get('navOverlay');
7186
  navType = this.get('navType');
7187
  nav = this._getNav();
7188
+
7189
  if(this.verticalThumbs && bbWidth > threshold) {
7190
+
7191
  this.verticalThumbs.get('boundingBox').setStyle('display', 'block');
7192
  this.verticalThumbs.resize();
7193
+
7194
  if(!vtOverlay) {
7195
  this._adjustContentForVerticalThumbs();
7196
  }
7197
  else if(nav && navOverlay) {
7198
+
7199
  navBB = nav.get('boundingBox');
7200
+
7201
  if(navType == 'thumbs') {
7202
  this._adjustOverlayForVerticalThumbs(navBB, true);
7203
  this.thumbs.resize();
7211
  this._renderVerticalThumbs();
7212
  }
7213
  else if(this.verticalThumbs && bbWidth <= threshold) {
7214
+
7215
  this.verticalThumbs.get('boundingBox').setStyle('display', 'none');
7216
+
7217
  if(!vtOverlay) {
7218
  this.get('contentBox').setStyles({
7219
  left: 'auto',
7225
  }
7226
  }
7227
  },
7228
+
7229
  /**
7230
  * Toggles the visibility of the vertical thumbs.
7231
+ *
7232
  * @method _toggleVerticalThumbs
7233
  * @protected
7234
  */
7243
  }
7244
  }
7245
  },
7246
+
7247
  /**
7248
  * Adjusts the content position and width
7249
  * for the vertical thumbs.
7250
+ *
7251
  * @method _adjustContentForVerticalThumbs
7252
  * @protected
7253
  */
7259
  ssCB = this.get('contentBox'),
7260
  cbPos = vtPos == 'left' ? 'right' : 'left',
7261
  cbWidth = ssBB.get('offsetWidth') - vtBB.get('offsetWidth');
7262
+
7263
  ssCB.setStyle('position', 'absolute');
7264
  ssCB.setStyle(cbPos, 0);
7265
  ssCB.setStyle('width', cbWidth);
7266
  },
7267
+
7268
  /**
7269
  * Adjusts an overlay's position for the vertical
7270
  * thumbs when they are overlaid as well.
7271
+ *
7272
  * @method _adjustOverlayForVerticalThumbs
7273
  * @protected
7274
  */
7280
  vtPos = null,
7281
  margin = typeof useMargin === 'undefined' ? '' : 'margin-',
7282
  vtWidth = 0;
7283
+
7284
  if(this.verticalThumbs && vtEnabled && vtOverlay) {
7285
  vtBB = this.verticalThumbs.get('boundingBox');
7286
  vtWidth = vtBB.get('offsetWidth');
7294
  }
7295
  }
7296
  },
7297
+
7298
  /**
7299
+ * Creates and renders a new instance of FL.SlideshowFrame
7300
  * used for the main image.
7301
  *
7302
  * @method _renderFrame
7317
  },
7318
  touchSupport: this.get('touchSupport')
7319
  });
7320
+
7321
  this.add(this.frame);
7322
  this.frame.render(this.get('contentBox'));
7323
  this.frame.get('boundingBox').addClass('fl-slideshow-main-image');
7324
  this._setPlayingTimerEvent(this.frame, 'transitionComplete');
7325
  this._loadingImageContainer = this.frame.get('contentBox');
7326
  },
7327
+
7328
  /**
7329
  * Resizes the frame used for the main image.
7330
  *
7337
  {
7338
  var navOverlay = this.get('navOverlay'),
7339
  nav = this._getNav();
7340
+
7341
  if(nav && !navOverlay) {
7342
  height -= parseInt(nav.get('boundingBox').getComputedStyle('height'), 10);
7343
  }
7344
+
7345
  this.frame.resize(width, height);
7346
  },
7347
+
7348
  /**
7349
  * Called when the imageLoadComplete event fires.
7350
  * Loads an image into the frame and preloads the next image.
7360
  nextIndex = activeIndex + 1 >= images.length ? 0 : activeIndex + 1,
7361
  width = this.frame.get('width'),
7362
  height = this.frame.get('height');
7363
+
7364
  // Load the frame.
7365
  this.frame.load(e.imageInfo);
7366
+
7367
  // Remove main preload images from the load queue.
7368
  Y.FL.SlideshowImageLoader.removeGroup('main-preload');
7369
+
7370
  // Preload the next image.
7371
  this._nextImagePreloader.preload(images[nextIndex], width, height);
7372
  },
7373
+
7374
  /**
7375
  * Fired when the frame img tag is clicked.
7376
+ *
7377
  * @method _frameClick
7378
  * @protected
7379
+ */
7380
  _frameClick: function()
7381
  {
7382
  var clickAction = this.get('clickAction'),
7383
  clickActionUrl = this.get('clickActionUrl');
7384
+
7385
  if(clickAction == 'url') {
7386
  window.location.href = clickActionUrl;
7387
  }
7389
  window.location.href = this.imageInfo.link;
7390
  }
7391
  },
7392
+
7393
  /**
7394
  * Sets attributes to display a compact nav
7395
  * for responsive layouts.
7396
+ *
7397
  * @method _initMiniNav
7398
  * @protected
7399
  */
7425
  if(this._hasNavButton('next')) {
7426
  buttons.push('next');
7427
  }
7428
+
7429
  this._initialNavSettings = {
7430
  buttons: this.get('navButtons'),
7431
  buttonsLeft: this.get('navButtonsLeft'),
7432
  buttonsRight: this.get('navButtonsRight'),
7433
  type: this.get('navType')
7434
  };
7435
+
7436
  this._set('navButtons', buttons);
7437
  this._set('navButtonsLeft', []);
7438
  this._set('navButtonsRight', []);
7439
  this._set('navType', 'buttons');
7440
  },
7441
+
7442
  /**
7443
+ * Renders the nav and thumbs layout based on the
7444
  * current window size.
7445
+ *
7446
  * @method _renderNavAndThumbs
7447
  * @protected
7448
  */
7456
  if(navType == 'buttons' || navType == 'thumbs') {
7457
  bbWidth = this.get('boundingBox').get('offsetWidth');
7458
  threshold = this.get('responsiveThreshold');
7459
+
7460
  if(bbWidth <= threshold && this._initialNavSettings === null) {
7461
  this._initMiniNav();
7462
  renderNav = true;
7469
  this._initialNavSettings = null;
7470
  renderNav = true;
7471
  }
7472
+
7473
  // Button nav
7474
  if(renderNav || this.nav === null) {
7475
  this._renderNav();
7476
  }
7477
+
7478
  // Thumbs nav
7479
  if(renderNav || this.thumbs === null) {
7480
  this._renderThumbs();
7482
  else if(this._thumbsEnabled()) {
7483
  this._resizeThumbs();
7484
  }
7485
+
7486
  // Caption
7487
  if(renderNav && this.caption !== null) {
7488
  this._syncCaption();
7489
  }
7490
+
7491
  // Social
7492
  if(renderNav && this.social !== null) {
7493
  this._syncSocial();
7494
  }
7495
  }
7496
  },
7497
+
7498
  /**
7499
+ * Creates and renders a new instance of FL.SlideshowNav
7500
  * used for the main nav.
7501
+ *
7502
  * @method _renderNav
7503
  * @protected
7504
  */
7508
  navBB = null,
7509
  navOverlay = this.get('navOverlay'),
7510
  navPosition = this.get('navPosition');
7511
+
7512
  // Destroy old instances
7513
  this._destroyNav();
7514
+
7515
  // Create a new instance
7516
  if(this.get('navType') == 'buttons') {
7517
+
7518
  // Create the nav
7519
+ this.nav = new Y.FL.SlideshowNav({
7520
  buttons: this.get('navButtons'),
7521
  buttonsLeft: this.get('navButtonsLeft'),
7522
  buttonsRight: this.get('navButtonsRight')
7523
  });
7524
+
7525
  // Add to widget parent and render
7526
  this.add(this.nav);
7527
  this.nav.render(this.get('contentBox'));
7528
  navBB = this.nav.get('boundingBox');
7529
+
7530
  // Plug overlay?
7531
  if(navOverlay) {
7532
  this.nav.plug(Y.FL.SlideshowOverlay, {
7533
  hideDelay: this.get('overlayHideDelay')
7534
  });
7535
+
7536
  navBB.setStyle('position', 'absolute');
7537
  navBB.setStyle(navPosition, '0px');
7538
  }
7539
+
7540
  // Insert
7541
  if(navPosition == 'top') {
7542
  frameBB.insert(navBB, 'before');
7544
  else {
7545
  frameBB.insert(navBB, 'after');
7546
  }
7547
+
7548
  // CSS class name
7549
  navBB.addClass('fl-slideshow-main-nav');
7550
  }
7552
 
7553
  /**
7554
  * Destroy the current nav instance.
7555
+ *
7556
  * @method _destroyNav
7557
  * @protected
7558
+ */
7559
  _destroyNav: function()
7560
  {
7561
  if(this.nav !== null) {
7562
  if(this.nav.slideshowOverlay) {
7563
  this.nav.slideshowOverlay.destroy();
7564
  }
7565
+
7566
  this.nav.get('boundingBox').remove();
7567
  this.remove(this.nav);
7568
  try { this.nav.destroy(true); } catch(e) {}
7569
  this.nav = null;
7570
  }
7571
  },
7572
+
7573
  /**
7574
  * Returns the nav object or null if navType is
7575
  * set to none or custom.
7576
+ *
7577
  * @method _getNav
7578
  * @protected
7579
  */
7580
  _getNav: function()
7581
  {
7582
  var navType = this.get('navType');
7583
+
7584
  if(navType == 'buttons') {
7585
  return this.nav;
7586
  }
7591
  return null;
7592
  }
7593
  },
7594
+
7595
  /**
7596
+ * Toggles the visibility of the nav or thumbs nav
7597
  * if navOverlay is set to true.
7598
+ *
7599
  * @method _toggleNav
7600
  * @protected
7601
  */
7602
  _toggleNav: function()
7603
  {
7604
  var nav = this._getNav();
7605
+
7606
  if(nav.slideshowOverlay) {
7607
  if(nav.slideshowOverlay._visible) {
7608
  nav.slideshowOverlay.hideWithTimer();
7612
  }
7613
  }
7614
  },
7615
+
7616
  /**
7617
+ * Creates and renders two instances of FL.SlideshowNav for the
7618
+ * prev and next button that will be overlaid on the main image.
7619
+ *
7620
  * @method _renderImageNav
7621
  * @protected
7622
  */
7623
  _renderImageNav: function()
7624
  {
7625
  var ssBB;
7626
+
7627
  if(this.get('imageNavEnabled')) {
7628
  if(this._isMobile()) {
7629
  this._set('imageNavEnabled', false);
7630
  }
7631
  else {
7632
  ssBB = this.get('boundingBox');
7633
+
7634
+ this.imageNavLeft = new Y.FL.SlideshowNav({
7635
  buttons: ['prev'],
7636
  useFontIcons: false
7637
  });
7638
+
7639
+ this.imageNavRight = new Y.FL.SlideshowNav({
7640
  buttons: ['next'],
7641
  useFontIcons: false
7642
  });
7643
+
7644
  this.add(this.imageNavLeft);
7645
  this.add(this.imageNavRight);
7646
+
7647
  this.imageNavLeft.render(this.frame.get('boundingBox'));
7648
  this.imageNavRight.render(this.frame.get('boundingBox'));
7649
+
7650
  this.imageNavLeft.plug(Y.FL.SlideshowOverlay, { hideDelay: this.get('overlayHideDelay') });
7651
  this.imageNavRight.plug(Y.FL.SlideshowOverlay, { hideDelay: this.get('overlayHideDelay') });
7652
+
7653
  if(this.get('overlayHideOnMousemove')) {
7654
  this.frame.once('transitionComplete', this.imageNavLeft.slideshowOverlay.hideWithTimer, this.imageNavLeft.slideshowOverlay);
7655
  this.frame.once('transitionComplete', this.imageNavRight.slideshowOverlay.hideWithTimer, this.imageNavRight.slideshowOverlay);
7656
  ssBB.on('mousemove', Y.bind(this._toggleImageNav, this));
7657
  ssBB.on('mouseenter', Y.bind(this._toggleImageNav, this));
7658
  }
7659
+
7660
  this.imageNavLeft.get('boundingBox').addClass('fl-slideshow-image-nav-left');
7661
  this.imageNavRight.get('boundingBox').addClass('fl-slideshow-image-nav-right');
7662
  }
7663
  }
7664
  },
7665
+
7666
  /**
7667
  * @method _positionImageNav
7668
  * @protected
7678
  top: top + 'px',
7679
  display: 'block'
7680
  };
7681
+
7682
  leftBB.setStyles(styles);
7683
  rightBB.setStyles(styles);
7684
+
7685
  this._adjustOverlayForVerticalThumbs(leftBB);
7686
  this._adjustOverlayForVerticalThumbs(rightBB);
7687
  },
7688
+
7689
  /**
7690
  * Toggles the visibility of the image nav buttons.
7691
+ *
7692
  * @method _toggleImageNav
7693
  * @protected
7694
  */
7700
  else {
7701
  this.imageNavLeft.slideshowOverlay.show();
7702
  }
7703
+
7704
  if(this.imageNavRight.slideshowOverlay._visible) {
7705
  this.imageNavRight.slideshowOverlay.hideWithTimer();
7706
  }
7708
  this.imageNavRight.slideshowOverlay.show();
7709
  }
7710
  },
7711
+
7712
  /**
7713
  * @method _renderMouseNav
7714
  * @protected
7721
  });
7722
  }
7723
  },
7724
+
7725
  /**
7726
  * Checks whether the thumbs are enabled.
7727
+ *
7728
  * @method _thumbsEnabled
7729
  * @protected
7730
  * @returns Boolean
7732
  _thumbsEnabled: function()
7733
  {
7734
  var navType = this.get('navType');
7735
+
7736
  if(navType == 'thumbs') {
7737
  return true;
7738
  }
7743
  return false;
7744
  }
7745
  },
7746
+
7747
  /**
7748
  * Creates and renders a new instance of FL.SlideshowThumbs.
7749
+ *
7750
  * @method _renderThumbs
7751
  * @protected
7752
  */
7753
  _renderThumbs: function()
7754
  {
7755
  var frameBB, navOverlay, navPosition, navType;
7756
+
7757
  // Destroy old instances
7758
  this._destroyThumbs();
7759
+
7760
  // Create a new instance
7761
  if(this._thumbsEnabled()) {
7762
  frameBB = this.frame.get('boundingBox');
7763
  navOverlay = this.get('navOverlay');
7764
  navPosition = this.get('navPosition');
7765
  navType = this.get('navType');
7766
+
7767
  // Create the thumbs
7768
  this.thumbs = new Y.FL.SlideshowThumbs(this._getThumbsConfig());
7769
+
7770
  // This breaks sometimes on SM Next. Try/catch bandaid for now.
7771
  try { this.add(this.thumbs); } catch(e) {}
7772
+
7773
  // Overlay setup
7774
  if(navType == 'buttons' || navType == 'custom') {
7775
  this.thumbs.plug(Y.FL.SlideshowOverlay, {
7784
  hideStyle: 'left'
7785
  });
7786
  }
7787
+
7788
  // Insert
7789
  this.thumbs.render(this.get('contentBox'));
7790
+
7791
  if(navPosition == 'top') {
7792
  frameBB.insert(this.thumbs.get('boundingBox'), 'before');
7793
  }
7794
  else {
7795
  frameBB.insert(this.thumbs.get('boundingBox'), 'after');
7796
  }
7797
+
7798
  // Hide overlay thumbs on click
7799
  if(this.get('thumbsHideOnClick') && navType != 'thumbs') {
7800
  this.thumbs.on('imageClick', Y.bind(this._hideThumbsOnImageClick, this));
7801
  }
7802
+
7803
  this._syncThumbs();
7804
  }
7805
  },
7806
+
7807
  /**
7808
  * Destroy the current thumbs instance.
7809
+ *
7810
  * @method _destroyThumbs
7811
  * @protected
7812
+ */
7813
  _destroyThumbs: function()
7814
  {
7815
  if(this.thumbs !== null) {
7823
  this.thumbs = null;
7824
  }
7825
  },
7826
+
7827
  /**
7828
  * Syncs the thumbs UI styles.
7829
+ *
7830
  * @method _syncThumbs
7831
  * @protected
7832
  */
7838
  navType = this.get('navType'),
7839
  paddingType = 'padding' + navPosition.charAt(0).toUpperCase() + navPosition.slice(1),
7840
  navHeight = 0;
7841
+
7842
  if(navType == 'buttons') {
7843
  navHeight = parseInt(this.nav.get('boundingBox').getComputedStyle('height'), 10);
7844
  thumbsBB.setStyle('position', 'absolute');
7845
+
7846
  if(navOverlay) {
7847
  thumbsBB.setStyle(paddingType, navHeight + 'px');
7848
  thumbsBB.setStyle(navPosition, '0px');
7855
  thumbsBB.setStyle('position', 'absolute');
7856
  thumbsBB.setStyle(navPosition, '0px');
7857
  }
7858
+
7859
  this.thumbs.resize();
7860
  },
7861
+
7862
  /**
7863
+ * Prepares and returns the thumbs config object.
7864
+ *
7865
  * @method _getThumbsConfig
7866
  * @protected
7867
  * @returns Object
7891
  imageConfig: imageConfig,
7892
  touchSupport: true
7893
  };
7894
+
7895
  if(navType == 'buttons' || navType == 'custom') {
7896
  if('ontouchstart' in window) {
7897
  config.leftNavEnabled = false;
7903
  config.rightNavButtons = ['nextPage'];
7904
  }
7905
  }
7906
+
7907
  return config;
7908
  },
7909
+
7910
  /**
7911
  * Resizes the thumbs.
7912
+ *
7913
  * @method _resizeThumbs
7914
  * @protected
7915
  */
7919
  this.thumbs.resize();
7920
  }
7921
  },
7922
+
7923
  /**
7924
  * Shows or hides the thumbs.
7925
  *
7930
  {
7931
  this._toggleOverlay(this.thumbs.slideshowOverlay);
7932
  },
7933
+
7934
  /**
7935
  * Hides the thumbs when a thumb image is clicked.
7936
  *
7943
  this.thumbs.slideshowOverlay._focus = false;
7944
  this.thumbs.slideshowOverlay.enable();
7945
  this.thumbs.slideshowOverlay.hide();
7946
+
7947
  if(this.nav && this.nav.slideshowOverlay) {
7948
  this.nav.slideshowOverlay.enable();
7949
  }
7950
  }
7951
  },
7952
+
7953
  /**
7954
  * Creates and renders a new instance of FL.SlideshowCaption.
7955
  *
7959
  _renderCaption: function()
7960
  {
7961
  if(this._hasNavButton('caption')) {
7962
+
7963
  this.caption = new Y.FL.SlideshowCaption({
7964
+ lessLinkText: this.get('captionLessLinkText'),
7965
+ moreLinkText: this.get('captionMoreLinkText'),
7966
+ textLength: this.get('captionTextLength'),
7967
+ stripTags: this.get('captionStripTags')
7968
  });
7969
+
7970
  this.add(this.caption);
7971
+
7972
  this.caption.plug(Y.FL.SlideshowOverlay, {
7973
  hideDelay: this.get('overlayHideDelay'),
7974
  visible: false,
7975
  closeButton: true
7976
  });
7977
+
7978
  this._syncCaption();
7979
  }
7980
  },
7981
+
7982
  /**
7983
  * Syncs the caption UI styles.
7984
+ *
7985
  * @method _syncCaption
7986
  * @protected
7987
  */
7993
  nav = this._getNav(),
7994
  paddingType = 'padding' + navPosition.charAt(0).toUpperCase() + navPosition.slice(1),
7995
  navHeight = 0;
7996
+
7997
  captionBB.setStyle('position', 'absolute');
7998
+
7999
  if(nav) {
8000
  navHeight = parseInt(nav.get('boundingBox').getComputedStyle('height'), 10);
8001
  }
8002
+
8003
  if(nav && navOverlay) {
8004
  captionBB.setStyle(paddingType, navHeight + 'px');
8005
  captionBB.setStyle(navPosition, '0px');
8008
  captionBB.setStyle(navPosition, navHeight + 'px');
8009
  }
8010
  },
8011
+
8012
  /**
8013
  * Shows or hides the caption.
8014
  *
8019
  {
8020
  this._toggleOverlay(this.caption.slideshowOverlay);
8021
  },
8022
+
8023
  /**
8024
  * Creates and renders a new instance of FL.SlideshowSocial.
8025
  *
8031
  if(this._hasNavButton('social')) {
8032
  this.social = new Y.FL.SlideshowSocial();
8033
  this.add(this.social);
8034
+
8035
  this.social.plug(Y.FL.SlideshowOverlay, {
8036
  hideDelay: this.get('overlayHideDelay'),
8037
  visible: false,
8038
  closeButton: true
8039
  });
8040
+
8041
  this._syncSocial();
8042
  }
8043
  },
8044
+
8045
  /**
8046
  * Syncs the social UI styles.
8047
+ *
8048
  * @method _syncSocial
8049
  * @protected
8050
  */
8056
  nav = this._getNav(),
8057
  paddingType = 'padding' + navPosition.charAt(0).toUpperCase() + navPosition.slice(1),
8058
  navHeight = 0;
8059
+
8060
  socialBB.setStyle('position', 'absolute');
8061
+
8062
  if(nav) {
8063
  navHeight = parseInt(nav.get('boundingBox').getComputedStyle('height'), 10);
8064
  }
8065
+
8066
  if(nav && navOverlay) {
8067
  socialBB.setStyle(paddingType, navHeight + 'px');
8068
  socialBB.setStyle(navPosition, '0px');
8071
  socialBB.setStyle(navPosition, navHeight + 'px');
8072
  }
8073
  },
8074
+
8075
  /**
8076
  * Shows or hides the social buttons.
8077
  *
8082
  {
8083
  this._toggleOverlay(this.social.slideshowOverlay);
8084
  },
8085
+
8086
  /**
8087
  * Shows or hides an overlaid widget based
8088
  * on its current visibility.
8089
+ *
8090
  * @method _toggleOverlay
8091
  * @param overlay {Object} The overlay to toggle.
8092
  * @protected
8095
  {
8096
  var navType = this.get('navType'),
8097
  nav = this._getNav();
8098
+
8099
  if(overlay._visible) {
8100
  if(nav && nav.slideshowOverlay) {
8101
  nav.slideshowOverlay.enable();
8110
  overlay.show();
8111
  overlay.disable();
8112
  }
8113
+
8114
  if(this.thumbs && navType != 'thumbs' && this.thumbs.slideshowOverlay !== overlay) {
8115
  this.thumbs.slideshowOverlay.enable();
8116
  this.thumbs.slideshowOverlay.hide();
8124
  this.social.slideshowOverlay.hide();
8125
  }
8126
  },
8127
+
8128
  /**
8129
  * Called when an overlay's close button is clicked.
8130
+ *
8131
  * @method _overlayCloseClick
8132
  * @protected
8133
  */
8150
  this.imageNavRight.slideshowOverlay.enable();
8151
  }
8152
  },
8153
+
8154
  /**
8155
  * Hides all overlaid widgets.
8156
+ *
8157
  * @method _hideAllOverlays
8158
  * @protected
8159
  */
8182
  this.imageNavRight.slideshowOverlay.hideWithTimer();
8183
  }
8184
  },
8185
+
8186
  /**
8187
+ * Checks if overlays are still visible when the mouse enters
8188
  * the bounding box. If they are, overlay functionality is disabled
8189
  * until the overlays are closed by a button or the mouse leaves
8190
+ * the bounding box. If only the nav overlay is visible, this
8191
+ * function does nothing.
8192
  *
8193
  * @method _checkOverlaysOnMouseenter
8194
  * @protected
8199
  navOverlay = this.get('navOverlay'),
8200
  nav = this._getNav(),
8201
  overlayVisible = false;
8202
+
8203
  if(this.thumbs && navType != 'thumbs' && this.thumbs.slideshowOverlay._visible) {
8204
  overlayVisible = true;
8205
  this.thumbs.slideshowOverlay.disable();
8212
  overlayVisible = true;
8213
  this.social.slideshowOverlay.disable();
8214
  }
8215
+
8216
  if(nav && overlayVisible && navOverlay) {
8217
  nav.slideshowOverlay.disable();
8218
  }
8219
  },
8220
+
8221
  /**
8222
  * Checks whether a nav button is set or not.
8223
+ *
8224
  * @method _hasNavButton
8225
  * @protected
8226
  * @param button {String} The button to look for.
8229
  _hasNavButton: function(button)
8230
  {
8231
  var navType = this.get('navType');
8232
+
8233
  if(navType == 'buttons' || navType == 'thumbs' || navType == 'custom') {
8234
  if(Y.Array.indexOf(this.get('navButtons'), button) > -1) {
8235
  return true;
8240
  else if(Y.Array.indexOf(this.get('navButtonsRight'), button) > -1) {
8241
  return true;
8242
  }
8243
+ else {
8244
  return false;
8245
  }
8246
  }
8248
  return false;
8249
  }
8250
  },
8251
+
8252
  /**
8253
  * @method _removeNavButton
8254
  * @param button {String} The name of the button to remove.
8261
  buttonsRight = this.get('navButtonsRight'),
8262
  vtTopNavButtons = this.get('verticalThumbsTopNavButtons'),
8263
  vtBottomNavButtons = this.get('verticalThumbsBottomNavButtons');
8264
+
8265
  if(Y.Array.indexOf(buttons, button) > -1) {
8266
  buttons.splice(Y.Array.indexOf(buttons, button), 1);
8267
  }
8277
  if(Y.Array.indexOf(vtBottomNavButtons, button) > -1) {
8278
  vtBottomNavButtons.splice(Y.Array.indexOf(vtBottomNavButtons, button), 1);
8279
  }
8280
+
8281
  this._set('navButtons', buttons);
8282
  this._set('navButtonsLeft', buttonsLeft);
8283
  this._set('navButtonsRight', buttonsRight);
8284
  this._set('verticalThumbsTopNavButtons', vtTopNavButtons);
8285
  this._set('verticalThumbsBottomNavButtons', vtBottomNavButtons);
8286
  }
8287
+
8288
  }, {
8289
 
8290
  /**
8296
  * @static
8297
  */
8298
  CSS_PREFIX: 'fl-slideshow',
8299
+
8300
  /**
8301
  * Static property used to define the default attribute configuration of
8302
  * the Widget.
8307
  * @static
8308
  */
8309
  ATTRS: {
8310
+
8311
  /**
8312
+ * What should happen when the main image is clicked.
8313
  * Options are none, gallery and url. If url is chosen,
8314
  * clickActionUrl must be set.
8315
  *
8320
  clickAction: {
8321
  value: 'none'
8322
  },
8323
+
8324
  /**
8325
  * The redirect url to use when clickAction is set to url.
8326
  *
8331
  clickActionUrl: {
8332
  value: ''
8333
  },
8334
+
8335
  /**
8336
  * Whether to crop the main image.
8337
  *
8342
  crop: {
8343
  value: false
8344
  },
8345
+
8346
  /**
8347
  * Whether to only crop horizontal images or not.
8348
  *
8353
  cropHorizontalsOnly: {
8354
  value: false
8355
  },
8356
+
8357
  /**
8358
  * Whether to always use the loading image between images
8359
  * or to only use it between albums.
8365
  loadingImageAlwaysEnabled: {
8366
  value: true
8367
  },
8368
+
8369
  /**
8370
+ * The x and y position of the main image
8371
  * within the bounding box.
8372
  *
8373
  * @attribute position
8377
  position: {
8378
  value: 'center center'
8379
  },
8380
+
8381
  /**
8382
  * Whether to right click protect the main image.
8383
  *
8388
  protect: {
8389
  value: true
8390
  },
8391
+
8392
  /**
8393
  * Whether to resize the main image past
8394
  * its original width and height.
8400
  upsize: {
8401
  value: true
8402
  },
8403
+
8404
  /**
8405
+ * The type of transition to use. Possible values are
8406
  * none, fade, slideHorizontal and slideVertical. The
8407
  * value can also be a common seperated string of transitions
8408
+ * that will be randomly chosen for each image.
8409
  *
8410
  * @attribute transition
8411
  * @type String
8414
  transition: {
8415
  value: 'fade'
8416
  },
8417
+
8418
  /**
8419
  * The duration of the transition, measured in seconds.
8420
  *
8425
  transitionDuration: {
8426
  value: 1
8427
  },
8428
+
8429
  /**
8430
  * The type of transition easing to use.
8431
  *
8436
  transitionEasing: {
8437
  value: 'ease-out'
8438
  },
8439
+
8440
  /**
8441
  * The amount of zoom to use for the Ken Burns effect.
8442
  *
8443
  * @attribute kenBurnsZoom
8444
+ * @type Number
8445
  * @default 1.2
8446
+ */
8447
  kenBurnsZoom: {
8448
  value: 1.2
8449
  },
8450
+
8451
  /**
8452
+ * The type of navigation to use. Possible values are
8453
  * buttons, thumbs, custon and none.
8454
  *
8455
  * @attribute navType
8459
  navType: {
8460
  value: 'none'
8461
  },
8462
+
8463
  /**
8464
  * The position of the main nav. Possible values are top and bottom.
8465
  *
8470
  navPosition: {
8471
  value: 'bottom'
8472
  },
8473
+
8474
  /**
8475
  * Whether to overlay the nav on top of the main image.
8476
  *
8481
  navOverlay: {
8482
  value: false
8483
  },
8484
+
8485
  /**
8486
  * An array of button names used to render the main nav's buttons.
8487
  *
8492
  navButtons: {
8493
  value: []
8494
  },
8495
+
8496
  /**
8497
  * An array of button names used to render the main nav's left buttons.
8498
  *
8503
  navButtonsLeft: {
8504
  value: []
8505
  },
8506
+
8507
  /**
8508
  * An array of button names used to render the main nav's right buttons.
8509
  *
8514
  navButtonsRight: {
8515
  value: []
8516
  },
8517
+
8518
  /**
8519
  * Whether to hide the overlays when the mouse moves or not.
8520
  *
8525
  overlayHideOnMousemove: {
8526
  value: true
8527
  },
8528
+
8529
  /**
8530
  * How long to wait before hiding the overlays.
8531
  * Measured in milliseconds.
8537
  overlayHideDelay: {
8538
  value: 3000
8539
  },
8540
+
8541
  /**
8542
  * Whether to use the image nav or not. If true, a prev
8543
+ * and next button will be overlaid on the main image.
8544
  *
8545
  * @attribute imageNavEnabled
8546
  * @type Boolean
8549
  imageNavEnabled: {
8550
  value: false
8551
  },
8552
+
8553
  /**
8554
  * Whether to use the mouse nav or not. If true, the cursor
8555
  * will turn into a prev or next button when over the slideshow.
8561
  mouseNavEnabled: {
8562
  value: false
8563
  },
8564
+
8565
  /**
8566
  * Whether to hide the thumbs when clicking on a thumbnail
8567
  * image or not. Thumbs always hide navType is set to buttons.
8573
  thumbsHideOnClick: {
8574
  value: true
8575
  },
8576
+
8577
  /**
8578
  * The horizontal spacing between thumbs.
8579
  *
8584
  thumbsHorizontalSpacing: {
8585
  value: 15
8586
  },
8587
+
8588
  /**
8589
  * The vertical spacing between thumbs.
8590
  *
8595
  thumbsVerticalSpacing: {
8596
  value: 15
8597
  },
8598
+
8599
  /**
8600
  * Whether to space the thumbs evenly within a page.
8601
  *
8606
  thumbsSpaceEvenly: {
8607
  value: true
8608
  },
8609
+
8610
  /**
8611
  * Whether to center single pages of thumbs.
8612
  *
8617
  thumbsCenterSinglePage: {
8618
  value: true
8619
  },
8620
+
8621
  /**
8622
  * Whether to pause the slideshow when a thumb is clicked.
8623
  *
8628
  thumbsPauseOnClick: {
8629
  value: false
8630
  },
8631
+
8632
  /**
8633
  * The type of transition to use between pages of thumbs.
8634
  *
8639
  thumbsTransition: {
8640
  value: 'slideHorizontal'
8641
  },
8642
+
8643
  /**
8644
  * The duration of the transition between pages of thumbs.
8645
  *
8650
  thumbsTransitionDuration: {
8651
  value: 0.8
8652
  },
8653
+
8654
  /**
8655
  * The type of transition easing to use between pages of thumbs.
8656
+ *
8657
  * @attribute thumbsTransitionEasing
8658
  * @type String
8659
  * @default ease-out
8661
  thumbsTransitionEasing: {
8662
  value: 'ease-out'
8663
  },
8664
+
8665
  /**
8666
  * Whether to crop the thumbnails.
8667
  *
8672
  thumbsImageCrop: {
8673
  value: true
8674
  },
8675
+
8676
  /**
8677
  * The width of each thumbnail.
8678
  *
8683
  thumbsImageWidth: {
8684
  value: 50
8685
  },
8686
+
8687
  /**
8688
  * The height of each thumbnail.
8689
  *
8694
  thumbsImageHeight: {
8695
  value: 50
8696
  },
8697
+
8698
  /**
8699
  * The text to use for the "read less" toggle link.
8700
+ *
8701
  * @attribute captionLessLinkText
8702
  * @type String
8703
  * @default Read Less
8705
  captionLessLinkText: {
8706
  value: 'Read Less'
8707
  },
8708
+
8709
  /**
8710
  * The text to use for the "read more" toggle link.
8711
+ *
8712
  * @attribute captionMoreLinkText
8713
  * @type String
8714
  * @default Read More
8716
  captionMoreLinkText: {
8717
  value: 'Read More'
8718
  },
8719
+
8720
  /**
8721
  * The length of the caption to show. If greater than -1,
8722
+ * the text will be truncated and a read more link will
8723
  * be displayed. If set to -1, the entire caption will be shown.
8724
  *
8725
  * @attribute captionTextLength
8729
  captionTextLength: {
8730
  value: 200
8731
  },
8732
+
8733
  /**
8734
  * Whether to strip out HTML tags in the caption
8735
  * text or not.
8741
  captionStripTags: {
8742
  value: false
8743
  },
8744
+
8745
  /**
8746
  * Whether to use the vertical thumbs or not.
8747
  *
8752
  verticalThumbsEnabled: {
8753
  value: false
8754
  },
8755
+
8756
  /**
8757
+ * Position of the vertical thumbs. Possible values
8758
  * are either left or right.
8759
  *
8760
  * @attribute verticalThumbsPosition
8764
  verticalThumbsPosition: {
8765
  value: 'left'
8766
  },
8767
+
8768
  /**
8769
+ * Whether to overlay the vertical thumbs
8770
  * on the main image or not.
8771
  *
8772
  * @attribute verticalThumbsOverlay
8776
  verticalThumbsOverlay: {
8777
  value: false
8778
  },
8779
+
8780
  /**
8781
  * The number of columns for the vertical thumbs.
8782
  *
8787
  verticalThumbsColumns: {
8788
  value: 1
8789
  },
8790
+
8791
  /**
8792
  * Whether to use the vertical thumbs top nav or not.
8793
  *
8798
  verticalThumbsTopNavEnabled: {
8799
  value: false
8800
  },
8801
+
8802
  /**
8803
+ * An array of button names used to render
8804
  * the vertical thumbs top nav buttons.
8805
  *
8806
  * @attribute verticalThumbsTopNavButtons
8810
  verticalThumbsTopNavButtons: {
8811
  value: ['prevPage', 'nextPage']
8812
  },
8813
+
8814
  /**
8815
  * Whether to use the vertical thumbs bottom nav or not.
8816
  *
8821
  verticalThumbsBottomNavEnabled: {
8822
  value: true
8823
  },
8824
+
8825
  /**
8826
+ * An array of button names used to render
8827
  * the vertical thumbs top nav buttons.
8828
  *
8829
  * @attribute verticalThumbsBottomNavButtons
8833
  verticalThumbsBottomNavButtons: {
8834
  value: ['prevPage', 'nextPage']
8835
  },
8836
+
8837
  /**
8838
  * The horizontal spacing between vertical thumbs.
8839
  *
8844
  verticalThumbsHorizontalSpacing: {
8845
  value: 15
8846
  },
8847
+
8848
  /**
8849
  * The vertical spacing between vertical thumbs.
8850
  *
8855
  verticalThumbsVerticalSpacing: {
8856
  value: 15
8857
  },
8858
+
8859
  /**
8860
  * Whether to space the vertical thumbs evenly within a page.
8861
  *
8866
  verticalThumbsSpaceEvenly: {
8867
  value: false
8868
  },
8869
+
8870
  /**
8871
  * Whether to pause the slideshow when a vertical thumb is clicked.
8872
  *
8877
  verticalThumbsPauseOnClick: {
8878
  value: false
8879
  },
8880
+
8881
  /**
8882
  * Whether to crop the vertical thumbs or not.
8883
  *
8888
  verticalThumbsImageCrop: {
8889
  value: true
8890
  },
8891
+
8892
  /**
8893
  * The width of each vertical thumbnail.
8894
  *
8899
  verticalThumbsImageWidth: {
8900
  value: 75
8901
  },
8902
+
8903
  /**
8904
  * The height of each vertical thumbnail.
8905
  *
8910
  verticalThumbsImageHeight: {
8911
  value: 75
8912
  },
8913
+
8914
  /**
8915
  * The type of transition to use between pages of vertical thumbs.
8916
  *
8921
  verticalThumbsTransition: {
8922
  value: 'slideVertical'
8923
  },
8924
+
8925
  /**
8926
  * The duration of the transition between pages of vertical thumbs.
8927
  *
8932
  verticalThumbsTransitionDuration: {
8933
  value: 0.8
8934
  },
8935
+
8936
  /**
8937
  * The type of transition easing to use between pages of vertical thumbs.
8938
+ *
8939
  * @attribute verticalThumbsTransitionEasing
8940
  * @type String
8941
  * @default ease-out
8943
  verticalThumbsTransitionEasing: {
8944
  value: 'ease-out'
8945
  },
8946
+
8947
  /**
8948
  * Whether to use the Google Plus button or not.
8949
+ *
8950
  * @attribute googlePlusButtonEnabled
8951
  * @type Boolean
8952
  * @default true
8954
  googlePlusButtonEnabled: {
8955
  value: true
8956
  },
8957
+
8958
  /**
8959
  * Whether to use the Facebook like button or not.
8960
+ *
8961
  * @attribute likeButtonEnabled
8962
  * @type Boolean
8963
  * @default true
8965
  likeButtonEnabled: {
8966
  value: true
8967
  },
8968
+
8969
  /**
8970
  * Whether to use the Pinterest button or not.
8971
+ *
8972
  * @attribute pinterestButtonEnabled
8973
  * @type Boolean
8974
  * @default true
8976
  pinterestButtonEnabled: {
8977
  value: true
8978
  },
8979
+
8980
  /**
8981
  * Whether to use the Tweet button or not.
8982
+ *
8983
  * @attribute tweetButtonEnabled
8984
  * @type Boolean
8985
  * @default true
9022
  * @extends Base
9023
  */
9024
  Y.namespace('FL').SlideshowAlbumLoader = Y.Base.create('fl-slideshow-album-loader', Y.Base, [], {
9025
+
9026
  /**
9027
  * The source object used for loading.
9028
  *
9032
  * @protected
9033
  */
9034
  _source: null,
9035
+
9036
  /**
9037
  * Loads slideshow album data using the provided source object.
9038
  *
9039
  * @method load
9040
  * @param source {Object} The source object to use for loading.
9041
+ */
9042
  load: function(source)
9043
  {
9044
  this._source = source;
9045
+
9046
  /**
9047
  * Fires before a new load request is made.
9048
  *
9049
  * @event start
9050
  */
9051
  this.fire('start');
9052
+
9053
  this[Y.FL.SlideshowAlbumLoader.TYPES[source.type]].call(this);
9054
  },
9055
+
9056
  /**
9057
  * Called when a source type completes loading
9058
  * and fires the complete event.
9060
  * @method _loadComplete
9061
  * @param o {Object} Passed to complete event subscribers.
9062
  * @protected
9063
+ */
9064
  _loadComplete: function(o)
9065
  {
9066
  o = this._randomize(o);
9067
+
9068
  /**
9069
  * Fires after a new load request is made.
9070
  *
9072
  */
9073
  this.fire('complete', o);
9074
  },
9075
+
9076
  /**
9077
  * Randomizes images in an album.
9078
  *
9079
  * @method _randomize
9080
  * @param album {Object} The album to randomize.
9081
  * @protected
9082
+ */
9083
  _randomize: function(o)
9084
  {
9085
  var i;
9086
+
9087
  if(this.get('randomize')) {
9088
  o.albumInfo.images.sort(function() { return 0.5 - Math.random(); });
9089
+
9090
  for(i = 0; i < o.albumInfo.images.length; i++) {
9091
  o.albumInfo.images[i].index = i;
9092
  }
9093
  }
9094
+
9095
  return o;
9096
  },
9097
+
9098
  /**
9099
  * Loads slideshow album data from SmugMug.
9100
  *
9101
  * @method _loadSmugMug
9102
  * @protected
9103
+ */
9104
+ _loadSmugMug: function()
9105
  {
9106
  var sm = new Y.FL.SmugMugAPI();
9107
+
9108
  sm.on('complete', this._loadSmugMugSuccess, this);
9109
  sm.addParam('method', 'smugmug.images.get');
9110
  sm.addParam('AlbumID', this._source.id);
9111
  sm.addParam('AlbumKey', this._source.key);
9112
  sm.addParam('Extras', 'Caption,Format,FileName');
9113
+
9114
  // Gallery password
9115
  if(this._source.password) {
9116
  sm.addParam('Password', this._source.password);
9117
  }
9118
+
9119
  // Site-wide password
9120
  if(this._source.sp) {
9121
  sm.addParam('SitePassword', this._source.sp);
9122
  }
9123
+
9124
  sm.request();
9125
  },
9126
+
9127
  /**
9128
  * Processes slideshow album data loaded from SmugMug.
9129
  *
9130
  * @method _loadSmugMugSuccess
9131
  * @param e {Object} The custom event object passed to this function.
9132
  * @protected
9133
+ */
9134
+ _loadSmugMugSuccess: function(e)
9135
  {
9136
  var images = e.Album.Images,
9137
  album = {},
9138
  proxy = typeof this._source.proxy !== 'undefined' ? this._source.proxy : '',
9139
+ buyBase = '',
9140
  baseURL = '',
9141
  ext = '',
9142
  format = '',
9150
  album.link = e.Album.URL;
9151
  album.title = this._source.title ? this._source.title : '';
9152
  album.images = [];
9153
+ buyBase = album.link.replace('https://', '').split('/').shift();
9154
+ buyBase = 'https://' + buyBase + '/buy/' + e.Album.id + '_' + e.Album.Key + '/';
9155
+
9156
  for(i = 0; i < images.length; i++)
9157
  {
9158
  baseURL = proxy + e.Album.URL + '/' + images[i].id + '_' + images[i].Key;
9159
  format = images[i].Format.toLowerCase();
9160
  ext = format == 'mp4' ? '.jpg' : '.' + format;
9161
+
9162
  album.images[i] = {};
9163
  album.images[i].index = i;
9164
  album.images[i].sourceType = 'smugmug';
9180
  album.images[i].x3largeURL = baseURL + '-X3' + ext;
9181
  album.images[i].buyURL = buyBase + images[i].id + '_' + images[i].Key;
9182
  album.images[i].iframe = '';
9183
+
9184
  if(album.images[i].caption.indexOf('iframe')) {
9185
  temp = Y.Node.create('<div>'+ album.images[i].caption +'</div>');
9186
  iframe = temp.one('iframe');
9187
+
9188
  if(iframe) {
9189
  album.images[i].iframe = iframe.getAttribute('src');
9190
  album.images[i].caption = album.images[i].caption.replace(/<iframe.*>.*<\/iframe>/gi, '');
9191
  }
9192
  }
9193
  }
9194
+
9195
  this._loadComplete({ 'albumInfo': album });
9196
  },
9197
+
9198
  /**
9199
  * Loads slideshow album data from an array of urls.
9200
  *
9202
  *
9203
  * @method _loadUrls
9204
  * @protected
9205
+ */
9206
+ _loadUrls: function()
9207
  {
9208
  var album = {},
9209
  i = 0;
9210
+
9211
  album.index = this._source.index;
9212
  album.title = this._source.title ? this._source.title : '';
9213
  album.images = [];
9214
+
9215
  for( ; i < this._source.urls.length; i++)
9216
  {
9217
  album.images[i] = {};
9231
  album.images[i].buyURL = this._source.urls[i].buyURL || '';
9232
  album.images[i].iframe = this._source.urls[i].iframe || '';
9233
  }
9234
+
9235
  this._loadComplete({ 'albumInfo': album });
9236
  }
9237
+
9238
  }, {
9239
+
9240
  /**
9241
  * Static property used to define the default attribute configuration of
9242
  * the Widget.
9247
  * @static
9248
  */
9249
  ATTRS: {
9250
+
9251
  /**
9252
  * If true, the images will be randomized after loading.
9253
  *
9259
  value: false
9260
  }
9261
  },
9262
+
9263
  /**
9264
  * The types of source data that can be loaded
9265
  * and associated functions.
9269
  * @readOnly
9270
  * @protected
9271
  * @static
9272
+ */
9273
  TYPES: {
9274
  'smugmug': '_loadSmugMug',
9275
  'flickr': '_loadFlickr',
9290
  */
9291
 
9292
  /**
9293
+ * The base class that gets extended when creating new
9294
  * slideshow widgets. Manages loading, playing, and resizing.
9295
  * <p>
9296
  * While SlideshowBase can be instantiated, it is only meant to
9303
  * @extends Widget
9304
  */
9305
  Y.namespace('FL').SlideshowBase = Y.Base.create('fl-slideshow-base', Y.Widget, [Y.WidgetParent], {
9306
+
9307
  /**
9308
  * FL.SlideshowAlbumLoader instance used to load albums.
9309
  *
9313
  * @protected
9314
  */
9315
  _albumLoader: null,
9316
+
9317
  /**
9318
+ * An array of albums loaded from the source attribute.
9319
  * Each album is an array of objects containing image info.
9320
  *
9321
  * @property albums
9323
  * @default []
9324
  */
9325
  albums: [],
9326
+
9327
  /**
9328
  * Info for the active album.
9329
  *
9332
  * @default null
9333
  */
9334
  albumInfo: null,
9335
+
9336
  /**
9337
+ * A number that represents the index of the active
9338
  * album in the albums array.
9339
  *
9340
  * @property albumIndex
9342
  * @default null
9343
  */
9344
  albumIndex: null,
9345
+
9346
  /**
9347
  * Info for the active image.
9348
  *
9351
  * @default null
9352
  */
9353
  imageInfo: null,
9354
+
9355
  /**
9356
+ * A number that represents the index of the active
9357
  * image in the albumInfo array.
9358
  *
9359
  * @property imageIndex
9361
  * @default null
9362
  */
9363
  imageIndex: null,
9364
+
9365
  /**
9366
+ * A number that represents the index of the last
9367
  * image that was loaded in the albumInfo array.
9368
  *
9369
  * @property lastImageIndex
9393
  _playing: false,
9394
 
9395
  /**
9396
+ * Timer for the break in between images when
9397
  * the slideshow is playing.
9398
  *
9399
  * @property _playingTimer
9413
  * @protected
9414
  */
9415
  _playingTimerEvent: null,
9416
+
9417
  /**
9418
+ * An instance of FL.Spinner that is shown and hidden
9419
+ * using _showLoadingImage and _hideLoadingImage when
9420
+ * a loading activity occurs.
9421
  *
9422
  * @property _loadingImage
9423
  * @type FL.Spinner
9425
  * @protected
9426
  */
9427
  _loadingImage: null,
9428
+
9429
  /**
9430
  * An div node that wraps the loading image.
9431
  *
9435
  * @protected
9436
  */
9437
  _loadingImageWrap: null,
9438
+
9439
  /**
9440
+ * Whether the loading image is visible or not.
9441
  *
9442
  * @property _loadingImageVisible
9443
  * @type Boolean
9444
  * @default false
9445
  * @protected
9446
+ */
9447
  _loadingImageVisible: false,
9448
+
9449
  /**
9450
  * A timer to delay the display of the loading image.
9451
  *
9455
  * @protected
9456
  */
9457
  _loadingImageTimer: null,
9458
+
9459
  /**
9460
  * The container to insert the loading image into. If
9461
  * no container is set, the loading image will be inserted
9467
  * @protected
9468
  */
9469
  _loadingImageContainer: null,
9470
+
9471
  /**
9472
  * The intial height of the slideshow. Used to resize
9473
  * back to the starting height when exiting stretchy.
9478
  * @protected
9479
  */
9480
  _initialHeight: null,
9481
+
9482
  /**
9483
  * The intial width of the slideshow. Used to resize
9484
  * back to the starting width when exiting stretchy.
9493
  /**
9494
  * @method initializer
9495
  * @protected
9496
+ */
9497
+ initializer: function()
9498
  {
9499
  // Loader
9500
  this._albumLoader = new Y.FL.SlideshowAlbumLoader({
9501
  randomize: this.get('randomize')
9502
  });
9503
  },
9504
+
9505
  /**
9506
  * @method renderUI
9507
  * @protected
9510
  {
9511
  this._renderLoadingImage();
9512
  },
9513
+
9514
  /**
9515
  * @method bindUI
9516
  * @protected
9523
  // Resize Events
9524
  Y.one(window).on('fl-slideshow-base|resize', this._delayResize, this);
9525
  Y.one(window).on('fl-slideshow-base|orientationchange', this._delayResize, this);
9526
+
9527
  // Key Events
9528
  Y.Node.one('body').on('keydown', Y.bind(this._onKey, this));
9529
  },
9530
+
9531
  /**
9532
  * @method syncUI
9533
  * @protected
9535
  syncUI: function()
9536
  {
9537
  this.get('boundingBox').addClass('fl-slideshow-' + this.get('color'));
9538
+
9539
  this.resize();
9540
+
9541
  if(this.get('loadOnRender')) {
9542
  this.loadAlbum(this.get('defaultAlbum'), this.get('defaultImage'));
9543
  }
9544
  },
9545
+
9546
  /**
9547
  * Add album data to the source object.
9548
  *
9553
  {
9554
  var source = this.get('source'),
9555
  i = source.length;
9556
+
9557
  source[i] = data;
9558
  source[i].index = i;
9559
+
9560
  this.set('source', source);
9561
  },
9562
+
9563
  /**
9564
  * Loads an album from the source array with the provided albumIndex.
9565
  * If no albumIndex is provided, the first album in the array will be loaded.
9573
  {
9574
  var source = this.get('source'),
9575
  loadImageIndex = typeof imageIndex == 'undefined' ? 0 : imageIndex;
9576
+
9577
  // Reset internal image indexes.
9578
  this.imageIndex = null;
9579
  this.lastImageIndex = null;
9580
+
9581
  /**
9582
  * Fires before a new album request is made.
9583
  *
9584
  * @event albumLoadStart
9585
  */
9586
  this.fire('albumLoadStart');
9587
+
9588
  // Load an image after the album.
9589
  this.once('albumLoadComplete', Y.bind(this.loadImage, this, loadImageIndex));
9590
+
9591
  // Load data passed from another slideshow instance.
9592
  if(source[albumIndex] && source[albumIndex].type == 'album-data') {
9593
  this.albums[albumIndex] = source[albumIndex].data;
9602
  this._albumLoader.load(source[albumIndex] || source[0]);
9603
  }
9604
  },
9605
+
9606
  /**
9607
  * Processes the loaded album and fires the albumLoadComplete event.
9608
  *
9609
  * @method _loadAlbumComplete
9610
  * @param o {Object} The custom event object passed to this method.
9611
  * @protected
9612
+ */
9613
  _loadAlbumComplete: function(o)
9614
  {
9615
  this.albums[o.albumInfo.index] = o.albumInfo;
9616
  this.albumInfo = o.albumInfo;
9617
  this.albumIndex = o.albumInfo.index;
9618
+
9619
  /**
9620
  * Fires after a new album request is made.
9621
  *
9622
  * @event albumLoadComplete
9623
  */
9624
  this.fire('albumLoadComplete');
9625
+
9626
  // Auto Play
9627
  if(this.get('autoPlay')) {
9628
  this._playingTimerStart();
9630
  this._playing = true;
9631
  }
9632
  },
9633
+
9634
  /**
9635
  * Sets the active image index and fires the imageLoadComplete event.
9636
  *
9637
  * @method loadImage
9638
  * @param index {Number} The image index to load.
9639
+ */
9640
  loadImage: function(index)
9641
  {
9642
  if(this._playing) {
9643
  this._playingTimerStart();
9644
  }
9645
+
9646
  index = index < 0 ? this.albumInfo.images.length - 1 : index;
9647
  index = index >= this.albumInfo.images.length ? 0 : index;
9648
+
9649
  this.lastImageIndex = this.imageIndex;
9650
  this.imageIndex = index;
9651
  this.imageInfo = this.albumInfo.images[index];
9652
+
9653
  /**
9654
  * Fires after a new image index is set.
9655
  *
9657
  */
9658
  this.fire('imageLoadComplete', { 'imageInfo': this.imageInfo });
9659
  },
9660
+
9661
  /**
9662
  * Loads the previous image.
9663
  *
9664
  * @method prevImage
9665
+ */
9666
  prevImage: function()
9667
  {
9668
  if(this.get('pauseOnNextOrPrev')) {
9669
  this.pause();
9670
  }
9671
+
9672
  this.loadImage(this.imageIndex - 1);
9673
+
9674
  /**
9675
  * Fires when the previous image is loaded.
9676
  *
9678
  */
9679
  this.fire('prevImage');
9680
  },
9681
+
9682
  /**
9683
  * Loads the next image.
9684
  *
9685
  * @method nextImage
9686
+ */
9687
  nextImage: function()
9688
  {
9689
  if(this.get('pauseOnNextOrPrev')) {
9690
  this.pause();
9691
  }
9692
+
9693
  this.loadImage(this.imageIndex + 1);
9694
+
9695
  /**
9696
  * Fires when the next image is loaded.
9697
  *
9699
  */
9700
  this.fire('nextImage');
9701
  },
9702
+
9703
  /**
9704
  * Keyboard navigation for the next and prev images.
9705
  *
9709
  _onKey: function(e)
9710
  {
9711
  switch(e.keyCode) {
9712
+
9713
  case 37:
9714
  this.prevImage();
9715
  break;
9716
+
9717
  case 39:
9718
  this.nextImage();
9719
  break;
9720
  }
9721
  },
9722
+
9723
  /**
9724
+ * Resizes the slideshow using either the
9725
  * stretchy or standard functions.
9726
+ *
9727
  * @method resize
9728
+ */
9729
  resize: function()
9730
  {
9731
  var stretchy = this.get('stretchy'),
9733
  width = parseInt(Y.one('body').get('winWidth'), 10),
9734
  threshold = this.get('responsiveThreshold');
9735
 
9736
+ // Stretchy resize to the window only if the parent width is greater
9737
+ // than the responsive threshold and stretchyType is set to window.
9738
  if(width > threshold && stretchy && stretchyType == 'window') {
9739
  this._stretchyWindowResize();
9740
  }
9741
+
9742
+ // Ratio resize if the parent width is less than the responsive
9743
  // threshold or if stretchyType is set to ratio.
9744
  else if((width <= threshold) || (stretchy && stretchyType == 'ratio')) {
9745
  this._stretchyRatioResize();
9746
  }
9747
+
9748
  // Do a standard resize based on the height and
9749
  // width passed to the constructor function.
9750
  else {
9751
  this._standardResize();
9752
  }
9753
+
9754
  /**
9755
  * Fires when the slideshow is resized.
9756
  *
9762
  /**
9763
  * @method _standardResize
9764
  * @protected
9765
+ */
9766
  _standardResize: function()
9767
  {
9768
  var stretchy = this.get('stretchy'),
9779
  this._stretchyWindowResize();
9780
  return;
9781
  }
9782
+
9783
+ // Resize to the width and height of the parent.
9784
  else if(stretchy && stretchyType == 'contain') {
9785
  bb.setStyle('height', parentHeight + 'px');
9786
  bb.setStyle('width', parentWidth + 'px');
9787
  }
9788
+
9789
  // Ratio resize if we don't have a height defined.
9790
  else if(!Y.Lang.isNumber(height)) {
9791
  this._stretchyRatioResize();
9792
  return;
9793
  }
9794
+
9795
  // Resize to the defined width and height.
9796
  else {
9797
+
9798
  bb.setStyle('height', height + 'px');
9799
+
9800
  if(width) {
9801
  bb.setStyle('width', width + 'px');
9802
  }
9805
  }
9806
  }
9807
  },
9808
+
9809
  /**
9810
+ * Resizes to the height of the window, compensating
9811
  * for any padding.
9812
+ *
9813
  * @method _stretchyWindowResize
9814
  * @protected
9815
+ */
9816
  _stretchyWindowResize: function()
9817
  {
9818
  var bb = this.get('boundingBox'),
9821
  paddingBottom = parseInt(bb.getStyle('paddingBottom'), 10),
9822
  height = parseInt(Y.one('body').get('winHeight'), 10),
9823
  width = '';
9824
+
9825
+ // Set the vertical space to 0 and width to the
9826
  // window's width if we are in fullscreen mode.
9827
  if(bb.hasClass('fl-fullscreen-active')) {
9828
  verticalSpace = 0;
9829
  width = parseInt(Y.one('body').get('winWidth'), 10) + 'px';
9830
  }
9831
+
9832
  height = (height - paddingTop - paddingBottom - verticalSpace) + 'px';
9833
+
9834
  bb.setStyle('height', height);
9835
  bb.setStyle('width', width);
9836
  },
9837
+
9838
  /**
9839
  * Resizes the height by multiplying the width and stretchyRatio value.
9840
+ *
9841
  * @method _stretchyRatioResize
9842
  * @protected
9843
+ */
9844
  _stretchyRatioResize: function()
9845
  {
9846
  var bb = this.get('boundingBox'),
9854
  winWidth = parseInt(Y.one('body').get('winWidth'), 10),
9855
  height = computedWidth * stretchyRatio,
9856
  width = '';
9857
+
9858
  // Use the window's height and width if we are in fullscreen mode.
9859
  if(bb.hasClass('fl-fullscreen-active')) {
9860
  height = winHeight;
9861
  width = winWidth;
9862
  }
9863
+
9864
  height = (height - paddingTop - paddingBottom - verticalSpace) + 'px';
9865
+
9866
  bb.setStyle('height', height);
9867
  bb.setStyle('width', width);
9868
  },
9872
  *
9873
  * @method _delayResize
9874
  * @protected
9875
+ */
9876
  _delayResize: function()
9877
  {
9878
  if(this._resizeTimer) {
9879
  this._resizeTimer.cancel();
9880
  }
9881
+
9882
  this._resizeTimer = Y.later(300, this, this.resize);
9883
  },
9884
 
9886
  * Starts a new playing timer and fires the played event.
9887
  *
9888
  * @method play
9889
+ */
9890
  play: function()
9891
  {
9892
  this._playingTimer = Y.later(this.get('speed'), this, this._playingTimerComplete);
9893
+
9894
  /**
9895
  * Fires when the playing timer starts.
9896
  *
9899
  this.fire('played');
9900
  this._playing = true;
9901
  },
9902
+
9903
  /**
9904
  * Cancels the current playing timer and fires the paused event.
9905
  *
9906
  * @method pause
9907
+ */
9908
  pause: function()
9909
  {
9910
  this._playingTimerCancel();
9911
+
9912
  /**
9913
  * Fires when the playing timer is canceled.
9914
  *
9917
  this.fire('paused');
9918
  this._playing = false;
9919
  },
9920
+
9921
  /**
9922
  * A new playing timer will start when this event is fired.
9923
  *
9925
  * @param obj {Object} The event's host object.
9926
  * @param e {String} The event to fire on the host object.
9927
  * @protected
9928
+ */
9929
  _setPlayingTimerEvent: function(obj, e)
9930
  {
9931
  this._playingTimerEvent = {
9933
  'e': e
9934
  };
9935
  },
9936
+
9937
  /**
9938
+ * Cancels the playing timer if it is running and starts a new one.
9939
  * The next image is loaded when the timer completes.
9940
  *
9941
  * @method _playingTimerStart
9942
  * @protected
9943
+ */
9944
  _playingTimerStart: function(e)
9945
  {
9946
  this._playingTimerCancel();
9947
+
9948
  if(!e && this._playingTimerEvent !== null) {
9949
  this._playingTimerEvent.obj.once('fl-slideshow-base|' + this._playingTimerEvent.e, Y.bind(this._playingTimerStart, this));
9950
  }
9952
  this._playingTimer = Y.later(this.get('speed'), this, this._playingTimerComplete);
9953
  }
9954
  },
9955
+
9956
  /**
9957
+ * Fires when the playing timer completes, starts a
9958
  * new timer and loads the next image.
9959
  *
9960
  * @method _playingTimerComplete
9961
  * @protected
9962
+ */
9963
  _playingTimerComplete: function()
9964
  {
9965
  this.loadImage(this.imageIndex + 1);
9966
+
9967
  /**
9968
  * Fires when the playing timer completes.
9969
  *
9971
  */
9972
  this.fire('playingTimerComplete');
9973
  },
9974
+
9975
  /**
9976
  * Cancels the playing timer.
9977
  *
9978
  * @method _playingTimerCancel
9979
  * @protected
9980
+ */
9981
  _playingTimerCancel: function()
9982
  {
9983
  if(this._playingTimer) {
9987
  this._playingTimerEvent.obj.detach('fl-slideshow-base|' + this._playingTimerEvent.e);
9988
  }
9989
  },
9990
+
9991
  /**
9992
  * Creates the loading image.
9993
+ *
9994
  * @method _renderLoadingImage
9995
  * @protected
9996
+ */
9997
  _renderLoadingImage: function()
9998
  {
9999
  var defaults = {
10007
  shadow: false // Whether to render a shadow
10008
  },
10009
  settings = Y.merge(defaults, this.get('loadingImageSettings'));
10010
+
10011
  if(this.get('loadingImageEnabled')) {
10012
+
10013
  // Loading image
10014
  if(settings.color === '') {
10015
  settings.color = this._colorToHex(Y.one('body').getStyle('color'));
10016
  }
10017
+
10018
  this._loadingImage = new Y.FL.Spinner(settings);
10019
+
10020
  // Loading image wrap
10021
  this._loadingImageWrap = Y.Node.create('<div class="fl-loading-image"></div>');
10022
+
10023
  this._loadingImageWrap.setStyles({
10024
  position : 'absolute',
10025
  'z-index' : '1000'
10026
  });
10027
  }
10028
  },
10029
+
10030
  /**
10031
  * Inserts the loading image.
10032
  *
10033
  * @method _showLoadingImage
10034
  * @protected
10035
+ */
10036
  _showLoadingImage: function()
10037
  {
10038
  if(this._loadingImage && !this._loadingImageVisible) {
10039
+
10040
  this._loadingImageVisible = true;
10041
  this._loadingImage.spin();
10042
  this._loadingImageWrap.insert(this._loadingImage.el);
10043
+
10044
  if(this._loadingImageContainer !== null) {
10045
  this._loadingImageContainer.insert(this._loadingImageWrap);
10046
  }
10047
  else {
10048
  this.get('contentBox').insert(this._loadingImageWrap);
10049
  }
10050
+
10051
  this._positionLoadingImage();
10052
  }
10053
  },
10054
+
10055
  /**
10056
+ * Inserts the loading image div node after
10057
  * a timer completes.
10058
  *
10059
  * @method _showLoadingImageWithDelay
10060
  * @protected
10061
+ */
10062
  _showLoadingImageWithDelay: function()
10063
  {
10064
  if(this._loadingImage) {
10065
  this._loadingImageTimer = Y.later(1000, this, this._showLoadingImage);
10066
  }
10067
  },
10068
+
10069
  /**
10070
  * Removes the loading image div node.
10071
  *
10072
  * @method _hideLoadingImage
10073
  * @protected
10074
+ */
10075
  _hideLoadingImage: function()
10076
  {
10077
  if(this._loadingImageTimer) {
10084
  this._loadingImageWrap.remove();
10085
  }
10086
  },
10087
+
10088
  /**
10089
  * Centers the loading image in the content box.
10090
  *
10091
  * @method _positionLoadingImage
10092
  * @protected
10093
+ */
10094
  _positionLoadingImage: function()
10095
  {
10096
  if(this._loadingImage && this._loadingImageVisible) {
10097
+
10098
  var wrap = this._loadingImageWrap,
10099
  wrapHeight = parseInt(wrap.getComputedStyle('height'), 10),
10100
  wrapWidth = parseInt(wrap.getComputedStyle('width'), 10),
10108
  left : left + 'px',
10109
  top : top + 'px'
10110
  });
10111
+
10112
  Y.one(this._loadingImage.el).setStyles({
10113
  left : '50%',
10114
  top : '50%'
10115
  });
10116
  }
10117
  },
10118
+
10119
  /**
10120
  * Convert RGB color value to a hex value.
10121
  *
10122
  * @method _colorToHex
10123
  * @protected
10124
+ */
10125
+ _colorToHex: function(color)
10126
  {
10127
  var digits, red, green, blue, rgb;
10128
+
10129
  if(color.substr(0, 1) === '#') {
10130
  return color;
10131
  }
10132
+
10133
  digits = /(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(color);
10134
+
10135
  if ( null === digits ) {
10136
  return '#000';
10137
  }
10138
+
10139
  red = parseInt(digits[2], 10);
10140
  green = parseInt(digits[3], 10);
10141
  blue = parseInt(digits[4], 10);
10142
  rgb = blue | (green << 8) | (red << 16);
10143
  rgb = rgb.toString(16);
10144
+
10145
  if(rgb === '0') {
10146
  rgb = '000';
10147
  }
10148
+
10149
  return digits[1] + '#' + rgb;
10150
  }
10151
+
10152
  }, {
10153
 
10154
  /**
10160
  * @static
10161
  */
10162
  CSS_PREFIX: 'fl-slideshow-base',
10163
+
10164
  /**
10165
  * Static property used to define the default attribute configuration of
10166
  * the Widget.
10171
  * @static
10172
  */
10173
  ATTRS: {
10174
+
10175
  /**
10176
+ * Used to create the color class that gets added to the bounding box
10177
  * when the widget is rendered. The color class is used to create new
10178
  * CSS color themes. The default CSS provided includes dark and light themes.
10179
  *
10186
  value: 'dark',
10187
  writeOnce: true
10188
  },
10189
+
10190
  /**
10191
+ * An array of source objects used to load albums. Each object must have
10192
  * a type property and can have a title property as well.
10193
  * <p>
10194
  * In addition to those properties, each object has additional required
10195
  * properties specific to its type. The types currently supported are
10196
  * smugmug and urls with planned support for flickr and picasa.
10197
  * See the user guide for information on loading different types.
10198
+ *
10199
  * @attribute source
10200
  * @type Array
10201
  * @default []
10208
  if(source.constructor == Object) {
10209
  source = [source];
10210
  }
10211
+
10212
  for(var i = 0; i < source.length; i++) {
10213
  source[i].index = i;
10214
  }
10215
+
10216
  return source;
10217
  }
10218
  },
10260
  autoPlay: {
10261
  value: true
10262
  },
10263
+
10264
  /**
10265
  * Whether to pause when the next or previous image is loaded
10266
  * using nextImage or prevImage. The slideshow will not be paused
10274
  pauseOnNextOrPrev: {
10275
  value: true
10276
  },
10277
+
10278
  /**
10279
  * If true, the images will be randomized after loading.
10280
  *
10285
  randomize: {
10286
  value: false
10287
  },
10288
+
10289
  /**
10290
  * The time between images when playing, measured in milliseconds.
10291
  *
10296
  speed: {
10297
  value: 4000
10298
  },
10299
+
10300
  /**
10301
+ * The minimum width of the parent node at which
10302
+ * responsive features are enabled. Set to 0 to
10303
  * disable responsive features as they are enabled
10304
+ * whether stretchy is set to true or not.
10305
  *
10306
  * @attribute responsiveThreshold
10307
  * @type Number
10321
  stretchy: {
10322
  value: false
10323
  },
10324
+
10325
  /**
10326
  * The type of stretchy logic to use. Possible values are
10327
+ * window and ratio. Both types resize the width of the
10328
  * slideshow to the width of its parent node. With window, the
10329
  * height of the slideshow is resized to the height of the window.
10330
  * With ratio, the height of the slideshow is resized based
10331
  * on the ratio set with stretchyRatio or the height of the window
10332
+ * if the ratio height is greater than the window height.
10333
  *
10334
  * @attribute stretchyType
10335
  * @type String
10376
 
10377
  /**
10378
  * Property object for setting up the spin.js loading image.
10379
+ * For a complete list of properties see:
10380
  * http://effinroot.eiremedia.netdna-cdn.com/repo/plugins/misc/spin.js/index.html
10381
  *
10382
  * @attribute loadingImageSettings
10400
 
10401
  /**
10402
  * SmugMug API wrapper.
10403
+ *
10404
  * NOTE: Only anonymous logins are currently supported.
10405
  *
10406
  * @namespace FL
10410
  * @extends Base
10411
  */
10412
  Y.namespace('FL').SmugMugAPI = Y.Base.create('fl-smugmug-api', Y.Base, [], {
10413
+
10414
  /**
10415
  * ID for the current session.
10416
  *
10420
  * @protected
10421
  */
10422
  _sessionID: null,
10423
+
10424
  /**
10425
  * URL with parameters for the next API request.
10426
  * Reset after each request.
10431
  * @protected
10432
  */
10433
  _requestURL: null,
10434
+
10435
  /**
10436
  * Lifecycle method. Initializes the request url.
10437
  *
10438
  * @method initializer
10439
  * @protected
10440
+ */
10441
+ initializer: function()
10442
  {
10443
  this._resetRequestURL();
10444
  },
10445
+
10446
  /**
10447
  * Adds a key/value pair to the request url.
10448
  *
10449
  * @method addParam
10450
  * @param key {String} The name of the parameter (example: key=val).
10451
  * @param val {String} The value of the parameter (example: key=val).
10452
+ */
10453
  addParam: function(key, val)
10454
  {
10455
  this._requestURL = this._requestURL + '&' + key + '=' + val;
10459
  * Requests an anonymous login session.
10460
  *
10461
  * @method loginAnon
10462
+ */
10463
  loginAnon: function()
10464
  {
10465
  this.addParam('method', 'smugmug.login.anonymously');
10466
  this.once('complete', this._loginAnonComplete);
10467
  this.request();
10468
  },
10469
+
10470
  /**
10471
  * Anonymous login success handler.
10472
  *
10473
  * @method _loginAnonComplete
10474
  * @param data {Object} A jsonp data object.
10475
  * @protected
10476
+ */
10477
  _loginAnonComplete: function(data)
10478
  {
10479
  if(data.Login) {
10480
  this._sessionID = data.Login.Session.id;
10481
  }
10482
  },
10483
+
10484
  /**
10485
  * Sends an API request using the request url.
10486
  *
10487
  * @method request
10488
+ */
10489
  request: function()
10490
  {
10491
  this.addParam('Callback', '{callback}');
10492
+
10493
  Y.jsonp(this._requestURL, {
10494
  on: {
10495
  success: this._requestComplete,
10500
  args: []
10501
  });
10502
  },
10503
+
10504
  /**
10505
  * API request complete handler.
10506
  *
10507
  * @method _requestComplete
10508
  * @param data {Object} A jsonp data object.
10509
  * @protected
10510
+ */
10511
  _requestComplete: function(data)
10512
  {
10513
  this._resetRequestURL();
10514
+
10515
  /**
10516
  * Fires when a request is complete.
10517
  *
10518
  * @event complete
10519
+ */
10520
  this.fire('complete', data);
10521
  },
10522
+
10523
  /**
10524
+ * Clears all parameters on the request url except
10525
  * the API key and session ID.
10526
  *
10527
  * @method _resetRequestURL
10528
  * @protected
10529
+ */
10530
  _resetRequestURL: function()
10531
  {
10532
  this._requestURL = this.get('apiURL') + '?APIKey=' + this.get('apiKey');
10533
+
10534
  if(this._sessionID) {
10535
  this.addParam('SessionID', this._sessionID);
10536
  }
10537
  }
10538
+
10539
  }, {
10540
+
10541
  /**
10542
  * Static property used to define the default attribute configuration of
10543
  * the Widget.
10548
  * @static
10549
  */
10550
  ATTRS: {
10551
+
10552
  /**
10553
  * SmugMug API url to use for requests.
10554
  *
10559
  apiURL: {
10560
  value: 'https://api.smugmug.com/services/api/json/1.3.0/'
10561
  },
10562
+
10563
  /**
10564
  * SmugMug API key.
10565
  *
10608
  * @method cssSupport
10609
  * @param p {String} The property to check.
10610
  * @returns Boolean
10611
+ */
10612
  cssSupport: function(p)
10613
  {
10614
  var b = document.body || document.documentElement,
10615
  s = b.style,
10616
  v = ['Moz', 'Webkit', 'Khtml', 'O', 'ms', 'Icab'],
10617
  i = 0;
10618
+
10619
  // Transform not working well in these browsers
10620
  if(p == 'transform' && Y.UA.gecko && Y.UA.gecko < 4) { return false; }
10621
  if(p == 'transform' && Y.UA.opera > 0) { return false; }
10622
  if(p == 'transform' && Y.UA.ie > 0 && Y.UA.ie < 10) { return false; }
10623
  if(p == 'transform' && navigator.userAgent.match(/Trident/)) { return false; }
10624
+
10625
  // No css support detected
10626
  if(typeof s == 'undefined') { return false; }
10627
+
10628
  // Tests for standard prop
10629
  if(typeof s[p] == 'string') { return true; }
10630
+
10631
  // Tests for vendor specific prop
10632
  p = p.charAt(0).toUpperCase() + p.substr(1);
10633
+
10634
  for( ; i < v.length; i++) {
10635
  if(typeof s[v[i] + p] == 'string') { return true; }
10636
  }
10638
  };
10639
 
10640
 
10641
+ }, '2.0.0' );
js/fl-slideshow.min.js CHANGED
@@ -1,4 +1,4 @@
1
- YUI.add("fl-event-move",function(t){var e={_isEndEvent:!1,on:function(t,e,i){this.type.indexOf("end")>-1&&(this._isEndEvent=!0),e._direction=this.type.replace("gesturemove","").replace("end",""),window.navigator.msPointerEnabled?(e._startHandle=t.on("MSPointerDown",this._onStart,this,t,e,i),e._moveHandle=t.on("MSPointerMove",this._onMove,this,t,e,i),e._endHandle=t.on("MSPointerUp",this._onEnd,this,t,e,i)):(e._startHandle=t.on("gesturemovestart",this._onStart,null,this,t,e,i),e._moveHandle=t.on("gesturemove",this._onMove,null,this,t,e,i),e._endHandle=t.on("gesturemoveend",this._onEnd,{standAlone:!0},this,t,e,i))},detach:function(t,e,i){e._startHandle.detach(),e._startHandle=null,e._moveHandle.detach(),e._moveHandle=null,e._endHandle.detach(),e._endHandle=null},_onStart:function(t,e,i,s){i._doMove=null,i._startX=t.pageX,i._startY=t.pageY},_onMove:function(t,e,i,s){this._checkDirection(t,i)?i._doMove=!0:i._doMove=!1,i._doMove&&!this._isEndEvent&&s.fire(t)},_onEnd:function(t,e,i,s){i._doMove&&this._isEndEvent&&(t.startPageX=i._startX,t.startPageY=i._startY,s.fire(t)),i._doMove=null},_checkDirection:function(t,e){var i=Math.abs(e._startX-t.pageX),s=Math.abs(e._startY-t.pageY);return s>i&&e._startY>t.pageY&&"vertical"==e._direction||(s>i&&e._startY<t.pageY&&"vertical"==e._direction||(s<i&&e._startX>t.pageX&&"horizontal"==e._direction||s<i&&e._startX<t.pageX&&"horizontal"==e._direction))}};t.Event.define("gesturemovevertical",e),t.Event.define("gesturemoveverticalend",e),t.Event.define("gesturemovehorizontal",e),t.Event.define("gesturemovehorizontalend",e)},"2.0.0",{requires:["event-move"]}),YUI.add("fl-slideshow",function(t){t.namespace("FL").SlideshowCaption=t.Base.create("fl-slideshow-caption",t.Widget,[t.WidgetChild],{_textToggled:!1,_textToggleLink:null,renderUI:function(){var e=this.get("root"),i=this.get("boundingBox");this._textToggleLink=t.Node.create('<a href="javascript:void(0);"></a>'),this._textToggleLink.addClass("fl-slideshow-caption-toggle"),this._textToggleLink.set("innerHTML",e.get("captionMoreLinkText")),i.appendChild(this._textToggleLink)},bindUI:function(){this.get("root").on("imageLoadComplete",t.bind(this._setText,this)),this._textToggleLink.on("click",t.bind(this._toggleText,this))},_setText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=t.get("captionTextLength"),s=this.get("contentBox");return t.imageInfo.caption&&""!==t.imageInfo.caption?(i>-1?!this._textToggled&&i<e.length?(e=this._shortenText(e),this._textToggleLink.setStyle("display","inline-block")):this._textToggled&&i<e.length?(e=this._stripTags(e),this._textToggleLink.setStyle("display","inline-block")):(e=this._stripTags(e),this._textToggleLink.setStyle("display","none")):e=this._stripTags(e),void s.set("innerHTML",e)):(s.set("innerHTML",""),void this._textToggleLink.setStyle("display","none"))},_toggleText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=this.get("contentBox");this._textToggled?(e=this._shortenText(e),this._textToggleLink.set("innerHTML",t.get("captionMoreLinkText")),this._textToggled=!1):(e=this._stripTags(e),this._textToggleLink.set("innerHTML",t.get("captionLessLinkText")),this._textToggled=!0),i.set("innerHTML",e)},_stripTags:function(t,e){var i,s=this.get("root");return(e||s.get("captionStripTags"))&&(i=document.createElement("div"),i.innerHTML=t,t=i.textContent||i.innerText),t},_shortenText:function(e){var i=this.get("root");return e=this._stripTags(e,!0).substring(0,i.get("captionTextLength")),t.Lang.trim(e.substring(0,e.lastIndexOf(" ")))+" ..."}},{CSS_PREFIX:"fl-slideshow-caption",ATTRS:{}}),t.namespace("FL").SlideshowFrame=t.Base.create("fl-slideshow-frame",t.Widget,[t.WidgetParent,t.WidgetChild],{_imageInfo:null,_activeImage:null,_nextImage:null,_loadQueue:null,_transition:null,_transitioning:!1,_resizeAfterTransition:!1,_gestures:null,initializer:function(){var e=this.get("imageConfig");this._activeImage=new t.FL.SlideshowImage(e),this._nextImage=new t.FL.SlideshowImage(e)},renderUI:function(){this.add(this._activeImage),this.add(this._nextImage)},bindUI:function(){var e=this._activeImage.get("boundingBox"),i=this._nextImage.get("boundingBox"),s=this.get("transition");("ontouchstart"in window||window.navigator.msPointerEnabled)&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:e,nextItem:i}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){var t=this._activeImage.get("boundingBox"),e=this._nextImage.get("boundingBox"),i=this.get("contentBox");t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("left","-9999px"),e.setStyle("position","absolute"),e.setStyle("top","0px"),e.setStyle("left","-9999px"),i.setStyle("position","relative"),i.setStyle("overflow","hidden")},load:function(t){var e=this._activeImage._imageInfo;return this._transitioning?void(this._loadQueue=t):void(e&&e.largeURL==t.largeURL||(this._imageInfo=t,this._transitionInit(t)))},preload:function(t,e,i){this._imageInfo=t,this._nextImage.preload(t,e,i)},unload:function(){this._imageInfo=null,this._loadQueue=null,this._transitioning=!1,this._transition=null,this._activeImage.detachAll(),this._activeImage.unload(),this._activeImage.get("boundingBox").setStyle("left","-9999px"),this._nextImage.detachAll(),this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")},resize:function(t,e){if(t&&e){var i=this.get("boundingBox"),s=[parseInt(i.getComputedStyle("paddingTop"),10),parseInt(i.getComputedStyle("paddingRight"),10),parseInt(i.getComputedStyle("paddingBottom"),10),parseInt(i.getComputedStyle("paddingLeft"),10)];t=t-s[1]-s[3],e=e-s[0]-s[2],this.set("width",t),this.set("height",e),this._transitioning?this._resizeAfterTransition=!0:(this._activeImage.resize(t,e),this._nextImage.resize(t,e))}},_getTransition:function(){var t=this.get("root"),e=t.albumInfo.images.length-1,i="next",s=t.get("transition");return null===t.lastImageIndex?i="":t.imageIndex==e&&0===t.lastImageIndex?i="prev":0===t.imageIndex&&t.lastImageIndex==e?i="next":t.lastImageIndex>t.imageIndex?i="prev":t.lastImageIndex<t.imageIndex&&(i="next"),"next"==i?(s=s.replace("slideHorizontal","slideLeft"),s=s.replace("slideVertical","slideUp")):"prev"==i&&(s=s.replace("slideHorizontal","slideRight"),s=s.replace("slideVertical","slideDown")),s},_transitionInit:function(t){this._transitioning=!0,this._gestures&&this._gestures.disable(),this.fire("transitionInit"),t?(this._nextImage.once("loadComplete",this._transitionStart,this),this._nextImage.load(t)):this._transitionStart()},_transitionStart:function(){var e=this.get("root");this.fire("transitionStart"),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextImage._imageInfo?this._nextImage.get("boundingBox"):null,itemOut:this._activeImage._imageInfo?this._activeImage.get("boundingBox"):null,type:this._getTransition(),duration:e.get("transitionDuration"),easing:e.get("transitionEasing"),kenBurnsDuration:e.get("speed")/1e3,kenBurnsZoom:e.get("kenBurnsZoom")}),this._nextImage._imageInfo&&this._nextImage.get("boundingBox").setStyle("left","0px"),this._transition.once("complete",this._transitionComplete,this),this._transition.run()},_transitionComplete:function(){var t=this.get("root");this._swapImageRefs(),this.fire("transitionComplete"),this._transition=null,this._transitioning=!1,this._gestures&&(t&&t.albumInfo.images.length<=1?this._gestures.disable():this._gestures.enable()),this._loadQueue?(this.load(this._loadQueue),this._loadQueue=null):this._resizeAfterTransition&&(this._resizeAfterTransition=!1,this._activeImage.resize(this.get("width"),this.get("height")),this._nextImage.resize(this.get("width"),this.get("height")))},_gesturesMoveStart:function(e){var i=0,s=this.get("root");i="next"==e.direction?s.imageIndex+1:s.imageIndex-1,i=i<0?s.albumInfo.images.length-1:i,i=i>=s.albumInfo.images.length?0:i,s.pause(),s._hideLoadingImage(),s._showLoadingImageWithDelay(),t.FL.SlideshowImageLoader.removeGroup(this._nextImage.get("loadGroup")),this._nextImage.once("loadComplete",s._hideLoadingImage,s),this._nextImage.load(s.albumInfo.images[i])},_gesturesEndComplete:function(){var t=this.get("root"),e=0;this._nextImage._imageInfo&&(e=this._nextImage._imageInfo.index,this._swapImageRefs(),this._imageInfo=t.albumInfo.images[e],t.loadImage(e))},_swapImageRefs:function(){var t=this._activeImage;this._activeImage=this._nextImage,this._nextImage=t,this._nextImage._imageInfo&&(this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")),this._gestures&&(this._gestures.set("activeItem",this._activeImage.get("boundingBox")),this._gestures.set("nextItem",this._nextImage.get("boundingBox")))}},{CSS_PREFIX:"fl-slideshow-frame",ATTRS:{imageConfig:{value:null},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowFullscreen=t.Base.create("fl-slideshow-fullscreen",t.Plugin.Base,[],{active:!1,_closeMessage:null,_closeMessageTimer:null,_initialStyles:{position:"static",top:"0px",left:"0px"},initializer:function(){var e=this.get("host"),i=e.get("boundingBox"),s=this;i.addClass("fl-fullscreen-enabled"),t.FL.SlideshowFullscreen.OS_SUPPORT?(document.addEventListener("fullscreenchange",function(){s._osChange()},!1),document.addEventListener("mozfullscreenchange",function(){s._osChange()},!1),document.addEventListener("webkitfullscreenchange",function(){s._osChange()},!1)):this._renderCloseMessage()},toggle:function(){this.active?this.exit():this.enter()},enter:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osEnter():this._browserEnter()},exit:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osExit():this._browserExit()},_osEnter:function(){var t=this.get("host").get("boundingBox")._node;t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.requestFullScreen&&t.requestFullScreen()},_osExit:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},_osChange:function(){var t=this.get("host");t.frame&&t.frame._transitioning&&t.frame._transitionComplete(),this.active?this._exit():this._enter()},_browserEnter:function(){var e=this.get("host").get("boundingBox");this._initialStyles={position:e.getStyle("position"),top:e.getStyle("top"),left:e.getStyle("left"),zIndex:e.getStyle("zIndex")},e.setStyles({position:"fixed",top:"0px",left:"0px",zIndex:1e4}),t.Node.one("body").on("fl-fullscreen|keydown",t.bind(this._onKey,this)),this._showCloseMessage(),this._enter()},_browserExit:function(){var e=this.get("host").get("boundingBox");e.setStyles({position:this._initialStyles.position,top:this._initialStyles.top,left:this._initialStyles.left,zIndex:this._initialStyles.zIndex}),t.Node.one("body").detach("fl-fullscreen|keydown"),this._hideCloseMessage(),this._exit()},_enter:function(){var t=this.get("host"),e=t.get("boundingBox");e.addClass("fl-fullscreen-active"),this.active=!0,t.resize()},_exit:function(){var t=this.get("host"),e=t.get("boundingBox");e.removeClass("fl-fullscreen-active"),this.active=!1,t.resize()},_onKey:function(t){if(27==t.keyCode)return this.exit(),!1},_renderCloseMessage:function(){this._closeMessage=t.Node.create('<div class="fl-fullscreen-close-message"></div>'),this._closeMessage.set("innerHTML",'<span>Press the "esc" button to exit fullscreen mode.</span>'),this._closeMessage.setStyle("display","none"),this.get("host").get("boundingBox").insert(this._closeMessage)},_showCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.show(!0),this._closeMessageTimer=t.later(4e3,this,this._hideCloseMessage)},_hideCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.hide(!0)}},{NS:"fullscreen",OS_SUPPORT:function(){var t=document.documentElement;return t.webkitRequestFullScreen||t.mozRequestFullScreen||t.requestFullScreen}()}),t.namespace("FL").SlideshowGestures=t.Base.create("fl-slideshow-gestures",t.Base,[],{_startX:null,_startY:null,_touchMoving:!1,_moving:!1,_movingDirection:null,_transitioning:!1,initializer:function(){this.enable()},enable:function(){var e=this.get("id"),i=this.get("direction"),s=this.get("activeItem"),n=this.get("nextItem");s.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|transitionend",t.bind(this._onEndComplete,this)),n.on(e+"|oTransitionEnd",t.bind(this._onEndComplete,this)),n.on(e+"|webkitTransitionEnd",t.bind(this._onEndComplete,this)),"horizontal"==i?(s.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),s.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this)),n.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),n.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this))):(s.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),s.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)),n.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),n.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)))},disable:function(){var t=this.get("id"),e=this.get("activeItem"),i=this.get("nextItem");e.detach(t+"|*"),i.detach(t+"|*")},_onStart:function(t){var e=this.get("direction");this._transitioning&&this._onEndComplete(),"horizontal"==e?this._startX=t.pageX:this._startY=t.pageY,this.fire("start")},_onMoveHorizontal:function(t){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("width"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("left",0),s.setStyles({opacity:1,left:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),i.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),this.fire("move")},_onMoveVertical:function(t){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("height"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("top",0),s.setStyles({opacity:1,left:"auto",top:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),i.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),this.fire("move")},_onEndHorizontal:function(t){if(this._moving){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("width"),10),a=e<0?n:-n;i.transition({transform:"translate("+a+"px, 0px)"}),s.transition({transform:"translate("+a+"px, 0px)"}),this._transitioning=!0,this.fire("end")}},_onEndVertical:function(t){if(this._moving){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("height"),10),a=e<0?n:-n;i.transition({transform:"translate(0px, "+a+"px)"}),s.transition({transform:"translate(0px, "+a+"px)"}),this._transitioning=!0,this.fire("end")}},_onEndComplete:function(){var t=this.get("direction"),e=this.get("activeItem"),i=this.get("nextItem");e.setStyles({opacity:0,"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),i.setStyles({"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),"horizontal"==t?(e.setStyle("left","-9999px"),i.setStyle("left","0px")):(e.setStyle("top","-9999px"),i.setStyle("top","0px")),this.set("activeItem",i),this.set("nextItem",e),this._moving=!1,this._movingDirection=null,this._transitioning=!1,this.fire("endComplete")}},{ATTRS:{direction:{value:"horizontal"},activeItem:{value:null},nextItem:{value:null}}}),t.namespace("FL").SlideshowImageLoader={_loading:!1,_currentImage:null,_currentImageData:null,_queue:[],add:function(t,e,i,s){var n={group:t,src:e,callback:i};s?this._queue.unshift(n):this._queue.push(n),this._loading||this._load()},removeGroup:function(t){for(var e=this._queue.length-1;e>-1;e--)this._queue[e].group==t&&this._queue.splice(e,1);this._currentImageData&&this._currentImageData.group==t&&(this._currentImage.detachAll(),this._currentImage=null,this._currentImageData=null,this._queue.length>0?this._load():this._loading=!1)},_load:function(){this._loading=!0,this._currentImageData=this._queue.shift(),this._currentImage=t.Node.create("<img />"),this._currentImage.on("error",t.bind(this._loadComplete,this)),this._currentImage.on("load",t.bind(this._loadComplete,this)),this._currentImage.set("src",this._currentImageData.src)},_loadComplete:function(){this._currentImageData.callback&&this._currentImageData.callback(this._currentImage),this._queue.length>0?this._load():(this._loading=!1,this._currentImage=null,this._currentImageData=null)}},t.namespace("FL").SlideshowImage=t.Base.create("fl-slideshow-image",t.Widget,[t.WidgetChild],{_imageInfo:null,_image:null,_loading:!1,_loadingURL:null,_videoButton:null,_videoBox:null,_video:null,CONTENT_TEMPLATE:null,syncUI:function(){var t=this.get("boundingBox");this.get("crop")&&(t.setStyle("overflow","hidden"),t.addClass("fl-slideshow-image-cropped"))},load:function(t){this._imageInfo=t,this._loading=!0,this._load()},preload:function(e,i,s){var n=this._isVideo(),a=this.get("loadVideos"),o=this.get("showVideoButton");this.unload(),this.set("width",i),this.set("height",s),this._imageInfo=e,(!n||!a||n&&a&&o)&&t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._getImageURL(),t.bind(this._imagePreloaded,this),this.get("loadPriority"))},_imagePreloaded:function(t){this._image=t},unload:function(){this._image&&(this._image.remove(),this._image.detachAll(),this._image.set("src",""),this._image=null),this._video&&(this._video.remove(),this._video=null),this._videoButton&&(this._videoButton.remove(),this._videoButton=null),this._videoBox&&this._removeVideoBox(),this._imageInfo=null,this._loading=!1,this._loadingURL=null},resize:function(t,e){var i=2*parseInt(this.get("boundingBox").getComputedStyle("borderTopWidth"),10),s=this.get("boundingBox");this.set("width",t-i),this.set("height",e-i),s.setStyle("width",t-i+"px"),s.setStyle("height",e-i+"px"),this._videoButton&&this._positionVideoButton(),this._videoBox&&this._loadVideo(),this._loading||(this._imageInfo&&this._load(),this._image&&this._positionImage())},_load:function(){var t=this.get("loadVideos"),e=this.get("showVideoButton");!this._isVideo()||!t||e||"ontouchstart"in window?this._loadImage():this._loadVideo()},_loadImage:function(){var e=this._getImageURL(),i=this.get("loadVideos");e!=this._loadingURL&&(this._loadingURL=e,t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._loadingURL,t.bind(this._loadImageComplete,this),this.get("loadPriority")),this._loading&&(this._isVideo()&&i&&this._insertVideoButton(),this.fire("loadStart")))},_loadImageComplete:function(t){var e=this.get("boundingBox"),i=this.get("showVideoButton");this._image=t,this._image.setStyle("visibility","hidden"),this._image.addClass("fl-slideshow-image-img"),this._image.detachAll(),this._video&&!i&&(this._video.remove(),this._video=null),e.all("img").remove(),e.append(this._image),this._setupImage(),this._resizeImage(),this._positionImage(),this._image.setStyle("visibility","visible"),this._loadingURL=null,this._loading&&(this._loading=!1,this.fire("loadComplete"))},_setupImage:function(){var t=this.get("boundingBox");"undefined"!=typeof this._image._node.style.msInterpolationMode&&(this._image._node.style.msInterpolationMode="bicubic"),this.get("protect")&&(t.delegate("contextmenu",this._protectImage,"img"),t.delegate("mousedown",this._protectImage,"img"))},_protectImage:function(t){return t.preventDefault(),!1},_resizeImage:function(){var t=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),e=this._image.get("width"),i=this._image.get("height"),s=parseInt(this.get("boundingBox").getComputedStyle("width"),10),n=parseInt(this.get("boundingBox").getComputedStyle("height"),10),a=0,o=0,l=0,h=0,r=this.get("cropHorizontalsOnly"),g=i>e,u=!1;this._imageInfo&&this.get("checkFilenamesForNoCrop")&&(u=this._imageInfo.filename.indexOf("nocrop")>-1),!this.get("crop")||r&&g||u?(l=e/s,h=i/n,h>l?(a=Math.round(e*(1/h)),o=Math.round(i*(1/h))):(a=Math.round(e*(1/l)),o=Math.round(i*(1/l)))):(a=s,o=Math.round(i*s/e),o<n&&(o=n,a=Math.round(e*n/i))),this.get("crop")||this.get("upsize")||!(a>e||o>i)||(a=e,o=i),a-=t,o-=t,this._image.setStyle("width",a+"px"),this._image.setStyle("height",o+"px"),!this.get("crop")&&this.get("constrainWidth")&&this.set("width",a+"px"),!this.get("crop")&&this.get("constrainHeight")&&this.set("height",o+"px")},_positionImage:function(){var t=this.get("position").split(" "),e=""===t[0]?"center":t[0],i=""===t[1]?"center":t[1],s=0,n=0,a=parseInt(this.get("boundingBox").getComputedStyle("width"),10),o=parseInt(this.get("boundingBox").getComputedStyle("height"),10),l=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),h=parseInt(this._image.getComputedStyle("width"),10)+l,r=parseInt(this._image.getComputedStyle("height"),10)+l;isNaN(h)&&isNaN(r)||("left"==e&&(s=0),"center"==e&&(s=(a-h)/2),"right"==e&&(s=a-h),"top"==i&&(n=0),"center"==i&&(n=(o-r)/2),"bottom"==i&&(n=o-r),this._image.setStyles({left:s,top:n}))},_getImageURL:function(){var t=0,e=0,i=0,s=this.get("width"),n=this.get("height"),a=this.get("useThumbSizes"),o=this._imageInfo,l=[o.tinyURL||o.thumbURL||o.largeURL,o.thumbURL||o.largeURL,o.smallURL||o.largeURL,o.mediumURL||o.largeURL||o.smallURL,o.largeURL||o.mediumURL||o.smallURL,o.xlargeURL||o.largeURL||o.mediumURL||o.smallURL,o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL,o.x3largeURL||o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL];return t=a&&s<=100?0:a&&s<=150?1:s<=400?2:s>=400&&s<=600?3:s>=600&&s<=800?4:s>=800&&s<=1024?5:s>=1024&&s<=1280?6:7,e=a&&n<=100?0:a&&n<=150?1:n<=300?2:n>=300&&n<=450?3:n>=450&&n<=600?4:n>=600&&n<=768?5:n>=768&&n<=960?6:7,i=Math.max(t,e),l[i]},_isVideo:function(){return!!this._imageInfo&&("mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType||""!==this._imageInfo.iframe)},_loadVideo:function(){var t=this.get("boundingBox"),e=this.get("showVideoButton"),i=!!e;this._video&&(this._video.remove(),this._video=null),"mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType?this._video=this._getSmugMugVideoEmbed(this._imageInfo,i):""!==this._imageInfo.iframe&&(this._video=this._getIframeVideoEmbed(this._imageInfo,i)),this._videoBox?this._videoBox.one(".fl-slideshow-video-wrap").insert(this._video):(t.all("img").remove(),t.append(this._video)),this._loading&&(this._loading=!1,this.fire("loadComplete"))},_insertVideoButton:function(){var e=this.get("boundingBox"),i="ontouchstart"in window?"touchstart":"click";this._videoButton=t.Node.create('<a class="fl-slideshow-video-button" href="javascript:void(0);"></a>'),this._videoButton.on(i,t.bind(this._showVideoBox,this)),e.insert(this._videoButton),this._positionVideoButton()},_positionVideoButton:function(){var t=this.get("width"),e=this.get("height"),i=parseInt(this._videoButton.getStyle("width"),10),s=parseInt(this._videoButton.getStyle("height"),10);this._videoButton.setStyles({left:(t-i)/2,top:(e-s)/2})},_showVideoBox:function(){var e=this.get("root"),i=t.Node.create('<div class="fl-slideshow-video-wrap"></div>'),s=t.Node.create('<a class="fl-slideshow-video-close" href="javascript:void(0);"></a>'),n="ontouchstart"in window?"touchstart":"click";this._videoBox=t.Node.create('<div class="fl-slideshow-video"></div>'),this._videoBox.setStyle("padding",e.get("boundingBox").getStyle("padding")),this._videoBox.insert(i),this._videoBox.insert(s),this._videoBox.on(n,t.bind(this._removeVideoBox,this)),s.on(n,t.bind(this._removeVideoBox,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&s.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),t.one("body").insert(this._videoBox),this._loadVideo(),t.one("body").on("fl-slideshow-image|keydown",this._onKey,this)},_getSmugMugVideoEmbed:function(e,i){var s=document.createElement("video"),n=0,a="",o="",l="";return null!==t.UA.mobile&&s.canPlayType&&s.canPlayType("video/mp4")?(n=this.get("width"),a="http://www.smugmug.com/photos/"+e.id+"_"+e.key+"-"+n+".mp4",l+='<video width="100%" height="100%" poster="'+this._getImageURL()+'" controls preload="none"',i&&(l+=" autoplay"),l+=">",l+='<source src="'+a+'" type="video/mp4" />',l+="</video>"):(o="imageId="+e.id,o+="&amp;imageKey="+e.key,o+="&amp;albumId="+e.albumId,o+="&amp;albumKey="+e.albumKey,o+="&amp;apiURL=http://api.smugmug.com/&amp;hostLevel=live&amp;isPro=true",o+=i?"&amp;autoPlay=true":"&amp;autoPlay=false",l+='<object type="application/x-shockwave-flash" width="100%" height="100%" data="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="movie" value="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="allowFullScreen" value="true">',l+='<param name="wmode" value="transparent">',l+='<param name="flashVars" value="'+o+'">',l+='<embed src="http://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf" flashvars="'+o+'" width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent">',l+="</object>"),t.Node.create(l)},_getIframeVideoEmbed:function(e,i){var s='<iframe width="100%" height="100%" frameborder="0" allowfullscreen ',n=e.iframe;return i&&(n+=n.indexOf("?")>-1?"&autoplay=1":"?autoplay=1"),s+='src="'+n+'"></iframe>',t.Node.create(s)},_removeVideoBox:function(e){"undefined"!=typeof e&&e.target&&e.target.get("className").indexOf("fl-slideshow-video")<0||(null!==this._videoBox&&(this._videoBox.remove(),this._videoBox=null,this._video=null),t.one("body").detach("fl-slideshow-image|keydown",this._onKey))},_onKey:function(t){if(27==t.keyCode)return this._removeVideoBox(),!1}},{CSS_PREFIX:"fl-slideshow-image",ATTRS:{loadGroup:{value:"none"},loadPriority:{value:!1},crop:{value:!1},checkFilenamesForNoCrop:{value:!0},cropHorizontalsOnly:{value:!1},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},useThumbSizes:{value:!1},constrainWidth:{value:!1},constrainHeight:{value:!1},loadVideos:{value:!0},showVideoButton:{value:!0}}}),t.namespace("FL").SlideshowMouseNav=t.Base.create("fl-slideshow-mouse-nav",t.Plugin.Base,[],{initializer:function(){var t=this.get("trigger");t.on("click",this._triggerClick,this),t.on("mousemove",this._showArrow,this),t.on("mouseleave",this._hideArrow,this)},_triggerClick:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;a>=s/2?e.nextImage():e.prevImage()},_showArrow:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;null!==e.albumInfo&&e.albumInfo.images.length>1&&(a>=s/2?(i.removeClass("fl-slideshow-mouse-nav-prev"),i.addClass("fl-slideshow-mouse-nav-next")):(i.removeClass("fl-slideshow-mouse-nav-next"),i.addClass("fl-slideshow-mouse-nav-prev")))},_hideArrow:function(){var t=this.get("trigger");t.removeClass("fl-slideshow-mouse-nav-next"),t.removeClass("fl-slideshow-mouse-nav-prev")}},{NS:"mouseNav",ATTRS:{trigger:{value:null}}}),t.namespace("FL").SlideshowKenBurns=t.Base.create("fl-slideshow-ken-burns",t.Base,[],{run:function(){var e=null,i=null;t.FL.Utils.cssSupport("transform")&&(e=this.get("image").one("img"),i=this._getTransform(),e.setStyles({"-webkit-transform-origin":i.origin,"-moz-transform-origin":i.origin,"-ms-transform-origin":i.origin,"transform-origin":i.origin,transform:i.start}),e.transition({easing:"ease-out",duration:this.get("duration"),transform:i.end}))},_getTransform:function(){var e=this.get("zoom"),i=this.get("image"),s=0,n=null,a=null;return s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS.length),n=t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS[s],s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.TRANSFORMS.length),a=t.FL.SlideshowKenBurns.TRANSFORMS[s],i.hasClass("fl-slideshow-image-cropped")||"in"!=n?"out"==n?(a.start="scale("+e+") "+a.translate,a.end="scale(1) translate(0, 0)"):(a.start="scale(1) translate(0, 0)",a.end="scale("+e+") "+a.translate):(s=Math.floor(2*Math.random()),a.start=0===s?"scale(1) translate(100px, 0)":"scale(1) translate(-100px, 0)",a.end="scale("+e+") translate(0, 0)",a.origin="center center"),a}},{ATTRS:{image:{value:null},zoom:{value:1.2},duration:{value:2}},ZOOM_DIRECTIONS:["in","out"],TRANSFORMS:[{origin:"left top",translate:"translate(-30px, -15px)"},{origin:"left center",translate:"translate(-30px, 0)"},{origin:"left bottom",translate:"translate(-30px, 15px)"},{origin:"right top",translate:"translate(30px, -15px)"},{origin:"right center",translate:"translate(30px, 0)"},{origin:"right bottom",translate:"translate(30px, 15px)"}]}),t.namespace("FL").SlideshowNav=t.Base.create("fl-slideshow-nav",t.Widget,[t.WidgetChild],{_buttons:null,_buttonsContainer:null,_buttonsLeftContainer:null,_buttonsRightContainer:null,_fontIcons:{buy:"Cart",caption:"InfoEncircled",close:"XCrossEncircled",fullscreen:"ScreenExpand",next:"ArrowRight",nextPage:"ArrowRight",pause:"PlayerPause",play:"PlayerPlay",prev:"ArrowLeft",prevPage:"ArrowLeft",social:"Heart",thumbs:"ViewThumbGrid"},CONTENT_TEMPLATE:null,renderUI:function(){this._renderContainers(),this._renderButtons(),this._renderFontIcons()},bindUI:function(){var t=this.get("root"),e=this.get("id");this._buttons.prev&&this._buttons.prev.on("click",t.prevImage,t),this._buttons.next&&this._buttons.next.on("click",t.nextImage,t),this._buttons.play&&(this._buttons.play.on("click",this._playClicked,this),t.on(e+"|played",this._showPauseButton,this),t.on(e+"|paused",this._showPlayButton,this),t._playing?this._showPauseButton():this._showPlayButton()),this._buttons.buy&&(t.on(e+"|albumLoadComplete",this._updateBuy,this),null!==t.albumInfo&&this._updateBuy()),this._buttons.count&&t.on(e+"|imageLoadComplete",this._updateCount,this),this._buttons.thumbs&&this._buttons.thumbs.on("click",t._toggleThumbs,t),this._buttons.caption&&(t.on(e+"|imageLoadComplete",this._updateCaption,this),this._updateCaption()),this._buttons.social&&this._buttons.social.on("click",t._toggleSocial,t),this._buttons.fullscreen&&t.fullscreen&&this._buttons.fullscreen.on("click",t.fullscreen.toggle,t.fullscreen),this._buttons.close&&this._buttons.close.on("click",t.hide,t)},destructor:function(){var t=this.get("root"),e=this.get("id");t.detach(e+"|*")},_renderContainers:function(){var e=this.get("contentBox"),i=this.get("buttonsLeft"),s=this.get("buttonsRight");this._buttonsContainer=t.Node.create("<div></div>"),this._buttonsContainer.addClass("fl-slideshow-nav-buttons"),e.appendChild(this._buttonsContainer),i.length>0&&(this._buttonsLeftContainer=t.Node.create("<div></div>"),this._buttonsLeftContainer.addClass("fl-slideshow-nav-buttons-left"),e.appendChild(this._buttonsLeftContainer)),s.length>0&&(this._buttonsRightContainer=t.Node.create("<div></div>"),this._buttonsRightContainer.addClass("fl-slideshow-nav-buttons-right"),e.appendChild(this._buttonsRightContainer))},_renderButtons:function(){var e="",i=0,s=0,n=[{names:this.get("buttons"),container:this._buttonsContainer},{names:this.get("buttonsLeft"),container:this._buttonsLeftContainer},{names:this.get("buttonsRight"),container:this._buttonsRightContainer}];for(this._buttons={};i<n.length;i++)for(s=0;s<n[i].names.length;s++)e=n[i].names[s],e.indexOf("count")>-1?(this._buttons[e]=t.Node.create("<span></span>"),
2
- this._updateCount()):this._buttons[e]=t.Node.create('<a href="javascript:void(0);"></a>'),e.indexOf("buy")>-1&&this._buttons[e].setStyle("display","none"),this._buttons[e].set("name",e),this._buttons[e].addClass("fl-slideshow-nav-"+e),n[i].container.appendChild(this._buttons[e])},_renderFontIcons:function(){var t=null;if(this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"])for(t in this._buttons)"undefined"!=typeof this._buttons[t]&&"undefined"!=typeof this._fontIcons[t]?(this._buttons[t].addClass("sm-fonticon-"+this._fontIcons[t]),this._buttons[t].addClass("sm-fonticon sm-button-skin-default sm-button-nochrome")):t.indexOf("count")>-1&&this._buttons[t].addClass("fonticons-enabled")},_updateCount:function(){var e="",i=t.FL.SlideshowNav.COUNT_TEXT,s=1,n=1;this.get("root").albumInfo&&(s=this.get("root").imageInfo.index+1,n=this.get("root").albumInfo.images.length),e=i.replace("{current}",s).replace("{total}",n),this._buttons.count.set("innerHTML",e)},_updateCaption:function(){var t=this.get("root"),e=t.imageInfo;e&&""===e.caption?(t.caption.slideshowOverlay.enable(),t.caption.slideshowOverlay.hide(),this._buttons.caption.detach("click"),this._buttons.caption.addClass("fl-slideshow-nav-caption-disabled")):(this._buttons.caption.on("click",t._toggleCaption,t),this._buttons.caption.removeClass("fl-slideshow-nav-caption-disabled"))},_updateBuy:function(){var e=null,i=this.get("root"),s=i.get("source")[i.albumIndex],n=i.albumIndex,a=i.get("source")[n];s&&"smugmug"==s.type&&("undefined"!=typeof i.albumInfo.printable?this._updateBuyComplete():(e=new t.FL.SmugMugAPI,e.addParam("method","smugmug.albums.getInfo"),e.addParam("AlbumID",a.id),e.addParam("AlbumKey",a.key),e.on("complete",this._updateBuyComplete,this),e.request()))},_updateBuyComplete:function(t){var e=this.get("root"),i="undefined"==typeof t?e.albumInfo.printable:t.Album.Printable,s=e.albumInfo.link;i?(e.albumInfo.printable=!0,this._buttons.buy.set("href","https://secure.smugmug.com/cart/batchadd/?url="+encodeURIComponent(s)),this._buttons.buy.setStyle("display","inline-block")):(e.albumInfo.printable=!1,this._buttons.buy.setStyle("display","none")),this.fire("resize")},_playClicked:function(){var t=this.get("root");t._playing?t.pause():t.play()},_showPlayButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-pause"),this._buttons.play.addClass("fl-slideshow-nav-play"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPause"),this._buttons.play.addClass("sm-fonticon-PlayerPlay"))},_showPauseButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-play"),this._buttons.play.addClass("fl-slideshow-nav-pause"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPlay"),this._buttons.play.addClass("sm-fonticon-PlayerPause"))}},{CSS_PREFIX:"fl-slideshow-nav",COUNT_TEXT:"{current} of {total}",ATTRS:{buttons:{value:[],writeOnce:!0},buttonsLeft:{value:[],writeOnce:!0},buttonsRight:{value:[],writeOnce:!0},useFontIcons:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowOverlay=t.Base.create("fl-slideshow-overlay",t.Plugin.Base,[],{_focus:!1,_visible:!0,_disabled:!1,_showProps:{duration:.5,easing:"ease-out",opacity:1},_hideProps:{duration:.5,easing:"ease-out",opacity:0},_hideTimer:null,initializer:function(){var t=this.get("host").get("boundingBox");this.afterHostEvent("render",this._initFocus),this.afterHostEvent("render",this._initVisibility),this.get("closeButton")&&this._initCloseButton(),t.addClass("fl-slideshow-overlay")},destructor:function(){this._hideTimerCancel()},_initFocus:function(){var e=this.get("host").get("boundingBox");e.on("mouseenter",t.bind(this._setFocusOnMouseenter,this)),e.on("mouseleave",t.bind(this._setFocusOnMouseleave,this))},_initVisibility:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");this.get("visible")||("display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),t.setStyle("opacity","0"),this._visible=!1)},_initCloseButton:function(){var e=this.get("host").get("boundingBox"),i=null;i=t.Node.create('<a class="fl-slideshow-overlay-close" href="javascript:void(0);"></a>'),i.on("click",t.bind(this._closeButtonClick,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&i.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),e.insert(i)},_closeButtonClick:function(){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this))},_setFocusOnMouseenter:function(){this._focus=!0},_setFocusOnMouseleave:function(){this._focus=!1},disable:function(){this._disabled=!0},enable:function(){this._disabled=!1},show:function(){var e=this.get("host").get("boundingBox"),i=this.get("hideStyle");this._disabled||("display"==i?e.setStyle("display","block"):"left"==i&&e.setStyle("left","auto"),e.transition(this._showProps,t.bind(this._showComplete,this)),this.fire("showStart"))},_showComplete:function(){this._visible=!0,this.hideWithTimer(),this.fire("showComplete")},hide:function(){if(!this._focus&&!this._disabled){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this)),this.fire("hideStart")}},hideWithTimer:function(){this._hideTimerCancel(),this._hideTimer=t.later(this.get("hideDelay"),this,this.hide)},_hideTimerCancel:function(){this._hideTimer&&(this._hideTimer.cancel(),this._hideTimer=null)},_hideComplete:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");"display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),this._visible=!1,this.fire("hideComplete")}},{NS:"slideshowOverlay",ATTRS:{closeButton:{value:!1,writeOnce:!0},hideDelay:{value:3e3,writeOnce:!0},hideStyle:{value:"display",writeOnce:!0},visible:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowSocial=t.Base.create("fl-slideshow-social",t.Widget,[t.WidgetChild],{_buttons:null,renderUI:function(){this._buttons={},this.get("root").get("googlePlusButtonEnabled")&&this._renderGooglePlusButton()},bindUI:function(){var e=this.get("root");e.get("likeButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateLikeButton,this)),e.get("tweetButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateTweetButton,this)),e.get("googlePlusButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateGooglePlusButton,this)),e.get("pinterestButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updatePinterestButton,this))},_updateLikeButton:function(){var e=null,i=this.get("contentBox"),s=this.get("root"),n=s.albumIndex,a=s.get("source")[n],o=s.imageInfo;this._buttons.like&&(this._buttons.like.remove(),this._buttons.like=null),"smugmug"==a.type?(e="https://www.facebook.com/plugins/like.php?",e+="href=http://www.smugmug.com/services/graph/gallery/",e+=a.id+"_"+a.key+"/"+o.id+"_"+o.key):(e="https://www.facebook.com/plugins/like.php?",e+="href="+encodeURIComponent(o.largeURL)),e+="&send=false",e+="&layout=button_count",e+="&width=90",e+="&show_faces=false",e+="&action=like",e+="&colorscheme=light",e+="&height=21",this._buttons.like=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.like.setStyles({overflow:"hidden",width:"90px",height:"21px"}),i.appendChild(this._buttons.like)},_updateTweetButton:function(){var e=null,i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.tweet&&(this._buttons.tweet.remove(),this._buttons.tweet=null),e="https://platform.twitter.com/widgets/tweet_button.html?",e+="url="+encodeURIComponent(i.largeURL),e+="&count=none",this._buttons.tweet=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.tweet.setStyles({overflow:"hidden",width:"90px",height:"21px"}),s.appendChild(this._buttons.tweet)},_renderGooglePlusButton:function(){var t,e;t=document.createElement("script"),t.type="text/javascript",t.src="https://apis.google.com/js/plusone.js",e=document.getElementsByTagName("head")[0],e.parentNode.appendChild(t)},_updateGooglePlusButton:function(){"undefined"==typeof gapi?setTimeout(t.bind(this._updateGooglePlusButtonCallback,this),500):this._updateGooglePlusButtonCallback()},_updateGooglePlusButtonCallback:function(){var e=this.get("root").imageInfo,i=this.get("contentBox");this._buttons.plus&&(this._buttons.plus.remove(),this._buttons.plus=null),"undefined"!=typeof gapi&&(this._buttons.plus=t.Node.create("<div></div>"),i.appendChild(this._buttons.plus),gapi.plusone.render(this._buttons.plus._node,{href:encodeURIComponent(e.largeURL),annotation:"bubble",size:"medium"}))},_updatePinterestButton:function(){var e="https://pinterest.com/pin/create/button/",i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.pin&&(this._buttons.pin.remove(),this._buttons.pin=null),e+="?url="+encodeURIComponent(window.location.href),e+="&media="+encodeURIComponent(i.mediumURL),e+="&description="+encodeURIComponent(i.caption),this._buttons.pin=t.Node.create("<a></a>"),this._buttons.pin.setAttribute("data-pin-config","none"),this._buttons.pin.setAttribute("data-pin-do","buttonPin"),this._buttons.pin.setAttribute("href",e),this._buttons.pin.setAttribute("target","_blank"),this._buttons.pin.set("innerHTML",'<img src="https://assets.pinterest.com/images/pidgets/pin_it_button.png" border="0" />'),s.appendChild(this._buttons.pin)}},{CSS_PREFIX:"fl-slideshow-social",ATTRS:{}}),t.namespace("FL").SlideshowThumbs=t.Base.create("fl-slideshow-thumbs",t.Widget,[t.WidgetParent,t.WidgetChild],{_clipBox:null,_pagesBox:null,_activePageBox:null,_activePageIndex:0,_nextPageBox:null,_activeImages:null,_nextImages:null,_prevImages:null,_leftNav:null,_rightNav:null,_topNav:null,_bottomNav:null,_bbHeight:0,_bbWidth:0,_cbWidth:0,_clipBoxMarginLeft:0,_clipBoxTop:0,_colsPerPage:0,_rowsPerPage:0,_imagesPerPage:0,_numPages:0,_pageHeight:0,_pageWidth:0,_horizontalSpacing:0,_verticalSpacing:0,_leftNavWidth:0,_rightNavWidth:0,_transition:null,_transitioning:!1,_transitionDirection:"next",_gestures:null,initializer:function(){this._activeImages=[],this._nextImages=[],this._prevImages=[]},renderUI:function(){this._renderBoxes(),this._renderNavs()},bindUI:function(){var e=this.get("root"),i=this.get("id"),s=this.get("transition");e.on(i+"|albumLoadComplete",this._albumLoadComplete,this),"ontouchstart"in window&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:this._activePageBox,nextItem:this._nextPageBox}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){this._syncBoxes(),this._syncNavs()},destructor:function(){var e=this.get("root"),i=this.get("id");e.detach(i+"|*"),t.FL.SlideshowImageLoader.removeGroup("thumbs")},unload:function(){var e=this.get("root"),i=this.get("id"),s=0;for(e.detach(i+"|imageLoadComplete"),t.FL.SlideshowImageLoader.removeGroup("thumbs");s<this._activeImages.length;s++)this._activeImages[s].unload()},resize:function(){this._setSizeInfo(),this._togglePageButtons(),this._resizeBoxes(),this._resizeNavs(),this.get("root").albumInfo&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._renderActivePage(),this._preloadNextPage(),this._preloadPrevPage()),this._gestures&&this._numPages<2?this._gestures.disable():this._gestures&&this._gestures.enable()},prevPage:function(){this._transitioning||this._transitionStart("prev")},nextPage:function(){this._transitioning||this._transitionStart("next")},_albumLoadComplete:function(){var t=this.get("root"),e=this.get("id");t.once(e+"|imageLoadComplete",this.resize,this),t.on(e+"|imageLoadComplete",this._imageLoadComplete,this)},_imageLoadComplete:function(){var e=this.get("root").albumInfo,i=t.one(".fl-slideshow-image-active"),s=i?i._imageInfo:null,n=null,a=this.get("root").imageInfo;this._setActiveImage(this._activeImages),n=t.one(".fl-slideshow-image-active"),i&&!n&&(0===a.index&&s.index===e.images.length-1?this.nextPage():0===s.index&&a.index===e.images.length-1?this.prevPage():s.index<a.index?this.nextPage():s.index>a.index&&this.prevPage())},_renderBoxes:function(){this._clipBox=t.Node.create("<div></div>"),this._clipBox.addClass("fl-slideshow-thumbs-clip"),this.get("contentBox").insert(this._clipBox),this._pagesBox=t.Node.create("<div></div>"),this._pagesBox.addClass("fl-slideshow-thumbs-pages"),this._clipBox.insert(this._pagesBox),this._activePageBox=t.Node.create("<div></div>"),this._activePageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._activePageBox),this._nextPageBox=t.Node.create("<div></div>"),this._nextPageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._nextPageBox)},_syncBoxes:function(){this._activePageBox.setStyle("left","0"),this._nextPageBox.setStyle("left","-9999px")},_resizeBoxes:function(){this.set("width",this._bbWidth),this.set("height",this._bbHeight),this.get("contentBox").setStyle("width",this._cbWidth+"px"),this._clipBox.setStyle("width",this._pageWidth+"px"),this._clipBox.setStyle("height",this._pageHeight+"px"),this._clipBox.setStyle("padding",this._verticalSpacing+"px 0 0 "+this._horizontalSpacing+"px "),this._clipBox.setStyle("margin","0 0 0 "+this._clipBoxMarginLeft+"px"),this._clipBox.setStyle("top",this._clipBoxTop),this._pagesBox.setStyle("width",this._pageWidth+"px"),this._pagesBox.setStyle("height",this._pageHeight+"px"),this._activePageBox.setStyle("width",this._pageWidth+"px"),this._activePageBox.setStyle("height",this._pageHeight+"px"),this._nextPageBox.setStyle("width",this._pageWidth+"px"),this._nextPageBox.setStyle("height",this._pageHeight+"px")},_renderActivePage:function(){var t=0,e=this.get("root"),i=this._imagesPerPage*this._activePageIndex,s=i+this._imagesPerPage,n=e.albumInfo.images;for(this._clearActiveImage();t<this._activeImages.length;t++)this._activeImages[t].remove(),this._activeImages[t].unload(),this._activeImages[t].get("boundingBox")._imageInfo=null,this._activeImages[t].get("boundingBox").remove();for(t=0;i<s&&n[i];i++)this._renderImage(this._activeImages,t,this._activePageBox,n[i]),t++;this._setActiveImage(this._activeImages)},_renderNextPage:function(){var t=0,e="next"==this._transitionDirection?this._nextImages:this._prevImages;for(this._nextPageBox.get("children").remove();t<e.length&&e[t]._imageInfo;t++)this._renderImage(e,t,this._nextPageBox,e[t]._imageInfo);this._setActiveImage(e)},_preloadNextPage:function(){var t=this._activePageIndex+1>=this._numPages?0:this._activePageIndex+1;this._preloadPage(t,this._nextImages)},_preloadPrevPage:function(){var t=this._activePageIndex-1<0?this._numPages-1:this._activePageIndex-1;this._preloadPage(t,this._prevImages)},_preloadPage:function(t,e){var i=0,s=this.get("root"),n=s.albumInfo.images,a=t*this._imagesPerPage,o=a+this._imagesPerPage,l=this.get("imageConfig"),h=l.width,r=l.height;if(this._numPages>1){for(;i<e.length;i++)e[i].remove(),e[i].unload();for(i=0;a<o;a++)n[a]&&(this._renderImage(e,i),e[i].preload(n[a],h,r),i++)}},_renderImage:function(e,i,s,n){var a=null,o=this.get("imageConfig");"undefined"==typeof e[i]&&(o.loadGroup="thumbs",o.useThumbSizes=!0,o.loadVideos=!1,e[i]=new t.FL.SlideshowImage(o),a=e[i].get("boundingBox"),a.on("click",this._imageClick,this),a.on("mouseover",this._imageMouseover,this),a.on("mouseout",this._imageMouseout,this)),a=e[i].get("boundingBox"),a.setStyle("margin","0 "+this._horizontalSpacing+"px "+this._verticalSpacing+"px 0"),s&&(this._childrenContainer=s,this.add(e[i]),e[i].resize(o.width,o.height)),n&&(e[i].load(n),a._imageInfo=n)},_uiAddChild:function(t,e){t.render(e),e.appendChild(t.get("boundingBox"))},_imageClick:function(t){var e=this.get("root");this.get("pauseOnClick")&&e.pause(),e.loadImage(t.currentTarget._imageInfo.index),this.fire("imageClick")},_setActiveImage:function(t){var e=0;for(this._clearActiveImage();e<t.length;e++)if(t[e]._imageInfo&&t[e]._imageInfo.index==this.get("root").imageInfo.index){t[e].get("boundingBox").addClass("fl-slideshow-image-active");break}},_clearActiveImage:function(){var e=t.one(".fl-slideshow-image-active");e&&e.removeClass("fl-slideshow-image-active")},_getTransition:function(){var t=this.get("transition");return"slideHorizontal"==t&&"next"==this._transitionDirection?"slideLeft":"slideHorizontal"==t&&"prev"==this._transitionDirection?"slideRight":"slideVertical"==t&&"next"==this._transitionDirection?"slideUp":"slideVertical"==t&&"prev"==this._transitionDirection?"slideDown":t},_transitionStart:function(e){this._numPages>1&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e,this._transitioning=!0,this._nextPageBox.setStyle("left","0px"),this._renderNextPage(),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextPageBox,itemOut:this._activePageBox,type:this._getTransition(),duration:this.get("transitionDuration"),easing:this.get("transitionEasing")}),this._transition.once("complete",this._transitionComplete,this),this._transition.run(),this._gestures&&this._gestures.disable())},_transitionComplete:function(){this._swapPageRefs(),this._transitioning=!1,this._transitionDirection="",this._transition=null,this._gestures&&this._gestures.enable(),this.fire("transitionComplete")},_gesturesMoveStart:function(e){t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e.direction,this._renderNextPage()},_gesturesEndComplete:function(){this._swapPageRefs(),this._transitionDirection="",this.fire("transitionComplete")},_swapPageRefs:function(){var t=this._activePageBox,e=this._activeImages;this._activePageBox=this._nextPageBox,this._nextPageBox=t,this._nextPageBox.setStyle("left","-9999px"),"next"==this._transitionDirection?(this._activeImages=this._nextImages,this._nextImages=e):(this._activeImages=this._prevImages,this._prevImages=e),"next"==this._transitionDirection&&this._activePageIndex+1<this._numPages?this._activePageIndex++:"next"==this._transitionDirection?this._activePageIndex=0:"prev"==this._transitionDirection&&this._activePageIndex-1>-1?this._activePageIndex--:"prev"==this._transitionDirection&&(this._activePageIndex=this._numPages-1),this._gestures&&(this._gestures.set("activeItem",this._activePageBox),this._gestures.set("nextItem",this._nextPageBox)),this._preloadNextPage(),this._preloadPrevPage()},_renderNavs:function(){var e=this.get("topNavButtons"),i=this.get("rightNavButtons"),s=this.get("bottomNavButtons"),n=this.get("leftNavButtons");this.get("topNavEnabled")&&e.length>0&&(this._topNav=new t.FL.SlideshowNav({buttons:e}),this._topNav.get("boundingBox").addClass("fl-slideshow-thumbs-top-nav"),this.add(this._topNav),this._topNav.render(this.get("contentBox")),this._clipBox.insert(this._topNav.get("boundingBox"),"before"),this._bindNavEvents(this._topNav)),this.get("rightNavEnabled")&&i.length>0&&(this._rightNav=new t.FL.SlideshowNav({buttons:i}),this._rightNav.get("boundingBox").addClass("fl-slideshow-thumbs-right-nav"),this.add(this._rightNav),this._rightNav.render(this.get("contentBox")),this._bindNavEvents(this._rightNav)),this.get("bottomNavEnabled")&&s.length>0&&(this._bottomNav=new t.FL.SlideshowNav({buttons:s}),this._bottomNav.get("boundingBox").addClass("fl-slideshow-thumbs-bottom-nav"),this.add(this._bottomNav),this._bottomNav.render(this.get("contentBox")),this._bindNavEvents(this._bottomNav)),this.get("leftNavEnabled")&&n.length>0&&(this._leftNav=new t.FL.SlideshowNav({buttons:n}),this._leftNav.get("boundingBox").addClass("fl-slideshow-thumbs-left-nav"),this.add(this._leftNav),this._leftNav.render(this.get("contentBox")),this._bindNavEvents(this._leftNav))},_syncNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("right","0px")),this._bottomNav&&(e=this._bottomNav.get("boundingBox"),e.setStyle("position","absolute"),e.setStyle("bottom","0px"),e.setStyle("width","100%")),this._leftNav&&(i=this._leftNav.get("boundingBox"),i.setStyle("position","absolute"),i.setStyle("top","0px"),i.setStyle("left","0px"))},_resizeNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),i=this._bbHeight/2-parseInt(t.getComputedStyle("height"),10)/2,t.setStyle("marginTop",i+"px")),this._leftNav&&(e=this._leftNav.get("boundingBox"),i=this._bbHeight/2-parseInt(e.getComputedStyle("height"),10)/2,e.setStyle("marginTop",i+"px"))},_bindNavEvents:function(t){t._buttons.prevPage&&t._buttons.prevPage.on("click",this.prevPage,this),t._buttons.nextPage&&t._buttons.nextPage.on("click",this.nextPage,this),t.on("resize",this.resize,this)},_togglePageButtons:function(){var t=this.get("boundingBox").all(".fl-slideshow-nav-prevPage, .fl-slideshow-nav-nextPage"),e=t.getStyle("display")[0];1==this._numPages&&"inline-block"==e?(t.setStyle("display","none"),this._setSizeInfo()):this._numPages>1&&"none"==e&&(t.setStyle("display","inline-block"),this._setSizeInfo())},_setSizeInfo:function(){var t=this.get("root"),e=this.get("boundingBox"),i=e.getStyle("position"),s=parseInt(e.getStyle("marginLeft"),10),n=parseInt(e.getStyle("marginRight"),10),a=parseInt(e.getStyle("marginTop"),10),o=parseInt(e.getStyle("marginBottom"),10),l=parseInt(e.getStyle("paddingLeft"),10),h=parseInt(e.getStyle("paddingRight"),10),r=parseInt(e.getStyle("paddingTop"),10),g=parseInt(e.getStyle("paddingBottom"),10),u=e.get("parentNode"),d=parseInt(u.getComputedStyle("width"),10),m=parseInt(u.getComputedStyle("height"),10),c=d-l-h-s-n,_=m-r-g-a-o,p=c,v=c,f=_,b=this.get("columns"),y=this.get("rows"),x=this.get("imageConfig"),I=this.get("horizontalSpacing"),S=this.get("verticalSpacing"),w=this.get("spaceEvenly"),B=this.get("centerSinglePage"),T=0,C=0,L=0,N=0,P=b,O=y,R=0,E=1,k=0,F=0,U=0,z=0;e.setStyle("position","relative"),isNaN(b)||(c=v=b*(x.width+I)+I),isNaN(y)||(_=f=y*(x.height+S)+S),this._leftNav&&(T=parseInt(this._leftNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=T:c+=T),this._rightNav&&(C=parseInt(this._rightNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=C:c+=C),this._topNav&&(L=parseInt(this._topNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=L:_+=L),this._bottomNav&&(N=parseInt(this._bottomNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=N:_+=N),isNaN(b)&&(P=Math.floor(v/(x.width+I)),P=P<1?1:P),isNaN(y)&&(O=Math.floor(f/(x.height+S)),O=O<1?1:O),R=P*O,t.albumInfo&&(E=Math.ceil(t.albumInfo.images.length/R)),isNaN(b)&&w&&(I=Math.floor((v-x.width*P)/(P+1))),isNaN(y)&&w&&(S=Math.floor((f-x.height*O)/(O+1))),t.albumInfo&&B&&1==E&&1==O?(p=t.albumInfo.images.length*x.width,p+=I*(t.albumInfo.images.length+1),this._leftNav&&(p+=T),this._rightNav&&(p+=C)):p=c,t.albumInfo&&B&&1==E&&1==O?(v=t.albumInfo.images.length*x.width,v+=I*t.albumInfo.images.length):v=P*(x.width+I),f=O*(x.height+S),E<2?k=T:(U=c,this._rightNav&&(U-=C),this._leftNav?(U-=T,k=T+(U-v-I)/2):k=(U-v-I)/2),E>1&&!w&&(z=_,this._topNav&&(z-=L),this._bottomNav&&(z-=N),F=(z-(S+f))/2),this._bbHeight=_,this._bbWidth=c,this._cbWidth=p,this._clipBoxMarginLeft=k,this._clipBoxTop=F,this._colsPerPage=P,this._rowsPerPage=O,this._imagesPerPage=R,this._numPages=E,this._pageHeight=f,this._pageWidth=v,this._leftNavWidth=T,this._rightNavWidth=C,this._horizontalSpacing=I,this._verticalSpacing=S,this._activePageIndex=Math.floor(t.imageIndex/this._imagesPerPage),e.setStyle("position",i)}},{CSS_PREFIX:"fl-slideshow-thumbs",ATTRS:{columns:{value:"auto"},rows:{value:"auto"},horizontalSpacing:{value:15},verticalSpacing:{value:15},spaceEvenly:{value:!0},centerSinglePage:{value:!0},pauseOnClick:{value:!1},transition:{value:"slideHorizontal"},transitionDuration:{value:.8},transitionEasing:{value:"ease-out"},imageConfig:{value:{crop:!0,width:50,height:50}},topNavEnabled:{value:!1},topNavButtons:{value:["prevPage","nextPage"]},rightNavEnabled:{value:!0},rightNavButtons:{value:["nextPage"]},bottomNavEnabled:{value:!1},bottomNavButtons:{value:["prevPage","nextPage"]},leftNavEnabled:{value:!0},leftNavButtons:{value:["prevPage"]},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowTransition=t.Base.create("fl-slideshow-transition",t.Base,[],{_transitionFunction:"_transitionFade",_type:"fade",initializer:function(){var e=this.get("type"),i=[],s=t.FL.SlideshowTransition.TYPES,n=t.FL.SlideshowTransition.SLIDESHOW_IMAGE_TYPES,a=t.Array.indexOf(n,e)>-1,o=this._isSlideshowImage(),l=this.get("itemIn"),h=this.get("itemOut");e.indexOf(",")>-1&&(i=e.split(","),i.sort(function(){return.5-Math.random()}),e=i[0]),!o&&a?e="fade":o&&(l&&null===l.one("img")||h&&null===h.one("img")?e="none":a&&(t.UA.gecko&&t.UA.gecko<5||t.UA.opera>0||t.UA.ie>0&&t.UA.ie<9)&&(e="fade")),t.FL.SlideshowTransition.TYPES[e]&&(this._transitionFunction=s[e],this._type=e),this._setupItems()},run:function(){this.fire("start"),this[this._transitionFunction].call(this)},_setupItems:function(){var e=this.get("itemIn"),i=this.get("itemOut");e&&(e.setStyle("zIndex",2),e.setStyle("opacity",1),t.FL.Utils.cssSupport("transform")?e.setStyle("transform","translate(0, 0)"):(e.setStyle("top","0"),e.setStyle("left","0"))),i&&i.setStyle("zIndex",1)},_isSlideshowImage:function(){var t=this.get("itemIn"),e=this.get("itemOut");return!(!t||!t.hasClass("fl-slideshow-image"))||!(!e||!e.hasClass("fl-slideshow-image"))},_transitionStart:function(e,i){var s=this.get("itemIn"),n=this.get("itemOut"),a=t.bind(this._transitionComplete,this),o=s?null:a,l=this.get("duration"),h=this.get("easing");s&&(e.duration=e.duration||l,e.easing=e.easing||h,s.transition(e)),n&&(i.duration=i.duration||l,i.easing=i.easing||h,n.transition(i)),a?t.later(1e3*e.duration+100,null,a):o&&t.later(1e3*i.duration+100,null,o)},_transitionComplete:function(){this._set("itemIn",null),this._set("itemOut",null),this.fire("complete")},_transitionNone:function(){var t=this.get("itemIn"),e=this.get("itemOut");t&&t.setStyle("opacity",1),e&&e.setStyle("opacity",0),this._transitionComplete()},_transitionFade:function(){var t=this.get("itemIn");t&&t.setStyle("opacity",0),this._transitionStart({opacity:1},{opacity:0})},_transitionSlideLeft:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(-100%, 0)"}):this._jsTransitionSlide("left")},_transitionSlideRight:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(-100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(100%, 0)"}):this._jsTransitionSlide("right")},_transitionSlideUp:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, 100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, -100%)"}):this._jsTransitionSlide("up")},_transitionSlideDown:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, -100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, 100%)"}):this._jsTransitionSlide("down")},_jsTransitionSlide:function(t){var e=this.get("itemIn"),i=this.get("itemOut"),s=0;i&&"left"==t&&(s=-parseInt(i.getStyle("width"),10)),i&&"right"==t&&(s=parseInt(i.getStyle("width"),10)),i&&"up"==t&&(s=-parseInt(i.getStyle("height"),10)),i&&"down"==t&&(s=parseInt(i.getStyle("height"),10)),e&&e.setStyle("opacity",1),e&&"left"==t&&e.setStyle("left",e.getStyle("width")),e&&"right"==t&&e.setStyle("left","-"+e.getStyle("width")),e&&"up"==t&&e.setStyle("top",e.getStyle("height")),e&&"down"==t&&e.setStyle("top","-"+e.getStyle("height")),"left"==t||"right"==t?this._transitionStart({left:0},{left:s}):this._transitionStart({top:0},{top:s})},_cssTransitionSlide:function(e){var i=this.get("itemIn"),s=this.get("itemOut"),n=t.UA.chrome<36?"transform":"-webkit-transform",a={},o={};a[n]=e.inEnd,o[n]=e.outEnd,i&&(i.setStyle("transition",""),i.setStyle("opacity",1),i.setStyle(n,e.inStart)),s&&(s.setStyle("transition",""),s.setStyle(n,e.outStart)),this._transitionStart(a,o)},_transitionBars:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("bars"),i=this._renderSlices(1,e),s=this.get("duration"),n=0,a=100,o=!1,l=0,h=null,r={duration:s,opacity:1};for("barsRandom"==this._type&&(i=this._randomizeSlices(i));l<i.length;l++)h=t.clone(r),"blinds"==this._type&&(h.width=parseFloat(i[l].getComputedStyle("width"),10)+"px",i[l].setStyle("width","0px"),a=50),o=l==i.length-1,t.later(n,this,this._transitionSlice,[i[l],h,o]),n+=a;this._transitionSlicesFadeLast(n)},_transitionBoxes:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("boxCols"),i=this.get("boxRows"),s=e*i,n="boxesRandom"!=this._type,a=this._renderSlices(i,e,n),o=this.get("duration"),l=0,h=150,r=!1,g=0,u=0,d=0,m=-1,c=null,_={duration:o,opacity:1};if(n)for(;g<s;){for(u=0;u<i;u++)0===u&&(m++,d=m),d>-1&&d<e&&(g++,c=t.clone(_),"boxesGrow"==this._type&&(c.height=parseFloat(a[u][d].getComputedStyle("height"),10)+"px",c.width=parseFloat(a[u][d].getComputedStyle("width"),10)+"px",a[u][d].setStyle("height","0px"),a[u][d].setStyle("width","0px"),h=50),r=g==s-1,t.later(l,this,this._transitionSlice,[a[u][d],c,r])),d--;l+=h}else for(a=this._randomizeSlices(a),h=30;g<a.length;g++)c=t.clone(_),r=g==a.length-1,t.later(l,this,this._transitionSlice,[a[g],c,r]),l+=h;this._transitionSlicesFadeLast(l)},_renderSlices:function(e,i,s){for(var n=this.get("itemIn"),a=parseFloat(n.getComputedStyle("height"),10),o=parseFloat(n.getComputedStyle("width"),10),l=n.one("img"),h=l.get("src"),r=parseFloat(l.getComputedStyle("height"),10),g=parseFloat(l.getComputedStyle("width"),10),u=parseFloat(l.getComputedStyle("left"),10),d=parseFloat(l.getComputedStyle("top"),10),m=0,c=0,_=Math.round(a/e),p=Math.round(o/i),v=null,f=null,b=[];c<e;c++)for("undefined"!=typeof s&&s&&(b[c]=[]),m=0;m<i;m++)v=t.Node.create('<div class="fl-slideshow-transition-slice"></div>'),f=t.Node.create('<img src="'+h+'" />'),v.setStyles({left:p*m+"px",top:_*c+"px",width:m==i-1?o-p*m+"px":p+"px",height:c==e-1?a-_*c+"px":_+"px",opacity:0}),f.setStyles({height:r+"px",width:g+"px",top:d-(_+c*_-_)+"px",left:u-(p+m*p-p)+"px"}),v.append(f),n.append(v),"undefined"!=typeof s&&s?b[c].push(v):b.push(v);return b},_transitionSlicesFadeLast:function(t){var e=this.get("itemOut");e&&!e.hasClass("fl-slideshow-image-cropped")&&e.transition({duration:t/1e3+this.get("duration"),opacity:0})},_transitionSlice:function(e,i,s){var n=s?t.bind(this._transitionSlicesComplete,this):null;e.transition(i,n)},_transitionSlicesComplete:function(){var t=this.get("itemIn");t.all(".fl-slideshow-transition-slice").remove(),t.one(".fl-slideshow-image-img").setStyle("opacity",1),this._transitionComplete()},_randomizeSlices:function(t){var e,i,s=t.length;if(0!==s){for(;--s;)e=Math.floor(Math.random()*(s+1)),i=t[s],t[s]=t[e],t[e]=i;return t}},_transitionKenBurns:function(){var e=this.get("kenBurnsDuration"),i=this.get("duration"),s=this.get("itemIn"),n=this.get("kenBurnsZoom");this._transitionFade(),new t.FL.SlideshowKenBurns({duration:e+i+4,image:s,zoom:n}).run()}},{ATTRS:{itemIn:{value:null},itemOut:{value:null},duration:{value:.5},easing:{value:"ease-out"},type:{value:"fade"},bars:{value:15},boxCols:{value:8},boxRows:{value:4},kenBurnsDuration:{value:4},kenBurnsZoom:{value:1.2}},TYPES:{fade:"_transitionFade",none:"_transitionNone",slideLeft:"_transitionSlideLeft",slideRight:"_transitionSlideRight",slideUp:"_transitionSlideUp",slideDown:"_transitionSlideDown",blinds:"_transitionBars",bars:"_transitionBars",barsRandom:"_transitionBars",boxes:"_transitionBoxes",boxesRandom:"_transitionBoxes",boxesGrow:"_transitionBoxes",kenBurns:"_transitionKenBurns"},SLIDESHOW_IMAGE_TYPES:["blinds","bars","barsRandom","boxes","boxesRandom","boxesGrow","kenBurns"]}),t.namespace("FL").Slideshow=t.Base.create("fl-slideshow",t.FL.SlideshowBase,[],{frame:null,nav:null,imageNavLeft:null,imageNavRight:null,thumbs:null,verticalThumbs:null,caption:null,
3
- social:null,_nextImagePreloader:null,_initialNavSettings:null,initializer:function(){var e={loadGroup:"main-preload",crop:this.get("crop"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize")};this._nextImagePreloader=new t.FL.SlideshowImage(e),this._isMobile()&&(this._removeNavButton("prevPage"),this._removeNavButton("nextPage"),this._removeNavButton("fullscreen")),this._hasNavButton("fullscreen")&&(t.FL.SlideshowFullscreen.OS_SUPPORT?this.plug(t.FL.SlideshowFullscreen):this._removeNavButton("fullscreen"))},renderUI:function(){t.FL.Slideshow.superclass.renderUI.apply(this,arguments),this._renderFrame(),this._renderVerticalThumbs(),this._renderNavAndThumbs(),this._renderImageNav(),this._renderMouseNav(),this._renderCaption(),this._renderSocial()},bindUI:function(){var e=this.get("boundingBox"),i=this.frame.get("boundingBox"),s=this.get("navOverlay"),n=this.get("navType"),a=this._getNav(),o=this.get("clickAction");t.FL.Slideshow.superclass.bindUI.apply(this,arguments),t.Do.after(this._resizeChildWidgets,this,"resize"),this.on("albumLoadStart",this._albumLoadStart,this),this.on("albumLoadComplete",this._albumLoadComplete,this),this.on("imageLoadComplete",this._loadFrame,this),this.get("loadingImageAlwaysEnabled")&&(this.frame.on("transitionInit",t.bind(this._showLoadingImageWithDelay,this)),this.frame.on("transitionStart",t.bind(this._hideLoadingImage,this))),this.get("overlayHideOnMousemove")&&(a&&s&&(this.frame.once("transitionComplete",a.slideshowOverlay.hideWithTimer,a.slideshowOverlay),e.on("mousemove",t.bind(this._toggleNav,this))),"buttons"!=n&&"thumbs"!=n&&"custom"!=n||(e.on("mouseenter",t.bind(this._checkOverlaysOnMouseenter,this)),e.on("mouseleave",t.bind(this._hideAllOverlays,this)))),e.delegate("click",t.bind(this._overlayCloseClick,this),".fl-slideshow-overlay-close"),"gallery"!=o&&"url"!=o||i.delegate("click",t.bind(this._frameClick,this),".fl-slideshow-image-img")},syncUI:function(){var e=this.get("boundingBox");t.FL.Slideshow.superclass.syncUI.apply(this,arguments),e._node.onselectstart=function(){return!1},e._node.unselectable="on",e._node.style.MozUserSelect="none","none"!=this.get("clickAction")&&this.frame.get("boundingBox").addClass("fl-click-action-enabled")},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},unload:function(){this.pause(),this.frame.unload(),null!==this.thumbs&&this.thumbs.unload()},_albumLoadStart:function(){this._showLoadingImage()},_albumLoadComplete:function(){this.frame.once("transitionStart",t.bind(this._hideLoadingImage,this))},_resizeChildWidgets:function(){var t=this.get("boundingBox"),e=this.get("contentBox"),i=this.get("imageNavEnabled");this._renderNavAndThumbs(),this.get("verticalThumbsOverlay")?(this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight")),this._resizeVerticalThumbs()):(this._resizeVerticalThumbs(),this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight"))),i&&this._positionImageNav(),this._positionLoadingImage()},_renderVerticalThumbs:function(){var e,i=this.get("responsiveThreshold"),s=this.get("boundingBox"),n=s.get("offsetWidth");this.get("verticalThumbsEnabled")&&n>i&&(this.verticalThumbs=new t.FL.SlideshowThumbs(this._getVerticalThumbsConfig()),this.add(this.verticalThumbs),this.verticalThumbs.render(s),e=this.verticalThumbs.get("boundingBox"),e.addClass("fl-slideshow-vertical-thumbs"),e.setStyle(this.get("verticalThumbsPosition"),0),s.append(e),this.get("verticalThumbsOverlay")?(this.verticalThumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.frame.get("boundingBox").append(e),this.verticalThumbs.resize()):(this.verticalThumbs.resize(),this._adjustContentForVerticalThumbs()),this._bindVerticalThumbs())},_getVerticalThumbsConfig:function(){var t=this.getAttrs(),e={columns:t.verticalThumbsColumns,rows:"auto",centerSinglePage:!1,horizontalSpacing:t.verticalThumbsHorizontalSpacing,verticalSpacing:t.verticalThumbsVerticalSpacing,spaceEvenly:t.verticalThumbsSpaceEvenly,rightNavEnabled:!1,leftNavEnabled:!1,topNavEnabled:t.verticalThumbsTopNavEnabled,topNavButtons:t.verticalThumbsTopNavButtons,bottomNavEnabled:t.verticalThumbsBottomNavEnabled,bottomNavButtons:t.verticalThumbsBottomNavButtons,pauseOnClick:t.verticalThumbsPauseOnClick,transition:t.verticalThumbsTransition,transitionDirection:t.verticalThumbsTransitionDirection,transitionEasing:t.verticalThumbsTransitionEasing,touchSupport:!0,imageConfig:{crop:t.verticalThumbsImageCrop,width:t.verticalThumbsImageWidth,height:t.verticalThumbsImageHeight}};return e},_bindVerticalThumbs:function(){var e=this.get("boundingBox"),i=this.get("overlayHideOnMousemove"),s=this.get("verticalThumbsOverlay"),n=this.verticalThumbs;n&&i&&s&&(this.frame.once("transitionComplete",n.slideshowOverlay.hideWithTimer,n.slideshowOverlay),e.on("mousemove",t.bind(this._toggleVerticalThumbs,this)),e.on("mouseenter",t.bind(this._toggleVerticalThumbs,this)))},_resizeVerticalThumbs:function(){var t,e,i,s,n,a,o,l,h=this.get("verticalThumbsEnabled");h&&(t=this.get("verticalThumbsOverlay"),e=this.get("responsiveThreshold"),i=this.get("boundingBox"),s=i.get("offsetWidth"),n=this.get("navOverlay"),a=this.get("navType"),o=this._getNav(),this.verticalThumbs&&s>e?(this.verticalThumbs.get("boundingBox").setStyle("display","block"),this.verticalThumbs.resize(),t?o&&n&&(l=o.get("boundingBox"),"thumbs"==a?(this._adjustOverlayForVerticalThumbs(l,!0),this.thumbs.resize()):this._adjustOverlayForVerticalThumbs(l)):this._adjustContentForVerticalThumbs()):!this.verticalThumbs&&s>e?this._renderVerticalThumbs():this.verticalThumbs&&s<=e&&(this.verticalThumbs.get("boundingBox").setStyle("display","none"),t||this.get("contentBox").setStyles({left:"auto",position:"relative",right:"auto",width:"auto"})))},_toggleVerticalThumbs:function(){this.verticalThumbs&&(this.verticalThumbs.slideshowOverlay._visible?this.verticalThumbs.slideshowOverlay.hideWithTimer():this.verticalThumbs.slideshowOverlay.show())},_adjustContentForVerticalThumbs:function(){var t=this.get("boundingBox"),e=this.verticalThumbs.get("boundingBox"),i=this.get("verticalThumbsPosition"),s=this.get("contentBox"),n="left"==i?"right":"left",a=t.get("offsetWidth")-e.get("offsetWidth");s.setStyle("position","absolute"),s.setStyle(n,0),s.setStyle("width",a)},_adjustOverlayForVerticalThumbs:function(t,e){var i=this.get("verticalThumbsEnabled"),s=this.get("verticalThumbsOverlay"),n=null,a=null,o="undefined"==typeof e?"":"margin-",l=0;this.verticalThumbs&&i&&s&&(n=this.verticalThumbs.get("boundingBox"),l=n.get("offsetWidth"),a=this.get("verticalThumbsPosition"),"left"==a?t.setStyle(o+"left",l+"px"):t.setStyle(o+"right",l+"px"))},_renderFrame:function(){this.frame=new t.FL.SlideshowFrame({imageConfig:{loadGroup:"main",loadPriority:!0,crop:this.get("crop"),cropHorizontalsOnly:this.get("cropHorizontalsOnly"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize"),showVideoButton:this.get("navOverlay")},touchSupport:this.get("touchSupport")}),this.add(this.frame),this.frame.render(this.get("contentBox")),this.frame.get("boundingBox").addClass("fl-slideshow-main-image"),this._setPlayingTimerEvent(this.frame,"transitionComplete"),this._loadingImageContainer=this.frame.get("contentBox")},_resizeFrame:function(t,e){var i=this.get("navOverlay"),s=this._getNav();s&&!i&&(e-=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),this.frame.resize(t,e)},_loadFrame:function(e){var i=this.imageInfo.index,s=this.albumInfo.images,n=i+1>=s.length?0:i+1,a=this.frame.get("width"),o=this.frame.get("height");this.frame.load(e.imageInfo),t.FL.SlideshowImageLoader.removeGroup("main-preload"),this._nextImagePreloader.preload(s[n],a,o)},_frameClick:function(){var t=this.get("clickAction"),e=this.get("clickActionUrl");"url"==t?window.location.href=e:"gallery"==t&&(window.location.href=this.imageInfo.link)},_initMiniNav:function(){var t=[];this._hasNavButton("prev")&&t.push("prev"),(this._hasNavButton("thumbs")||"thumbs"==this.get("navType"))&&t.push("thumbs"),this._hasNavButton("caption")&&t.push("caption"),this._hasNavButton("social")&&t.push("social"),this._hasNavButton("buy")&&t.push("buy"),this._hasNavButton("play")&&t.push("play"),!this._hasNavButton("fullscreen")||"ontouchstart"in window||t.push("fullscreen"),this._hasNavButton("next")&&t.push("next"),this._initialNavSettings={buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight"),type:this.get("navType")},this._set("navButtons",t),this._set("navButtonsLeft",[]),this._set("navButtonsRight",[]),this._set("navType","buttons")},_renderNavAndThumbs:function(){var t,e,i=this.get("navType"),s=!1;"buttons"!=i&&"thumbs"!=i||(t=this.get("boundingBox").get("offsetWidth"),e=this.get("responsiveThreshold"),t<=e&&null===this._initialNavSettings?(this._initMiniNav(),s=!0):t>e&&null!==this._initialNavSettings&&(this._set("navButtons",this._initialNavSettings.buttons),this._set("navButtonsLeft",this._initialNavSettings.buttonsLeft),this._set("navButtonsRight",this._initialNavSettings.buttonsRight),this._set("navType",this._initialNavSettings.type),this._initialNavSettings=null,s=!0),(s||null===this.nav)&&this._renderNav(),s||null===this.thumbs?this._renderThumbs():this._thumbsEnabled()&&this._resizeThumbs(),s&&null!==this.caption&&this._syncCaption(),s&&null!==this.social&&this._syncSocial())},_renderNav:function(){var e=this.frame.get("boundingBox"),i=null,s=this.get("navOverlay"),n=this.get("navPosition");this._destroyNav(),"buttons"==this.get("navType")&&(this.nav=new t.FL.SlideshowNav({buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight")}),this.add(this.nav),this.nav.render(this.get("contentBox")),i=this.nav.get("boundingBox"),s&&(this.nav.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),i.setStyle("position","absolute"),i.setStyle(n,"0px")),"top"==n?e.insert(i,"before"):e.insert(i,"after"),i.addClass("fl-slideshow-main-nav"))},_destroyNav:function(){if(null!==this.nav){this.nav.slideshowOverlay&&this.nav.slideshowOverlay.destroy(),this.nav.get("boundingBox").remove(),this.remove(this.nav);try{this.nav.destroy(!0)}catch(t){}this.nav=null}},_getNav:function(){var t=this.get("navType");return"buttons"==t?this.nav:"thumbs"==t?this.thumbs:null},_toggleNav:function(){var t=this._getNav();t.slideshowOverlay&&(t.slideshowOverlay._visible?t.slideshowOverlay.hideWithTimer():t.slideshowOverlay.show())},_renderImageNav:function(){var e;this.get("imageNavEnabled")&&(this._isMobile()?this._set("imageNavEnabled",!1):(e=this.get("boundingBox"),this.imageNavLeft=new t.FL.SlideshowNav({buttons:["prev"],useFontIcons:!1}),this.imageNavRight=new t.FL.SlideshowNav({buttons:["next"],useFontIcons:!1}),this.add(this.imageNavLeft),this.add(this.imageNavRight),this.imageNavLeft.render(this.frame.get("boundingBox")),this.imageNavRight.render(this.frame.get("boundingBox")),this.imageNavLeft.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.imageNavRight.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.get("overlayHideOnMousemove")&&(this.frame.once("transitionComplete",this.imageNavLeft.slideshowOverlay.hideWithTimer,this.imageNavLeft.slideshowOverlay),this.frame.once("transitionComplete",this.imageNavRight.slideshowOverlay.hideWithTimer,this.imageNavRight.slideshowOverlay),e.on("mousemove",t.bind(this._toggleImageNav,this)),e.on("mouseenter",t.bind(this._toggleImageNav,this))),this.imageNavLeft.get("boundingBox").addClass("fl-slideshow-image-nav-left"),this.imageNavRight.get("boundingBox").addClass("fl-slideshow-image-nav-right")))},_positionImageNav:function(){var t=this.imageNavLeft.get("boundingBox"),e=this.imageNavRight.get("boundingBox"),i=t.get("offsetHeight"),s=this.frame.get("boundingBox").get("offsetHeight"),n=s/2-i/2,a={top:n+"px",display:"block"};t.setStyles(a),e.setStyles(a),this._adjustOverlayForVerticalThumbs(t),this._adjustOverlayForVerticalThumbs(e)},_toggleImageNav:function(){this.imageNavLeft.slideshowOverlay._visible?this.imageNavLeft.slideshowOverlay.hideWithTimer():this.imageNavLeft.slideshowOverlay.show(),this.imageNavRight.slideshowOverlay._visible?this.imageNavRight.slideshowOverlay.hideWithTimer():this.imageNavRight.slideshowOverlay.show()},_renderMouseNav:function(){!this.get("mouseNavEnabled")||"ontouchstart"in window||window.navigator.msPointerEnabled||this.plug(t.FL.SlideshowMouseNav,{trigger:this.frame.get("boundingBox")})},_thumbsEnabled:function(){var t=this.get("navType");return"thumbs"==t||!("buttons"!=t&&"custom"!=t||!this._hasNavButton("thumbs"))},_renderThumbs:function(){var e,i,s,n;if(this._destroyThumbs(),this._thumbsEnabled()){e=this.frame.get("boundingBox"),i=this.get("navOverlay"),s=this.get("navPosition"),n=this.get("navType"),this.thumbs=new t.FL.SlideshowThumbs(this._getThumbsConfig());try{this.add(this.thumbs)}catch(a){}"buttons"==n||"custom"==n?this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left",visible:!1}):"thumbs"==n&&i&&this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.thumbs.render(this.get("contentBox")),"top"==s?e.insert(this.thumbs.get("boundingBox"),"before"):e.insert(this.thumbs.get("boundingBox"),"after"),this.get("thumbsHideOnClick")&&"thumbs"!=n&&this.thumbs.on("imageClick",t.bind(this._hideThumbsOnImageClick,this)),this._syncThumbs()}},_destroyThumbs:function(){if(null!==this.thumbs){this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.destroy(),this.thumbs.get("boundingBox").remove(),this.remove(this.thumbs);try{this.thumbs.destroy(!0)}catch(t){}this.thumbs=null}},_syncThumbs:function(){var t=this.thumbs.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this.get("navType"),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;"buttons"==s&&(a=parseInt(this.nav.get("boundingBox").getComputedStyle("height"),10),t.setStyle("position","absolute"),e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")),("custom"==s||"thumbs"==s&&e)&&(t.setStyle("position","absolute"),t.setStyle(i,"0px")),this.thumbs.resize()},_getThumbsConfig:function(){var t=this.getAttrs(),e=this.get("navType"),i={crop:t.thumbsImageCrop,width:t.thumbsImageWidth,height:t.thumbsImageHeight},s={columns:"auto",rows:1,horizontalSpacing:t.thumbsHorizontalSpacing,verticalSpacing:t.thumbsVerticalSpacing,spaceEvenly:t.thumbsSpaceEvenly,centerSinglePage:t.thumbsCenterSinglePage,pauseOnClick:t.thumbsPauseOnClick,transition:t.thumbsTransition,transitionDirection:t.thumbsTransitionDirection,transitionEasing:t.thumbsTransitionEasing,leftNavButtons:t.navButtonsLeft,rightNavButtons:t.navButtonsRight,imageConfig:i,touchSupport:!0};return"buttons"!=e&&"custom"!=e||("ontouchstart"in window?(s.leftNavEnabled=!1,s.rightNavEnabled=!1):(s.centerSinglePage=!1,s.leftNavButtons=["prevPage"],s.rightNavButtons=["nextPage"])),s},_resizeThumbs:function(){this.thumbs&&this.thumbs.resize()},_toggleThumbs:function(){this._toggleOverlay(this.thumbs.slideshowOverlay)},_hideThumbsOnImageClick:function(){this.thumbs.slideshowOverlay&&(this.thumbs.slideshowOverlay._focus=!1,this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide(),this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable())},_renderCaption:function(){this._hasNavButton("caption")&&(this.caption=new t.FL.SlideshowCaption({lessLinkText:this.get("captionLessLinkText"),moreLinkText:this.get("captionMoreLinkText"),textLength:this.get("captionTextLength"),stripTags:this.get("captionStripTags")}),this.add(this.caption),this.caption.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncCaption())},_syncCaption:function(){var t=this.caption.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleCaption:function(){this._toggleOverlay(this.caption.slideshowOverlay)},_renderSocial:function(){this._hasNavButton("social")&&(this.social=new t.FL.SlideshowSocial,this.add(this.social),this.social.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncSocial())},_syncSocial:function(){var t=this.social.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleSocial:function(){this._toggleOverlay(this.social.slideshowOverlay)},_toggleOverlay:function(t){var e=this.get("navType"),i=this._getNav();t._visible?(i&&i.slideshowOverlay&&i.slideshowOverlay.enable(),t.enable(),t.hide()):(i&&i.slideshowOverlay&&i.slideshowOverlay.disable(),t.show(),t.disable()),this.thumbs&&"thumbs"!=e&&this.thumbs.slideshowOverlay!==t&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide()),this.caption&&this.caption.slideshowOverlay!==t&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hide()),this.social&&this.social.slideshowOverlay!==t&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hide())},_overlayCloseClick:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable(),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.enable(),this.caption&&this.caption.slideshowOverlay.enable(),this.social&&this.social.slideshowOverlay.enable(),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.enable())},_hideAllOverlays:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay._visible&&(this.nav.slideshowOverlay.enable(),this.nav.slideshowOverlay.hideWithTimer()),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay._visible&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hideWithTimer()),this.caption&&this.caption.slideshowOverlay._visible&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hideWithTimer()),this.social&&this.social.slideshowOverlay._visible&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hideWithTimer()),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavLeft.slideshowOverlay.hideWithTimer(),this.imageNavRight.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.hideWithTimer())},_checkOverlaysOnMouseenter:function(){var t=this.get("navType"),e=this.get("navOverlay"),i=this._getNav(),s=!1;this.thumbs&&"thumbs"!=t&&this.thumbs.slideshowOverlay._visible?(s=!0,this.thumbs.slideshowOverlay.disable()):this.caption&&this.caption.slideshowOverlay._visible?(s=!0,this.caption.slideshowOverlay.disable()):this.social&&this.social.slideshowOverlay._visible&&(s=!0,this.social.slideshowOverlay.disable()),i&&s&&e&&i.slideshowOverlay.disable()},_hasNavButton:function(e){var i=this.get("navType");return("buttons"==i||"thumbs"==i||"custom"==i)&&(t.Array.indexOf(this.get("navButtons"),e)>-1||(t.Array.indexOf(this.get("navButtonsLeft"),e)>-1||t.Array.indexOf(this.get("navButtonsRight"),e)>-1))},_removeNavButton:function(e){var i=this.get("navButtons"),s=this.get("navButtonsLeft"),n=this.get("navButtonsRight"),a=this.get("verticalThumbsTopNavButtons"),o=this.get("verticalThumbsBottomNavButtons");t.Array.indexOf(i,e)>-1&&i.splice(t.Array.indexOf(i,e),1),t.Array.indexOf(s,e)>-1&&s.splice(t.Array.indexOf(s,e),1),t.Array.indexOf(n,e)>-1&&n.splice(t.Array.indexOf(n,e),1),t.Array.indexOf(a,e)>-1&&a.splice(t.Array.indexOf(a,e),1),t.Array.indexOf(o,e)>-1&&o.splice(t.Array.indexOf(o,e),1),this._set("navButtons",i),this._set("navButtonsLeft",s),this._set("navButtonsRight",n),this._set("verticalThumbsTopNavButtons",a),this._set("verticalThumbsBottomNavButtons",o)}},{CSS_PREFIX:"fl-slideshow",ATTRS:{clickAction:{value:"none"},clickActionUrl:{value:""},crop:{value:!1},cropHorizontalsOnly:{value:!1},loadingImageAlwaysEnabled:{value:!0},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},transition:{value:"fade"},transitionDuration:{value:1},transitionEasing:{value:"ease-out"},kenBurnsZoom:{value:1.2},navType:{value:"none"},navPosition:{value:"bottom"},navOverlay:{value:!1},navButtons:{value:[]},navButtonsLeft:{value:[]},navButtonsRight:{value:[]},overlayHideOnMousemove:{value:!0},overlayHideDelay:{value:3e3},imageNavEnabled:{value:!1},mouseNavEnabled:{value:!1},thumbsHideOnClick:{value:!0},thumbsHorizontalSpacing:{value:15},thumbsVerticalSpacing:{value:15},thumbsSpaceEvenly:{value:!0},thumbsCenterSinglePage:{value:!0},thumbsPauseOnClick:{value:!1},thumbsTransition:{value:"slideHorizontal"},thumbsTransitionDuration:{value:.8},thumbsTransitionEasing:{value:"ease-out"},thumbsImageCrop:{value:!0},thumbsImageWidth:{value:50},thumbsImageHeight:{value:50},captionLessLinkText:{value:"Read Less"},captionMoreLinkText:{value:"Read More"},captionTextLength:{value:200},captionStripTags:{value:!1},verticalThumbsEnabled:{value:!1},verticalThumbsPosition:{value:"left"},verticalThumbsOverlay:{value:!1},verticalThumbsColumns:{value:1},verticalThumbsTopNavEnabled:{value:!1},verticalThumbsTopNavButtons:{value:["prevPage","nextPage"]},verticalThumbsBottomNavEnabled:{value:!0},verticalThumbsBottomNavButtons:{value:["prevPage","nextPage"]},verticalThumbsHorizontalSpacing:{value:15},verticalThumbsVerticalSpacing:{value:15},verticalThumbsSpaceEvenly:{value:!1},verticalThumbsPauseOnClick:{value:!1},verticalThumbsImageCrop:{value:!0},verticalThumbsImageWidth:{value:75},verticalThumbsImageHeight:{value:75},verticalThumbsTransition:{value:"slideVertical"},verticalThumbsTransitionDuration:{value:.8},verticalThumbsTransitionEasing:{value:"ease-out"},googlePlusButtonEnabled:{value:!0},likeButtonEnabled:{value:!0},pinterestButtonEnabled:{value:!0},tweetButtonEnabled:{value:!0},touchSupport:{value:!0}}})},"2.0.0",{requires:["anim","event-mouseenter","plugin","transition","fl-event-move","fl-slideshow-css","fl-slideshow-base","fl-utils","sm-fonticon"]}),YUI.add("fl-slideshow-album-loader",function(t){t.namespace("FL").SlideshowAlbumLoader=t.Base.create("fl-slideshow-album-loader",t.Base,[],{_source:null,load:function(e){this._source=e,this.fire("start"),this[t.FL.SlideshowAlbumLoader.TYPES[e.type]].call(this)},_loadComplete:function(t){t=this._randomize(t),this.fire("complete",t)},_randomize:function(t){var e;if(this.get("randomize"))for(t.albumInfo.images.sort(function(){return.5-Math.random()}),e=0;e<t.albumInfo.images.length;e++)t.albumInfo.images[e].index=e;return t},_loadSmugMug:function(){var e=new t.FL.SmugMugAPI;e.on("complete",this._loadSmugMugSuccess,this),e.addParam("method","smugmug.images.get"),e.addParam("AlbumID",this._source.id),e.addParam("AlbumKey",this._source.key),e.addParam("Extras","Caption,Format,FileName"),this._source.password&&e.addParam("Password",this._source.password),this._source.sp&&e.addParam("SitePassword",this._source.sp),e.request()},_loadSmugMugSuccess:function(e){var i=e.Album.Images,s={},n="undefined"!=typeof this._source.proxy?this._source.proxy:"",a="",o="",l="",h="",r=0,g=null,u=null;for(s.index=this._source.index,s.id=e.Album.id,s.key=e.Album.Key,s.link=e.Album.URL,s.title=this._source.title?this._source.title:"",s.images=[],a=s.link.replace("http://","").split("/").shift(),a="http://"+a+"/buy/"+e.Album.id+"_"+e.Album.Key+"/",r=0;r<i.length;r++)o=n+e.Album.URL+"/"+i[r].id+"_"+i[r].Key,h=i[r].Format.toLowerCase(),l="mp4"==h?".jpg":"."+h,s.images[r]={},s.images[r].index=r,s.images[r].sourceType="smugmug",s.images[r].albumId=e.Album.id,s.images[r].albumKey=e.Album.Key,s.images[r].id=i[r].id,s.images[r].key=i[r].Key,s.images[r].filename=i[r].FileName,s.images[r].format=h,s.images[r].caption=i[r].Caption||"",s.images[r].link=e.Album.URL+"#"+i[r].id+"_"+i[r].Key,s.images[r].tinyURL=o+"-Ti"+l,s.images[r].thumbURL=o+"-Th"+l,s.images[r].smallURL=o+"-S"+l,s.images[r].mediumURL=o+"-M"+l,s.images[r].largeURL=o+"-L"+l,s.images[r].xlargeURL=o+"-XL"+l,s.images[r].x2largeURL=o+"-X2"+l,s.images[r].x3largeURL=o+"-X3"+l,s.images[r].buyURL=a+i[r].id+"_"+i[r].Key,s.images[r].iframe="",s.images[r].caption.indexOf("iframe")&&(g=t.Node.create("<div>"+s.images[r].caption+"</div>"),u=g.one("iframe"),u&&(s.images[r].iframe=u.getAttribute("src"),s.images[r].caption=s.images[r].caption.replace(/<iframe.*>.*<\/iframe>/gi,"")));this._loadComplete({albumInfo:s})},_loadUrls:function(){var t={},e=0;for(t.index=this._source.index,t.title=this._source.title?this._source.title:"",t.images=[];e<this._source.urls.length;e++)t.images[e]={},t.images[e].index=e,t.images[e].sourceType="urls",t.images[e].filename=this._source.urls[e].largeURL.split("/").pop(),t.images[e].format="",t.images[e].caption=this._source.urls[e].caption||"",t.images[e].link=this._source.urls[e].largeURL,t.images[e].thumbURL=this._source.urls[e].thumbURL||this._source.urls[e].largeURL,t.images[e].smallURL=this._source.urls[e].smallURL||this._source.urls[e].largeURL,t.images[e].mediumURL=this._source.urls[e].mediumURL||this._source.urls[e].largeURL,t.images[e].largeURL=this._source.urls[e].largeURL,t.images[e].xlargeURL=this._source.urls[e].xlargeURL||this._source.urls[e].largeURL,t.images[e].x2largeURL=this._source.urls[e].x2largeURL||this._source.urls[e].largeURL,t.images[e].x3largeURL=this._source.urls[e].x3largeURL||this._source.urls[e].largeURL,t.images[e].buyURL=this._source.urls[e].buyURL||"",t.images[e].iframe=this._source.urls[e].iframe||"";this._loadComplete({albumInfo:t})}},{ATTRS:{randomize:{value:!1}},TYPES:{smugmug:"_loadSmugMug",flickr:"_loadFlickr",picasa:"_loadPicasa",urls:"_loadUrls",html:"_loadHtml"}})},"2.0.0",{requires:["base","fl-smugmug-api"]}),YUI.add("fl-slideshow-base",function(t){t.namespace("FL").SlideshowBase=t.Base.create("fl-slideshow-base",t.Widget,[t.WidgetParent],{_albumLoader:null,albums:[],albumInfo:null,albumIndex:null,imageInfo:null,imageIndex:null,lastImageIndex:null,_resizeTimer:null,_playing:!1,_playingTimer:null,_playingTimerEvent:null,_loadingImage:null,_loadingImageWrap:null,_loadingImageVisible:!1,_loadingImageTimer:null,_loadingImageContainer:null,_initialHeight:null,_initialWidth:null,initializer:function(){this._albumLoader=new t.FL.SlideshowAlbumLoader({randomize:this.get("randomize")})},renderUI:function(){this._renderLoadingImage()},bindUI:function(){this._albumLoader.on("complete",this._loadAlbumComplete,this),t.one(window).on("fl-slideshow-base|resize",this._delayResize,this),t.one(window).on("fl-slideshow-base|orientationchange",this._delayResize,this),t.Node.one("body").on("keydown",t.bind(this._onKey,this))},syncUI:function(){this.get("boundingBox").addClass("fl-slideshow-"+this.get("color")),this.resize(),this.get("loadOnRender")&&this.loadAlbum(this.get("defaultAlbum"),this.get("defaultImage"))},addAlbum:function(t){var e=this.get("source"),i=e.length;e[i]=t,e[i].index=i,this.set("source",e)},loadAlbum:function(e,i){var s=this.get("source"),n="undefined"==typeof i?0:i;this.imageIndex=null,this.lastImageIndex=null,this.fire("albumLoadStart"),this.once("albumLoadComplete",t.bind(this.loadImage,this,n)),s[e]&&"album-data"==s[e].type?(this.albums[e]=s[e].data,this._loadAlbumComplete({albumInfo:this.albums[e]})):s[e]&&this.albums[e]?this._loadAlbumComplete({albumInfo:this.albums[e]}):this._albumLoader.load(s[e]||s[0])},_loadAlbumComplete:function(t){this.albums[t.albumInfo.index]=t.albumInfo,this.albumInfo=t.albumInfo,this.albumIndex=t.albumInfo.index,this.fire("albumLoadComplete"),this.get("autoPlay")&&(this._playingTimerStart(),this.fire("played"),this._playing=!0)},loadImage:function(t){this._playing&&this._playingTimerStart(),t=t<0?this.albumInfo.images.length-1:t,t=t>=this.albumInfo.images.length?0:t,this.lastImageIndex=this.imageIndex,this.imageIndex=t,this.imageInfo=this.albumInfo.images[t],this.fire("imageLoadComplete",{imageInfo:this.imageInfo})},prevImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex-1),this.fire("prevImage")},nextImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex+1),this.fire("nextImage")},_onKey:function(t){switch(t.keyCode){case 37:this.prevImage();break;case 39:this.nextImage()}},resize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=parseInt(t.one("body").get("winWidth"),10),n=this.get("responsiveThreshold");s>n&&e&&"window"==i?this._stretchyWindowResize():s<=n||e&&"ratio"==i?this._stretchyRatioResize():this._standardResize(),this.fire("resize")},_standardResize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=this.get("boundingBox"),n=s.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=this.get("height"),h=this.get("width");if(s.hasClass("fl-fullscreen-active"))return void this._stretchyWindowResize();if(e&&"contain"==i)s.setStyle("height",a+"px"),s.setStyle("width",o+"px");else{if(!t.Lang.isNumber(l))return void this._stretchyRatioResize();s.setStyle("height",l+"px"),h?s.setStyle("width",h+"px"):s.setStyle("width",o+"px")}},_stretchyWindowResize:function(){var e=this.get("boundingBox"),i=this.get("stretchyVerticalSpace"),s=parseInt(e.getStyle("paddingTop"),10),n=parseInt(e.getStyle("paddingBottom"),10),a=parseInt(t.one("body").get("winHeight"),10),o="";e.hasClass("fl-fullscreen-active")&&(i=0,o=parseInt(t.one("body").get("winWidth"),10)+"px"),a=a-s-n-i+"px",e.setStyle("height",a),e.setStyle("width",o)},_stretchyRatioResize:function(){var e=this.get("boundingBox"),i=e.get("parentNode"),s=0,n=this.get("stretchyRatio"),a=parseInt(e.getStyle("paddingTop"),10),o=parseInt(e.getStyle("paddingBottom"),10),l=parseInt(i.getComputedStyle("width"),10),h=parseInt(t.one("body").get("winHeight"),10),r=parseInt(t.one("body").get("winWidth"),10),g=l*n,u="";e.hasClass("fl-fullscreen-active")&&(g=h,u=r),g=g-a-o-s+"px",e.setStyle("height",g),e.setStyle("width",u)},_delayResize:function(){this._resizeTimer&&this._resizeTimer.cancel(),this._resizeTimer=t.later(300,this,this.resize)},play:function(){this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete),this.fire("played"),this._playing=!0},pause:function(){this._playingTimerCancel(),this.fire("paused"),this._playing=!1},_setPlayingTimerEvent:function(t,e){this._playingTimerEvent={obj:t,e:e}},_playingTimerStart:function(e){this._playingTimerCancel(),e||null===this._playingTimerEvent?this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete):this._playingTimerEvent.obj.once("fl-slideshow-base|"+this._playingTimerEvent.e,t.bind(this._playingTimerStart,this))},_playingTimerComplete:function(){this.loadImage(this.imageIndex+1),this.fire("playingTimerComplete")},_playingTimerCancel:function(){this._playingTimer&&this._playingTimer.cancel(),this._playingTimerEvent&&this._playingTimerEvent.obj.detach("fl-slideshow-base|"+this._playingTimerEvent.e)},_renderLoadingImage:function(){var e={lines:11,length:6,width:2,radius:7,color:"",speed:1,trail:60,shadow:!1},i=t.merge(e,this.get("loadingImageSettings"));this.get("loadingImageEnabled")&&(""===i.color&&(i.color=this._colorToHex(t.one("body").getStyle("color"))),this._loadingImage=new t.FL.Spinner(i),this._loadingImageWrap=t.Node.create('<div class="fl-loading-image"></div>'),this._loadingImageWrap.setStyles({position:"absolute","z-index":"1000"}))},_showLoadingImage:function(){this._loadingImage&&!this._loadingImageVisible&&(this._loadingImageVisible=!0,this._loadingImage.spin(),this._loadingImageWrap.insert(this._loadingImage.el),null!==this._loadingImageContainer?this._loadingImageContainer.insert(this._loadingImageWrap):this.get("contentBox").insert(this._loadingImageWrap),
4
  this._positionLoadingImage())},_showLoadingImageWithDelay:function(){this._loadingImage&&(this._loadingImageTimer=t.later(1e3,this,this._showLoadingImage))},_hideLoadingImage:function(){this._loadingImageTimer&&(this._loadingImageTimer.cancel(),this._loadingImageTimer=null),this._loadingImage&&this._loadingImageVisible&&(this._loadingImageVisible=!1,this._loadingImage.stop(),this._loadingImageWrap.remove())},_positionLoadingImage:function(){if(this._loadingImage&&this._loadingImageVisible){var e=this._loadingImageWrap,i=parseInt(e.getComputedStyle("height"),10),s=parseInt(e.getComputedStyle("width"),10),n=e.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=(o-s)/2,h=(a-i)/2;e.setStyles({left:l+"px",top:h+"px"}),t.one(this._loadingImage.el).setStyles({left:"50%",top:"50%"})}},_colorToHex:function(t){var e,i,s,n,a;return"#"===t.substr(0,1)?t:(e=/(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t),null===e?"#000":(i=parseInt(e[2],10),s=parseInt(e[3],10),n=parseInt(e[4],10),a=n|s<<8|i<<16,a=a.toString(16),"0"===a&&(a="000"),e[1]+"#"+a))}},{CSS_PREFIX:"fl-slideshow-base",ATTRS:{color:{value:"dark",writeOnce:!0},source:{value:[],setter:function(t){t.constructor==Object&&(t=[t]);for(var e=0;e<t.length;e++)t[e].index=e;return t}},defaultAlbum:{value:0},defaultImage:{value:0},loadOnRender:{value:!0},autoPlay:{value:!0},pauseOnNextOrPrev:{value:!0},randomize:{value:!1},speed:{value:4e3},responsiveThreshold:{value:600},stretchy:{value:!1},stretchyType:{value:"ratio"},stretchyVerticalSpace:{value:0},stretchyRatio:{value:.7},loadingImageEnabled:{value:!0},loadingImageSettings:{value:{}}}})},"2.0.0",{requires:["node","base","widget","widget-parent","widget-child","fl-slideshow-album-loader","fl-spinner"]}),YUI.add("fl-smugmug-api",function(t){t.namespace("FL").SmugMugAPI=t.Base.create("fl-smugmug-api",t.Base,[],{_sessionID:null,_requestURL:null,initializer:function(){this._resetRequestURL()},addParam:function(t,e){this._requestURL=this._requestURL+"&"+t+"="+e},loginAnon:function(){this.addParam("method","smugmug.login.anonymously"),this.once("complete",this._loginAnonComplete),this.request()},_loginAnonComplete:function(t){t.Login&&(this._sessionID=t.Login.Session.id)},request:function(){this.addParam("Callback","{callback}"),t.jsonp(this._requestURL,{on:{success:this._requestComplete,timeout:function(){}},context:this,timeout:6e4,args:[]})},_requestComplete:function(t){this._resetRequestURL(),this.fire("complete",t)},_resetRequestURL:function(){this._requestURL=this.get("apiURL")+"?APIKey="+this.get("apiKey"),this._sessionID&&this.addParam("SessionID",this._sessionID)}},{ATTRS:{apiURL:{value:"https://api.smugmug.com/services/api/json/1.3.0/"},apiKey:{value:"7w6kuU5Ee6KSgRRExf2KLgppdkez9JD2"}}})},"2.0.0",{requires:["base","jsonp"]}),YUI.add("fl-spinner",function(t){!function(e,i,s){function n(t,e){for(var i=~~((t[m]-1)/2),s=1;s<=i;s++)e(t[2*s-1],t[2*s])}function a(t){var e=i.createElement(t||"div");return n(arguments,function(t,i){e[t]=i}),e}function o(t,e,i){return i&&!i[L]&&o(t,i),t.insertBefore(e,i||null),t}function l(t,e){var i,s=[f,e,~~(100*t)].join("-"),n="{"+f+":"+t+"}";if(!D[s]){for(i=0;i<A[m];i++)try{H.insertRule("@"+(A[i]&&"-"+A[i].toLowerCase()+"-"||"")+"keyframes "+s+"{0%{"+f+":1}"+e+"%"+n+"to"+n+"}",H.cssRules[m])}catch(a){}D[s]=1}return s}function h(t,e){var i,n,a=t[x];if(a[e]!==s)return e;for(e=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<A[m];n++)if(i=A[n]+e,a[i]!==s)return i}function r(t){return n(arguments,function(e,i){t[x][h(t,e)||e]=i}),t}function g(t){return n(arguments,function(e,i){t[e]===s&&(t[e]=i)}),t}var u,d="width",m="length",c="radius",_="lines",p="trail",v="color",f="opacity",b="speed",y="shadow",x="style",I="height",S="left",w="top",B="px",T="childNodes",C="firstChild",L="parentNode",N="position",P="relative",O="absolute",R="animation",E="transform",k="Origin",F="Timeout",U="coord",z="#000",M=x+"Sheets",A="webkit0Moz0ms0O".split(0),D={};o(i.getElementsByTagName("head")[0],a(x));var H=i[M][i[M][m]-1],W=function(t){this.opts=g(t||{},_,12,p,100,m,7,d,5,c,10,v,z,f,.25,b,1)},V=W.prototype={spin:function(t){var i=this,s=i.el=i[_](i.opts);if(t&&o(t,r(s,S,~~(t.offsetWidth/2)+B,w,~~(t.offsetHeight/2)+B),t[C]),!u){var n=i.opts,a=0,l=20/n[b],h=(1-n[f])/(l*n[p]/100),g=l/n[_];!function d(){a++;for(var t=n[_];t;t--){var o=Math.max(1-(a+t*g)%l*h,n[f]);i[f](s,n[_]-t,o,n)}i[F]=i.el&&e["set"+F](d,50)}()}return i},stop:function(){var t=this,i=t.el;return e["clear"+F](t[F]),i&&i[L]&&i[L].removeChild(i),t.el=s,t}};V[_]=function(t){function e(e,i){return r(a(),N,O,d,t[m]+t[d]+B,I,t[d]+B,"background",e,"boxShadow",i,E+k,S,E,"rotate("+~~(360/t[_]*h)+"deg) translate("+t[c]+B+",0)","borderRadius","100em")}for(var i,s=r(a(),N,P),n=l(t[f],t[p]),h=0;h<t[_];h++)i=r(a(),N,O,w,1+~(t[d]/2)+B,E,"translate3d(0,0,0)",R,n+" "+1/t[b]+"s linear infinite "+(1/t[_]/t[b]*h-1/t[b])+"s"),t[y]&&o(i,r(e(z,"0 0 4px "+z),w,2+B)),o(s,o(i,e(t[v],"0 0 1px rgba(0,0,0,.1)")));return s},V[f]=function(t,e,i){t[T][e][x][f]=i};var q="behavior",X="url(#default#VML)",Y="group0roundrect0fill0stroke".split(0);!function(){var t,e=r(a(Y[0]),q,X);if(!h(e,E)&&e.adj){for(t=0;t<Y[m];t++)H.addRule(Y[t],q+":"+X);V[_]=function(){function t(){return r(a(Y[0],U+"size",l+" "+l,U+k,-n+" "+-n),d,l,I,l)}function e(e,i,l){o(h,o(r(t(),"rotation",360/s[_]*e+"deg",S,~~i),o(r(a(Y[1],"arcsize",1),d,n,I,s[d],S,s[c],w,-s[d]/2,"filter",l),a(Y[2],v,s[v],f,s[f]),a(Y[3],f,0))))}var i,s=this.opts,n=s[m]+s[d],l=2*n,h=t(),g=~(s[m]+s[c]+s[d])+B;if(s[y])for(i=1;i<=s[_];i++)e(i,-2,"progid:DXImage"+E+".Microsoft.Blur(pixel"+c+"=2,make"+y+"=1,"+y+f+"=.3)");for(i=1;i<=s[_];i++)e(i);return o(r(a(),"margin",g+" 0 0 "+g,N,P),h)},V[f]=function(t,e,i,s){s=s[y]&&s[_]||0,t[C][T][e+s][C][C][f]=i}}else u=h(e,R)}(),t.namespace("FL").Spinner=W}(window,document)},"2.0.0"),YUI.add("fl-utils",function(t){t.namespace("FL").Utils={cssSupport:function(e){var i=document.body||document.documentElement,s=i.style,n=["Moz","Webkit","Khtml","O","ms","Icab"],a=0;if("transform"==e&&t.UA.gecko&&t.UA.gecko<4)return!1;if("transform"==e&&t.UA.opera>0)return!1;if("transform"==e&&t.UA.ie>0&&t.UA.ie<10)return!1;if("transform"==e&&navigator.userAgent.match(/Trident/))return!1;if("undefined"==typeof s)return!1;if("string"==typeof s[e])return!0;for(e=e.charAt(0).toUpperCase()+e.substr(1);a<n.length;a++)if("string"==typeof s[n[a]+e])return!0}}},"2.0.0");
1
+ YUI.add("fl-event-move",function(t){var e={_isEndEvent:!1,on:function(t,e,i){this.type.indexOf("end")>-1&&(this._isEndEvent=!0),e._direction=this.type.replace("gesturemove","").replace("end",""),window.navigator.msPointerEnabled?(e._startHandle=t.on("MSPointerDown",this._onStart,this,t,e,i),e._moveHandle=t.on("MSPointerMove",this._onMove,this,t,e,i),e._endHandle=t.on("MSPointerUp",this._onEnd,this,t,e,i)):(e._startHandle=t.on("gesturemovestart",this._onStart,null,this,t,e,i),e._moveHandle=t.on("gesturemove",this._onMove,null,this,t,e,i),e._endHandle=t.on("gesturemoveend",this._onEnd,{standAlone:!0},this,t,e,i))},detach:function(t,e,i){e._startHandle.detach(),e._startHandle=null,e._moveHandle.detach(),e._moveHandle=null,e._endHandle.detach(),e._endHandle=null},_onStart:function(t,e,i,s){i._doMove=null,i._startX=t.pageX,i._startY=t.pageY},_onMove:function(t,e,i,s){this._checkDirection(t,i)?i._doMove=!0:i._doMove=!1,i._doMove&&!this._isEndEvent&&s.fire(t)},_onEnd:function(t,e,i,s){i._doMove&&this._isEndEvent&&(t.startPageX=i._startX,t.startPageY=i._startY,s.fire(t)),i._doMove=null},_checkDirection:function(t,e){var i=Math.abs(e._startX-t.pageX),s=Math.abs(e._startY-t.pageY);return s>i&&e._startY>t.pageY&&"vertical"==e._direction||(s>i&&e._startY<t.pageY&&"vertical"==e._direction||(s<i&&e._startX>t.pageX&&"horizontal"==e._direction||s<i&&e._startX<t.pageX&&"horizontal"==e._direction))}};t.Event.define("gesturemovevertical",e),t.Event.define("gesturemoveverticalend",e),t.Event.define("gesturemovehorizontal",e),t.Event.define("gesturemovehorizontalend",e)},"2.0.0",{requires:["event-move"]}),YUI.add("fl-slideshow",function(t){t.namespace("FL").SlideshowCaption=t.Base.create("fl-slideshow-caption",t.Widget,[t.WidgetChild],{_textToggled:!1,_textToggleLink:null,renderUI:function(){var e=this.get("root"),i=this.get("boundingBox");this._textToggleLink=t.Node.create('<a href="javascript:void(0);"></a>'),this._textToggleLink.addClass("fl-slideshow-caption-toggle"),this._textToggleLink.set("innerHTML",e.get("captionMoreLinkText")),i.appendChild(this._textToggleLink)},bindUI:function(){this.get("root").on("imageLoadComplete",t.bind(this._setText,this)),this._textToggleLink.on("click",t.bind(this._toggleText,this))},_setText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=t.get("captionTextLength"),s=this.get("contentBox");return t.imageInfo.caption&&""!==t.imageInfo.caption?(i>-1?!this._textToggled&&i<e.length?(e=this._shortenText(e),this._textToggleLink.setStyle("display","inline-block")):this._textToggled&&i<e.length?(e=this._stripTags(e),this._textToggleLink.setStyle("display","inline-block")):(e=this._stripTags(e),this._textToggleLink.setStyle("display","none")):e=this._stripTags(e),void s.set("innerHTML",e)):(s.set("innerHTML",""),void this._textToggleLink.setStyle("display","none"))},_toggleText:function(){var t=this.get("root"),e=t.imageInfo.caption,i=this.get("contentBox");this._textToggled?(e=this._shortenText(e),this._textToggleLink.set("innerHTML",t.get("captionMoreLinkText")),this._textToggled=!1):(e=this._stripTags(e),this._textToggleLink.set("innerHTML",t.get("captionLessLinkText")),this._textToggled=!0),i.set("innerHTML",e)},_stripTags:function(t,e){var i,s=this.get("root");return(e||s.get("captionStripTags"))&&(i=document.createElement("div"),i.innerHTML=t,t=i.textContent||i.innerText),t},_shortenText:function(e){var i=this.get("root");return e=this._stripTags(e,!0).substring(0,i.get("captionTextLength")),t.Lang.trim(e.substring(0,e.lastIndexOf(" ")))+" ..."}},{CSS_PREFIX:"fl-slideshow-caption",ATTRS:{}}),t.namespace("FL").SlideshowFrame=t.Base.create("fl-slideshow-frame",t.Widget,[t.WidgetParent,t.WidgetChild],{_imageInfo:null,_activeImage:null,_nextImage:null,_loadQueue:null,_transition:null,_transitioning:!1,_resizeAfterTransition:!1,_gestures:null,initializer:function(){var e=this.get("imageConfig");this._activeImage=new t.FL.SlideshowImage(e),this._nextImage=new t.FL.SlideshowImage(e)},renderUI:function(){this.add(this._activeImage),this.add(this._nextImage)},bindUI:function(){var e=this._activeImage.get("boundingBox"),i=this._nextImage.get("boundingBox"),s=this.get("transition");("ontouchstart"in window||window.navigator.msPointerEnabled)&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:e,nextItem:i}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){var t=this._activeImage.get("boundingBox"),e=this._nextImage.get("boundingBox"),i=this.get("contentBox");t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("left","-9999px"),e.setStyle("position","absolute"),e.setStyle("top","0px"),e.setStyle("left","-9999px"),i.setStyle("position","relative"),i.setStyle("overflow","hidden")},load:function(t){var e=this._activeImage._imageInfo;return this._transitioning?void(this._loadQueue=t):void(e&&e.largeURL==t.largeURL||(this._imageInfo=t,this._transitionInit(t)))},preload:function(t,e,i){this._imageInfo=t,this._nextImage.preload(t,e,i)},unload:function(){this._imageInfo=null,this._loadQueue=null,this._transitioning=!1,this._transition=null,this._activeImage.detachAll(),this._activeImage.unload(),this._activeImage.get("boundingBox").setStyle("left","-9999px"),this._nextImage.detachAll(),this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")},resize:function(t,e){if(t&&e){var i=this.get("boundingBox"),s=[parseInt(i.getComputedStyle("paddingTop"),10),parseInt(i.getComputedStyle("paddingRight"),10),parseInt(i.getComputedStyle("paddingBottom"),10),parseInt(i.getComputedStyle("paddingLeft"),10)];t=t-s[1]-s[3],e=e-s[0]-s[2],this.set("width",t),this.set("height",e),this._transitioning?this._resizeAfterTransition=!0:(this._activeImage.resize(t,e),this._nextImage.resize(t,e))}},_getTransition:function(){var t=this.get("root"),e=t.albumInfo.images.length-1,i="next",s=t.get("transition");return null===t.lastImageIndex?i="":t.imageIndex==e&&0===t.lastImageIndex?i="prev":0===t.imageIndex&&t.lastImageIndex==e?i="next":t.lastImageIndex>t.imageIndex?i="prev":t.lastImageIndex<t.imageIndex&&(i="next"),"next"==i?(s=s.replace("slideHorizontal","slideLeft"),s=s.replace("slideVertical","slideUp")):"prev"==i&&(s=s.replace("slideHorizontal","slideRight"),s=s.replace("slideVertical","slideDown")),s},_transitionInit:function(t){this._transitioning=!0,this._gestures&&this._gestures.disable(),this.fire("transitionInit"),t?(this._nextImage.once("loadComplete",this._transitionStart,this),this._nextImage.load(t)):this._transitionStart()},_transitionStart:function(){var e=this.get("root");this.fire("transitionStart"),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextImage._imageInfo?this._nextImage.get("boundingBox"):null,itemOut:this._activeImage._imageInfo?this._activeImage.get("boundingBox"):null,type:this._getTransition(),duration:e.get("transitionDuration"),easing:e.get("transitionEasing"),kenBurnsDuration:e.get("speed")/1e3,kenBurnsZoom:e.get("kenBurnsZoom")}),this._nextImage._imageInfo&&this._nextImage.get("boundingBox").setStyle("left","0px"),this._transition.once("complete",this._transitionComplete,this),this._transition.run()},_transitionComplete:function(){var t=this.get("root");this._swapImageRefs(),this.fire("transitionComplete"),this._transition=null,this._transitioning=!1,this._gestures&&(t&&t.albumInfo.images.length<=1?this._gestures.disable():this._gestures.enable()),this._loadQueue?(this.load(this._loadQueue),this._loadQueue=null):this._resizeAfterTransition&&(this._resizeAfterTransition=!1,this._activeImage.resize(this.get("width"),this.get("height")),this._nextImage.resize(this.get("width"),this.get("height")))},_gesturesMoveStart:function(e){var i=0,s=this.get("root");i="next"==e.direction?s.imageIndex+1:s.imageIndex-1,i=i<0?s.albumInfo.images.length-1:i,i=i>=s.albumInfo.images.length?0:i,s.pause(),s._hideLoadingImage(),s._showLoadingImageWithDelay(),t.FL.SlideshowImageLoader.removeGroup(this._nextImage.get("loadGroup")),this._nextImage.once("loadComplete",s._hideLoadingImage,s),this._nextImage.load(s.albumInfo.images[i])},_gesturesEndComplete:function(){var t=this.get("root"),e=0;this._nextImage._imageInfo&&(e=this._nextImage._imageInfo.index,this._swapImageRefs(),this._imageInfo=t.albumInfo.images[e],t.loadImage(e))},_swapImageRefs:function(){var t=this._activeImage;this._activeImage=this._nextImage,this._nextImage=t,this._nextImage._imageInfo&&(this._nextImage.unload(),this._nextImage.get("boundingBox").setStyle("left","-9999px")),this._gestures&&(this._gestures.set("activeItem",this._activeImage.get("boundingBox")),this._gestures.set("nextItem",this._nextImage.get("boundingBox")))}},{CSS_PREFIX:"fl-slideshow-frame",ATTRS:{imageConfig:{value:null},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowFullscreen=t.Base.create("fl-slideshow-fullscreen",t.Plugin.Base,[],{active:!1,_closeMessage:null,_closeMessageTimer:null,_initialStyles:{position:"static",top:"0px",left:"0px"},initializer:function(){var e=this.get("host"),i=e.get("boundingBox"),s=this;i.addClass("fl-fullscreen-enabled"),t.FL.SlideshowFullscreen.OS_SUPPORT?(document.addEventListener("fullscreenchange",function(){s._osChange()},!1),document.addEventListener("mozfullscreenchange",function(){s._osChange()},!1),document.addEventListener("webkitfullscreenchange",function(){s._osChange()},!1)):this._renderCloseMessage()},toggle:function(){this.active?this.exit():this.enter()},enter:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osEnter():this._browserEnter()},exit:function(){t.FL.SlideshowFullscreen.OS_SUPPORT?this._osExit():this._browserExit()},_osEnter:function(){var t=this.get("host").get("boundingBox")._node;t.webkitRequestFullScreen?t.webkitRequestFullScreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.requestFullScreen&&t.requestFullScreen()},_osExit:function(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen()},_osChange:function(){var t=this.get("host");t.frame&&t.frame._transitioning&&t.frame._transitionComplete(),this.active?this._exit():this._enter()},_browserEnter:function(){var e=this.get("host").get("boundingBox");this._initialStyles={position:e.getStyle("position"),top:e.getStyle("top"),left:e.getStyle("left"),zIndex:e.getStyle("zIndex")},e.setStyles({position:"fixed",top:"0px",left:"0px",zIndex:1e4}),t.Node.one("body").on("fl-fullscreen|keydown",t.bind(this._onKey,this)),this._showCloseMessage(),this._enter()},_browserExit:function(){var e=this.get("host").get("boundingBox");e.setStyles({position:this._initialStyles.position,top:this._initialStyles.top,left:this._initialStyles.left,zIndex:this._initialStyles.zIndex}),t.Node.one("body").detach("fl-fullscreen|keydown"),this._hideCloseMessage(),this._exit()},_enter:function(){var t=this.get("host"),e=t.get("boundingBox");e.addClass("fl-fullscreen-active"),this.active=!0,t.resize()},_exit:function(){var t=this.get("host"),e=t.get("boundingBox");e.removeClass("fl-fullscreen-active"),this.active=!1,t.resize()},_onKey:function(t){if(27==t.keyCode)return this.exit(),!1},_renderCloseMessage:function(){this._closeMessage=t.Node.create('<div class="fl-fullscreen-close-message"></div>'),this._closeMessage.set("innerHTML",'<span>Press the "esc" button to exit fullscreen mode.</span>'),this._closeMessage.setStyle("display","none"),this.get("host").get("boundingBox").insert(this._closeMessage)},_showCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.show(!0),this._closeMessageTimer=t.later(4e3,this,this._hideCloseMessage)},_hideCloseMessage:function(){this._closeMessageTimer&&(this._closeMessageTimer.cancel(),this._closeMessageTimer=null),this._closeMessage.hide(!0)}},{NS:"fullscreen",OS_SUPPORT:function(){var t=document.documentElement;return t.webkitRequestFullScreen||t.mozRequestFullScreen||t.requestFullScreen}()}),t.namespace("FL").SlideshowGestures=t.Base.create("fl-slideshow-gestures",t.Base,[],{_startX:null,_startY:null,_touchMoving:!1,_moving:!1,_movingDirection:null,_transitioning:!1,initializer:function(){this.enable()},enable:function(){var e=this.get("id"),i=this.get("direction"),s=this.get("activeItem"),n=this.get("nextItem");s.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|gesturemovestart",t.bind(this._onStart,this)),n.on(e+"|transitionend",t.bind(this._onEndComplete,this)),n.on(e+"|oTransitionEnd",t.bind(this._onEndComplete,this)),n.on(e+"|webkitTransitionEnd",t.bind(this._onEndComplete,this)),"horizontal"==i?(s.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),s.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this)),n.on(e+"|gesturemovehorizontal",t.bind(this._onMoveHorizontal,this)),n.on(e+"|gesturemovehorizontalend",t.bind(this._onEndHorizontal,this))):(s.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),s.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)),n.on(e+"|gesturemovevertical",t.bind(this._onMoveVertical,this)),n.on(e+"|gesturemoveverticalend",t.bind(this._onEndVertical,this)))},disable:function(){var t=this.get("id"),e=this.get("activeItem"),i=this.get("nextItem");e.detach(t+"|*"),i.detach(t+"|*")},_onStart:function(t){var e=this.get("direction");this._transitioning&&this._onEndComplete(),"horizontal"==e?this._startX=t.pageX:this._startY=t.pageY,this.fire("start")},_onMoveHorizontal:function(t){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("width"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("left",0),s.setStyles({opacity:1,left:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),i.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-webkit-transform","translate("+a+"px, 0px) translateZ(0px)"),s.setStyle("-ms-transform","translate("+a+"px, 0px) translateZ(0px)"),this.fire("move")},_onMoveVertical:function(t){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(i.getComputedStyle("height"),10),a=e<0?Math.abs(e):-e,o=e<0?"prev":"next";t.preventDefault(),this._moving&&this._movingDirection==o||(i.setStyle("top",0),s.setStyles({opacity:1,left:"auto",top:e<0?-n:n}),this._moving=!0,this._movingDirection=o,this.fire("moveStart",{direction:o})),i.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),i.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-webkit-transform","translate(0px, "+a+"px) translateZ(0px)"),s.setStyle("-ms-transform","translate(0px, "+a+"px) translateZ(0px)"),this.fire("move")},_onEndHorizontal:function(t){if(this._moving){var e=this._startX-t.pageX,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("width"),10),a=e<0?n:-n;i.transition({transform:"translate("+a+"px, 0px)"}),s.transition({transform:"translate("+a+"px, 0px)"}),this._transitioning=!0,this.fire("end")}},_onEndVertical:function(t){if(this._moving){var e=this._startY-t.pageY,i=this.get("activeItem"),s=this.get("nextItem"),n=parseInt(s.getComputedStyle("height"),10),a=e<0?n:-n;i.transition({transform:"translate(0px, "+a+"px)"}),s.transition({transform:"translate(0px, "+a+"px)"}),this._transitioning=!0,this.fire("end")}},_onEndComplete:function(){var t=this.get("direction"),e=this.get("activeItem"),i=this.get("nextItem");e.setStyles({opacity:0,"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),i.setStyles({"-webkit-transform":"","-webkit-transition":"","-ms-transform":"","-ms-transition":""}),"horizontal"==t?(e.setStyle("left","-9999px"),i.setStyle("left","0px")):(e.setStyle("top","-9999px"),i.setStyle("top","0px")),this.set("activeItem",i),this.set("nextItem",e),this._moving=!1,this._movingDirection=null,this._transitioning=!1,this.fire("endComplete")}},{ATTRS:{direction:{value:"horizontal"},activeItem:{value:null},nextItem:{value:null}}}),t.namespace("FL").SlideshowImageLoader={_loading:!1,_currentImage:null,_currentImageData:null,_queue:[],add:function(t,e,i,s){var n={group:t,src:e,callback:i};s?this._queue.unshift(n):this._queue.push(n),this._loading||this._load()},removeGroup:function(t){for(var e=this._queue.length-1;e>-1;e--)this._queue[e].group==t&&this._queue.splice(e,1);this._currentImageData&&this._currentImageData.group==t&&(this._currentImage.detachAll(),this._currentImage=null,this._currentImageData=null,this._queue.length>0?this._load():this._loading=!1)},_load:function(){this._loading=!0,this._currentImageData=this._queue.shift(),this._currentImage=t.Node.create("<img />"),this._currentImage.on("error",t.bind(this._loadComplete,this)),this._currentImage.on("load",t.bind(this._loadComplete,this)),this._currentImage.set("src",this._currentImageData.src)},_loadComplete:function(){this._currentImageData.callback&&this._currentImageData.callback(this._currentImage),this._queue.length>0?this._load():(this._loading=!1,this._currentImage=null,this._currentImageData=null)}},t.namespace("FL").SlideshowImage=t.Base.create("fl-slideshow-image",t.Widget,[t.WidgetChild],{_imageInfo:null,_image:null,_loading:!1,_loadingURL:null,_videoButton:null,_videoBox:null,_video:null,CONTENT_TEMPLATE:null,syncUI:function(){var t=this.get("boundingBox");this.get("crop")&&(t.setStyle("overflow","hidden"),t.addClass("fl-slideshow-image-cropped"))},load:function(t){this._imageInfo=t,this._loading=!0,this._load()},preload:function(e,i,s){var n=this._isVideo(),a=this.get("loadVideos"),o=this.get("showVideoButton");this.unload(),this.set("width",i),this.set("height",s),this._imageInfo=e,(!n||!a||n&&a&&o)&&t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._getImageURL(),t.bind(this._imagePreloaded,this),this.get("loadPriority"))},_imagePreloaded:function(t){this._image=t},unload:function(){this._image&&(this._image.remove(),this._image.detachAll(),this._image.set("src",""),this._image=null),this._video&&(this._video.remove(),this._video=null),this._videoButton&&(this._videoButton.remove(),this._videoButton=null),this._videoBox&&this._removeVideoBox(),this._imageInfo=null,this._loading=!1,this._loadingURL=null},resize:function(t,e){var i=2*parseInt(this.get("boundingBox").getComputedStyle("borderTopWidth"),10),s=this.get("boundingBox");this.set("width",t-i),this.set("height",e-i),s.setStyle("width",t-i+"px"),s.setStyle("height",e-i+"px"),this._videoButton&&this._positionVideoButton(),this._videoBox&&this._loadVideo(),this._loading||(this._imageInfo&&this._load(),this._image&&this._positionImage())},_load:function(){var t=this.get("loadVideos"),e=this.get("showVideoButton");!this._isVideo()||!t||e||"ontouchstart"in window?this._loadImage():this._loadVideo()},_loadImage:function(){var e=this._getImageURL(),i=this.get("loadVideos");e!=this._loadingURL&&(this._loadingURL=e,t.FL.SlideshowImageLoader.add(this.get("loadGroup"),this._loadingURL,t.bind(this._loadImageComplete,this),this.get("loadPriority")),this._loading&&(this._isVideo()&&i&&this._insertVideoButton(),this.fire("loadStart")))},_loadImageComplete:function(t){var e=this.get("boundingBox"),i=this.get("showVideoButton");this._image=t,this._image.setStyle("visibility","hidden"),this._image.addClass("fl-slideshow-image-img"),this._image.detachAll(),this._video&&!i&&(this._video.remove(),this._video=null),e.all("img").remove(),e.append(this._image),this._setupImage(),this._resizeImage(),this._positionImage(),this._image.setStyle("visibility","visible"),this._loadingURL=null,this._loading&&(this._loading=!1,this.fire("loadComplete"))},_setupImage:function(){var t=this.get("boundingBox");"undefined"!=typeof this._image._node.style.msInterpolationMode&&(this._image._node.style.msInterpolationMode="bicubic"),this.get("protect")&&(t.delegate("contextmenu",this._protectImage,"img"),t.delegate("mousedown",this._protectImage,"img"))},_protectImage:function(t){return t.preventDefault(),!1},_resizeImage:function(){var t=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),e=this._image.get("width"),i=this._image.get("height"),s=parseInt(this.get("boundingBox").getComputedStyle("width"),10),n=parseInt(this.get("boundingBox").getComputedStyle("height"),10),a=0,o=0,l=0,h=0,r=this.get("cropHorizontalsOnly"),g=i>e,u=!1;this._imageInfo&&this.get("checkFilenamesForNoCrop")&&(u=this._imageInfo.filename.indexOf("nocrop")>-1),!this.get("crop")||r&&g||u?(l=e/s,h=i/n,h>l?(a=Math.round(e*(1/h)),o=Math.round(i*(1/h))):(a=Math.round(e*(1/l)),o=Math.round(i*(1/l)))):(a=s,o=Math.round(i*s/e),o<n&&(o=n,a=Math.round(e*n/i))),this.get("crop")||this.get("upsize")||!(a>e||o>i)||(a=e,o=i),a-=t,o-=t,this._image.setStyle("width",a+"px"),this._image.setStyle("height",o+"px"),!this.get("crop")&&this.get("constrainWidth")&&this.set("width",a+"px"),!this.get("crop")&&this.get("constrainHeight")&&this.set("height",o+"px")},_positionImage:function(){var t=this.get("position").split(" "),e=""===t[0]?"center":t[0],i=""===t[1]?"center":t[1],s=0,n=0,a=parseInt(this.get("boundingBox").getComputedStyle("width"),10),o=parseInt(this.get("boundingBox").getComputedStyle("height"),10),l=2*parseInt(this._image.getComputedStyle("borderTopWidth"),10),h=parseInt(this._image.getComputedStyle("width"),10)+l,r=parseInt(this._image.getComputedStyle("height"),10)+l;isNaN(h)&&isNaN(r)||("left"==e&&(s=0),"center"==e&&(s=(a-h)/2),"right"==e&&(s=a-h),"top"==i&&(n=0),"center"==i&&(n=(o-r)/2),"bottom"==i&&(n=o-r),this._image.setStyles({left:s,top:n}))},_getImageURL:function(){var t=0,e=0,i=0,s=this.get("width"),n=this.get("height"),a=this.get("useThumbSizes"),o=this._imageInfo,l=[o.tinyURL||o.thumbURL||o.largeURL,o.thumbURL||o.largeURL,o.smallURL||o.largeURL,o.mediumURL||o.largeURL||o.smallURL,o.largeURL||o.mediumURL||o.smallURL,o.xlargeURL||o.largeURL||o.mediumURL||o.smallURL,o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL,o.x3largeURL||o.x2largeURL||o.largeURL||o.mediumURL||o.smallURL];return t=a&&s<=100?0:a&&s<=150?1:s<=400?2:s>=400&&s<=600?3:s>=600&&s<=800?4:s>=800&&s<=1024?5:s>=1024&&s<=1280?6:7,e=a&&n<=100?0:a&&n<=150?1:n<=300?2:n>=300&&n<=450?3:n>=450&&n<=600?4:n>=600&&n<=768?5:n>=768&&n<=960?6:7,i=Math.max(t,e),l[i]},_isVideo:function(){return!!this._imageInfo&&("mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType||""!==this._imageInfo.iframe)},_loadVideo:function(){var t=this.get("boundingBox"),e=this.get("showVideoButton"),i=!!e;this._video&&(this._video.remove(),this._video=null),"mp4"==this._imageInfo.format&&"smugmug"==this._imageInfo.sourceType?this._video=this._getSmugMugVideoEmbed(this._imageInfo,i):""!==this._imageInfo.iframe&&(this._video=this._getIframeVideoEmbed(this._imageInfo,i)),this._videoBox?this._videoBox.one(".fl-slideshow-video-wrap").insert(this._video):(t.all("img").remove(),t.append(this._video)),this._loading&&(this._loading=!1,this.fire("loadComplete"))},_insertVideoButton:function(){var e=this.get("boundingBox"),i="ontouchstart"in window?"touchstart":"click";this._videoButton=t.Node.create('<a class="fl-slideshow-video-button" href="javascript:void(0);"></a>'),this._videoButton.on(i,t.bind(this._showVideoBox,this)),e.insert(this._videoButton),this._positionVideoButton()},_positionVideoButton:function(){var t=this.get("width"),e=this.get("height"),i=parseInt(this._videoButton.getStyle("width"),10),s=parseInt(this._videoButton.getStyle("height"),10);this._videoButton.setStyles({left:(t-i)/2,top:(e-s)/2})},_showVideoBox:function(){var e=this.get("root"),i=t.Node.create('<div class="fl-slideshow-video-wrap"></div>'),s=t.Node.create('<a class="fl-slideshow-video-close" href="javascript:void(0);"></a>'),n="ontouchstart"in window?"touchstart":"click";this._videoBox=t.Node.create('<div class="fl-slideshow-video"></div>'),this._videoBox.setStyle("padding",e.get("boundingBox").getStyle("padding")),this._videoBox.insert(i),this._videoBox.insert(s),this._videoBox.on(n,t.bind(this._removeVideoBox,this)),s.on(n,t.bind(this._removeVideoBox,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&s.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),t.one("body").insert(this._videoBox),this._loadVideo(),t.one("body").on("fl-slideshow-image|keydown",this._onKey,this)},_getSmugMugVideoEmbed:function(e,i){var s=document.createElement("video"),n=0,a="",o="",l="";return null!==t.UA.mobile&&s.canPlayType&&s.canPlayType("video/mp4")?(n=this.get("width"),a="https://www.smugmug.com/photos/"+e.id+"_"+e.key+"-"+n+".mp4",l+='<video width="100%" height="100%" poster="'+this._getImageURL()+'" controls preload="none"',i&&(l+=" autoplay"),l+=">",l+='<source src="'+a+'" type="video/mp4" />',l+="</video>"):(o="imageId="+e.id,o+="&amp;imageKey="+e.key,o+="&amp;albumId="+e.albumId,o+="&amp;albumKey="+e.albumKey,o+="&amp;apiURL=https://api.smugmug.com/&amp;hostLevel=live&amp;isPro=true",o+=i?"&amp;autoPlay=true":"&amp;autoPlay=false",l+='<object type="application/x-shockwave-flash" width="100%" height="100%" data="https://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="movie" value="https://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf">',l+='<param name="allowFullScreen" value="true">',l+='<param name="wmode" value="transparent">',l+='<param name="flashVars" value="'+o+'">',l+='<embed src="https://cdn.smugmug.com/img/ria/SmugPlayer/2012102601.swf" flashvars="'+o+'" width="100%" height="100%" type="application/x-shockwave-flash" allowfullscreen="true" wmode="transparent">',l+="</object>"),t.Node.create(l)},_getIframeVideoEmbed:function(e,i){var s='<iframe width="100%" height="100%" frameborder="0" allowfullscreen ',n=e.iframe;return i&&(n+=n.indexOf("?")>-1?"&autoplay=1":"?autoplay=1"),s+='src="'+n+'"></iframe>',t.Node.create(s)},_removeVideoBox:function(e){"undefined"!=typeof e&&e.target&&e.target.get("className").indexOf("fl-slideshow-video")<0||(null!==this._videoBox&&(this._videoBox.remove(),this._videoBox=null,this._video=null),t.one("body").detach("fl-slideshow-image|keydown",this._onKey))},_onKey:function(t){if(27==t.keyCode)return this._removeVideoBox(),!1}},{CSS_PREFIX:"fl-slideshow-image",ATTRS:{loadGroup:{value:"none"},loadPriority:{value:!1},crop:{value:!1},checkFilenamesForNoCrop:{value:!0},cropHorizontalsOnly:{value:!1},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},useThumbSizes:{value:!1},constrainWidth:{value:!1},constrainHeight:{value:!1},loadVideos:{value:!0},showVideoButton:{value:!0}}}),t.namespace("FL").SlideshowMouseNav=t.Base.create("fl-slideshow-mouse-nav",t.Plugin.Base,[],{initializer:function(){var t=this.get("trigger");t.on("click",this._triggerClick,this),t.on("mousemove",this._showArrow,this),t.on("mouseleave",this._hideArrow,this)},_triggerClick:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;a>=s/2?e.nextImage():e.prevImage()},_showArrow:function(t){var e=this.get("host"),i=this.get("trigger"),s=parseInt(i.getStyle("width"),10),n=i.get("region"),a=t.pageX-n.left+5;null!==e.albumInfo&&e.albumInfo.images.length>1&&(a>=s/2?(i.removeClass("fl-slideshow-mouse-nav-prev"),i.addClass("fl-slideshow-mouse-nav-next")):(i.removeClass("fl-slideshow-mouse-nav-next"),i.addClass("fl-slideshow-mouse-nav-prev")))},_hideArrow:function(){var t=this.get("trigger");t.removeClass("fl-slideshow-mouse-nav-next"),t.removeClass("fl-slideshow-mouse-nav-prev")}},{NS:"mouseNav",ATTRS:{trigger:{value:null}}}),t.namespace("FL").SlideshowKenBurns=t.Base.create("fl-slideshow-ken-burns",t.Base,[],{run:function(){var e=null,i=null;t.FL.Utils.cssSupport("transform")&&(e=this.get("image").one("img"),i=this._getTransform(),e.setStyles({"-webkit-transform-origin":i.origin,"-moz-transform-origin":i.origin,"-ms-transform-origin":i.origin,"transform-origin":i.origin,transform:i.start}),e.transition({easing:"ease-out",duration:this.get("duration"),transform:i.end}))},_getTransform:function(){var e=this.get("zoom"),i=this.get("image"),s=0,n=null,a=null;return s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS.length),n=t.FL.SlideshowKenBurns.ZOOM_DIRECTIONS[s],s=Math.floor(Math.random()*t.FL.SlideshowKenBurns.TRANSFORMS.length),a=t.FL.SlideshowKenBurns.TRANSFORMS[s],i.hasClass("fl-slideshow-image-cropped")||"in"!=n?"out"==n?(a.start="scale("+e+") "+a.translate,a.end="scale(1) translate(0, 0)"):(a.start="scale(1) translate(0, 0)",a.end="scale("+e+") "+a.translate):(s=Math.floor(2*Math.random()),a.start=0===s?"scale(1) translate(100px, 0)":"scale(1) translate(-100px, 0)",a.end="scale("+e+") translate(0, 0)",a.origin="center center"),a}},{ATTRS:{image:{value:null},zoom:{value:1.2},duration:{value:2}},ZOOM_DIRECTIONS:["in","out"],TRANSFORMS:[{origin:"left top",translate:"translate(-30px, -15px)"},{origin:"left center",translate:"translate(-30px, 0)"},{origin:"left bottom",translate:"translate(-30px, 15px)"},{origin:"right top",translate:"translate(30px, -15px)"},{origin:"right center",translate:"translate(30px, 0)"},{origin:"right bottom",translate:"translate(30px, 15px)"}]}),t.namespace("FL").SlideshowNav=t.Base.create("fl-slideshow-nav",t.Widget,[t.WidgetChild],{_buttons:null,_buttonsContainer:null,_buttonsLeftContainer:null,_buttonsRightContainer:null,_fontIcons:{buy:"Cart",caption:"InfoEncircled",close:"XCrossEncircled",fullscreen:"ScreenExpand",next:"ArrowRight",nextPage:"ArrowRight",pause:"PlayerPause",play:"PlayerPlay",prev:"ArrowLeft",prevPage:"ArrowLeft",social:"Heart",thumbs:"ViewThumbGrid"},CONTENT_TEMPLATE:null,renderUI:function(){this._renderContainers(),this._renderButtons(),this._renderFontIcons()},bindUI:function(){var t=this.get("root"),e=this.get("id");this._buttons.prev&&this._buttons.prev.on("click",t.prevImage,t),this._buttons.next&&this._buttons.next.on("click",t.nextImage,t),this._buttons.play&&(this._buttons.play.on("click",this._playClicked,this),t.on(e+"|played",this._showPauseButton,this),t.on(e+"|paused",this._showPlayButton,this),t._playing?this._showPauseButton():this._showPlayButton()),this._buttons.buy&&(t.on(e+"|albumLoadComplete",this._updateBuy,this),null!==t.albumInfo&&this._updateBuy()),this._buttons.count&&t.on(e+"|imageLoadComplete",this._updateCount,this),this._buttons.thumbs&&this._buttons.thumbs.on("click",t._toggleThumbs,t),this._buttons.caption&&(t.on(e+"|imageLoadComplete",this._updateCaption,this),this._updateCaption()),this._buttons.social&&this._buttons.social.on("click",t._toggleSocial,t),this._buttons.fullscreen&&t.fullscreen&&this._buttons.fullscreen.on("click",t.fullscreen.toggle,t.fullscreen),this._buttons.close&&this._buttons.close.on("click",t.hide,t)},destructor:function(){var t=this.get("root"),e=this.get("id");t.detach(e+"|*")},_renderContainers:function(){var e=this.get("contentBox"),i=this.get("buttonsLeft"),s=this.get("buttonsRight");this._buttonsContainer=t.Node.create("<div></div>"),this._buttonsContainer.addClass("fl-slideshow-nav-buttons"),e.appendChild(this._buttonsContainer),i.length>0&&(this._buttonsLeftContainer=t.Node.create("<div></div>"),this._buttonsLeftContainer.addClass("fl-slideshow-nav-buttons-left"),e.appendChild(this._buttonsLeftContainer)),s.length>0&&(this._buttonsRightContainer=t.Node.create("<div></div>"),this._buttonsRightContainer.addClass("fl-slideshow-nav-buttons-right"),e.appendChild(this._buttonsRightContainer))},_renderButtons:function(){var e="",i=0,s=0,n=[{names:this.get("buttons"),container:this._buttonsContainer},{names:this.get("buttonsLeft"),container:this._buttonsLeftContainer},{names:this.get("buttonsRight"),container:this._buttonsRightContainer}];for(this._buttons={};i<n.length;i++)for(s=0;s<n[i].names.length;s++)e=n[i].names[s],e.indexOf("count")>-1?(this._buttons[e]=t.Node.create("<span></span>"),
2
+ this._updateCount()):this._buttons[e]=t.Node.create('<a href="javascript:void(0);"></a>'),e.indexOf("buy")>-1&&this._buttons[e].setStyle("display","none"),this._buttons[e].set("name",e),this._buttons[e].addClass("fl-slideshow-nav-"+e),n[i].container.appendChild(this._buttons[e])},_renderFontIcons:function(){var t=null;if(this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"])for(t in this._buttons)"undefined"!=typeof this._buttons[t]&&"undefined"!=typeof this._fontIcons[t]?(this._buttons[t].addClass("sm-fonticon-"+this._fontIcons[t]),this._buttons[t].addClass("sm-fonticon sm-button-skin-default sm-button-nochrome")):t.indexOf("count")>-1&&this._buttons[t].addClass("fonticons-enabled")},_updateCount:function(){var e="",i=t.FL.SlideshowNav.COUNT_TEXT,s=1,n=1;this.get("root").albumInfo&&(s=this.get("root").imageInfo.index+1,n=this.get("root").albumInfo.images.length),e=i.replace("{current}",s).replace("{total}",n),this._buttons.count.set("innerHTML",e)},_updateCaption:function(){var t=this.get("root"),e=t.imageInfo;e&&""===e.caption?(t.caption.slideshowOverlay.enable(),t.caption.slideshowOverlay.hide(),this._buttons.caption.detach("click"),this._buttons.caption.addClass("fl-slideshow-nav-caption-disabled")):(this._buttons.caption.on("click",t._toggleCaption,t),this._buttons.caption.removeClass("fl-slideshow-nav-caption-disabled"))},_updateBuy:function(){var e=null,i=this.get("root"),s=i.get("source")[i.albumIndex],n=i.albumIndex,a=i.get("source")[n];s&&"smugmug"==s.type&&("undefined"!=typeof i.albumInfo.printable?this._updateBuyComplete():(e=new t.FL.SmugMugAPI,e.addParam("method","smugmug.albums.getInfo"),e.addParam("AlbumID",a.id),e.addParam("AlbumKey",a.key),e.on("complete",this._updateBuyComplete,this),e.request()))},_updateBuyComplete:function(t){var e=this.get("root"),i="undefined"==typeof t?e.albumInfo.printable:t.Album.Printable,s=e.albumInfo.link;i?(e.albumInfo.printable=!0,this._buttons.buy.set("href","https://secure.smugmug.com/cart/batchadd/?url="+encodeURIComponent(s)),this._buttons.buy.setStyle("display","inline-block")):(e.albumInfo.printable=!1,this._buttons.buy.setStyle("display","none")),this.fire("resize")},_playClicked:function(){var t=this.get("root");t._playing?t.pause():t.play()},_showPlayButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-pause"),this._buttons.play.addClass("fl-slideshow-nav-play"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPause"),this._buttons.play.addClass("sm-fonticon-PlayerPlay"))},_showPauseButton:function(){this._buttons.play.removeClass("fl-slideshow-nav-play"),this._buttons.play.addClass("fl-slideshow-nav-pause"),this.get("useFontIcons")&&"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&(this._buttons.play.removeClass("sm-fonticon-PlayerPlay"),this._buttons.play.addClass("sm-fonticon-PlayerPause"))}},{CSS_PREFIX:"fl-slideshow-nav",COUNT_TEXT:"{current} of {total}",ATTRS:{buttons:{value:[],writeOnce:!0},buttonsLeft:{value:[],writeOnce:!0},buttonsRight:{value:[],writeOnce:!0},useFontIcons:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowOverlay=t.Base.create("fl-slideshow-overlay",t.Plugin.Base,[],{_focus:!1,_visible:!0,_disabled:!1,_showProps:{duration:.5,easing:"ease-out",opacity:1},_hideProps:{duration:.5,easing:"ease-out",opacity:0},_hideTimer:null,initializer:function(){var t=this.get("host").get("boundingBox");this.afterHostEvent("render",this._initFocus),this.afterHostEvent("render",this._initVisibility),this.get("closeButton")&&this._initCloseButton(),t.addClass("fl-slideshow-overlay")},destructor:function(){this._hideTimerCancel()},_initFocus:function(){var e=this.get("host").get("boundingBox");e.on("mouseenter",t.bind(this._setFocusOnMouseenter,this)),e.on("mouseleave",t.bind(this._setFocusOnMouseleave,this))},_initVisibility:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");this.get("visible")||("display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),t.setStyle("opacity","0"),this._visible=!1)},_initCloseButton:function(){var e=this.get("host").get("boundingBox"),i=null;i=t.Node.create('<a class="fl-slideshow-overlay-close" href="javascript:void(0);"></a>'),i.on("click",t.bind(this._closeButtonClick,this)),"undefined"!=typeof YUI.Env.mods["sm-fonticon"]&&i.addClass("sm-fonticon sm-fonticon-XCrossEncircled sm-button-skin-default sm-button-nochrome"),e.insert(i)},_closeButtonClick:function(){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this))},_setFocusOnMouseenter:function(){this._focus=!0},_setFocusOnMouseleave:function(){this._focus=!1},disable:function(){this._disabled=!0},enable:function(){this._disabled=!1},show:function(){var e=this.get("host").get("boundingBox"),i=this.get("hideStyle");this._disabled||("display"==i?e.setStyle("display","block"):"left"==i&&e.setStyle("left","auto"),e.transition(this._showProps,t.bind(this._showComplete,this)),this.fire("showStart"))},_showComplete:function(){this._visible=!0,this.hideWithTimer(),this.fire("showComplete")},hide:function(){if(!this._focus&&!this._disabled){var e=this.get("host").get("boundingBox");e.transition(this._hideProps,t.bind(this._hideComplete,this)),this.fire("hideStart")}},hideWithTimer:function(){this._hideTimerCancel(),this._hideTimer=t.later(this.get("hideDelay"),this,this.hide)},_hideTimerCancel:function(){this._hideTimer&&(this._hideTimer.cancel(),this._hideTimer=null)},_hideComplete:function(){var t=this.get("host").get("boundingBox"),e=this.get("hideStyle");"display"==e?t.setStyle("display","none"):"left"==e&&t.setStyle("left","-99999px"),this._visible=!1,this.fire("hideComplete")}},{NS:"slideshowOverlay",ATTRS:{closeButton:{value:!1,writeOnce:!0},hideDelay:{value:3e3,writeOnce:!0},hideStyle:{value:"display",writeOnce:!0},visible:{value:!0,writeOnce:!0}}}),t.namespace("FL").SlideshowSocial=t.Base.create("fl-slideshow-social",t.Widget,[t.WidgetChild],{_buttons:null,renderUI:function(){this._buttons={},this.get("root").get("googlePlusButtonEnabled")&&this._renderGooglePlusButton()},bindUI:function(){var e=this.get("root");e.get("likeButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateLikeButton,this)),e.get("tweetButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateTweetButton,this)),e.get("googlePlusButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updateGooglePlusButton,this)),e.get("pinterestButtonEnabled")&&e.on("imageLoadComplete",t.bind(this._updatePinterestButton,this))},_updateLikeButton:function(){var e=null,i=this.get("contentBox"),s=this.get("root"),n=s.albumIndex,a=s.get("source")[n],o=s.imageInfo;this._buttons.like&&(this._buttons.like.remove(),this._buttons.like=null),"smugmug"==a.type?(e="https://www.facebook.com/plugins/like.php?",e+="href=https://www.smugmug.com/services/graph/gallery/",e+=a.id+"_"+a.key+"/"+o.id+"_"+o.key):(e="https://www.facebook.com/plugins/like.php?",e+="href="+encodeURIComponent(o.largeURL)),e+="&send=false",e+="&layout=button_count",e+="&width=90",e+="&show_faces=false",e+="&action=like",e+="&colorscheme=light",e+="&height=21",this._buttons.like=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.like.setStyles({overflow:"hidden",width:"90px",height:"21px"}),i.appendChild(this._buttons.like)},_updateTweetButton:function(){var e=null,i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.tweet&&(this._buttons.tweet.remove(),this._buttons.tweet=null),e="https://platform.twitter.com/widgets/tweet_button.html?",e+="url="+encodeURIComponent(i.largeURL),e+="&count=none",this._buttons.tweet=t.Node.create('<iframe src="'+e+'" scrolling="no" frameborder="0" allowTransparency="true"></iframe>'),this._buttons.tweet.setStyles({overflow:"hidden",width:"90px",height:"21px"}),s.appendChild(this._buttons.tweet)},_renderGooglePlusButton:function(){var t,e;t=document.createElement("script"),t.type="text/javascript",t.src="https://apis.google.com/js/plusone.js",e=document.getElementsByTagName("head")[0],e.parentNode.appendChild(t)},_updateGooglePlusButton:function(){"undefined"==typeof gapi?setTimeout(t.bind(this._updateGooglePlusButtonCallback,this),500):this._updateGooglePlusButtonCallback()},_updateGooglePlusButtonCallback:function(){var e=this.get("root").imageInfo,i=this.get("contentBox");this._buttons.plus&&(this._buttons.plus.remove(),this._buttons.plus=null),"undefined"!=typeof gapi&&(this._buttons.plus=t.Node.create("<div></div>"),i.appendChild(this._buttons.plus),gapi.plusone.render(this._buttons.plus._node,{href:encodeURIComponent(e.largeURL),annotation:"bubble",size:"medium"}))},_updatePinterestButton:function(){var e="https://pinterest.com/pin/create/button/",i=this.get("root").imageInfo,s=this.get("contentBox");this._buttons.pin&&(this._buttons.pin.remove(),this._buttons.pin=null),e+="?url="+encodeURIComponent(window.location.href),e+="&media="+encodeURIComponent(i.mediumURL),e+="&description="+encodeURIComponent(i.caption),this._buttons.pin=t.Node.create("<a></a>"),this._buttons.pin.setAttribute("data-pin-config","none"),this._buttons.pin.setAttribute("data-pin-do","buttonPin"),this._buttons.pin.setAttribute("href",e),this._buttons.pin.setAttribute("target","_blank"),this._buttons.pin.set("innerHTML",'<img src="https://assets.pinterest.com/images/pidgets/pin_it_button.png" border="0" />'),s.appendChild(this._buttons.pin)}},{CSS_PREFIX:"fl-slideshow-social",ATTRS:{}}),t.namespace("FL").SlideshowThumbs=t.Base.create("fl-slideshow-thumbs",t.Widget,[t.WidgetParent,t.WidgetChild],{_clipBox:null,_pagesBox:null,_activePageBox:null,_activePageIndex:0,_nextPageBox:null,_activeImages:null,_nextImages:null,_prevImages:null,_leftNav:null,_rightNav:null,_topNav:null,_bottomNav:null,_bbHeight:0,_bbWidth:0,_cbWidth:0,_clipBoxMarginLeft:0,_clipBoxTop:0,_colsPerPage:0,_rowsPerPage:0,_imagesPerPage:0,_numPages:0,_pageHeight:0,_pageWidth:0,_horizontalSpacing:0,_verticalSpacing:0,_leftNavWidth:0,_rightNavWidth:0,_transition:null,_transitioning:!1,_transitionDirection:"next",_gestures:null,initializer:function(){this._activeImages=[],this._nextImages=[],this._prevImages=[]},renderUI:function(){this._renderBoxes(),this._renderNavs()},bindUI:function(){var e=this.get("root"),i=this.get("id"),s=this.get("transition");e.on(i+"|albumLoadComplete",this._albumLoadComplete,this),"ontouchstart"in window&&this.get("touchSupport")&&(this._gestures=new t.FL.SlideshowGestures({direction:"slideVertical"==s?"vertical":"horizontal",activeItem:this._activePageBox,nextItem:this._nextPageBox}),this._gestures.on("moveStart",this._gesturesMoveStart,this),this._gestures.on("endComplete",this._gesturesEndComplete,this))},syncUI:function(){this._syncBoxes(),this._syncNavs()},destructor:function(){var e=this.get("root"),i=this.get("id");e.detach(i+"|*"),t.FL.SlideshowImageLoader.removeGroup("thumbs")},unload:function(){var e=this.get("root"),i=this.get("id"),s=0;for(e.detach(i+"|imageLoadComplete"),t.FL.SlideshowImageLoader.removeGroup("thumbs");s<this._activeImages.length;s++)this._activeImages[s].unload()},resize:function(){this._setSizeInfo(),this._togglePageButtons(),this._resizeBoxes(),this._resizeNavs(),this.get("root").albumInfo&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._renderActivePage(),this._preloadNextPage(),this._preloadPrevPage()),this._gestures&&this._numPages<2?this._gestures.disable():this._gestures&&this._gestures.enable()},prevPage:function(){this._transitioning||this._transitionStart("prev")},nextPage:function(){this._transitioning||this._transitionStart("next")},_albumLoadComplete:function(){var t=this.get("root"),e=this.get("id");t.once(e+"|imageLoadComplete",this.resize,this),t.on(e+"|imageLoadComplete",this._imageLoadComplete,this)},_imageLoadComplete:function(){var e=this.get("root").albumInfo,i=t.one(".fl-slideshow-image-active"),s=i?i._imageInfo:null,n=null,a=this.get("root").imageInfo;this._setActiveImage(this._activeImages),n=t.one(".fl-slideshow-image-active"),i&&!n&&(0===a.index&&s.index===e.images.length-1?this.nextPage():0===s.index&&a.index===e.images.length-1?this.prevPage():s.index<a.index?this.nextPage():s.index>a.index&&this.prevPage())},_renderBoxes:function(){this._clipBox=t.Node.create("<div></div>"),this._clipBox.addClass("fl-slideshow-thumbs-clip"),this.get("contentBox").insert(this._clipBox),this._pagesBox=t.Node.create("<div></div>"),this._pagesBox.addClass("fl-slideshow-thumbs-pages"),this._clipBox.insert(this._pagesBox),this._activePageBox=t.Node.create("<div></div>"),this._activePageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._activePageBox),this._nextPageBox=t.Node.create("<div></div>"),this._nextPageBox.addClass("fl-slideshow-thumbs-page"),this._pagesBox.insert(this._nextPageBox)},_syncBoxes:function(){this._activePageBox.setStyle("left","0"),this._nextPageBox.setStyle("left","-9999px")},_resizeBoxes:function(){this.set("width",this._bbWidth),this.set("height",this._bbHeight),this.get("contentBox").setStyle("width",this._cbWidth+"px"),this._clipBox.setStyle("width",this._pageWidth+"px"),this._clipBox.setStyle("height",this._pageHeight+"px"),this._clipBox.setStyle("padding",this._verticalSpacing+"px 0 0 "+this._horizontalSpacing+"px "),this._clipBox.setStyle("margin","0 0 0 "+this._clipBoxMarginLeft+"px"),this._clipBox.setStyle("top",this._clipBoxTop),this._pagesBox.setStyle("width",this._pageWidth+"px"),this._pagesBox.setStyle("height",this._pageHeight+"px"),this._activePageBox.setStyle("width",this._pageWidth+"px"),this._activePageBox.setStyle("height",this._pageHeight+"px"),this._nextPageBox.setStyle("width",this._pageWidth+"px"),this._nextPageBox.setStyle("height",this._pageHeight+"px")},_renderActivePage:function(){var t=0,e=this.get("root"),i=this._imagesPerPage*this._activePageIndex,s=i+this._imagesPerPage,n=e.albumInfo.images;for(this._clearActiveImage();t<this._activeImages.length;t++)this._activeImages[t].remove(),this._activeImages[t].unload(),this._activeImages[t].get("boundingBox")._imageInfo=null,this._activeImages[t].get("boundingBox").remove();for(t=0;i<s&&n[i];i++)this._renderImage(this._activeImages,t,this._activePageBox,n[i]),t++;this._setActiveImage(this._activeImages)},_renderNextPage:function(){var t=0,e="next"==this._transitionDirection?this._nextImages:this._prevImages;for(this._nextPageBox.get("children").remove();t<e.length&&e[t]._imageInfo;t++)this._renderImage(e,t,this._nextPageBox,e[t]._imageInfo);this._setActiveImage(e)},_preloadNextPage:function(){var t=this._activePageIndex+1>=this._numPages?0:this._activePageIndex+1;this._preloadPage(t,this._nextImages)},_preloadPrevPage:function(){var t=this._activePageIndex-1<0?this._numPages-1:this._activePageIndex-1;this._preloadPage(t,this._prevImages)},_preloadPage:function(t,e){var i=0,s=this.get("root"),n=s.albumInfo.images,a=t*this._imagesPerPage,o=a+this._imagesPerPage,l=this.get("imageConfig"),h=l.width,r=l.height;if(this._numPages>1){for(;i<e.length;i++)e[i].remove(),e[i].unload();for(i=0;a<o;a++)n[a]&&(this._renderImage(e,i),e[i].preload(n[a],h,r),i++)}},_renderImage:function(e,i,s,n){var a=null,o=this.get("imageConfig");"undefined"==typeof e[i]&&(o.loadGroup="thumbs",o.useThumbSizes=!0,o.loadVideos=!1,e[i]=new t.FL.SlideshowImage(o),a=e[i].get("boundingBox"),a.on("click",this._imageClick,this),a.on("mouseover",this._imageMouseover,this),a.on("mouseout",this._imageMouseout,this)),a=e[i].get("boundingBox"),a.setStyle("margin","0 "+this._horizontalSpacing+"px "+this._verticalSpacing+"px 0"),s&&(this._childrenContainer=s,this.add(e[i]),e[i].resize(o.width,o.height)),n&&(e[i].load(n),a._imageInfo=n)},_uiAddChild:function(t,e){t.render(e),e.appendChild(t.get("boundingBox"))},_imageClick:function(t){var e=this.get("root");this.get("pauseOnClick")&&e.pause(),e.loadImage(t.currentTarget._imageInfo.index),this.fire("imageClick")},_setActiveImage:function(t){var e=0;for(this._clearActiveImage();e<t.length;e++)if(t[e]._imageInfo&&t[e]._imageInfo.index==this.get("root").imageInfo.index){t[e].get("boundingBox").addClass("fl-slideshow-image-active");break}},_clearActiveImage:function(){var e=t.one(".fl-slideshow-image-active");e&&e.removeClass("fl-slideshow-image-active")},_getTransition:function(){var t=this.get("transition");return"slideHorizontal"==t&&"next"==this._transitionDirection?"slideLeft":"slideHorizontal"==t&&"prev"==this._transitionDirection?"slideRight":"slideVertical"==t&&"next"==this._transitionDirection?"slideUp":"slideVertical"==t&&"prev"==this._transitionDirection?"slideDown":t},_transitionStart:function(e){this._numPages>1&&(t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e,this._transitioning=!0,this._nextPageBox.setStyle("left","0px"),this._renderNextPage(),this._transition=new t.FL.SlideshowTransition({itemIn:this._nextPageBox,itemOut:this._activePageBox,type:this._getTransition(),duration:this.get("transitionDuration"),easing:this.get("transitionEasing")}),this._transition.once("complete",this._transitionComplete,this),this._transition.run(),this._gestures&&this._gestures.disable())},_transitionComplete:function(){this._swapPageRefs(),this._transitioning=!1,this._transitionDirection="",this._transition=null,this._gestures&&this._gestures.enable(),this.fire("transitionComplete")},_gesturesMoveStart:function(e){t.FL.SlideshowImageLoader.removeGroup("thumbs"),this._transitionDirection=e.direction,this._renderNextPage()},_gesturesEndComplete:function(){this._swapPageRefs(),this._transitionDirection="",this.fire("transitionComplete")},_swapPageRefs:function(){var t=this._activePageBox,e=this._activeImages;this._activePageBox=this._nextPageBox,this._nextPageBox=t,this._nextPageBox.setStyle("left","-9999px"),"next"==this._transitionDirection?(this._activeImages=this._nextImages,this._nextImages=e):(this._activeImages=this._prevImages,this._prevImages=e),"next"==this._transitionDirection&&this._activePageIndex+1<this._numPages?this._activePageIndex++:"next"==this._transitionDirection?this._activePageIndex=0:"prev"==this._transitionDirection&&this._activePageIndex-1>-1?this._activePageIndex--:"prev"==this._transitionDirection&&(this._activePageIndex=this._numPages-1),this._gestures&&(this._gestures.set("activeItem",this._activePageBox),this._gestures.set("nextItem",this._nextPageBox)),this._preloadNextPage(),this._preloadPrevPage()},_renderNavs:function(){var e=this.get("topNavButtons"),i=this.get("rightNavButtons"),s=this.get("bottomNavButtons"),n=this.get("leftNavButtons");this.get("topNavEnabled")&&e.length>0&&(this._topNav=new t.FL.SlideshowNav({buttons:e}),this._topNav.get("boundingBox").addClass("fl-slideshow-thumbs-top-nav"),this.add(this._topNav),this._topNav.render(this.get("contentBox")),this._clipBox.insert(this._topNav.get("boundingBox"),"before"),this._bindNavEvents(this._topNav)),this.get("rightNavEnabled")&&i.length>0&&(this._rightNav=new t.FL.SlideshowNav({buttons:i}),this._rightNav.get("boundingBox").addClass("fl-slideshow-thumbs-right-nav"),this.add(this._rightNav),this._rightNav.render(this.get("contentBox")),this._bindNavEvents(this._rightNav)),this.get("bottomNavEnabled")&&s.length>0&&(this._bottomNav=new t.FL.SlideshowNav({buttons:s}),this._bottomNav.get("boundingBox").addClass("fl-slideshow-thumbs-bottom-nav"),this.add(this._bottomNav),this._bottomNav.render(this.get("contentBox")),this._bindNavEvents(this._bottomNav)),this.get("leftNavEnabled")&&n.length>0&&(this._leftNav=new t.FL.SlideshowNav({buttons:n}),this._leftNav.get("boundingBox").addClass("fl-slideshow-thumbs-left-nav"),this.add(this._leftNav),this._leftNav.render(this.get("contentBox")),this._bindNavEvents(this._leftNav))},_syncNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),t.setStyle("position","absolute"),t.setStyle("top","0px"),t.setStyle("right","0px")),this._bottomNav&&(e=this._bottomNav.get("boundingBox"),e.setStyle("position","absolute"),e.setStyle("bottom","0px"),e.setStyle("width","100%")),this._leftNav&&(i=this._leftNav.get("boundingBox"),i.setStyle("position","absolute"),i.setStyle("top","0px"),i.setStyle("left","0px"))},_resizeNavs:function(){var t,e,i;this._rightNav&&(t=this._rightNav.get("boundingBox"),i=this._bbHeight/2-parseInt(t.getComputedStyle("height"),10)/2,t.setStyle("marginTop",i+"px")),this._leftNav&&(e=this._leftNav.get("boundingBox"),i=this._bbHeight/2-parseInt(e.getComputedStyle("height"),10)/2,e.setStyle("marginTop",i+"px"))},_bindNavEvents:function(t){t._buttons.prevPage&&t._buttons.prevPage.on("click",this.prevPage,this),t._buttons.nextPage&&t._buttons.nextPage.on("click",this.nextPage,this),t.on("resize",this.resize,this)},_togglePageButtons:function(){var t=this.get("boundingBox").all(".fl-slideshow-nav-prevPage, .fl-slideshow-nav-nextPage"),e=t.getStyle("display")[0];1==this._numPages&&"inline-block"==e?(t.setStyle("display","none"),this._setSizeInfo()):this._numPages>1&&"none"==e&&(t.setStyle("display","inline-block"),this._setSizeInfo())},_setSizeInfo:function(){var t=this.get("root"),e=this.get("boundingBox"),i=e.getStyle("position"),s=parseInt(e.getStyle("marginLeft"),10),n=parseInt(e.getStyle("marginRight"),10),a=parseInt(e.getStyle("marginTop"),10),o=parseInt(e.getStyle("marginBottom"),10),l=parseInt(e.getStyle("paddingLeft"),10),h=parseInt(e.getStyle("paddingRight"),10),r=parseInt(e.getStyle("paddingTop"),10),g=parseInt(e.getStyle("paddingBottom"),10),u=e.get("parentNode"),d=parseInt(u.getComputedStyle("width"),10),m=parseInt(u.getComputedStyle("height"),10),c=d-l-h-s-n,_=m-r-g-a-o,p=c,v=c,f=_,b=this.get("columns"),y=this.get("rows"),x=this.get("imageConfig"),I=this.get("horizontalSpacing"),S=this.get("verticalSpacing"),w=this.get("spaceEvenly"),B=this.get("centerSinglePage"),T=0,C=0,L=0,N=0,P=b,O=y,R=0,E=1,k=0,F=0,U=0,z=0;e.setStyle("position","relative"),isNaN(b)||(c=v=b*(x.width+I)+I),isNaN(y)||(_=f=y*(x.height+S)+S),this._leftNav&&(T=parseInt(this._leftNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=T:c+=T),this._rightNav&&(C=parseInt(this._rightNav.get("boundingBox").getComputedStyle("width"),10),isNaN(b)?v-=C:c+=C),this._topNav&&(L=parseInt(this._topNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=L:_+=L),this._bottomNav&&(N=parseInt(this._bottomNav.get("boundingBox").getComputedStyle("height"),10),isNaN(y)?f-=N:_+=N),isNaN(b)&&(P=Math.floor(v/(x.width+I)),P=P<1?1:P),isNaN(y)&&(O=Math.floor(f/(x.height+S)),O=O<1?1:O),R=P*O,t.albumInfo&&(E=Math.ceil(t.albumInfo.images.length/R)),isNaN(b)&&w&&(I=Math.floor((v-x.width*P)/(P+1))),isNaN(y)&&w&&(S=Math.floor((f-x.height*O)/(O+1))),t.albumInfo&&B&&1==E&&1==O?(p=t.albumInfo.images.length*x.width,p+=I*(t.albumInfo.images.length+1),this._leftNav&&(p+=T),this._rightNav&&(p+=C)):p=c,t.albumInfo&&B&&1==E&&1==O?(v=t.albumInfo.images.length*x.width,v+=I*t.albumInfo.images.length):v=P*(x.width+I),f=O*(x.height+S),E<2?k=T:(U=c,this._rightNav&&(U-=C),this._leftNav?(U-=T,k=T+(U-v-I)/2):k=(U-v-I)/2),E>1&&!w&&(z=_,this._topNav&&(z-=L),this._bottomNav&&(z-=N),F=(z-(S+f))/2),this._bbHeight=_,this._bbWidth=c,this._cbWidth=p,this._clipBoxMarginLeft=k,this._clipBoxTop=F,this._colsPerPage=P,this._rowsPerPage=O,this._imagesPerPage=R,this._numPages=E,this._pageHeight=f,this._pageWidth=v,this._leftNavWidth=T,this._rightNavWidth=C,this._horizontalSpacing=I,this._verticalSpacing=S,this._activePageIndex=Math.floor(t.imageIndex/this._imagesPerPage),e.setStyle("position",i)}},{CSS_PREFIX:"fl-slideshow-thumbs",ATTRS:{columns:{value:"auto"},rows:{value:"auto"},horizontalSpacing:{value:15},verticalSpacing:{value:15},spaceEvenly:{value:!0},centerSinglePage:{value:!0},pauseOnClick:{value:!1},transition:{value:"slideHorizontal"},transitionDuration:{value:.8},transitionEasing:{value:"ease-out"},imageConfig:{value:{crop:!0,width:50,height:50}},topNavEnabled:{value:!1},topNavButtons:{value:["prevPage","nextPage"]},rightNavEnabled:{value:!0},rightNavButtons:{value:["nextPage"]},bottomNavEnabled:{value:!1},bottomNavButtons:{value:["prevPage","nextPage"]},leftNavEnabled:{value:!0},leftNavButtons:{value:["prevPage"]},touchSupport:{value:!1}}}),t.namespace("FL").SlideshowTransition=t.Base.create("fl-slideshow-transition",t.Base,[],{_transitionFunction:"_transitionFade",_type:"fade",initializer:function(){var e=this.get("type"),i=[],s=t.FL.SlideshowTransition.TYPES,n=t.FL.SlideshowTransition.SLIDESHOW_IMAGE_TYPES,a=t.Array.indexOf(n,e)>-1,o=this._isSlideshowImage(),l=this.get("itemIn"),h=this.get("itemOut");e.indexOf(",")>-1&&(i=e.split(","),i.sort(function(){return.5-Math.random()}),e=i[0]),!o&&a?e="fade":o&&(l&&null===l.one("img")||h&&null===h.one("img")?e="none":a&&(t.UA.gecko&&t.UA.gecko<5||t.UA.opera>0||t.UA.ie>0&&t.UA.ie<9)&&(e="fade")),t.FL.SlideshowTransition.TYPES[e]&&(this._transitionFunction=s[e],this._type=e),this._setupItems()},run:function(){this.fire("start"),this[this._transitionFunction].call(this)},_setupItems:function(){var e=this.get("itemIn"),i=this.get("itemOut");e&&(e.setStyle("zIndex",2),e.setStyle("opacity",1),t.FL.Utils.cssSupport("transform")?e.setStyle("transform","translate(0, 0)"):(e.setStyle("top","0"),e.setStyle("left","0"))),i&&i.setStyle("zIndex",1)},_isSlideshowImage:function(){var t=this.get("itemIn"),e=this.get("itemOut");return!(!t||!t.hasClass("fl-slideshow-image"))||!(!e||!e.hasClass("fl-slideshow-image"))},_transitionStart:function(e,i){var s=this.get("itemIn"),n=this.get("itemOut"),a=t.bind(this._transitionComplete,this),o=s?null:a,l=this.get("duration"),h=this.get("easing");s&&(e.duration=e.duration||l,e.easing=e.easing||h,s.transition(e)),n&&(i.duration=i.duration||l,i.easing=i.easing||h,n.transition(i)),a?t.later(1e3*e.duration+100,null,a):o&&t.later(1e3*i.duration+100,null,o)},_transitionComplete:function(){this._set("itemIn",null),this._set("itemOut",null),this.fire("complete")},_transitionNone:function(){var t=this.get("itemIn"),e=this.get("itemOut");t&&t.setStyle("opacity",1),e&&e.setStyle("opacity",0),this._transitionComplete()},_transitionFade:function(){var t=this.get("itemIn");t&&t.setStyle("opacity",0),this._transitionStart({opacity:1},{opacity:0})},_transitionSlideLeft:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(-100%, 0)"}):this._jsTransitionSlide("left")},_transitionSlideRight:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(-100%, 0)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(100%, 0)"}):this._jsTransitionSlide("right")},_transitionSlideUp:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, 100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, -100%)"}):this._jsTransitionSlide("up")},_transitionSlideDown:function(){t.FL.Utils.cssSupport("transform")?this._cssTransitionSlide({inStart:"translate(0, -100%)",inEnd:"translate(0, 0)",outStart:"translate(0, 0)",outEnd:"translate(0, 100%)"}):this._jsTransitionSlide("down")},_jsTransitionSlide:function(t){var e=this.get("itemIn"),i=this.get("itemOut"),s=0;i&&"left"==t&&(s=-parseInt(i.getStyle("width"),10)),i&&"right"==t&&(s=parseInt(i.getStyle("width"),10)),i&&"up"==t&&(s=-parseInt(i.getStyle("height"),10)),i&&"down"==t&&(s=parseInt(i.getStyle("height"),10)),e&&e.setStyle("opacity",1),e&&"left"==t&&e.setStyle("left",e.getStyle("width")),e&&"right"==t&&e.setStyle("left","-"+e.getStyle("width")),e&&"up"==t&&e.setStyle("top",e.getStyle("height")),e&&"down"==t&&e.setStyle("top","-"+e.getStyle("height")),"left"==t||"right"==t?this._transitionStart({left:0},{left:s}):this._transitionStart({top:0},{top:s})},_cssTransitionSlide:function(e){var i=this.get("itemIn"),s=this.get("itemOut"),n=t.UA.chrome<36?"transform":"-webkit-transform",a={},o={};a[n]=e.inEnd,o[n]=e.outEnd,i&&(i.setStyle("transition",""),i.setStyle("opacity",1),i.setStyle(n,e.inStart)),s&&(s.setStyle("transition",""),s.setStyle(n,e.outStart)),this._transitionStart(a,o)},_transitionBars:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("bars"),i=this._renderSlices(1,e),s=this.get("duration"),n=0,a=100,o=!1,l=0,h=null,r={duration:s,opacity:1};for("barsRandom"==this._type&&(i=this._randomizeSlices(i));l<i.length;l++)h=t.clone(r),"blinds"==this._type&&(h.width=parseFloat(i[l].getComputedStyle("width"),10)+"px",i[l].setStyle("width","0px"),a=50),o=l==i.length-1,t.later(n,this,this._transitionSlice,[i[l],h,o]),n+=a;this._transitionSlicesFadeLast(n)},_transitionBoxes:function(){this.get("itemIn").one(".fl-slideshow-image-img").setStyle("opacity",0);var e=this.get("boxCols"),i=this.get("boxRows"),s=e*i,n="boxesRandom"!=this._type,a=this._renderSlices(i,e,n),o=this.get("duration"),l=0,h=150,r=!1,g=0,u=0,d=0,m=-1,c=null,_={duration:o,opacity:1};if(n)for(;g<s;){for(u=0;u<i;u++)0===u&&(m++,d=m),d>-1&&d<e&&(g++,c=t.clone(_),"boxesGrow"==this._type&&(c.height=parseFloat(a[u][d].getComputedStyle("height"),10)+"px",c.width=parseFloat(a[u][d].getComputedStyle("width"),10)+"px",a[u][d].setStyle("height","0px"),a[u][d].setStyle("width","0px"),h=50),r=g==s-1,t.later(l,this,this._transitionSlice,[a[u][d],c,r])),d--;l+=h}else for(a=this._randomizeSlices(a),h=30;g<a.length;g++)c=t.clone(_),r=g==a.length-1,t.later(l,this,this._transitionSlice,[a[g],c,r]),l+=h;this._transitionSlicesFadeLast(l)},_renderSlices:function(e,i,s){for(var n=this.get("itemIn"),a=parseFloat(n.getComputedStyle("height"),10),o=parseFloat(n.getComputedStyle("width"),10),l=n.one("img"),h=l.get("src"),r=parseFloat(l.getComputedStyle("height"),10),g=parseFloat(l.getComputedStyle("width"),10),u=parseFloat(l.getComputedStyle("left"),10),d=parseFloat(l.getComputedStyle("top"),10),m=0,c=0,_=Math.round(a/e),p=Math.round(o/i),v=null,f=null,b=[];c<e;c++)for("undefined"!=typeof s&&s&&(b[c]=[]),m=0;m<i;m++)v=t.Node.create('<div class="fl-slideshow-transition-slice"></div>'),f=t.Node.create('<img src="'+h+'" />'),v.setStyles({left:p*m+"px",top:_*c+"px",width:m==i-1?o-p*m+"px":p+"px",height:c==e-1?a-_*c+"px":_+"px",opacity:0}),f.setStyles({height:r+"px",width:g+"px",top:d-(_+c*_-_)+"px",left:u-(p+m*p-p)+"px"}),v.append(f),n.append(v),"undefined"!=typeof s&&s?b[c].push(v):b.push(v);return b},_transitionSlicesFadeLast:function(t){var e=this.get("itemOut");e&&!e.hasClass("fl-slideshow-image-cropped")&&e.transition({duration:t/1e3+this.get("duration"),opacity:0})},_transitionSlice:function(e,i,s){var n=s?t.bind(this._transitionSlicesComplete,this):null;e.transition(i,n)},_transitionSlicesComplete:function(){var t=this.get("itemIn");t.all(".fl-slideshow-transition-slice").remove(),t.one(".fl-slideshow-image-img").setStyle("opacity",1),this._transitionComplete()},_randomizeSlices:function(t){var e,i,s=t.length;if(0!==s){for(;--s;)e=Math.floor(Math.random()*(s+1)),i=t[s],t[s]=t[e],t[e]=i;return t}},_transitionKenBurns:function(){var e=this.get("kenBurnsDuration"),i=this.get("duration"),s=this.get("itemIn"),n=this.get("kenBurnsZoom");this._transitionFade(),new t.FL.SlideshowKenBurns({duration:e+i+4,image:s,zoom:n}).run()}},{ATTRS:{itemIn:{value:null},itemOut:{value:null},duration:{value:.5},easing:{value:"ease-out"},type:{value:"fade"},bars:{value:15},boxCols:{value:8},boxRows:{value:4},kenBurnsDuration:{value:4},kenBurnsZoom:{value:1.2}},TYPES:{fade:"_transitionFade",none:"_transitionNone",slideLeft:"_transitionSlideLeft",slideRight:"_transitionSlideRight",slideUp:"_transitionSlideUp",slideDown:"_transitionSlideDown",blinds:"_transitionBars",bars:"_transitionBars",barsRandom:"_transitionBars",boxes:"_transitionBoxes",boxesRandom:"_transitionBoxes",boxesGrow:"_transitionBoxes",kenBurns:"_transitionKenBurns"},SLIDESHOW_IMAGE_TYPES:["blinds","bars","barsRandom","boxes","boxesRandom","boxesGrow","kenBurns"]}),t.namespace("FL").Slideshow=t.Base.create("fl-slideshow",t.FL.SlideshowBase,[],{frame:null,nav:null,imageNavLeft:null,imageNavRight:null,thumbs:null,verticalThumbs:null,caption:null,
3
+ social:null,_nextImagePreloader:null,_initialNavSettings:null,initializer:function(){var e={loadGroup:"main-preload",crop:this.get("crop"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize")};this._nextImagePreloader=new t.FL.SlideshowImage(e),this._isMobile()&&(this._removeNavButton("prevPage"),this._removeNavButton("nextPage"),this._removeNavButton("fullscreen")),this._hasNavButton("fullscreen")&&(t.FL.SlideshowFullscreen.OS_SUPPORT?this.plug(t.FL.SlideshowFullscreen):this._removeNavButton("fullscreen"))},renderUI:function(){t.FL.Slideshow.superclass.renderUI.apply(this,arguments),this._renderFrame(),this._renderVerticalThumbs(),this._renderNavAndThumbs(),this._renderImageNav(),this._renderMouseNav(),this._renderCaption(),this._renderSocial()},bindUI:function(){var e=this.get("boundingBox"),i=this.frame.get("boundingBox"),s=this.get("navOverlay"),n=this.get("navType"),a=this._getNav(),o=this.get("clickAction");t.FL.Slideshow.superclass.bindUI.apply(this,arguments),t.Do.after(this._resizeChildWidgets,this,"resize"),this.on("albumLoadStart",this._albumLoadStart,this),this.on("albumLoadComplete",this._albumLoadComplete,this),this.on("imageLoadComplete",this._loadFrame,this),this.get("loadingImageAlwaysEnabled")&&(this.frame.on("transitionInit",t.bind(this._showLoadingImageWithDelay,this)),this.frame.on("transitionStart",t.bind(this._hideLoadingImage,this))),this.get("overlayHideOnMousemove")&&(a&&s&&(this.frame.once("transitionComplete",a.slideshowOverlay.hideWithTimer,a.slideshowOverlay),e.on("mousemove",t.bind(this._toggleNav,this))),"buttons"!=n&&"thumbs"!=n&&"custom"!=n||(e.on("mouseenter",t.bind(this._checkOverlaysOnMouseenter,this)),e.on("mouseleave",t.bind(this._hideAllOverlays,this)))),e.delegate("click",t.bind(this._overlayCloseClick,this),".fl-slideshow-overlay-close"),"gallery"!=o&&"url"!=o||i.delegate("click",t.bind(this._frameClick,this),".fl-slideshow-image-img")},syncUI:function(){var e=this.get("boundingBox");t.FL.Slideshow.superclass.syncUI.apply(this,arguments),e._node.onselectstart=function(){return!1},e._node.unselectable="on",e._node.style.MozUserSelect="none","none"!=this.get("clickAction")&&this.frame.get("boundingBox").addClass("fl-click-action-enabled")},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},unload:function(){this.pause(),this.frame.unload(),null!==this.thumbs&&this.thumbs.unload()},_albumLoadStart:function(){this._showLoadingImage()},_albumLoadComplete:function(){this.frame.once("transitionStart",t.bind(this._hideLoadingImage,this))},_resizeChildWidgets:function(){var t=this.get("boundingBox"),e=this.get("contentBox"),i=this.get("imageNavEnabled");this._renderNavAndThumbs(),this.get("verticalThumbsOverlay")?(this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight")),this._resizeVerticalThumbs()):(this._resizeVerticalThumbs(),this._resizeFrame(e.get("offsetWidth"),t.get("offsetHeight"))),i&&this._positionImageNav(),this._positionLoadingImage()},_renderVerticalThumbs:function(){var e,i=this.get("responsiveThreshold"),s=this.get("boundingBox"),n=s.get("offsetWidth");this.get("verticalThumbsEnabled")&&n>i&&(this.verticalThumbs=new t.FL.SlideshowThumbs(this._getVerticalThumbsConfig()),this.add(this.verticalThumbs),this.verticalThumbs.render(s),e=this.verticalThumbs.get("boundingBox"),e.addClass("fl-slideshow-vertical-thumbs"),e.setStyle(this.get("verticalThumbsPosition"),0),s.append(e),this.get("verticalThumbsOverlay")?(this.verticalThumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.frame.get("boundingBox").append(e),this.verticalThumbs.resize()):(this.verticalThumbs.resize(),this._adjustContentForVerticalThumbs()),this._bindVerticalThumbs())},_getVerticalThumbsConfig:function(){var t=this.getAttrs(),e={columns:t.verticalThumbsColumns,rows:"auto",centerSinglePage:!1,horizontalSpacing:t.verticalThumbsHorizontalSpacing,verticalSpacing:t.verticalThumbsVerticalSpacing,spaceEvenly:t.verticalThumbsSpaceEvenly,rightNavEnabled:!1,leftNavEnabled:!1,topNavEnabled:t.verticalThumbsTopNavEnabled,topNavButtons:t.verticalThumbsTopNavButtons,bottomNavEnabled:t.verticalThumbsBottomNavEnabled,bottomNavButtons:t.verticalThumbsBottomNavButtons,pauseOnClick:t.verticalThumbsPauseOnClick,transition:t.verticalThumbsTransition,transitionDirection:t.verticalThumbsTransitionDirection,transitionEasing:t.verticalThumbsTransitionEasing,touchSupport:!0,imageConfig:{crop:t.verticalThumbsImageCrop,width:t.verticalThumbsImageWidth,height:t.verticalThumbsImageHeight}};return e},_bindVerticalThumbs:function(){var e=this.get("boundingBox"),i=this.get("overlayHideOnMousemove"),s=this.get("verticalThumbsOverlay"),n=this.verticalThumbs;n&&i&&s&&(this.frame.once("transitionComplete",n.slideshowOverlay.hideWithTimer,n.slideshowOverlay),e.on("mousemove",t.bind(this._toggleVerticalThumbs,this)),e.on("mouseenter",t.bind(this._toggleVerticalThumbs,this)))},_resizeVerticalThumbs:function(){var t,e,i,s,n,a,o,l,h=this.get("verticalThumbsEnabled");h&&(t=this.get("verticalThumbsOverlay"),e=this.get("responsiveThreshold"),i=this.get("boundingBox"),s=i.get("offsetWidth"),n=this.get("navOverlay"),a=this.get("navType"),o=this._getNav(),this.verticalThumbs&&s>e?(this.verticalThumbs.get("boundingBox").setStyle("display","block"),this.verticalThumbs.resize(),t?o&&n&&(l=o.get("boundingBox"),"thumbs"==a?(this._adjustOverlayForVerticalThumbs(l,!0),this.thumbs.resize()):this._adjustOverlayForVerticalThumbs(l)):this._adjustContentForVerticalThumbs()):!this.verticalThumbs&&s>e?this._renderVerticalThumbs():this.verticalThumbs&&s<=e&&(this.verticalThumbs.get("boundingBox").setStyle("display","none"),t||this.get("contentBox").setStyles({left:"auto",position:"relative",right:"auto",width:"auto"})))},_toggleVerticalThumbs:function(){this.verticalThumbs&&(this.verticalThumbs.slideshowOverlay._visible?this.verticalThumbs.slideshowOverlay.hideWithTimer():this.verticalThumbs.slideshowOverlay.show())},_adjustContentForVerticalThumbs:function(){var t=this.get("boundingBox"),e=this.verticalThumbs.get("boundingBox"),i=this.get("verticalThumbsPosition"),s=this.get("contentBox"),n="left"==i?"right":"left",a=t.get("offsetWidth")-e.get("offsetWidth");s.setStyle("position","absolute"),s.setStyle(n,0),s.setStyle("width",a)},_adjustOverlayForVerticalThumbs:function(t,e){var i=this.get("verticalThumbsEnabled"),s=this.get("verticalThumbsOverlay"),n=null,a=null,o="undefined"==typeof e?"":"margin-",l=0;this.verticalThumbs&&i&&s&&(n=this.verticalThumbs.get("boundingBox"),l=n.get("offsetWidth"),a=this.get("verticalThumbsPosition"),"left"==a?t.setStyle(o+"left",l+"px"):t.setStyle(o+"right",l+"px"))},_renderFrame:function(){this.frame=new t.FL.SlideshowFrame({imageConfig:{loadGroup:"main",loadPriority:!0,crop:this.get("crop"),cropHorizontalsOnly:this.get("cropHorizontalsOnly"),position:this.get("position"),protect:this.get("protect"),upsize:this.get("upsize"),showVideoButton:this.get("navOverlay")},touchSupport:this.get("touchSupport")}),this.add(this.frame),this.frame.render(this.get("contentBox")),this.frame.get("boundingBox").addClass("fl-slideshow-main-image"),this._setPlayingTimerEvent(this.frame,"transitionComplete"),this._loadingImageContainer=this.frame.get("contentBox")},_resizeFrame:function(t,e){var i=this.get("navOverlay"),s=this._getNav();s&&!i&&(e-=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),this.frame.resize(t,e)},_loadFrame:function(e){var i=this.imageInfo.index,s=this.albumInfo.images,n=i+1>=s.length?0:i+1,a=this.frame.get("width"),o=this.frame.get("height");this.frame.load(e.imageInfo),t.FL.SlideshowImageLoader.removeGroup("main-preload"),this._nextImagePreloader.preload(s[n],a,o)},_frameClick:function(){var t=this.get("clickAction"),e=this.get("clickActionUrl");"url"==t?window.location.href=e:"gallery"==t&&(window.location.href=this.imageInfo.link)},_initMiniNav:function(){var t=[];this._hasNavButton("prev")&&t.push("prev"),(this._hasNavButton("thumbs")||"thumbs"==this.get("navType"))&&t.push("thumbs"),this._hasNavButton("caption")&&t.push("caption"),this._hasNavButton("social")&&t.push("social"),this._hasNavButton("buy")&&t.push("buy"),this._hasNavButton("play")&&t.push("play"),!this._hasNavButton("fullscreen")||"ontouchstart"in window||t.push("fullscreen"),this._hasNavButton("next")&&t.push("next"),this._initialNavSettings={buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight"),type:this.get("navType")},this._set("navButtons",t),this._set("navButtonsLeft",[]),this._set("navButtonsRight",[]),this._set("navType","buttons")},_renderNavAndThumbs:function(){var t,e,i=this.get("navType"),s=!1;"buttons"!=i&&"thumbs"!=i||(t=this.get("boundingBox").get("offsetWidth"),e=this.get("responsiveThreshold"),t<=e&&null===this._initialNavSettings?(this._initMiniNav(),s=!0):t>e&&null!==this._initialNavSettings&&(this._set("navButtons",this._initialNavSettings.buttons),this._set("navButtonsLeft",this._initialNavSettings.buttonsLeft),this._set("navButtonsRight",this._initialNavSettings.buttonsRight),this._set("navType",this._initialNavSettings.type),this._initialNavSettings=null,s=!0),(s||null===this.nav)&&this._renderNav(),s||null===this.thumbs?this._renderThumbs():this._thumbsEnabled()&&this._resizeThumbs(),s&&null!==this.caption&&this._syncCaption(),s&&null!==this.social&&this._syncSocial())},_renderNav:function(){var e=this.frame.get("boundingBox"),i=null,s=this.get("navOverlay"),n=this.get("navPosition");this._destroyNav(),"buttons"==this.get("navType")&&(this.nav=new t.FL.SlideshowNav({buttons:this.get("navButtons"),buttonsLeft:this.get("navButtonsLeft"),buttonsRight:this.get("navButtonsRight")}),this.add(this.nav),this.nav.render(this.get("contentBox")),i=this.nav.get("boundingBox"),s&&(this.nav.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),i.setStyle("position","absolute"),i.setStyle(n,"0px")),"top"==n?e.insert(i,"before"):e.insert(i,"after"),i.addClass("fl-slideshow-main-nav"))},_destroyNav:function(){if(null!==this.nav){this.nav.slideshowOverlay&&this.nav.slideshowOverlay.destroy(),this.nav.get("boundingBox").remove(),this.remove(this.nav);try{this.nav.destroy(!0)}catch(t){}this.nav=null}},_getNav:function(){var t=this.get("navType");return"buttons"==t?this.nav:"thumbs"==t?this.thumbs:null},_toggleNav:function(){var t=this._getNav();t.slideshowOverlay&&(t.slideshowOverlay._visible?t.slideshowOverlay.hideWithTimer():t.slideshowOverlay.show())},_renderImageNav:function(){var e;this.get("imageNavEnabled")&&(this._isMobile()?this._set("imageNavEnabled",!1):(e=this.get("boundingBox"),this.imageNavLeft=new t.FL.SlideshowNav({buttons:["prev"],useFontIcons:!1}),this.imageNavRight=new t.FL.SlideshowNav({buttons:["next"],useFontIcons:!1}),this.add(this.imageNavLeft),this.add(this.imageNavRight),this.imageNavLeft.render(this.frame.get("boundingBox")),this.imageNavRight.render(this.frame.get("boundingBox")),this.imageNavLeft.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.imageNavRight.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay")}),this.get("overlayHideOnMousemove")&&(this.frame.once("transitionComplete",this.imageNavLeft.slideshowOverlay.hideWithTimer,this.imageNavLeft.slideshowOverlay),this.frame.once("transitionComplete",this.imageNavRight.slideshowOverlay.hideWithTimer,this.imageNavRight.slideshowOverlay),e.on("mousemove",t.bind(this._toggleImageNav,this)),e.on("mouseenter",t.bind(this._toggleImageNav,this))),this.imageNavLeft.get("boundingBox").addClass("fl-slideshow-image-nav-left"),this.imageNavRight.get("boundingBox").addClass("fl-slideshow-image-nav-right")))},_positionImageNav:function(){var t=this.imageNavLeft.get("boundingBox"),e=this.imageNavRight.get("boundingBox"),i=t.get("offsetHeight"),s=this.frame.get("boundingBox").get("offsetHeight"),n=s/2-i/2,a={top:n+"px",display:"block"};t.setStyles(a),e.setStyles(a),this._adjustOverlayForVerticalThumbs(t),this._adjustOverlayForVerticalThumbs(e)},_toggleImageNav:function(){this.imageNavLeft.slideshowOverlay._visible?this.imageNavLeft.slideshowOverlay.hideWithTimer():this.imageNavLeft.slideshowOverlay.show(),this.imageNavRight.slideshowOverlay._visible?this.imageNavRight.slideshowOverlay.hideWithTimer():this.imageNavRight.slideshowOverlay.show()},_renderMouseNav:function(){!this.get("mouseNavEnabled")||"ontouchstart"in window||window.navigator.msPointerEnabled||this.plug(t.FL.SlideshowMouseNav,{trigger:this.frame.get("boundingBox")})},_thumbsEnabled:function(){var t=this.get("navType");return"thumbs"==t||!("buttons"!=t&&"custom"!=t||!this._hasNavButton("thumbs"))},_renderThumbs:function(){var e,i,s,n;if(this._destroyThumbs(),this._thumbsEnabled()){e=this.frame.get("boundingBox"),i=this.get("navOverlay"),s=this.get("navPosition"),n=this.get("navType"),this.thumbs=new t.FL.SlideshowThumbs(this._getThumbsConfig());try{this.add(this.thumbs)}catch(a){}"buttons"==n||"custom"==n?this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left",visible:!1}):"thumbs"==n&&i&&this.thumbs.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),hideStyle:"left"}),this.thumbs.render(this.get("contentBox")),"top"==s?e.insert(this.thumbs.get("boundingBox"),"before"):e.insert(this.thumbs.get("boundingBox"),"after"),this.get("thumbsHideOnClick")&&"thumbs"!=n&&this.thumbs.on("imageClick",t.bind(this._hideThumbsOnImageClick,this)),this._syncThumbs()}},_destroyThumbs:function(){if(null!==this.thumbs){this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.destroy(),this.thumbs.get("boundingBox").remove(),this.remove(this.thumbs);try{this.thumbs.destroy(!0)}catch(t){}this.thumbs=null}},_syncThumbs:function(){var t=this.thumbs.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this.get("navType"),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;"buttons"==s&&(a=parseInt(this.nav.get("boundingBox").getComputedStyle("height"),10),t.setStyle("position","absolute"),e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")),("custom"==s||"thumbs"==s&&e)&&(t.setStyle("position","absolute"),t.setStyle(i,"0px")),this.thumbs.resize()},_getThumbsConfig:function(){var t=this.getAttrs(),e=this.get("navType"),i={crop:t.thumbsImageCrop,width:t.thumbsImageWidth,height:t.thumbsImageHeight},s={columns:"auto",rows:1,horizontalSpacing:t.thumbsHorizontalSpacing,verticalSpacing:t.thumbsVerticalSpacing,spaceEvenly:t.thumbsSpaceEvenly,centerSinglePage:t.thumbsCenterSinglePage,pauseOnClick:t.thumbsPauseOnClick,transition:t.thumbsTransition,transitionDirection:t.thumbsTransitionDirection,transitionEasing:t.thumbsTransitionEasing,leftNavButtons:t.navButtonsLeft,rightNavButtons:t.navButtonsRight,imageConfig:i,touchSupport:!0};return"buttons"!=e&&"custom"!=e||("ontouchstart"in window?(s.leftNavEnabled=!1,s.rightNavEnabled=!1):(s.centerSinglePage=!1,s.leftNavButtons=["prevPage"],s.rightNavButtons=["nextPage"])),s},_resizeThumbs:function(){this.thumbs&&this.thumbs.resize()},_toggleThumbs:function(){this._toggleOverlay(this.thumbs.slideshowOverlay)},_hideThumbsOnImageClick:function(){this.thumbs.slideshowOverlay&&(this.thumbs.slideshowOverlay._focus=!1,this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide(),this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable())},_renderCaption:function(){this._hasNavButton("caption")&&(this.caption=new t.FL.SlideshowCaption({lessLinkText:this.get("captionLessLinkText"),moreLinkText:this.get("captionMoreLinkText"),textLength:this.get("captionTextLength"),stripTags:this.get("captionStripTags")}),this.add(this.caption),this.caption.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncCaption())},_syncCaption:function(){var t=this.caption.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleCaption:function(){this._toggleOverlay(this.caption.slideshowOverlay)},_renderSocial:function(){this._hasNavButton("social")&&(this.social=new t.FL.SlideshowSocial,this.add(this.social),this.social.plug(t.FL.SlideshowOverlay,{hideDelay:this.get("overlayHideDelay"),visible:!1,closeButton:!0}),this._syncSocial())},_syncSocial:function(){var t=this.social.get("boundingBox"),e=this.get("navOverlay"),i=this.get("navPosition"),s=this._getNav(),n="padding"+i.charAt(0).toUpperCase()+i.slice(1),a=0;t.setStyle("position","absolute"),s&&(a=parseInt(s.get("boundingBox").getComputedStyle("height"),10)),s&&e?(t.setStyle(n,a+"px"),t.setStyle(i,"0px")):t.setStyle(i,a+"px")},_toggleSocial:function(){this._toggleOverlay(this.social.slideshowOverlay)},_toggleOverlay:function(t){var e=this.get("navType"),i=this._getNav();t._visible?(i&&i.slideshowOverlay&&i.slideshowOverlay.enable(),t.enable(),t.hide()):(i&&i.slideshowOverlay&&i.slideshowOverlay.disable(),t.show(),t.disable()),this.thumbs&&"thumbs"!=e&&this.thumbs.slideshowOverlay!==t&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hide()),this.caption&&this.caption.slideshowOverlay!==t&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hide()),this.social&&this.social.slideshowOverlay!==t&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hide())},_overlayCloseClick:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay.enable(),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay.enable(),this.caption&&this.caption.slideshowOverlay.enable(),this.social&&this.social.slideshowOverlay.enable(),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.enable())},_hideAllOverlays:function(){this.nav&&this.nav.slideshowOverlay&&this.nav.slideshowOverlay._visible&&(this.nav.slideshowOverlay.enable(),this.nav.slideshowOverlay.hideWithTimer()),this.thumbs&&this.thumbs.slideshowOverlay&&this.thumbs.slideshowOverlay._visible&&(this.thumbs.slideshowOverlay.enable(),this.thumbs.slideshowOverlay.hideWithTimer()),this.caption&&this.caption.slideshowOverlay._visible&&(this.caption.slideshowOverlay.enable(),this.caption.slideshowOverlay.hideWithTimer()),this.social&&this.social.slideshowOverlay._visible&&(this.social.slideshowOverlay.enable(),this.social.slideshowOverlay.hideWithTimer()),this.imageNavLeft&&(this.imageNavLeft.slideshowOverlay.enable(),this.imageNavLeft.slideshowOverlay.hideWithTimer(),this.imageNavRight.slideshowOverlay.enable(),this.imageNavRight.slideshowOverlay.hideWithTimer())},_checkOverlaysOnMouseenter:function(){var t=this.get("navType"),e=this.get("navOverlay"),i=this._getNav(),s=!1;this.thumbs&&"thumbs"!=t&&this.thumbs.slideshowOverlay._visible?(s=!0,this.thumbs.slideshowOverlay.disable()):this.caption&&this.caption.slideshowOverlay._visible?(s=!0,this.caption.slideshowOverlay.disable()):this.social&&this.social.slideshowOverlay._visible&&(s=!0,this.social.slideshowOverlay.disable()),i&&s&&e&&i.slideshowOverlay.disable()},_hasNavButton:function(e){var i=this.get("navType");return("buttons"==i||"thumbs"==i||"custom"==i)&&(t.Array.indexOf(this.get("navButtons"),e)>-1||(t.Array.indexOf(this.get("navButtonsLeft"),e)>-1||t.Array.indexOf(this.get("navButtonsRight"),e)>-1))},_removeNavButton:function(e){var i=this.get("navButtons"),s=this.get("navButtonsLeft"),n=this.get("navButtonsRight"),a=this.get("verticalThumbsTopNavButtons"),o=this.get("verticalThumbsBottomNavButtons");t.Array.indexOf(i,e)>-1&&i.splice(t.Array.indexOf(i,e),1),t.Array.indexOf(s,e)>-1&&s.splice(t.Array.indexOf(s,e),1),t.Array.indexOf(n,e)>-1&&n.splice(t.Array.indexOf(n,e),1),t.Array.indexOf(a,e)>-1&&a.splice(t.Array.indexOf(a,e),1),t.Array.indexOf(o,e)>-1&&o.splice(t.Array.indexOf(o,e),1),this._set("navButtons",i),this._set("navButtonsLeft",s),this._set("navButtonsRight",n),this._set("verticalThumbsTopNavButtons",a),this._set("verticalThumbsBottomNavButtons",o)}},{CSS_PREFIX:"fl-slideshow",ATTRS:{clickAction:{value:"none"},clickActionUrl:{value:""},crop:{value:!1},cropHorizontalsOnly:{value:!1},loadingImageAlwaysEnabled:{value:!0},position:{value:"center center"},protect:{value:!0},upsize:{value:!0},transition:{value:"fade"},transitionDuration:{value:1},transitionEasing:{value:"ease-out"},kenBurnsZoom:{value:1.2},navType:{value:"none"},navPosition:{value:"bottom"},navOverlay:{value:!1},navButtons:{value:[]},navButtonsLeft:{value:[]},navButtonsRight:{value:[]},overlayHideOnMousemove:{value:!0},overlayHideDelay:{value:3e3},imageNavEnabled:{value:!1},mouseNavEnabled:{value:!1},thumbsHideOnClick:{value:!0},thumbsHorizontalSpacing:{value:15},thumbsVerticalSpacing:{value:15},thumbsSpaceEvenly:{value:!0},thumbsCenterSinglePage:{value:!0},thumbsPauseOnClick:{value:!1},thumbsTransition:{value:"slideHorizontal"},thumbsTransitionDuration:{value:.8},thumbsTransitionEasing:{value:"ease-out"},thumbsImageCrop:{value:!0},thumbsImageWidth:{value:50},thumbsImageHeight:{value:50},captionLessLinkText:{value:"Read Less"},captionMoreLinkText:{value:"Read More"},captionTextLength:{value:200},captionStripTags:{value:!1},verticalThumbsEnabled:{value:!1},verticalThumbsPosition:{value:"left"},verticalThumbsOverlay:{value:!1},verticalThumbsColumns:{value:1},verticalThumbsTopNavEnabled:{value:!1},verticalThumbsTopNavButtons:{value:["prevPage","nextPage"]},verticalThumbsBottomNavEnabled:{value:!0},verticalThumbsBottomNavButtons:{value:["prevPage","nextPage"]},verticalThumbsHorizontalSpacing:{value:15},verticalThumbsVerticalSpacing:{value:15},verticalThumbsSpaceEvenly:{value:!1},verticalThumbsPauseOnClick:{value:!1},verticalThumbsImageCrop:{value:!0},verticalThumbsImageWidth:{value:75},verticalThumbsImageHeight:{value:75},verticalThumbsTransition:{value:"slideVertical"},verticalThumbsTransitionDuration:{value:.8},verticalThumbsTransitionEasing:{value:"ease-out"},googlePlusButtonEnabled:{value:!0},likeButtonEnabled:{value:!0},pinterestButtonEnabled:{value:!0},tweetButtonEnabled:{value:!0},touchSupport:{value:!0}}})},"2.0.0",{requires:["anim","event-mouseenter","plugin","transition","fl-event-move","fl-slideshow-css","fl-slideshow-base","fl-utils","sm-fonticon"]}),YUI.add("fl-slideshow-album-loader",function(t){t.namespace("FL").SlideshowAlbumLoader=t.Base.create("fl-slideshow-album-loader",t.Base,[],{_source:null,load:function(e){this._source=e,this.fire("start"),this[t.FL.SlideshowAlbumLoader.TYPES[e.type]].call(this)},_loadComplete:function(t){t=this._randomize(t),this.fire("complete",t)},_randomize:function(t){var e;if(this.get("randomize"))for(t.albumInfo.images.sort(function(){return.5-Math.random()}),e=0;e<t.albumInfo.images.length;e++)t.albumInfo.images[e].index=e;return t},_loadSmugMug:function(){var e=new t.FL.SmugMugAPI;e.on("complete",this._loadSmugMugSuccess,this),e.addParam("method","smugmug.images.get"),e.addParam("AlbumID",this._source.id),e.addParam("AlbumKey",this._source.key),e.addParam("Extras","Caption,Format,FileName"),this._source.password&&e.addParam("Password",this._source.password),this._source.sp&&e.addParam("SitePassword",this._source.sp),e.request()},_loadSmugMugSuccess:function(e){var i=e.Album.Images,s={},n="undefined"!=typeof this._source.proxy?this._source.proxy:"",a="",o="",l="",h="",r=0,g=null,u=null;for(s.index=this._source.index,s.id=e.Album.id,s.key=e.Album.Key,s.link=e.Album.URL,s.title=this._source.title?this._source.title:"",s.images=[],a=s.link.replace("https://","").split("/").shift(),a="https://"+a+"/buy/"+e.Album.id+"_"+e.Album.Key+"/",r=0;r<i.length;r++)o=n+e.Album.URL+"/"+i[r].id+"_"+i[r].Key,h=i[r].Format.toLowerCase(),l="mp4"==h?".jpg":"."+h,s.images[r]={},s.images[r].index=r,s.images[r].sourceType="smugmug",s.images[r].albumId=e.Album.id,s.images[r].albumKey=e.Album.Key,s.images[r].id=i[r].id,s.images[r].key=i[r].Key,s.images[r].filename=i[r].FileName,s.images[r].format=h,s.images[r].caption=i[r].Caption||"",s.images[r].link=e.Album.URL+"#"+i[r].id+"_"+i[r].Key,s.images[r].tinyURL=o+"-Ti"+l,s.images[r].thumbURL=o+"-Th"+l,s.images[r].smallURL=o+"-S"+l,s.images[r].mediumURL=o+"-M"+l,s.images[r].largeURL=o+"-L"+l,s.images[r].xlargeURL=o+"-XL"+l,s.images[r].x2largeURL=o+"-X2"+l,s.images[r].x3largeURL=o+"-X3"+l,s.images[r].buyURL=a+i[r].id+"_"+i[r].Key,s.images[r].iframe="",s.images[r].caption.indexOf("iframe")&&(g=t.Node.create("<div>"+s.images[r].caption+"</div>"),u=g.one("iframe"),u&&(s.images[r].iframe=u.getAttribute("src"),s.images[r].caption=s.images[r].caption.replace(/<iframe.*>.*<\/iframe>/gi,"")));this._loadComplete({albumInfo:s})},_loadUrls:function(){var t={},e=0;for(t.index=this._source.index,t.title=this._source.title?this._source.title:"",t.images=[];e<this._source.urls.length;e++)t.images[e]={},t.images[e].index=e,t.images[e].sourceType="urls",t.images[e].filename=this._source.urls[e].largeURL.split("/").pop(),t.images[e].format="",t.images[e].caption=this._source.urls[e].caption||"",t.images[e].link=this._source.urls[e].largeURL,t.images[e].thumbURL=this._source.urls[e].thumbURL||this._source.urls[e].largeURL,t.images[e].smallURL=this._source.urls[e].smallURL||this._source.urls[e].largeURL,t.images[e].mediumURL=this._source.urls[e].mediumURL||this._source.urls[e].largeURL,t.images[e].largeURL=this._source.urls[e].largeURL,t.images[e].xlargeURL=this._source.urls[e].xlargeURL||this._source.urls[e].largeURL,t.images[e].x2largeURL=this._source.urls[e].x2largeURL||this._source.urls[e].largeURL,t.images[e].x3largeURL=this._source.urls[e].x3largeURL||this._source.urls[e].largeURL,t.images[e].buyURL=this._source.urls[e].buyURL||"",t.images[e].iframe=this._source.urls[e].iframe||"";this._loadComplete({albumInfo:t})}},{ATTRS:{randomize:{value:!1}},TYPES:{smugmug:"_loadSmugMug",flickr:"_loadFlickr",picasa:"_loadPicasa",urls:"_loadUrls",html:"_loadHtml"}})},"2.0.0",{requires:["base","fl-smugmug-api"]}),YUI.add("fl-slideshow-base",function(t){t.namespace("FL").SlideshowBase=t.Base.create("fl-slideshow-base",t.Widget,[t.WidgetParent],{_albumLoader:null,albums:[],albumInfo:null,albumIndex:null,imageInfo:null,imageIndex:null,lastImageIndex:null,_resizeTimer:null,_playing:!1,_playingTimer:null,_playingTimerEvent:null,_loadingImage:null,_loadingImageWrap:null,_loadingImageVisible:!1,_loadingImageTimer:null,_loadingImageContainer:null,_initialHeight:null,_initialWidth:null,initializer:function(){this._albumLoader=new t.FL.SlideshowAlbumLoader({randomize:this.get("randomize")})},renderUI:function(){this._renderLoadingImage()},bindUI:function(){this._albumLoader.on("complete",this._loadAlbumComplete,this),t.one(window).on("fl-slideshow-base|resize",this._delayResize,this),t.one(window).on("fl-slideshow-base|orientationchange",this._delayResize,this),t.Node.one("body").on("keydown",t.bind(this._onKey,this))},syncUI:function(){this.get("boundingBox").addClass("fl-slideshow-"+this.get("color")),this.resize(),this.get("loadOnRender")&&this.loadAlbum(this.get("defaultAlbum"),this.get("defaultImage"))},addAlbum:function(t){var e=this.get("source"),i=e.length;e[i]=t,e[i].index=i,this.set("source",e)},loadAlbum:function(e,i){var s=this.get("source"),n="undefined"==typeof i?0:i;this.imageIndex=null,this.lastImageIndex=null,this.fire("albumLoadStart"),this.once("albumLoadComplete",t.bind(this.loadImage,this,n)),s[e]&&"album-data"==s[e].type?(this.albums[e]=s[e].data,this._loadAlbumComplete({albumInfo:this.albums[e]})):s[e]&&this.albums[e]?this._loadAlbumComplete({albumInfo:this.albums[e]}):this._albumLoader.load(s[e]||s[0])},_loadAlbumComplete:function(t){this.albums[t.albumInfo.index]=t.albumInfo,this.albumInfo=t.albumInfo,this.albumIndex=t.albumInfo.index,this.fire("albumLoadComplete"),this.get("autoPlay")&&(this._playingTimerStart(),this.fire("played"),this._playing=!0)},loadImage:function(t){this._playing&&this._playingTimerStart(),t=t<0?this.albumInfo.images.length-1:t,t=t>=this.albumInfo.images.length?0:t,this.lastImageIndex=this.imageIndex,this.imageIndex=t,this.imageInfo=this.albumInfo.images[t],this.fire("imageLoadComplete",{imageInfo:this.imageInfo})},prevImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex-1),this.fire("prevImage")},nextImage:function(){this.get("pauseOnNextOrPrev")&&this.pause(),this.loadImage(this.imageIndex+1),this.fire("nextImage")},_onKey:function(t){switch(t.keyCode){case 37:this.prevImage();break;case 39:this.nextImage()}},resize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=parseInt(t.one("body").get("winWidth"),10),n=this.get("responsiveThreshold");s>n&&e&&"window"==i?this._stretchyWindowResize():s<=n||e&&"ratio"==i?this._stretchyRatioResize():this._standardResize(),this.fire("resize")},_standardResize:function(){var e=this.get("stretchy"),i=this.get("stretchyType"),s=this.get("boundingBox"),n=s.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=this.get("height"),h=this.get("width");if(s.hasClass("fl-fullscreen-active"))return void this._stretchyWindowResize();if(e&&"contain"==i)s.setStyle("height",a+"px"),s.setStyle("width",o+"px");else{if(!t.Lang.isNumber(l))return void this._stretchyRatioResize();s.setStyle("height",l+"px"),h?s.setStyle("width",h+"px"):s.setStyle("width",o+"px")}},_stretchyWindowResize:function(){var e=this.get("boundingBox"),i=this.get("stretchyVerticalSpace"),s=parseInt(e.getStyle("paddingTop"),10),n=parseInt(e.getStyle("paddingBottom"),10),a=parseInt(t.one("body").get("winHeight"),10),o="";e.hasClass("fl-fullscreen-active")&&(i=0,o=parseInt(t.one("body").get("winWidth"),10)+"px"),a=a-s-n-i+"px",e.setStyle("height",a),e.setStyle("width",o)},_stretchyRatioResize:function(){var e=this.get("boundingBox"),i=e.get("parentNode"),s=0,n=this.get("stretchyRatio"),a=parseInt(e.getStyle("paddingTop"),10),o=parseInt(e.getStyle("paddingBottom"),10),l=parseInt(i.getComputedStyle("width"),10),h=parseInt(t.one("body").get("winHeight"),10),r=parseInt(t.one("body").get("winWidth"),10),g=l*n,u="";e.hasClass("fl-fullscreen-active")&&(g=h,u=r),g=g-a-o-s+"px",e.setStyle("height",g),e.setStyle("width",u)},_delayResize:function(){this._resizeTimer&&this._resizeTimer.cancel(),this._resizeTimer=t.later(300,this,this.resize)},play:function(){this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete),this.fire("played"),this._playing=!0},pause:function(){this._playingTimerCancel(),this.fire("paused"),this._playing=!1},_setPlayingTimerEvent:function(t,e){this._playingTimerEvent={obj:t,e:e}},_playingTimerStart:function(e){this._playingTimerCancel(),e||null===this._playingTimerEvent?this._playingTimer=t.later(this.get("speed"),this,this._playingTimerComplete):this._playingTimerEvent.obj.once("fl-slideshow-base|"+this._playingTimerEvent.e,t.bind(this._playingTimerStart,this))},_playingTimerComplete:function(){this.loadImage(this.imageIndex+1),this.fire("playingTimerComplete")},_playingTimerCancel:function(){this._playingTimer&&this._playingTimer.cancel(),this._playingTimerEvent&&this._playingTimerEvent.obj.detach("fl-slideshow-base|"+this._playingTimerEvent.e)},_renderLoadingImage:function(){var e={lines:11,length:6,width:2,radius:7,color:"",speed:1,trail:60,shadow:!1},i=t.merge(e,this.get("loadingImageSettings"));this.get("loadingImageEnabled")&&(""===i.color&&(i.color=this._colorToHex(t.one("body").getStyle("color"))),this._loadingImage=new t.FL.Spinner(i),this._loadingImageWrap=t.Node.create('<div class="fl-loading-image"></div>'),this._loadingImageWrap.setStyles({position:"absolute","z-index":"1000"}))},_showLoadingImage:function(){this._loadingImage&&!this._loadingImageVisible&&(this._loadingImageVisible=!0,this._loadingImage.spin(),this._loadingImageWrap.insert(this._loadingImage.el),null!==this._loadingImageContainer?this._loadingImageContainer.insert(this._loadingImageWrap):this.get("contentBox").insert(this._loadingImageWrap),
4
  this._positionLoadingImage())},_showLoadingImageWithDelay:function(){this._loadingImage&&(this._loadingImageTimer=t.later(1e3,this,this._showLoadingImage))},_hideLoadingImage:function(){this._loadingImageTimer&&(this._loadingImageTimer.cancel(),this._loadingImageTimer=null),this._loadingImage&&this._loadingImageVisible&&(this._loadingImageVisible=!1,this._loadingImage.stop(),this._loadingImageWrap.remove())},_positionLoadingImage:function(){if(this._loadingImage&&this._loadingImageVisible){var e=this._loadingImageWrap,i=parseInt(e.getComputedStyle("height"),10),s=parseInt(e.getComputedStyle("width"),10),n=e.get("parentNode"),a=parseInt(n.getComputedStyle("height"),10),o=parseInt(n.getComputedStyle("width"),10),l=(o-s)/2,h=(a-i)/2;e.setStyles({left:l+"px",top:h+"px"}),t.one(this._loadingImage.el).setStyles({left:"50%",top:"50%"})}},_colorToHex:function(t){var e,i,s,n,a;return"#"===t.substr(0,1)?t:(e=/(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t),null===e?"#000":(i=parseInt(e[2],10),s=parseInt(e[3],10),n=parseInt(e[4],10),a=n|s<<8|i<<16,a=a.toString(16),"0"===a&&(a="000"),e[1]+"#"+a))}},{CSS_PREFIX:"fl-slideshow-base",ATTRS:{color:{value:"dark",writeOnce:!0},source:{value:[],setter:function(t){t.constructor==Object&&(t=[t]);for(var e=0;e<t.length;e++)t[e].index=e;return t}},defaultAlbum:{value:0},defaultImage:{value:0},loadOnRender:{value:!0},autoPlay:{value:!0},pauseOnNextOrPrev:{value:!0},randomize:{value:!1},speed:{value:4e3},responsiveThreshold:{value:600},stretchy:{value:!1},stretchyType:{value:"ratio"},stretchyVerticalSpace:{value:0},stretchyRatio:{value:.7},loadingImageEnabled:{value:!0},loadingImageSettings:{value:{}}}})},"2.0.0",{requires:["node","base","widget","widget-parent","widget-child","fl-slideshow-album-loader","fl-spinner"]}),YUI.add("fl-smugmug-api",function(t){t.namespace("FL").SmugMugAPI=t.Base.create("fl-smugmug-api",t.Base,[],{_sessionID:null,_requestURL:null,initializer:function(){this._resetRequestURL()},addParam:function(t,e){this._requestURL=this._requestURL+"&"+t+"="+e},loginAnon:function(){this.addParam("method","smugmug.login.anonymously"),this.once("complete",this._loginAnonComplete),this.request()},_loginAnonComplete:function(t){t.Login&&(this._sessionID=t.Login.Session.id)},request:function(){this.addParam("Callback","{callback}"),t.jsonp(this._requestURL,{on:{success:this._requestComplete,timeout:function(){}},context:this,timeout:6e4,args:[]})},_requestComplete:function(t){this._resetRequestURL(),this.fire("complete",t)},_resetRequestURL:function(){this._requestURL=this.get("apiURL")+"?APIKey="+this.get("apiKey"),this._sessionID&&this.addParam("SessionID",this._sessionID)}},{ATTRS:{apiURL:{value:"https://api.smugmug.com/services/api/json/1.3.0/"},apiKey:{value:"7w6kuU5Ee6KSgRRExf2KLgppdkez9JD2"}}})},"2.0.0",{requires:["base","jsonp"]}),YUI.add("fl-spinner",function(t){!function(e,i,s){function n(t,e){for(var i=~~((t[m]-1)/2),s=1;s<=i;s++)e(t[2*s-1],t[2*s])}function a(t){var e=i.createElement(t||"div");return n(arguments,function(t,i){e[t]=i}),e}function o(t,e,i){return i&&!i[L]&&o(t,i),t.insertBefore(e,i||null),t}function l(t,e){var i,s=[f,e,~~(100*t)].join("-"),n="{"+f+":"+t+"}";if(!D[s]){for(i=0;i<A[m];i++)try{H.insertRule("@"+(A[i]&&"-"+A[i].toLowerCase()+"-"||"")+"keyframes "+s+"{0%{"+f+":1}"+e+"%"+n+"to"+n+"}",H.cssRules[m])}catch(a){}D[s]=1}return s}function h(t,e){var i,n,a=t[x];if(a[e]!==s)return e;for(e=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<A[m];n++)if(i=A[n]+e,a[i]!==s)return i}function r(t){return n(arguments,function(e,i){t[x][h(t,e)||e]=i}),t}function g(t){return n(arguments,function(e,i){t[e]===s&&(t[e]=i)}),t}var u,d="width",m="length",c="radius",_="lines",p="trail",v="color",f="opacity",b="speed",y="shadow",x="style",I="height",S="left",w="top",B="px",T="childNodes",C="firstChild",L="parentNode",N="position",P="relative",O="absolute",R="animation",E="transform",k="Origin",F="Timeout",U="coord",z="#000",M=x+"Sheets",A="webkit0Moz0ms0O".split(0),D={};o(i.getElementsByTagName("head")[0],a(x));var H=i[M][i[M][m]-1],W=function(t){this.opts=g(t||{},_,12,p,100,m,7,d,5,c,10,v,z,f,.25,b,1)},V=W.prototype={spin:function(t){var i=this,s=i.el=i[_](i.opts);if(t&&o(t,r(s,S,~~(t.offsetWidth/2)+B,w,~~(t.offsetHeight/2)+B),t[C]),!u){var n=i.opts,a=0,l=20/n[b],h=(1-n[f])/(l*n[p]/100),g=l/n[_];!function d(){a++;for(var t=n[_];t;t--){var o=Math.max(1-(a+t*g)%l*h,n[f]);i[f](s,n[_]-t,o,n)}i[F]=i.el&&e["set"+F](d,50)}()}return i},stop:function(){var t=this,i=t.el;return e["clear"+F](t[F]),i&&i[L]&&i[L].removeChild(i),t.el=s,t}};V[_]=function(t){function e(e,i){return r(a(),N,O,d,t[m]+t[d]+B,I,t[d]+B,"background",e,"boxShadow",i,E+k,S,E,"rotate("+~~(360/t[_]*h)+"deg) translate("+t[c]+B+",0)","borderRadius","100em")}for(var i,s=r(a(),N,P),n=l(t[f],t[p]),h=0;h<t[_];h++)i=r(a(),N,O,w,1+~(t[d]/2)+B,E,"translate3d(0,0,0)",R,n+" "+1/t[b]+"s linear infinite "+(1/t[_]/t[b]*h-1/t[b])+"s"),t[y]&&o(i,r(e(z,"0 0 4px "+z),w,2+B)),o(s,o(i,e(t[v],"0 0 1px rgba(0,0,0,.1)")));return s},V[f]=function(t,e,i){t[T][e][x][f]=i};var q="behavior",X="url(#default#VML)",Y="group0roundrect0fill0stroke".split(0);!function(){var t,e=r(a(Y[0]),q,X);if(!h(e,E)&&e.adj){for(t=0;t<Y[m];t++)H.addRule(Y[t],q+":"+X);V[_]=function(){function t(){return r(a(Y[0],U+"size",l+" "+l,U+k,-n+" "+-n),d,l,I,l)}function e(e,i,l){o(h,o(r(t(),"rotation",360/s[_]*e+"deg",S,~~i),o(r(a(Y[1],"arcsize",1),d,n,I,s[d],S,s[c],w,-s[d]/2,"filter",l),a(Y[2],v,s[v],f,s[f]),a(Y[3],f,0))))}var i,s=this.opts,n=s[m]+s[d],l=2*n,h=t(),g=~(s[m]+s[c]+s[d])+B;if(s[y])for(i=1;i<=s[_];i++)e(i,-2,"progid:DXImage"+E+".Microsoft.Blur(pixel"+c+"=2,make"+y+"=1,"+y+f+"=.3)");for(i=1;i<=s[_];i++)e(i);return o(r(a(),"margin",g+" 0 0 "+g,N,P),h)},V[f]=function(t,e,i,s){s=s[y]&&s[_]||0,t[C][T][e+s][C][C][f]=i}}else u=h(e,R)}(),t.namespace("FL").Spinner=W}(window,document)},"2.0.0"),YUI.add("fl-utils",function(t){t.namespace("FL").Utils={cssSupport:function(e){var i=document.body||document.documentElement,s=i.style,n=["Moz","Webkit","Khtml","O","ms","Icab"],a=0;if("transform"==e&&t.UA.gecko&&t.UA.gecko<4)return!1;if("transform"==e&&t.UA.opera>0)return!1;if("transform"==e&&t.UA.ie>0&&t.UA.ie<10)return!1;if("transform"==e&&navigator.userAgent.match(/Trident/))return!1;if("undefined"==typeof s)return!1;if("string"==typeof s[e])return!0;for(e=e.charAt(0).toUpperCase()+e.substr(1);a<n.length;a++)if("string"==typeof s[n[a]+e])return!0}}},"2.0.0");
js/jquery.nanoscroller.min.js CHANGED
@@ -1,4 +1,3 @@
1
  /*! nanoScrollerJS - v0.8.7 - (c) 2015 James Florentino; Licensed MIT */
2
 
3
  !function(a){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):"object"==typeof exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},u="scrollbar",t="scroll",l="mousedown",m="mouseenter",n="mousemove",p="mousewheel",o="mouseup",s="resize",h="drag",i="enter",w="up",r="panedown",f="DOMMouseScroll",g="down",x="wheel",j="keydown",k="keyup",v="touchmove",d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject,e=null,D=b.requestAnimationFrame,y=b.cancelAnimationFrame,F=c.createElement("div").style,H=function(){var a,b,c,d,e,f;for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;f>e;a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);return!1}(),G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)},E=G("transform"),B=E!==!1,A=function(){var a,b,d;return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d},C=function(){var a,c,d;return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1},q=function(){function j(d,f){this.el=d,this.options=f,e||(e=A()),this.$el=a(this.el),this.doc=a(this.options.documentContext||c),this.win=a(this.options.windowContext||b),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;(b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;a=this.content,this.maxScrollTop=a.scrollHeight-a.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=a.scrollTop,b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==b&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:b}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},j.prototype.setOnScrollStyles=function(){var a;B?(a={},a[E]="translate(0, "+this.sliderTop+"px)"):a={top:this.sliderTop},D?(y&&this.scrollRAF&&y(this.scrollRAF),this.scrollRAF=D(function(b){return function(){return b.scrollRAF=null,b.slider.css(a)}}(this))):this.slider.css(a)},j.prototype.createEvents=function(){this.events={down:function(a){return function(b){return a.isBeingDragged=!0,a.offsetY=b.pageY-a.slider.offset().top,a.slider.is(b.target)||(a.offsetY=0),a.pane.addClass(a.options.activeClass),a.doc.bind(n,a.events[h]).bind(o,a.events[w]),a.body.bind(m,a.events[i]),!1}}(this),drag:function(a){return function(b){return a.sliderY=b.pageY-a.$el.offset().top-a.paneTop-(a.offsetY||.5*a.sliderHeight),a.scroll(),a.contentScrollTop>=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(b){return a.isBeingDragged=!1,a.pane.removeClass(a.options.activeClass),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(b){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues(),a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;if(null!=b)return c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1}}(this),enter:function(a){return function(b){var c;if(a.isBeingDragged)return 1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;this.removeEvents(),a=this.events,this.options.disableResize||this.win.bind(s,a[s]),this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x])),this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;a=this.events,this.win.unbind(s,a[s]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append('<div class="'+h+'"><div class="'+i+'" /></div>'),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c={right:-e},this.$el.addClass(f.enabledClass)),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*i),n<this.options.sliderMinHeight?n=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&n>this.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},j.prototype.scrollBottom=function(a){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTop=function(a){return this.isActive?(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTo=function(a){return this.isActive?(this.scrollTop(this.$el.find(a).get(0).offsetTop),this):void 0},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},j.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout(function(a){return function(){a.pane.removeClass(a.options.flashedClass)}}(this),this.options.flashDelay),this):void 0},j}(),a.fn.nanoScroller=function(b){return this.each(function(){var c,d;if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);if(b.scrollTo)return d.scrollTo(b.scrollTo);if("bottom"===b.scroll)return d.scrollBottom(0);if("top"===b.scroll)return d.scrollTop(0);if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);if(b.stop)return d.stop();if(b.destroy)return d.destroy();if(b.flash)return d.flash()}return d.reset()})},a.fn.nanoScroller.Constructor=q});
4
- //# sourceMappingURL=jquery.nanoscroller.min.js.map
1
  /*! nanoScrollerJS - v0.8.7 - (c) 2015 James Florentino; Licensed MIT */
2
 
3
  !function(a){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):"object"==typeof exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",enabledClass:"has-scrollbar",flashedClass:"flashed",activeClass:"active",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},u="scrollbar",t="scroll",l="mousedown",m="mouseenter",n="mousemove",p="mousewheel",o="mouseup",s="resize",h="drag",i="enter",w="up",r="panedown",f="DOMMouseScroll",g="down",x="wheel",j="keydown",k="keyup",v="touchmove",d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject,e=null,D=b.requestAnimationFrame,y=b.cancelAnimationFrame,F=c.createElement("div").style,H=function(){var a,b,c,d,e,f;for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;f>e;a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);return!1}(),G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)},E=G("transform"),B=E!==!1,A=function(){var a,b,d;return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d},C=function(){var a,c,d;return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1},q=function(){function j(d,f){this.el=d,this.options=f,e||(e=A()),this.$el=a(this.el),this.doc=a(this.options.documentContext||c),this.win=a(this.options.windowContext||b),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;(b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;a=this.content,this.maxScrollTop=a.scrollHeight-a.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=a.scrollTop,b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==b&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:b}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},j.prototype.setOnScrollStyles=function(){var a;B?(a={},a[E]="translate(0, "+this.sliderTop+"px)"):a={top:this.sliderTop},D?(y&&this.scrollRAF&&y(this.scrollRAF),this.scrollRAF=D(function(b){return function(){return b.scrollRAF=null,b.slider.css(a)}}(this))):this.slider.css(a)},j.prototype.createEvents=function(){this.events={down:function(a){return function(b){return a.isBeingDragged=!0,a.offsetY=b.pageY-a.slider.offset().top,a.slider.is(b.target)||(a.offsetY=0),a.pane.addClass(a.options.activeClass),a.doc.bind(n,a.events[h]).bind(o,a.events[w]),a.body.bind(m,a.events[i]),!1}}(this),drag:function(a){return function(b){return a.sliderY=b.pageY-a.$el.offset().top-a.paneTop-(a.offsetY||.5*a.sliderHeight),a.scroll(),a.contentScrollTop>=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(b){return a.isBeingDragged=!1,a.pane.removeClass(a.options.activeClass),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(b){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues(),a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;if(null!=b)return c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1}}(this),enter:function(a){return function(b){var c;if(a.isBeingDragged)return 1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;this.removeEvents(),a=this.events,this.options.disableResize||this.win.bind(s,a[s]),this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x])),this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;a=this.events,this.win.unbind(s,a[s]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append('<div class="'+h+'"><div class="'+i+'" /></div>'),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c={right:-e},this.$el.addClass(f.enabledClass)),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*i),n<this.options.sliderMinHeight?n=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&n>this.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},j.prototype.scrollBottom=function(a){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTop=function(a){return this.isActive?(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTo=function(a){return this.isActive?(this.scrollTop(this.$el.find(a).get(0).offsetTop),this):void 0},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass(this.options.enabledClass)&&(this.$el.removeClass(this.options.enabledClass),this.$content.css({right:""})),this},j.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass(this.options.flashedClass),setTimeout(function(a){return function(){a.pane.removeClass(a.options.flashedClass)}}(this),this.options.flashDelay),this):void 0},j}(),a.fn.nanoScroller=function(b){return this.each(function(){var c,d;if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);if(b.scrollTo)return d.scrollTo(b.scrollTo);if("bottom"===b.scroll)return d.scrollBottom(0);if("top"===b.scroll)return d.scrollTop(0);if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);if(b.stop)return d.stop();if(b.destroy)return d.destroy();if(b.flash)return d.flash()}return d.reset()})},a.fn.nanoScroller.Constructor=q});
 
json/fonts.json CHANGED
@@ -2970,6 +2970,31 @@
2970
  "NTR": [
2971
  "regular"
2972
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2973
  }, {
2974
  "Neucha": [
2975
  "regular"
2970
  "NTR": [
2971
  "regular"
2972
  ]
2973
+ }, {
2974
+ "Nanum Brush Script": [
2975
+ "regular"
2976
+ ]
2977
+ }, {
2978
+ "Nanum Gothic": [
2979
+ "regular",
2980
+ "700",
2981
+ "800"
2982
+ ]
2983
+ }, {
2984
+ "Nanum Gothic Coding": [
2985
+ "regular",
2986
+ "700"
2987
+ ]
2988
+ }, {
2989
+ "Nanum Myeongjo": [
2990
+ "regular",
2991
+ "700",
2992
+ "800"
2993
+ ]
2994
+ }, {
2995
+ "Nanum Pen Script": [
2996
+ "regular"
2997
+ ]
2998
  }, {
2999
  "Neucha": [
3000
  "regular"
languages/bg_BG.mo CHANGED
Binary file
languages/en_GB.mo CHANGED
Binary file
languages/fr_CA.mo CHANGED
Binary file
languages/fr_FR.mo CHANGED
Binary file
languages/pt_BR.mo CHANGED
Binary file
languages/pt_PT.mo CHANGED
Binary file
modules/html/html.php CHANGED
@@ -38,7 +38,7 @@ FLBuilder::register_module('FLHtmlModule', array(
38
  'type' => 'text',
39
  'selector' => '.fl-html',
40
  ),
41
- 'connections' => array( 'html', 'string' ),
42
  ),
43
  ),
44
  ),
38
  'type' => 'text',
39
  'selector' => '.fl-html',
40
  ),
41
+ 'connections' => array( 'html', 'string', 'url' ),
42
  ),
43
  ),
44
  ),
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: justinbusa, RobbyMcCullough, billyyoung, hinampaksh, diegoliv, webmandesign, eugenealegiojo, helgatheviking, ozancanakli, brentjettgmailcom, jproffitt71, brainstormforce, ideaboxcreations, laubsterboy, nikolayyordanov, codente, pross, pedromendonca
3
  Tags: page builder, beaver builder, landing page, front-end builder, drag and drop editor
4
  Requires at least: 4.5
5
- Tested up to: 4.9.3
6
  Stable tag: trunk
7
  License: GPL2+
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
2
  Contributors: justinbusa, RobbyMcCullough, billyyoung, hinampaksh, diegoliv, webmandesign, eugenealegiojo, helgatheviking, ozancanakli, brentjettgmailcom, jproffitt71, brainstormforce, ideaboxcreations, laubsterboy, nikolayyordanov, codente, pross, pedromendonca
3
  Tags: page builder, beaver builder, landing page, front-end builder, drag and drop editor
4
  Requires at least: 4.5
5
+ Tested up to: 4.9.4
6
  Stable tag: trunk
7
  License: GPL2+
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html