WordPress Page Builder – Beaver Builder - Version 1.7.3

Version Description

Download this release

Release Info

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

Code changes from version 1.7.1 to 1.7.3

changelog.txt CHANGED
@@ -1,3 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h4>1.7.1 - 01/24/2016</h4>
2
  <p><strong>Security</strong></p>
3
  <ul>
1
+ <h4>1.7.3 - 02/01/2016</h4>
2
+ <p><strong>Enhancements</strong></p>
3
+ <ul>
4
+ <li>Developers can now hook into AJAX requests using the fl_ajax_* hooks.</li>
5
+ <li>Added the fl_builder_render_js filter for filtering JavaScript cached by the builder.</li>
6
+ <li>Added the fl_builder_render_shortcodes filter for disabling shortcode parsing by the builder.</li>
7
+ <li>Added the fl_builder_get_upload_dir and fl_builder_get_cache_dir filters for filtering those paths.</li>
8
+ <li>Added the fl_builder_before_save_layout and fl_builder_after_save_layout actions for hooking into when layout data is saved .</li>
9
+ </ul>
10
+ <p><strong>Bug Fixes</strong></p>
11
+ <ul>
12
+ <li>Fixed a bug with vertically centered content in full height rows on iOS devices.</li>
13
+ <li>Fixed a bug with the read more link not showing in the Posts Slider module when the content is hidden.</li>
14
+ <li>Fixed a bug with backslashes being stripped out of the layout settings.</li>
15
+ <li>Fixed a bug with the Pricing Table module buttons caused in 1.7.</li>
16
+ <li>Fixed a bug with the link field's auto suggest.</li>
17
+ </ul>
18
+
19
+ <h4>1.7.2 - 01/26/2016</h4>
20
+ <p><strong>Bug Fixes</strong></p>
21
+ <ul>
22
+ <li>Fixed an AJAX bug caused in the last update that broke all auto suggest fields.</li>
23
+ <li>Fixed post status issues when publishing a pending post via the builder. Also fixes published posts becoming pending when the Revisionary plugin is being used.</li>
24
+ </ul>
25
+
26
  <h4>1.7.1 - 01/24/2016</h4>
27
  <p><strong>Security</strong></p>
28
  <ul>
classes/class-fl-builder-ajax-layout.php CHANGED
@@ -391,10 +391,15 @@ final class FLBuilderAJAXLayout {
391
  // Get the rendered HTML.
392
  $html = ob_get_clean();
393
 
394
- // Process shortcodes and return the HTML.
395
- ob_start();
396
- echo do_shortcode( $html );
397
- return ob_get_clean();
 
 
 
 
 
398
  }
399
 
400
  /**
391
  // Get the rendered HTML.
392
  $html = ob_get_clean();
393
 
394
+ // Render shortcodes.
395
+ if ( apply_filters( 'fl_builder_render_shortcodes', true ) ) {
396
+ ob_start();
397
+ echo do_shortcode( $html );
398
+ $html = ob_get_clean();
399
+ }
400
+
401
+ // Return the rendered HTML.
402
+ return $html;
403
  }
404
 
405
  /**
classes/class-fl-builder-ajax.php CHANGED
@@ -45,6 +45,7 @@ final class FLBuilderAJAX {
45
  static public function add_action( $action, $method, $args = array() )
46
  {
47
  self::$actions[ $action ] = array(
 
48
  'method' => $method,
49
  'args' => $args
50
  );
@@ -128,14 +129,14 @@ final class FLBuilderAJAX {
128
  if ( ! is_user_logged_in() ) {
129
  return;
130
  }
131
-
132
- // Get the $_POST data.
133
- $post_data = FLBuilderModel::get_post_data();
134
 
135
  // Verify the AJAX nonce.
136
- if ( ! isset( $post_data['_wpnonce'] ) || ! wp_verify_nonce( $post_data['_wpnonce'], 'fl_ajax_update' ) ) {
137
  return;
138
  }
 
 
 
139
 
140
  // Get the post ID.
141
  $post_id = FLBuilderModel::get_post_id();
@@ -167,19 +168,26 @@ final class FLBuilderAJAX {
167
  }
168
 
169
  // Get the action data.
170
- $action = self::$actions[ $action ];
171
- $args = array();
 
172
 
173
  // Build the args array.
174
  foreach ( $action['args'] as $arg ) {
175
- $args[] = isset( $post_data[ $arg ] ) ? $post_data[ $arg ] : null;
176
  }
177
 
178
  // Tell WordPress this is an AJAX request.
179
  define( 'DOING_AJAX', true );
 
 
 
180
 
181
- // Call the method.
182
- $result = call_user_func_array( $action['method'], $args );
 
 
 
183
 
184
  // JSON encode the result.
185
  echo json_encode( $result );
@@ -187,4 +195,30 @@ final class FLBuilderAJAX {
187
  // Complete the request.
188
  die();
189
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  }
45
  static public function add_action( $action, $method, $args = array() )
46
  {
47
  self::$actions[ $action ] = array(
48
+ 'action' => $action,
49
  'method' => $method,
50
  'args' => $args
51
  );
129
  if ( ! is_user_logged_in() ) {
130
  return;
131
  }
 
 
 
132
 
133
  // Verify the AJAX nonce.
134
+ if ( ! self::verify_nonce() ) {
135
  return;
136
  }
137
+
138
+ // Get the $_POST data.
139
+ $post_data = FLBuilderModel::get_post_data();
140
 
141
  // Get the post ID.
142
  $post_id = FLBuilderModel::get_post_id();
168
  }
169
 
170
  // Get the action data.
171
+ $action = self::$actions[ $action ];
172
+ $args = array();
173
+ $keys_args = array();
174
 
175
  // Build the args array.
176
  foreach ( $action['args'] as $arg ) {
177
+ $args[] = $keys_args[ $arg ] = isset( $post_data[ $arg ] ) ? $post_data[ $arg ] : null;
178
  }
179
 
180
  // Tell WordPress this is an AJAX request.
181
  define( 'DOING_AJAX', true );
182
+
183
+ // Allow developers to hook before the action runs.
184
+ do_action( 'fl_ajax_before_' . $action['action'], $keys_args );
185
 
186
+ // Call the action and allow developers to filter the result.
187
+ $result = apply_filters( 'fl_ajax_' . $action['action'], call_user_func_array( $action['method'], $args ), $keys_args );
188
+
189
+ // Allow developers to hook after the action runs.
190
+ do_action( 'fl_ajax_after_' . $action['action'], $keys_args );
191
 
192
  // JSON encode the result.
193
  echo json_encode( $result );
195
  // Complete the request.
196
  die();
197
  }
198
+
199
+ /**
200
+ * Checks to make sure the AJAX nonce is valid.
201
+ *
202
+ * @since 1.7.2
203
+ * @access private
204
+ * @return bool
205
+ */
206
+ static private function verify_nonce()
207
+ {
208
+ $post_data = FLBuilderModel::get_post_data();
209
+ $nonce = false;
210
+
211
+ if ( isset( $post_data['_wpnonce'] ) ) {
212
+ $nonce = $post_data['_wpnonce'];
213
+ }
214
+ else if ( isset( $_REQUEST['_wpnonce'] ) ) {
215
+ $nonce = $_REQUEST['_wpnonce'];
216
+ }
217
+
218
+ if ( ! $nonce || ! wp_verify_nonce( $nonce, 'fl_ajax_update' ) ) {
219
+ return false;
220
+ }
221
+
222
+ return true;
223
+ }
224
  }
classes/class-fl-builder-model.php CHANGED
@@ -497,7 +497,7 @@ final class FLBuilderModel {
497
  mkdir( $dir_info['path'] );
498
  }
499
 
500
- return $dir_info;
501
  }
502
 
503
  /**
@@ -529,7 +529,7 @@ final class FLBuilderModel {
529
  mkdir( $dir_info['path'] );
530
  }
531
 
532
- return $dir_info;
533
  }
534
 
535
  /**
@@ -2975,7 +2975,7 @@ final class FLBuilderModel {
2975
  $old_settings = self::get_layout_settings( $status, $post_id );
2976
  $new_settings = (object)array_merge( (array)$old_settings, (array)$settings );
2977
 
2978
- update_metadata( 'post', $post_id, $key, $new_settings );
2979
 
2980
  return $new_settings;
2981
  }
@@ -3083,6 +3083,9 @@ final class FLBuilderModel {
3083
  $post_id = self::get_post_id();
3084
  $data = self::get_layout_data('draft', $post_id);
3085
  $settings = self::get_layout_settings('draft', $post_id);
 
 
 
3086
 
3087
  // Delete the old published layout.
3088
  self::delete_layout_data('published', $post_id);
@@ -3104,10 +3107,14 @@ final class FLBuilderModel {
3104
 
3105
  // Publish the post?
3106
  if ( $publish ) {
 
 
 
 
3107
  if ( current_user_can( 'publish_posts' ) ) {
3108
- $post_status = strstr($post_status, 'draft') ? 'publish' : $post_status;
3109
  }
3110
- else {
3111
  $post_status = 'pending';
3112
  }
3113
  }
@@ -3118,6 +3125,9 @@ final class FLBuilderModel {
3118
  'post_status' => $post_status,
3119
  'post_content' => $editor_content
3120
  ));
 
 
 
3121
  }
3122
 
3123
  /**
497
  mkdir( $dir_info['path'] );
498
  }
499
 
500
+ return apply_filters( 'fl_builder_get_upload_dir', $dir_info );
501
  }
502
 
503
  /**
529
  mkdir( $dir_info['path'] );
530
  }
531
 
532
+ return apply_filters( 'fl_builder_get_cache_dir', $dir_info );
533
  }
534
 
535
  /**
2975
  $old_settings = self::get_layout_settings( $status, $post_id );
2976
  $new_settings = (object)array_merge( (array)$old_settings, (array)$settings );
2977
 
2978
+ update_metadata( 'post', $post_id, $key, self::slash_settings( $new_settings ) );
2979
 
2980
  return $new_settings;
2981
  }
3083
  $post_id = self::get_post_id();
3084
  $data = self::get_layout_data('draft', $post_id);
3085
  $settings = self::get_layout_settings('draft', $post_id);
3086
+
3087
+ // Fire the before action.
3088
+ do_action( 'fl_builder_before_save_layout', $post_id, $publish, $data, $settings );
3089
 
3090
  // Delete the old published layout.
3091
  self::delete_layout_data('published', $post_id);
3107
 
3108
  // Publish the post?
3109
  if ( $publish ) {
3110
+
3111
+ $is_draft = strstr($post_status, 'draft');
3112
+ $is_pending = strstr($post_status, 'pending');
3113
+
3114
  if ( current_user_can( 'publish_posts' ) ) {
3115
+ $post_status = $is_draft || $is_pending ? 'publish' : $post_status;
3116
  }
3117
+ else if( $is_draft ) {
3118
  $post_status = 'pending';
3119
  }
3120
  }
3125
  'post_status' => $post_status,
3126
  'post_content' => $editor_content
3127
  ));
3128
+
3129
+ // Fire the after action.
3130
+ do_action( 'fl_builder_after_save_layout', $post_id, $publish, $data, $settings );
3131
  }
3132
 
3133
  /**
classes/class-fl-builder.php CHANGED
@@ -821,9 +821,11 @@ final class FLBuilder {
821
  add_filter( 'the_content', 'FLBuilder::render_content' );
822
 
823
  // Do shortcodes here since letting the WP filter run can cause an infinite loop.
824
- $pattern = get_shortcode_regex();
825
- $content = preg_replace_callback( "/$pattern/s", 'FLBuilder::double_escape_shortcodes', $content );
826
- $content = do_shortcode( $content );
 
 
827
 
828
  // Add srcset attrs to images with the class wp-image-<ID>.
829
  if ( function_exists( 'wp_make_content_images_responsive' ) ) {
@@ -2272,6 +2274,8 @@ final class FLBuilder {
2272
  // Save the js
2273
  if(!empty($js)) {
2274
 
 
 
2275
  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
2276
  $js = FLJSMin::minify( $js );
2277
  }
@@ -2425,15 +2429,17 @@ final class FLBuilder {
2425
  }
2426
 
2427
  /**
2428
- * Custom error logging function that handles objects and arrays.
2429
  *
2430
  * @since 1.0
2431
  * @return void
2432
  */
2433
- static public function log($data)
2434
  {
2435
- ob_start();
2436
- print_r($data);
2437
- error_log(ob_get_clean());
 
 
2438
  }
2439
  }
821
  add_filter( 'the_content', 'FLBuilder::render_content' );
822
 
823
  // Do shortcodes here since letting the WP filter run can cause an infinite loop.
824
+ if ( apply_filters( 'fl_builder_render_shortcodes', true ) ) {
825
+ $pattern = get_shortcode_regex();
826
+ $content = preg_replace_callback( "/$pattern/s", 'FLBuilder::double_escape_shortcodes', $content );
827
+ $content = do_shortcode( $content );
828
+ }
829
 
830
  // Add srcset attrs to images with the class wp-image-<ID>.
831
  if ( function_exists( 'wp_make_content_images_responsive' ) ) {
2274
  // Save the js
2275
  if(!empty($js)) {
2276
 
2277
+ $js = apply_filters( 'fl_builder_render_js', $js, $nodes, $global_settings );
2278
+
2279
  if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
2280
  $js = FLJSMin::minify( $js );
2281
  }
2429
  }
2430
 
2431
  /**
2432
+ * Custom logging function that handles objects and arrays.
2433
  *
2434
  * @since 1.0
2435
  * @return void
2436
  */
2437
+ static public function log()
2438
  {
2439
+ foreach ( func_get_args() as $arg ) {
2440
+ ob_start();
2441
+ print_r( $arg );
2442
+ error_log( ob_get_clean() );
2443
+ }
2444
  }
2445
  }
css/fl-builder-layout.css CHANGED
@@ -199,7 +199,7 @@
199
  */
200
  @media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait){
201
  .fl-row-full-height .fl-row-content-wrap{
202
- height: 1024px;
203
  }
204
  }
205
 
@@ -208,7 +208,7 @@
208
  */
209
  @media all and (device-width: 1024px) and (device-height: 768px) and (orientation:landscape){
210
  .fl-row-full-height .fl-row-content-wrap{
211
- height: 768px;
212
  }
213
  }
214
 
@@ -218,7 +218,7 @@
218
  */
219
  @media screen and (device-aspect-ratio: 40/71) {
220
  .fl-row-full-height .fl-row-content-wrap {
221
- height: 500px;
222
  }
223
  }
224
 
199
  */
200
  @media all and (device-width: 768px) and (device-height: 1024px) and (orientation:portrait){
201
  .fl-row-full-height .fl-row-content-wrap{
202
+ min-height: 1024px;
203
  }
204
  }
205
 
208
  */
209
  @media all and (device-width: 1024px) and (device-height: 768px) and (orientation:landscape){
210
  .fl-row-full-height .fl-row-content-wrap{
211
+ min-height: 768px;
212
  }
213
  }
214
 
218
  */
219
  @media screen and (device-aspect-ratio: 40/71) {
220
  .fl-row-full-height .fl-row-content-wrap {
221
+ min-height: 500px;
222
  }
223
  }
224
 
fl-builder.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
- * Version: 1.7.1
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
9
  * Copyright: (c) 2014 Beaver Builder
@@ -11,7 +11,7 @@
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
- define('FL_BUILDER_VERSION', '1.7.1');
15
  define('FL_BUILDER_FILE', __FILE__);
16
  define('FL_BUILDER_DIR', plugin_dir_path(FL_BUILDER_FILE));
17
  define('FL_BUILDER_URL', plugins_url('/', FL_BUILDER_FILE));
3
  * Plugin Name: Beaver Builder Plugin (Lite Version)
4
  * Plugin URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
5
  * Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
6
+ * Version: 1.7.3
7
  * Author: The Beaver Builder Team
8
  * Author URI: https://www.wpbeaverbuilder.com/?utm_source=external&utm_medium=builder&utm_campaign=plugins-page
9
  * Copyright: (c) 2014 Beaver Builder
11
  * License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: fl-builder
13
  */
14
+ define('FL_BUILDER_VERSION', '1.7.3');
15
  define('FL_BUILDER_FILE', __FILE__);
16
  define('FL_BUILDER_DIR', plugin_dir_path(FL_BUILDER_FILE));
17
  define('FL_BUILDER_URL', plugins_url('/', FL_BUILDER_FILE));
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' => '1.7.1',
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' => '1.7.3',
7
  'slug' => 'bb-plugin',
8
  'type' => 'plugin'
9
  ));
js/fl-builder.js CHANGED
@@ -4680,7 +4680,8 @@
4680
  field.autoSuggest(FLBuilder._ajaxUrl({
4681
  'fl_action' : 'fl_builder_autosuggest',
4682
  'fl_as_action' : field.data('action'),
4683
- 'fl_as_action_data' : field.data('action-data')
 
4684
  }), {
4685
  asHtmlID : field.attr('name'),
4686
  selectedItemProp : 'name',
@@ -5532,6 +5533,7 @@
5532
  FLBuilder.ajax({
5533
  action: 'render_settings_form',
5534
  node_id: form.attr('data-node'),
 
5535
  type: type,
5536
  settings: settings.replace(/&#39;/g, "'")
5537
  },
@@ -5717,7 +5719,8 @@
5717
 
5718
  searchInput.autoSuggest(FLBuilder._ajaxUrl({
5719
  'fl_action' : 'fl_builder_autosuggest',
5720
- 'fl_as_action' : 'fl_as_links'
 
5721
  }), {
5722
  asHtmlID : searchInput.attr('name'),
5723
  selectedItemProp : 'name',
4680
  field.autoSuggest(FLBuilder._ajaxUrl({
4681
  'fl_action' : 'fl_builder_autosuggest',
4682
  'fl_as_action' : field.data('action'),
4683
+ 'fl_as_action_data' : field.data('action-data'),
4684
+ '_wpnonce' : FLBuilderConfig.ajaxNonce
4685
  }), {
4686
  asHtmlID : field.attr('name'),
4687
  selectedItemProp : 'name',
5533
  FLBuilder.ajax({
5534
  action: 'render_settings_form',
5535
  node_id: form.attr('data-node'),
5536
+ node_settings: FLBuilder._getSettings(form),
5537
  type: type,
5538
  settings: settings.replace(/&#39;/g, "'")
5539
  },
5719
 
5720
  searchInput.autoSuggest(FLBuilder._ajaxUrl({
5721
  'fl_action' : 'fl_builder_autosuggest',
5722
+ 'fl_as_action' : 'fl_as_links',
5723
+ '_wpnonce' : FLBuilderConfig.ajaxNonce
5724
  }), {
5725
  asHtmlID : searchInput.attr('name'),
5726
  selectedItemProp : 'name',
js/fl-builder.min.js CHANGED
@@ -1,5 +1,5 @@
1
  !function(e){FLBuilderAJAXLayout=function(t,l){this._data=e.extend({},this._defaults,"string"==typeof t?JSON.parse(t):t),this._callback=l,this._post=e("#fl-post-id").val(),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)))):(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()},_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>"),l="fl-row",i=this._data.scriptsStyles,o="";this._data.partial&&(l="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),t.find("> *").each(function(){e(this).hasClass(l)||(o=e(this).remove(),i+=o[0].outerHTML)}),""!==i&&(i=this._data.partial?'<div class="fl-builder-node-scripts-styles" data-node="'+this._data.nodeId+'">'+i+"<div>":'<div class="fl-builder-node-scripts-styles">'+i+"<div>"),this._data.html=t.html(),this._data.scriptsStyles=i}},_addNewHTML:function(){var e;this._data.partial?this._data.nodeParent?(e=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.find(".fl-module"),0===e.length||e.length==this._data.nodePosition?this._data.nodeParent.append(this._data.html):e.eq(this._data.nodePosition).before(this._data.html)):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.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 l=e("<div>"+t+"</div>"),i="",o=null,s="",r=null,n=window.location,a=n.protocol+"//"+n.hostname+(n.port?":"+n.port:"");return l.find("script").each(function(){i=e(this).attr("src"),"undefined"!=typeof i&&(i=i.replace(a,""),o=e('script[src*="'+i+'"]'),o.length>0&&e(this).remove())}),l.find("link").each(function(){s=e(this).attr("href"),"undefined"!=typeof s&&(s=s.replace(a,""),r=e('link[href*="'+s+'"]'),r.length>0&&e(this).remove())}),l.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._initSortables(),FLBuilder._resizeLayout(),FLBuilder._initMediaElements(),FLBuilderLayout.init(),this._body.height("auto")}}}(jQuery),function(e){FLBuilderPreview=function(t){this.type=t.type,"undefined"!=t.state&&t.state?this.state=t.state:this._saveState(),"undefined"!=t.layout&&t.layout?FLBuilder._renderLayout(t.layout,e.proxy(this._init,this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.prototype={type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_timeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=e(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),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"),l=FLBuilder._getSettings(t);return JSON.stringify(this._savedSettings)!=JSON.stringify(l)},_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)})},updateCSSRule:function(e,t,l){this._styleSheet||(this._styleSheet=new FLStyleSheet),this._styleSheet.updateRule(e,t,l)},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),l=t>>16&255,i=t>>8&255,o=255&t;return[l,i,o]},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_saveState:function(){var t=e("#fl-post-id").val(),l=e('link[href*="/cache/'+t+'"]').attr("href"),i=e('script[src*="/cache/'+t+'"]').attr("src"),o=e(FLBuilder._contentClass).html();this.state={css:l,js:i,html:o}},preview:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=t.attr("data-node"),i=FLBuilder._getSettings(t);this._cancelPreview(),this._xhr=FLBuilder.ajax({action:"render_layout",node_id:l,node_preview:i},e.proxy(this._renderPreview,this))},delayPreview:function(t){var l="undefined"==typeof t?[]:e(t.target).closest("tr").find("th"),i=e(".fl-builder-widget-settings .fl-builder-settings-title"),o=e(".fl-builder-settings .fl-lightbox-header"),s=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.gif",r=e('<img class="fl-builder-preview-loader" src="'+s+'" />');e(".fl-builder-preview-loader").remove(),l.length>0?l.append(r):i.length>0?i.append(r):o.length>0&&o.append(r),this.delay(1e3,e.proxy(this.preview,this))},_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._initElementsAndClasses(),e(".fl-builder-preview-loader").remove(),e(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){this._cancelDelay(),this._cancelPreview(),this._styleSheet&&this._styleSheet.remove(),this._settingsHaveChanged()&&FLBuilder._renderLayout(this.state)},clear:function(){this._cancelDelay(),this._cancelPreview(),this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=null)},_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 l=this.elements.textColor.val(),i=this.elements.linkColor.val(),o=this.elements.hoverColor.val(),s=this.elements.headingColor.val();i=""===i?l:i,o=""===o?l:o,s=""===s?l:s,this.delay(100,e.proxy(function(){""===l?this.updateCSSRule(this.classes.node,"color","inherit"):this.updateCSSRule(this.classes.node,"color","#"+l),""===i?this.updateCSSRule(this.classes.node+" a","color","inherit"):this.updateCSSRule(this.classes.node+" a","color","#"+i),""===o?this.updateCSSRule(this.classes.node+" a:hover","color","inherit"):this.updateCSSRule(this.classes.node+" a:hover","color","#"+o),""===s?(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","#"+s),this.updateCSSRule(this.classes.node+" h2","color","#"+s),this.updateCSSRule(this.classes.node+" h3","color","#"+s),this.updateCSSRule(this.classes.node+" h4","color","#"+s),this.updateCSSRule(this.classes.node+" h5","color","#"+s),this.updateCSSRule(this.classes.node+" h6","color","#"+s),this.updateCSSRule(this.classes.node+" h1 a","color","#"+s),this.updateCSSRule(this.classes.node+" h2 a","color","#"+s),this.updateCSSRule(this.classes.node+" h3 a","color","#"+s),this.updateCSSRule(this.classes.node+" h4 a","color","#"+s),this.updateCSSRule(this.classes.node+" h5 a","color","#"+s),this.updateCSSRule(this.classes.node+" h6 a","color","#"+s))},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]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),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]"),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.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.elements.bgVideo.val()&&this.preview()):"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 l,i,o;""===this.elements.bgColor.val()||isNaN(this.elements.bgOpacity.val())?this.updateCSSRule(this.classes.content,"background-color","transparent"):(l=this.hexToRgb(this.elements.bgColor.val()),i=this.parseFloat(this.elements.bgOpacity.val())/100,o="rgba("+l.join()+", "+i+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",o)},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()})},_bgSlideshowChange:function(t){var l=this.elements,i=l.bgSlideshowSource.val(),o=l.bgSlideshowPhotos.val(),s=l.bgSlideshowFeedUrl.val(),r=l.bgSlideshowSpeed.val(),n=l.bgSlideshowTransSpeed.val();("wordpress"!=i||""!==o)&&("smugmug"!=i||""!==s)&&(isNaN(parseInt(r))||isNaN(parseInt(n))||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 l,i,o;""===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")):(l=this.hexToRgb(this.elements.bgOverlayColor.val()),i=this.parseFloat(this.elements.bgOverlayOpacity.val())/100,o="rgba("+l.join()+", "+i+")",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",o)},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]"),borderTopWidth:e(this.classes.settings+" input[name=border_top]"),borderBottomWidth:e(this.classes.settings+" input[name=border_bottom]"),borderLeftWidth:e(this.classes.settings+" input[name=border_left]"),borderRightWidth:e(this.classes.settings+" input[name=border_right]")}),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)),this.elements.borderTopWidth.on("keyup",e.proxy(this._borderWidthChange,this)),this.elements.borderBottomWidth.on("keyup",e.proxy(this._borderWidthChange,this)),this.elements.borderLeftWidth.on("keyup",e.proxy(this._borderWidthChange,this)),this.elements.borderRightWidth.on("keyup",e.proxy(this._borderWidthChange,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.borderTopWidth.trigger("keyup")},_borderColorChange:function(t){var l,i,o;""===this.elements.borderColor.val()||isNaN(this.elements.borderOpacity.val())?this.updateCSSRule(this.classes.content,"border-color","transparent"):(l=this.hexToRgb(this.elements.borderColor.val()),i=parseInt(this.elements.borderOpacity.val())/100,o="rgba("+l.join()+", "+i+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"border-color",o)},this)))},_borderOpacityChange:function(e){this.elements.borderColor.trigger("change")},_getBorderWidths:function(e){var t=this.elements.borderTopWidth.val(),l=this.elements.borderBottomWidth.val(),i=this.elements.borderLeftWidth.val(),o=this.elements.borderRightWidth.val();return""===t&&(t=this.elements.borderTopWidth.attr("placeholder")),""===l&&(l=this.elements.borderBottomWidth.attr("placeholder")),""===i&&(i=this.elements.borderLeftWidth.attr("placeholder")),""===o&&(o=this.elements.borderRightWidth.attr("placeholder")),{top:this.parseFloat(t),bottom:this.parseFloat(l),left:this.parseFloat(i),right:this.parseFloat(o)}},_borderWidthChange:function(e){var t=this._getBorderWidths();this.elements.borderColor.trigger("change"),this.updateCSSRule(this.classes.content,{"border-top-width":t.top+"px","border-bottom-width":t.bottom+"px","border-left-width":t.left+"px","border-right-width":t.right+"px"}),this._positionAbsoluteBgs()},_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},_initMargins:function(){e.extend(this.elements,{marginTop:e(this.classes.settings+" input[name=margin_top]"),marginBottom:e(this.classes.settings+" input[name=margin_bottom]"),marginLeft:e(this.classes.settings+" input[name=margin_left]"),marginRight:e(this.classes.settings+" input[name=margin_right]")}),this.elements.marginTop.on("keyup",e.proxy(this._marginChange,this)),this.elements.marginBottom.on("keyup",e.proxy(this._marginChange,this)),this.elements.marginLeft.on("keyup",e.proxy(this._marginChange,this)),this.elements.marginRight.on("keyup",e.proxy(this._marginChange,this))},_getMargins:function(e){var t=this.elements.marginTop.val(),l=this.elements.marginBottom.val(),i=this.elements.marginLeft.val(),o=this.elements.marginRight.val();return""===t&&(t=this.elements.marginTop.attr("placeholder")),""===l&&(l=this.elements.marginBottom.attr("placeholder")),""===i&&(i=this.elements.marginLeft.attr("placeholder")),""===o&&(o=this.elements.marginRight.attr("placeholder")),{top:this.parseFloat(t),bottom:this.parseFloat(l),left:this.parseFloat(i),right:this.parseFloat(o)}},_marginChange:function(e){var t=this._getMargins();this.updateCSSRule(this.classes.content,{"margin-top":t.top+"px","margin-bottom":t.bottom+"px","margin-left":t.left+"px","margin-right":t.right+"px"}),this._positionAbsoluteBgs()},_initPadding:function(){e.extend(this.elements,{paddingTop:e(this.classes.settings+" input[name=padding_top]"),paddingBottom:e(this.classes.settings+" input[name=padding_bottom]"),paddingLeft:e(this.classes.settings+" input[name=padding_left]"),paddingRight:e(this.classes.settings+" input[name=padding_right]")}),this.elements.paddingTop.on("keyup",e.proxy(this._paddingChange,this)),this.elements.paddingBottom.on("keyup",e.proxy(this._paddingChange,this)),this.elements.paddingLeft.on("keyup",e.proxy(this._paddingChange,this)),this.elements.paddingRight.on("keyup",e.proxy(this._paddingChange,this))},_getPadding:function(e){var t=this.elements.paddingTop.val(),l=this.elements.paddingBottom.val(),i=this.elements.paddingLeft.val(),o=this.elements.paddingRight.val();return""===t&&(t=this.elements.paddingTop.attr("placeholder")),""===l&&(l=this.elements.paddingBottom.attr("placeholder")),""===i&&(i=this.elements.paddingLeft.attr("placeholder")),""===o&&(o=this.elements.paddingRight.attr("placeholder")),{top:this.parseFloat(t),bottom:this.parseFloat(l),left:this.parseFloat(i),right:this.parseFloat(o)}},_paddingChange:function(e){var t=this._getPadding();this.updateCSSRule(this.classes.content,{"padding-top":t.top+"px","padding-bottom":t.bottom+"px","padding-left":t.left+"px","padding-right":t.right+"px"}),this._positionAbsoluteBgs()},_positionAbsoluteBgs:function(){var e=this.elements.node.find(".fl-bg-slideshow"),t=this.elements.node.find(".fl-bg-video"),l=null,i=null;(e.length>0||t.length>0)&&(l=this._getMargins(),i=this._getBorderWidths(),e.length>0&&(this.updateCSSRule(this.classes.node+" .fl-bg-slideshow",{top:l.top+i.top+"px",bottom:l.bottom+i.bottom+"px",left:l.left+i.left+"px",right:l.right+i.right+"px"}),FLBuilder._resizeLayout()),t.length>0&&this.updateCSSRule(this.classes.node+" .fl-bg-video",{top:l.top+i.top+"px",bottom:l.bottom+i.bottom+"px",left:l.left+i.left+"px",right:l.right+i.right+"px"}))},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),height:e(this.classes.settings+" select[name=full_height]"),contentWidth:e(this.classes.settings+" select[name=content_width]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeBorder(),this._initNodeClassName(),this._initMargins(),this._initPadding()},_rowWidthChange:function(e){var t=this.elements.node;"full"==this.elements.width.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"))},_rowHeightChange:function(e){var t=this.elements.node;"full"==this.elements.height.val()?t.addClass("fl-row-full-height"):t.removeClass("fl-row-full-height")},_rowContentWidthChange:function(e){var t=this.elements.content.find(".fl-row-content");"full"==this.elements.contentWidth.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"))},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),columnHeight:e(this.classes.settings+" select[name=equal_height]")}),this.elements.size.on("keyup",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeBorder(),this._initNodeClassName(),this._initMargins(),this._initPadding()},_colSizeChange:function(){var t=10,l=100-t,i=parseFloat(this.elements.size.val()),o=this.elements.node.prev(".fl-col"),s=this.elements.node.next(".fl-col"),r=0===s.length?o:s,n=this.elements.node.siblings(".fl-col"),a=0;0===n.length||isNaN(i)||(n.each(function(){e(this).data("node")!=r.data("node")&&(l-=parseFloat(e(this)[0].style.width),a+=parseFloat(e(this)[0].style.width))}),t>i&&(i=t),i>l&&(i=l),r.css("width",100-a-i+"%"),this.elements.node.css("width",i+"%"))},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");"yes"==this.elements.columnHeight.val()?e.addClass("fl-col-group-equal-height"):e.removeClass("fl-col-group-equal-height")},_initModule:function(){this._initNodeClassName(),this._initMargins()},_initDefaultFieldPreviews:function(){for(var e=this.elements.settings.find(".fl-field"),t=null,l=null,i=0;i<e.length;i++)t=e.eq(i),l=t.data("preview"),"refresh"==l.type&&this._initFieldRefreshPreview(t),"text"==l.type&&this._initFieldTextPreview(t),"css"==l.type&&this._initFieldCSSPreview(t),"widget"==l.type&&this._initFieldWidgetPreview(t),"font"==l.type&&this._initFieldFontPreview(t)},_initFieldRefreshPreview:function(t){var l=t.data("type"),i=t.data("preview"),o=e.proxy(this.delayPreview,this);switch(l){case"text":t.find("input[type=text]").on("keyup",o);break;case"textarea":t.find("textarea").on("keyup",o);break;case"select":t.find("select").on("change",o);break;case"color":t.find(".fl-color-picker-value").on("change",o);break;case"photo":t.find("select").on("change",o);break;case"multiple-photos":t.find("input").on("change",o);break;case"photo-sizes":t.find("select").on("change",o);break;case"video":t.find("input").on("change",o);break;case"multiple-audios":t.find("input").on("change",o);break;case"icon":t.find("input").on("change",o);break;case"form":t.delegate("input","change",o);break;case"editor":this._addTextEditorCallback(t,i);break;case"code":t.find("textarea").on("change",o);break;case"post-type":t.find("select").on("change",o);break;case"suggest":t.find(".as-values").on("change",o)}},_initFieldTextPreview:function(t){var l=t.data("type"),i=t.data("preview"),o=e.proxy(this._previewText,this,i);switch(l){case"text":t.find("input[type=text]").on("keyup",o);break;case"textarea":t.find("textarea").on("keyup",o);break;case"code":t.find("textarea").on("change",o);break;case"editor":this._addTextEditorCallback(t,i)}},_previewText:function(t,l){var i=this.elements.node.find(t.selector),o=e("<div>"+e(l.target).val()+"</div>");i.length>0&&(o.find("script").remove(),i.html(o.html()))},_previewTextEditor:function(t,l,i){var o=this.elements.node.find(t.selector),s="undefined"!=typeof tinyMCE?tinyMCE.get(l):null,r=e("#"+l),n="";o.length>0&&(n=e(s&&"none"==r.css("display")?"<div>"+s.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+r.val()+"</div>":"<div>"+switchEditors.wpautop(r.val())+"</div>"),n.find("script").remove(),o.html(n.html()))},_addTextEditorCallback:function(t,l){var i=t.find("textarea.wp-editor-area").attr("id"),o=null;if("refresh"==l.type)o=e.proxy(this.delayPreview,this);else{if("text"!=l.type)return;o=e.proxy(this._previewTextEditor,this,l,i)}e("#"+i).on("keyup",o),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(i),editor.on("change",o),editor.on("keyup",o))},_initFieldFontPreview:function(t){var l=t.data("type"),i=t.data("preview");i.id=t.attr("id");var o=e.proxy(this._previewFont,this,i);"font"==l&&t.find(".fl-font-field").on("change","select",o)},_previewFont:function(t,l){var i=e(l.delegateTarget),o=i.find(".fl-font-field-font"),s=e(o).find(":selected"),r=s.parent().attr("label"),n=i.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector);"Google"==r&&this._buildFontStylesheet(a,o.val(),n.val()),"Default"==o.val()?(this.updateCSSRule(d,"font-family",""),this.updateCSSRule(d,"font-weight","")):(this.updateCSSRule(d,"font-family",o.val()),this.updateCSSRule(d,"font-weight",n.val()))},_buildFontStylesheet:function(t,l,i){var o="//fonts.googleapis.com/css?family=",s="",r={},n={};r[l]=[i],FLBuilderPreview._fontsList[t]=r,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var l=t[e];n[e]=n[e]||[],l=l.filter(function(t){return n[e].indexOf(t)<0}),n[e]=n[e].concat(l)})}),e.each(n,function(e,t){s+=e+":"+t.join()+"|"}),s=o+s.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",s).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",s)},_initFieldCSSPreview:function(e){var t=e.data("preview"),l=null;if("undefined"!=typeof t.rules)for(l in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[l]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,l){switch(t.data("type")){case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,l));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,l));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColor,this,l))}},_previewCSS:function(t,l){var i=this._getPreviewSelector(this.classes.node,t.selector),o=t.property,s="undefined"==typeof t.unit?"":t.unit,r=e(l.target).val();"%"==s?r=parseInt(r)/100:r+=s,this.updateCSSRule(i,o,r)},_previewColor:function(t,l){var i=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target).val(),s=""===o?"inherit":"#"+o;this.updateCSSRule(i,t.property,s)},_initFieldWidgetPreview:function(t){var l=e.proxy(this.delayPreview,this);t.find("input").on("keyup",l),t.find("input[type=checkbox]").on("click",l),t.find("textarea").on("keyup",l),t.find("select").on("change",l)},_getPreviewSelector:function(e,t){for(var l="",i=t.split(","),o=0;o<i.length;o++)l+=e+" "+i[o],o!=i.length-1&&(l+=", ");return l}}}(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)},_startSettingsLoading:function(t){var l=e(".fl-builder-settings"),i=t.closest(".fl-builder-service-settings"),o=e(".fl-builder-service-error");
2
  l.append('<div class="fl-builder-loading"></div>'),i.addClass("fl-builder-service-settings-loading"),o.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),l=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),l.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this),o=i.closest("tr"),s=i.val();o.siblings("tr.fl-builder-service-account-row").remove(),o.siblings("tr.fl-builder-service-connect-row").remove(),o.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==s&&(t._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_settings",node_id:l,service:s},t._serviceChangeComplete))},_serviceChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-select-row");s.after(i.html),t._addAccountDelete(o),t._finishSettingsLoading()},_connectClicked:function(){for(var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-connect-row"),r=i.find(".fl-builder-service-connect-input"),n=null,a=null,d=0,u={action:"connect_service",node_id:l,service:o.val(),fields:{}};d<r.length;d++)n=r.eq(d),a=n.attr("name"),u.fields[a]=n.val();s.hide(),t._startSettingsLoading(o),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-select-row"),r=o.find(".fl-builder-service-select"),n=o.find(".fl-builder-service-account-row"),a=o.find(".fl-builder-service-account-select"),d=o.find(".fl-builder-service-connect-row");i.error?(d.show(),0===a.length?r.after('<div class="fl-builder-service-error">'+i.error+"</div>"):a.after('<div class="fl-builder-service-error">'+i.error+"</div>")):(d.remove(),n.remove(),s.after(i.html)),t._addAccountDelete(o),t._finishSettingsLoading()},_accountChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select"),r=i.find(".fl-builder-service-connect-row"),n=i.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=s.val(),u=null;r.remove(),n.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:l,service:o.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:l,service:o.val(),account:d}),u&&(t._startSettingsLoading(o),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(i)},_accountChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-account-row");s.after(i.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 l=e(this).closest(".fl-builder-service-settings"),i=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:i.val(),account:o.val()},t._accountDeleteComplete),t._startSettingsLoading(o))},_accountDeleteComplete:function(){var l=e(".fl-builder-service-settings-loading"),i=l.find(".fl-builder-service-select");t._finishSettingsLoading(),i.trigger("change")},_campaignMonitorClientChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select"),r=e(this),n=i.find(".fl-builder-service-list-select"),a=r.val();0!==n.length&&n.closest("tr").remove(),""!==a&&(t._startSettingsLoading(o),FLBuilder.ajax({action:"render_service_fields",node_id:l,service:o.val(),account:s.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-campaign-monitor-client-select");s.closest("tr").after(i.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select"),r=i.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==r.val()&&(t._startSettingsLoading(o),FLBuilder.ajax({action:"render_service_fields",node_id:l,service:o.val(),account:s.val(),list_id:r.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-list-select");s.closest("tr").after(i.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()),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-bar",placement:"bottom",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShown:function(){0===e(".fl-template-selector").length?(e(".popover[class*=tour-]").css("visibility","hidden"),FLBuilder._showTemplateSelector()):FLBuilderTour._templateSelectorLoaded()}},{animation:!1,element:"#fl-builder-blocks-rows .fl-builder-blocks-section-title",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilderTour._dimSection("body"),FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._showPanel(),e(".fl-template-selector .fl-builder-settings-cancel").trigger("click"),e("#fl-builder-blocks-rows .fl-builder-blocks-section-title").trigger("click")}},{animation:!1,element:"#fl-builder-blocks-basic .fl-builder-blocks-section-title",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilderTour._dimSection("body"),FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._showPanel(),e("#fl-builder-blocks-basic .fl-builder-blocks-section-title").trigger("click"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{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-add-content-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.append('<div class="fl-builder-tour-mask"></div>'),t.on("fl-builder.template-selector-loaded",FLBuilderTour._templateSelectorLoaded),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>')},_templateSelectorLoaded:function(){var t=e(".fl-builder-settings-lightbox .fl-lightbox-header"),l=t.height(),i=t.offset().top+75;e(".popover[class*=tour-]").css({top:i+l+"px",visibility:"visible"})}}}(jQuery),function(e){FLBuilder={preview:null,_actionsLightbox:null,_addModuleAfterRowRender:null,_colResizeData:null,_colResizing:!1,_contentClass:!1,_dragEnabled:!1,_dragging:!1,_exitUrl:null,_layout:null,_layoutSettingsCSSCache:null,_layoutSettingsCSSTimeout:null,_lightbox:null,_lightboxScrollbarTimeout:null,_loadedModuleAssets:[],_moduleHelpers:{},_multiplePhotoSelector:null,_newColGroupParent:null,_newColGroupPosition:0,_newModuleParent:null,_newModulePosition:0,_newRowPosition:0,_selectedTemplateId:null,_selectedTemplateType:null,_singlePhotoSelector:null,_singleVideoSelector:null,_multipleAudiosSelector:null,_silentUpdate:!1,_silentUpdateCallbackData:null,_init:function(){FLBuilder._initJQueryReadyFix(),FLBuilder._initGlobalErrorHandling(),FLBuilder._initPostLock(),FLBuilder._initClassNames(),FLBuilder._initMediaUploader(),FLBuilder._initOverflowFix(),FLBuilder._initScrollbars(),FLBuilder._initLightboxes(),FLBuilder._initSortables(),FLBuilder._initCoreTemplateSettings(),FLBuilder._bindEvents(),FLBuilder._bindOverlayEvents(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showTourOrTemplates()},_initJQueryReadyFix:function(){FLBuilderConfig.debug||(jQuery.fn.oldReady=jQuery.fn.ready,jQuery.fn.ready=function(e){return jQuery.fn.oldReady(function(){try{"function"==typeof e&&e()}catch(t){FLBuilder.logError(t)}})})},_initGlobalErrorHandling:function(){FLBuilderConfig.debug||(window.onerror=function(e,t,l,i,o){return FLBuilder.logGlobalError(e,t,l,i,o),!0})},_initPostLock:function(){"undefined"!=typeof wp.heartbeat&&(wp.heartbeat.interval(30),wp.heartbeat.enqueue("fl_builder_post_lock",{post_id:e("#fl-post-id").val()}))},_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},_initMediaUploader:function(){wp.media.model.settings.post.id=e("#fl-post-id").val()},_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"})},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox"}),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_initSortables:function(){var t={appendTo:"body",cursor:"move",cursorAt:{left:25,top:20},distance:1,helper:FLBuilder._blockDragHelper,start:FLBuilder._blockDragStart,sort:FLBuilder._blockDragSort,placeholder:"fl-builder-drop-zone",tolerance:"intersect"},l="",i="";l="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row-content":FLBuilder._contentClass+", "+FLBuilder._contentClass+" .fl-row:not(.fl-node-global) .fl-row-content",i="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row-content, "+FLBuilder._contentClass+" .fl-col-content":FLBuilder._contentClass+", "+FLBuilder._contentClass+" .fl-row:not(.fl-node-global) .fl-row-content, "+FLBuilder._contentClass+" .fl-col:not(.fl-node-global) .fl-col-content",e(".fl-builder-rows").sortable(e.extend({},t,{connectWith:l,items:".fl-builder-block-row",stop:FLBuilder._rowDragStop})),e(".fl-builder-row-templates").sortable(e.extend({},t,{connectWith:FLBuilder._contentClass,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,items:".fl-builder-block-saved-row",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-modules, .fl-builder-widgets").sortable(e.extend({},t,{connectWith:i,items:".fl-builder-block-module",stop:FLBuilder._moduleDragStop})),e(".fl-builder-module-templates").sortable(e.extend({},t,{connectWith:i,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:i,items:".fl-builder-block-saved-module",stop:FLBuilder._nodeTemplateDragStop})),e(FLBuilder._contentClass).sortable(e.extend({},t,{handle:".fl-row-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._rowDragHelper,items:".fl-row",stop:FLBuilder._rowDragStop})),e(FLBuilder._contentClass+" .fl-row-content").sortable(e.extend({},t,{handle:".fl-row-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._rowDragHelper,items:".fl-col-group",stop:FLBuilder._rowDragStop})),e(FLBuilder._contentClass+" .fl-col-content").sortable(e.extend({},t,{connectWith:i,handle:".fl-module-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._moduleDragHelper,items:".fl-module",stop:FLBuilder._moduleDragStop}))},_bindEvents:function(){e("a").on("click",FLBuilder._preventDefault),e(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),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(".fl-builder-tools-button").on("click",FLBuilder._toolsClicked),e(".fl-builder-done-button").on("click",FLBuilder._doneClicked),e(".fl-builder-add-content-button").on("click",FLBuilder._showPanel),e(".fl-builder-templates-button").on("click",FLBuilder._changeTemplateClicked),e(".fl-builder-buy-button").on("click",FLBuilder._upgradeClicked),e(".fl-builder-upgrade-button").on("click",FLBuilder._upgradeClicked),e(".fl-builder-help-button").on("click",FLBuilder._helpButtonClicked),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-actions .fl-builder-publish-button","click",FLBuilder._publishButtonClicked),e("body").delegate(".fl-builder-save-actions .fl-builder-draft-button","click",FLBuilder._draftButtonClicked),e("body").delegate(".fl-builder-save-actions .fl-builder-discard-button","click",FLBuilder._discardButtonClicked),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-template-category-select","change",FLBuilder._templateCategoryChanged),e("body").delegate(".fl-template-preview","click",FLBuilder._templateClicked),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-help-video-button","click",FLBuilder._watchVideoClicked),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-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._blockDragInit),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-col-overlay","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-builder-col-settings .fl-builder-settings-save","click",FLBuilder._saveSettings),e("body").delegate(".fl-col-overlay .fl-block-remove","click",FLBuilder._deleteColClicked),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-insert-before","click",FLBuilder._insertColBeforeClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-insert-after","click",FLBuilder._insertColAfterClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-reset","click",FLBuilder._resetColumnWidths),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-cancel","click",FLBuilder._settingsCancelClicked),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-builder select[name=post_type]","change",FLBuilder._loopBuilderPostTypeChange),e("body").delegate(".fl-select-add-value","change",FLBuilder._textFieldAddValueSelectChange)},_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 l=e(this),i=l.attr("href");t.preventDefault(),FLBuilderConfig.isUserTemplate||(FLBuilder._exitUrl=i.indexOf("?")>-1?i:i+"?fl_builder",FLBuilder._doneClicked())},_warnBeforeUnload:function(){var t=e(".fl-builder-row-settings").length>0,l=e(".fl-builder-col-settings").length>0,i=e(".fl-builder-module-settings").length>0;return t||l||i?FLBuilderStrings.unloadWarning:void 0},_initTipTips:function(){e(".fl-tip").tipTip()},_hideTipTips:function(){e("#tiptip_holder").stop().remove()},_submenuParentClicked:function(t){var l=e(this),i=l.find(".fl-builder-submenu");l.hasClass("fl-builder-submenu-open")?(l.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-right")):(l.offset().left+i.width()>e(window).width()&&l.addClass("fl-builder-submenu-right"),l.addClass("fl-builder-submenu-open")),FLBuilder._hideTipTips(),t.preventDefault(),t.stopPropagation()},_submenuChildClicked:function(t){e(this).closest(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},_submenuMouseenter:function(t){var l=e(this),i=l.data("timeout");"undefined"!=typeof i&&clearTimeout(i)},_submenuMouseleave:function(t){var l=e(this),i=setTimeout(function(){l.closest(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},500);l.data("timeout",i)},_toolsClicked:function(){var e={},t=FLBuilderConfig.lite,l=FLBuilderConfig.enabledTemplates;t||FLBuilderConfig.isUserTemplate||"enabled"!=l&&"user"!=l||(e["save-user-template"]=FLBuilderStrings.saveTemplate,"undefined"!=typeof FLBuilderTemplateSettings&&(e["save-template"]=FLBuilderStrings.saveCoreTemplate)),FLBuilderConfig.isUserTemplate?"undefined"!=typeof window.opener&&window.opener||(e["duplicate-layout"]=FLBuilderStrings.duplicateLayout):e["duplicate-layout"]=FLBuilderStrings.duplicateLayout,e["layout-settings"]=FLBuilderStrings.editLayoutSettings,e["global-settings"]=FLBuilderStrings.editGlobalSettings,FLBuilder._showActionsLightbox({className:"fl-builder-tools-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_doneClicked:function(){FLBuilder._showActionsLightbox({className:"fl-builder-save-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:{publish:FLBuilderStrings.publish,draft:FLBuilderStrings.draft,discard:FLBuilderStrings.discard}})},_upgradeClicked:function(){window.open(FLBuilderConfig.upgradeUrl)},_helpButtonClicked:function(){var e={};FLBuilderConfig.help.tour&&(e["help-tour"]=FLBuilderStrings.takeHelpTour),FLBuilderConfig.help.video&&(e["help-video"]=FLBuilderStrings.watchHelpVideo),FLBuilderConfig.help.knowledge_base&&(e["knowledge-base"]=FLBuilderStrings.viewKnowledgeBase),FLBuilderConfig.help.forums&&(e.forums=FLBuilderStrings.visitForums),FLBuilder._showActionsLightbox({className:"fl-builder-help-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_closePanel:function(){e(".fl-builder-panel").stop(!0,!0).animate({right:"-350px"},500,function(){e(this).hide()}),e(".fl-builder-bar .fl-builder-add-content-button").stop(!0,!0).fadeIn()},_showPanel:function(){e(".fl-builder-bar .fl-builder-add-content-button").stop(!0,!0).fadeOut(),e(".fl-builder-panel").stop(!0,!0).show().animate({right:"0"},500)},_blockSectionTitleClicked:function(){var t=e(this),l=t.parent();l.hasClass("fl-active")?l.removeClass("fl-active"):(e(".fl-builder-blocks-section").removeClass("fl-active"),l.addClass("fl-active")),FLBuilder._initScrollbars()},_publishButtonClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_layout"},FLBuilder._exit),FLBuilder._actionsLightbox.close()},_draftButtonClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_draft"},FLBuilder._exit),FLBuilder._actionsLightbox.close()},_discardButtonClicked:function(){var e=confirm(FLBuilderStrings.discardMessage);e&&(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"clear_draft_layout"},FLBuilder._exit),FLBuilder._actionsLightbox.close())},_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&&window.opener.FLBuilder._updateLayout(),
3
  window.close()):(e=FLBuilder._exitUrl?FLBuilder._exitUrl:e.replace("?fl_builder","").replace("&fl_builder",""),window.location.href=e)},_duplicateLayoutClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"duplicate_post"},FLBuilder._duplicateLayoutComplete)},_duplicateLayoutComplete:function(t){var l=e("#fl-admin-url").val();window.location.href=l+"post.php?post="+t+"&action=edit"},_layoutSettingsClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._showLightbox(),FLBuilder._closePanel(),FLBuilder.ajax({action:"render_layout_settings"},FLBuilder._layoutSettingsLoaded)},_layoutSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.html),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"),l=e(this),i=l.parents("#fl-field-css");i.find(".ace_error").length>0||(t.hasClass("fl-builder-layout-settings")?e("#fl-builder-layout-css").html(l.val()):e("#fl-builder-global-css").html(l.val()),FLBuilder._layoutSettingsCSSTimeout=null)},_saveLayoutSettingsClicked:function(){for(var t=e(this).closest(".fl-builder-settings"),l=t.serializeArray(),i={},o=0;o<l.length;o++)i[l[o].name]=l[o].value;FLBuilder.showAjaxLoader(),FLBuilder._lightbox.close(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_layout_settings",settings:i},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(){FLBuilder._actionsLightbox.close(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_global_settings"},FLBuilder._globalSettingsLoaded)},_globalSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.html),FLBuilder._layoutSettingsInitCSS(),FLBuilder._initSettingsValidation({module_margins:{required:!0,number:!0},row_margins:{required:!0,number:!0},row_padding:{required:!0,number:!0},row_width:{required:!0,number:!0},responsive_breakpoint:{required:!0,number:!0}})},_saveGlobalSettingsClicked:function(){var t=e(this).closest(".fl-builder-settings"),l=t.validate().form(),i=t.serializeArray(),o={},s=0;if(l){for(;s<i.length;s++)o[i[s].name]=i[s].value;FLBuilder.showAjaxLoader(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_global_settings",settings:o},FLBuilder._updateLayout),FLBuilder._lightbox.close()}},_initTemplateSelector:function(){var t=e(FLBuilder._contentClass).find(".fl-row");0===t.length&&FLBuilder._showTemplateSelector()},_changeTemplateClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._showTemplateSelector()},_showTemplateSelector:function(){FLBuilderConfig.simpleUi||FLBuilderConfig.isUserTemplate||"disabled"!=FLBuilderConfig.enabledTemplates&&(FLBuilderConfig.lite||(FLBuilder._showLightbox(!1),FLBuilder.ajax({action:"render_template_selector"},FLBuilder._templateSelectorLoaded)))},_templateSelectorLoaded:function(t){var l=JSON.parse(t),i=null,o=null;FLBuilder._setLightboxContent(l.html),i=e(".fl-template-category-select"),o=e(".fl-user-template"),("user"==FLBuilderConfig.enabledTemplates||o.length>0)&&(i.val("fl-builder-settings-tab-yours"),e(".fl-builder-settings-tab").removeClass("fl-active"),e("#fl-builder-settings-tab-yours").addClass("fl-active")),0===o.length&&e(".fl-user-templates-message").show(),e("body").trigger("fl-builder.template-selector-loaded")},_templateCategoryChanged:function(){e(".fl-template-selector .fl-builder-settings-tab").hide(),e("#"+e(this).val()).show()},_templateClicked:function(){var t=e(this),l=t.closest(".fl-template-preview").attr("data-id");e(FLBuilder._contentClass).children(".fl-row").length>0?0===l?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate(0,!1,"core")):(FLBuilder._selectedTemplateId=l,FLBuilder._selectedTemplateType="core",FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(l,!1,"core")},_showTemplateActions:function(){FLBuilder._showActionsLightbox({className:"fl-builder-template-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:{"template-replace":FLBuilderStrings.templateReplace,"template-append":FLBuilderStrings.templateAppend}})},_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._lightbox._node.show()},_applyTemplate:function(e,t,l){t="undefined"!=typeof t&&t?"1":"0",l="undefined"==typeof l?"core":l,FLBuilder._lightbox.close(),FLBuilder.showAjaxLoader(),"core"==l?FLBuilder.ajax({action:"apply_template",template_id:e,append:t},FLBuilder._updateLayout):FLBuilder.ajax({action:"apply_user_template",template_id:e,append:t},FLBuilder._updateLayout)},_saveUserTemplateClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._showLightbox(!1),FLBuilder.ajax({action:"render_user_template_settings"},FLBuilder._userTemplateSettingsLoaded)},_userTemplateSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.html),FLBuilder._initSettingsValidation({name:{required:!0}})},_saveUserTemplateSettings:function(){var t=e(this).closest(".fl-builder-settings"),l=t.validate().form(),i=FLBuilder._getSettings(t);l&&(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_user_template",settings:i},FLBuilder._saveUserTemplateSettingsComplete),FLBuilder._lightbox.close())},_saveUserTemplateSettingsComplete:function(){FLBuilder.alert(FLBuilderStrings.templateSaved)},_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 l=e(this).closest(".fl-user-template"),i=l.attr("data-id"),o=e(".fl-user-template[data-id="+i+"]"),s=null;confirm(FLBuilderStrings.deleteTemplate)&&(FLBuilder.ajax({action:"delete_user_template",template_id:i}),o.fadeOut(function(){l=e(this),s=l.closest(".fl-user-template-category"),l.remove(),0===s.find(".fl-user-template").length&&s.remove(),1===e(".fl-user-template").length&&(e(".fl-user-templates").hide(),e(".fl-user-templates-message").show())})),t.stopPropagation()},_initCoreTemplateSettings:function(){"undefined"!=typeof FLBuilderTemplateSettings&&FLBuilderTemplateSettings.init()},_watchVideoClicked:function(){var e=wp.template("fl-video-lightbox");FLBuilder._actionsLightbox.close(),FLBuilder._lightbox.open(e({video:FLBuilderConfig.help.video_embed}))},_viewKnowledgeBaseClicked:function(){FLBuilder._actionsLightbox.close(),window.open(FLBuilderConfig.help.knowledge_base_url)},_visitForumsClicked:function(){FLBuilder._actionsLightbox.close(),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(),0===t.children(".fl-row").length&&(t.addClass("fl-builder-empty"),t.append('<span class="fl-builder-empty-message">'+FLBuilderStrings.emptyMessage+"</span>"),FLBuilder._initSortables()))},_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")})},_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))},_blockDragHelper:function(e,t){var l=t.clone();return t.clone().insertAfter(t),l.addClass("fl-builder-block-drag-helper"),l},_blockDragInit:function(t){var l=e(t.target),i=null,o=0,s="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)";FLBuilder._dragEnabled=!0,l.closest(".fl-module").length>0?i=l.closest(".fl-module"):l.closest(".fl-row").length>0?i=l.closest(".fl-row"):l.hasClass("fl-builder-block-row")||l.hasClass("fl-builder-block-saved-row")?e(".fl-row").each(function(){null===i&&e(this).offset().top-e(window).scrollTop()>0&&(i=e(this))}):(l.hasClass("fl-builder-block-module")||l.hasClass("fl-builder-block-saved-module"))&&e(".fl-module").each(function(){null===i&&e(this).offset().top-e(window).scrollTop()>0&&(i=e(this))}),null!==i?o=i.offset().top-e(window).scrollTop():i=l,e(".fl-builder-empty-message").hide(),e(FLBuilder._contentClass+" .fl-row"+s).addClass("fl-row-highlight"),(i.hasClass("fl-module")||i.hasClass("fl-builder-block-module")||i.hasClass("fl-builder-block-saved-module"))&&e(FLBuilder._contentClass+" .fl-col"+s).addClass("fl-col-highlight"),FLBuilder._disableGlobalRows(),FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays(),o>0&&scrollTo(0,i.offset().top-o)},_blockDragStart:function(t,l){FLBuilder._dragging=!0,e(FLBuilder._contentClass).sortable("refreshPositions"),e(FLBuilder._contentClass+" .fl-row-content").sortable("refreshPositions"),e(FLBuilder._contentClass+" .fl-col-content").sortable("refreshPositions")},_blockDragSort:function(e,t){if("undefined"!=typeof t.placeholder){var l=t.placeholder.parent(),i=FLBuilderStrings.insert;l.hasClass("fl-col-content")?i=t.item.hasClass("fl-builder-block-module")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-builder-block-saved-module")||t.item.hasClass("fl-builder-block-module-template")?t.item.find(".fl-builder-block-title").text():t.item.attr("data-name"):l.hasClass("fl-row-content")?i=t.item.hasClass("fl-builder-block-row")?t.item.find(".fl-builder-block-title").text():FLBuilderStrings.newColumn:l.hasClass("fl-builder-content")&&(i=t.item.hasClass("fl-builder-block-row")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-builder-block-saved-row")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-row")?FLBuilderStrings.row:FLBuilderStrings.newRow),t.placeholder.html(i),t.item.hasClass("fl-node-global")||t.item.hasClass("fl-builder-block-global")?t.placeholder.addClass("fl-builder-drop-zone-global"):t.placeholder.removeClass("fl-builder-drop-zone-global")}},_blockDragStop:function(t,l){var i=l.item.parent(),o=i.offset().top-e(window).scrollTop();i.hasClass("fl-builder-blocks-section-content")&&FLBuilder._showPanel(),FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),e(".fl-builder-empty-message").show(),scrollTo(0,i.offset().top-o)},_blockDragCancel:function(){FLBuilder._dragEnabled&&!FLBuilder._dragging&&(FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),e(".fl-builder-empty-message").show())},_removeAllOverlays:function(){FLBuilder._removeRowOverlays(),FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),FLBuilder._hideTipTips()},_appendOverlay:function(e,t){var l=0,i=null,o=e.hasClass("fl-row"),s=o?e.find("> .fl-row-content-wrap"):e.find("> .fl-node-content"),r={top:parseInt(s.css("margin-top"),10),bottom:parseInt(s.css("margin-bottom"),10)};e.append(t),e.addClass("fl-block-overlay-active"),FLBuilder._initTipTips(),i=e.find("> .fl-block-overlay"),r.top<0&&(l=parseInt(i.css("top"),10),l=isNaN(l)?0:l,i.css("top",r.top+l+"px")),r.bottom<0&&(l=parseInt(i.css("bottom"),10),l=isNaN(l)?0:l,i.css("bottom",r.bottom+l+"px")),o&&i.offset().top<43&&i.addClass("fl-row-overlay-header-bottom")},_highlightEmptyCols:function(){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",l=e(FLBuilder._contentClass+" .fl-row"+t),i=e(FLBuilder._contentClass+" .fl-col"+t);l.removeClass("fl-row-highlight"),i.removeClass("fl-col-highlight"),i.each(function(){var t=e(this);0===t.find(".fl-module").length&&t.addClass("fl-col-highlight")})},_removeRowOverlays:function(){e(".fl-row").removeClass("fl-block-overlay-active"),e(".fl-row-overlay").remove(),e(".fl-module").removeClass("fl-module-adjust-height")},_disableGlobalRows:function(){if("row"!=FLBuilderConfig.userTemplateType){var t=e(".fl-row.fl-node-global");t.addClass("fl-node-disabled"),t.append('<div class="fl-node-disabled-overlay"></div>')}},_enableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&(e(".fl-node-disabled").removeClass("fl-node-disabled"),e(".fl-node-disabled-overlay").remove())},_rowMouseenter:function(){var t=e(this),l=wp.template("fl-row-overlay");t.hasClass("fl-block-overlay-active")||(FLBuilder._appendOverlay(t,l({global:t.hasClass("fl-node-global"),node:t.attr("data-node")})),t.find(".fl-module").each(function(){e(this).outerHeight(!0)<20&&e(this).addClass("fl-module-adjust-height")}))},_rowMouseleave:function(t){var l=e(t.toElement)||e(t.relatedTarget),i=l.hasClass("fl-row-overlay"),o=l.closest(".fl-row-overlay").length>0,s=l.is("#tiptip_holder"),r=l.closest("#tiptip_holder").length>0;i||o||s||r||FLBuilder._removeRowOverlays()},_rowDragHelper:function(){return e('<div class="fl-builder-block-drag-helper" style="width: 190px; height: 45px;">'+FLBuilderStrings.row+"</div>")},_rowDragStop:function(t,l){var i=l.item,o=i.parent();return FLBuilder._blockDragStop(t,l),o.hasClass("fl-builder-rows")?void i.remove():void(i.hasClass("fl-builder-block")?(o.hasClass("fl-row-content")?FLBuilder._addColGroup(i.closest(".fl-row").attr("data-node"),i.attr("data-cols"),o.children(".fl-col-group, .fl-builder-block").index(i)):FLBuilder._addRow(i.attr("data-cols"),o.children(".fl-row, .fl-builder-block").index(i)),i.remove(),FLBuilder._showPanel(),e(".fl-builder-modules").siblings(".fl-builder-blocks-section-title").eq(0).trigger("click")):FLBuilder._reorderRow(i.attr("data-node"),o.children(".fl-row").index(i)))},_reorderRow:function(e,t){FLBuilder.ajax({action:"reorder_node",node_id:e,position:t,silent:!0})},_addRow:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder._newRowPosition=t,FLBuilder.ajax({action:"render_new_row",cols:e,position:t},FLBuilder._addRowComplete)},_addRowComplete:function(t){var l=JSON.parse(t),i=e(FLBuilder._contentClass),o=e(l.html).data("node");l.nodeParent=i,l.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(l,function(){null!==FLBuilder._addModuleAfterRowRender&&(FLBuilder._addModuleAfterRowRender.hasClass("fl-module")&&(e(".fl-node-"+o+" .fl-col-content").append(FLBuilder._addModuleAfterRowRender),FLBuilder._reorderModule(FLBuilder._addModuleAfterRowRender)),FLBuilder._addModuleAfterRowRender=null)})},_deleteRowClicked:function(t){var l=e(this).closest(".fl-row-overlay").attr("data-node"),i=e(".fl-row[data-node="+l+"]"),o=null;i.find(".fl-module").length?(o=confirm(FLBuilderStrings.deleteRowMessage),o&&FLBuilder._deleteRow(i)):FLBuilder._deleteRow(i),FLBuilder._removeAllOverlays(),t.stopPropagation()},_deleteRow:function(e){FLBuilder.ajax({action:"delete_node",node_id:e.attr("data-node"),silent:!0}),e.empty(),e.remove(),FLBuilder._setupEmptyLayout(),FLBuilder._removeRowOverlays()},_rowCopyClicked:function(t){var l=e(this).closest(".fl-row"),i=l.attr("data-node");FLBuilder.showAjaxLoader(),FLBuilder._removeAllOverlays(),FLBuilder._newRowPosition=l.index(".fl-row")+1,FLBuilder.ajax({action:"copy_row",node_id:i},FLBuilder._rowCopyComplete),t.stopPropagation()},_rowCopyComplete:function(t){var l=JSON.parse(t);l.nodeParent=e(FLBuilder._contentClass),l.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(l)},_rowSettingsClicked:function(t){var l=e(this),i=l.closest(".fl-row-overlay").attr("data-node"),o=l.closest(".fl-block-overlay-global").length>0;o&&"row"!=FLBuilderConfig.userTemplateType?FLBuilderConfig.userCanEditGlobalTemplates&&window.open(e('.fl-row[data-node="'+i+'"]').attr("data-template-url")):l.hasClass("fl-block-settings")&&(FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_row_settings",node_id:i},FLBuilder._rowSettingsLoaded)),t.stopPropagation()},_rowSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.settings),FLBuilder.preview=new FLBuilderPreview({type:"row",state:t.state})},_colMouseenter:function(){var t=e(this),l=t.hasClass("fl-node-global"),i=t.parents(".fl-node-global").length>0,o=t.parents(".fl-col-group").find(".fl-col").length,s=0===t.index(),r=o===t.index()+1,n=wp.template("fl-col-overlay");FLBuilderConfig.simpleUi||l&&i&&"row"!=FLBuilderConfig.userTemplateType||t.find(".fl-module").length>0||(t.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),FLBuilder._appendOverlay(t,n({global:l,numCols:o,first:s,last:r})),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_colMouseleave:function(t){var l=e(this),i=e(t.toElement)||e(t.relatedTarget),o=l.find(".fl-module").length>0,s=i.is("#tiptip_holder"),r=i.closest("#tiptip_holder").length>0;o||s||r||FLBuilder._removeColOverlays()},_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")},_colSettingsClicked:function(t){var l=e(this).closest(".fl-col").attr("data-node");FLBuilder._colResizing||(FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_column_settings",node_id:l},FLBuilder._colSettingsLoaded),t.stopPropagation())},_colSettingsLoaded:function(t){var l=JSON.parse(t),i=null,o=null,s=null;FLBuilder._setSettingsFormContent(l.settings),i=e(".fl-builder-col-settings"),o=i.data("node"),s=e('.fl-col[data-node="'+o+'"]'),0===s.siblings(".fl-col").length&&e(i).find("#fl-builder-settings-section-general").css("display","none"),FLBuilder.preview=new FLBuilderPreview({type:"col",state:l.state})},_deleteColClicked:function(t){var l=e(this),i=l.closest(".fl-col"),o=l.closest(".fl-module"),s=!0;o.length>0&&(s=confirm(FLBuilderStrings.deleteColumnMessage)),s&&(FLBuilder._deleteCol(i),FLBuilder._removeAllOverlays()),t.stopPropagation()},_deleteCol:function(e){var t=e.closest(".fl-row"),l=e.closest(".fl-col-group"),i=0;e.remove(),rowCols=t.find(".fl-col"),groupCols=l.find(".fl-col"),0===rowCols.length&&"row"!=FLBuilderConfig.userTemplateType?FLBuilder._deleteRow(t):(0===groupCols.length?l.remove():(i=6===groupCols.length?16.65:7===groupCols.length?14.28:Math.round(100/groupCols.length*100)/100,groupCols.css("width",i+"%")),FLBuilder.ajax({action:"delete_col",node_id:e.attr("data-node"),new_width:i,silent:!0}))},_insertColBeforeClicked:function(t){FLBuilder._insertCol(e(this).closest(".fl-col"),"before"),t.stopPropagation()},_insertColAfterClicked:function(t){FLBuilder._insertCol(e(this).closest(".fl-col"),"after"),t.stopPropagation()},_insertCol:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder._removeAllOverlays(),FLBuilder.ajax({action:"render_new_column",node_id:e.attr("data-node"),insert:t},FLBuilder._renderLayout)},_addColGroup:function(t,l,i){FLBuilder.showAjaxLoader(),FLBuilder._newColGroupParent=e(".fl-node-"+t+" .fl-row-content"),FLBuilder._newColGroupPosition=i,FLBuilder.ajax({action:"render_new_column_group",cols:l,node_id:t,position:i},FLBuilder._addColGroupComplete)},_addColGroupComplete:function(t){var l=JSON.parse(t),i=e(l.html).find(".fl-col").data("node");l.nodeParent=FLBuilder._newColGroupParent,l.nodePosition=FLBuilder._newColGroupPosition,FLBuilder._renderLayout(l,function(){null!==FLBuilder._addModuleAfterRowRender&&(FLBuilder._addModuleAfterRowRender.hasClass("fl-module")&&(e(".fl-node-"+i+" .fl-col-content").append(FLBuilder._addModuleAfterRowRender),FLBuilder._reorderModule(FLBuilder._addModuleAfterRowRender)),FLBuilder._addModuleAfterRowRender=null)})},_initColDragResizing:function(){e(".fl-block-col-resize").draggable({axis:"x",start:FLBuilder._colDragResizeStart,drag:FLBuilder._colDragResize,stop:FLBuilder._colDragResizeStop})},_colDragResizeStart:function(t,l){var i=e(l.helper),o="",s=i.closest(".fl-col-group"),r=s.find(".fl-col"),n=i.closest(".fl-col"),a=null,d=100,u=0;for(i.hasClass("fl-block-col-resize-e")?(o="e",a=n.next(".fl-col")):(o="w",a=n.prev(".fl-col"));u<r.length;u++)r.eq(u).data("node")!=n.data("node")&&r.eq(u).data("node")!=a.data("node")&&(d-=parseFloat(r.eq(u)[0].style.width));FLBuilder._colResizeData={handle:i,feedbackLeft:i.find(".fl-block-col-resize-feedback-left"),feedbackRight:i.find(".fl-block-col-resize-feedback-right"),direction:o,groupWidth:s.outerWidth(),col:n,colWidth:parseFloat(n[0].style.width)/100,sibling:a,offset:l.position.left,availWidth:d},FLBuilder._colResizing=!0,FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents()},_colDragResize:function(e,t){var l=FLBuilder._colResizeData,i=(l.offset-t.position.left)/l.groupWidth,o="e"==l.direction?100*(l.colWidth-i):100*(l.colWidth+i),s=Math.round(100*o)/100,r=l.availWidth-o,n=Math.round(100*r)/100,a=10,d=Math.round(100*(l.availWidth-10))/100;10>s?(s=a,n=d):10>n&&(s=d,n=a),"e"==l.direction?(l.feedbackLeft.html(s.toFixed(1)+"%").show(),l.feedbackRight.html(n.toFixed(1)+"%").show()):(l.feedbackLeft.html(n.toFixed(1)+"%").show(),l.feedbackRight.html(s.toFixed(1)+"%").show()),l.col.css("width",s+"%"),l.sibling.css("width",n+"%")},_colDragResizeStop:function(e,t){var l=FLBuilder._colResizeData;FLBuilder._colResizeData.feedbackLeft.hide(),FLBuilder._colResizeData.feedbackRight.hide(),FLBuilder.ajax({action:"resize_cols",col_id:l.col.data("node"),col_width:parseFloat(l.col[0].style.width),sibling_id:l.sibling.data("node"),sibling_width:parseFloat(l.sibling[0].style.width),silent:!0}),FLBuilder._colResizeData=null,FLBuilder._bindOverlayEvents(),setTimeout(function(){FLBuilder._colResizing=!1},50)},_resetColumnWidths:function(t){var l=e(this).closest(".fl-col-group"),i=l.find(".fl-col"),o=0;o=6===i.length?16.65:7===i.length?14.28:Math.round(100/i.length*100)/100,i.css("width",o+"%"),FLBuilder.ajax({action:"reset_col_widths",group_id:l.data("node"),silent:!0}),t.stopPropagation()},_moduleMouseenter:function(){var t=e(this),l=t.attr("data-name"),i=t.hasClass("fl-node-global"),o=t.parents(".fl-node-global").length>0,s=t.parents(".fl-col-group").find(".fl-col").length,r=t.parents(".fl-col"),n=0===r.index(),a=s===r.index()+1,d=wp.template("fl-module-overlay");FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),i&&o&&"row"!=FLBuilderConfig.userTemplateType||(t.hasClass("fl-block-overlay-active")||(FLBuilder._appendOverlay(t,d({global:i,moduleName:l,numCols:s,parentFirst:n,parentLast:a})),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_moduleMouseleave:function(t){var l=(e(this),e(t.toElement)||e(t.relatedTarget)),i=l.is("#tiptip_holder"),o=l.closest("#tiptip_holder").length>0;i||o||FLBuilder._removeModuleOverlays()},_removeModuleOverlays:function(){var t=e(".fl-module");t.removeClass("fl-block-overlay-active"),t.find(".fl-module-overlay").remove(),e("body").removeClass("fl-block-overlay-muted")},_moduleDragHelper:function(t,l){return e('<div class="fl-builder-block-drag-helper">'+l.attr("data-name")+"</div>")},_moduleDragStop:function(e,t){var l=t.item,i=l.parent(),o=0,s=0;return FLBuilder._blockDragStop(e,t),i.hasClass("fl-builder-modules")||i.hasClass("fl-builder-widgets")?void l.remove():(l.hasClass("fl-builder-block")?(i.hasClass("fl-builder-content")?(o=i.children(".fl-row, .fl-builder-block").index(l),s=0):i.hasClass("fl-row-content")?(o=i.children(".fl-col-group, .fl-builder-block").index(l),s=l.closest(".fl-row").attr("data-node")):(o=i.children(".fl-module, .fl-builder-block").index(l),s=l.closest(".fl-col").attr("data-node")),FLBuilder._addModule(i,s,l.attr("data-type"),o,l.attr("data-widget")),t.item.remove()):i.hasClass("fl-builder-content")?(o=i.children(".fl-row, .fl-module").index(l),FLBuilder._addModuleAfterRowRender=l,FLBuilder._addRow("1-col",o),l.remove()):i.hasClass("fl-row-content")?(o=i.children(".fl-col-group, .fl-module").index(l),FLBuilder._addModuleAfterRowRender=l,FLBuilder._addColGroup(l.closest(".fl-row").attr("data-node"),"1-col",o),l.remove()):FLBuilder._reorderModule(l),void FLBuilder._resizeLayout())},_reorderModule:function(e){var t=e.closest(".fl-col").attr("data-node"),l=e.attr("data-parent"),i=e.attr("data-node"),o=e.index();t==l?FLBuilder.ajax({action:"reorder_node",node_id:i,position:o,silent:!0}):(e.attr("data-parent",t),FLBuilder.ajax({action:"move_node",new_parent:t,node_id:i,position:o,silent:!0}))},_deleteModuleClicked:function(t){var l=e(this).closest(".fl-module"),i=confirm(FLBuilderStrings.deleteModuleMessage);i&&(FLBuilder._deleteModule(l),FLBuilder._removeAllOverlays()),t.stopPropagation()},_deleteModule:function(e){var t=e.closest(".fl-row");FLBuilder.ajax({action:"delete_node",node_id:e.attr("data-node"),silent:!0}),e.empty(),e.remove(),t.removeClass("fl-block-overlay-muted"),FLBuilder._highlightEmptyCols(),FLBuilder._removeAllOverlays()},_moduleCopyClicked:function(t){var l=e(this).closest(".fl-module");FLBuilder.showAjaxLoader(),FLBuilder._removeAllOverlays(),FLBuilder._newModuleParent=l.parent(),FLBuilder._newModulePosition=l.index()+1,FLBuilder.ajax({action:"copy_module",node_id:l.attr("data-node")},FLBuilder._moduleCopyComplete),t.stopPropagation()},_moduleCopyComplete:function(e){var t=JSON.parse(e);t.nodeParent=FLBuilder._newModuleParent,t.nodePosition=FLBuilder._newModulePosition,FLBuilder._renderLayout(t)},_moduleSettingsClicked:function(t){var l=e(this),i=l.closest(".fl-module").attr("data-node"),o=l.closest(".fl-col").attr("data-node"),s=l.closest(".fl-module").attr("data-type"),r=l.closest(".fl-block-overlay-global").length>0;t.stopPropagation(),FLBuilder._colResizing||(!r||FLBuilderConfig.userCanEditGlobalTemplates)&&FLBuilder._showModuleSettings(i,o,s)},_showModuleSettings:function(e,t,l){FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_module_settings",node_id:e,type:l,parent_id:t},FLBuilder._moduleSettingsLoaded)},_moduleSettingsLoaded:function(t){var l=JSON.parse(t),i=e("<div>"+l.settings+"</div>"),o=i.find("link.fl-builder-settings-css"),s=i.find("script.fl-builder-settings-js"),r=i.find(".fl-builder-settings"),n=r.attr("data-type"),a=null,d=null,u=null;e.inArray(n,FLBuilder._loadedModuleAssets)>-1?(o.remove(),s.remove()):(e("head").append(o),e("head").append(s),FLBuilder._loadedModuleAssets.push(n)),FLBuilder._setSettingsFormContent(i),"undefined"!=typeof l.layout&&(a=l.layout,a.nodeParent=FLBuilder._newModuleParent,a.nodePosition=FLBuilder._newModulePosition),"undefined"!=typeof l.state&&(d=l.state),FLBuilder.preview=new FLBuilderPreview({type:"module",layout:a,state:d}),u=FLBuilder._moduleHelpers[n],"undefined"!=typeof u&&(FLBuilder._initSettingsValidation(u.rules),u.init())},_saveModuleClicked:function(){var t=e(this).closest(".fl-builder-settings"),l=t.attr("data-type"),i=(t.attr("data-node"),FLBuilder._moduleHelpers[l]),o=!0;"undefined"!=typeof i&&(t.find("label.error").remove(),t.validate().hideErrors(),o=t.validate().form(),o&&(o=i.submit())),o?(FLBuilder._saveSettings(),FLBuilder._lightbox.close()):FLBuilder._toggleSettingsTabErrors()},_addModule:function(e,t,l,i,o){FLBuilder.showAjaxLoader(),FLBuilder._newModuleParent=e,FLBuilder._newModulePosition=i,FLBuilder.ajax({action:"render_new_module",parent_id:t,type:l,position:i,node_preview:1,widget:"undefined"==typeof o?"":o},FLBuilder._addModuleComplete)},_addModuleComplete:function(t){FLBuilder._showLightbox(),FLBuilder._moduleSettingsLoaded(t),e(".fl-builder-module-settings").data("new-module","1")},registerModuleHelper:function(t,l){var i={rules:{},init:function(){},submit:function(){return!0},preview:function(){}};FLBuilder._moduleHelpers[t]=e.extend({},i,l)},_registerModuleHelper:function(e,t){FLBuilder.registerModuleHelper(e,t)},_showNodeTemplateSettings:function(t){var l=e(".fl-builder-settings-lightbox .fl-builder-settings");FLBuilder._saveSettings(),FLBuilder.ajax({action:"render_node_template_settings",node_id:l.attr("data-node")},FLBuilder._nodeTemplateSettingsLoaded)},_nodeTemplateSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._showLightbox(!1),FLBuilder._setSettingsFormContent(t.html),FLBuilder._initSettingsValidation({name:{required:!0}})},_saveNodeTemplate:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=t.validate().form();l&&(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_node_template",node_id:t.attr("data-node"),settings:FLBuilder._getSettings(t)},FLBuilder._saveNodeTemplateComplete),FLBuilder._lightbox.close())},_saveNodeTemplateComplete:function(t){var l=JSON.parse(t),i=e(".fl-builder-saved-"+l.type+"s"),o=i.find(".fl-builder-block"),s=null,r="",n=l.name.toLowerCase(),a=0,d=wp.template("fl-node-template-block");if("row"==l.type?FLBuilder.alert(FLBuilderStrings.rowTemplateSaved):"module"==l.type&&FLBuilder.alert(FLBuilderStrings.moduleTemplateSaved),l.layout&&FLBuilder._renderLayout(l.layout),0===o.length)i.append(d(l));else for(;a<o.length;a++){if(s=o.eq(a),r=s.text().toLowerCase().trim(),0===a&&r>n){i.prepend(d(l));break}if(r>n){s.before(d(l));break}if(o.length-1===a){i.append(d(l));break}}i.find(".fl-builder-block-no-node-templates").remove()},_nodeTemplateDragStop:function(e,t){var l=t.item,i=l.parent(),o=null,s=0,r="",n=null;FLBuilder._blockDragStop(e,t),l.hasClass("fl-builder-block-saved-row")||l.hasClass("fl-builder-block-row-template")?(s=i.children(".fl-row, .fl-builder-block").index(l),o=null,r="render_new_row",n=FLBuilder._addRowComplete,FLBuilder._newRowPosition=s):(l.hasClass("fl-builder-block-saved-module")||l.hasClass("fl-builder-block-module-template"))&&(r="render_new_module",n=FLBuilder._addModuleComplete,i.hasClass("fl-builder-content")?(s=i.children(".fl-row, .fl-builder-block").index(l),o=0):i.hasClass("fl-row-content")?(s=i.children(".fl-col-group, .fl-builder-block").index(l),o=l.closest(".fl-row").attr("data-node")):(s=i.children(".fl-module, .fl-builder-block").index(l),o=l.closest(".fl-col").attr("data-node")),FLBuilder._newModuleParent=i,FLBuilder._newModulePosition=s),
4
- FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:r,template_id:l.attr("data-id"),parent_id:o,position:s},n),l.remove()},_editNodeTemplateClicked:function(t){t.preventDefault(),t.stopPropagation(),window.open(e(this).attr("href"))},_deleteNodeTemplateClicked:function(t){var l=e(t.target),i=l.closest(".fl-builder-blocks-section"),o=i.find(".fl-builder-blocks-section-content"),s=o.find(".fl-builder-block"),r=l.closest(".fl-builder-block"),n=r.hasClass("fl-builder-block-global"),a=n?FLBuilder._updateLayout:void 0,d=n?FLBuilderStrings.deleteGlobalTemplate:FLBuilderStrings.deleteTemplate;confirm(d)&&(r.remove(),1===s.length&&(r.hasClass("fl-builder-block-saved-row")?o.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedRows+"</span>"):o.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedModules+"</span>")),FLBuilder.ajax({action:"delete_node_template",template_id:r.attr("data-id"),silent:r.hasClass("fl-builder-block-global")?!1:!0},a))},_initSettingsForms:function(){FLBuilder._initColorPickers(),FLBuilder._initSelectFields(),FLBuilder._initMultipleFields(),FLBuilder._initAutoSuggestFields(),FLBuilder._initLinkFields(),FLBuilder._initFontFields()},_setSettingsFormContent:function(e){FLBuilder._setLightboxContent(e),FLBuilder._initSettingsForms()},_settingsTabClicked:function(t){var l=e(this),i=l.closest(".fl-builder-settings"),o=l.attr("href").split("#").pop();i.find(".fl-builder-settings-tab").removeClass("fl-active"),i.find("#"+o).addClass("fl-active"),i.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),e(this).addClass("fl-active"),t.preventDefault()},_settingsCancelClicked:function(t){var l=e(".fl-builder-module-settings"),i=null,o=null,s=null,r=null;l.length>0&&"undefined"!=typeof l.data("new-module")?(i=e(FLBuilder.preview.state.html),o=e(".fl-node-"+l.data("node")),s=o.closest(".fl-col"),r=i.find(".fl-node-"+s.data("node")),r.length>0?FLBuilder._deleteModule(o):FLBuilder._deleteCol(s)):FLBuilder.preview&&FLBuilder.preview.revert(),FLBuilder.preview=null,FLLightbox.closeParent(this)},_initSettingsValidation:function(t,l){var i=e(".fl-builder-settings").last();i.validate({ignore:[],rules:t,messages:l,errorPlacement:FLBuilder._settingsErrorPlacement})},_settingsErrorPlacement:function(e,t){e.appendTo(t.parent())},_toggleSettingsTabErrors:function(){for(var t=e(".fl-builder-settings:visible"),l=t.find(".fl-builder-settings-tab"),i=null,o=null,s=0;s<l.length;s++)i=l.eq(s),o=i.find("label.error"),tabLink=t.find(".fl-builder-settings-tabs a[href*="+i.attr("id")+"]"),tabLink.find(".fl-error-icon").remove(),tabLink.removeClass("error"),o.length>0&&(tabLink.append('<span class="fl-error-icon"></span>'),tabLink.addClass("error"))},_getSettings:function(t){FLBuilder._updateEditorFields();var l=t.serializeArray(),i=0,o=0,s="",r="",n="",a=[],d=[],u={};for(i=0;i<l.length;i++)if(s=l[i].value.replace(/\r/gm,""),!(l[i].name.indexOf("flrich")>-1))if(l[i].name.indexOf("[")>-1){for(r=l[i].name.replace(/\[(.*)\]/,""),n=l[i].name.replace(r,""),a=[],d=n.match(/\[[^\]]*\]/g),o=0;o<d.length;o++)"[]"!=d[o]&&a.push(d[o].replace(/\[|\]/g,""));n.match(/\[\]\[[^\]]*\]\[[^\]]+\]/)?("undefined"==typeof u[r]&&(u[r]={}),"undefined"==typeof u[r][a[0]]&&(u[r][a[0]]={}),"undefined"==typeof u[r][a[0]][a[1]]&&(u[r][a[0]][a[1]]={}),u[r][a[0]][a[1]]=s):n.match(/\[\]\[[^\]]*\]\[\]/)?("undefined"==typeof u[r]&&(u[r]={}),"undefined"==typeof u[r][a[0]]&&(u[r][a[0]]=[]),u[r][a[0]].push(s)):n.match(/\[\]\[[^\]]*\]/)?("undefined"==typeof u[r]&&(u[r]={}),u[r][a[0]]=s):n.match(/\[\]/)&&("undefined"==typeof u[r]&&(u[r]=[]),u[r].push(s))}else u[l[i].name]=s;for(n in u)if("undefined"!=typeof u["as_values_"+n]){u[n]=e.grep(u["as_values_"+n].split(","),function(e){return""!==e}).join(",");try{delete u["as_values_"+n]}catch(c){}}return u},_saveSettings:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=t.attr("data-node"),i=FLBuilder._getSettings(t);FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_settings",node_id:l,settings:i},FLBuilder._saveSettingsComplete),FLBuilder._lightbox.close()},_saveSettingsComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)})},_showHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeOut()},_initAutoSuggestFields:function(){e(".fl-suggest-field").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")}),{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")})},_updateAutoSuggestField:function(t,l,i){e(this).siblings(".as-values").val(i.join(",")).trigger("change")},_initMultipleFields:function(){for(var t=e(".fl-builder-field-multiples"),l=null,i=null,o=0,s=FLBuilderConfig.isRtl?{left:10}:{right:10};o<t.length;o++)l=t.eq(o),i=l.find(".fl-builder-field-multiple"),1===i.length?i.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):i.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:s,distance:5,opacity:.5,helper:FLBuilder._fieldDragHelper,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer"})},_addFieldClicked:function(){var t=e(this),l=t.attr("data-field"),i=t.closest("tr").siblings("tr[data-field="+l+"]").last(),o=i.clone(),s=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;o.find("th label span.fl-builder-field-index").html(s),o.find(".fl-form-field-preview-text").html(""),o.find("input, textarea, select").val(""),i.after(o),FLBuilder._initMultipleFields()},_copyFieldClicked:function(){var t=e(this),l=t.closest("tr"),i=l.clone(),o=parseInt(l.find("label span.fl-builder-field-index").html(),10)+1;i.find("th label span.fl-builder-field-index").html(o),l.after(i),FLBuilder._renumberFields(l.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var t=e(this).closest("tr"),l=t.parent(),i=confirm(FLBuilderStrings.deleteFieldMessage);i&&(t.remove(),FLBuilder._renumberFields(l),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){for(var t=e.find(".fl-builder-field-multiple"),l=0;l<t.length;l++)t.eq(l).find("th label span.fl-builder-field-index").html(l+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),l=t.attr("data-toggle"),i=t.attr("data-hide"),o=t.attr("data-trigger"),s=t.val(),r=0;if("undefined"!=typeof l){l=JSON.parse(l);for(r in l)FLBuilder._settingsSelectToggle(l[r].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l[r].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[r].tabs,"hide","a[href*=fl-builder-settings-tab-","]");"undefined"!=typeof l[s]&&(FLBuilder._settingsSelectToggle(l[s].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(l[s].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[s].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof i&&(i=JSON.parse(i),"undefined"!=typeof i[s]&&(FLBuilder._settingsSelectToggle(i[s].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[s].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[s].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))),"undefined"!=typeof o&&(o=JSON.parse(o),"undefined"!=typeof o[s]&&"undefined"!=typeof o[s].fields))for(r=0;r<o[s].fields.length;r++)e("#fl-field-"+o[s].fields[r]).find("select").trigger("change")},_settingsSelectToggle:function(t,l,i,o){var s=0;if(o="undefined"==typeof o?"":o,"undefined"!=typeof t)for(;s<t.length;s++)e(i+t[s]+o)[l]()},_initColorPickers:function(){var t=FLBuilderConfig.colorPresets?FLBuilderConfig.colorPresets:[];FLBuilder.colorPicker=new FLBuilderColorPicker({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})})},_selectSinglePhoto:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:"image"},multiple:!1})),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"),l=e(this).closest(".fl-photo-field"),i=l.find("input[type=hidden]"),o=i.val(),s=null;e(this).hasClass("fl-photo-replace")?(t.reset(),l.addClass("fl-photo-empty"),i.val("")):""!==o?(s=wp.media.attachment(o),s.fetch(),t.add(s?[s]:[])):t.reset()},_singlePhotoSelected:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),l=e(this).closest(".fl-photo-field"),i=l.find("input[type=hidden]"),o=l.find(".fl-photo-preview img"),s=l.find("select");i.val(t.id),o.attr("src",FLBuilder._getPhotoSrc(t)),l.removeClass("fl-photo-empty"),l.find("label.error").remove(),s.show(),s.html(FLBuilder._getPhotoSizeOptions(t)),s.trigger("change")},_singlePhotoRemoved:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection"),l=e(this).closest(".fl-photo-field"),i=l.find("input[type=hidden]"),o=l.find("select");t.reset(),l.addClass("fl-photo-empty"),i.val(""),o.html(""),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){var t="",l=null,i=null,o="",s={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if("undefined"==typeof e.sizes)t+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else for(l in e.sizes)o="undefined"!=typeof s[l]?s[l]+" - ":"undefined"!=typeof FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]+" - ":"",i="full"==l?' selected="selected"':"",t+='<option value="'+e.sizes[l].url+'"'+i+">"+o+e.sizes[l].width+" x "+e.sizes[l].height+"</option>";return t},_selectMultiplePhotos:function(){var t=e(this).closest(".fl-multiple-photos-field"),l=t.find("input[type=hidden]"),i=l.val(),o=""===i?'[gallery ids="-1"]':'[gallery ids="'+JSON.parse(i).join()+'"]',s=wp.shortcode.next("gallery",o).shortcode,r=wp.media.gallery.defaults.id,n=null,a=null;_.isUndefined(s.get("id"))&&!_.isUndefined(r)&&s.set("id",r),n=wp.media.gallery.attachments(s),a=new wp.media.model.Selection(n.models,{props:n.props.toJSON(),multiple:!0}),a.gallery=n.gallery,a.more().done(function(){a.props.set({query:!1}),a.unmirror(),a.props.unset("orderby")}),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:a}).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 l=e(this).closest(".fl-multiple-photos-field"),i=l.find("input[type=hidden]"),o=l.find(".fl-multiple-photos-count"),s=[],r=0;r<t.models.length;r++)s.push(t.models[r].id);1==s.length?o.html("1 "+FLBuilderStrings.photoSelected):o.html(s.length+" "+FLBuilderStrings.photosSelected),l.removeClass("fl-multiple-photos-empty"),l.find("label.error").remove(),i.val(JSON.stringify(s)).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.once("select",e.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var t=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),l=e(this).closest(".fl-video-field"),i=l.find(".fl-video-preview-img img"),o=l.find(".fl-video-preview-filename"),s=l.find("input[type=hidden]");i.attr("src",t.icon),o.html(t.filename),l.removeClass("fl-video-empty"),l.find("label.error").remove(),s.val(t.id).trigger("change")},_selectMultipleAudios:function(){var t=e(this).closest(".fl-multiple-audios-field"),l=t.find("input[type=hidden]"),i=l.val(),o=""==i?'[playlist ids="-1"]':'[playlist ids="'+JSON.parse(i).join()+'"]',s=wp.shortcode.next("playlist",o).shortcode,r=wp.media.playlist.defaults.id,n=null,a=null;_.isUndefined(s.get("id"))&&!_.isUndefined(r)&&s.set("id",r),n=wp.media.playlist.attachments(s),a=new wp.media.model.Selection(n.models,{props:n.props.toJSON(),multiple:!0}),a.playlist=n.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 l=e(this).closest(".fl-multiple-audios-field"),i=l.find(".fl-multiple-audios-count"),o=l.find("input[type=hidden]"),s=[],r=0;r<t.models.length;r++)s.push(t.models[r].id);1==s.length?i.html("1 "+FLBuilderStrings.audioSelected):i.html(s.length+" "+FLBuilderStrings.audiosSelected),o.val(JSON.stringify(s)).trigger("change"),l.removeClass("fl-multiple-audios-empty"),l.find("label.error").remove()},_selectIcon:function(){var e=this;FLIconSelector.open(function(t){FLBuilder._iconSelected.apply(e,[t])})},_iconSelected:function(t){var l=e(this).closest(".fl-icon-field"),i=l.find("input[type=hidden]"),o=l.find("i"),s=o.attr("data-icon");i.val(t).trigger("change"),o.removeClass(s),o.addClass(t),o.attr("data-icon",t),l.removeClass("fl-icon-empty"),l.find("label.error").remove()},_removeIcon:function(){var t=e(this).closest(".fl-icon-field"),l=t.find("input[type=hidden]"),i=t.find("i");l.val("").trigger("change"),i.removeClass(),i.attr("data-icon",""),t.addClass("fl-icon-empty")},_formFieldClicked:function(){var t=e(this),l=t.closest(".fl-lightbox-wrap").attr("data-instance-id"),i=FLLightbox._instances[l],o=i._node.find(".fl-lightbox").css("left"),s=i._node.find(".fl-lightbox").css("top"),r=t.closest(".fl-builder-settings"),n=t.attr("data-type"),a=t.siblings("input").val(),d=FLBuilder._moduleHelpers[n],u=new FLLightbox({className:"fl-builder-lightbox fl-form-field-settings",destroyOnClose:!0});t.closest(".fl-builder-lightbox").hide(),t.attr("id","fl-"+u._id),u.open('<div class="fl-builder-lightbox-loading"></div>'),u.draggable({handle:".fl-lightbox-header"}),e("body").undelegate(".fl-builder-settings-cancel","click",FLBuilder._settingsCancelClicked),u._node.find(".fl-lightbox").css({left:o,top:Number(parseInt(s)+233)+"px"}),FLBuilder.ajax({action:"render_settings_form",node_id:r.attr("data-node"),type:n,settings:a.replace(/&#39;/g,"'")},function(e){var t=JSON.parse(e);u.setContent(t.html),u._node.find("form.fl-builder-settings").attr("data-type",n),u._node.find(".fl-builder-settings-cancel").on("click",FLBuilder._closeFormFieldLightbox),FLBuilder._initSettingsForms(),"undefined"!=typeof d&&(FLBuilder._initSettingsValidation(d.rules),d.init()),u._node.find(".fl-lightbox").css({left:o,top:s})})},_closeFormFieldLightbox:function(){var t=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),l=FLLightbox._instances[t],i=e(".fl-builder-settings-lightbox"),o=i.find("form"),s=l._node.find(".fl-lightbox").css("left"),r=l._node.find(".fl-lightbox").css("top"),n=0,a=e(window),d=a.height();l._node.find(".fl-lightbox-content").html('<div class="fl-builder-lightbox-loading"></div>'),n=l._node.find(".fl-lightbox").height(),d-80>n?l._node.find(".fl-lightbox").css("top",(d-n)/2-40+"px"):l._node.find(".fl-lightbox").css("top","0px"),l.on("close",function(){i.show(),i.find("label.error").remove(),o.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors(),i.find(".fl-lightbox").css({left:s,top:r})}),setTimeout(function(){l.close(),e("body").delegate(".fl-builder-settings-cancel","click",FLBuilder._settingsCancelClicked)},500)},_saveFormFieldClicked:function(){var t=e(this).closest(".fl-builder-settings"),l=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),i=t.attr("data-type"),o=FLBuilder._getSettings(t),s=FLBuilder._moduleHelpers[i],r=e(".fl-builder-settings #fl-"+l),n=r.parent().attr("data-preview-text"),a=o[n],d=e('select[name="'+n+'"]'),u=document.createElement("div"),c=!0;return d.length>0&&(a=d.find('option[value="'+o[n]+'"]').text()),"undefined"!=typeof s&&(t.find("label.error").remove(),t.validate().hideErrors(),c=t.validate().form(),c&&(c=s.submit())),c?("undefined"!=typeof n&&(a.indexOf("fa fa-")>-1?a='<i class="'+a+'"></i>':a.length>35&&(u.innerHTML=a,a=(u.textContent||u.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),r.siblings(".fl-form-field-preview-text").html(a)),r.siblings("input").val(JSON.stringify(o)).trigger("change"),FLBuilder._closeFormFieldLightbox.apply(this),!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-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var t=e(this),l=t.find(".fl-link-field-search-input");l.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links"}),{asHtmlID:l.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,l){var i=e.closest(".fl-link-field"),o=i.find(".fl-link-field-search"),s=i.find(".fl-link-field-search-input"),r=i.find(".fl-link-field-input");r.val(t.value).trigger("keyup"),s.autoSuggest("remove",t.value),o.hide()},_linkFieldSelectClicked:function(){e(this).parent().find(".fl-link-field-search").show()},_linkFieldSelectCancelClicked:function(){e(this).parent().hide()},_initFontFields:function(){e(".fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var t=e(this),l=t.find(".fl-font-field-font");l.on("change",function(){FLBuilder._getFontWeights(l)})},_getFontWeights:function(t){var l=t.next(".fl-font-field-weight"),i=t.val(),o={"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"},s={};l.html(""),s="undefined"!=typeof FLBuilderFontFamilies.system[i]?FLBuilderFontFamilies.system[i].weights:"undefined"!=typeof FLBuilderFontFamilies.google[i]?FLBuilderFontFamilies.google[i]:FLBuilderFontFamilies["default"][i],e.each(s,function(e,t){l.append('<option value="'+t+'">'+o[t]+"</option>")})},initEditorField:function(e){var t=tinyMCEPreInit.mceInit.flhiddeneditor;t.elements=e,tinyMCEPreInit.mceInit[e]=t},_updateEditorFields:function(){var t=e(".fl-builder-settings textarea.wp-editor-area");t.each(FLBuilder._updateEditorField)},_updateEditorField:function(){var t=e(this),l=t.closest(".wp-editor-wrap"),i=t.attr("id"),o=t.closest(".fl-editor-field").attr("id"),s="undefined"==typeof tinyMCE?!1:tinyMCE.get(i),r=t.siblings('textarea[name="'+o+'"]');0===r.length&&(r=e('<textarea name="'+o+'"></textarea>').hide(),t.after(r)),s&&l.hasClass("tmce-active")?r.val(s.getContent()):"undefined"!=typeof switchEditors?r.val(switchEditors.wpautop(t.val())):r.val(t.val())},_loopBuilderPostTypeChange:function(){var t=e(this).val();e(".fl-loop-builder-filter").hide(),e(".fl-loop-builder-"+t+"-filter").show()},_textFieldAddValueSelectChange:function(){var t=e(this),l=e('input[name="'+t.data("target")+'"]'),i=l.val(),o=t.val();-1==i.indexOf(o)&&l.attr("value",i.trim()+" "+o.trim()),t.val("")},ajax:function(t,l){var i;if(FLBuilder._silentUpdate)return FLBuilder.showAjaxLoader(),void(FLBuilder._silentUpdateCallbackData=[t,l]);t.silent===!0&&(FLBuilder._silentUpdate=!0);for(i in t)"undefined"==typeof t[i]&&(t[i]=null);return t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=e("#fl-post-id").val(),t.fl_builder=1,t.fl_action=t.action,t={fl_builder_data:t},e.post(FLBuilder._ajaxUrl(),t,function(e){FLBuilder._ajaxComplete(),"undefined"!=typeof l&&l.call(this,e)})},_ajaxComplete:function(){var e,t;FLBuilder._silentUpdate=!1,null!==FLBuilder._silentUpdateCallbackData?(FLBuilder.showAjaxLoader(),e=FLBuilder._silentUpdateCallbackData[0],t=FLBuilder._silentUpdateCallbackData[1],FLBuilder._silentUpdateCallbackData=null,FLBuilder.ajax(e,t)):FLBuilder.hideAjaxLoader()},_ajaxUrl:function(e){var t=window.location.href.split("#").shift(),l=null;if("undefined"!=typeof e)for(l in e)t+=t.indexOf("?")>-1?"&":"?",t+=l+"="+e[l];return t},showAjaxLoader:function(){0===e(".fl-builder-lightbox-loading").length&&e(".fl-builder-loading").show()},hideAjaxLoader:function(){e(".fl-builder-loading").hide()},_showLightbox:function(e){e="undefined"==typeof e?!0:e,FLBuilder._lightbox.open('<div class="fl-builder-lightbox-loading"></div>'),e?FLBuilder._lightbox.draggable({handle:".fl-lightbox-header"}):FLBuilder._lightbox.draggable(!1),FLBuilder._removeAllOverlays(),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout)},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder._actionsLightbox.open(t(e))},alert:function(e){var t=new FLLightbox({className:"fl-builder-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),l=wp.template("fl-alert-lightbox");t.open(l({message:e}))},_alertClose:function(){FLLightbox.closeParent(this)},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,l,i,o){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",l).replace("{file}",t)),"undefined"!=typeof o&&"undefined"!=typeof o.stack&&(FLBuilder.log(o.stack),FLBuilder.log("************************************************************************"))}},e(function(){FLBuilder._init()})}(jQuery);var FLBuilderColorPicker;!function(e,t){function l(){var t,l,i="backgroundImage";h?f="filter":(t=e('<div id="iris-gradtest" />'),l="linear-gradient(top,#fff,#000)",e.each(p,function(e,o){return t.css(i,o+l),t.css(i).match("gradient")?(f=e,!1):void 0}),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 i(t,l){return t="top"===t?"top":"left",l=e.isArray(l)?l:Array.prototype.slice.call(arguments,1),"webkit"===f?s(t,l):p[f]+"linear-gradient("+t+", "+l.join(", ")+")"}function o(t,l){var i,o,s,n,a,d,u,c,h;t="top"===t?"top":"left",l=e.isArray(l)?l:Array.prototype.slice.call(arguments,1),i="top"===t?0:1,o=e(this),s=l.length-1,n="filter",a=1===i?"left":"top",d=1===i?"right":"bottom",u=1===i?"height":"width",c='<div class="iris-ie-gradient-shim" style="position:absolute;'+u+":100%;"+a+":%start%;"+d+":%end%;"+n+':%filter%;" data-color:"%color%"></div>',h="","static"===o.css("position")&&o.css({position:"relative"}),l=r(l),e.each(l,function(e,t){var o,r,n;return e===s?!1:(o=l[e+1],void(t.stop!==o.stop&&(r=100-parseFloat(o.stop)+"%",t.octoHex=new Color(t.color).toIEOctoHex(),o.octoHex=new Color(o.color).toIEOctoHex(),n="progid:DXImageTransform.Microsoft.Gradient(GradientType="+i+", StartColorStr='"+t.octoHex+"', EndColorStr='"+o.octoHex+"')",h+=c.replace("%start%",t.stop).replace("%end%",r).replace("%filter%",n))))}),o.find(".iris-ie-gradient-shim").remove(),e(h).prependTo(o)}function s(t,l){var i=[];return t="top"===t?"0% 0%,0% 100%,":"0% 100%,100% 100%,",l=r(l),e.each(l,function(e,t){i.push("color-stop("+parseFloat(t.stop)/100+", "+t.color+")")}),"-webkit-gradient(linear,"+t+i.join(",")+")"}function r(t){var l=[],i=[],o=[],s=t.length-1;return e.each(t,function(e,t){var o=t,s=!1,r=t.match(/1?[0-9]{1,2}%$/);r&&(o=t.replace(/\s?1?[0-9]{1,2}%$/,""),s=r.shift()),l.push(o),i.push(s)}),i[0]===!1&&(i[0]="0%"),i[s]===!1&&(i[s]="100%"),i=n(i),e.each(i,function(e){o[e]={color:l[e],stop:i[e]}}),o}function n(t){var l,i,o,s,r=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):(r=d-1,u=!0),d++;for(i=a-r,s=parseInt(t[r].replace("%"),10),l=(parseFloat(t[a].replace("%"))-s)/i,d=r+1,o=1;a>d;)t[d]=s+o*l+"%",o++,d++;return n(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&&10>c,f=!1,p=["-moz-","-webkit-","-o-","-ms-"];e.fn.gradient=function(){var t=arguments;return this.each(function(){h?o.apply(this,t):e(this).css("backgroundImage",i.apply(this,t))})},e.fn.raninbowGradient=function(t,l){var i,o,s,r;for(t=t||"top",i=e.extend({},{s:100,l:50},l),o="hsl(%h%,"+i.s+"%,"+i.l+"%)",s=0,r=[];360>=s;)r.push(o.replace("%h%",s)),s+=30;return this.each(function(){e(this).gradient(t,r)})},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="#"><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 l={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({},l,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("#000000").setHSpace(t.options.mode),a=this.options.presets,f===!1&&l(),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"):8>=c&&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(),e("html").addClass("fl-color-picker-init")},_prepareColorFields:function(){e(".fl-color-picker-value").each(function(){var t=e(this),l=t.parent().find(".fl-color-picker-color");t.val()&&l.css({backgroundColor:"#"+t.val().toString()})})},_setTemplates:function(){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,l){var i=!1;return e.each(l,function(e,l){return t===l?(i=!0,!1):void 0}),i},_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,l){
5
- t._addPresetView(l)}):t._presetsList.append(this._noPresetsTpl)},_addPresetView:function(t){var l=this._presetsList.find(".fl-color-picker-no-preset");l.length>0&&l.remove();var i=e(this._presetsTpl),o=Color(t);i.attr("data-color",t).find(".fl-color-picker-preset-color").css({backgroundColor:o.toString()}).end().find(".fl-color-picker-preset-label").html(o.toString()),this._presetsList.append(i)},_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 l=e(this);t._currentElement=l.parent().find(".fl-color-picker-value"),t._ui.position({my:"left top",at:"left bottom",of:l,collision:"flipfit",using:function(e,l){t._togglePicker(e)}})}).on("click",".fl-color-picker-clear",function(){var l=e(this);t._currentElement=l.parent().find(".fl-color-picker-value"),l.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("click",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,l=t._ui.find(".fl-color-picker-preset-add"),i=t._ui.find(".fl-color-picker-presets"),o=i.find(".fl-color-picker-presets-open-label"),s=i.find(".fl-color-picker-presets-close-label"),r=i.find(".fl-color-picker-presets-list");l.off("click").on("click",function(){t._addPreset(t.element.val())}),r.css({height:t.element.innerHeight()+t._iris.innerHeight()+14+"px"}).hide(),i.off("click").on("click",".fl-color-picker-presets-toggle",function(){o.toggleClass("fl-color-picker-active"),s.toggleClass("fl-color-picker-active"),r.slideToggle(500)}).on("click",".fl-color-picker-preset",function(l){var i=new Color(e(this).data("color").toString());t._setColor(i),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:i.toString()}).removeClass("fl-color-picker-empty"),o.toggleClass("fl-color-picker-active"),s.toggleClass("fl-color-picker-active"),r.slideToggle(500)}).on("click",".fl-color-picker-preset-remove",function(l){l.stopPropagation(),t._removePreset(e(this).parent().data("color"))})},_removePreset:function(t){if(confirm(this.options.labels.removePresetConfirm)){var l=t.toString(),i=a.indexOf(l);i>-1&&(a.splice(i,1),this.options.presets=a,this._presetsList.find('.fl-color-picker-preset[data-color="'+l+'"]').slideUp(function(){e(this).remove()})),a.length<1&&this._presetsList.append(this._noPresetsTpl),e(this).trigger("presetRemoved",{presets:a})}},_addPreset:function(t){var l=t.toString().replace(/^#/,"");""===l?alert(this.options.labels.noneColorSelected):a.indexOf(l)>-1?alert(this.options.labels.alreadySaved.replace("%s","#"+l)):(this._addPresetView(l),this._addPresetFeedback(),a.push(l),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 l,i=this,o=i._color,s=i.options.mode,r=i._getHSpaceColor(),n=i.controls[t],a=i.options.controls;if(t!==i.active&&("square"!==i.active||"strip"===t))switch(a[t]){case"h":if("hsv"===s){switch(r=o.clone(),t){case"horiz":r[a.vert](100);break;case"vert":r[a.horiz](100);break;case"strip":r.setHSpace("hsl")}l=r.toHsl()}else l="strip"===t?{s:r.s,l:r.l}:{s:100,l:r.l};n.raninbowGradient(e,l);break;case"s":"hsv"===s?"vert"===t?l=[o.clone().a(0).s(0).toCSS("rgba"),o.clone().a(1).s(0).toCSS("rgba")]:"strip"===t?l=[o.clone().s(100).toCSS("hsl"),o.clone().s(0).toCSS("hsl")]:"horiz"===t&&(l=["#fff","hsl("+r.h+",100%,50%)"]):l="vert"===t&&"h"===i.options.controls.horiz?["hsla(0, 0%, "+r.l+"%, 0)","hsla(0, 0%, "+r.l+"%, 1)"]:["hsl("+r.h+",0%,50%)","hsl("+r.h+",100%,50%)"],n.gradient(e,l);break;case"l":l="strip"===t?["hsl("+r.h+",100%,100%)","hsl("+r.h+", "+r.s+"%,50%)","hsl("+r.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],n.gradient(e,l);break;case"v":l="strip"===t?[o.clone().v(100).toCSS(),o.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],n.gradient(e,l)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_addInputListeners:function(e){var t=this,l=100,i=function(l){var i=new Color(e.val()),o=e.val().replace(/^#/,"");if(e.removeClass("iris-error"),i.error)""!==o&&e.addClass("iris-error");else if(i.toString()!==t._color.toString())if("keyup"===l.type){if(o.match(/^[0-9a-fA-F]{3}$/))return;t._setColor(o),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:Color(o).toString()}).removeClass("fl-color-picker-empty"),t._currentElement.val(o).trigger("change")}else if("paste"===l.type)return o=l.originalEvent.clipboardData.getData("text").replace(/^#/,""),hex=Color(o).toString(),t._setColor(o),e.val(hex),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:hex}).removeClass("fl-color-picker-empty"),t._currentElement.val(o).trigger("change"),!1};e.on("change",i).on("keyup",t._debounce(i,l))},_initControls:function(){var t=this,l=t.controls,i=l.square,o=t.options.controls,s=t._scale[o.strip];l.stripSlider.slider({orientation:"horizontal",max:s,slide:function(e,l){t.active="strip","h"===o.strip&&(l.value=s-l.value),t._color[o.strip](l.value),t._change.apply(t,arguments)}}),l.squareDrag.draggable({containment:l.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(e,l){t._squareDrag(e,l)},start:function(){i.addClass("iris-dragging"),e(this).addClass("ui-state-focus")},stop:function(){i.removeClass("iris-dragging"),e(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(l){var i="ui-state-focus";l.preventDefault(),"mousedown"===l.type?(t.picker.find("."+i).removeClass(i).blur(),e(this).addClass(i).focus()):e(this).removeClass(i)}).on("keydown",function(e){var i=l.square,o=l.squareDrag,s=o.position(),r=2;switch(e.altKey&&(r*=10),e.keyCode){case 37:s.left-=r;break;case 38:s.top-=r;break;case 39:s.left+=r;break;case 40:s.top+=r;break;default:return!0}s.left=Math.max(0,Math.min(s.left,i.width())),s.top=Math.max(0,Math.min(s.top,i.height())),o.css(s),t._squareDrag(e,{position:s}),e.preventDefault()}),i.mousedown(function(l){var i,o;1===l.which&&e(l.target).is("div")&&(i=t.controls.square.offset(),o={top:l.pageY-i.top,left:l.pageX-i.left},l.preventDefault(),t._squareDrag(l,{position:o}),l.target=t.controls.squareDrag.get(0),t.controls.squareDrag.css(o).trigger(l))})},_squareDrag:function(e,t){var l=this,i=l.options.controls,o=l._squareDimensions(),s=Math.round((o.h-t.position.top)/o.h*l._scale[i.vert]),r=l._scale[i.horiz]-Math.round((o.w-t.position.left)/o.w*l._scale[i.horiz]);l._color[i.horiz](r)[i.vert](s),l.active="square",l._change.apply(l,arguments)},_setColor:function(e){var t,l,i=this,o=i.options.color;i.options.color=e,e=""+e,t=e.replace(/^#/,""),l=new Color(e).setHSpace(i.options.mode),l.error?i.options.color=o:(i._color=l,i.options.color=i._color.toString(),i.active="external",i._change())},_squareDimensions:function(e){var l,i,o=this.controls.square;return e!==t&&o.data("dimensions")?o.data("dimensions"):(i=this.controls.squareDrag,l={w:o.width(),h:o.height()},o.data("dimensions",l),l)},_isNonHueControl:function(e,t){return"square"===e&&"h"===this.options.controls.strip?!0:"external"===t||"h"===t&&"strip"===e?!1:!0},_change:function(){var t=this,l=t.controls,i=t._getHSpaceColor(),o=["square","strip"],s=t.options.controls,r=s[t.active]||"external",n=t.hue;"strip"===t.active?o=[]:"external"!==t.active&&o.pop(),e.each(o,function(e,o){var r,n,a;if(o!==t.active)switch(o){case"strip":r="h"===s.strip?t._scale[s.strip]-i[s.strip]:i[s.strip],l.stripSlider.slider("value",r);break;case"square":n=t._squareDimensions(),a={left:i[s.horiz]/t._scale[s.horiz]*n.w,top:n.h-i[s.vert]/t._scale[s.vert]*n.h},t.controls.squareDrag.css(a)}}),i.h!==n&&t._isNonHueControl(t.active,r)&&t._color.h(n),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"),this._currentElement.trigger("change")))),t._paint(),t._inited=!0,t.active=!1},_debounce:function(e,t,l){var i,o;return function(){var s,r,n=this,a=arguments;return s=function(){i=null,l||(o=e.apply(n,a))},r=l&&!i,clearTimeout(i),i=setTimeout(s,t),r&&(o=e.apply(n,a)),o}}}}(jQuery),function(e,t){var l=function(e,t){return this instanceof l?this._init(e,t):new l(e,t)};l.fn=l.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 l="noop";switch(typeof e){case"object":return e.a!==t&&this.a(e.a),l=e.r!==t?"fromRgb":e.l!==t?"fromHsl":e.v!==t?"fromHsv":l,this[l](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 l(this.toInt()),t=["_alpha","_hSpace","_hsl","_hsv","error"],i=t.length-1;i>=0;i--)e[t[i]]=this[t[i]];return e},setHSpace:function(e){return this._hSpace="hsv"===e?e:"hsl",this},noop:function(){return this},fromCSS:function(e){var t,l=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,e=e.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),e.match(l)&&e.match(/\)$/)){if(t=e.replace(/(\s|%)/g,"").replace(l,"").replace(/,?\);?$/,"").split(","),t.length<3)return this._error();if(4===t.length&&(this.a(parseFloat(t.pop())),this.error))return this;for(var i=t.length-1;i>=0;i--)if(t[i]=parseInt(t[i],10),isNaN(t[i]))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,l){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),l))},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 l,i,o,s,r,n,a,d;return"object"!=typeof e||e.h===t||e.s===t||e.l===t?this._error():(this._hsl=e,this._hSpace="hsl",n=e.h/360,a=e.s/100,d=e.l/100,0===a?l=i=o=d:(s=.5>d?d*(1+a):d+a-d*a,r=2*d-s,l=this.hue2rgb(r,s,n+1/3),i=this.hue2rgb(r,s,n),o=this.hue2rgb(r,s,n-1/3)),this.fromRgb({r:255*l,g:255*i,b:255*o},!0))},fromHsv:function(e){var l,i,o,s,r,n,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",l=e.h/360,i=e.s/100,o=e.v/100,a=Math.floor(6*l),d=6*l-a,u=o*(1-i),c=o*(1-d*i),h=o*(1-(1-d)*i),a%6){case 0:s=o,r=h,n=u;break;case 1:s=c,r=o,n=u;break;case 2:s=u,r=o,n=h;break;case 3:s=u,r=c,n=o;break;case 4:s=h,r=u,n=o;break;case 5:s=o,r=u,n=c}return this.fromRgb({r:255*s,g:255*r,b:255*n},!0)},fromInt:function(e,l){return this._color=parseInt(e,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),l===t&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,l){return 0>l&&(l+=1),l>1&&(l-=1),1/6>l?e+6*(t-e)*l:.5>l?t:2/3>l?e+(t-e)*(2/3-l)*6:e},toString:function(){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 l=this.toRgb();return 1>t?"rgba( "+l.r+", "+l.g+", "+l.b+", "+t+" )":"rgb( "+l.r+", "+l.g+", "+l.b+" )";case"hsl":case"hsla":var i=this.toHsl();return 1>t?"hsla( "+i.h+", "+i.s+"%, "+i.l+"%, "+t+" )":"hsl( "+i.h+", "+i.s+"%, "+i.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,l=this.toRgb(),i=l.r/255,o=l.g/255,s=l.b/255,r=Math.max(i,o,s),n=Math.min(i,o,s),a=(r+n)/2;if(r===n)e=t=0;else{var d=r-n;switch(t=a>.5?d/(2-r-n):d/(r+n),r){case i:e=(o-s)/d+(s>o?6:0);break;case o:e=(s-i)/d+2;break;case s:e=(i-o)/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,l=this.toRgb(),i=l.r/255,o=l.g/255,s=l.b/255,r=Math.max(i,o,s),n=Math.min(i,o,s),a=r,d=r-n;if(t=0===r?0:d/r,r===n)e=t=0;else{switch(r){case i:e=(o-s)/d+(s>o?6:0);break;case o:e=(s-i)/d+2;break;case s:e=(i-o)/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 l))throw"getDistanceLuminosityFrom requires a Color object";var t=this.toLuminosity(),i=e.toLuminosity();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)},getMaxContrastColor:function(){var e=this.toLuminosity(),t=e>=.5?"000000":"ffffff";return new l(t)},getReadableContrastingColor:function(e,i){if(!(e instanceof l))return this;var o=i===t?5:i,s=e.getDistanceLuminosityFrom(this),r=e.getMaxContrastColor(),n=r.getDistanceLuminosityFrom(e);if(o>=n)return r;if(s>=o)return this;for(var a=0===r.toInt()?-1:1;o>s&&(this.l(a,!0),s=this.getDistanceLuminosityFrom(e),0!==this._color&&16777215!==this._color););return this},a:function(e){if(e===t)return this._alpha;var l=parseFloat(e);return isNaN(l)?this._error():(this._alpha=l,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 l=i[e];return function(i,o){var s=this._spaceFunc("to",l.space);return i===t?s[e]:(o===!0&&(i=s[e]+i),l.mod&&(i%=l.mod),l.range&&(i=i<l.range[0]?l.range[0]:i>l.range[1]?l.range[1]:i),s[e]=i,this._spaceFunc("from",l.space,s))}},_spaceFunc:function(e,t,l){var i=t||this._hSpace,o=e+i.charAt(0).toUpperCase()+i.substr(1);return this[o](l)}};var i={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 o in i)i.hasOwnProperty(o)&&(l.fn[o]=l.fn._partial(o));"object"==typeof exports?module.exports=l:e.Color=l}(this),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({action:"render_icon_selector"},FLIconSelector._getContentComplete)):FLIconSelector._lightbox.open(),FLIconSelector._lightbox.on("icon-selected",function(t,l){FLIconSelector._lightbox.off("icon-selected"),FLIconSelector._lightbox.close(),e(l)})},_render:function(){FLIconSelector._lightbox=new FLLightbox({className:"fl-icon-selector"}),FLIconSelector._rendered=!0},_getContentComplete:function(t){var l=JSON.parse(t);FLIconSelector._content=l.html,FLIconSelector._lightbox.setContent(l.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(),l=e(".fl-icons-filter-text").val();"all"==t?e(".fl-icons-section").show():(e(".fl-icons-section").hide(),e(".fl-"+t).show()),FLIconSelector._filterText=l,""!==l?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){FLLightbox=function(e){this._init(e),this._render(),this._bind()},FLLightbox.closeParent=function(t){var l=e(t).closest(".fl-lightbox-wrap").attr("data-instance-id");FLLightbox._instances[l].close()},FLLightbox._instances={},FLLightbox.prototype={_id:null,_node:null,_visible:!1,_resizeTimer:null,_draggable:!1,_defaults:{className:"",destroyOnClose:!1},open:function(e){this._node.show(),this._visible=!0,"undefined"!=typeof e?this.setContent(e):this._resize(),this.trigger("open")},close:function(){this._node.hide(),this._visible=!1,this.trigger("close"),this._defaults.destroyOnClose&&this.destroy()},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){this._node.off(e)},trigger:function(e,t){this._node.trigger(e,t)},draggable:function(e){var t=this._node.find(".fl-lightbox-mask"),l=this._node.find(".fl-lightbox");e="undefined"==typeof e?!1:e,this._draggable&&l.draggable("destroy"),e?(this._unbind(),this._draggable=!0,t.hide(),l.draggable({cursor:"move",handle:e.handle||""})):(t.show(),this._bind(),this._draggable=!1),this._resize()},destroy:function(){e(window).off("resize.fl-lightbox-"+this._id),this._node.empty(),this._node.remove(),FLLightbox._instances[this._id]="undefined";try{delete FLLightbox._instances[this._id]}catch(t){}},_init:function(t){var l=0,i=null;for(i in FLLightbox._instances)l++;this._defaults=e.extend({},this._defaults,t),this._id=(new Date).getTime()+l,FLLightbox._instances[this._id]=this},_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,e.proxy(this._delayedResize,this))},_unbind:function(){e(window).off("resize.fl-lightbox-"+this._id)},_delayedResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(e.proxy(this._resize,this),250)},_resize:function(){if(this._visible){var t=this._node.find(".fl-lightbox"),l=t.height(),i=t.width(),o=e(window),s=o.height(),r=o.width(),n="0px",a=(r-i)/2-30+"px";t.css({margin:"0px",top:"auto",left:"auto"}),s-80>l&&(n=(s-l)/2-40+"px"),this._draggable?(t.css("top",n),t.css("left",FLBuilderConfig.isRtl?"-"+a:a)):(t.css("margin-top",n),t.css("margin-left","auto"),t.css("margin-right","auto"))}},_onKeypress:function(e){27==e.which&&this._visible&&this.close()}}}(jQuery),function(e){FLStyleSheet=function(){},FLStyleSheet.prototype={_sheet:null,_sheetElement:null,updateRule:function(e,t,l){this._createSheet();for(var i=this._sheet.cssRules?this._sheet.cssRules:this._sheet.rules,o=null,s=0;s<i.length;s++)i[s].selectorText.toLowerCase()==e.toLowerCase()&&(o=i[s]);if(o)if("object"==typeof t)for(s in t)o.style[this._toCamelCase(s)]=t[s];else o.style[this._toCamelCase(t)]=l;else this.addRule(e,t,l)},addRule:function(e,t,l){this._createSheet();var i="",o="";if("object"==typeof t)for(o in t)i+=o+":"+t[o]+";";else i=t+":"+l+";";this._sheet.insertRule?this._sheet.insertRule(e+" { "+i+" }",this._sheet.cssRules.length):this._sheet.addRule(e,i)},remove:function(){this._sheetElement&&(this._sheetElement.remove(),this._sheetElement=null),this._sheet&&(this._sheet=null)},_createSheet:function(){this._sheet||(this._sheetElement=e('<style type="text/css"></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);
1
  !function(e){FLBuilderAJAXLayout=function(t,l){this._data=e.extend({},this._defaults,"string"==typeof t?JSON.parse(t):t),this._callback=l,this._post=e("#fl-post-id").val(),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)))):(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()},_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>"),l="fl-row",i=this._data.scriptsStyles,o="";this._data.partial&&(l="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),t.find("> *").each(function(){e(this).hasClass(l)||(o=e(this).remove(),i+=o[0].outerHTML)}),""!==i&&(i=this._data.partial?'<div class="fl-builder-node-scripts-styles" data-node="'+this._data.nodeId+'">'+i+"<div>":'<div class="fl-builder-node-scripts-styles">'+i+"<div>"),this._data.html=t.html(),this._data.scriptsStyles=i}},_addNewHTML:function(){var e;this._data.partial?this._data.nodeParent?(e=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.find(".fl-module"),0===e.length||e.length==this._data.nodePosition?this._data.nodeParent.append(this._data.html):e.eq(this._data.nodePosition).before(this._data.html)):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.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 l=e("<div>"+t+"</div>"),i="",o=null,s="",r=null,n=window.location,a=n.protocol+"//"+n.hostname+(n.port?":"+n.port:"");return l.find("script").each(function(){i=e(this).attr("src"),"undefined"!=typeof i&&(i=i.replace(a,""),o=e('script[src*="'+i+'"]'),o.length>0&&e(this).remove())}),l.find("link").each(function(){s=e(this).attr("href"),"undefined"!=typeof s&&(s=s.replace(a,""),r=e('link[href*="'+s+'"]'),r.length>0&&e(this).remove())}),l.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._initSortables(),FLBuilder._resizeLayout(),FLBuilder._initMediaElements(),FLBuilderLayout.init(),this._body.height("auto")}}}(jQuery),function(e){FLBuilderPreview=function(t){this.type=t.type,"undefined"!=t.state&&t.state?this.state=t.state:this._saveState(),"undefined"!=t.layout&&t.layout?FLBuilder._renderLayout(t.layout,e.proxy(this._init,this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.prototype={type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_timeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=e(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),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"),l=FLBuilder._getSettings(t);return JSON.stringify(this._savedSettings)!=JSON.stringify(l)},_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)})},updateCSSRule:function(e,t,l){this._styleSheet||(this._styleSheet=new FLStyleSheet),this._styleSheet.updateRule(e,t,l)},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),l=t>>16&255,i=t>>8&255,o=255&t;return[l,i,o]},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_saveState:function(){var t=e("#fl-post-id").val(),l=e('link[href*="/cache/'+t+'"]').attr("href"),i=e('script[src*="/cache/'+t+'"]').attr("src"),o=e(FLBuilder._contentClass).html();this.state={css:l,js:i,html:o}},preview:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=t.attr("data-node"),i=FLBuilder._getSettings(t);this._cancelPreview(),this._xhr=FLBuilder.ajax({action:"render_layout",node_id:l,node_preview:i},e.proxy(this._renderPreview,this))},delayPreview:function(t){var l="undefined"==typeof t?[]:e(t.target).closest("tr").find("th"),i=e(".fl-builder-widget-settings .fl-builder-settings-title"),o=e(".fl-builder-settings .fl-lightbox-header"),s=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.gif",r=e('<img class="fl-builder-preview-loader" src="'+s+'" />');e(".fl-builder-preview-loader").remove(),l.length>0?l.append(r):i.length>0?i.append(r):o.length>0&&o.append(r),this.delay(1e3,e.proxy(this.preview,this))},_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._initElementsAndClasses(),e(".fl-builder-preview-loader").remove(),e(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){this._cancelDelay(),this._cancelPreview(),this._styleSheet&&this._styleSheet.remove(),this._settingsHaveChanged()&&FLBuilder._renderLayout(this.state)},clear:function(){this._cancelDelay(),this._cancelPreview(),this._styleSheet&&(this._styleSheet.remove(),this._styleSheet=null)},_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 l=this.elements.textColor.val(),i=this.elements.linkColor.val(),o=this.elements.hoverColor.val(),s=this.elements.headingColor.val();i=""===i?l:i,o=""===o?l:o,s=""===s?l:s,this.delay(100,e.proxy(function(){""===l?this.updateCSSRule(this.classes.node,"color","inherit"):this.updateCSSRule(this.classes.node,"color","#"+l),""===i?this.updateCSSRule(this.classes.node+" a","color","inherit"):this.updateCSSRule(this.classes.node+" a","color","#"+i),""===o?this.updateCSSRule(this.classes.node+" a:hover","color","inherit"):this.updateCSSRule(this.classes.node+" a:hover","color","#"+o),""===s?(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","#"+s),this.updateCSSRule(this.classes.node+" h2","color","#"+s),this.updateCSSRule(this.classes.node+" h3","color","#"+s),this.updateCSSRule(this.classes.node+" h4","color","#"+s),this.updateCSSRule(this.classes.node+" h5","color","#"+s),this.updateCSSRule(this.classes.node+" h6","color","#"+s),this.updateCSSRule(this.classes.node+" h1 a","color","#"+s),this.updateCSSRule(this.classes.node+" h2 a","color","#"+s),this.updateCSSRule(this.classes.node+" h3 a","color","#"+s),this.updateCSSRule(this.classes.node+" h4 a","color","#"+s),this.updateCSSRule(this.classes.node+" h5 a","color","#"+s),this.updateCSSRule(this.classes.node+" h6 a","color","#"+s))},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]"),bgVideo:e(this.classes.settings+" input[name=bg_video]"),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]"),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.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.elements.bgVideo.val()&&this.preview()):"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 l,i,o;""===this.elements.bgColor.val()||isNaN(this.elements.bgOpacity.val())?this.updateCSSRule(this.classes.content,"background-color","transparent"):(l=this.hexToRgb(this.elements.bgColor.val()),i=this.parseFloat(this.elements.bgOpacity.val())/100,o="rgba("+l.join()+", "+i+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",o)},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()})},_bgSlideshowChange:function(t){var l=this.elements,i=l.bgSlideshowSource.val(),o=l.bgSlideshowPhotos.val(),s=l.bgSlideshowFeedUrl.val(),r=l.bgSlideshowSpeed.val(),n=l.bgSlideshowTransSpeed.val();("wordpress"!=i||""!==o)&&("smugmug"!=i||""!==s)&&(isNaN(parseInt(r))||isNaN(parseInt(n))||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 l,i,o;""===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")):(l=this.hexToRgb(this.elements.bgOverlayColor.val()),i=this.parseFloat(this.elements.bgOverlayOpacity.val())/100,o="rgba("+l.join()+", "+i+")",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",o)},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]"),borderTopWidth:e(this.classes.settings+" input[name=border_top]"),borderBottomWidth:e(this.classes.settings+" input[name=border_bottom]"),borderLeftWidth:e(this.classes.settings+" input[name=border_left]"),borderRightWidth:e(this.classes.settings+" input[name=border_right]")}),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)),this.elements.borderTopWidth.on("keyup",e.proxy(this._borderWidthChange,this)),this.elements.borderBottomWidth.on("keyup",e.proxy(this._borderWidthChange,this)),this.elements.borderLeftWidth.on("keyup",e.proxy(this._borderWidthChange,this)),this.elements.borderRightWidth.on("keyup",e.proxy(this._borderWidthChange,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.borderTopWidth.trigger("keyup")},_borderColorChange:function(t){var l,i,o;""===this.elements.borderColor.val()||isNaN(this.elements.borderOpacity.val())?this.updateCSSRule(this.classes.content,"border-color","transparent"):(l=this.hexToRgb(this.elements.borderColor.val()),i=parseInt(this.elements.borderOpacity.val())/100,o="rgba("+l.join()+", "+i+")",this.delay(100,e.proxy(function(){this.updateCSSRule(this.classes.content,"border-color",o)},this)))},_borderOpacityChange:function(e){this.elements.borderColor.trigger("change")},_getBorderWidths:function(e){var t=this.elements.borderTopWidth.val(),l=this.elements.borderBottomWidth.val(),i=this.elements.borderLeftWidth.val(),o=this.elements.borderRightWidth.val();return""===t&&(t=this.elements.borderTopWidth.attr("placeholder")),""===l&&(l=this.elements.borderBottomWidth.attr("placeholder")),""===i&&(i=this.elements.borderLeftWidth.attr("placeholder")),""===o&&(o=this.elements.borderRightWidth.attr("placeholder")),{top:this.parseFloat(t),bottom:this.parseFloat(l),left:this.parseFloat(i),right:this.parseFloat(o)}},_borderWidthChange:function(e){var t=this._getBorderWidths();this.elements.borderColor.trigger("change"),this.updateCSSRule(this.classes.content,{"border-top-width":t.top+"px","border-bottom-width":t.bottom+"px","border-left-width":t.left+"px","border-right-width":t.right+"px"}),this._positionAbsoluteBgs()},_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},_initMargins:function(){e.extend(this.elements,{marginTop:e(this.classes.settings+" input[name=margin_top]"),marginBottom:e(this.classes.settings+" input[name=margin_bottom]"),marginLeft:e(this.classes.settings+" input[name=margin_left]"),marginRight:e(this.classes.settings+" input[name=margin_right]")}),this.elements.marginTop.on("keyup",e.proxy(this._marginChange,this)),this.elements.marginBottom.on("keyup",e.proxy(this._marginChange,this)),this.elements.marginLeft.on("keyup",e.proxy(this._marginChange,this)),this.elements.marginRight.on("keyup",e.proxy(this._marginChange,this))},_getMargins:function(e){var t=this.elements.marginTop.val(),l=this.elements.marginBottom.val(),i=this.elements.marginLeft.val(),o=this.elements.marginRight.val();return""===t&&(t=this.elements.marginTop.attr("placeholder")),""===l&&(l=this.elements.marginBottom.attr("placeholder")),""===i&&(i=this.elements.marginLeft.attr("placeholder")),""===o&&(o=this.elements.marginRight.attr("placeholder")),{top:this.parseFloat(t),bottom:this.parseFloat(l),left:this.parseFloat(i),right:this.parseFloat(o)}},_marginChange:function(e){var t=this._getMargins();this.updateCSSRule(this.classes.content,{"margin-top":t.top+"px","margin-bottom":t.bottom+"px","margin-left":t.left+"px","margin-right":t.right+"px"}),this._positionAbsoluteBgs()},_initPadding:function(){e.extend(this.elements,{paddingTop:e(this.classes.settings+" input[name=padding_top]"),paddingBottom:e(this.classes.settings+" input[name=padding_bottom]"),paddingLeft:e(this.classes.settings+" input[name=padding_left]"),paddingRight:e(this.classes.settings+" input[name=padding_right]")}),this.elements.paddingTop.on("keyup",e.proxy(this._paddingChange,this)),this.elements.paddingBottom.on("keyup",e.proxy(this._paddingChange,this)),this.elements.paddingLeft.on("keyup",e.proxy(this._paddingChange,this)),this.elements.paddingRight.on("keyup",e.proxy(this._paddingChange,this))},_getPadding:function(e){var t=this.elements.paddingTop.val(),l=this.elements.paddingBottom.val(),i=this.elements.paddingLeft.val(),o=this.elements.paddingRight.val();return""===t&&(t=this.elements.paddingTop.attr("placeholder")),""===l&&(l=this.elements.paddingBottom.attr("placeholder")),""===i&&(i=this.elements.paddingLeft.attr("placeholder")),""===o&&(o=this.elements.paddingRight.attr("placeholder")),{top:this.parseFloat(t),bottom:this.parseFloat(l),left:this.parseFloat(i),right:this.parseFloat(o)}},_paddingChange:function(e){var t=this._getPadding();this.updateCSSRule(this.classes.content,{"padding-top":t.top+"px","padding-bottom":t.bottom+"px","padding-left":t.left+"px","padding-right":t.right+"px"}),this._positionAbsoluteBgs()},_positionAbsoluteBgs:function(){var e=this.elements.node.find(".fl-bg-slideshow"),t=this.elements.node.find(".fl-bg-video"),l=null,i=null;(e.length>0||t.length>0)&&(l=this._getMargins(),i=this._getBorderWidths(),e.length>0&&(this.updateCSSRule(this.classes.node+" .fl-bg-slideshow",{top:l.top+i.top+"px",bottom:l.bottom+i.bottom+"px",left:l.left+i.left+"px",right:l.right+i.right+"px"}),FLBuilder._resizeLayout()),t.length>0&&this.updateCSSRule(this.classes.node+" .fl-bg-video",{top:l.top+i.top+"px",bottom:l.bottom+i.bottom+"px",left:l.left+i.left+"px",right:l.right+i.right+"px"}))},_initRow:function(){e.extend(this.elements,{width:e(this.classes.settings+" select[name=width]"),height:e(this.classes.settings+" select[name=full_height]"),contentWidth:e(this.classes.settings+" select[name=content_width]")}),this.elements.width.on("change",e.proxy(this._rowWidthChange,this)),this.elements.height.on("change",e.proxy(this._rowHeightChange,this)),this.elements.contentWidth.on("change",e.proxy(this._rowContentWidthChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeBorder(),this._initNodeClassName(),this._initMargins(),this._initPadding()},_rowWidthChange:function(e){var t=this.elements.node;"full"==this.elements.width.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"))},_rowHeightChange:function(e){var t=this.elements.node;"full"==this.elements.height.val()?t.addClass("fl-row-full-height"):t.removeClass("fl-row-full-height")},_rowContentWidthChange:function(e){var t=this.elements.content.find(".fl-row-content");"full"==this.elements.contentWidth.val()?(t.removeClass("fl-row-fixed-width"),t.addClass("fl-row-full-width")):(t.removeClass("fl-row-full-width"),t.addClass("fl-row-fixed-width"))},_initColumn:function(){e.extend(this.elements,{size:e(this.classes.settings+" input[name=size]"),columnHeight:e(this.classes.settings+" select[name=equal_height]")}),this.elements.size.on("keyup",e.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",e.proxy(this._colHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeBorder(),this._initNodeClassName(),this._initMargins(),this._initPadding()},_colSizeChange:function(){var t=10,l=100-t,i=parseFloat(this.elements.size.val()),o=this.elements.node.prev(".fl-col"),s=this.elements.node.next(".fl-col"),r=0===s.length?o:s,n=this.elements.node.siblings(".fl-col"),a=0;0===n.length||isNaN(i)||(n.each(function(){e(this).data("node")!=r.data("node")&&(l-=parseFloat(e(this)[0].style.width),a+=parseFloat(e(this)[0].style.width))}),t>i&&(i=t),i>l&&(i=l),r.css("width",100-a-i+"%"),this.elements.node.css("width",i+"%"))},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");"yes"==this.elements.columnHeight.val()?e.addClass("fl-col-group-equal-height"):e.removeClass("fl-col-group-equal-height")},_initModule:function(){this._initNodeClassName(),this._initMargins()},_initDefaultFieldPreviews:function(){for(var e=this.elements.settings.find(".fl-field"),t=null,l=null,i=0;i<e.length;i++)t=e.eq(i),l=t.data("preview"),"refresh"==l.type&&this._initFieldRefreshPreview(t),"text"==l.type&&this._initFieldTextPreview(t),"css"==l.type&&this._initFieldCSSPreview(t),"widget"==l.type&&this._initFieldWidgetPreview(t),"font"==l.type&&this._initFieldFontPreview(t)},_initFieldRefreshPreview:function(t){var l=t.data("type"),i=t.data("preview"),o=e.proxy(this.delayPreview,this);switch(l){case"text":t.find("input[type=text]").on("keyup",o);break;case"textarea":t.find("textarea").on("keyup",o);break;case"select":t.find("select").on("change",o);break;case"color":t.find(".fl-color-picker-value").on("change",o);break;case"photo":t.find("select").on("change",o);break;case"multiple-photos":t.find("input").on("change",o);break;case"photo-sizes":t.find("select").on("change",o);break;case"video":t.find("input").on("change",o);break;case"multiple-audios":t.find("input").on("change",o);break;case"icon":t.find("input").on("change",o);break;case"form":t.delegate("input","change",o);break;case"editor":this._addTextEditorCallback(t,i);break;case"code":t.find("textarea").on("change",o);break;case"post-type":t.find("select").on("change",o);break;case"suggest":t.find(".as-values").on("change",o)}},_initFieldTextPreview:function(t){var l=t.data("type"),i=t.data("preview"),o=e.proxy(this._previewText,this,i);switch(l){case"text":t.find("input[type=text]").on("keyup",o);break;case"textarea":t.find("textarea").on("keyup",o);break;case"code":t.find("textarea").on("change",o);break;case"editor":this._addTextEditorCallback(t,i)}},_previewText:function(t,l){var i=this.elements.node.find(t.selector),o=e("<div>"+e(l.target).val()+"</div>");i.length>0&&(o.find("script").remove(),i.html(o.html()))},_previewTextEditor:function(t,l,i){var o=this.elements.node.find(t.selector),s="undefined"!=typeof tinyMCE?tinyMCE.get(l):null,r=e("#"+l),n="";o.length>0&&(n=e(s&&"none"==r.css("display")?"<div>"+s.getContent()+"</div>":"undefined"==typeof switchEditors||"undefined"==typeof switchEditors.wpautop?"<div>"+r.val()+"</div>":"<div>"+switchEditors.wpautop(r.val())+"</div>"),n.find("script").remove(),o.html(n.html()))},_addTextEditorCallback:function(t,l){var i=t.find("textarea.wp-editor-area").attr("id"),o=null;if("refresh"==l.type)o=e.proxy(this.delayPreview,this);else{if("text"!=l.type)return;o=e.proxy(this._previewTextEditor,this,l,i)}e("#"+i).on("keyup",o),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(i),editor.on("change",o),editor.on("keyup",o))},_initFieldFontPreview:function(t){var l=t.data("type"),i=t.data("preview");i.id=t.attr("id");var o=e.proxy(this._previewFont,this,i);"font"==l&&t.find(".fl-font-field").on("change","select",o)},_previewFont:function(t,l){var i=e(l.delegateTarget),o=i.find(".fl-font-field-font"),s=e(o).find(":selected"),r=s.parent().attr("label"),n=i.find(".fl-font-field-weight"),a=t.id+"-"+this.nodeId,d=this._getPreviewSelector(this.classes.node,t.selector);"Google"==r&&this._buildFontStylesheet(a,o.val(),n.val()),"Default"==o.val()?(this.updateCSSRule(d,"font-family",""),this.updateCSSRule(d,"font-weight","")):(this.updateCSSRule(d,"font-family",o.val()),this.updateCSSRule(d,"font-weight",n.val()))},_buildFontStylesheet:function(t,l,i){var o="//fonts.googleapis.com/css?family=",s="",r={},n={};r[l]=[i],FLBuilderPreview._fontsList[t]=r,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var t=FLBuilderPreview._fontsList[e];Object.keys(t).forEach(function(e){var l=t[e];n[e]=n[e]||[],l=l.filter(function(t){return n[e].indexOf(t)<0}),n[e]=n[e].concat(l)})}),e.each(n,function(e,t){s+=e+":"+t.join()+"|"}),s=o+s.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",s).appendTo("head"):e("#fl-builder-google-fonts-preview").attr("href",s)},_initFieldCSSPreview:function(e){var t=e.data("preview"),l=null;if("undefined"!=typeof t.rules)for(l in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[l]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(t,l){switch(t.data("type")){case"text":t.find("input[type=text]").on("keyup",e.proxy(this._previewCSS,this,l));break;case"select":t.find("select").on("change",e.proxy(this._previewCSS,this,l));break;case"color":t.find(".fl-color-picker-value").on("change",e.proxy(this._previewColor,this,l))}},_previewCSS:function(t,l){var i=this._getPreviewSelector(this.classes.node,t.selector),o=t.property,s="undefined"==typeof t.unit?"":t.unit,r=e(l.target).val();"%"==s?r=parseInt(r)/100:r+=s,this.updateCSSRule(i,o,r)},_previewColor:function(t,l){var i=this._getPreviewSelector(this.classes.node,t.selector),o=e(l.target).val(),s=""===o?"inherit":"#"+o;this.updateCSSRule(i,t.property,s)},_initFieldWidgetPreview:function(t){var l=e.proxy(this.delayPreview,this);t.find("input").on("keyup",l),t.find("input[type=checkbox]").on("click",l),t.find("textarea").on("keyup",l),t.find("select").on("change",l)},_getPreviewSelector:function(e,t){for(var l="",i=t.split(","),o=0;o<i.length;o++)l+=e+" "+i[o],o!=i.length-1&&(l+=", ");return l}}}(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)},_startSettingsLoading:function(t){var l=e(".fl-builder-settings"),i=t.closest(".fl-builder-service-settings"),o=e(".fl-builder-service-error");
2
  l.append('<div class="fl-builder-loading"></div>'),i.addClass("fl-builder-service-settings-loading"),o.remove()},_finishSettingsLoading:function(){var t=e(".fl-builder-settings"),l=e(".fl-builder-service-settings-loading");t.find(".fl-builder-loading").remove(),l.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this),o=i.closest("tr"),s=i.val();o.siblings("tr.fl-builder-service-account-row").remove(),o.siblings("tr.fl-builder-service-connect-row").remove(),o.siblings("tr.fl-builder-service-field-row").remove(),e(".fl-builder-service-error").remove(),""!==s&&(t._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_settings",node_id:l,service:s},t._serviceChangeComplete))},_serviceChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-select-row");s.after(i.html),t._addAccountDelete(o),t._finishSettingsLoading()},_connectClicked:function(){for(var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-connect-row"),r=i.find(".fl-builder-service-connect-input"),n=null,a=null,d=0,u={action:"connect_service",node_id:l,service:o.val(),fields:{}};d<r.length;d++)n=r.eq(d),a=n.attr("name"),u.fields[a]=n.val();s.hide(),t._startSettingsLoading(o),FLBuilder.ajax(u,t._connectComplete)},_connectComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-select-row"),r=o.find(".fl-builder-service-select"),n=o.find(".fl-builder-service-account-row"),a=o.find(".fl-builder-service-account-select"),d=o.find(".fl-builder-service-connect-row");i.error?(d.show(),0===a.length?r.after('<div class="fl-builder-service-error">'+i.error+"</div>"):a.after('<div class="fl-builder-service-error">'+i.error+"</div>")):(d.remove(),n.remove(),s.after(i.html)),t._addAccountDelete(o),t._finishSettingsLoading()},_accountChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select"),r=i.find(".fl-builder-service-connect-row"),n=i.find("tr.fl-builder-service-field-row"),a=e(".fl-builder-service-error"),d=s.val(),u=null;r.remove(),n.remove(),a.remove(),"add_new_account"==d?u={action:"render_service_settings",node_id:l,service:o.val(),add_new:!0}:""!==d&&(u={action:"render_service_fields",node_id:l,service:o.val(),account:d}),u&&(t._startSettingsLoading(o),FLBuilder.ajax(u,t._accountChangeComplete)),t._addAccountDelete(i)},_accountChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-account-row");s.after(i.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 l=e(this).closest(".fl-builder-service-settings"),i=l.find(".fl-builder-service-select"),o=l.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:i.val(),account:o.val()},t._accountDeleteComplete),t._startSettingsLoading(o))},_accountDeleteComplete:function(){var l=e(".fl-builder-service-settings-loading"),i=l.find(".fl-builder-service-select");t._finishSettingsLoading(),i.trigger("change")},_campaignMonitorClientChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select"),r=e(this),n=i.find(".fl-builder-service-list-select"),a=r.val();0!==n.length&&n.closest("tr").remove(),""!==a&&(t._startSettingsLoading(o),FLBuilder.ajax({action:"render_service_fields",node_id:l,service:o.val(),account:s.val(),client:a},t._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-campaign-monitor-client-select");s.closest("tr").after(i.html),t._finishSettingsLoading()},_mailChimpListChange:function(){var l=e(".fl-builder-settings").data("node"),i=e(this).closest(".fl-builder-service-settings"),o=i.find(".fl-builder-service-select"),s=i.find(".fl-builder-service-account-select"),r=i.find(".fl-builder-service-list-select");e(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==r.val()&&(t._startSettingsLoading(o),FLBuilder.ajax({action:"render_service_fields",node_id:l,service:o.val(),account:s.val(),list_id:r.val()},t._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(l){var i=JSON.parse(l),o=e(".fl-builder-service-settings-loading"),s=o.find(".fl-builder-service-list-select");s.closest("tr").after(i.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()),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-bar",placement:"bottom",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShown:function(){0===e(".fl-template-selector").length?(e(".popover[class*=tour-]").css("visibility","hidden"),FLBuilder._showTemplateSelector()):FLBuilderTour._templateSelectorLoaded()}},{animation:!1,element:"#fl-builder-blocks-rows .fl-builder-blocks-section-title",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilderTour._dimSection("body"),FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._showPanel(),e(".fl-template-selector .fl-builder-settings-cancel").trigger("click"),e("#fl-builder-blocks-rows .fl-builder-blocks-section-title").trigger("click")}},{animation:!1,element:"#fl-builder-blocks-basic .fl-builder-blocks-section-title",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilderTour._dimSection("body"),FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._showPanel(),e("#fl-builder-blocks-basic .fl-builder-blocks-section-title").trigger("click"),e(".fl-row").eq(0).trigger("mouseleave"),e(".fl-module").eq(0).trigger("mouseleave")}},{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-add-content-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.append('<div class="fl-builder-tour-mask"></div>'),t.on("fl-builder.template-selector-loaded",FLBuilderTour._templateSelectorLoaded),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>')},_templateSelectorLoaded:function(){var t=e(".fl-builder-settings-lightbox .fl-lightbox-header"),l=t.height(),i=t.offset().top+75;e(".popover[class*=tour-]").css({top:i+l+"px",visibility:"visible"})}}}(jQuery),function(e){FLBuilder={preview:null,_actionsLightbox:null,_addModuleAfterRowRender:null,_colResizeData:null,_colResizing:!1,_contentClass:!1,_dragEnabled:!1,_dragging:!1,_exitUrl:null,_layout:null,_layoutSettingsCSSCache:null,_layoutSettingsCSSTimeout:null,_lightbox:null,_lightboxScrollbarTimeout:null,_loadedModuleAssets:[],_moduleHelpers:{},_multiplePhotoSelector:null,_newColGroupParent:null,_newColGroupPosition:0,_newModuleParent:null,_newModulePosition:0,_newRowPosition:0,_selectedTemplateId:null,_selectedTemplateType:null,_singlePhotoSelector:null,_singleVideoSelector:null,_multipleAudiosSelector:null,_silentUpdate:!1,_silentUpdateCallbackData:null,_init:function(){FLBuilder._initJQueryReadyFix(),FLBuilder._initGlobalErrorHandling(),FLBuilder._initPostLock(),FLBuilder._initClassNames(),FLBuilder._initMediaUploader(),FLBuilder._initOverflowFix(),FLBuilder._initScrollbars(),FLBuilder._initLightboxes(),FLBuilder._initSortables(),FLBuilder._initCoreTemplateSettings(),FLBuilder._bindEvents(),FLBuilder._bindOverlayEvents(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showTourOrTemplates()},_initJQueryReadyFix:function(){FLBuilderConfig.debug||(jQuery.fn.oldReady=jQuery.fn.ready,jQuery.fn.ready=function(e){return jQuery.fn.oldReady(function(){try{"function"==typeof e&&e()}catch(t){FLBuilder.logError(t)}})})},_initGlobalErrorHandling:function(){FLBuilderConfig.debug||(window.onerror=function(e,t,l,i,o){return FLBuilder.logGlobalError(e,t,l,i,o),!0})},_initPostLock:function(){"undefined"!=typeof wp.heartbeat&&(wp.heartbeat.interval(30),wp.heartbeat.enqueue("fl_builder_post_lock",{post_id:e("#fl-post-id").val()}))},_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},_initMediaUploader:function(){wp.media.model.settings.post.id=e("#fl-post-id").val()},_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"})},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox"}),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_initSortables:function(){var t={appendTo:"body",cursor:"move",cursorAt:{left:25,top:20},distance:1,helper:FLBuilder._blockDragHelper,start:FLBuilder._blockDragStart,sort:FLBuilder._blockDragSort,placeholder:"fl-builder-drop-zone",tolerance:"intersect"},l="",i="";l="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row-content":FLBuilder._contentClass+", "+FLBuilder._contentClass+" .fl-row:not(.fl-node-global) .fl-row-content",i="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row-content, "+FLBuilder._contentClass+" .fl-col-content":FLBuilder._contentClass+", "+FLBuilder._contentClass+" .fl-row:not(.fl-node-global) .fl-row-content, "+FLBuilder._contentClass+" .fl-col:not(.fl-node-global) .fl-col-content",e(".fl-builder-rows").sortable(e.extend({},t,{connectWith:l,items:".fl-builder-block-row",stop:FLBuilder._rowDragStop})),e(".fl-builder-row-templates").sortable(e.extend({},t,{connectWith:FLBuilder._contentClass,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,items:".fl-builder-block-saved-row",stop:FLBuilder._nodeTemplateDragStop})),e(".fl-builder-modules, .fl-builder-widgets").sortable(e.extend({},t,{connectWith:i,items:".fl-builder-block-module",stop:FLBuilder._moduleDragStop})),e(".fl-builder-module-templates").sortable(e.extend({},t,{connectWith:i,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:i,items:".fl-builder-block-saved-module",stop:FLBuilder._nodeTemplateDragStop})),e(FLBuilder._contentClass).sortable(e.extend({},t,{handle:".fl-row-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._rowDragHelper,items:".fl-row",stop:FLBuilder._rowDragStop})),e(FLBuilder._contentClass+" .fl-row-content").sortable(e.extend({},t,{handle:".fl-row-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._rowDragHelper,items:".fl-col-group",stop:FLBuilder._rowDragStop})),e(FLBuilder._contentClass+" .fl-col-content").sortable(e.extend({},t,{connectWith:i,handle:".fl-module-overlay .fl-block-overlay-actions .fl-block-move",helper:FLBuilder._moduleDragHelper,items:".fl-module",stop:FLBuilder._moduleDragStop}))},_bindEvents:function(){e("a").on("click",FLBuilder._preventDefault),e(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),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(".fl-builder-tools-button").on("click",FLBuilder._toolsClicked),e(".fl-builder-done-button").on("click",FLBuilder._doneClicked),e(".fl-builder-add-content-button").on("click",FLBuilder._showPanel),e(".fl-builder-templates-button").on("click",FLBuilder._changeTemplateClicked),e(".fl-builder-buy-button").on("click",FLBuilder._upgradeClicked),e(".fl-builder-upgrade-button").on("click",FLBuilder._upgradeClicked),e(".fl-builder-help-button").on("click",FLBuilder._helpButtonClicked),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-actions .fl-builder-publish-button","click",FLBuilder._publishButtonClicked),e("body").delegate(".fl-builder-save-actions .fl-builder-draft-button","click",FLBuilder._draftButtonClicked),e("body").delegate(".fl-builder-save-actions .fl-builder-discard-button","click",FLBuilder._discardButtonClicked),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-template-category-select","change",FLBuilder._templateCategoryChanged),e("body").delegate(".fl-template-preview","click",FLBuilder._templateClicked),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-help-video-button","click",FLBuilder._watchVideoClicked),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-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._blockDragInit),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-col-overlay","click",FLBuilder._colSettingsClicked),e("body").delegate(".fl-builder-col-settings .fl-builder-settings-save","click",FLBuilder._saveSettings),e("body").delegate(".fl-col-overlay .fl-block-remove","click",FLBuilder._deleteColClicked),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-insert-before","click",FLBuilder._insertColBeforeClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-insert-after","click",FLBuilder._insertColAfterClicked),e("body").delegate(".fl-block-col-submenu .fl-block-col-reset","click",FLBuilder._resetColumnWidths),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-cancel","click",FLBuilder._settingsCancelClicked),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-builder select[name=post_type]","change",FLBuilder._loopBuilderPostTypeChange),e("body").delegate(".fl-select-add-value","change",FLBuilder._textFieldAddValueSelectChange)},_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 l=e(this),i=l.attr("href");t.preventDefault(),FLBuilderConfig.isUserTemplate||(FLBuilder._exitUrl=i.indexOf("?")>-1?i:i+"?fl_builder",FLBuilder._doneClicked())},_warnBeforeUnload:function(){var t=e(".fl-builder-row-settings").length>0,l=e(".fl-builder-col-settings").length>0,i=e(".fl-builder-module-settings").length>0;return t||l||i?FLBuilderStrings.unloadWarning:void 0},_initTipTips:function(){e(".fl-tip").tipTip()},_hideTipTips:function(){e("#tiptip_holder").stop().remove()},_submenuParentClicked:function(t){var l=e(this),i=l.find(".fl-builder-submenu");l.hasClass("fl-builder-submenu-open")?(l.removeClass("fl-builder-submenu-open"),l.removeClass("fl-builder-submenu-right")):(l.offset().left+i.width()>e(window).width()&&l.addClass("fl-builder-submenu-right"),l.addClass("fl-builder-submenu-open")),FLBuilder._hideTipTips(),t.preventDefault(),t.stopPropagation()},_submenuChildClicked:function(t){e(this).closest(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},_submenuMouseenter:function(t){var l=e(this),i=l.data("timeout");"undefined"!=typeof i&&clearTimeout(i)},_submenuMouseleave:function(t){var l=e(this),i=setTimeout(function(){l.closest(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},500);l.data("timeout",i)},_toolsClicked:function(){var e={},t=FLBuilderConfig.lite,l=FLBuilderConfig.enabledTemplates;t||FLBuilderConfig.isUserTemplate||"enabled"!=l&&"user"!=l||(e["save-user-template"]=FLBuilderStrings.saveTemplate,"undefined"!=typeof FLBuilderTemplateSettings&&(e["save-template"]=FLBuilderStrings.saveCoreTemplate)),FLBuilderConfig.isUserTemplate?"undefined"!=typeof window.opener&&window.opener||(e["duplicate-layout"]=FLBuilderStrings.duplicateLayout):e["duplicate-layout"]=FLBuilderStrings.duplicateLayout,e["layout-settings"]=FLBuilderStrings.editLayoutSettings,e["global-settings"]=FLBuilderStrings.editGlobalSettings,FLBuilder._showActionsLightbox({className:"fl-builder-tools-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_doneClicked:function(){FLBuilder._showActionsLightbox({className:"fl-builder-save-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:{publish:FLBuilderStrings.publish,draft:FLBuilderStrings.draft,discard:FLBuilderStrings.discard}})},_upgradeClicked:function(){window.open(FLBuilderConfig.upgradeUrl)},_helpButtonClicked:function(){var e={};FLBuilderConfig.help.tour&&(e["help-tour"]=FLBuilderStrings.takeHelpTour),FLBuilderConfig.help.video&&(e["help-video"]=FLBuilderStrings.watchHelpVideo),FLBuilderConfig.help.knowledge_base&&(e["knowledge-base"]=FLBuilderStrings.viewKnowledgeBase),FLBuilderConfig.help.forums&&(e.forums=FLBuilderStrings.visitForums),FLBuilder._showActionsLightbox({className:"fl-builder-help-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_closePanel:function(){e(".fl-builder-panel").stop(!0,!0).animate({right:"-350px"},500,function(){e(this).hide()}),e(".fl-builder-bar .fl-builder-add-content-button").stop(!0,!0).fadeIn()},_showPanel:function(){e(".fl-builder-bar .fl-builder-add-content-button").stop(!0,!0).fadeOut(),e(".fl-builder-panel").stop(!0,!0).show().animate({right:"0"},500)},_blockSectionTitleClicked:function(){var t=e(this),l=t.parent();l.hasClass("fl-active")?l.removeClass("fl-active"):(e(".fl-builder-blocks-section").removeClass("fl-active"),l.addClass("fl-active")),FLBuilder._initScrollbars()},_publishButtonClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_layout"},FLBuilder._exit),FLBuilder._actionsLightbox.close()},_draftButtonClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_draft"},FLBuilder._exit),FLBuilder._actionsLightbox.close()},_discardButtonClicked:function(){var e=confirm(FLBuilderStrings.discardMessage);e&&(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"clear_draft_layout"},FLBuilder._exit),FLBuilder._actionsLightbox.close())},_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&&window.opener.FLBuilder._updateLayout(),
3
  window.close()):(e=FLBuilder._exitUrl?FLBuilder._exitUrl:e.replace("?fl_builder","").replace("&fl_builder",""),window.location.href=e)},_duplicateLayoutClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"duplicate_post"},FLBuilder._duplicateLayoutComplete)},_duplicateLayoutComplete:function(t){var l=e("#fl-admin-url").val();window.location.href=l+"post.php?post="+t+"&action=edit"},_layoutSettingsClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._showLightbox(),FLBuilder._closePanel(),FLBuilder.ajax({action:"render_layout_settings"},FLBuilder._layoutSettingsLoaded)},_layoutSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.html),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"),l=e(this),i=l.parents("#fl-field-css");i.find(".ace_error").length>0||(t.hasClass("fl-builder-layout-settings")?e("#fl-builder-layout-css").html(l.val()):e("#fl-builder-global-css").html(l.val()),FLBuilder._layoutSettingsCSSTimeout=null)},_saveLayoutSettingsClicked:function(){for(var t=e(this).closest(".fl-builder-settings"),l=t.serializeArray(),i={},o=0;o<l.length;o++)i[l[o].name]=l[o].value;FLBuilder.showAjaxLoader(),FLBuilder._lightbox.close(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_layout_settings",settings:i},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(){FLBuilder._actionsLightbox.close(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_global_settings"},FLBuilder._globalSettingsLoaded)},_globalSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.html),FLBuilder._layoutSettingsInitCSS(),FLBuilder._initSettingsValidation({module_margins:{required:!0,number:!0},row_margins:{required:!0,number:!0},row_padding:{required:!0,number:!0},row_width:{required:!0,number:!0},responsive_breakpoint:{required:!0,number:!0}})},_saveGlobalSettingsClicked:function(){var t=e(this).closest(".fl-builder-settings"),l=t.validate().form(),i=t.serializeArray(),o={},s=0;if(l){for(;s<i.length;s++)o[i[s].name]=i[s].value;FLBuilder.showAjaxLoader(),FLBuilder._layoutSettingsCSSCache=null,FLBuilder.ajax({action:"save_global_settings",settings:o},FLBuilder._updateLayout),FLBuilder._lightbox.close()}},_initTemplateSelector:function(){var t=e(FLBuilder._contentClass).find(".fl-row");0===t.length&&FLBuilder._showTemplateSelector()},_changeTemplateClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._showTemplateSelector()},_showTemplateSelector:function(){FLBuilderConfig.simpleUi||FLBuilderConfig.isUserTemplate||"disabled"!=FLBuilderConfig.enabledTemplates&&(FLBuilderConfig.lite||(FLBuilder._showLightbox(!1),FLBuilder.ajax({action:"render_template_selector"},FLBuilder._templateSelectorLoaded)))},_templateSelectorLoaded:function(t){var l=JSON.parse(t),i=null,o=null;FLBuilder._setLightboxContent(l.html),i=e(".fl-template-category-select"),o=e(".fl-user-template"),("user"==FLBuilderConfig.enabledTemplates||o.length>0)&&(i.val("fl-builder-settings-tab-yours"),e(".fl-builder-settings-tab").removeClass("fl-active"),e("#fl-builder-settings-tab-yours").addClass("fl-active")),0===o.length&&e(".fl-user-templates-message").show(),e("body").trigger("fl-builder.template-selector-loaded")},_templateCategoryChanged:function(){e(".fl-template-selector .fl-builder-settings-tab").hide(),e("#"+e(this).val()).show()},_templateClicked:function(){var t=e(this),l=t.closest(".fl-template-preview").attr("data-id");e(FLBuilder._contentClass).children(".fl-row").length>0?0===l?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate(0,!1,"core")):(FLBuilder._selectedTemplateId=l,FLBuilder._selectedTemplateType="core",FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(l,!1,"core")},_showTemplateActions:function(){FLBuilder._showActionsLightbox({className:"fl-builder-template-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:{"template-replace":FLBuilderStrings.templateReplace,"template-append":FLBuilderStrings.templateAppend}})},_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._lightbox._node.show()},_applyTemplate:function(e,t,l){t="undefined"!=typeof t&&t?"1":"0",l="undefined"==typeof l?"core":l,FLBuilder._lightbox.close(),FLBuilder.showAjaxLoader(),"core"==l?FLBuilder.ajax({action:"apply_template",template_id:e,append:t},FLBuilder._updateLayout):FLBuilder.ajax({action:"apply_user_template",template_id:e,append:t},FLBuilder._updateLayout)},_saveUserTemplateClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._showLightbox(!1),FLBuilder.ajax({action:"render_user_template_settings"},FLBuilder._userTemplateSettingsLoaded)},_userTemplateSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.html),FLBuilder._initSettingsValidation({name:{required:!0}})},_saveUserTemplateSettings:function(){var t=e(this).closest(".fl-builder-settings"),l=t.validate().form(),i=FLBuilder._getSettings(t);l&&(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_user_template",settings:i},FLBuilder._saveUserTemplateSettingsComplete),FLBuilder._lightbox.close())},_saveUserTemplateSettingsComplete:function(){FLBuilder.alert(FLBuilderStrings.templateSaved)},_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 l=e(this).closest(".fl-user-template"),i=l.attr("data-id"),o=e(".fl-user-template[data-id="+i+"]"),s=null;confirm(FLBuilderStrings.deleteTemplate)&&(FLBuilder.ajax({action:"delete_user_template",template_id:i}),o.fadeOut(function(){l=e(this),s=l.closest(".fl-user-template-category"),l.remove(),0===s.find(".fl-user-template").length&&s.remove(),1===e(".fl-user-template").length&&(e(".fl-user-templates").hide(),e(".fl-user-templates-message").show())})),t.stopPropagation()},_initCoreTemplateSettings:function(){"undefined"!=typeof FLBuilderTemplateSettings&&FLBuilderTemplateSettings.init()},_watchVideoClicked:function(){var e=wp.template("fl-video-lightbox");FLBuilder._actionsLightbox.close(),FLBuilder._lightbox.open(e({video:FLBuilderConfig.help.video_embed}))},_viewKnowledgeBaseClicked:function(){FLBuilder._actionsLightbox.close(),window.open(FLBuilderConfig.help.knowledge_base_url)},_visitForumsClicked:function(){FLBuilder._actionsLightbox.close(),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(),0===t.children(".fl-row").length&&(t.addClass("fl-builder-empty"),t.append('<span class="fl-builder-empty-message">'+FLBuilderStrings.emptyMessage+"</span>"),FLBuilder._initSortables()))},_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")})},_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))},_blockDragHelper:function(e,t){var l=t.clone();return t.clone().insertAfter(t),l.addClass("fl-builder-block-drag-helper"),l},_blockDragInit:function(t){var l=e(t.target),i=null,o=0,s="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)";FLBuilder._dragEnabled=!0,l.closest(".fl-module").length>0?i=l.closest(".fl-module"):l.closest(".fl-row").length>0?i=l.closest(".fl-row"):l.hasClass("fl-builder-block-row")||l.hasClass("fl-builder-block-saved-row")?e(".fl-row").each(function(){null===i&&e(this).offset().top-e(window).scrollTop()>0&&(i=e(this))}):(l.hasClass("fl-builder-block-module")||l.hasClass("fl-builder-block-saved-module"))&&e(".fl-module").each(function(){null===i&&e(this).offset().top-e(window).scrollTop()>0&&(i=e(this))}),null!==i?o=i.offset().top-e(window).scrollTop():i=l,e(".fl-builder-empty-message").hide(),e(FLBuilder._contentClass+" .fl-row"+s).addClass("fl-row-highlight"),(i.hasClass("fl-module")||i.hasClass("fl-builder-block-module")||i.hasClass("fl-builder-block-saved-module"))&&e(FLBuilder._contentClass+" .fl-col"+s).addClass("fl-col-highlight"),FLBuilder._disableGlobalRows(),FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays(),o>0&&scrollTo(0,i.offset().top-o)},_blockDragStart:function(t,l){FLBuilder._dragging=!0,e(FLBuilder._contentClass).sortable("refreshPositions"),e(FLBuilder._contentClass+" .fl-row-content").sortable("refreshPositions"),e(FLBuilder._contentClass+" .fl-col-content").sortable("refreshPositions")},_blockDragSort:function(e,t){if("undefined"!=typeof t.placeholder){var l=t.placeholder.parent(),i=FLBuilderStrings.insert;l.hasClass("fl-col-content")?i=t.item.hasClass("fl-builder-block-module")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-builder-block-saved-module")||t.item.hasClass("fl-builder-block-module-template")?t.item.find(".fl-builder-block-title").text():t.item.attr("data-name"):l.hasClass("fl-row-content")?i=t.item.hasClass("fl-builder-block-row")?t.item.find(".fl-builder-block-title").text():FLBuilderStrings.newColumn:l.hasClass("fl-builder-content")&&(i=t.item.hasClass("fl-builder-block-row")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-builder-block-saved-row")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-row")?FLBuilderStrings.row:FLBuilderStrings.newRow),t.placeholder.html(i),t.item.hasClass("fl-node-global")||t.item.hasClass("fl-builder-block-global")?t.placeholder.addClass("fl-builder-drop-zone-global"):t.placeholder.removeClass("fl-builder-drop-zone-global")}},_blockDragStop:function(t,l){var i=l.item.parent(),o=i.offset().top-e(window).scrollTop();i.hasClass("fl-builder-blocks-section-content")&&FLBuilder._showPanel(),FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),e(".fl-builder-empty-message").show(),scrollTo(0,i.offset().top-o)},_blockDragCancel:function(){FLBuilder._dragEnabled&&!FLBuilder._dragging&&(FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),e(".fl-builder-empty-message").show())},_removeAllOverlays:function(){FLBuilder._removeRowOverlays(),FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),FLBuilder._hideTipTips()},_appendOverlay:function(e,t){var l=0,i=null,o=e.hasClass("fl-row"),s=o?e.find("> .fl-row-content-wrap"):e.find("> .fl-node-content"),r={top:parseInt(s.css("margin-top"),10),bottom:parseInt(s.css("margin-bottom"),10)};e.append(t),e.addClass("fl-block-overlay-active"),FLBuilder._initTipTips(),i=e.find("> .fl-block-overlay"),r.top<0&&(l=parseInt(i.css("top"),10),l=isNaN(l)?0:l,i.css("top",r.top+l+"px")),r.bottom<0&&(l=parseInt(i.css("bottom"),10),l=isNaN(l)?0:l,i.css("bottom",r.bottom+l+"px")),o&&i.offset().top<43&&i.addClass("fl-row-overlay-header-bottom")},_highlightEmptyCols:function(){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",l=e(FLBuilder._contentClass+" .fl-row"+t),i=e(FLBuilder._contentClass+" .fl-col"+t);l.removeClass("fl-row-highlight"),i.removeClass("fl-col-highlight"),i.each(function(){var t=e(this);0===t.find(".fl-module").length&&t.addClass("fl-col-highlight")})},_removeRowOverlays:function(){e(".fl-row").removeClass("fl-block-overlay-active"),e(".fl-row-overlay").remove(),e(".fl-module").removeClass("fl-module-adjust-height")},_disableGlobalRows:function(){if("row"!=FLBuilderConfig.userTemplateType){var t=e(".fl-row.fl-node-global");t.addClass("fl-node-disabled"),t.append('<div class="fl-node-disabled-overlay"></div>')}},_enableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&(e(".fl-node-disabled").removeClass("fl-node-disabled"),e(".fl-node-disabled-overlay").remove())},_rowMouseenter:function(){var t=e(this),l=wp.template("fl-row-overlay");t.hasClass("fl-block-overlay-active")||(FLBuilder._appendOverlay(t,l({global:t.hasClass("fl-node-global"),node:t.attr("data-node")})),t.find(".fl-module").each(function(){e(this).outerHeight(!0)<20&&e(this).addClass("fl-module-adjust-height")}))},_rowMouseleave:function(t){var l=e(t.toElement)||e(t.relatedTarget),i=l.hasClass("fl-row-overlay"),o=l.closest(".fl-row-overlay").length>0,s=l.is("#tiptip_holder"),r=l.closest("#tiptip_holder").length>0;i||o||s||r||FLBuilder._removeRowOverlays()},_rowDragHelper:function(){return e('<div class="fl-builder-block-drag-helper" style="width: 190px; height: 45px;">'+FLBuilderStrings.row+"</div>")},_rowDragStop:function(t,l){var i=l.item,o=i.parent();return FLBuilder._blockDragStop(t,l),o.hasClass("fl-builder-rows")?void i.remove():void(i.hasClass("fl-builder-block")?(o.hasClass("fl-row-content")?FLBuilder._addColGroup(i.closest(".fl-row").attr("data-node"),i.attr("data-cols"),o.children(".fl-col-group, .fl-builder-block").index(i)):FLBuilder._addRow(i.attr("data-cols"),o.children(".fl-row, .fl-builder-block").index(i)),i.remove(),FLBuilder._showPanel(),e(".fl-builder-modules").siblings(".fl-builder-blocks-section-title").eq(0).trigger("click")):FLBuilder._reorderRow(i.attr("data-node"),o.children(".fl-row").index(i)))},_reorderRow:function(e,t){FLBuilder.ajax({action:"reorder_node",node_id:e,position:t,silent:!0})},_addRow:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder._newRowPosition=t,FLBuilder.ajax({action:"render_new_row",cols:e,position:t},FLBuilder._addRowComplete)},_addRowComplete:function(t){var l=JSON.parse(t),i=e(FLBuilder._contentClass),o=e(l.html).data("node");l.nodeParent=i,l.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(l,function(){null!==FLBuilder._addModuleAfterRowRender&&(FLBuilder._addModuleAfterRowRender.hasClass("fl-module")&&(e(".fl-node-"+o+" .fl-col-content").append(FLBuilder._addModuleAfterRowRender),FLBuilder._reorderModule(FLBuilder._addModuleAfterRowRender)),FLBuilder._addModuleAfterRowRender=null)})},_deleteRowClicked:function(t){var l=e(this).closest(".fl-row-overlay").attr("data-node"),i=e(".fl-row[data-node="+l+"]"),o=null;i.find(".fl-module").length?(o=confirm(FLBuilderStrings.deleteRowMessage),o&&FLBuilder._deleteRow(i)):FLBuilder._deleteRow(i),FLBuilder._removeAllOverlays(),t.stopPropagation()},_deleteRow:function(e){FLBuilder.ajax({action:"delete_node",node_id:e.attr("data-node"),silent:!0}),e.empty(),e.remove(),FLBuilder._setupEmptyLayout(),FLBuilder._removeRowOverlays()},_rowCopyClicked:function(t){var l=e(this).closest(".fl-row"),i=l.attr("data-node");FLBuilder.showAjaxLoader(),FLBuilder._removeAllOverlays(),FLBuilder._newRowPosition=l.index(".fl-row")+1,FLBuilder.ajax({action:"copy_row",node_id:i},FLBuilder._rowCopyComplete),t.stopPropagation()},_rowCopyComplete:function(t){var l=JSON.parse(t);l.nodeParent=e(FLBuilder._contentClass),l.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(l)},_rowSettingsClicked:function(t){var l=e(this),i=l.closest(".fl-row-overlay").attr("data-node"),o=l.closest(".fl-block-overlay-global").length>0;o&&"row"!=FLBuilderConfig.userTemplateType?FLBuilderConfig.userCanEditGlobalTemplates&&window.open(e('.fl-row[data-node="'+i+'"]').attr("data-template-url")):l.hasClass("fl-block-settings")&&(FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_row_settings",node_id:i},FLBuilder._rowSettingsLoaded)),t.stopPropagation()},_rowSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._setSettingsFormContent(t.settings),FLBuilder.preview=new FLBuilderPreview({type:"row",state:t.state})},_colMouseenter:function(){var t=e(this),l=t.hasClass("fl-node-global"),i=t.parents(".fl-node-global").length>0,o=t.parents(".fl-col-group").find(".fl-col").length,s=0===t.index(),r=o===t.index()+1,n=wp.template("fl-col-overlay");FLBuilderConfig.simpleUi||l&&i&&"row"!=FLBuilderConfig.userTemplateType||t.find(".fl-module").length>0||(t.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),FLBuilder._appendOverlay(t,n({global:l,numCols:o,first:s,last:r})),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_colMouseleave:function(t){var l=e(this),i=e(t.toElement)||e(t.relatedTarget),o=l.find(".fl-module").length>0,s=i.is("#tiptip_holder"),r=i.closest("#tiptip_holder").length>0;o||s||r||FLBuilder._removeColOverlays()},_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")},_colSettingsClicked:function(t){var l=e(this).closest(".fl-col").attr("data-node");FLBuilder._colResizing||(FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_column_settings",node_id:l},FLBuilder._colSettingsLoaded),t.stopPropagation())},_colSettingsLoaded:function(t){var l=JSON.parse(t),i=null,o=null,s=null;FLBuilder._setSettingsFormContent(l.settings),i=e(".fl-builder-col-settings"),o=i.data("node"),s=e('.fl-col[data-node="'+o+'"]'),0===s.siblings(".fl-col").length&&e(i).find("#fl-builder-settings-section-general").css("display","none"),FLBuilder.preview=new FLBuilderPreview({type:"col",state:l.state})},_deleteColClicked:function(t){var l=e(this),i=l.closest(".fl-col"),o=l.closest(".fl-module"),s=!0;o.length>0&&(s=confirm(FLBuilderStrings.deleteColumnMessage)),s&&(FLBuilder._deleteCol(i),FLBuilder._removeAllOverlays()),t.stopPropagation()},_deleteCol:function(e){var t=e.closest(".fl-row"),l=e.closest(".fl-col-group"),i=0;e.remove(),rowCols=t.find(".fl-col"),groupCols=l.find(".fl-col"),0===rowCols.length&&"row"!=FLBuilderConfig.userTemplateType?FLBuilder._deleteRow(t):(0===groupCols.length?l.remove():(i=6===groupCols.length?16.65:7===groupCols.length?14.28:Math.round(100/groupCols.length*100)/100,groupCols.css("width",i+"%")),FLBuilder.ajax({action:"delete_col",node_id:e.attr("data-node"),new_width:i,silent:!0}))},_insertColBeforeClicked:function(t){FLBuilder._insertCol(e(this).closest(".fl-col"),"before"),t.stopPropagation()},_insertColAfterClicked:function(t){FLBuilder._insertCol(e(this).closest(".fl-col"),"after"),t.stopPropagation()},_insertCol:function(e,t){FLBuilder.showAjaxLoader(),FLBuilder._removeAllOverlays(),FLBuilder.ajax({action:"render_new_column",node_id:e.attr("data-node"),insert:t},FLBuilder._renderLayout)},_addColGroup:function(t,l,i){FLBuilder.showAjaxLoader(),FLBuilder._newColGroupParent=e(".fl-node-"+t+" .fl-row-content"),FLBuilder._newColGroupPosition=i,FLBuilder.ajax({action:"render_new_column_group",cols:l,node_id:t,position:i},FLBuilder._addColGroupComplete)},_addColGroupComplete:function(t){var l=JSON.parse(t),i=e(l.html).find(".fl-col").data("node");l.nodeParent=FLBuilder._newColGroupParent,l.nodePosition=FLBuilder._newColGroupPosition,FLBuilder._renderLayout(l,function(){null!==FLBuilder._addModuleAfterRowRender&&(FLBuilder._addModuleAfterRowRender.hasClass("fl-module")&&(e(".fl-node-"+i+" .fl-col-content").append(FLBuilder._addModuleAfterRowRender),FLBuilder._reorderModule(FLBuilder._addModuleAfterRowRender)),FLBuilder._addModuleAfterRowRender=null)})},_initColDragResizing:function(){e(".fl-block-col-resize").draggable({axis:"x",start:FLBuilder._colDragResizeStart,drag:FLBuilder._colDragResize,stop:FLBuilder._colDragResizeStop})},_colDragResizeStart:function(t,l){var i=e(l.helper),o="",s=i.closest(".fl-col-group"),r=s.find(".fl-col"),n=i.closest(".fl-col"),a=null,d=100,u=0;for(i.hasClass("fl-block-col-resize-e")?(o="e",a=n.next(".fl-col")):(o="w",a=n.prev(".fl-col"));u<r.length;u++)r.eq(u).data("node")!=n.data("node")&&r.eq(u).data("node")!=a.data("node")&&(d-=parseFloat(r.eq(u)[0].style.width));FLBuilder._colResizeData={handle:i,feedbackLeft:i.find(".fl-block-col-resize-feedback-left"),feedbackRight:i.find(".fl-block-col-resize-feedback-right"),direction:o,groupWidth:s.outerWidth(),col:n,colWidth:parseFloat(n[0].style.width)/100,sibling:a,offset:l.position.left,availWidth:d},FLBuilder._colResizing=!0,FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents()},_colDragResize:function(e,t){var l=FLBuilder._colResizeData,i=(l.offset-t.position.left)/l.groupWidth,o="e"==l.direction?100*(l.colWidth-i):100*(l.colWidth+i),s=Math.round(100*o)/100,r=l.availWidth-o,n=Math.round(100*r)/100,a=10,d=Math.round(100*(l.availWidth-10))/100;10>s?(s=a,n=d):10>n&&(s=d,n=a),"e"==l.direction?(l.feedbackLeft.html(s.toFixed(1)+"%").show(),l.feedbackRight.html(n.toFixed(1)+"%").show()):(l.feedbackLeft.html(n.toFixed(1)+"%").show(),l.feedbackRight.html(s.toFixed(1)+"%").show()),l.col.css("width",s+"%"),l.sibling.css("width",n+"%")},_colDragResizeStop:function(e,t){var l=FLBuilder._colResizeData;FLBuilder._colResizeData.feedbackLeft.hide(),FLBuilder._colResizeData.feedbackRight.hide(),FLBuilder.ajax({action:"resize_cols",col_id:l.col.data("node"),col_width:parseFloat(l.col[0].style.width),sibling_id:l.sibling.data("node"),sibling_width:parseFloat(l.sibling[0].style.width),silent:!0}),FLBuilder._colResizeData=null,FLBuilder._bindOverlayEvents(),setTimeout(function(){FLBuilder._colResizing=!1},50)},_resetColumnWidths:function(t){var l=e(this).closest(".fl-col-group"),i=l.find(".fl-col"),o=0;o=6===i.length?16.65:7===i.length?14.28:Math.round(100/i.length*100)/100,i.css("width",o+"%"),FLBuilder.ajax({action:"reset_col_widths",group_id:l.data("node"),silent:!0}),t.stopPropagation()},_moduleMouseenter:function(){var t=e(this),l=t.attr("data-name"),i=t.hasClass("fl-node-global"),o=t.parents(".fl-node-global").length>0,s=t.parents(".fl-col-group").find(".fl-col").length,r=t.parents(".fl-col"),n=0===r.index(),a=s===r.index()+1,d=wp.template("fl-module-overlay");FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),i&&o&&"row"!=FLBuilderConfig.userTemplateType||(t.hasClass("fl-block-overlay-active")||(FLBuilder._appendOverlay(t,d({global:i,moduleName:l,numCols:s,parentFirst:n,parentLast:a})),FLBuilder._initColDragResizing()),e("body").addClass("fl-block-overlay-muted"))},_moduleMouseleave:function(t){var l=(e(this),e(t.toElement)||e(t.relatedTarget)),i=l.is("#tiptip_holder"),o=l.closest("#tiptip_holder").length>0;i||o||FLBuilder._removeModuleOverlays()},_removeModuleOverlays:function(){var t=e(".fl-module");t.removeClass("fl-block-overlay-active"),t.find(".fl-module-overlay").remove(),e("body").removeClass("fl-block-overlay-muted")},_moduleDragHelper:function(t,l){return e('<div class="fl-builder-block-drag-helper">'+l.attr("data-name")+"</div>")},_moduleDragStop:function(e,t){var l=t.item,i=l.parent(),o=0,s=0;return FLBuilder._blockDragStop(e,t),i.hasClass("fl-builder-modules")||i.hasClass("fl-builder-widgets")?void l.remove():(l.hasClass("fl-builder-block")?(i.hasClass("fl-builder-content")?(o=i.children(".fl-row, .fl-builder-block").index(l),s=0):i.hasClass("fl-row-content")?(o=i.children(".fl-col-group, .fl-builder-block").index(l),s=l.closest(".fl-row").attr("data-node")):(o=i.children(".fl-module, .fl-builder-block").index(l),s=l.closest(".fl-col").attr("data-node")),FLBuilder._addModule(i,s,l.attr("data-type"),o,l.attr("data-widget")),t.item.remove()):i.hasClass("fl-builder-content")?(o=i.children(".fl-row, .fl-module").index(l),FLBuilder._addModuleAfterRowRender=l,FLBuilder._addRow("1-col",o),l.remove()):i.hasClass("fl-row-content")?(o=i.children(".fl-col-group, .fl-module").index(l),FLBuilder._addModuleAfterRowRender=l,FLBuilder._addColGroup(l.closest(".fl-row").attr("data-node"),"1-col",o),l.remove()):FLBuilder._reorderModule(l),void FLBuilder._resizeLayout())},_reorderModule:function(e){var t=e.closest(".fl-col").attr("data-node"),l=e.attr("data-parent"),i=e.attr("data-node"),o=e.index();t==l?FLBuilder.ajax({action:"reorder_node",node_id:i,position:o,silent:!0}):(e.attr("data-parent",t),FLBuilder.ajax({action:"move_node",new_parent:t,node_id:i,position:o,silent:!0}))},_deleteModuleClicked:function(t){var l=e(this).closest(".fl-module"),i=confirm(FLBuilderStrings.deleteModuleMessage);i&&(FLBuilder._deleteModule(l),FLBuilder._removeAllOverlays()),t.stopPropagation()},_deleteModule:function(e){var t=e.closest(".fl-row");FLBuilder.ajax({action:"delete_node",node_id:e.attr("data-node"),silent:!0}),e.empty(),e.remove(),t.removeClass("fl-block-overlay-muted"),FLBuilder._highlightEmptyCols(),FLBuilder._removeAllOverlays()},_moduleCopyClicked:function(t){var l=e(this).closest(".fl-module");FLBuilder.showAjaxLoader(),FLBuilder._removeAllOverlays(),FLBuilder._newModuleParent=l.parent(),FLBuilder._newModulePosition=l.index()+1,FLBuilder.ajax({action:"copy_module",node_id:l.attr("data-node")},FLBuilder._moduleCopyComplete),t.stopPropagation()},_moduleCopyComplete:function(e){var t=JSON.parse(e);t.nodeParent=FLBuilder._newModuleParent,t.nodePosition=FLBuilder._newModulePosition,FLBuilder._renderLayout(t)},_moduleSettingsClicked:function(t){var l=e(this),i=l.closest(".fl-module").attr("data-node"),o=l.closest(".fl-col").attr("data-node"),s=l.closest(".fl-module").attr("data-type"),r=l.closest(".fl-block-overlay-global").length>0;t.stopPropagation(),FLBuilder._colResizing||(!r||FLBuilderConfig.userCanEditGlobalTemplates)&&FLBuilder._showModuleSettings(i,o,s)},_showModuleSettings:function(e,t,l){FLBuilder._closePanel(),FLBuilder._showLightbox(),FLBuilder.ajax({action:"render_module_settings",node_id:e,type:l,parent_id:t},FLBuilder._moduleSettingsLoaded)},_moduleSettingsLoaded:function(t){var l=JSON.parse(t),i=e("<div>"+l.settings+"</div>"),o=i.find("link.fl-builder-settings-css"),s=i.find("script.fl-builder-settings-js"),r=i.find(".fl-builder-settings"),n=r.attr("data-type"),a=null,d=null,u=null;e.inArray(n,FLBuilder._loadedModuleAssets)>-1?(o.remove(),s.remove()):(e("head").append(o),e("head").append(s),FLBuilder._loadedModuleAssets.push(n)),FLBuilder._setSettingsFormContent(i),"undefined"!=typeof l.layout&&(a=l.layout,a.nodeParent=FLBuilder._newModuleParent,a.nodePosition=FLBuilder._newModulePosition),"undefined"!=typeof l.state&&(d=l.state),FLBuilder.preview=new FLBuilderPreview({type:"module",layout:a,state:d}),u=FLBuilder._moduleHelpers[n],"undefined"!=typeof u&&(FLBuilder._initSettingsValidation(u.rules),u.init())},_saveModuleClicked:function(){var t=e(this).closest(".fl-builder-settings"),l=t.attr("data-type"),i=(t.attr("data-node"),FLBuilder._moduleHelpers[l]),o=!0;"undefined"!=typeof i&&(t.find("label.error").remove(),t.validate().hideErrors(),o=t.validate().form(),o&&(o=i.submit())),o?(FLBuilder._saveSettings(),FLBuilder._lightbox.close()):FLBuilder._toggleSettingsTabErrors()},_addModule:function(e,t,l,i,o){FLBuilder.showAjaxLoader(),FLBuilder._newModuleParent=e,FLBuilder._newModulePosition=i,FLBuilder.ajax({action:"render_new_module",parent_id:t,type:l,position:i,node_preview:1,widget:"undefined"==typeof o?"":o},FLBuilder._addModuleComplete)},_addModuleComplete:function(t){FLBuilder._showLightbox(),FLBuilder._moduleSettingsLoaded(t),e(".fl-builder-module-settings").data("new-module","1")},registerModuleHelper:function(t,l){var i={rules:{},init:function(){},submit:function(){return!0},preview:function(){}};FLBuilder._moduleHelpers[t]=e.extend({},i,l)},_registerModuleHelper:function(e,t){FLBuilder.registerModuleHelper(e,t)},_showNodeTemplateSettings:function(t){var l=e(".fl-builder-settings-lightbox .fl-builder-settings");FLBuilder._saveSettings(),FLBuilder.ajax({action:"render_node_template_settings",node_id:l.attr("data-node")},FLBuilder._nodeTemplateSettingsLoaded)},_nodeTemplateSettingsLoaded:function(e){var t=JSON.parse(e);FLBuilder._showLightbox(!1),FLBuilder._setSettingsFormContent(t.html),FLBuilder._initSettingsValidation({name:{required:!0}})},_saveNodeTemplate:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=t.validate().form();l&&(FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_node_template",node_id:t.attr("data-node"),settings:FLBuilder._getSettings(t)},FLBuilder._saveNodeTemplateComplete),FLBuilder._lightbox.close())},_saveNodeTemplateComplete:function(t){var l=JSON.parse(t),i=e(".fl-builder-saved-"+l.type+"s"),o=i.find(".fl-builder-block"),s=null,r="",n=l.name.toLowerCase(),a=0,d=wp.template("fl-node-template-block");if("row"==l.type?FLBuilder.alert(FLBuilderStrings.rowTemplateSaved):"module"==l.type&&FLBuilder.alert(FLBuilderStrings.moduleTemplateSaved),l.layout&&FLBuilder._renderLayout(l.layout),0===o.length)i.append(d(l));else for(;a<o.length;a++){if(s=o.eq(a),r=s.text().toLowerCase().trim(),0===a&&r>n){i.prepend(d(l));break}if(r>n){s.before(d(l));break}if(o.length-1===a){i.append(d(l));break}}i.find(".fl-builder-block-no-node-templates").remove()},_nodeTemplateDragStop:function(e,t){var l=t.item,i=l.parent(),o=null,s=0,r="",n=null;FLBuilder._blockDragStop(e,t),l.hasClass("fl-builder-block-saved-row")||l.hasClass("fl-builder-block-row-template")?(s=i.children(".fl-row, .fl-builder-block").index(l),o=null,r="render_new_row",n=FLBuilder._addRowComplete,FLBuilder._newRowPosition=s):(l.hasClass("fl-builder-block-saved-module")||l.hasClass("fl-builder-block-module-template"))&&(r="render_new_module",n=FLBuilder._addModuleComplete,i.hasClass("fl-builder-content")?(s=i.children(".fl-row, .fl-builder-block").index(l),o=0):i.hasClass("fl-row-content")?(s=i.children(".fl-col-group, .fl-builder-block").index(l),o=l.closest(".fl-row").attr("data-node")):(s=i.children(".fl-module, .fl-builder-block").index(l),o=l.closest(".fl-col").attr("data-node")),FLBuilder._newModuleParent=i,FLBuilder._newModulePosition=s),
4
+ FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:r,template_id:l.attr("data-id"),parent_id:o,position:s},n),l.remove()},_editNodeTemplateClicked:function(t){t.preventDefault(),t.stopPropagation(),window.open(e(this).attr("href"))},_deleteNodeTemplateClicked:function(t){var l=e(t.target),i=l.closest(".fl-builder-blocks-section"),o=i.find(".fl-builder-blocks-section-content"),s=o.find(".fl-builder-block"),r=l.closest(".fl-builder-block"),n=r.hasClass("fl-builder-block-global"),a=n?FLBuilder._updateLayout:void 0,d=n?FLBuilderStrings.deleteGlobalTemplate:FLBuilderStrings.deleteTemplate;confirm(d)&&(r.remove(),1===s.length&&(r.hasClass("fl-builder-block-saved-row")?o.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedRows+"</span>"):o.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedModules+"</span>")),FLBuilder.ajax({action:"delete_node_template",template_id:r.attr("data-id"),silent:r.hasClass("fl-builder-block-global")?!1:!0},a))},_initSettingsForms:function(){FLBuilder._initColorPickers(),FLBuilder._initSelectFields(),FLBuilder._initMultipleFields(),FLBuilder._initAutoSuggestFields(),FLBuilder._initLinkFields(),FLBuilder._initFontFields()},_setSettingsFormContent:function(e){FLBuilder._setLightboxContent(e),FLBuilder._initSettingsForms()},_settingsTabClicked:function(t){var l=e(this),i=l.closest(".fl-builder-settings"),o=l.attr("href").split("#").pop();i.find(".fl-builder-settings-tab").removeClass("fl-active"),i.find("#"+o).addClass("fl-active"),i.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),e(this).addClass("fl-active"),t.preventDefault()},_settingsCancelClicked:function(t){var l=e(".fl-builder-module-settings"),i=null,o=null,s=null,r=null;l.length>0&&"undefined"!=typeof l.data("new-module")?(i=e(FLBuilder.preview.state.html),o=e(".fl-node-"+l.data("node")),s=o.closest(".fl-col"),r=i.find(".fl-node-"+s.data("node")),r.length>0?FLBuilder._deleteModule(o):FLBuilder._deleteCol(s)):FLBuilder.preview&&FLBuilder.preview.revert(),FLBuilder.preview=null,FLLightbox.closeParent(this)},_initSettingsValidation:function(t,l){var i=e(".fl-builder-settings").last();i.validate({ignore:[],rules:t,messages:l,errorPlacement:FLBuilder._settingsErrorPlacement})},_settingsErrorPlacement:function(e,t){e.appendTo(t.parent())},_toggleSettingsTabErrors:function(){for(var t=e(".fl-builder-settings:visible"),l=t.find(".fl-builder-settings-tab"),i=null,o=null,s=0;s<l.length;s++)i=l.eq(s),o=i.find("label.error"),tabLink=t.find(".fl-builder-settings-tabs a[href*="+i.attr("id")+"]"),tabLink.find(".fl-error-icon").remove(),tabLink.removeClass("error"),o.length>0&&(tabLink.append('<span class="fl-error-icon"></span>'),tabLink.addClass("error"))},_getSettings:function(t){FLBuilder._updateEditorFields();var l=t.serializeArray(),i=0,o=0,s="",r="",n="",a=[],d=[],u={};for(i=0;i<l.length;i++)if(s=l[i].value.replace(/\r/gm,""),!(l[i].name.indexOf("flrich")>-1))if(l[i].name.indexOf("[")>-1){for(r=l[i].name.replace(/\[(.*)\]/,""),n=l[i].name.replace(r,""),a=[],d=n.match(/\[[^\]]*\]/g),o=0;o<d.length;o++)"[]"!=d[o]&&a.push(d[o].replace(/\[|\]/g,""));n.match(/\[\]\[[^\]]*\]\[[^\]]+\]/)?("undefined"==typeof u[r]&&(u[r]={}),"undefined"==typeof u[r][a[0]]&&(u[r][a[0]]={}),"undefined"==typeof u[r][a[0]][a[1]]&&(u[r][a[0]][a[1]]={}),u[r][a[0]][a[1]]=s):n.match(/\[\]\[[^\]]*\]\[\]/)?("undefined"==typeof u[r]&&(u[r]={}),"undefined"==typeof u[r][a[0]]&&(u[r][a[0]]=[]),u[r][a[0]].push(s)):n.match(/\[\]\[[^\]]*\]/)?("undefined"==typeof u[r]&&(u[r]={}),u[r][a[0]]=s):n.match(/\[\]/)&&("undefined"==typeof u[r]&&(u[r]=[]),u[r].push(s))}else u[l[i].name]=s;for(n in u)if("undefined"!=typeof u["as_values_"+n]){u[n]=e.grep(u["as_values_"+n].split(","),function(e){return""!==e}).join(",");try{delete u["as_values_"+n]}catch(c){}}return u},_saveSettings:function(){var t=e(".fl-builder-settings-lightbox .fl-builder-settings"),l=t.attr("data-node"),i=FLBuilder._getSettings(t);FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"save_settings",node_id:l,settings:i},FLBuilder._saveSettingsComplete),FLBuilder._lightbox.close()},_saveSettingsComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)})},_showHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){e(this).siblings(".fl-help-tooltip-text").fadeOut()},_initAutoSuggestFields:function(){e(".fl-suggest-field").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}),{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")})},_updateAutoSuggestField:function(t,l,i){e(this).siblings(".as-values").val(i.join(",")).trigger("change")},_initMultipleFields:function(){for(var t=e(".fl-builder-field-multiples"),l=null,i=null,o=0,s=FLBuilderConfig.isRtl?{left:10}:{right:10};o<t.length;o++)l=t.eq(o),i=l.find(".fl-builder-field-multiple"),1===i.length?i.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):i.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:s,distance:5,opacity:.5,helper:FLBuilder._fieldDragHelper,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer"})},_addFieldClicked:function(){var t=e(this),l=t.attr("data-field"),i=t.closest("tr").siblings("tr[data-field="+l+"]").last(),o=i.clone(),s=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;o.find("th label span.fl-builder-field-index").html(s),o.find(".fl-form-field-preview-text").html(""),o.find("input, textarea, select").val(""),i.after(o),FLBuilder._initMultipleFields()},_copyFieldClicked:function(){var t=e(this),l=t.closest("tr"),i=l.clone(),o=parseInt(l.find("label span.fl-builder-field-index").html(),10)+1;i.find("th label span.fl-builder-field-index").html(o),l.after(i),FLBuilder._renumberFields(l.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var t=e(this).closest("tr"),l=t.parent(),i=confirm(FLBuilderStrings.deleteFieldMessage);i&&(t.remove(),FLBuilder._renumberFields(l),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){for(var t=e.find(".fl-builder-field-multiple"),l=0;l<t.length;l++)t.eq(l).find("th label span.fl-builder-field-index").html(l+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),l=t.attr("data-toggle"),i=t.attr("data-hide"),o=t.attr("data-trigger"),s=t.val(),r=0;if("undefined"!=typeof l){l=JSON.parse(l);for(r in l)FLBuilder._settingsSelectToggle(l[r].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(l[r].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[r].tabs,"hide","a[href*=fl-builder-settings-tab-","]");"undefined"!=typeof l[s]&&(FLBuilder._settingsSelectToggle(l[s].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(l[s].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(l[s].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if("undefined"!=typeof i&&(i=JSON.parse(i),"undefined"!=typeof i[s]&&(FLBuilder._settingsSelectToggle(i[s].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[s].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[s].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))),"undefined"!=typeof o&&(o=JSON.parse(o),"undefined"!=typeof o[s]&&"undefined"!=typeof o[s].fields))for(r=0;r<o[s].fields.length;r++)e("#fl-field-"+o[s].fields[r]).find("select").trigger("change")},_settingsSelectToggle:function(t,l,i,o){var s=0;if(o="undefined"==typeof o?"":o,"undefined"!=typeof t)for(;s<t.length;s++)e(i+t[s]+o)[l]()},_initColorPickers:function(){var t=FLBuilderConfig.colorPresets?FLBuilderConfig.colorPresets:[];FLBuilder.colorPicker=new FLBuilderColorPicker({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})})},_selectSinglePhoto:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:"image"},multiple:!1})),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"),l=e(this).closest(".fl-photo-field"),i=l.find("input[type=hidden]"),o=i.val(),s=null;e(this).hasClass("fl-photo-replace")?(t.reset(),l.addClass("fl-photo-empty"),i.val("")):""!==o?(s=wp.media.attachment(o),s.fetch(),t.add(s?[s]:[])):t.reset()},_singlePhotoSelected:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),l=e(this).closest(".fl-photo-field"),i=l.find("input[type=hidden]"),o=l.find(".fl-photo-preview img"),s=l.find("select");i.val(t.id),o.attr("src",FLBuilder._getPhotoSrc(t)),l.removeClass("fl-photo-empty"),l.find("label.error").remove(),s.show(),s.html(FLBuilder._getPhotoSizeOptions(t)),s.trigger("change")},_singlePhotoRemoved:function(){var t=FLBuilder._singlePhotoSelector.state().get("selection"),l=e(this).closest(".fl-photo-field"),i=l.find("input[type=hidden]"),o=l.find("select");t.reset(),l.addClass("fl-photo-empty"),i.val(""),o.html(""),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){var t="",l=null,i=null,o="",s={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if("undefined"==typeof e.sizes)t+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else for(l in e.sizes)o="undefined"!=typeof s[l]?s[l]+" - ":"undefined"!=typeof FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]+" - ":"",i="full"==l?' selected="selected"':"",t+='<option value="'+e.sizes[l].url+'"'+i+">"+o+e.sizes[l].width+" x "+e.sizes[l].height+"</option>";return t},_selectMultiplePhotos:function(){var t=e(this).closest(".fl-multiple-photos-field"),l=t.find("input[type=hidden]"),i=l.val(),o=""===i?'[gallery ids="-1"]':'[gallery ids="'+JSON.parse(i).join()+'"]',s=wp.shortcode.next("gallery",o).shortcode,r=wp.media.gallery.defaults.id,n=null,a=null;_.isUndefined(s.get("id"))&&!_.isUndefined(r)&&s.set("id",r),n=wp.media.gallery.attachments(s),a=new wp.media.model.Selection(n.models,{props:n.props.toJSON(),multiple:!0}),a.gallery=n.gallery,a.more().done(function(){a.props.set({query:!1}),a.unmirror(),a.props.unset("orderby")}),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:a}).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 l=e(this).closest(".fl-multiple-photos-field"),i=l.find("input[type=hidden]"),o=l.find(".fl-multiple-photos-count"),s=[],r=0;r<t.models.length;r++)s.push(t.models[r].id);1==s.length?o.html("1 "+FLBuilderStrings.photoSelected):o.html(s.length+" "+FLBuilderStrings.photosSelected),l.removeClass("fl-multiple-photos-empty"),l.find("label.error").remove(),i.val(JSON.stringify(s)).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.once("select",e.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var t=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),l=e(this).closest(".fl-video-field"),i=l.find(".fl-video-preview-img img"),o=l.find(".fl-video-preview-filename"),s=l.find("input[type=hidden]");i.attr("src",t.icon),o.html(t.filename),l.removeClass("fl-video-empty"),l.find("label.error").remove(),s.val(t.id).trigger("change")},_selectMultipleAudios:function(){var t=e(this).closest(".fl-multiple-audios-field"),l=t.find("input[type=hidden]"),i=l.val(),o=""==i?'[playlist ids="-1"]':'[playlist ids="'+JSON.parse(i).join()+'"]',s=wp.shortcode.next("playlist",o).shortcode,r=wp.media.playlist.defaults.id,n=null,a=null;_.isUndefined(s.get("id"))&&!_.isUndefined(r)&&s.set("id",r),n=wp.media.playlist.attachments(s),a=new wp.media.model.Selection(n.models,{props:n.props.toJSON(),multiple:!0}),a.playlist=n.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 l=e(this).closest(".fl-multiple-audios-field"),i=l.find(".fl-multiple-audios-count"),o=l.find("input[type=hidden]"),s=[],r=0;r<t.models.length;r++)s.push(t.models[r].id);1==s.length?i.html("1 "+FLBuilderStrings.audioSelected):i.html(s.length+" "+FLBuilderStrings.audiosSelected),o.val(JSON.stringify(s)).trigger("change"),l.removeClass("fl-multiple-audios-empty"),l.find("label.error").remove()},_selectIcon:function(){var e=this;FLIconSelector.open(function(t){FLBuilder._iconSelected.apply(e,[t])})},_iconSelected:function(t){var l=e(this).closest(".fl-icon-field"),i=l.find("input[type=hidden]"),o=l.find("i"),s=o.attr("data-icon");i.val(t).trigger("change"),o.removeClass(s),o.addClass(t),o.attr("data-icon",t),l.removeClass("fl-icon-empty"),l.find("label.error").remove()},_removeIcon:function(){var t=e(this).closest(".fl-icon-field"),l=t.find("input[type=hidden]"),i=t.find("i");l.val("").trigger("change"),i.removeClass(),i.attr("data-icon",""),t.addClass("fl-icon-empty")},_formFieldClicked:function(){var t=e(this),l=t.closest(".fl-lightbox-wrap").attr("data-instance-id"),i=FLLightbox._instances[l],o=i._node.find(".fl-lightbox").css("left"),s=i._node.find(".fl-lightbox").css("top"),r=t.closest(".fl-builder-settings"),n=t.attr("data-type"),a=t.siblings("input").val(),d=FLBuilder._moduleHelpers[n],u=new FLLightbox({className:"fl-builder-lightbox fl-form-field-settings",destroyOnClose:!0});t.closest(".fl-builder-lightbox").hide(),t.attr("id","fl-"+u._id),u.open('<div class="fl-builder-lightbox-loading"></div>'),u.draggable({handle:".fl-lightbox-header"}),e("body").undelegate(".fl-builder-settings-cancel","click",FLBuilder._settingsCancelClicked),u._node.find(".fl-lightbox").css({left:o,top:Number(parseInt(s)+233)+"px"}),FLBuilder.ajax({action:"render_settings_form",node_id:r.attr("data-node"),node_settings:FLBuilder._getSettings(r),type:n,settings:a.replace(/&#39;/g,"'")},function(e){var t=JSON.parse(e);u.setContent(t.html),u._node.find("form.fl-builder-settings").attr("data-type",n),u._node.find(".fl-builder-settings-cancel").on("click",FLBuilder._closeFormFieldLightbox),FLBuilder._initSettingsForms(),"undefined"!=typeof d&&(FLBuilder._initSettingsValidation(d.rules),d.init()),u._node.find(".fl-lightbox").css({left:o,top:s})})},_closeFormFieldLightbox:function(){var t=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),l=FLLightbox._instances[t],i=e(".fl-builder-settings-lightbox"),o=i.find("form"),s=l._node.find(".fl-lightbox").css("left"),r=l._node.find(".fl-lightbox").css("top"),n=0,a=e(window),d=a.height();l._node.find(".fl-lightbox-content").html('<div class="fl-builder-lightbox-loading"></div>'),n=l._node.find(".fl-lightbox").height(),d-80>n?l._node.find(".fl-lightbox").css("top",(d-n)/2-40+"px"):l._node.find(".fl-lightbox").css("top","0px"),l.on("close",function(){i.show(),i.find("label.error").remove(),o.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors(),i.find(".fl-lightbox").css({left:s,top:r})}),setTimeout(function(){l.close(),e("body").delegate(".fl-builder-settings-cancel","click",FLBuilder._settingsCancelClicked)},500)},_saveFormFieldClicked:function(){var t=e(this).closest(".fl-builder-settings"),l=e(this).closest(".fl-lightbox-wrap").attr("data-instance-id"),i=t.attr("data-type"),o=FLBuilder._getSettings(t),s=FLBuilder._moduleHelpers[i],r=e(".fl-builder-settings #fl-"+l),n=r.parent().attr("data-preview-text"),a=o[n],d=e('select[name="'+n+'"]'),u=document.createElement("div"),c=!0;return d.length>0&&(a=d.find('option[value="'+o[n]+'"]').text()),"undefined"!=typeof s&&(t.find("label.error").remove(),t.validate().hideErrors(),c=t.validate().form(),c&&(c=s.submit())),c?("undefined"!=typeof n&&(a.indexOf("fa fa-")>-1?a='<i class="'+a+'"></i>':a.length>35&&(u.innerHTML=a,a=(u.textContent||u.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),r.siblings(".fl-form-field-preview-text").html(a)),r.siblings("input").val(JSON.stringify(o)).trigger("change"),FLBuilder._closeFormFieldLightbox.apply(this),!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-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var t=e(this),l=t.find(".fl-link-field-search-input");l.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links",_wpnonce:FLBuilderConfig.ajaxNonce}),{asHtmlID:l.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,l){var i=e.closest(".fl-link-field"),o=i.find(".fl-link-field-search"),s=i.find(".fl-link-field-search-input"),r=i.find(".fl-link-field-input");r.val(t.value).trigger("keyup"),s.autoSuggest("remove",t.value),o.hide()},_linkFieldSelectClicked:function(){e(this).parent().find(".fl-link-field-search").show()},_linkFieldSelectCancelClicked:function(){e(this).parent().hide()},_initFontFields:function(){e(".fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var t=e(this),l=t.find(".fl-font-field-font");l.on("change",function(){FLBuilder._getFontWeights(l)})},_getFontWeights:function(t){var l=t.next(".fl-font-field-weight"),i=t.val(),o={"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"},s={};l.html(""),s="undefined"!=typeof FLBuilderFontFamilies.system[i]?FLBuilderFontFamilies.system[i].weights:"undefined"!=typeof FLBuilderFontFamilies.google[i]?FLBuilderFontFamilies.google[i]:FLBuilderFontFamilies["default"][i],e.each(s,function(e,t){l.append('<option value="'+t+'">'+o[t]+"</option>")})},initEditorField:function(e){var t=tinyMCEPreInit.mceInit.flhiddeneditor;t.elements=e,tinyMCEPreInit.mceInit[e]=t},_updateEditorFields:function(){var t=e(".fl-builder-settings textarea.wp-editor-area");t.each(FLBuilder._updateEditorField)},_updateEditorField:function(){var t=e(this),l=t.closest(".wp-editor-wrap"),i=t.attr("id"),o=t.closest(".fl-editor-field").attr("id"),s="undefined"==typeof tinyMCE?!1:tinyMCE.get(i),r=t.siblings('textarea[name="'+o+'"]');0===r.length&&(r=e('<textarea name="'+o+'"></textarea>').hide(),t.after(r)),s&&l.hasClass("tmce-active")?r.val(s.getContent()):"undefined"!=typeof switchEditors?r.val(switchEditors.wpautop(t.val())):r.val(t.val())},_loopBuilderPostTypeChange:function(){var t=e(this).val();e(".fl-loop-builder-filter").hide(),e(".fl-loop-builder-"+t+"-filter").show()},_textFieldAddValueSelectChange:function(){var t=e(this),l=e('input[name="'+t.data("target")+'"]'),i=l.val(),o=t.val();-1==i.indexOf(o)&&l.attr("value",i.trim()+" "+o.trim()),t.val("")},ajax:function(t,l){var i;if(FLBuilder._silentUpdate)return FLBuilder.showAjaxLoader(),void(FLBuilder._silentUpdateCallbackData=[t,l]);t.silent===!0&&(FLBuilder._silentUpdate=!0);for(i in t)"undefined"==typeof t[i]&&(t[i]=null);return t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=e("#fl-post-id").val(),t.fl_builder=1,t.fl_action=t.action,t={fl_builder_data:t},e.post(FLBuilder._ajaxUrl(),t,function(e){FLBuilder._ajaxComplete(),"undefined"!=typeof l&&l.call(this,e)})},_ajaxComplete:function(){var e,t;FLBuilder._silentUpdate=!1,null!==FLBuilder._silentUpdateCallbackData?(FLBuilder.showAjaxLoader(),e=FLBuilder._silentUpdateCallbackData[0],t=FLBuilder._silentUpdateCallbackData[1],FLBuilder._silentUpdateCallbackData=null,FLBuilder.ajax(e,t)):FLBuilder.hideAjaxLoader()},_ajaxUrl:function(e){var t=window.location.href.split("#").shift(),l=null;if("undefined"!=typeof e)for(l in e)t+=t.indexOf("?")>-1?"&":"?",t+=l+"="+e[l];return t},showAjaxLoader:function(){0===e(".fl-builder-lightbox-loading").length&&e(".fl-builder-loading").show()},hideAjaxLoader:function(){e(".fl-builder-loading").hide()},_showLightbox:function(e){e="undefined"==typeof e?!0:e,FLBuilder._lightbox.open('<div class="fl-builder-lightbox-loading"></div>'),e?FLBuilder._lightbox.draggable({handle:".fl-lightbox-header"}):FLBuilder._lightbox.draggable(!1),FLBuilder._removeAllOverlays(),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout)},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder._actionsLightbox.open(t(e))},alert:function(e){var t=new FLLightbox({className:"fl-builder-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),l=wp.template("fl-alert-lightbox");t.open(l({message:e}))},_alertClose:function(){FLLightbox.closeParent(this)},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,l,i,o){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",l).replace("{file}",t)),"undefined"!=typeof o&&"undefined"!=typeof o.stack&&(FLBuilder.log(o.stack),FLBuilder.log("************************************************************************"))}},e(function(){FLBuilder._init()})}(jQuery);var FLBuilderColorPicker;!function(e,t){function l(){var t,l,i="backgroundImage";h?f="filter":(t=e('<div id="iris-gradtest" />'),l="linear-gradient(top,#fff,#000)",e.each(p,function(e,o){return t.css(i,o+l),t.css(i).match("gradient")?(f=e,!1):void 0}),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 i(t,l){return t="top"===t?"top":"left",l=e.isArray(l)?l:Array.prototype.slice.call(arguments,1),"webkit"===f?s(t,l):p[f]+"linear-gradient("+t+", "+l.join(", ")+")"}function o(t,l){var i,o,s,n,a,d,u,c,h;t="top"===t?"top":"left",l=e.isArray(l)?l:Array.prototype.slice.call(arguments,1),i="top"===t?0:1,o=e(this),s=l.length-1,n="filter",a=1===i?"left":"top",d=1===i?"right":"bottom",u=1===i?"height":"width",c='<div class="iris-ie-gradient-shim" style="position:absolute;'+u+":100%;"+a+":%start%;"+d+":%end%;"+n+':%filter%;" data-color:"%color%"></div>',h="","static"===o.css("position")&&o.css({position:"relative"}),l=r(l),e.each(l,function(e,t){var o,r,n;return e===s?!1:(o=l[e+1],void(t.stop!==o.stop&&(r=100-parseFloat(o.stop)+"%",t.octoHex=new Color(t.color).toIEOctoHex(),o.octoHex=new Color(o.color).toIEOctoHex(),n="progid:DXImageTransform.Microsoft.Gradient(GradientType="+i+", StartColorStr='"+t.octoHex+"', EndColorStr='"+o.octoHex+"')",h+=c.replace("%start%",t.stop).replace("%end%",r).replace("%filter%",n))))}),o.find(".iris-ie-gradient-shim").remove(),e(h).prependTo(o)}function s(t,l){var i=[];return t="top"===t?"0% 0%,0% 100%,":"0% 100%,100% 100%,",l=r(l),e.each(l,function(e,t){i.push("color-stop("+parseFloat(t.stop)/100+", "+t.color+")")}),"-webkit-gradient(linear,"+t+i.join(",")+")"}function r(t){var l=[],i=[],o=[],s=t.length-1;return e.each(t,function(e,t){var o=t,s=!1,r=t.match(/1?[0-9]{1,2}%$/);r&&(o=t.replace(/\s?1?[0-9]{1,2}%$/,""),s=r.shift()),l.push(o),i.push(s)}),i[0]===!1&&(i[0]="0%"),i[s]===!1&&(i[s]="100%"),i=n(i),e.each(i,function(e){o[e]={color:l[e],stop:i[e]}}),o}function n(t){var l,i,o,s,r=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):(r=d-1,u=!0),d++;for(i=a-r,s=parseInt(t[r].replace("%"),10),l=(parseFloat(t[a].replace("%"))-s)/i,d=r+1,o=1;a>d;)t[d]=s+o*l+"%",o++,d++;return n(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&&10>c,f=!1,p=["-moz-","-webkit-","-o-","-ms-"];e.fn.gradient=function(){var t=arguments;return this.each(function(){h?o.apply(this,t):e(this).css("backgroundImage",i.apply(this,t))})},e.fn.raninbowGradient=function(t,l){var i,o,s,r;for(t=t||"top",i=e.extend({},{s:100,l:50},l),o="hsl(%h%,"+i.s+"%,"+i.l+"%)",s=0,r=[];360>=s;)r.push(o.replace("%h%",s)),s+=30;return this.each(function(){e(this).gradient(t,r)})},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="#"><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 l={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({},l,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("#000000").setHSpace(t.options.mode),a=this.options.presets,f===!1&&l(),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"):8>=c&&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(),e("html").addClass("fl-color-picker-init")},_prepareColorFields:function(){e(".fl-color-picker-value").each(function(){var t=e(this),l=t.parent().find(".fl-color-picker-color");t.val()&&l.css({backgroundColor:"#"+t.val().toString()})})},_setTemplates:function(){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,l){var i=!1;return e.each(l,function(e,l){return t===l?(i=!0,!1):void 0}),i},_buildUI:function(){var t=this;t._presetsList=this._ui.find(".fl-color-picker-presets-list"),
5
+ t._presetsList.html(""),this.options.presets.length>0?e.each(this.options.presets,function(e,l){t._addPresetView(l)}):t._presetsList.append(this._noPresetsTpl)},_addPresetView:function(t){var l=this._presetsList.find(".fl-color-picker-no-preset");l.length>0&&l.remove();var i=e(this._presetsTpl),o=Color(t);i.attr("data-color",t).find(".fl-color-picker-preset-color").css({backgroundColor:o.toString()}).end().find(".fl-color-picker-preset-label").html(o.toString()),this._presetsList.append(i)},_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 l=e(this);t._currentElement=l.parent().find(".fl-color-picker-value"),t._ui.position({my:"left top",at:"left bottom",of:l,collision:"flipfit",using:function(e,l){t._togglePicker(e)}})}).on("click",".fl-color-picker-clear",function(){var l=e(this);t._currentElement=l.parent().find(".fl-color-picker-value"),l.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("click",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,l=t._ui.find(".fl-color-picker-preset-add"),i=t._ui.find(".fl-color-picker-presets"),o=i.find(".fl-color-picker-presets-open-label"),s=i.find(".fl-color-picker-presets-close-label"),r=i.find(".fl-color-picker-presets-list");l.off("click").on("click",function(){t._addPreset(t.element.val())}),r.css({height:t.element.innerHeight()+t._iris.innerHeight()+14+"px"}).hide(),i.off("click").on("click",".fl-color-picker-presets-toggle",function(){o.toggleClass("fl-color-picker-active"),s.toggleClass("fl-color-picker-active"),r.slideToggle(500)}).on("click",".fl-color-picker-preset",function(l){var i=new Color(e(this).data("color").toString());t._setColor(i),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:i.toString()}).removeClass("fl-color-picker-empty"),o.toggleClass("fl-color-picker-active"),s.toggleClass("fl-color-picker-active"),r.slideToggle(500)}).on("click",".fl-color-picker-preset-remove",function(l){l.stopPropagation(),t._removePreset(e(this).parent().data("color"))})},_removePreset:function(t){if(confirm(this.options.labels.removePresetConfirm)){var l=t.toString(),i=a.indexOf(l);i>-1&&(a.splice(i,1),this.options.presets=a,this._presetsList.find('.fl-color-picker-preset[data-color="'+l+'"]').slideUp(function(){e(this).remove()})),a.length<1&&this._presetsList.append(this._noPresetsTpl),e(this).trigger("presetRemoved",{presets:a})}},_addPreset:function(t){var l=t.toString().replace(/^#/,"");""===l?alert(this.options.labels.noneColorSelected):a.indexOf(l)>-1?alert(this.options.labels.alreadySaved.replace("%s","#"+l)):(this._addPresetView(l),this._addPresetFeedback(),a.push(l),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 l,i=this,o=i._color,s=i.options.mode,r=i._getHSpaceColor(),n=i.controls[t],a=i.options.controls;if(t!==i.active&&("square"!==i.active||"strip"===t))switch(a[t]){case"h":if("hsv"===s){switch(r=o.clone(),t){case"horiz":r[a.vert](100);break;case"vert":r[a.horiz](100);break;case"strip":r.setHSpace("hsl")}l=r.toHsl()}else l="strip"===t?{s:r.s,l:r.l}:{s:100,l:r.l};n.raninbowGradient(e,l);break;case"s":"hsv"===s?"vert"===t?l=[o.clone().a(0).s(0).toCSS("rgba"),o.clone().a(1).s(0).toCSS("rgba")]:"strip"===t?l=[o.clone().s(100).toCSS("hsl"),o.clone().s(0).toCSS("hsl")]:"horiz"===t&&(l=["#fff","hsl("+r.h+",100%,50%)"]):l="vert"===t&&"h"===i.options.controls.horiz?["hsla(0, 0%, "+r.l+"%, 0)","hsla(0, 0%, "+r.l+"%, 1)"]:["hsl("+r.h+",0%,50%)","hsl("+r.h+",100%,50%)"],n.gradient(e,l);break;case"l":l="strip"===t?["hsl("+r.h+",100%,100%)","hsl("+r.h+", "+r.s+"%,50%)","hsl("+r.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],n.gradient(e,l);break;case"v":l="strip"===t?[o.clone().v(100).toCSS(),o.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],n.gradient(e,l)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_addInputListeners:function(e){var t=this,l=100,i=function(l){var i=new Color(e.val()),o=e.val().replace(/^#/,"");if(e.removeClass("iris-error"),i.error)""!==o&&e.addClass("iris-error");else if(i.toString()!==t._color.toString())if("keyup"===l.type){if(o.match(/^[0-9a-fA-F]{3}$/))return;t._setColor(o),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:Color(o).toString()}).removeClass("fl-color-picker-empty"),t._currentElement.val(o).trigger("change")}else if("paste"===l.type)return o=l.originalEvent.clipboardData.getData("text").replace(/^#/,""),hex=Color(o).toString(),t._setColor(o),e.val(hex),t._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:hex}).removeClass("fl-color-picker-empty"),t._currentElement.val(o).trigger("change"),!1};e.on("change",i).on("keyup",t._debounce(i,l))},_initControls:function(){var t=this,l=t.controls,i=l.square,o=t.options.controls,s=t._scale[o.strip];l.stripSlider.slider({orientation:"horizontal",max:s,slide:function(e,l){t.active="strip","h"===o.strip&&(l.value=s-l.value),t._color[o.strip](l.value),t._change.apply(t,arguments)}}),l.squareDrag.draggable({containment:l.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(e,l){t._squareDrag(e,l)},start:function(){i.addClass("iris-dragging"),e(this).addClass("ui-state-focus")},stop:function(){i.removeClass("iris-dragging"),e(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(l){var i="ui-state-focus";l.preventDefault(),"mousedown"===l.type?(t.picker.find("."+i).removeClass(i).blur(),e(this).addClass(i).focus()):e(this).removeClass(i)}).on("keydown",function(e){var i=l.square,o=l.squareDrag,s=o.position(),r=2;switch(e.altKey&&(r*=10),e.keyCode){case 37:s.left-=r;break;case 38:s.top-=r;break;case 39:s.left+=r;break;case 40:s.top+=r;break;default:return!0}s.left=Math.max(0,Math.min(s.left,i.width())),s.top=Math.max(0,Math.min(s.top,i.height())),o.css(s),t._squareDrag(e,{position:s}),e.preventDefault()}),i.mousedown(function(l){var i,o;1===l.which&&e(l.target).is("div")&&(i=t.controls.square.offset(),o={top:l.pageY-i.top,left:l.pageX-i.left},l.preventDefault(),t._squareDrag(l,{position:o}),l.target=t.controls.squareDrag.get(0),t.controls.squareDrag.css(o).trigger(l))})},_squareDrag:function(e,t){var l=this,i=l.options.controls,o=l._squareDimensions(),s=Math.round((o.h-t.position.top)/o.h*l._scale[i.vert]),r=l._scale[i.horiz]-Math.round((o.w-t.position.left)/o.w*l._scale[i.horiz]);l._color[i.horiz](r)[i.vert](s),l.active="square",l._change.apply(l,arguments)},_setColor:function(e){var t,l,i=this,o=i.options.color;i.options.color=e,e=""+e,t=e.replace(/^#/,""),l=new Color(e).setHSpace(i.options.mode),l.error?i.options.color=o:(i._color=l,i.options.color=i._color.toString(),i.active="external",i._change())},_squareDimensions:function(e){var l,i,o=this.controls.square;return e!==t&&o.data("dimensions")?o.data("dimensions"):(i=this.controls.squareDrag,l={w:o.width(),h:o.height()},o.data("dimensions",l),l)},_isNonHueControl:function(e,t){return"square"===e&&"h"===this.options.controls.strip?!0:"external"===t||"h"===t&&"strip"===e?!1:!0},_change:function(){var t=this,l=t.controls,i=t._getHSpaceColor(),o=["square","strip"],s=t.options.controls,r=s[t.active]||"external",n=t.hue;"strip"===t.active?o=[]:"external"!==t.active&&o.pop(),e.each(o,function(e,o){var r,n,a;if(o!==t.active)switch(o){case"strip":r="h"===s.strip?t._scale[s.strip]-i[s.strip]:i[s.strip],l.stripSlider.slider("value",r);break;case"square":n=t._squareDimensions(),a={left:i[s.horiz]/t._scale[s.horiz]*n.w,top:n.h-i[s.vert]/t._scale[s.vert]*n.h},t.controls.squareDrag.css(a)}}),i.h!==n&&t._isNonHueControl(t.active,r)&&t._color.h(n),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"),this._currentElement.trigger("change")))),t._paint(),t._inited=!0,t.active=!1},_debounce:function(e,t,l){var i,o;return function(){var s,r,n=this,a=arguments;return s=function(){i=null,l||(o=e.apply(n,a))},r=l&&!i,clearTimeout(i),i=setTimeout(s,t),r&&(o=e.apply(n,a)),o}}}}(jQuery),function(e,t){var l=function(e,t){return this instanceof l?this._init(e,t):new l(e,t)};l.fn=l.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 l="noop";switch(typeof e){case"object":return e.a!==t&&this.a(e.a),l=e.r!==t?"fromRgb":e.l!==t?"fromHsl":e.v!==t?"fromHsv":l,this[l](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 l(this.toInt()),t=["_alpha","_hSpace","_hsl","_hsv","error"],i=t.length-1;i>=0;i--)e[t[i]]=this[t[i]];return e},setHSpace:function(e){return this._hSpace="hsv"===e?e:"hsl",this},noop:function(){return this},fromCSS:function(e){var t,l=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,e=e.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,""),e.match(l)&&e.match(/\)$/)){if(t=e.replace(/(\s|%)/g,"").replace(l,"").replace(/,?\);?$/,"").split(","),t.length<3)return this._error();if(4===t.length&&(this.a(parseFloat(t.pop())),this.error))return this;for(var i=t.length-1;i>=0;i--)if(t[i]=parseInt(t[i],10),isNaN(t[i]))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,l){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),l))},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 l,i,o,s,r,n,a,d;return"object"!=typeof e||e.h===t||e.s===t||e.l===t?this._error():(this._hsl=e,this._hSpace="hsl",n=e.h/360,a=e.s/100,d=e.l/100,0===a?l=i=o=d:(s=.5>d?d*(1+a):d+a-d*a,r=2*d-s,l=this.hue2rgb(r,s,n+1/3),i=this.hue2rgb(r,s,n),o=this.hue2rgb(r,s,n-1/3)),this.fromRgb({r:255*l,g:255*i,b:255*o},!0))},fromHsv:function(e){var l,i,o,s,r,n,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",l=e.h/360,i=e.s/100,o=e.v/100,a=Math.floor(6*l),d=6*l-a,u=o*(1-i),c=o*(1-d*i),h=o*(1-(1-d)*i),a%6){case 0:s=o,r=h,n=u;break;case 1:s=c,r=o,n=u;break;case 2:s=u,r=o,n=h;break;case 3:s=u,r=c,n=o;break;case 4:s=h,r=u,n=o;break;case 5:s=o,r=u,n=c}return this.fromRgb({r:255*s,g:255*r,b:255*n},!0)},fromInt:function(e,l){return this._color=parseInt(e,10),isNaN(this._color)&&(this._color=0),this._color>16777215?this._color=16777215:this._color<0&&(this._color=0),l===t&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,l){return 0>l&&(l+=1),l>1&&(l-=1),1/6>l?e+6*(t-e)*l:.5>l?t:2/3>l?e+(t-e)*(2/3-l)*6:e},toString:function(){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 l=this.toRgb();return 1>t?"rgba( "+l.r+", "+l.g+", "+l.b+", "+t+" )":"rgb( "+l.r+", "+l.g+", "+l.b+" )";case"hsl":case"hsla":var i=this.toHsl();return 1>t?"hsla( "+i.h+", "+i.s+"%, "+i.l+"%, "+t+" )":"hsl( "+i.h+", "+i.s+"%, "+i.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,l=this.toRgb(),i=l.r/255,o=l.g/255,s=l.b/255,r=Math.max(i,o,s),n=Math.min(i,o,s),a=(r+n)/2;if(r===n)e=t=0;else{var d=r-n;switch(t=a>.5?d/(2-r-n):d/(r+n),r){case i:e=(o-s)/d+(s>o?6:0);break;case o:e=(s-i)/d+2;break;case s:e=(i-o)/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,l=this.toRgb(),i=l.r/255,o=l.g/255,s=l.b/255,r=Math.max(i,o,s),n=Math.min(i,o,s),a=r,d=r-n;if(t=0===r?0:d/r,r===n)e=t=0;else{switch(r){case i:e=(o-s)/d+(s>o?6:0);break;case o:e=(s-i)/d+2;break;case s:e=(i-o)/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 l))throw"getDistanceLuminosityFrom requires a Color object";var t=this.toLuminosity(),i=e.toLuminosity();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)},getMaxContrastColor:function(){var e=this.toLuminosity(),t=e>=.5?"000000":"ffffff";return new l(t)},getReadableContrastingColor:function(e,i){if(!(e instanceof l))return this;var o=i===t?5:i,s=e.getDistanceLuminosityFrom(this),r=e.getMaxContrastColor(),n=r.getDistanceLuminosityFrom(e);if(o>=n)return r;if(s>=o)return this;for(var a=0===r.toInt()?-1:1;o>s&&(this.l(a,!0),s=this.getDistanceLuminosityFrom(e),0!==this._color&&16777215!==this._color););return this},a:function(e){if(e===t)return this._alpha;var l=parseFloat(e);return isNaN(l)?this._error():(this._alpha=l,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 l=i[e];return function(i,o){var s=this._spaceFunc("to",l.space);return i===t?s[e]:(o===!0&&(i=s[e]+i),l.mod&&(i%=l.mod),l.range&&(i=i<l.range[0]?l.range[0]:i>l.range[1]?l.range[1]:i),s[e]=i,this._spaceFunc("from",l.space,s))}},_spaceFunc:function(e,t,l){var i=t||this._hSpace,o=e+i.charAt(0).toUpperCase()+i.substr(1);return this[o](l)}};var i={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 o in i)i.hasOwnProperty(o)&&(l.fn[o]=l.fn._partial(o));"object"==typeof exports?module.exports=l:e.Color=l}(this),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({action:"render_icon_selector"},FLIconSelector._getContentComplete)):FLIconSelector._lightbox.open(),FLIconSelector._lightbox.on("icon-selected",function(t,l){FLIconSelector._lightbox.off("icon-selected"),FLIconSelector._lightbox.close(),e(l)})},_render:function(){FLIconSelector._lightbox=new FLLightbox({className:"fl-icon-selector"}),FLIconSelector._rendered=!0},_getContentComplete:function(t){var l=JSON.parse(t);FLIconSelector._content=l.html,FLIconSelector._lightbox.setContent(l.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(),l=e(".fl-icons-filter-text").val();"all"==t?e(".fl-icons-section").show():(e(".fl-icons-section").hide(),e(".fl-"+t).show()),FLIconSelector._filterText=l,""!==l?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){FLLightbox=function(e){this._init(e),this._render(),this._bind()},FLLightbox.closeParent=function(t){var l=e(t).closest(".fl-lightbox-wrap").attr("data-instance-id");FLLightbox._instances[l].close()},FLLightbox._instances={},FLLightbox.prototype={_id:null,_node:null,_visible:!1,_resizeTimer:null,_draggable:!1,_defaults:{className:"",destroyOnClose:!1},open:function(e){this._node.show(),this._visible=!0,"undefined"!=typeof e?this.setContent(e):this._resize(),this.trigger("open")},close:function(){this._node.hide(),this._visible=!1,this.trigger("close"),this._defaults.destroyOnClose&&this.destroy()},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){this._node.off(e)},trigger:function(e,t){this._node.trigger(e,t)},draggable:function(e){var t=this._node.find(".fl-lightbox-mask"),l=this._node.find(".fl-lightbox");e="undefined"==typeof e?!1:e,this._draggable&&l.draggable("destroy"),e?(this._unbind(),this._draggable=!0,t.hide(),l.draggable({cursor:"move",handle:e.handle||""})):(t.show(),this._bind(),this._draggable=!1),this._resize()},destroy:function(){e(window).off("resize.fl-lightbox-"+this._id),this._node.empty(),this._node.remove(),FLLightbox._instances[this._id]="undefined";try{delete FLLightbox._instances[this._id]}catch(t){}},_init:function(t){var l=0,i=null;for(i in FLLightbox._instances)l++;this._defaults=e.extend({},this._defaults,t),this._id=(new Date).getTime()+l,FLLightbox._instances[this._id]=this},_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,e.proxy(this._delayedResize,this))},_unbind:function(){e(window).off("resize.fl-lightbox-"+this._id)},_delayedResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(e.proxy(this._resize,this),250)},_resize:function(){if(this._visible){var t=this._node.find(".fl-lightbox"),l=t.height(),i=t.width(),o=e(window),s=o.height(),r=o.width(),n="0px",a=(r-i)/2-30+"px";t.css({margin:"0px",top:"auto",left:"auto"}),s-80>l&&(n=(s-l)/2-40+"px"),this._draggable?(t.css("top",n),t.css("left",FLBuilderConfig.isRtl?"-"+a:a)):(t.css("margin-top",n),t.css("margin-left","auto"),t.css("margin-right","auto"))}},_onKeypress:function(e){27==e.which&&this._visible&&this.close()}}}(jQuery),function(e){FLStyleSheet=function(){},FLStyleSheet.prototype={_sheet:null,_sheetElement:null,updateRule:function(e,t,l){this._createSheet();for(var i=this._sheet.cssRules?this._sheet.cssRules:this._sheet.rules,o=null,s=0;s<i.length;s++)i[s].selectorText.toLowerCase()==e.toLowerCase()&&(o=i[s]);if(o)if("object"==typeof t)for(s in t)o.style[this._toCamelCase(s)]=t[s];else o.style[this._toCamelCase(t)]=l;else this.addRule(e,t,l)},addRule:function(e,t,l){this._createSheet();var i="",o="";if("object"==typeof t)for(o in t)i+=o+":"+t[o]+";";else i=t+":"+l+";";this._sheet.insertRule?this._sheet.insertRule(e+" { "+i+" }",this._sheet.cssRules.length):this._sheet.addRule(e,i)},remove:function(){this._sheetElement&&(this._sheetElement.remove(),this._sheetElement=null),this._sheet&&(this._sheet=null)},_createSheet:function(){this._sheet||(this._sheetElement=e('<style type="text/css"></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);
languages/it_IT.mo CHANGED
Binary file
languages/it_IT.po CHANGED
@@ -1,277 +1,274 @@
1
  msgid ""
2
  msgstr ""
3
- "Project-Id-Version: Beaver Builder Plugin (Agency Version) v1.7\n"
4
  "Report-Msgid-Bugs-To: \n"
5
  "POT-Creation-Date: \n"
6
- "PO-Revision-Date: 2016-01-21 13:02+0100\n"
7
  "Last-Translator: Alessandro Curci <hantarex@gmail.com>\n"
8
  "Language-Team: \n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
  "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
- "X-Generator: Poedit 1.5.4\n"
 
 
14
  "X-Poedit-SourceCharset: utf-8\n"
15
- "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
16
- "_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2\n"
17
  "X-Poedit-Basepath: ../\n"
18
- "X-Textdomain-Support: yes\n"
19
- "Language: it_IT\n"
20
  "X-Poedit-SearchPath-0: .\n"
 
21
 
22
- # @ fl-builder
23
  #: classes/class-fl-builder-admin-settings.php:116
24
  #, php-format
 
25
  msgctxt "%s stands for custom branded \"Page Builder\" name."
26
  msgid "%s Settings"
27
  msgstr "Impostazioni %s"
28
 
29
- # @ fl-builder
30
  #: classes/class-fl-builder-admin-settings.php:133
 
31
  msgid "Settings updated!"
32
  msgstr "Impostazioni aggiornate!"
33
 
34
- # @ fl-builder
35
  #: classes/class-fl-builder-admin-settings.php:147
 
36
  msgid "License"
37
  msgstr "Licenza"
38
 
39
- # @ fl-builder
40
  #: classes/class-fl-builder-admin-settings.php:151
41
  #: includes/admin-settings-upgrade.php:3
 
42
  msgid "Upgrade"
43
  msgstr "Aggiornamento"
44
 
45
- # @ fl-builder
46
  #: classes/class-fl-builder-admin-settings.php:155
47
  #: includes/global-settings.php:90
 
48
  msgid "Modules"
49
  msgstr "Moduli"
50
 
51
- # @ fl-builder
52
  #: classes/class-fl-builder-admin-settings.php:159
53
  #: classes/class-fl-builder.php:663
 
54
  msgid "Templates"
55
  msgstr "Modelli"
56
 
57
- # @ fl-builder
58
  #: classes/class-fl-builder-admin-settings.php:163
59
  #: includes/admin-settings-post-types.php:3
 
60
  msgid "Post Types"
61
  msgstr "Tipi di post"
62
 
63
- # @ fl-builder
64
  #: classes/class-fl-builder-admin-settings.php:167
65
  #: modules/icon-group/icon-group.php:28
66
  #: modules/post-carousel/post-carousel.php:289
67
  #: modules/post-grid/post-grid.php:266
 
68
  msgid "Icons"
69
  msgstr "Icone"
70
 
71
- # @ fl-builder
72
  #: classes/class-fl-builder-admin-settings.php:171
 
73
  msgid "Editing"
74
  msgstr "Modifica"
75
 
76
- # @ fl-builder
77
  #: classes/class-fl-builder-admin-settings.php:175
 
78
  msgid "Branding"
79
  msgstr "Branding"
80
 
81
- # @ fl-builder
82
  #: classes/class-fl-builder-admin-settings.php:179
 
83
  msgid "Help Button"
84
  msgstr "Pulsante Aiuto"
85
 
86
- # @ fl-builder
87
  #: classes/class-fl-builder-admin-settings.php:183
88
  #: includes/admin-settings-cache.php:3
 
89
  msgid "Cache"
90
  msgstr "Cache"
91
 
92
- # @ fl-builder
93
  #: classes/class-fl-builder-admin-settings.php:187
94
  #: includes/admin-settings-uninstall.php:3
95
  #: includes/admin-settings-uninstall.php:15
 
96
  msgid "Uninstall"
97
  msgstr "Disinstalla"
98
 
99
- # @ fl-builder
100
  #: classes/class-fl-builder-admin-settings.php:439
 
101
  msgid "Error! You must have at least one icon set enabled."
102
  msgstr "Errore! Devi avere almeno un set di icone abilitato."
103
 
104
- # @ fl-builder
105
  #: classes/class-fl-builder-admin-settings.php:481
 
106
  msgid "Error! Could not unzip file."
107
  msgstr "Errore! Non è stato possibile decomprimere il file."
108
 
109
- # @ fl-builder
110
  #: classes/class-fl-builder-admin-settings.php:515
 
111
  msgid "Error! Please upload an icon set from either Icomoon or Fontello."
112
  msgstr "Errore! Per favore carica un set di icone da Iconmoon o Fontello."
113
 
114
- # @ fl-builder
115
  #: classes/class-fl-builder-admin-settings.php:632
 
116
  msgid "Error! Please enter an iframe for the video embed code."
117
  msgstr "Errore! Per favore inserisci un iframe per il codice video embed."
118
 
119
- # @ fl-builder
120
  #: classes/class-fl-builder-admin-settings.php:650
 
121
  msgid "Error! You must have at least one feature of the help button enabled."
122
  msgstr "Errore! Devi avere almeno una funzione del bottone aiuto abilitata."
123
 
124
- # @ fl-builder
125
  #: classes/class-fl-builder-admin.php:45
126
  #, php-format
127
- msgid ""
128
- "This version of the <strong>Page Builder</strong> plugin is not compatible "
129
- "with WordPress Multisite. <a%s>Please upgrade</a> to the Multisite version "
130
- "of this plugin."
131
- msgstr ""
132
- "Questa versione del plugin <strong>Page Builder</strong> non è compatibile "
133
- "con WordPress Multisite. <a%s>Si prega di aggiornare</a> alla versione "
134
- "Multisite di questo plugin."
135
 
136
- # @ fl-builder
137
  #: classes/class-fl-builder-admin.php:55
138
- msgid ""
139
- "The <strong>Page Builder</strong> plugin requires WordPress version 3.5 or "
140
- "greater. Please update WordPress before activating the plugin."
141
- msgstr ""
142
- "Il plugin <strong>Page Builder</strong> richiede WordPress versione 3.5 o "
143
- "superiore. Si prega di aggiornare WordPress prima di attivare il plugin."
144
 
145
- # @ fl-builder
146
  #: classes/class-fl-builder-admin.php:112
147
  #, php-format
 
148
  msgid "Page Builder activated! <a%s>Click here</a> to enable remote updates."
149
- msgstr ""
150
- "Page Builder attivato! <a%s>Clicca qui</a> per attivare gli aggiornamenti "
151
- "remoti."
152
 
153
- # @ fl-builder
154
  #: classes/class-fl-builder-admin.php:238
 
155
  msgctxt "Plugin action link label."
156
  msgid "Upgrade"
157
  msgstr "Aggiorna"
158
 
159
- # @ fl-builder
160
  #: classes/class-fl-builder-admin.php:253
161
  #: classes/class-fl-builder-model.php:4405
 
162
  msgid "Page Builder"
163
  msgstr "Page Builder"
164
 
165
- # @ fl-builder
166
  #: classes/class-fl-builder-model.php:1838
167
  #, php-format
 
168
  msgctxt "%s stands for the module filename"
169
- msgid ""
170
- "A module with the filename %s.php already exists! Please namespace your "
171
- "module filenames to ensure compatibility with Beaver Builder."
172
- msgstr ""
173
- "Esiste già un modulo con il nome file %s.php! Per favore usa un namespace "
174
- "nel nome file del tuo modulo per assicurare la compatibilità con Beaver "
175
- "Builder."
176
 
177
- # @ fl-builder
178
  #: classes/class-fl-builder-model.php:1896
179
- #: classes/class-fl-builder-model.php:1960 modules/audio/audio.php:21
180
- #: modules/button/button.php:16 modules/heading/heading.php:16
181
- #: modules/html/html.php:16 modules/photo/photo.php:27
182
- #: modules/rich-text/rich-text.php:16 modules/separator/separator.php:16
 
 
 
 
183
  #: modules/video/video.php:21
 
184
  msgid "Basic Modules"
185
  msgstr "Moduli base"
186
 
187
- # @ fl-builder
188
  #: classes/class-fl-builder-model.php:1897
189
- #: classes/class-fl-builder-model.php:1961 modules/accordion/accordion.php:16
190
- #: modules/callout/callout.php:16 modules/contact-form/contact-form.php:16
 
 
191
  #: modules/content-slider/content-slider.php:16
192
- #: modules/countdown/countdown.php:16 modules/cta/cta.php:16
193
- #: modules/gallery/gallery.php:16 modules/icon/icon.php:16
194
- #: modules/icon-group/icon-group.php:16 modules/map/map.php:16
195
- #: modules/menu/menu.php:16 modules/numbers/numbers.php:16
 
 
 
 
196
  #: modules/post-carousel/post-carousel.php:16
197
- #: modules/post-grid/post-grid.php:16 modules/post-slider/post-slider.php:16
198
- #: modules/pricing-table/pricing-table.php:16 modules/sidebar/sidebar.php:16
 
 
199
  #: modules/slideshow/slideshow.php:16
200
  #: modules/social-buttons/social-buttons.php:16
201
- #: modules/subscribe-form/subscribe-form.php:20 modules/tabs/tabs.php:16
 
202
  #: modules/testimonials/testimonials.php:16
203
  #: modules/woocommerce/woocommerce.php:18
 
204
  msgid "Advanced Modules"
205
  msgstr "Moduli avanzati"
206
 
207
- # @ fl-builder
208
  #: classes/class-fl-builder-model.php:1898
209
  #: classes/class-fl-builder-model.php:1962
 
210
  msgid "Other Modules"
211
  msgstr "Altri moduli"
212
 
213
- # @ fl-builder
214
  #: classes/class-fl-builder-model.php:1899
215
  #: classes/class-fl-builder-model.php:1963
216
- #: includes/admin-settings-modules.php:32 includes/ui-panel.php:56
 
217
  #: modules/widget/widget.php:16
 
218
  msgid "WordPress Widgets"
219
  msgstr "Widget di WordPress"
220
 
221
- # @ fl-builder
222
  #: classes/class-fl-builder-model.php:2679
223
  #, php-format
 
224
  msgctxt "%s stands for post/page title."
225
  msgid "Copy of %s"
226
  msgstr "Copia di %s"
227
 
228
- # @ fl-builder
229
  #: classes/class-fl-builder-model.php:3287
 
230
  msgctxt "Default user template category."
231
  msgid "Uncategorized"
232
  msgstr "Senza categoria"
233
 
234
- # @ fl-builder
235
  #: classes/class-fl-builder-model.php:4333
 
236
  msgid "Home Pages"
237
  msgstr "Pagine home"
238
 
239
- # @ fl-builder
240
  #: classes/class-fl-builder-model.php:4334
 
241
  msgid "Content Pages"
242
  msgstr "Pagine di contenuto"
243
 
244
- # @ fl-builder
245
- #: classes/class-fl-builder-photo.php:95
246
  #: classes/class-fl-builder-photo.php:100
 
 
247
  msgctxt "Image size."
248
  msgid "Full Size"
249
  msgstr "Piena larghezza"
250
 
251
- # @ fl-builder
252
- #: classes/class-fl-builder-photo.php:101
253
  msgctxt "Image size."
254
  msgid "Large"
255
  msgstr "Grande"
256
 
257
- # @ fl-builder
258
- #: classes/class-fl-builder-photo.php:102
259
  msgctxt "Image size."
260
  msgid "Medium"
261
  msgstr "Media"
262
 
263
- # @ fl-builder
264
- #: classes/class-fl-builder-photo.php:103
265
  msgctxt "Image size."
266
  msgid "Thumbnail"
267
  msgstr "Miniatura"
268
 
269
- # @ fl-builder
270
  #: classes/class-fl-builder-service-activecampaign.php:69
 
271
  msgid "Error: You must provide an API URL."
272
  msgstr "Errore: devi fornire una API URL."
273
 
274
- # @ fl-builder
275
  #: classes/class-fl-builder-service-activecampaign.php:73
276
  #: classes/class-fl-builder-service-campaign-monitor.php:55
277
  #: classes/class-fl-builder-service-campayn.php:106
@@ -284,29 +281,25 @@ msgstr "Errore: devi fornire una API URL."
284
  #: classes/class-fl-builder-service-mailchimp.php:67
285
  #: classes/class-fl-builder-service-mailrelay.php:82
286
  #: classes/class-fl-builder-service-sendy.php:72
 
287
  msgid "Error: You must provide an API key."
288
  msgstr "Errore: devi fornire una chiave API."
289
 
290
- # @ fl-builder
291
  #: classes/class-fl-builder-service-activecampaign.php:81
 
292
  msgid "Error: Please check your API URL and API key."
293
  msgstr "Errore: si prega di verificare la API URL e la chiave API."
294
 
295
- # @ fl-builder
296
  #: classes/class-fl-builder-service-activecampaign.php:108
 
297
  msgid "API URL"
298
  msgstr "API URL"
299
 
300
- # @ fl-builder
301
  #: classes/class-fl-builder-service-activecampaign.php:109
302
- msgid ""
303
- "Your API url can be found in your ActiveCampaign account under My Settings > "
304
- "API."
305
- msgstr ""
306
- "Puoi trovare la tua API URL nell'account di ActiveCampaign sotto My Settings "
307
- "> API."
308
 
309
- # @ fl-builder
310
  #: classes/class-fl-builder-service-activecampaign.php:119
311
  #: classes/class-fl-builder-service-campaign-monitor.php:88
312
  #: classes/class-fl-builder-service-campayn.php:149
@@ -319,19 +312,15 @@ msgstr ""
319
  #: classes/class-fl-builder-service-mailchimp.php:100
320
  #: classes/class-fl-builder-service-mailrelay.php:130
321
  #: classes/class-fl-builder-service-sendy.php:126
 
322
  msgid "API Key"
323
  msgstr "Chiave API"
324
 
325
- # @ fl-builder
326
  #: classes/class-fl-builder-service-activecampaign.php:120
327
- msgid ""
328
- "Your API key can be found in your ActiveCampaign account under My Settings > "
329
- "API."
330
- msgstr ""
331
- "Puoi trovare la tua chiave API nell'account di ActiveCampaign sotto My "
332
- "Settings > API."
333
 
334
- # @ fl-builder
335
  #: classes/class-fl-builder-service-activecampaign.php:169
336
  #: classes/class-fl-builder-service-aweber.php:182
337
  #: classes/class-fl-builder-service-campaign-monitor.php:148
@@ -347,12 +336,13 @@ msgstr ""
347
  #: classes/class-fl-builder-service-mailpoet.php:92
348
  #: classes/class-fl-builder-service-mailrelay.php:187
349
  #: classes/class-fl-builder-service-sendinblue.php:161
350
- #: classes/class-fl-builder-services.php:309 includes/service-settings.php:21
 
351
  #: modules/woocommerce/woocommerce.php:61
 
352
  msgid "Choose..."
353
  msgstr "Scegli..."
354
 
355
- # @ fl-builder
356
  #: classes/class-fl-builder-service-activecampaign.php:181
357
  #: classes/class-fl-builder-service-aweber.php:192
358
  #: classes/class-fl-builder-service-campaign-monitor.php:209
@@ -365,3845 +355,3825 @@ msgstr "Scegli..."
365
  #: classes/class-fl-builder-service-mailchimp.php:187
366
  #: classes/class-fl-builder-service-mailpoet.php:102
367
  #: classes/class-fl-builder-service-sendinblue.php:171
 
368
  msgctxt "An email list from a third party provider."
369
  msgid "List"
370
  msgstr "Lista"
371
 
372
- # @ fl-builder
373
  #: classes/class-fl-builder-service-activecampaign.php:208
374
- msgid ""
375
- "There was an error subscribing to ActiveCampaign. The account is no longer "
376
- "connected."
377
- msgstr ""
378
- "Si è verificato un errore nell'iscrizione ad ActiveCampaign. L'account non è "
379
- "più connesso. "
380
 
381
- # @ fl-builder
382
  #: classes/class-fl-builder-service-activecampaign.php:239
 
383
  msgid "Error: Invalid API data."
384
  msgstr "Errore: dati API non validi."
385
 
386
- # @ fl-builder
387
  #: classes/class-fl-builder-service-aweber.php:72
 
388
  msgid "Error: You must provide an Authorization Code."
389
  msgstr "Errore: devi fornire un codice di autorizzazione."
390
 
391
- # @ fl-builder
392
  #: classes/class-fl-builder-service-aweber.php:76
 
393
  msgid "Error: Please enter a valid Authorization Code."
394
  msgstr "Errore: si prega di inserire un codice di autorizzazione valido."
395
 
396
- # @ fl-builder
397
  #: classes/class-fl-builder-service-aweber.php:127
 
398
  msgid "Authorization Code"
399
  msgstr "Codice di autorizzazione"
400
 
401
- # @ fl-builder
402
  #: classes/class-fl-builder-service-aweber.php:128
403
  #, php-format
404
- msgid ""
405
- "Please register this website with AWeber to get your Authorization Code. <a"
406
- "%s>Register Now</a>"
407
- msgstr ""
408
- "Si prega di registrare questo sito su AWeber per ottenere il tuo codice di "
409
- "autorizzazione. <a%s>Registra ora</a>"
410
 
411
- # @ fl-builder
412
  #: classes/class-fl-builder-service-aweber.php:219
413
- msgid ""
414
- "There was an error subscribing to AWeber. The account is no longer connected."
415
- msgstr ""
416
- "Si è verificato un errore nell'iscrizione ad Aweber. L'account non è più "
417
- "connesso. "
418
 
419
- # @ fl-builder
420
  #: classes/class-fl-builder-service-aweber.php:242
 
421
  msgid "There was an error connecting to AWeber. Please try again."
422
- msgstr ""
423
- "Si è verificato un errore nella connessione ad AWeber. Si prega di riprovare."
424
 
425
- # @ fl-builder
426
  #: classes/class-fl-builder-service-aweber.php:247
427
  #, php-format
 
428
  msgid "There was an error subscribing to AWeber. %s"
429
  msgstr "Si è verificato un'errore nell'iscrizione ad AWeber. %s"
430
 
431
- # @ fl-builder
432
  #: classes/class-fl-builder-service-campaign-monitor.php:67
433
  #: classes/class-fl-builder-service-campaign-monitor.php:129
434
  #: classes/class-fl-builder-service-convertkit.php:131
435
  #: classes/class-fl-builder-service-getresponse.php:76
436
  #: classes/class-fl-builder-service-getresponse.php:132
437
  #: classes/class-fl-builder-service-hatchbuck.php:63
 
438
  msgid "Error: Please check your API key."
439
  msgstr "Errore: si prega di verificare la chiave API."
440
 
441
- # @ fl-builder
442
  #: classes/class-fl-builder-service-campaign-monitor.php:89
443
- msgid ""
444
- "Your API key can be found in your Campaign Monitor account under Account "
445
- "Settings > API Key."
446
- msgstr ""
447
- "Puoi trovare la tua chiave API nell'account Campaign Monitor sotto "
448
- "Impostazioni Account > Chiave API."
449
 
450
- # @ fl-builder
451
  #: classes/class-fl-builder-service-campaign-monitor.php:158
 
452
  msgctxt "A client account in Campaign Monitor."
453
  msgid "Client"
454
  msgstr "Client"
455
 
456
- # @ fl-builder
457
  #: classes/class-fl-builder-service-campaign-monitor.php:236
458
- msgid ""
459
- "There was an error subscribing to Campaign Monitor. The account is no longer "
460
- "connected."
461
- msgstr ""
462
- "Si è verificato un errore nell'iscrizione a Campaign Monitor. L'account non "
463
- "è più connesso."
464
 
465
- # @ fl-builder
466
  #: classes/class-fl-builder-service-campaign-monitor.php:253
 
467
  msgid "There was an error subscribing to Campaign Monitor."
468
  msgstr "Si è verificato un'errore nell'iscrizione a Campaign Monitor."
469
 
470
- # @ fl-builder
471
  #: classes/class-fl-builder-service-constant-contact.php:52
 
472
  msgid "Error: You must provide an access token."
473
  msgstr "Errore: devi fornire un token di accesso."
474
 
475
- # @ fl-builder
476
  #: classes/class-fl-builder-service-constant-contact.php:61
477
  #: classes/class-fl-builder-service-constant-contact.php:134
478
  #, php-format
 
479
  msgid "Error: Could not connect to Constant Contact. %s"
480
  msgstr "Errore: impossibile connettersi a Constant Contact. %s "
481
 
482
- # @ fl-builder
483
  #: classes/class-fl-builder-service-constant-contact.php:89
 
484
  msgid "Your Constant Contact API key."
485
  msgstr "La tua chiave API Constant Contact."
486
 
487
- # @ fl-builder
488
  #: classes/class-fl-builder-service-constant-contact.php:99
 
489
  msgid "Access Token"
490
  msgstr "Token di accesso"
491
 
492
- # @ fl-builder
493
  #: classes/class-fl-builder-service-constant-contact.php:100
 
494
  msgid "Your Constant Contact access token."
495
  msgstr "Il tuo token di accesso a Constant Contact"
496
 
497
- # @ fl-builder
498
  #: classes/class-fl-builder-service-constant-contact.php:101
499
  #, php-format
500
- msgid ""
501
- "You must register a <a%s>Developer Account</a> with Constant Contact to "
502
- "obtain an API key and access token. Please see <a%s>Getting an API key</a> "
503
- "for complete instructions."
504
- msgstr ""
505
- "Devi registrare un <a%s>Account sviluppatore</a> su Constant Contact per "
506
- "ottenere una chiave API e un token di accesso, Si prega di consultare <a"
507
- "%s>Prendere una chiave API</a> per istruzioni complete."
508
 
509
- # @ fl-builder
510
  #: classes/class-fl-builder-service-constant-contact.php:193
511
- msgid ""
512
- "There was an error subscribing to Constant Contact. The account is no longer "
513
- "connected."
514
- msgstr ""
515
- "Si è verificato un errore nell'iscrizione a Constant Contact. L'account non "
516
- "è più connesso."
517
 
518
- # @ fl-builder
519
  #: classes/class-fl-builder-service-constant-contact.php:245
520
  #: classes/class-fl-builder-service-constant-contact.php:279
521
  #, php-format
 
522
  msgid "There was an error subscribing to Constant Contact. %s"
523
  msgstr "Si è verificato un errore nell'iscrizione a Constant Contact. %s"
524
 
525
- # @ fl-builder
526
  #: classes/class-fl-builder-service-email-address.php:39
527
  #: classes/class-fl-builder-service-madmimi.php:69
 
528
  msgid "Error: You must provide an email address."
529
  msgstr "Errore: devi fornire un indirizzo email."
530
 
531
- # @ fl-builder
532
  #: classes/class-fl-builder-service-email-address.php:63
533
  #: classes/class-fl-builder-service-madmimi.php:110
534
  #: modules/subscribe-form/includes/frontend.php:11
 
535
  msgid "Email Address"
536
  msgstr "Indirizzo email"
537
 
538
- # @ fl-builder
539
  #: classes/class-fl-builder-service-email-address.php:110
 
540
  msgid "There was an error subscribing. The account is no longer connected."
541
- msgstr ""
542
- "Si è verificato un errore nell'iscrizione. L'account non è più connesso. "
543
 
544
- # @ fl-builder
545
  #: classes/class-fl-builder-service-email-address.php:114
 
546
  msgid "Subscribe Form Signup"
547
  msgstr "Modulo di iscrizione"
548
 
549
- # @ fl-builder
550
  #: classes/class-fl-builder-service-email-address.php:115
551
  #: modules/contact-form/includes/frontend.php:21
 
552
  msgid "Email"
553
  msgstr "Email"
554
 
555
- # @ fl-builder
556
  #: classes/class-fl-builder-service-email-address.php:118
 
557
  msgid "Name"
558
  msgstr "Nome"
559
 
560
- # @ fl-builder
561
  #: classes/class-fl-builder-service-email-address.php:124
562
  #: modules/subscribe-form/subscribe-form.php:84
 
563
  msgid "There was an error subscribing. Please try again."
564
  msgstr "Si è verificato un errore nell'iscrizione. Riprova, per favore."
565
 
566
- # @ fl-builder
567
  #: classes/class-fl-builder-service-getresponse.php:101
568
- msgid ""
569
- "Your API key can be found in your GetResponse account under My Account > "
570
- "GetResponse API."
571
- msgstr ""
572
- "Puoi trovare la tua chiave API nel tuo account su GetResponse sotto Il mio "
573
- "account > GetResponse API."
574
 
575
- # @ fl-builder
576
  #: classes/class-fl-builder-service-getresponse.php:191
577
- msgid ""
578
- "There was an error subscribing to GetResponse. The account is no longer "
579
- "connected."
580
- msgstr ""
581
- "Si è verificato un errore nell'iscrizione a GetResponse. L'account non è più "
582
- "connesso."
583
 
584
- # @ fl-builder
585
  #: classes/class-fl-builder-service-getresponse.php:202
586
  #, php-format
 
587
  msgid "There was an error subscribing to GetResponse. %s"
588
  msgstr "Si è verificato un errore nell'iscrizione a GetResponse. %s"
589
 
590
- # @ fl-builder
591
  #: classes/class-fl-builder-service-hatchbuck.php:88
592
- msgid ""
593
- "Your API key can be found in your Hatchbuck account under Account Settings > "
594
- "Web API."
595
- msgstr ""
596
- "La tua chiave API può essere trovata nel tuo account Hatchbuck in Account "
597
- "Settings > Web API."
598
 
599
- # @ fl-builder
600
  #: classes/class-fl-builder-service-hatchbuck.php:134
 
601
  msgctxt "A tag to add to contacts in Hatchbuck when they subscribe."
602
  msgid "Tag"
603
  msgstr "Tag"
604
 
605
- # @ fl-builder
606
  #: classes/class-fl-builder-service-hatchbuck.php:161
607
- msgid ""
608
- "There was an error subscribing to Hatchbuck. The account is no longer "
609
- "connected."
610
- msgstr ""
611
- "Si è verificato un errore nell'iscrizione a Hatchbuck. L'account non è più "
612
- "connesso."
613
 
614
- # @ fl-builder
615
  #: classes/class-fl-builder-service-hatchbuck.php:190
 
616
  msgid "There was an error subscribing to Hatchbuck. The API key is invalid."
617
- msgstr ""
618
- "Si è verificato un errore nell'iscrizione a Hatchbuck. La chiave API non è "
619
- "valida."
620
 
621
- # @ fl-builder
622
  #: classes/class-fl-builder-service-hatchbuck.php:200
623
  #: classes/class-fl-builder-service-hatchbuck.php:232
 
624
  msgid "There was an error subscribing to Hatchbuck."
625
  msgstr "Si è verificato un'errore nell'iscrizione a Hatchbuck."
626
 
627
- # @ fl-builder
628
  #: classes/class-fl-builder-service-icontact.php:75
 
629
  msgid "Error: You must provide a username."
630
  msgstr "Errore: devi fornire un nome utente."
631
 
632
- # @ fl-builder
633
  #: classes/class-fl-builder-service-icontact.php:79
 
634
  msgid "Error: You must provide a app ID."
635
  msgstr "Errore: devi fornire un ID applicazione."
636
 
637
- # @ fl-builder
638
  #: classes/class-fl-builder-service-icontact.php:83
 
639
  msgid "Error: You must provide a app password."
640
  msgstr "Errore: devi fornire una password applicazione."
641
 
642
- # @ fl-builder
643
  #: classes/class-fl-builder-service-icontact.php:104
644
  #: classes/class-fl-builder-service-icontact.php:188
645
  #, php-format
 
646
  msgid "Error: Could not connect to iContact. %s"
647
  msgstr "Errore: non è possibile connettersi ad iContact. %s"
648
 
649
- # @ fl-builder
650
  #: classes/class-fl-builder-service-icontact.php:125
 
651
  msgid "Username"
652
  msgstr "Nome utente"
653
 
654
- # @ fl-builder
655
  #: classes/class-fl-builder-service-icontact.php:126
 
656
  msgid "Your iContact username."
657
  msgstr "Il tuo nome utente iContact."
658
 
659
- # @ fl-builder
660
  #: classes/class-fl-builder-service-icontact.php:136
661
  #: classes/class-fl-builder-service-infusionsoft.php:118
 
662
  msgid "App ID"
663
  msgstr "ID applicazione"
664
 
665
- # @ fl-builder
666
  #: classes/class-fl-builder-service-icontact.php:137
 
667
  msgid "Your iContact app ID."
668
  msgstr "Il tuo ID applicazione iContact."
669
 
670
- # @ fl-builder
671
  #: classes/class-fl-builder-service-icontact.php:147
 
672
  msgid "App Password"
673
  msgstr "Password applicazione"
674
 
675
- # @ fl-builder
676
  #: classes/class-fl-builder-service-icontact.php:148
 
677
  msgid "Your iContact app password."
678
  msgstr "La tua password applicazione iContact."
679
 
680
- # @ fl-builder
681
  #: classes/class-fl-builder-service-icontact.php:149
682
  #, php-format
683
- msgid ""
684
- "You must <a%s>create an app</a> in iContact to obtain an app ID and "
685
- "password. Please see <a%s>the iContact docs</a> for complete instructions."
686
- msgstr ""
687
- "Devi <a%s>creare un'applicazione</a> in iContact per ottenere un ID "
688
- "applicazione e password. Si prega di consultare <a%s>la documentazione di "
689
- "iContact</a> per le istruzioni complete."
690
 
691
- # @ fl-builder
692
  #: classes/class-fl-builder-service-icontact.php:244
693
- msgid ""
694
- "There was an error subscribing to iContact. The account is no longer "
695
- "connected."
696
- msgstr ""
697
- "Si è verificato un errore nell'iscrizione ad iContact. L'account non è più "
698
- "connesso."
699
 
700
- # @ fl-builder
701
  #: classes/class-fl-builder-service-icontact.php:280
702
  #, php-format
 
703
  msgid "There was an error subscribing to iContact. %s"
704
  msgstr "Si è verificato un errore nell'iscrizione a iContact. %s"
705
 
706
- # @ fl-builder
707
  #: classes/class-fl-builder-service-infusionsoft.php:49
708
  #, php-format
 
709
  msgid "There was an error connecting to Infusionsoft. %s"
710
  msgstr "Si è verificato un errore nella connessione a Infusionsoft. %s"
711
 
712
- # @ fl-builder
713
  #: classes/class-fl-builder-service-infusionsoft.php:83
 
714
  msgid "Error: You must provide an app ID."
715
  msgstr "Errore: devi fornire una app ID."
716
 
717
- # @ fl-builder
718
  #: classes/class-fl-builder-service-infusionsoft.php:119
719
- msgid ""
720
- "Your App ID can be found in the URL for your account. For example, if the "
721
- "URL for your account is myaccount.infusionsoft.com, your App ID would be "
722
- "<strong>myaccount</strong>."
723
- msgstr ""
724
- "Il tuo App ID si può trovare nella URL del tuo account. Per esempio, se la "
725
- "URL del tuo account è myaccount.infusionsoft.com, la tua App ID sarà "
726
- "<strong>myaccount</strong>."
727
 
728
- # @ fl-builder
729
  #: classes/class-fl-builder-service-infusionsoft.php:130
730
- msgid ""
731
- "Your API key can be found in your Infusionsoft account under Admin > "
732
- "Settings > Application > API > Encrypted Key."
733
- msgstr ""
734
- "Puoi trovare la tua chiave API nel tuo account Infusionsoft sotto Admin > "
735
- "Settings > Application > API > Encrypted Key."
736
 
737
- # @ fl-builder
738
  #: classes/class-fl-builder-service-infusionsoft.php:242
739
- msgid ""
740
- "There was an error subscribing to Infusionsoft. The account is no longer "
741
- "connected."
742
- msgstr ""
743
- "Si è verificato un errore nell'iscrizione a Infusionsoft. L'account non è "
744
- "più connesso."
745
 
746
- # @ fl-builder
747
  #: classes/class-fl-builder-service-infusionsoft.php:291
748
  #, php-format
 
749
  msgid "There was an error subscribing to Infusionsoft. %s"
750
  msgstr "Si è verificato un errore nell'iscrizione a Infusionsoft. %s"
751
 
752
- # @ fl-builder
753
  #: classes/class-fl-builder-service-madmimi.php:83
 
754
  msgid "Unable to connect to Mad Mimi. Please check your credentials."
755
- msgstr ""
756
- "Impossibile connettersi a Mad Mimi. Si prega di verificare le credenziali."
757
 
758
- # @ fl-builder
759
  #: classes/class-fl-builder-service-madmimi.php:111
 
760
  msgid "The email address associated with your Mad Mimi account."
761
  msgstr "L'indirizzo email associato al tuo account Mad Mimi."
762
 
763
- # @ fl-builder
764
  #: classes/class-fl-builder-service-madmimi.php:122
765
- msgid ""
766
- "Your API key can be found in your Mad Mimi account under Account > Settings "
767
- "&amp; Billing > API."
768
- msgstr ""
769
- "Puoi trovare la tua chiave API nell'account Mad Mimi sotto Account > "
770
- "Settings &amp; Billing > API."
771
 
772
- # @ fl-builder
773
  #: classes/class-fl-builder-service-madmimi.php:156
774
- msgid ""
775
- "There was a problem retrieving your lists. Please check your API credentials."
776
- msgstr ""
777
- "Si è verificato un problema nell'ottenere le tue liste. Si prega di "
778
- "verificare le credenziali API."
779
 
780
- # @ fl-builder
781
  #: classes/class-fl-builder-service-madmimi.php:215
782
  #: classes/class-fl-builder-service-madmimi.php:242
783
- msgid ""
784
- "There was an error subscribing to Mad Mimi. The account is no longer "
785
- "connected."
786
- msgstr ""
787
- "Si è verificato un'errore nell'iscrizione a Mad Mimi. L'account non è più "
788
- "connesso."
789
 
790
- # @ fl-builder
791
  #: classes/class-fl-builder-service-mailchimp.php:101
792
- msgid ""
793
- "Your API key can be found in your MailChimp account under Account > Extras > "
794
- "API Keys."
795
- msgstr ""
796
- "Puoi trovare la tua chiave API nel tuo account MailChimp sotto Account > "
797
- "Extras > API Keys."
798
 
799
- # @ fl-builder
800
  #: classes/class-fl-builder-service-mailchimp.php:215
 
801
  msgid "No Group"
802
  msgstr "Nessun gruppo"
803
 
804
- # @ fl-builder
805
  #: classes/class-fl-builder-service-mailchimp.php:227
 
806
  msgctxt "MailChimp list group."
807
  msgid "Groups"
808
  msgstr "Gruppi"
809
 
810
- # @ fl-builder
811
  #: classes/class-fl-builder-service-mailchimp.php:255
812
- msgid ""
813
- "There was an error subscribing to MailChimp. The account is no longer "
814
- "connected."
815
- msgstr ""
816
- "Si è verificato un errore nell'iscrizione a MailChimp. L'account non è più "
817
- "connesso."
818
 
819
- # @ fl-builder
820
  #: classes/class-fl-builder-service-mailchimp.php:352
821
  #, php-format
 
822
  msgid "There was an error subscribing to MailChimp. %s"
823
  msgstr "Si è verificato un errore nell'iscrizione a MailChimp. %s"
824
 
825
- # @ fl-builder
826
  #: classes/class-fl-builder-service-mailpoet.php:73
 
827
  msgid "There was an error retrieveing your lists."
828
  msgstr "Si è verificato un'errore nell'ottenere le tue liste."
829
 
830
- # @ fl-builder
831
  #: classes/class-fl-builder-service-mailpoet.php:129
 
832
  msgid "There was an error subscribing. MailPoet is not installed."
833
  msgstr "Si è verificato un'errore nell'iscrizione. MailPoet non è installato."
834
 
835
- # @ fl-builder
836
  #: classes/class-fl-builder-service-sendinblue.php:67
 
837
  msgid "Error: You must provide an Access Key."
838
  msgstr "Errore: devi fornire una chiave di accesso."
839
 
840
- # @ fl-builder
841
- # @ default
842
  #: classes/class-fl-builder-service-sendinblue.php:76
843
  #: classes/class-fl-builder-service-sendinblue.php:136
 
844
  msgid "There was an error connecting to SendinBlue. Please try again."
845
- msgstr ""
846
- "Si è verificato un errore nella connessione a SendinBlue. Si prega di "
847
- "riprovare."
848
 
849
- # @ fl-builder
850
  #: classes/class-fl-builder-service-sendinblue.php:79
851
  #: classes/class-fl-builder-service-sendinblue.php:139
852
  #, php-format
 
853
  msgid "Error: Could not connect to SendinBlue. %s"
854
  msgstr "Errore: Impossibile connettersi a SendinBlue. %s"
855
 
856
- # @ fl-builder
857
  #: classes/class-fl-builder-service-sendinblue.php:103
 
858
  msgid "Access Key"
859
  msgstr "Chiave di accesso"
860
 
861
- # @ fl-builder
862
  #: classes/class-fl-builder-service-sendinblue.php:104
863
- msgid ""
864
- "Your Access Key can be found in your SendinBlue account under API & "
865
- "Integration > Manager Your Keys > Version 2.0 > Access Key."
866
- msgstr ""
867
- "Puoi trovare la tua chiave API nel tuo account SendinBlue sotto API & "
868
- "Integration > Manager Your Keys > Version 2.0 > Access Key."
869
 
870
- # @ fl-builder
871
  #: classes/class-fl-builder-service-sendinblue.php:198
872
- msgid ""
873
- "There was an error subscribing to SendinBlue. The account is no longer "
874
- "connected."
875
- msgstr ""
876
- "Si è verificato un errore nell'iscrizione a SendinBlue. L'account non è più "
877
- "connesso."
878
 
879
- # @ fl-builder
880
  #: classes/class-fl-builder-service-sendinblue.php:220
 
881
  msgid "There was an error subscribing to SendinBlue. Please try again."
882
- msgstr ""
883
- "Si è verificato un errore nell'iscrizione a SendinBlue. Si prega di "
884
- "riprovare."
885
 
886
- # @ fl-builder
887
  #: classes/class-fl-builder-service-sendinblue.php:223
888
  #, php-format
 
889
  msgid "Error: Could not subscribe to SendinBlue. %s"
890
  msgstr "Errore: Impossibile sottoscrivere SendinBlue . %s"
891
 
892
- # @ fl-builder
893
  #: classes/class-fl-builder-services.php:183
 
894
  msgctxt "Third party service such as MailChimp."
895
  msgid "Error: Missing service type."
896
  msgstr "Errore: tipo di servizio mancante."
897
 
898
- # @ fl-builder
899
  #: classes/class-fl-builder-services.php:186
 
900
  msgctxt "Connection data such as an API key."
901
  msgid "Error: Missing service data."
902
  msgstr "Errore: dati di servizio mancanti."
903
 
904
- # @ fl-builder
905
  #: classes/class-fl-builder-services.php:189
 
906
  msgctxt "Account name for a third party service such as MailChimp."
907
  msgid "Error: Missing account name."
908
  msgstr "Errore: nome account mancante."
909
 
910
- # @ fl-builder
911
  #: classes/class-fl-builder-services.php:198
 
912
  msgctxt "Account name for a third party service such as MailChimp."
913
  msgid "Error: An account with that name already exists."
914
  msgstr "Errore: esiste già un account con quel nome."
915
 
916
- # @ fl-builder
917
  #: classes/class-fl-builder-services.php:274
 
918
  msgid "Account Name"
919
  msgstr "Nome account"
920
 
921
- # @ fl-builder
922
  #: classes/class-fl-builder-services.php:275
923
- msgid ""
924
- "Used to identify this connection within the accounts list and can be "
925
- "anything you like."
926
- msgstr ""
927
- "Usato per identificare questo collegamento nella lista degli account e può "
928
- "essere ciò che preferisci."
929
 
930
- # @ fl-builder
931
  #: classes/class-fl-builder-services.php:288
 
932
  msgid "Connect"
933
  msgstr "Connetti"
934
 
935
- # @ fl-builder
936
  #: classes/class-fl-builder-services.php:316
 
937
  msgid "Add Account..."
938
  msgstr "Aggiungi account..."
939
 
940
- # @ fl-builder
941
  #: classes/class-fl-builder-services.php:323
 
942
  msgid "Account"
943
  msgstr "Account"
944
 
945
- # @ fl-builder
946
  #: classes/class-fl-builder-templates-override.php:49
 
947
  msgid "Error! Please enter a number for the site ID."
948
  msgstr "Errore! Si prega di inserire un numero di ID del sito."
949
 
950
- # @ fl-builder
951
  #: classes/class-fl-builder-templates-override.php:53
 
952
  msgid "Error! A site with that ID doesn't exist."
953
  msgstr "Errore! Non esiste un sito con quell'ID."
954
 
955
- # @ fl-builder
956
  #: classes/class-fl-builder.php:612
957
  #, php-format
 
958
  msgid "Template: %s"
959
  msgstr "Modello: %s"
960
 
961
- # @ fl-builder
962
  #: classes/class-fl-builder.php:647
 
963
  msgid "Upgrade!"
964
  msgstr "Aggiorna!"
965
 
966
- # @ fl-builder
967
  #: classes/class-fl-builder.php:651
 
968
  msgid "Buy Now!"
969
  msgstr "Acquista ora!"
970
 
971
- # @ fl-builder
972
- #: classes/class-fl-builder.php:655 includes/ui-js-config.php:45
973
  #: includes/ui-js-templates.php:163
 
974
  msgid "Done"
975
  msgstr "Fatto"
976
 
977
- # @ fl-builder
978
  #: classes/class-fl-builder.php:659
 
979
  msgid "Tools"
980
  msgstr "Strumenti"
981
 
982
- # @ fl-builder
983
- #: classes/class-fl-builder.php:667 includes/ui-js-config.php:106
 
984
  msgid "Add Content"
985
  msgstr "Aggiungi contenuto"
986
 
987
- # @ fl-builder
988
  #: classes/class-fl-builder.php:1041
989
  #, php-format
 
990
  msgctxt "Field name to add."
991
  msgid "Add %s"
992
  msgstr "Aggiungi %s"
993
 
994
- # @ fl-builder
995
- #: classes/class-fl-builder.php:1149 classes/class-fl-builder.php:1151
 
996
  msgctxt "Custom post type label."
997
  msgid "Templates"
998
  msgstr "Modelli"
999
 
1000
- # @ fl-builder
1001
- #: classes/class-fl-builder.php:1150 classes/class-fl-builder.php:1152
 
1002
  msgctxt "Custom post type label."
1003
  msgid "Template"
1004
  msgstr "Modello"
1005
 
1006
- # @ fl-builder
1007
  #: classes/class-fl-builder.php:1153
 
1008
  msgctxt "Custom post type label."
1009
  msgid "Add New"
1010
  msgstr "Aggiungi nuovo"
1011
 
1012
- # @ fl-builder
1013
  #: classes/class-fl-builder.php:1154
 
1014
  msgctxt "Custom post type label."
1015
  msgid "Add New Template"
1016
  msgstr "Aggiungi nuovo modello"
1017
 
1018
- # @ fl-builder
1019
  #: classes/class-fl-builder.php:1155
 
1020
  msgctxt "Custom post type label."
1021
  msgid "New Template"
1022
  msgstr "Nuovo modello"
1023
 
1024
- # @ fl-builder
1025
  #: classes/class-fl-builder.php:1156
 
1026
  msgctxt "Custom post type label."
1027
  msgid "Edit Template"
1028
  msgstr "Modifica modello"
1029
 
1030
- # @ fl-builder
1031
  #: classes/class-fl-builder.php:1157
 
1032
  msgctxt "Custom post type label."
1033
  msgid "View Template"
1034
  msgstr "Visualizza modello"
1035
 
1036
- # @ fl-builder
1037
  #: classes/class-fl-builder.php:1158
 
1038
  msgctxt "Custom post type label."
1039
  msgid "All Templates"
1040
  msgstr "Tutti i modelli"
1041
 
1042
- # @ fl-builder
1043
  #: classes/class-fl-builder.php:1159
 
1044
  msgctxt "Custom post type label."
1045
  msgid "Search Templates"
1046
  msgstr "Cerca modelli"
1047
 
1048
- # @ fl-builder
1049
  #: classes/class-fl-builder.php:1160
 
1050
  msgctxt "Custom post type label."
1051
  msgid "Parent Templates:"
1052
  msgstr "Modelli genitore:"
1053
 
1054
- # @ fl-builder
1055
  #: classes/class-fl-builder.php:1161
 
1056
  msgctxt "Custom post type label."
1057
  msgid "No templates found."
1058
  msgstr "Nessun modello trovato."
1059
 
1060
- # @ fl-builder
1061
  #: classes/class-fl-builder.php:1162
 
1062
  msgctxt "Custom post type label."
1063
  msgid "No templates found in Trash."
1064
  msgstr "Nessun modello trovato nel cestino."
1065
 
1066
- # @ fl-builder
1067
  #: classes/class-fl-builder.php:1186
 
1068
  msgctxt "Custom taxonomy label."
1069
  msgid "Categories"
1070
  msgstr "Categorie"
1071
 
1072
- # @ fl-builder
1073
  #: classes/class-fl-builder.php:1195
 
1074
  msgctxt "Custom taxonomy label."
1075
  msgid "Type"
1076
  msgstr "Tipo"
1077
 
1078
- # @ fl-builder
1079
- #: classes/class-fl-builder.php:1449 classes/class-fl-builder.php:1563
1080
- #: classes/class-fl-builder.php:1704 includes/ui-js-templates.php:173
 
1081
  #: includes/ui-panel-node-templates.php:18
1082
  #: includes/ui-panel-node-templates.php:49
 
1083
  msgctxt "Indicator for global node templates."
1084
  msgid "Global"
1085
  msgstr "Globale"
1086
 
1087
- # @ fl-builder
1088
  #: classes/class-fl-builder.php:1703
1089
  #, php-format
 
1090
  msgctxt "%s stands for module name."
1091
  msgid "%s Settings"
1092
  msgstr "Impostazioni %s"
1093
 
1094
- # @ fl-builder
1095
- #: includes/admin-posts.php:3 modules/rich-text/rich-text.php:14
 
1096
  msgid "Text Editor"
1097
  msgstr "Editor di testo"
1098
 
1099
- # @ fl-builder
1100
  #: includes/admin-posts.php:8
1101
  #, php-format
 
1102
  msgctxt "%s stands for custom branded \"Page Builder\" name."
1103
  msgid "Launch %s"
1104
  msgstr "Lancia %s"
1105
 
1106
- # @ fl-builder
1107
  #: includes/admin-settings-branding.php:37
 
1108
  msgid "Save Branding"
1109
  msgstr "Salva Branding"
1110
 
1111
- # @ fl-builder
1112
  #: includes/admin-settings-cache.php:9
1113
- msgid ""
1114
- "A CSS and JavaScript file is dynamically generated and cached each time you "
1115
- "create a new layout. Sometimes the cache needs to be refreshed when you "
1116
- "migrate your site to another server or update to the latest version. If you "
1117
- "are running into any issues, please try clearing the cache by clicking the "
1118
- "button below."
1119
- msgstr ""
1120
- "Ogni volta che crei un layout vengono generati dinamicamente un file CSS e "
1121
- "Javascript. Qualche volta la cache deve essere rigenerata quando migri il "
1122
- "tuo sito ad un'altro server o aggiorni all'ultima versione. Se stai avendo "
1123
- "qualche problema, si prega di provare a svuotare la cache cliccando il "
1124
- "bottone di sotto."
1125
-
1126
- # @ fl-builder
1127
- #: includes/admin-settings-cache.php:12 includes/admin-settings-cache.php:14
1128
  #: includes/admin-settings-uninstall.php:7
1129
  #: includes/admin-settings-uninstall.php:10
1130
  #: includes/updater/includes/form.php:31
 
1131
  msgid "NOTE:"
1132
  msgstr "NOTA:"
1133
 
1134
- # @ fl-builder
1135
  #: includes/admin-settings-cache.php:12
1136
  #: includes/admin-settings-uninstall.php:10
1137
  #: includes/updater/includes/form.php:31
 
1138
  msgid "This applies to all sites on the network."
1139
  msgstr "Questo vale per tutti i siti della rete."
1140
 
1141
- # @ fl-builder
1142
  #: includes/admin-settings-cache.php:14
1143
- msgid ""
1144
- "This only applies to this site. Please visit the Network Admin Settings to "
1145
- "clear the cache for all sites on the network."
1146
- msgstr ""
1147
- "Ciò si applica solo a questo sito. Si prega di visitare le impostazioni "
1148
- "amministrative di rete per svuotare la cache di tutti i siti della rete."
1149
 
1150
- # @ fl-builder
1151
  #: includes/admin-settings-cache.php:19
 
1152
  msgid "Clear Cache"
1153
  msgstr "Svuota cache"
1154
 
1155
- # @ fl-builder
1156
  #: includes/admin-settings-editing.php:3
 
1157
  msgid "Editing Settings"
1158
  msgstr "Impostazioni di modifica"
1159
 
1160
- # @ fl-builder
1161
- #: includes/admin-settings-editing.php:10 includes/admin-settings-icons.php:27
1162
  #: includes/admin-settings-modules.php:10
1163
  #: includes/admin-settings-post-types.php:10
1164
  #: includes/admin-settings-templates.php:16
 
1165
  msgid "Override network settings?"
1166
  msgstr "Eseguire l'override delle impostazioni di rete?"
1167
 
1168
- # @ fl-builder
1169
  #: includes/admin-settings-editing.php:16
 
1170
  msgid "Editing Capability"
1171
  msgstr "Capacità di modifica"
1172
 
1173
- # @ fl-builder
1174
  #: includes/admin-settings-editing.php:17
1175
  #, php-format
1176
- msgid ""
1177
- "Set the <a%s>capability</a> required for users to access advanced builder "
1178
- "editing such as adding, deleting or moving modules."
1179
- msgstr ""
1180
- "Imposta la <a%s>capacità</a> necessaria degli utenti per accedere al builder "
1181
- "avanzato e aggiungere, eliminare o spostare i moduli."
1182
 
1183
- # @ fl-builder
1184
  #: includes/admin-settings-editing.php:21
 
1185
  msgid "Global Templates Editing Capability"
1186
  msgstr "Capacità di modifica modelli globali"
1187
 
1188
- # @ fl-builder
1189
  #: includes/admin-settings-editing.php:22
1190
  #, php-format
 
1191
  msgid "Set the <a%s>capability</a> required for users to global templates."
1192
- msgstr ""
1193
- "Imposta la <a%s>capacità</a> richiesta agli utenti per i modelli blobali"
1194
 
1195
- # @ fl-builder
1196
  #: includes/admin-settings-editing.php:28
 
1197
  msgid "Save Editing Settings"
1198
  msgstr "Salva le impostazioni di modifica"
1199
 
1200
- # @ fl-builder
1201
  #: includes/admin-settings-help-button.php:8
 
1202
  msgid "Help Button Settings"
1203
  msgstr "Impostazioni pulsante di aiuto"
1204
 
1205
- # @ fl-builder
1206
  #: includes/admin-settings-help-button.php:17
 
1207
  msgid "Enable Help Button"
1208
  msgstr "Abilita pulsante di aiuto"
1209
 
1210
- # @ fl-builder
1211
  #: includes/admin-settings-help-button.php:23
 
1212
  msgid "Help Tour"
1213
  msgstr "Visita guidata"
1214
 
1215
- # @ fl-builder
1216
  #: includes/admin-settings-help-button.php:27
 
1217
  msgid "Enable Help Tour"
1218
  msgstr "Abilita visita guidata"
1219
 
1220
- # @ fl-builder
1221
  #: includes/admin-settings-help-button.php:31
 
1222
  msgid "Help Video"
1223
  msgstr "Video di aiuto"
1224
 
1225
- # @ fl-builder
1226
  #: includes/admin-settings-help-button.php:35
 
1227
  msgid "Enable Help Video"
1228
  msgstr "Abilita "
1229
 
1230
- # @ fl-builder
1231
  #: includes/admin-settings-help-button.php:39
 
1232
  msgid "Help Video Embed Code"
1233
  msgstr "Codice di embed del video di aiuto"
1234
 
1235
- # @ fl-builder
1236
  #: includes/admin-settings-help-button.php:45
 
1237
  msgid "Knowledge Base"
1238
  msgstr "Documentazione"
1239
 
1240
- # @ fl-builder
1241
  #: includes/admin-settings-help-button.php:49
 
1242
  msgid "Enable Knowledge Base"
1243
  msgstr "Abilita documentazione"
1244
 
1245
- # @ fl-builder
1246
  #: includes/admin-settings-help-button.php:53
 
1247
  msgid "Knowledge Base URL"
1248
  msgstr "URL documentazione"
1249
 
1250
- # @ fl-builder
1251
  #: includes/admin-settings-help-button.php:59
 
1252
  msgid "Forums"
1253
  msgstr "Forum"
1254
 
1255
- # @ fl-builder
1256
  #: includes/admin-settings-help-button.php:63
 
1257
  msgid "Enable Forums"
1258
  msgstr "Abilita forum"
1259
 
1260
- # @ fl-builder
1261
  #: includes/admin-settings-help-button.php:67
 
1262
  msgid "Forums URL"
1263
  msgstr "URL forum"
1264
 
1265
- # @ fl-builder
1266
  #: includes/admin-settings-help-button.php:77