Version Description
Download this release
Release Info
Developer | pross |
Plugin | WordPress Page Builder – Beaver Builder |
Version | 2.5.2.3 |
Comparing to | |
See all releases |
Code changes from version 2.5.2.1 to 2.5.2.3
- changelog.txt +17 -2
- classes/class-fl-builder-admin-pointers.php +1 -1
- classes/class-fl-builder-ajax-layout.php +13 -0
- classes/class-fl-builder-ajax.php +1 -0
- classes/class-fl-builder-loader.php +1 -1
- classes/class-fl-builder-model.php +2 -3
- classes/class-fl-builder-shortcodes.php +7 -0
- classes/class-fl-builder.php +1 -1
- css/build/vendor-bb-fluid.bundle.min.css +1 -1
- fl-builder.php +1 -1
- includes/updater-config.php +1 -1
- includes/vendor/drip/Drip_API.class.php +71 -50
- js/build/builder.bundle.min.js +1 -1
- js/build/builder.bundle.min.js.LICENSE.txt +1 -1
- js/build/vendor-bb-app-core.bundle.min.js +1 -1
- js/build/wp-editor.bundle.min.js +1 -1
- js/fl-builder-ui.js +6 -5
- js/fl-builder.min.js +1 -1
changelog.txt
CHANGED
@@ -1,11 +1,26 @@
|
|
1 |
-
<h4>2.5.2.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<p><strong>Hotfix</strong></p>
|
3 |
<ul>
|
4 |
<li>Improve compatibility with FontAwesome 6 and our icon picker when using the official FontAwesome plugin</li>
|
5 |
<li>Revert Button module: Fix border Style not working if width not specified as it was causing border settings to not be respected in some situations</li>
|
6 |
</ul>
|
7 |
|
8 |
-
<h4>2.5.2- 02/10/2022</h4>
|
9 |
<p><strong>Enhancements</strong></p>
|
10 |
<ul>
|
11 |
<li>Menu module: add submenu indicators on mobile</li>
|
1 |
+
<h4>2.5.2.3 - 03/21/2022</h4>
|
2 |
+
<p><strong>Hotfix</strong></p>
|
3 |
+
<ul>
|
4 |
+
<li>Fix issue where published changes were not reflected until using the cache clearing tool in BB Settings</li>
|
5 |
+
</ul>
|
6 |
+
|
7 |
+
<h4>2.5.2.2 - 03/17/2022</h4>
|
8 |
+
<p><strong>Hotfix</strong></p>
|
9 |
+
<ul>
|
10 |
+
<li>Fix partial layout stylesheet not getting updated after making changes to the actual template</li>
|
11 |
+
<li>Remove extra slash in FontAwesome URL</li>
|
12 |
+
<li>Contact Form Module: Fix accessibility issues with form labels for Name and the Success URL</li>
|
13 |
+
<li>Subscribe Module: Fix PHP 8 issue with Drip integration</li>
|
14 |
+
</ul>
|
15 |
+
|
16 |
+
<h4>2.5.2.1 - 02/11/2022</h4>
|
17 |
<p><strong>Hotfix</strong></p>
|
18 |
<ul>
|
19 |
<li>Improve compatibility with FontAwesome 6 and our icon picker when using the official FontAwesome plugin</li>
|
20 |
<li>Revert Button module: Fix border Style not working if width not specified as it was causing border settings to not be respected in some situations</li>
|
21 |
</ul>
|
22 |
|
23 |
+
<h4>2.5.2 - 02/10/2022</h4>
|
24 |
<p><strong>Enhancements</strong></p>
|
25 |
<ul>
|
26 |
<li>Menu module: add submenu indicators on mobile</li>
|
classes/class-fl-builder-admin-pointers.php
CHANGED
@@ -64,7 +64,7 @@ final class FLBuilderAdminPointers {
|
|
64 |
|
65 |
wp_enqueue_script(
|
66 |
'fl-builder-admin-pointers',
|
67 |
-
FL_BUILDER_URL . '
|
68 |
array( 'jquery', 'wp-pointer' ),
|
69 |
FL_BUILDER_VERSION,
|
70 |
true
|
64 |
|
65 |
wp_enqueue_script(
|
66 |
'fl-builder-admin-pointers',
|
67 |
+
FL_BUILDER_URL . 'js/fl-builder-admin-pointers.js',
|
68 |
array( 'jquery', 'wp-pointer' ),
|
69 |
FL_BUILDER_VERSION,
|
70 |
true
|
classes/class-fl-builder-ajax-layout.php
CHANGED
@@ -963,4 +963,17 @@ final class FLBuilderAJAXLayout {
|
|
963 |
'attachments' => array(), // @TODO - where do attachments initially come from???
|
964 |
);
|
965 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
966 |
}
|
963 |
'attachments' => array(), // @TODO - where do attachments initially come from???
|
964 |
);
|
965 |
}
|
966 |
+
|
967 |
+
static public function refresh_layout_cache() {
|
968 |
+
if ( isset( $_POST['fl_builder_data'] ) && 'clear_cache_for_layout' === $_POST['fl_builder_data']['action'] ) {
|
969 |
+
add_filter( 'fl_builder_model_is_builder_active', '__return_false' );
|
970 |
+
FLBuilder::render_css( false );
|
971 |
+
FLBuilder::render_js( false );
|
972 |
+
FLBuilder::render_css( true );
|
973 |
+
FLBuilder::render_js( true );
|
974 |
+
wp_send_json_success();
|
975 |
+
} else {
|
976 |
+
wp_send_json_error();
|
977 |
+
}
|
978 |
+
}
|
979 |
}
|
classes/class-fl-builder-ajax.php
CHANGED
@@ -148,6 +148,7 @@ final class FLBuilderAJAX {
|
|
148 |
self::add_action( 'get_autosuggest_values', 'FLBuilderAutoSuggest::get_values', array( 'fields' ) );
|
149 |
|
150 |
self::add_action( 'save_browser_stats', 'FLBuilderUsage::browser_stats', array( 'browser_data' ) );
|
|
|
151 |
}
|
152 |
|
153 |
/**
|
148 |
self::add_action( 'get_autosuggest_values', 'FLBuilderAutoSuggest::get_values', array( 'fields' ) );
|
149 |
|
150 |
self::add_action( 'save_browser_stats', 'FLBuilderUsage::browser_stats', array( 'browser_data' ) );
|
151 |
+
// self::add_action( 'clear_cache_for_layout', 'FLBuilderAJAXLayout::refresh_layout_cache' );
|
152 |
}
|
153 |
|
154 |
/**
|
classes/class-fl-builder-loader.php
CHANGED
@@ -48,7 +48,7 @@ if ( ! class_exists( 'FLBuilderLoader' ) ) {
|
|
48 |
* @return void
|
49 |
*/
|
50 |
static private function define_constants() {
|
51 |
-
define( 'FL_BUILDER_VERSION', '2.5.2.
|
52 |
define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
|
53 |
define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
|
54 |
define( 'FL_BUILDER_URL', esc_url( plugins_url( '/', FL_BUILDER_FILE ) ) );
|
48 |
* @return void
|
49 |
*/
|
50 |
static private function define_constants() {
|
51 |
+
define( 'FL_BUILDER_VERSION', '2.5.2.3' );
|
52 |
define( 'FL_BUILDER_FILE', trailingslashit( dirname( dirname( __FILE__ ) ) ) . 'fl-builder.php' );
|
53 |
define( 'FL_BUILDER_DIR', plugin_dir_path( FL_BUILDER_FILE ) );
|
54 |
define( 'FL_BUILDER_URL', esc_url( plugins_url( '/', FL_BUILDER_FILE ) ) );
|
classes/class-fl-builder-model.php
CHANGED
@@ -565,7 +565,7 @@ final class FLBuilderModel {
|
|
565 |
$post_id = ( isset( $post->ID ) ) ? $post->ID : false;
|
566 |
|
567 |
if ( null !== self::$active ) {
|
568 |
-
return self::$active;
|
569 |
} elseif ( ! is_admin() && is_singular() && $query_id != $post_id ) {
|
570 |
self::$active = false;
|
571 |
} elseif ( is_customize_preview() ) {
|
@@ -574,8 +574,7 @@ final class FLBuilderModel {
|
|
574 |
$post_data = self::get_post_data();
|
575 |
self::$active = isset( $_GET['fl_builder'] ) || isset( $post_data['fl_builder'] );
|
576 |
}
|
577 |
-
|
578 |
-
return self::$active;
|
579 |
}
|
580 |
|
581 |
/**
|
565 |
$post_id = ( isset( $post->ID ) ) ? $post->ID : false;
|
566 |
|
567 |
if ( null !== self::$active ) {
|
568 |
+
return apply_filters( 'fl_builder_model_is_builder_active', self::$active );
|
569 |
} elseif ( ! is_admin() && is_singular() && $query_id != $post_id ) {
|
570 |
self::$active = false;
|
571 |
} elseif ( is_customize_preview() ) {
|
574 |
$post_data = self::get_post_data();
|
575 |
self::$active = isset( $_GET['fl_builder'] ) || isset( $post_data['fl_builder'] );
|
576 |
}
|
577 |
+
return apply_filters( 'fl_builder_model_is_builder_active', self::$active );
|
|
|
578 |
}
|
579 |
|
580 |
/**
|
classes/class-fl-builder-shortcodes.php
CHANGED
@@ -30,6 +30,7 @@ final class FLBuilderShortcodes {
|
|
30 |
$builder_active = FLBuilderModel::is_builder_active();
|
31 |
$post_type = isset( $attrs['type'] ) ? $attrs['type'] : get_post_types();
|
32 |
$site_id = isset( $attrs['site'] ) ? absint( $attrs['site'] ) : null;
|
|
|
33 |
$args = array(
|
34 |
'post_type' => $post_type,
|
35 |
'posts_per_page' => -1,
|
@@ -65,8 +66,14 @@ final class FLBuilderShortcodes {
|
|
65 |
if ( $builder_active ) {
|
66 |
echo '<div class="fl-builder-shortcode-mask-wrap"><div class="fl-builder-shortcode-mask"></div>';
|
67 |
}
|
|
|
|
|
|
|
68 |
|
69 |
FLBuilder::render_query( $args, $site_id );
|
|
|
|
|
|
|
70 |
|
71 |
if ( $builder_active ) {
|
72 |
echo '</div>';
|
30 |
$builder_active = FLBuilderModel::is_builder_active();
|
31 |
$post_type = isset( $attrs['type'] ) ? $attrs['type'] : get_post_types();
|
32 |
$site_id = isset( $attrs['site'] ) ? absint( $attrs['site'] ) : null;
|
33 |
+
$inline_assets = apply_filters( 'fl_builder_render_assets_inline', false );
|
34 |
$args = array(
|
35 |
'post_type' => $post_type,
|
36 |
'posts_per_page' => -1,
|
66 |
if ( $builder_active ) {
|
67 |
echo '<div class="fl-builder-shortcode-mask-wrap"><div class="fl-builder-shortcode-mask"></div>';
|
68 |
}
|
69 |
+
if ( ! $inline_assets ) {
|
70 |
+
add_filter( 'fl_builder_render_assets_inline', '__return_true' );
|
71 |
+
}
|
72 |
|
73 |
FLBuilder::render_query( $args, $site_id );
|
74 |
+
if ( ! $inline_assets ) {
|
75 |
+
add_filter( 'fl_builder_render_assets_inline', '__return_false' );
|
76 |
+
}
|
77 |
|
78 |
if ( $builder_active ) {
|
79 |
echo '</div>';
|
classes/class-fl-builder.php
CHANGED
@@ -3909,7 +3909,7 @@ final class FLBuilder {
|
|
3909 |
* This will also enqueue the CSS from the CDN.
|
3910 |
* @see fl_enable_fa5_pro
|
3911 |
*/
|
3912 |
-
$url = ( self::fa5_pro_enabled() ) ? self::$fa5_pro_url : FL_BUILDER_URL . '
|
3913 |
|
3914 |
/**
|
3915 |
* Filter FA5 URL for enqueue.
|
3909 |
* This will also enqueue the CSS from the CDN.
|
3910 |
* @see fl_enable_fa5_pro
|
3911 |
*/
|
3912 |
+
$url = ( self::fa5_pro_enabled() ) ? self::$fa5_pro_url : FL_BUILDER_URL . 'fonts/fontawesome/' . self::get_fa5_version() . '/css/all.min.css';
|
3913 |
|
3914 |
/**
|
3915 |
* Filter FA5 URL for enqueue.
|
css/build/vendor-bb-fluid.bundle.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.fluid{--fluid-hue:210;--fluid-opaque-0:#000;--fluid-opaque-1:hsl(var(--fluid-hue),10%,10%);--fluid-opaque-2:hsl(var(--fluid-hue),10%,15%);--fluid-opaque-3:hsl(var(--fluid-hue),10%,20%);--fluid-opaque-4:hsl(var(--fluid-hue),10%,25%);--fluid-opaque-5:hsl(var(--fluid-hue),10%,30%);--fluid-opaque-6:hsl(var(--fluid-hue),10%,35%);--fluid-opaque-7:hsl(var(--fluid-hue),10%,50%);--fluid-opaque-8:hsl(var(--fluid-hue),27%,87%);--fluid-opaque-9:hsl(var(--fluid-hue),33%,89%);--fluid-opaque-10:hsl(var(--fluid-hue),33%,91%);--fluid-opaque-11:hsl(var(--fluid-hue),33%,93%);--fluid-opaque-12:hsl(var(--fluid-hue),33%,95%);--fluid-opaque-13:hsl(var(--fluid-hue),33%,98%);--fluid-opaque-14:#fff;--fluid-transparent-1:hsla(var(--fluid-hue),10%,10%,80%);--fluid-transparent-2:hsla(var(--fluid-hue),10%,19%,80%);--fluid-transparent-3:hsla(var(--fluid-hue),10%,25%,80%);--fluid-transparent-4:hsla(var(--fluid-hue),10%,31%,80%);--fluid-transparent-5:hsla(var(--fluid-hue),10%,38%,80%);--fluid-transparent-6:hsla(var(--fluid-hue),10%,44%,80%);--fluid-transparent-8:hsla(var(--fluid-hue),27%,84%,80%);--fluid-transparent-9:hsla(var(--fluid-hue),33%,86%,80%);--fluid-transparent-10:hsla(var(--fluid-hue),33%,89%,80%);--fluid-transparent-11:hsla(var(--fluid-hue),34%,90%,80%);--fluid-transparent-12:hsla(var(--fluid-hue),38%,94%,80%);--fluid-transparent-13:hsla(var(--fluid-hue),38%,98%,80%);--fluid-blue-hue:210;--fluid-blue-0:#000;--fluid-blue-1:hsl(var(--fluid-blue-hue),100%,10%);--fluid-blue-2:hsl(var(--fluid-blue-hue),100%,15%);--fluid-blue-3:hsl(var(--fluid-blue-hue),100%,20%);--fluid-blue-4:hsl(var(--fluid-blue-hue),100%,25%);--fluid-blue-5:hsl(var(--fluid-blue-hue),100%,30%);--fluid-blue-6:hsl(var(--fluid-blue-hue),100%,35%);--fluid-blue-7:hsl(var(--fluid-blue-hue),100%,45%);--fluid-blue-8:hsl(var(--fluid-blue-hue),100%,87%);--fluid-blue-9:hsl(var(--fluid-blue-hue),100%,89%);--fluid-blue-10:hsl(var(--fluid-blue-hue),100%,91%);--fluid-blue-11:hsl(var(--fluid-blue-hue),100%,93%);--fluid-blue-12:hsl(var(--fluid-blue-hue),100%,95%);--fluid-blue-13:hsl(var(--fluid-blue-hue),100%,98%);--fluid-blue-14:#fff;--fluid-blue:var(--fluid-blue-7);--fluid-background:var(--fluid-opaque-14);--fluid-color:var(--fluid-opaque-0);--fluid-dark-background:var(--fluid-opaque-2);--fluid-dark-color:var(--fluid-opaque-11);--fluid-box-background:var(--fluid-transparent-12);--fluid-box-color:var(--fluid-opaque-3);--fluid-box-hover-background:var(--fluid-transparent-10);--fluid-box-hover-color:var(--fluid-opaque-0);--fluid-primary-background:var(--fluid-blue-7);--fluid-primary-color:#fff;--fluid-primary-hover-background:var(--fluid-blue-6);--fluid-alert-background:#fef4ea;--fluid-alert-color:#a95700;--fluid-alert-hover-background:#fce3ca;--fluid-destructive-background:#fef3f1;--fluid-destructive-color:#bc0a00;--fluid-destructive-hover-background:#f9dad4;--fluid-accent:hsl(var(--fluid-hue),100%,43%);--fluid-muted-text-color:var(--fluid-opaque-7);--fluid-line-color:var(--fluid-transparent-12);--fluid-dark-line-color:var(--fluid-opaque-0);--fluid-sm-space:5px;--fluid-med-space:10px;--fluid-lg-space:20px;--fluid-radius:5px;--fluid-target-size:36px;--fluid-font-size:13px;--fluid-font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:var(--fluid-color);font-family:var(--fluid-font-family);font-size:var(--fluid-font-size);font-weight:400;line-height:1.2}.fluid *{box-sizing:border-box}.fluid hr{margin:10px 0;padding:0}.fluid img{max-width:100%;object-fit:cover;height:auto;width:auto;border:0}.fluid img,.fluid svg,.fluid video{display:block}.fluid a,.fluid button{box-sizing:border-box;-moz-user-select:none;cursor:pointer;letter-spacing:normal;font-family:inherit;font-size:inherit;color:inherit;background:transparent;border:none;border-radius:var(--fluid-radius);user-select:none;padding:0;display:inline-flex;justify-content:center;align-items:center;text-decoration:none}.fluid a:hover,.fluid button:hover{color:inherit;top:0;box-shadow:none;border:none;background:transparent}.fluid a:focus,.fluid button:focus{color:inherit;top:0;border:none}.fluid a[disabled],.fluid button[disabled]{color:inherit;opacity:.6;pointer-events:none}.fluid a:visited,.fluid button:visited{color:inherit}.fluid a{text-decoration:none}.fluid a:hover{text-decoration:underline}.fluid button{min-height:var(--fluid-target-size);min-width:var(--fluid-target-size)}.fluid button:focus{box-shadow:0 0 0 2px hsla(0,0%,50.2%,.5)}.fluid blockquote,.fluid form,.fluid h1,.fluid h2,.fluid h3,.fluid h4,.fluid h5,.fluid h6,.fluid p,.fluid pre,.fluid table{margin:var(--fluid-lg-space) 0}.fluid blockquote:first-child,.fluid form:first-child,.fluid h1:first-child,.fluid h2:first-child,.fluid h3:first-child,.fluid h4:first-child,.fluid h5:first-child,.fluid h6:first-child,.fluid p:first-child,.fluid pre:first-child,.fluid table:first-child{margin-top:0}.fluid h1,.fluid h2,.fluid h3,.fluid h4,.fluid h5,.fluid h6{color:inherit;font-family:var(--fluid-font-family);font-weight:400}.fluid h1:before,.fluid h2:before,.fluid h3:before,.fluid h4:before,.fluid h5:before,.fluid h6:before{all:unset!important}.fluid h1{font-size:calc(var(--fluid-font-size) + 14px)}.fluid h2{font-size:calc(var(--fluid-font-size) + 10px)}.fluid h3{font-size:calc(var(--fluid-font-size) + 6px)}.fluid p{font-size:14px;line-height:1.3}.fluid ol,.fluid ul{list-style:none;margin:var(--fluid-med-space) 0;padding:0}.fluid ol li,.fluid ul li{margin:0;padding:0}.fluid table.fluid-table{font-size:var(--fluid-font-size);width:100%;border-collapse:collapse;border:none}.fluid table.fluid-table td,.fluid table.fluid-table th{text-align:left;padding:var(--fluid-sm-space) var(--fluid-med-space);border:none;border-right:2px solid var(--fluid-line-color)}.fluid table.fluid-table td:first-child,.fluid table.fluid-table th:first-child{border-top-left-radius:var(--fluid-radius);barder-bottom-left-radius:var(--fluid-radius)}.fluid table.fluid-table td:last-child,.fluid table.fluid-table th:last-child{border-right:0;border-top-right-radius:var(--fluid-radius);barder-bottom-right-radius:var(--fluid-radius)}.fluid table.fluid-table tr:nth-child(2n) td,.fluid table.fluid-table tr:nth-child(2n) th{background:var(--fluid-opaque-13)}.fluid .fluid-color-scheme-dark{--fluid-background:var(--fluid-dark-background);--fluid-color:var(--fluid-dark-color);--fluid-line-color:var(--fluid-dark-line-color);--fluid-box-background:var(--fluid-opaque-1);--fluid-box-color:var(--fluid-dark-color);--fluid-box-hover-background:var(--fluid-opaque-3);--fluid-alert-background:#281a0b;--fluid-alert-color:#ffba70;--fluid-alert-hover-background:#342414;--fluid-destructive-background:#240000;--fluid-destructive-color:#ff5f57;--fluid-destructive-hover-background:#370606;color:var(--fluid-color)}.fluid .fluid-color-scheme-dark table.fluid-table tr:nth-child(2n) td,.fluid .fluid-color-scheme-dark table.fluid-table tr:nth-child(2n) th{background:var(--fluid-opaque-1)}.fluid label{flex-direction:row;align-items:center;font-size:inherit;font-weight:400;line-height:1.2;color:var(--fl-asst-text-color);text-transform:none;text-shadow:none;margin:0 0 var(--fluid-med-space)}.fluid label,.fluid label abbr{display:flex;text-decoration:none}.fluid label abbr{margin-left:5px;color:var(--fl-asst-base-art-color)}.fluid .fl-asst-form-input,.fluid input,.fluid input[type=color],.fluid input[type=date],.fluid input[type=datetime-local],.fluid input[type=datetime],.fluid input[type=email],.fluid input[type=month],.fluid input[type=number],.fluid input[type=password],.fluid input[type=search],.fluid input[type=tel],.fluid input[type=text],.fluid input[type=time],.fluid input[type=url],.fluid input[type=week],.fluid select,.fluid textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;height:auto;flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:400;line-height:inherit;letter-spacing:normal;text-align:left;margin:0;padding:var(--fluid-sm-space);color:inherit;border-radius:var(--fluid-radius);border:none;outline:none;background-color:var(--fluid-transparent-13);box-shadow:inset 0 0 0 1.5px var(--fluid-line-color);min-height:var(--fluid-target-size)}.fluid .fl-asst-form-input::-webkit-input-placeholder,.fluid input::-webkit-input-placeholder,.fluid input[type=color]::-webkit-input-placeholder,.fluid input[type=date]::-webkit-input-placeholder,.fluid input[type=datetime-local]::-webkit-input-placeholder,.fluid input[type=datetime]::-webkit-input-placeholder,.fluid input[type=email]::-webkit-input-placeholder,.fluid input[type=month]::-webkit-input-placeholder,.fluid input[type=number]::-webkit-input-placeholder,.fluid input[type=password]::-webkit-input-placeholder,.fluid input[type=search]::-webkit-input-placeholder,.fluid input[type=tel]::-webkit-input-placeholder,.fluid input[type=text]::-webkit-input-placeholder,.fluid input[type=time]::-webkit-input-placeholder,.fluid input[type=url]::-webkit-input-placeholder,.fluid input[type=week]::-webkit-input-placeholder,.fluid select::-webkit-input-placeholder,.fluid textarea::-webkit-input-placeholder{text-align:left;color:var(--fluid-muted-text-color)}.fluid .fl-asst-form-input::-ms-input-placeholder,.fluid input::-ms-input-placeholder,.fluid input[type=color]::-ms-input-placeholder,.fluid input[type=date]::-ms-input-placeholder,.fluid input[type=datetime-local]::-ms-input-placeholder,.fluid input[type=datetime]::-ms-input-placeholder,.fluid input[type=email]::-ms-input-placeholder,.fluid input[type=month]::-ms-input-placeholder,.fluid input[type=number]::-ms-input-placeholder,.fluid input[type=password]::-ms-input-placeholder,.fluid input[type=search]::-ms-input-placeholder,.fluid input[type=tel]::-ms-input-placeholder,.fluid input[type=text]::-ms-input-placeholder,.fluid input[type=time]::-ms-input-placeholder,.fluid input[type=url]::-ms-input-placeholder,.fluid input[type=week]::-ms-input-placeholder,.fluid select::-ms-input-placeholder,.fluid textarea::-ms-input-placeholder{text-align:left;color:var(--fluid-muted-text-color)}.fluid .fl-asst-form-input::placeholder,.fluid input::placeholder,.fluid input[type=color]::placeholder,.fluid input[type=date]::placeholder,.fluid input[type=datetime-local]::placeholder,.fluid input[type=datetime]::placeholder,.fluid input[type=email]::placeholder,.fluid input[type=month]::placeholder,.fluid input[type=number]::placeholder,.fluid input[type=password]::placeholder,.fluid input[type=search]::placeholder,.fluid input[type=tel]::placeholder,.fluid input[type=text]::placeholder,.fluid input[type=time]::placeholder,.fluid input[type=url]::placeholder,.fluid input[type=week]::placeholder,.fluid select::placeholder,.fluid textarea::placeholder{text-align:left;color:var(--fluid-muted-text-color)}.fluid .fl-asst-form-input:focus,.fluid .fl-asst-form-input:invalid,.fluid input:focus,.fluid input:invalid,.fluid input[type=color]:focus,.fluid input[type=color]:invalid,.fluid input[type=date]:focus,.fluid input[type=date]:invalid,.fluid input[type=datetime-local]:focus,.fluid input[type=datetime-local]:invalid,.fluid input[type=datetime]:focus,.fluid input[type=datetime]:invalid,.fluid input[type=email]:focus,.fluid input[type=email]:invalid,.fluid input[type=month]:focus,.fluid input[type=month]:invalid,.fluid input[type=number]:focus,.fluid input[type=number]:invalid,.fluid input[type=password]:focus,.fluid input[type=password]:invalid,.fluid input[type=search]:focus,.fluid input[type=search]:invalid,.fluid input[type=tel]:focus,.fluid input[type=tel]:invalid,.fluid input[type=text]:focus,.fluid input[type=text]:invalid,.fluid input[type=time]:focus,.fluid input[type=time]:invalid,.fluid input[type=url]:focus,.fluid input[type=url]:invalid,.fluid input[type=week]:focus,.fluid input[type=week]:invalid,.fluid select:focus,.fluid select:invalid,.fluid textarea:focus,.fluid textarea:invalid{background-color:var(--fluid-box-background);border:none;outline:none;box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid .fl-asst-form-input:focus::-webkit-input-placeholder,.fluid .fl-asst-form-input:invalid::-webkit-input-placeholder,.fluid input:focus::-webkit-input-placeholder,.fluid input:invalid::-webkit-input-placeholder,.fluid input[type=color]:focus::-webkit-input-placeholder,.fluid input[type=color]:invalid::-webkit-input-placeholder,.fluid input[type=date]:focus::-webkit-input-placeholder,.fluid input[type=date]:invalid::-webkit-input-placeholder,.fluid input[type=datetime-local]:focus::-webkit-input-placeholder,.fluid input[type=datetime-local]:invalid::-webkit-input-placeholder,.fluid input[type=datetime]:focus::-webkit-input-placeholder,.fluid input[type=datetime]:invalid::-webkit-input-placeholder,.fluid input[type=email]:focus::-webkit-input-placeholder,.fluid input[type=email]:invalid::-webkit-input-placeholder,.fluid input[type=month]:focus::-webkit-input-placeholder,.fluid input[type=month]:invalid::-webkit-input-placeholder,.fluid input[type=number]:focus::-webkit-input-placeholder,.fluid input[type=number]:invalid::-webkit-input-placeholder,.fluid input[type=password]:focus::-webkit-input-placeholder,.fluid input[type=password]:invalid::-webkit-input-placeholder,.fluid input[type=search]:focus::-webkit-input-placeholder,.fluid input[type=search]:invalid::-webkit-input-placeholder,.fluid input[type=tel]:focus::-webkit-input-placeholder,.fluid input[type=tel]:invalid::-webkit-input-placeholder,.fluid input[type=text]:focus::-webkit-input-placeholder,.fluid input[type=text]:invalid::-webkit-input-placeholder,.fluid input[type=time]:focus::-webkit-input-placeholder,.fluid input[type=time]:invalid::-webkit-input-placeholder,.fluid input[type=url]:focus::-webkit-input-placeholder,.fluid input[type=url]:invalid::-webkit-input-placeholder,.fluid input[type=week]:focus::-webkit-input-placeholder,.fluid input[type=week]:invalid::-webkit-input-placeholder,.fluid select:focus::-webkit-input-placeholder,.fluid select:invalid::-webkit-input-placeholder,.fluid textarea:focus::-webkit-input-placeholder,.fluid textarea:invalid::-webkit-input-placeholder{text-align:left;color:var(--fluid-color)}.fluid .fl-asst-form-input:focus::-ms-input-placeholder,.fluid .fl-asst-form-input:invalid::-ms-input-placeholder,.fluid input:focus::-ms-input-placeholder,.fluid input:invalid::-ms-input-placeholder,.fluid input[type=color]:focus::-ms-input-placeholder,.fluid input[type=color]:invalid::-ms-input-placeholder,.fluid input[type=date]:focus::-ms-input-placeholder,.fluid input[type=date]:invalid::-ms-input-placeholder,.fluid input[type=datetime-local]:focus::-ms-input-placeholder,.fluid input[type=datetime-local]:invalid::-ms-input-placeholder,.fluid input[type=datetime]:focus::-ms-input-placeholder,.fluid input[type=datetime]:invalid::-ms-input-placeholder,.fluid input[type=email]:focus::-ms-input-placeholder,.fluid input[type=email]:invalid::-ms-input-placeholder,.fluid input[type=month]:focus::-ms-input-placeholder,.fluid input[type=month]:invalid::-ms-input-placeholder,.fluid input[type=number]:focus::-ms-input-placeholder,.fluid input[type=number]:invalid::-ms-input-placeholder,.fluid input[type=password]:focus::-ms-input-placeholder,.fluid input[type=password]:invalid::-ms-input-placeholder,.fluid input[type=search]:focus::-ms-input-placeholder,.fluid input[type=search]:invalid::-ms-input-placeholder,.fluid input[type=tel]:focus::-ms-input-placeholder,.fluid input[type=tel]:invalid::-ms-input-placeholder,.fluid input[type=text]:focus::-ms-input-placeholder,.fluid input[type=text]:invalid::-ms-input-placeholder,.fluid input[type=time]:focus::-ms-input-placeholder,.fluid input[type=time]:invalid::-ms-input-placeholder,.fluid input[type=url]:focus::-ms-input-placeholder,.fluid input[type=url]:invalid::-ms-input-placeholder,.fluid input[type=week]:focus::-ms-input-placeholder,.fluid input[type=week]:invalid::-ms-input-placeholder,.fluid select:focus::-ms-input-placeholder,.fluid select:invalid::-ms-input-placeholder,.fluid textarea:focus::-ms-input-placeholder,.fluid textarea:invalid::-ms-input-placeholder{text-align:left;color:var(--fluid-color)}.fluid .fl-asst-form-input:focus::placeholder,.fluid .fl-asst-form-input:invalid::placeholder,.fluid input:focus::placeholder,.fluid input:invalid::placeholder,.fluid input[type=color]:focus::placeholder,.fluid input[type=color]:invalid::placeholder,.fluid input[type=date]:focus::placeholder,.fluid input[type=date]:invalid::placeholder,.fluid input[type=datetime-local]:focus::placeholder,.fluid input[type=datetime-local]:invalid::placeholder,.fluid input[type=datetime]:focus::placeholder,.fluid input[type=datetime]:invalid::placeholder,.fluid input[type=email]:focus::placeholder,.fluid input[type=email]:invalid::placeholder,.fluid input[type=month]:focus::placeholder,.fluid input[type=month]:invalid::placeholder,.fluid input[type=number]:focus::placeholder,.fluid input[type=number]:invalid::placeholder,.fluid input[type=password]:focus::placeholder,.fluid input[type=password]:invalid::placeholder,.fluid input[type=search]:focus::placeholder,.fluid input[type=search]:invalid::placeholder,.fluid input[type=tel]:focus::placeholder,.fluid input[type=tel]:invalid::placeholder,.fluid input[type=text]:focus::placeholder,.fluid input[type=text]:invalid::placeholder,.fluid input[type=time]:focus::placeholder,.fluid input[type=time]:invalid::placeholder,.fluid input[type=url]:focus::placeholder,.fluid input[type=url]:invalid::placeholder,.fluid input[type=week]:focus::placeholder,.fluid input[type=week]:invalid::placeholder,.fluid select:focus::placeholder,.fluid select:invalid::placeholder,.fluid textarea:focus::placeholder,.fluid textarea:invalid::placeholder{text-align:left;color:var(--fluid-color)}.fluid input[type=range]{-webkit-appearance:slider-horizontal}.fluid input[type=checkbox],.fluid input[type=radio]{-moz-appearace:none;-webkit-appearance:none;flex:0 0 auto;margin:0;margin-right:var(--fluid-med-space);color:#fff;width:22px;height:22px;max-width:22px;max-height:22px;min-height:0;min-width:0;border-radius:var(--fluid-radius);box-shadow:none;border:none;background-color:var(--fluid-transparent-11)}.fluid input[type=checkbox]:focus,.fluid input[type=radio]:focus{box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid input[type=checkbox]:checked,.fluid input[type=radio]:checked{background-color:var(--fluid-blue);box-shadow:none}.fluid input[type=checkbox]:checked:focus,.fluid input[type=radio]:checked:focus{box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid input[type=checkbox]:checked:after,.fluid input[type=radio]:checked:after{display:block;content:"\2713";color:#fff;font-family:var(--fluid-font-family);font-size:16px!important;line-height:1;font-weight:700;text-align:center;margin-left:-1px;margin-top:-3px}.fluid input[type=checkbox]:checked:before,.fluid input[type=radio]:checked:before{content:""!important;display:none!important}.fluid input[type=radio]{border-radus:50%}.fluid .fluid-is-disabled,.fluid [aria-disabled=true],.fluid input[disabled],.fluid select[disabled],.fluid textarea[disabled]{pointer-events:none;opacity:.5;font-style:italic;color:var(--fluid-muted-text-color)}.fluid select{padding:var(--fluid-sm-space);padding-right:30px}.fluid select:focus{background-color:var(--fluid-box-background);color:var(--fluid-color)!important;border:none;outline:none;box-shadow:inset 0 0 0 2px var(--fluid-box-background),0 0 0 1.5px var(--fluid-accent)}.fluid select:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.fluid select::-ms-expand{display:none}.fluid select[multiple]{height:auto;padding:10px 7px 0;background-image:none}.fluid select[multiple] option{padding:2px 7px;margin:1px 0;border-radius:3px;font-weight:400}@supports (-webkit-appearance:none){.fluid select{-moz-appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:14px;padding-right:30px}.fluid select::-ms-expand{display:none}}.fluid .fluid-color-scheme-dark .fl-asst-form-input,.fluid .fluid-color-scheme-dark input,.fluid .fluid-color-scheme-dark input[type=color],.fluid .fluid-color-scheme-dark input[type=date],.fluid .fluid-color-scheme-dark input[type=datetime-local],.fluid .fluid-color-scheme-dark input[type=datetime],.fluid .fluid-color-scheme-dark input[type=email],.fluid .fluid-color-scheme-dark input[type=month],.fluid .fluid-color-scheme-dark input[type=number],.fluid .fluid-color-scheme-dark input[type=password],.fluid .fluid-color-scheme-dark input[type=search],.fluid .fluid-color-scheme-dark input[type=tel],.fluid .fluid-color-scheme-dark input[type=text],.fluid .fluid-color-scheme-dark input[type=time],.fluid .fluid-color-scheme-dark input[type=url],.fluid .fluid-color-scheme-dark input[type=week],.fluid .fluid-color-scheme-dark select,.fluid .fluid-color-scheme-dark textarea{background-color:var(--fluid-transparent-1)}.fluid .fluid-color-scheme-dark input[type=checkbox],.fluid .fluid-color-scheme-dark input[type=radio]{background-color:var(--fluid-opaque-0)}.fluid .fluid-color-scheme-dark input[type=checkbox]:checked,.fluid .fluid-color-scheme-dark input[type=radio]:checked{background-color:var(--fluid-blue)}.fl.uid .fluid-text-title{flex:0 1 auto;font-size:16px;display:flex;flex-direction:column}.fl.uid .fluid-text-eyebrow,.fl.uid .fluid-text-subtitle{font-size:12px;font-weight:500;color:var(--fluid-muted-text-color)}.fl.uid .fluid-text-eyebrow{font-size:13px;text-transform:uppercase}.fl.uid .fluid-size-med .fluid-text-title,.fl.uid .fluid-size-sm .fluid-text-title{font-size:13px}.fluid .fluid-aspect-box{position:relative;padding-top:100%;background:var(--fluid-box-background);overflow:hidden}.fluid .fluid-aspect-box>div{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center}.fluid .fluid-loading-bar{flex:1 1 auto;border-radius:10px;min-height:20px;padding:var(--fluid-sm-space);display:flex;flex-direction:row;justify-content:flex-start;align-items:center}.fluid .fluid-loading-bar .fluid-dot{display:inline-flex;flex:0 0 auto;width:6px;height:6px;border-radius:3px;margin:0 3px;background:var(--fluid-accent);-webkit-animation:fl-asst-dot-bounce 1.4s ease-in-out infinite both;animation:fl-asst-dot-bounce 1.4s ease-in-out infinite both}.fluid .fluid-loading-bar .fluid-dot:first-child,.fluid .fluid-loading-bar .fluid-dot:nth-child(2n+2){-webkit-animation-delay:-.32s;animation-delay:-.32s}@-webkit-keyframes fl-asst-dot-bounce{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes fl-asst-dot-bounce{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.fluid .fluid-message{flex:0 0 auto;display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:var(--fluid-box-background);color:var(--fluid-box-color);border-radius:var(--fluid-radius);min-height:var(--fluid-target-size);padding:0 var(--fluid-med-space);text-decoration:none}.fluid .fluid-message-icon{margin-right:7px;height:100%;width:7%}.fluid .fluid-split{flex:1 1 auto;flex-direction:row}.fluid .fluid-split,.fluid .fluid-split .fluid-split-pane{position:relative;display:flex;min-height:0;max-height:100%}.fluid .fluid-split .fluid-split-pane{flex:1 1 auto;flex-direction:column;overflow:auto;border-right:2px solid var(--fluid-line-color);-ms-overflow-style:-ms-autohiding-scrollbar}.fluid .fluid-split .fluid-split-pane:last-child{border-right:none}.fluid .fluid-box{box-sizing:border-box;display:flex;flex-direction:column}.fluid .fluid-box.fluid-box-outset{margin-left:calc(0px - var(--fluid-lg-space));margin-right:calc(0px - var(--fluid-lg-space))}.fluid .fluid-box.fluid-row{--fluid-gap:0px;flex-direction:row}.fluid .fluid-box.fluid-row>*{margin-right:var(--fluid-gap)}.fluid .fluid-box.fluid-row>:last-child{margin-right:0}.fluid .fluid-headline{font-size:20px;font-weight:400;word-break:break-word}.fluid .fluid-toolbar{flex:0 0 60px;display:flex;flex-direction:row;align-items:center;min-height:60px;padding:0 10px;background:var(--fluid-background);z-index:1}.fluid .fluid-toolbar.fluid-is-sticky{position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky;top:0}.fluid .fluid-toolbar.fluid-size-lg{min-height:60px}.fluid .fluid-toolbar.fluid-size-med{min-height:50px}.fluid .fluid-toolbar.fluid-size-sm{min-height:40px}.fluid .fluid-toolbar>*{margin-right:var(--fluid-sm-space)}.fluid .fluid-toolbar>:last-child{margin-right:0}.fluid .fluid-content-boundary{width:clamp(40ch,80ch,100%);margin:0 auto;padding:0 var(--fluid-lg-space) var(--fluid-lg-space)}.fluid .fluid-drop-area{flex:1 1 auto;display:flex;flex-direction:column;max-height:100%;min-height:0;overflow:auto;position:relative}.fluid-menu{width:180px;background:var(--fluid-background);box-shadow:0 0 10px rgba(0,0,0,.25);border-radius:var(--fluid-med-space);z-index:1;display:flex;flex-direction:column;padding:var(--fluid-sm-space)}.fluid-menu>:first-child{margin-top:0}.fluid-menu .fluid-menu-item.fluid-button{flex:0 0 var(--fluid-target-size);justify-content:flex-start;padding:0 var(--fluid-lg-space)}.fluid-menu .fluid-menu-item.fluid-button>span{justify-content:flex-start;flex:1 1 auto}.fluid-menu .fluid-menu-item.fluid-button.is-selected{box-shadow:inset 3px 0 0 var(--fluid-accent)}.fluid-menu .fluid-menu-item.fluid-button:hover{transform:scale(1)!important}.fluid-color-scheme-dark .fluid-menu{background:var(--fluid-box-background)}.fluid .fluid-button-group{box-sizing:border-box;display:inline-flex;flex-direction:row;flex-wrap:wrap;background:var(--fluid-transparent-12);color:var(--fluid-color);border-radius:var(--fluid-radius);min-height:var(--fluid-target-size);max-width:100%;position:relative}.fluid .fluid-button-group .fluid-button.is-hovering,.fluid .fluid-button-group .fluid-button:hover{transform:scale(1)}.fluid .fluid-button-group>select{background-color:var(--fluid-transparent-12);box-shadow:none;padding:var(--fluid-sm-space);text-align-last:center;cursor:pointer}.fluid .fluid-button-group>select:hover{background-color:var(--fluid-transparent-10)}.fluid .fluid-button-group>select:focus{box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid .fluid-button-group.fluid-button-group-row{align-self:center;justify-content:flex-start}.fluid .fluid-button-group.fluid-button-group-column{flex-direction:column}.fluid .fluid-button-group.fluid-button-group-appearance-normal .fluid-button{white-space:nowrap}.fluid .fluid-button-group.fluid-button-group-appearance-buttons{background:transparent;padding:2px 0;min-height:var(--fluid-target-size);overflow:visible}.fluid .fluid-button-group.fluid-button-group-appearance-buttons .fluid-button{margin-right:var(--fluid-sm-space);margin-bottom:var(--fluid-sm-space)}.fluid .fluid-button-group.fluid-button-group-appearance-buttons .fluid-button:last-child{margin-right:0}.fluid .fluid-button-group.fluid-button-group-appearance-tabs{flex:1 1 auto;background:var(--fluid-box-background);padding:0 var(--fluid-med-space);padding-right:2px;min-height:40px;border-radius:0;justify-content:flex-start;align-self:stretch;overflow:visible;flex-wrap:nowrap;max-width:100%;min-width:0}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button{margin:0;background:transparent;border:none;border-radius:0;padding:0 12px}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button:hover{background:var(--fluid-box-hover-background)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button:focus{border-radius:var(--fluid-radius)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button.is-selected{border-radius:0;background:var(--fluid-blue-7)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button.is-selected:focus{box-shadow:inset 0 0 0 2px var(--fluid-box-background),0 0 0 1.5 var(--fluid-accent),0 4px 4px 0 rgba(0,0,0,.1)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button:last-child{margin-right:0}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button.fluid-more-button{margin-left:auto!important}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button .fluid-count-badge{margin-left:5px;padding:3px;background:var(--fluid-primary-background);color:var(--fluid-primary-color);border-radius:3px}.fluid .fluid-button-group .fluid-vertical-divider{flex:0 0 auto;margin:var(--fluid-sm-space) 0;background:var(--fluid-background);border:none;border-radius:2px}.fluid .fluid-button-group .fluid-horizontal-divider{flex:0 0 auto;margin:0 var(--fluid-sm-space);background:var(--fluid-background);border:none;border-radius:2px}.fluid .fluid-button-group .fluid-is-selected+.fluid-divider{visibility:hidden}.fluid .fluid-button-group.fluid-button-group-appearance-grid{background:transparent!important;flex:1 1 auto;display:grid;grid-gap:var(--fluid-sm-space);grid-template-columns:1fr 1fr;margin:-3px}.fluid .fluid-divider.fluid-horizontal-divider,.fluid .fluid-divider.fluid-vertical-divider{box-sizing:border-box;background:var(--fluid-background)}.fluid .fluid-divider.fluid-vertical-divider{width:2px;height:auto}.fluid .fluid-is-hidden{visibility:hidden}.fluid .fluid-more-menu{background:var(--fluid-box-background);color:var(--fluid-box-color);border-radius:var(--fluid-radius);padding:3px;display:flex;flex-direction:column}.fluid .fluid-color-scheme-dark .fluid-button-group{background:var(--fluid-transparent-1)}.fluid .fluid-color-scheme-dark .fluid-button-group>select{background-color:var(--fluid-transparent-1)}.fluid .fluid-color-scheme-dark .fluid-button-group>select:hover{background-color:var(--fluid-transparent-3)}.fl.uid .fluid-button{--color:var(--fluid-opaque-5);--background:var(--fluid-transparent-12);--hover:var(--fluid-transparent-10);--hover-color:var(--fluid-opaque-0);box-sizing:border-box;display:inline-flex;background:var(--background);color:var(--color);border-radius:var(--fluid-radius);box-shadow:0 0 0 transparent;min-height:var(--fluid-target-size);min-width:var(--fluid-target-size);padding:5px 8px;text-decoration:none;font-weight:400;text-transform:none;line-height:1.1}.fl.uid .fluid-button,.fl.uid .fluid-button>span{flex:0 0 auto;flex-direction:row;justify-content:center;align-items:center}.fl.uid .fluid-button>span{display:flex;min-width:0}.fl.uid .fluid-button.is-hovering,.fl.uid .fluid-button:hover{text-decoration:none;background:var(--hover);color:var(--hover-color);z-index:1}.fl.uid .fluid-button.is-focused,.fl.uid .fluid-button:focus{top:0;z-index:3;outline:none;text-decoration:none;box-shadow:inset 0 0 0 2px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fl.uid .fluid-button.is-active,.fl.uid .fluid-button:active{background:var(--hover);box-shadow:inset 0 2px 2px rgba(0,0,0,.1)}.fl.uid .fluid-button.is-selected{background:var(--fluid-blue-7);color:var(--fluid-blue-14)}.fl.uid .fluid-button.is-selected.is-focused,.fl.uid .fluid-button.is-selected:focus{background:var(--fluid-blue-7)!important;color:var(--fluid-blue-14)}.fl.uid .fluid-button.fluid-shape-round{border-radius:50%}.fl.uid .fluid-button.fluid-shape-round.fluid-size-sm{padding:3px;width:30px;height:30px;min-width:30px;min-height:30px;max-width:30px;max-height:30px}.fl.uid .fluid-button.fluid-shape-round.fluid-size-med{padding:3px;width:36px;height:36px;min-width:36px;min-height:36px;max-width:36px;max-height:36px}.fl.uid .fluid-button.fluid-shape-round.fluid-size-lg{padding:3px;width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px}.fl.uid .fluid-button.fluid-appearance-elevator{height:44px;width:44px;padding:5px 12px;border-radius:50%}.fl.uid .fluid-button.fluid-appearance-transparent{--background:transparent;box-shadow:none;border:none;outline:none}.fl.uid .fluid-button.fluid-appearance-transparent.is-focused,.fl.uid .fluid-button.fluid-appearance-transparent:focus{box-shadow:inset 0 0 0 2px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fl.uid .fluid-button.fluid-status-primary{--background:var(--fluid-blue-12);--color:var(--fluid-blue-5);--hover:var(--fluid-blue-10);--hover-color:var(--fluid-blue-3)}.fl.uid .fluid-button.fluid-status-primary.fluid-appearance-transparent{--background:transparent;--color:var(--fluid-blue-6);--hover:var(--fluid-blue-12);--hover-color:var(--fluid-blue-5)}.fl.uid .fluid-button.fluid-status-alert{--fluid-accent:var(--fluid-alert-color);--hover-color:var(--fluid-alert-color);--color:var(--fluid-alert-color)}.fl.uid .fluid-button.fluid-status-destructive{--fluid-accent:var(--fluid-destructive-color);--hover-color:var(--fluid-destructive-color);--color:var(--fluid-destructive-color)}.fl.uid .fluid-button.fluid-size-sm{font-size:12px;padding:5px;min-height:30px;min-width:30px}.fl.uid .fluid-button.fluid-size-med{min-height:var(--fluid-target-size);min-width:var(--fluid-target-size)}.fl.uid .fluid-button.fluid-size-lg{font-size:16px;padding:5px 12px;min-height:44px;min-width:44px}.fl.uid .fluid-button .fluid-button-icon{flex:0 0 auto;margin-right:.5em}.fl.uid .fluid-button .fluid-button-icon:last-child{margin-right:0}.fl.uid .fluid-color-scheme-dark .fluid-button{--color:var(--fluid-opaque-10);--background:var(--fluid-transparent-1);--hover:var(--fluid-transparent-3);--hover-color:var(--fluid-opaque-14)}.fl.uid .fluid-color-scheme-dark .fluid-button.is-focused,.fl.uid .fluid-color-scheme-dark .fluid-button:focus{background:var(--fluid-opaque-0)}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-appearance-transparent{--background:transparent}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-status-primary{--color:var(--fluid-blue-14);--background:var(--fluid-blue-7);--hover:var(--fluid-blue-6);--hover-color:var(--fluid-blue-13)}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-status-primary.fluid-appearance-transparent{--background:transparent;--color:var(--fluid-blue-8);--hover:var(--fluid-blue-4);--hover-color:var(--fluid-blue-14)}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-status-destructive{--fluid-accent:var(--fluid-destructive-color);--color:var(--fluid-destructive-color);--hover-color:var(--fluid-destructive-color)}.fluid-dialog{background-color:rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;padding:var(--fluid-med-space);position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000}.fluid-dialog-window{background:var(--fluid-background);border-radius:var(--fluid-radius);box-shadow:0 0 20px rgba(0,0,0,.25);padding:var(--fluid-lg-space);max-width:460px;width:100%}.fluid-dialog-title{font-size:20px;margin-bottom:var(--fluid-med-space)}.fluid-dialog-message{font-size:14px;line-height:1.6;margin-bottom:var(--fluid-lg-space)}.fluid-dialog-buttons{display:flex;justify-content:flex-end}.fluid-dialog-buttons button{margin-left:var(--fluid-sm-space);min-width:70px!important}.fluid-lightbox{background-color:rgba(0,0,0,.75);padding:var(--fluid-med-space);position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000}.fluid-lightbox .fluid-lightbox-close,.fluid-lightbox .fluid-lightbox-close:active,.fluid-lightbox .fluid-lightbox-close:focus,.fluid-lightbox .fluid-lightbox-close:hover{background-color:rgba(0,0,0,.75);border-radius:100%;color:#fff;font-size:16px;position:absolute;top:var(--fluid-med-space);right:var(--fluid-med-space)}.fluid-lightbox .fluid-lightbox-content{cursor:zoom-out;display:flex;align-items:center;justify-content:center;padding:var(--fluid-lg-space);position:fixed;top:0;right:0;bottom:0;left:0}.fluid-lightbox .fluid-lightbox-content img{max-width:100%;max-height:100%}.fl.uid .fluid-page .fluid-section{display:flex;flex-direction:column;flex:0 0 auto;margin:0 calc(0px - var(--fluid-lg-space))}.fl.uid .fluid-page .fluid-section .fluid-section-title{flex:0 0 auto;display:flex;flex-direction:row;align-items:flex-end;padding:9px var(--fluid-lg-space) 0;text-transform:uppercase;border-bottom:2px solid var(--fluid-line-color);min-height:var(--fluid-target-size)}.fl.uid .fluid-page .fluid-section .fluid-section-title .fluid-section-title-text{display:inline-flex;max-width:70%;box-shadow:0 2px 0 0 currentColor;align-items:flex-end;padding:0 0 5px;font-weight:500}.fl.uid .fluid-page .fluid-section .fluid-section-description{flex:0 0 auto;display:flex;flex-direction:column;padding:var(--fluid-lg-space);padding-bottom:0;font-style:italic}.fl.uid .fluid-page .fluid-section .fluid-section-description>:first-child{margin-top:0}.fl.uid .fluid-page .fluid-section .fluid-section-description>:last-child{margin-bottom:0}.fl.uid .fluid-page .fluid-section .fluid-section-content{flex:1 0 auto;display:grid;grid-row-gap:var(--fluid-sm-space)}.fl.uid .fluid-scroller{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.fl.uid .fluid-pad,.fl.uid .fluid-scroller{box-sizing:border-box;flex:1 1 auto;display:flex;flex-direction:column;min-height:0;max-height:100%}.fl.uid .fluid-pad{padding:var(--fluid-lg-space)}.fl.uid .fluid-pad-x{padding-left:var(--fluid-lg-space);padding-right:var(--fluid-lg-space)}.fl.uid .fluid-pad-y{padding-top:var(--fluid-lg-space);padding-bottom:var(--fluid-lg-space)}.fl.uid .fluid-page{--fluid-top-inset:0px;position:relative;flex:1 1 auto;display:flex;flex-direction:column;background-color:var(--fluid-background);color:var(--fluid-color);max-height:100%;min-height:0}.fl.uid .fluid-page .fluid-sticky-element{position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky;top:var(--fluid-top-inset);background:var(--fluid-background);z-index:9}.fl.uid .fluid-page .fluid-page-actions{margin-left:auto;display:flex;flex-direction:row;align-items:center}.fl.uid .fluid-page .fluid-page-toolbar-content{position:static;padding:0 var(--fluid-med-space);padding-left:2px;flex:1 0 auto;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}.fl.uid .fluid-page .fluid-page-title-icon{flex:0 0 auto;width:40px;height:40px;border-radius:20px;display:inline-flex;flex-direction:row;justify-content:center;align-items:center;margin:0}.fl.uid .fluid-page .fluid-page-headline{font-size:24px;font-weight:600}.fl.uid .fluid-page .fluid-page-content{flex:1 0 auto;flex-direction:column;z-index:1}.fl.uid .fluid-page-footer,.fl.uid .fluid-page .fluid-page-content{box-sizing:border-box;display:flex;background:var(--fluid-background)}.fl.uid .fluid-page-footer{position:absolute;bottom:0;left:0;right:0;min-height:55px;flex:0 0 auto;flex-direction:row;align-items:stretch;justify-content:flex-start;border-top:2px solid var(--fluid-box-background);z-index:9}.fl.uid .fluid-page-footer>.fluid-button{margin-right:var(--fluid-sm-space)}.fl.uid .fluid-page-footer>.fluid-button:last-child{margin-right:0}.fl.uid .fluid-page-overlay{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.fluid .fluid-collection{--icon-area:40px;--thumbnail-brightness:97%;position:relative;display:grid;grid-template-columns:repeat(2,1fr);grid-gap:var(--fluid-lg-space);padding:var(--fluid-lg-space);padding-top:2px;margin:0}.fluid .fluid-collection.fluid-collection-appearance-list{display:flex;flex-direction:column}.fluid .fluid-collection .fluid-collection-item{position:relative;display:flex;flex-direction:column;min-width:0}.fluid .fluid-collection .fluid-collection-item-thumbnail{flex:0 0 auto;transition-property:transform;transition-duration:.15s;transform-origin:top center;z-index:1}.fluid .fluid-collection .fluid-collection-item-thumbnail .fluid-aspect-box{-webkit-filter:brightness(var(--thumbnail-brightness));filter:brightness(var(--thumbnail-brightness))}.fluid .fluid-collection .fluid-collection-item-text{flex:1 1 auto;display:flex;min-height:50px}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title{flex:1 1 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding:0 10px}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-item-description,.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-item-title-text{line-height:1;word-break:break-word;text-align:left}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-item-description{padding-top:3px;opacity:.7}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-truncate{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fluid .fluid-collection .fluid-collection-item-text.item-has-icon .fluid-item-title{padding-left:0;max-width:calc(100% - var(--icon-area))}.fluid .fluid-collection .fluid-collection-item-icon{flex:0 0 var(--icon-area);width:var(--icon-area);min-height:var(--icon-area);display:flex;justify-content:center;align-items:center}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action{flex:1 1 auto;padding:0;background:var(--fluid-opaque-12);border-radius:var(--fluid-radius);overflow:hidden}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action>span{flex:1 1 auto;flex-direction:column;align-items:stretch}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action:hover{background-color:var(--fluid-transparent-11)}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action:focus{box-shadow:0 0 0 1.5px var(--fluid-background),0 0 0 3px var(--fluid-blue)}.fluid .fluid-collection .fluid-collection-item-list-content{display:flex;flex-direction:row;align-items:center}.fluid .fluid-collection .fluid-collection-item-list-content .fluid-collection-item-thumbnail{width:60px;padding-right:var(--fluid-med-space)}.fluid .fluid-collection .fluid-collection-item-list-content .fluid-item-title{font-size:14px}.fluid .fluid-collection .fluid-collection-item-grid-content{display:flex;flex-direction:column}.fluid .fluid-collection .fluid-collection-item-grid-content .fluid-item-title{font-size:12px}.fluid .fluid-color-scheme-dark .fluid-button.fluid-collection-item-primary-action{background:var(--fluid-opaque-1)}.fluid .fluid-color-scheme-dark .fluid-button.fluid-collection-item-primary-action:hover{background-color:var(--fluid-opaque-0)}
|
1 |
+
.fluid{--fluid-hue:210;--fluid-opaque-0:#000;--fluid-opaque-1:hsl(var(--fluid-hue),10%,10%);--fluid-opaque-2:hsl(var(--fluid-hue),10%,15%);--fluid-opaque-3:hsl(var(--fluid-hue),10%,20%);--fluid-opaque-4:hsl(var(--fluid-hue),10%,25%);--fluid-opaque-5:hsl(var(--fluid-hue),10%,30%);--fluid-opaque-6:hsl(var(--fluid-hue),10%,35%);--fluid-opaque-7:hsl(var(--fluid-hue),10%,50%);--fluid-opaque-8:hsl(var(--fluid-hue),27%,87%);--fluid-opaque-9:hsl(var(--fluid-hue),33%,89%);--fluid-opaque-10:hsl(var(--fluid-hue),33%,91%);--fluid-opaque-11:hsl(var(--fluid-hue),33%,93%);--fluid-opaque-12:hsl(var(--fluid-hue),33%,95%);--fluid-opaque-13:hsl(var(--fluid-hue),33%,98%);--fluid-opaque-14:#fff;--fluid-transparent-1:hsla(var(--fluid-hue),10%,10%,80%);--fluid-transparent-2:hsla(var(--fluid-hue),10%,19%,80%);--fluid-transparent-3:hsla(var(--fluid-hue),10%,25%,80%);--fluid-transparent-4:hsla(var(--fluid-hue),10%,31%,80%);--fluid-transparent-5:hsla(var(--fluid-hue),10%,38%,80%);--fluid-transparent-6:hsla(var(--fluid-hue),10%,44%,80%);--fluid-transparent-8:hsla(var(--fluid-hue),27%,84%,80%);--fluid-transparent-9:hsla(var(--fluid-hue),33%,86%,80%);--fluid-transparent-10:hsla(var(--fluid-hue),33%,89%,80%);--fluid-transparent-11:hsla(var(--fluid-hue),34%,90%,80%);--fluid-transparent-12:hsla(var(--fluid-hue),38%,94%,80%);--fluid-transparent-13:hsla(var(--fluid-hue),38%,98%,80%);--fluid-blue-hue:210;--fluid-blue-0:#000;--fluid-blue-1:hsl(var(--fluid-blue-hue),100%,10%);--fluid-blue-2:hsl(var(--fluid-blue-hue),100%,15%);--fluid-blue-3:hsl(var(--fluid-blue-hue),100%,20%);--fluid-blue-4:hsl(var(--fluid-blue-hue),100%,25%);--fluid-blue-5:hsl(var(--fluid-blue-hue),100%,30%);--fluid-blue-6:hsl(var(--fluid-blue-hue),100%,35%);--fluid-blue-7:hsl(var(--fluid-blue-hue),100%,45%);--fluid-blue-8:hsl(var(--fluid-blue-hue),100%,87%);--fluid-blue-9:hsl(var(--fluid-blue-hue),100%,89%);--fluid-blue-10:hsl(var(--fluid-blue-hue),100%,91%);--fluid-blue-11:hsl(var(--fluid-blue-hue),100%,93%);--fluid-blue-12:hsl(var(--fluid-blue-hue),100%,95%);--fluid-blue-13:hsl(var(--fluid-blue-hue),100%,98%);--fluid-blue-14:#fff;--fluid-blue:var(--fluid-blue-7);--fluid-background:var(--fluid-opaque-14);--fluid-color:var(--fluid-opaque-0);--fluid-dark-background:var(--fluid-opaque-2);--fluid-dark-color:var(--fluid-opaque-11);--fluid-box-background:var(--fluid-transparent-12);--fluid-box-color:var(--fluid-opaque-3);--fluid-box-hover-background:var(--fluid-transparent-10);--fluid-box-hover-color:var(--fluid-opaque-0);--fluid-primary-background:var(--fluid-blue-7);--fluid-primary-color:#fff;--fluid-primary-hover-background:var(--fluid-blue-6);--fluid-alert-background:#fef4ea;--fluid-alert-color:#a95700;--fluid-alert-hover-background:#fce3ca;--fluid-destructive-background:#fef3f1;--fluid-destructive-color:#bc0a00;--fluid-destructive-hover-background:#f9dad4;--fluid-accent:hsl(var(--fluid-hue),100%,43%);--fluid-muted-text-color:var(--fluid-opaque-7);--fluid-line-color:var(--fluid-transparent-12);--fluid-dark-line-color:var(--fluid-opaque-0);--fluid-sm-space:5px;--fluid-med-space:10px;--fluid-lg-space:20px;--fluid-radius:5px;--fluid-target-size:36px;--fluid-font-size:13px;--fluid-font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;color:var(--fluid-color);font-family:var(--fluid-font-family);font-size:var(--fluid-font-size);font-weight:400;line-height:1.2}.fluid *{box-sizing:border-box}.fluid hr{margin:10px 0;padding:0}.fluid img{max-width:100%;object-fit:cover;height:auto;width:auto;border:0}.fluid img,.fluid svg,.fluid video{display:block}.fluid a,.fluid button{box-sizing:border-box;-moz-user-select:none;cursor:pointer;letter-spacing:normal;font-family:inherit;font-size:inherit;color:inherit;background:transparent;border:none;border-radius:var(--fluid-radius);user-select:none;padding:0;display:inline-flex;justify-content:center;align-items:center;text-decoration:none}.fluid a:hover,.fluid button:hover{color:inherit;top:0;box-shadow:none;border:none;background:transparent}.fluid a:focus,.fluid button:focus{color:inherit;top:0;border:none}.fluid a[disabled],.fluid button[disabled]{color:inherit;opacity:.6;pointer-events:none}.fluid a:visited,.fluid button:visited{color:inherit}.fluid a{text-decoration:none}.fluid a:hover{text-decoration:underline}.fluid button{min-height:var(--fluid-target-size);min-width:var(--fluid-target-size)}.fluid button:focus{box-shadow:0 0 0 2px hsla(0,0%,50.2%,.5)}.fluid blockquote,.fluid form,.fluid h1,.fluid h2,.fluid h3,.fluid h4,.fluid h5,.fluid h6,.fluid p,.fluid pre,.fluid table{margin:var(--fluid-lg-space) 0}.fluid blockquote:first-child,.fluid form:first-child,.fluid h1:first-child,.fluid h2:first-child,.fluid h3:first-child,.fluid h4:first-child,.fluid h5:first-child,.fluid h6:first-child,.fluid p:first-child,.fluid pre:first-child,.fluid table:first-child{margin-top:0}.fluid h1,.fluid h2,.fluid h3,.fluid h4,.fluid h5,.fluid h6{color:inherit;font-family:var(--fluid-font-family);font-weight:400}.fluid h1:before,.fluid h2:before,.fluid h3:before,.fluid h4:before,.fluid h5:before,.fluid h6:before{all:unset!important}.fluid h1{font-size:calc(var(--fluid-font-size) + 14px)}.fluid h2{font-size:calc(var(--fluid-font-size) + 10px)}.fluid h3{font-size:calc(var(--fluid-font-size) + 6px)}.fluid p{font-size:14px;line-height:1.3}.fluid ol,.fluid ul{list-style:none;margin:var(--fluid-med-space) 0;padding:0}.fluid ol li,.fluid ul li{margin:0;padding:0}.fluid table.fluid-table{font-size:var(--fluid-font-size);width:100%;border-collapse:collapse;border:none}.fluid table.fluid-table td,.fluid table.fluid-table th{text-align:left;padding:var(--fluid-sm-space) var(--fluid-med-space);border:none;border-right:2px solid var(--fluid-line-color)}.fluid table.fluid-table td:first-child,.fluid table.fluid-table th:first-child{border-top-left-radius:var(--fluid-radius);border-bottom-left-radius:var(--fluid-radius)}.fluid table.fluid-table td:last-child,.fluid table.fluid-table th:last-child{border-right:0;border-top-right-radius:var(--fluid-radius);border-bottom-right-radius:var(--fluid-radius)}.fluid table.fluid-table tr:nth-child(2n) td,.fluid table.fluid-table tr:nth-child(2n) th{background:var(--fluid-opaque-13)}.fluid .fluid-color-scheme-dark{--fluid-background:var(--fluid-dark-background);--fluid-color:var(--fluid-dark-color);--fluid-line-color:var(--fluid-dark-line-color);--fluid-box-background:var(--fluid-opaque-1);--fluid-box-color:var(--fluid-dark-color);--fluid-box-hover-background:var(--fluid-opaque-3);--fluid-alert-background:#281a0b;--fluid-alert-color:#ffba70;--fluid-alert-hover-background:#342414;--fluid-destructive-background:#240000;--fluid-destructive-color:#ff5f57;--fluid-destructive-hover-background:#370606;color:var(--fluid-color)}.fluid .fluid-color-scheme-dark table.fluid-table tr:nth-child(2n) td,.fluid .fluid-color-scheme-dark table.fluid-table tr:nth-child(2n) th{background:var(--fluid-opaque-1)}.fluid label{flex-direction:row;align-items:center;font-size:inherit;font-weight:400;line-height:1.2;color:var(--fl-asst-text-color);text-transform:none;text-shadow:none;margin:0 0 var(--fluid-med-space)}.fluid label,.fluid label abbr{display:flex;text-decoration:none}.fluid label abbr{margin-left:5px;color:var(--fl-asst-base-art-color)}.fluid .fl-asst-form-input,.fluid input,.fluid input[type=color],.fluid input[type=date],.fluid input[type=datetime-local],.fluid input[type=datetime],.fluid input[type=email],.fluid input[type=month],.fluid input[type=number],.fluid input[type=password],.fluid input[type=search],.fluid input[type=tel],.fluid input[type=text],.fluid input[type=time],.fluid input[type=url],.fluid input[type=week],.fluid select,.fluid textarea{display:block;box-sizing:border-box;width:100%;max-width:100%;height:auto;flex:1 1 auto;font-family:inherit;font-size:inherit;font-weight:400;line-height:inherit;letter-spacing:normal;text-align:left;margin:0;padding:var(--fluid-sm-space);color:inherit;border-radius:var(--fluid-radius);border:none;outline:none;background-color:var(--fluid-transparent-13);box-shadow:inset 0 0 0 1.5px var(--fluid-line-color);min-height:var(--fluid-target-size)}.fluid .fl-asst-form-input::-webkit-input-placeholder,.fluid input::-webkit-input-placeholder,.fluid input[type=color]::-webkit-input-placeholder,.fluid input[type=date]::-webkit-input-placeholder,.fluid input[type=datetime-local]::-webkit-input-placeholder,.fluid input[type=datetime]::-webkit-input-placeholder,.fluid input[type=email]::-webkit-input-placeholder,.fluid input[type=month]::-webkit-input-placeholder,.fluid input[type=number]::-webkit-input-placeholder,.fluid input[type=password]::-webkit-input-placeholder,.fluid input[type=search]::-webkit-input-placeholder,.fluid input[type=tel]::-webkit-input-placeholder,.fluid input[type=text]::-webkit-input-placeholder,.fluid input[type=time]::-webkit-input-placeholder,.fluid input[type=url]::-webkit-input-placeholder,.fluid input[type=week]::-webkit-input-placeholder,.fluid select::-webkit-input-placeholder,.fluid textarea::-webkit-input-placeholder{text-align:left;color:var(--fluid-muted-text-color)}.fluid .fl-asst-form-input::-ms-input-placeholder,.fluid input::-ms-input-placeholder,.fluid input[type=color]::-ms-input-placeholder,.fluid input[type=date]::-ms-input-placeholder,.fluid input[type=datetime-local]::-ms-input-placeholder,.fluid input[type=datetime]::-ms-input-placeholder,.fluid input[type=email]::-ms-input-placeholder,.fluid input[type=month]::-ms-input-placeholder,.fluid input[type=number]::-ms-input-placeholder,.fluid input[type=password]::-ms-input-placeholder,.fluid input[type=search]::-ms-input-placeholder,.fluid input[type=tel]::-ms-input-placeholder,.fluid input[type=text]::-ms-input-placeholder,.fluid input[type=time]::-ms-input-placeholder,.fluid input[type=url]::-ms-input-placeholder,.fluid input[type=week]::-ms-input-placeholder,.fluid select::-ms-input-placeholder,.fluid textarea::-ms-input-placeholder{text-align:left;color:var(--fluid-muted-text-color)}.fluid .fl-asst-form-input::placeholder,.fluid input::placeholder,.fluid input[type=color]::placeholder,.fluid input[type=date]::placeholder,.fluid input[type=datetime-local]::placeholder,.fluid input[type=datetime]::placeholder,.fluid input[type=email]::placeholder,.fluid input[type=month]::placeholder,.fluid input[type=number]::placeholder,.fluid input[type=password]::placeholder,.fluid input[type=search]::placeholder,.fluid input[type=tel]::placeholder,.fluid input[type=text]::placeholder,.fluid input[type=time]::placeholder,.fluid input[type=url]::placeholder,.fluid input[type=week]::placeholder,.fluid select::placeholder,.fluid textarea::placeholder{text-align:left;color:var(--fluid-muted-text-color)}.fluid .fl-asst-form-input:focus,.fluid .fl-asst-form-input:invalid,.fluid input:focus,.fluid input:invalid,.fluid input[type=color]:focus,.fluid input[type=color]:invalid,.fluid input[type=date]:focus,.fluid input[type=date]:invalid,.fluid input[type=datetime-local]:focus,.fluid input[type=datetime-local]:invalid,.fluid input[type=datetime]:focus,.fluid input[type=datetime]:invalid,.fluid input[type=email]:focus,.fluid input[type=email]:invalid,.fluid input[type=month]:focus,.fluid input[type=month]:invalid,.fluid input[type=number]:focus,.fluid input[type=number]:invalid,.fluid input[type=password]:focus,.fluid input[type=password]:invalid,.fluid input[type=search]:focus,.fluid input[type=search]:invalid,.fluid input[type=tel]:focus,.fluid input[type=tel]:invalid,.fluid input[type=text]:focus,.fluid input[type=text]:invalid,.fluid input[type=time]:focus,.fluid input[type=time]:invalid,.fluid input[type=url]:focus,.fluid input[type=url]:invalid,.fluid input[type=week]:focus,.fluid input[type=week]:invalid,.fluid select:focus,.fluid select:invalid,.fluid textarea:focus,.fluid textarea:invalid{background-color:var(--fluid-box-background);border:none;outline:none;box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid .fl-asst-form-input:focus::-webkit-input-placeholder,.fluid .fl-asst-form-input:invalid::-webkit-input-placeholder,.fluid input:focus::-webkit-input-placeholder,.fluid input:invalid::-webkit-input-placeholder,.fluid input[type=color]:focus::-webkit-input-placeholder,.fluid input[type=color]:invalid::-webkit-input-placeholder,.fluid input[type=date]:focus::-webkit-input-placeholder,.fluid input[type=date]:invalid::-webkit-input-placeholder,.fluid input[type=datetime-local]:focus::-webkit-input-placeholder,.fluid input[type=datetime-local]:invalid::-webkit-input-placeholder,.fluid input[type=datetime]:focus::-webkit-input-placeholder,.fluid input[type=datetime]:invalid::-webkit-input-placeholder,.fluid input[type=email]:focus::-webkit-input-placeholder,.fluid input[type=email]:invalid::-webkit-input-placeholder,.fluid input[type=month]:focus::-webkit-input-placeholder,.fluid input[type=month]:invalid::-webkit-input-placeholder,.fluid input[type=number]:focus::-webkit-input-placeholder,.fluid input[type=number]:invalid::-webkit-input-placeholder,.fluid input[type=password]:focus::-webkit-input-placeholder,.fluid input[type=password]:invalid::-webkit-input-placeholder,.fluid input[type=search]:focus::-webkit-input-placeholder,.fluid input[type=search]:invalid::-webkit-input-placeholder,.fluid input[type=tel]:focus::-webkit-input-placeholder,.fluid input[type=tel]:invalid::-webkit-input-placeholder,.fluid input[type=text]:focus::-webkit-input-placeholder,.fluid input[type=text]:invalid::-webkit-input-placeholder,.fluid input[type=time]:focus::-webkit-input-placeholder,.fluid input[type=time]:invalid::-webkit-input-placeholder,.fluid input[type=url]:focus::-webkit-input-placeholder,.fluid input[type=url]:invalid::-webkit-input-placeholder,.fluid input[type=week]:focus::-webkit-input-placeholder,.fluid input[type=week]:invalid::-webkit-input-placeholder,.fluid select:focus::-webkit-input-placeholder,.fluid select:invalid::-webkit-input-placeholder,.fluid textarea:focus::-webkit-input-placeholder,.fluid textarea:invalid::-webkit-input-placeholder{text-align:left;color:var(--fluid-color)}.fluid .fl-asst-form-input:focus::-ms-input-placeholder,.fluid .fl-asst-form-input:invalid::-ms-input-placeholder,.fluid input:focus::-ms-input-placeholder,.fluid input:invalid::-ms-input-placeholder,.fluid input[type=color]:focus::-ms-input-placeholder,.fluid input[type=color]:invalid::-ms-input-placeholder,.fluid input[type=date]:focus::-ms-input-placeholder,.fluid input[type=date]:invalid::-ms-input-placeholder,.fluid input[type=datetime-local]:focus::-ms-input-placeholder,.fluid input[type=datetime-local]:invalid::-ms-input-placeholder,.fluid input[type=datetime]:focus::-ms-input-placeholder,.fluid input[type=datetime]:invalid::-ms-input-placeholder,.fluid input[type=email]:focus::-ms-input-placeholder,.fluid input[type=email]:invalid::-ms-input-placeholder,.fluid input[type=month]:focus::-ms-input-placeholder,.fluid input[type=month]:invalid::-ms-input-placeholder,.fluid input[type=number]:focus::-ms-input-placeholder,.fluid input[type=number]:invalid::-ms-input-placeholder,.fluid input[type=password]:focus::-ms-input-placeholder,.fluid input[type=password]:invalid::-ms-input-placeholder,.fluid input[type=search]:focus::-ms-input-placeholder,.fluid input[type=search]:invalid::-ms-input-placeholder,.fluid input[type=tel]:focus::-ms-input-placeholder,.fluid input[type=tel]:invalid::-ms-input-placeholder,.fluid input[type=text]:focus::-ms-input-placeholder,.fluid input[type=text]:invalid::-ms-input-placeholder,.fluid input[type=time]:focus::-ms-input-placeholder,.fluid input[type=time]:invalid::-ms-input-placeholder,.fluid input[type=url]:focus::-ms-input-placeholder,.fluid input[type=url]:invalid::-ms-input-placeholder,.fluid input[type=week]:focus::-ms-input-placeholder,.fluid input[type=week]:invalid::-ms-input-placeholder,.fluid select:focus::-ms-input-placeholder,.fluid select:invalid::-ms-input-placeholder,.fluid textarea:focus::-ms-input-placeholder,.fluid textarea:invalid::-ms-input-placeholder{text-align:left;color:var(--fluid-color)}.fluid .fl-asst-form-input:focus::placeholder,.fluid .fl-asst-form-input:invalid::placeholder,.fluid input:focus::placeholder,.fluid input:invalid::placeholder,.fluid input[type=color]:focus::placeholder,.fluid input[type=color]:invalid::placeholder,.fluid input[type=date]:focus::placeholder,.fluid input[type=date]:invalid::placeholder,.fluid input[type=datetime-local]:focus::placeholder,.fluid input[type=datetime-local]:invalid::placeholder,.fluid input[type=datetime]:focus::placeholder,.fluid input[type=datetime]:invalid::placeholder,.fluid input[type=email]:focus::placeholder,.fluid input[type=email]:invalid::placeholder,.fluid input[type=month]:focus::placeholder,.fluid input[type=month]:invalid::placeholder,.fluid input[type=number]:focus::placeholder,.fluid input[type=number]:invalid::placeholder,.fluid input[type=password]:focus::placeholder,.fluid input[type=password]:invalid::placeholder,.fluid input[type=search]:focus::placeholder,.fluid input[type=search]:invalid::placeholder,.fluid input[type=tel]:focus::placeholder,.fluid input[type=tel]:invalid::placeholder,.fluid input[type=text]:focus::placeholder,.fluid input[type=text]:invalid::placeholder,.fluid input[type=time]:focus::placeholder,.fluid input[type=time]:invalid::placeholder,.fluid input[type=url]:focus::placeholder,.fluid input[type=url]:invalid::placeholder,.fluid input[type=week]:focus::placeholder,.fluid input[type=week]:invalid::placeholder,.fluid select:focus::placeholder,.fluid select:invalid::placeholder,.fluid textarea:focus::placeholder,.fluid textarea:invalid::placeholder{text-align:left;color:var(--fluid-color)}.fluid input[type=range]{-webkit-appearance:slider-horizontal}.fluid input[type=checkbox],.fluid input[type=radio]{-moz-appearace:none;-webkit-appearance:none;flex:0 0 auto;margin:0;margin-right:var(--fluid-med-space);color:#fff;width:22px;height:22px;max-width:22px;max-height:22px;min-height:0;min-width:0;border-radius:var(--fluid-radius);box-shadow:none;border:none;background-color:var(--fluid-transparent-11)}.fluid input[type=checkbox]:focus,.fluid input[type=radio]:focus{box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid input[type=checkbox]:checked,.fluid input[type=radio]:checked{background-color:var(--fluid-blue);box-shadow:none}.fluid input[type=checkbox]:checked:focus,.fluid input[type=radio]:checked:focus{box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid input[type=checkbox]:checked:after,.fluid input[type=radio]:checked:after{display:block;content:"\2713";color:#fff;font-family:var(--fluid-font-family);font-size:16px!important;line-height:1;font-weight:700;text-align:center;margin-left:-1px;margin-top:-3px}.fluid input[type=checkbox]:checked:before,.fluid input[type=radio]:checked:before{content:""!important;display:none!important}.fluid input[type=radio]{border-radius:50%}.fluid .fluid-is-disabled,.fluid [aria-disabled=true],.fluid input[disabled],.fluid select[disabled],.fluid textarea[disabled]{pointer-events:none;opacity:.5;font-style:italic;color:var(--fluid-muted-text-color)}.fluid select{padding:var(--fluid-sm-space);padding-right:30px}.fluid select:focus{background-color:var(--fluid-box-background);color:var(--fluid-color)!important;border:none;outline:none;box-shadow:inset 0 0 0 2px var(--fluid-box-background),0 0 0 1.5px var(--fluid-accent)}.fluid select:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.fluid select::-ms-expand{display:none}.fluid select[multiple]{height:auto;padding:10px 7px 0;background-image:none}.fluid select[multiple] option{padding:2px 7px;margin:1px 0;border-radius:3px;font-weight:400}@supports (-webkit-appearance:none){.fluid select{-moz-appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E");background-repeat:no-repeat;background-position:right 10px center;background-size:14px;padding-right:30px}.fluid select::-ms-expand{display:none}}.fluid .fluid-color-scheme-dark .fl-asst-form-input,.fluid .fluid-color-scheme-dark input,.fluid .fluid-color-scheme-dark input[type=color],.fluid .fluid-color-scheme-dark input[type=date],.fluid .fluid-color-scheme-dark input[type=datetime-local],.fluid .fluid-color-scheme-dark input[type=datetime],.fluid .fluid-color-scheme-dark input[type=email],.fluid .fluid-color-scheme-dark input[type=month],.fluid .fluid-color-scheme-dark input[type=number],.fluid .fluid-color-scheme-dark input[type=password],.fluid .fluid-color-scheme-dark input[type=search],.fluid .fluid-color-scheme-dark input[type=tel],.fluid .fluid-color-scheme-dark input[type=text],.fluid .fluid-color-scheme-dark input[type=time],.fluid .fluid-color-scheme-dark input[type=url],.fluid .fluid-color-scheme-dark input[type=week],.fluid .fluid-color-scheme-dark select,.fluid .fluid-color-scheme-dark textarea{background-color:var(--fluid-transparent-1)}.fluid .fluid-color-scheme-dark input[type=checkbox],.fluid .fluid-color-scheme-dark input[type=radio]{background-color:var(--fluid-opaque-0)}.fluid .fluid-color-scheme-dark input[type=checkbox]:checked,.fluid .fluid-color-scheme-dark input[type=radio]:checked{background-color:var(--fluid-blue)}.fl.uid .fluid-text-title{flex:0 1 auto;font-size:16px;display:flex;flex-direction:column}.fl.uid .fluid-text-eyebrow,.fl.uid .fluid-text-subtitle{font-size:12px;font-weight:500;color:var(--fluid-muted-text-color)}.fl.uid .fluid-text-eyebrow{font-size:13px;text-transform:uppercase}.fl.uid .fluid-size-med .fluid-text-title,.fl.uid .fluid-size-sm .fluid-text-title{font-size:13px}.fluid .fluid-aspect-box{position:relative;padding-top:100%;background:var(--fluid-box-background);overflow:hidden}.fluid .fluid-aspect-box>div{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column;justify-content:center;align-items:center}.fluid .fluid-loading-bar{flex:1 1 auto;border-radius:10px;min-height:20px;padding:var(--fluid-sm-space);display:flex;flex-direction:row;justify-content:flex-start;align-items:center}.fluid .fluid-loading-bar .fluid-dot{display:inline-flex;flex:0 0 auto;width:6px;height:6px;border-radius:3px;margin:0 3px;background:var(--fluid-accent);-webkit-animation:fl-asst-dot-bounce 1.4s ease-in-out infinite both;animation:fl-asst-dot-bounce 1.4s ease-in-out infinite both}.fluid .fluid-loading-bar .fluid-dot:first-child,.fluid .fluid-loading-bar .fluid-dot:nth-child(2n+2){-webkit-animation-delay:-.32s;animation-delay:-.32s}@-webkit-keyframes fl-asst-dot-bounce{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes fl-asst-dot-bounce{0%,80%,to{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}.fluid .fluid-message{flex:0 0 auto;display:inline-flex;flex-direction:row;justify-content:center;align-items:center;background:var(--fluid-box-background);color:var(--fluid-box-color);border-radius:var(--fluid-radius);min-height:var(--fluid-target-size);padding:0 var(--fluid-med-space);text-decoration:none}.fluid .fluid-message-icon{margin-right:7px;height:100%;width:7%}.fluid .fluid-split{flex:1 1 auto;flex-direction:row}.fluid .fluid-split,.fluid .fluid-split .fluid-split-pane{position:relative;display:flex;min-height:0;max-height:100%}.fluid .fluid-split .fluid-split-pane{flex:1 1 auto;flex-direction:column;overflow:auto;border-right:2px solid var(--fluid-line-color);-ms-overflow-style:-ms-autohiding-scrollbar}.fluid .fluid-split .fluid-split-pane:last-child{border-right:none}.fluid .fluid-box{box-sizing:border-box;display:flex;flex-direction:column}.fluid .fluid-box.fluid-box-outset{margin-left:calc(0px - var(--fluid-lg-space));margin-right:calc(0px - var(--fluid-lg-space))}.fluid .fluid-box.fluid-row{--fluid-gap:0px;flex-direction:row}.fluid .fluid-box.fluid-row>*{margin-right:var(--fluid-gap)}.fluid .fluid-box.fluid-row>:last-child{margin-right:0}.fluid .fluid-headline{font-size:20px;font-weight:400;word-break:break-word}.fluid .fluid-toolbar{flex:0 0 60px;display:flex;flex-direction:row;align-items:center;min-height:60px;padding:0 10px;background:var(--fluid-background);z-index:1}.fluid .fluid-toolbar.fluid-is-sticky{position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky;top:0}.fluid .fluid-toolbar.fluid-size-lg{min-height:60px}.fluid .fluid-toolbar.fluid-size-med{min-height:50px}.fluid .fluid-toolbar.fluid-size-sm{min-height:40px}.fluid .fluid-toolbar>*{margin-right:var(--fluid-sm-space)}.fluid .fluid-toolbar>:last-child{margin-right:0}.fluid .fluid-content-boundary{width:clamp(40ch,80ch,100%);margin:0 auto;padding:0 var(--fluid-lg-space) var(--fluid-lg-space)}.fluid .fluid-drop-area{flex:1 1 auto;display:flex;flex-direction:column;max-height:100%;min-height:0;overflow:auto;position:relative}.fluid-menu{width:180px;background:var(--fluid-background);box-shadow:0 0 10px rgba(0,0,0,.25);border-radius:var(--fluid-med-space);z-index:1;display:flex;flex-direction:column;padding:var(--fluid-sm-space)}.fluid-menu>:first-child{margin-top:0}.fluid-menu .fluid-menu-item.fluid-button{flex:0 0 var(--fluid-target-size);justify-content:flex-start;padding:0 var(--fluid-lg-space)}.fluid-menu .fluid-menu-item.fluid-button>span{justify-content:flex-start;flex:1 1 auto}.fluid-menu .fluid-menu-item.fluid-button.is-selected{box-shadow:inset 3px 0 0 var(--fluid-accent)}.fluid-menu .fluid-menu-item.fluid-button:hover{transform:scale(1)!important}.fluid-color-scheme-dark .fluid-menu{background:var(--fluid-box-background)}.fluid .fluid-button-group{box-sizing:border-box;display:inline-flex;flex-direction:row;flex-wrap:wrap;background:var(--fluid-transparent-12);color:var(--fluid-color);border-radius:var(--fluid-radius);min-height:var(--fluid-target-size);max-width:100%;position:relative}.fluid .fluid-button-group .fluid-button.is-hovering,.fluid .fluid-button-group .fluid-button:hover{transform:scale(1)}.fluid .fluid-button-group>select{background-color:var(--fluid-transparent-12);box-shadow:none;padding:var(--fluid-sm-space);text-align-last:center;cursor:pointer}.fluid .fluid-button-group>select:hover{background-color:var(--fluid-transparent-10)}.fluid .fluid-button-group>select:focus{box-shadow:inset 0 0 0 1.5px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fluid .fluid-button-group.fluid-button-group-row{align-self:center;justify-content:flex-start}.fluid .fluid-button-group.fluid-button-group-column{flex-direction:column}.fluid .fluid-button-group.fluid-button-group-appearance-normal .fluid-button{white-space:nowrap}.fluid .fluid-button-group.fluid-button-group-appearance-buttons{background:transparent;padding:2px 0;min-height:var(--fluid-target-size);overflow:visible}.fluid .fluid-button-group.fluid-button-group-appearance-buttons .fluid-button{margin-right:var(--fluid-sm-space);margin-bottom:var(--fluid-sm-space)}.fluid .fluid-button-group.fluid-button-group-appearance-buttons .fluid-button:last-child{margin-right:0}.fluid .fluid-button-group.fluid-button-group-appearance-tabs{flex:1 1 auto;background:var(--fluid-box-background);padding:0 var(--fluid-med-space);padding-right:2px;min-height:40px;border-radius:0;justify-content:flex-start;align-self:stretch;overflow:visible;flex-wrap:nowrap;max-width:100%;min-width:0}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button{margin:0;background:transparent;border:none;border-radius:0;padding:0 12px}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button:hover{background:var(--fluid-box-hover-background)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button:focus{border-radius:var(--fluid-radius)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button.is-selected{border-radius:0;background:var(--fluid-blue-7)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button.is-selected:focus{box-shadow:inset 0 0 0 2px var(--fluid-box-background),0 0 0 1.5 var(--fluid-accent),0 4px 4px 0 rgba(0,0,0,.1)}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button:last-child{margin-right:0}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button.fluid-more-button{margin-left:auto!important}.fluid .fluid-button-group.fluid-button-group-appearance-tabs .fluid-button .fluid-count-badge{margin-left:5px;padding:3px;background:var(--fluid-primary-background);color:var(--fluid-primary-color);border-radius:3px}.fluid .fluid-button-group .fluid-vertical-divider{flex:0 0 auto;margin:var(--fluid-sm-space) 0;background:var(--fluid-background);border:none;border-radius:2px}.fluid .fluid-button-group .fluid-horizontal-divider{flex:0 0 auto;margin:0 var(--fluid-sm-space);background:var(--fluid-background);border:none;border-radius:2px}.fluid .fluid-button-group .fluid-is-selected+.fluid-divider{visibility:hidden}.fluid .fluid-button-group.fluid-button-group-appearance-grid{background:transparent!important;flex:1 1 auto;display:grid;grid-gap:var(--fluid-sm-space);grid-template-columns:1fr 1fr;margin:-3px}.fluid .fluid-divider.fluid-horizontal-divider,.fluid .fluid-divider.fluid-vertical-divider{box-sizing:border-box;background:var(--fluid-background)}.fluid .fluid-divider.fluid-vertical-divider{width:2px;height:auto}.fluid .fluid-is-hidden{visibility:hidden}.fluid .fluid-more-menu{background:var(--fluid-box-background);color:var(--fluid-box-color);border-radius:var(--fluid-radius);padding:3px;display:flex;flex-direction:column}.fluid .fluid-color-scheme-dark .fluid-button-group{background:var(--fluid-transparent-1)}.fluid .fluid-color-scheme-dark .fluid-button-group>select{background-color:var(--fluid-transparent-1)}.fluid .fluid-color-scheme-dark .fluid-button-group>select:hover{background-color:var(--fluid-transparent-3)}.fl.uid .fluid-button{--color:var(--fluid-opaque-5);--background:var(--fluid-transparent-12);--hover:var(--fluid-transparent-10);--hover-color:var(--fluid-opaque-0);box-sizing:border-box;display:inline-flex;background:var(--background);color:var(--color);border-radius:var(--fluid-radius);box-shadow:0 0 0 transparent;min-height:var(--fluid-target-size);min-width:var(--fluid-target-size);padding:5px 8px;text-decoration:none;font-weight:400;text-transform:none;line-height:1.1}.fl.uid .fluid-button,.fl.uid .fluid-button>span{flex:0 0 auto;flex-direction:row;justify-content:center;align-items:center}.fl.uid .fluid-button>span{display:flex;min-width:0}.fl.uid .fluid-button.is-hovering,.fl.uid .fluid-button:hover{text-decoration:none;background:var(--hover);color:var(--hover-color);z-index:1}.fl.uid .fluid-button.is-focused,.fl.uid .fluid-button:focus{top:0;z-index:3;outline:none;text-decoration:none;box-shadow:inset 0 0 0 2px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fl.uid .fluid-button.is-active,.fl.uid .fluid-button:active{background:var(--hover);box-shadow:inset 0 2px 2px rgba(0,0,0,.1)}.fl.uid .fluid-button.is-selected{background:var(--fluid-blue-7);color:var(--fluid-blue-14)}.fl.uid .fluid-button.is-selected.is-focused,.fl.uid .fluid-button.is-selected:focus{background:var(--fluid-blue-7)!important;color:var(--fluid-blue-14)}.fl.uid .fluid-button.fluid-shape-round{border-radius:50%}.fl.uid .fluid-button.fluid-shape-round.fluid-size-sm{padding:3px;width:30px;height:30px;min-width:30px;min-height:30px;max-width:30px;max-height:30px}.fl.uid .fluid-button.fluid-shape-round.fluid-size-med{padding:3px;width:36px;height:36px;min-width:36px;min-height:36px;max-width:36px;max-height:36px}.fl.uid .fluid-button.fluid-shape-round.fluid-size-lg{padding:3px;width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px}.fl.uid .fluid-button.fluid-appearance-elevator{height:44px;width:44px;padding:5px 12px;border-radius:50%}.fl.uid .fluid-button.fluid-appearance-transparent{--background:transparent;box-shadow:none;border:none;outline:none}.fl.uid .fluid-button.fluid-appearance-transparent.is-focused,.fl.uid .fluid-button.fluid-appearance-transparent:focus{box-shadow:inset 0 0 0 2px var(--fluid-background),0 0 0 1.5px var(--fluid-accent)}.fl.uid .fluid-button.fluid-status-primary{--background:var(--fluid-blue-12);--color:var(--fluid-blue-5);--hover:var(--fluid-blue-10);--hover-color:var(--fluid-blue-3)}.fl.uid .fluid-button.fluid-status-primary.fluid-appearance-transparent{--background:transparent;--color:var(--fluid-blue-6);--hover:var(--fluid-blue-12);--hover-color:var(--fluid-blue-5)}.fl.uid .fluid-button.fluid-status-alert{--fluid-accent:var(--fluid-alert-color);--hover-color:var(--fluid-alert-color);--color:var(--fluid-alert-color)}.fl.uid .fluid-button.fluid-status-destructive{--fluid-accent:var(--fluid-destructive-color);--hover-color:var(--fluid-destructive-color);--color:var(--fluid-destructive-color)}.fl.uid .fluid-button.fluid-size-sm{font-size:12px;padding:5px;min-height:30px;min-width:30px}.fl.uid .fluid-button.fluid-size-med{min-height:var(--fluid-target-size);min-width:var(--fluid-target-size)}.fl.uid .fluid-button.fluid-size-lg{font-size:16px;padding:5px 12px;min-height:44px;min-width:44px}.fl.uid .fluid-button .fluid-button-icon{flex:0 0 auto;margin-right:.5em}.fl.uid .fluid-button .fluid-button-icon:last-child{margin-right:0}.fl.uid .fluid-color-scheme-dark .fluid-button{--color:var(--fluid-opaque-10);--background:var(--fluid-transparent-1);--hover:var(--fluid-transparent-3);--hover-color:var(--fluid-opaque-14)}.fl.uid .fluid-color-scheme-dark .fluid-button.is-focused,.fl.uid .fluid-color-scheme-dark .fluid-button:focus{background:var(--fluid-opaque-0)}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-appearance-transparent{--background:transparent}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-status-primary{--color:var(--fluid-blue-14);--background:var(--fluid-blue-7);--hover:var(--fluid-blue-6);--hover-color:var(--fluid-blue-13)}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-status-primary.fluid-appearance-transparent{--background:transparent;--color:var(--fluid-blue-8);--hover:var(--fluid-blue-4);--hover-color:var(--fluid-blue-14)}.fl.uid .fluid-color-scheme-dark .fluid-button.fluid-status-destructive{--fluid-accent:var(--fluid-destructive-color);--color:var(--fluid-destructive-color);--hover-color:var(--fluid-destructive-color)}.fluid-dialog{background-color:rgba(0,0,0,.2);display:flex;align-items:center;justify-content:center;padding:var(--fluid-med-space);position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000}.fluid-dialog-window{background:var(--fluid-background);border-radius:var(--fluid-radius);box-shadow:0 0 20px rgba(0,0,0,.25);padding:var(--fluid-lg-space);max-width:460px;width:100%}.fluid-dialog-title{font-size:20px;margin-bottom:var(--fluid-med-space)}.fluid-dialog-message{font-size:14px;line-height:1.6;margin-bottom:var(--fluid-lg-space)}.fluid-dialog-buttons{display:flex;justify-content:flex-end}.fluid-dialog-buttons button{margin-left:var(--fluid-sm-space);min-width:70px!important}.fluid-lightbox{background-color:rgba(0,0,0,.75);padding:var(--fluid-med-space);position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000}.fluid-lightbox .fluid-lightbox-close,.fluid-lightbox .fluid-lightbox-close:active,.fluid-lightbox .fluid-lightbox-close:focus,.fluid-lightbox .fluid-lightbox-close:hover{background-color:rgba(0,0,0,.75);border-radius:100%;color:#fff;font-size:16px;position:absolute;top:var(--fluid-med-space);right:var(--fluid-med-space)}.fluid-lightbox .fluid-lightbox-content{cursor:zoom-out;display:flex;align-items:center;justify-content:center;padding:var(--fluid-lg-space);position:fixed;top:0;right:0;bottom:0;left:0}.fluid-lightbox .fluid-lightbox-content img{max-width:100%;max-height:100%}.fl.uid .fluid-page .fluid-section{display:flex;flex-direction:column;flex:0 0 auto;margin:0 calc(0px - var(--fluid-lg-space))}.fl.uid .fluid-page .fluid-section .fluid-section-title{flex:0 0 auto;display:flex;flex-direction:row;align-items:flex-end;padding:9px var(--fluid-lg-space) 0;text-transform:uppercase;border-bottom:2px solid var(--fluid-line-color);min-height:var(--fluid-target-size)}.fl.uid .fluid-page .fluid-section .fluid-section-title .fluid-section-title-text{display:inline-flex;max-width:70%;box-shadow:0 2px 0 0 currentColor;align-items:flex-end;padding:0 0 5px;font-weight:500}.fl.uid .fluid-page .fluid-section .fluid-section-description{flex:0 0 auto;display:flex;flex-direction:column;padding:var(--fluid-lg-space);padding-bottom:0;font-style:italic}.fl.uid .fluid-page .fluid-section .fluid-section-description>:first-child{margin-top:0}.fl.uid .fluid-page .fluid-section .fluid-section-description>:last-child{margin-bottom:0}.fl.uid .fluid-page .fluid-section .fluid-section-content{flex:1 0 auto;display:grid;grid-row-gap:var(--fluid-sm-space)}.fl.uid .fluid-scroller{overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.fl.uid .fluid-pad,.fl.uid .fluid-scroller{box-sizing:border-box;flex:1 1 auto;display:flex;flex-direction:column;min-height:0;max-height:100%}.fl.uid .fluid-pad{padding:var(--fluid-lg-space)}.fl.uid .fluid-pad-x{padding-left:var(--fluid-lg-space);padding-right:var(--fluid-lg-space)}.fl.uid .fluid-pad-y{padding-top:var(--fluid-lg-space);padding-bottom:var(--fluid-lg-space)}.fl.uid .fluid-page{--fluid-top-inset:0px;position:relative;flex:1 1 auto;display:flex;flex-direction:column;background-color:var(--fluid-background);color:var(--fluid-color);max-height:100%;min-height:0}.fl.uid .fluid-page .fluid-sticky-element{position:-webkit-sticky;position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky;top:var(--fluid-top-inset);background:var(--fluid-background);z-index:9}.fl.uid .fluid-page .fluid-page-actions{margin-left:auto;display:flex;flex-direction:row;align-items:center}.fl.uid .fluid-page .fluid-page-toolbar-content{position:static;padding:0 var(--fluid-med-space);padding-left:2px;flex:1 0 auto;display:flex;flex-direction:row;justify-content:flex-start;align-items:center}.fl.uid .fluid-page .fluid-page-title-icon{flex:0 0 auto;width:40px;height:40px;border-radius:20px;display:inline-flex;flex-direction:row;justify-content:center;align-items:center;margin:0}.fl.uid .fluid-page .fluid-page-headline{font-size:24px;font-weight:600}.fl.uid .fluid-page .fluid-page-content{flex:1 0 auto;flex-direction:column;z-index:1}.fl.uid .fluid-page-footer,.fl.uid .fluid-page .fluid-page-content{box-sizing:border-box;display:flex;background:var(--fluid-background)}.fl.uid .fluid-page-footer{position:absolute;bottom:0;left:0;right:0;min-height:55px;flex:0 0 auto;flex-direction:row;align-items:stretch;justify-content:flex-start;border-top:2px solid var(--fluid-box-background);z-index:9}.fl.uid .fluid-page-footer>.fluid-button{margin-right:var(--fluid-sm-space)}.fl.uid .fluid-page-footer>.fluid-button:last-child{margin-right:0}.fl.uid .fluid-page-overlay{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.fluid .fluid-collection{--icon-area:40px;--thumbnail-brightness:97%;position:relative;display:grid;grid-template-columns:repeat(2,1fr);grid-gap:var(--fluid-lg-space);padding:var(--fluid-lg-space);padding-top:2px;margin:0}.fluid .fluid-collection.fluid-collection-appearance-list{display:flex;flex-direction:column}.fluid .fluid-collection .fluid-collection-item{position:relative;display:flex;flex-direction:column;min-width:0}.fluid .fluid-collection .fluid-collection-item-thumbnail{flex:0 0 auto;transition-property:transform;transition-duration:.15s;transform-origin:top center;z-index:1}.fluid .fluid-collection .fluid-collection-item-thumbnail .fluid-aspect-box{-webkit-filter:brightness(var(--thumbnail-brightness));filter:brightness(var(--thumbnail-brightness))}.fluid .fluid-collection .fluid-collection-item-text{flex:1 1 auto;display:flex;min-height:50px}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title{flex:1 1 auto;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;max-width:100%;padding:0 10px}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-item-description,.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-item-title-text{line-height:1;word-break:break-word;text-align:left}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-item-description{padding-top:3px;opacity:.7}.fluid .fluid-collection .fluid-collection-item-text .fluid-item-title .fluid-truncate{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.fluid .fluid-collection .fluid-collection-item-text.item-has-icon .fluid-item-title{padding-left:0;max-width:calc(100% - var(--icon-area))}.fluid .fluid-collection .fluid-collection-item-icon{flex:0 0 var(--icon-area);width:var(--icon-area);min-height:var(--icon-area);display:flex;justify-content:center;align-items:center}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action{flex:1 1 auto;padding:0;background:var(--fluid-opaque-12);border-radius:var(--fluid-radius);overflow:hidden}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action>span{flex:1 1 auto;flex-direction:column;align-items:stretch}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action:hover{background-color:var(--fluid-transparent-11)}.fluid .fluid-collection .fluid-button.fluid-collection-item-primary-action:focus{box-shadow:0 0 0 1.5px var(--fluid-background),0 0 0 3px var(--fluid-blue)}.fluid .fluid-collection .fluid-collection-item-list-content{display:flex;flex-direction:row;align-items:center}.fluid .fluid-collection .fluid-collection-item-list-content .fluid-collection-item-thumbnail{width:60px;padding-right:var(--fluid-med-space)}.fluid .fluid-collection .fluid-collection-item-list-content .fluid-item-title{font-size:14px}.fluid .fluid-collection .fluid-collection-item-grid-content{display:flex;flex-direction:column}.fluid .fluid-collection .fluid-collection-item-grid-content .fluid-item-title{font-size:12px}.fluid .fluid-color-scheme-dark .fluid-button.fluid-collection-item-primary-action{background:var(--fluid-opaque-1)}.fluid .fluid-color-scheme-dark .fluid-button.fluid-collection-item-primary-action:hover{background-color:var(--fluid-opaque-0)}
|
fl-builder.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Beaver Builder Plugin (Lite Version)
|
4 |
* Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
|
5 |
* Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
|
6 |
-
* Version: 2.5.2.
|
7 |
* Author: The Beaver Builder Team
|
8 |
* Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
|
9 |
* Copyright: (c) 2014 Beaver Builder
|
3 |
* Plugin Name: Beaver Builder Plugin (Lite Version)
|
4 |
* Plugin URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-uri
|
5 |
* Description: A drag and drop frontend WordPress page builder plugin that works with almost any theme!
|
6 |
+
* Version: 2.5.2.3
|
7 |
* Author: The Beaver Builder Team
|
8 |
* Author URI: https://www.wpbeaverbuilder.com/?utm_medium=bb&utm_source=plugins-admin-page&utm_campaign=plugins-admin-author
|
9 |
* Copyright: (c) 2014 Beaver Builder
|
includes/updater-config.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
if ( class_exists( 'FLUpdater' ) ) {
|
4 |
FLUpdater::add_product(array(
|
5 |
'name' => 'Beaver Builder Plugin (Lite Version)',
|
6 |
-
'version' => '2.5.2.
|
7 |
'slug' => 'bb-plugin',
|
8 |
'type' => 'plugin',
|
9 |
));
|
3 |
if ( class_exists( 'FLUpdater' ) ) {
|
4 |
FLUpdater::add_product(array(
|
5 |
'name' => 'Beaver Builder Plugin (Lite Version)',
|
6 |
+
'version' => '2.5.2.3',
|
7 |
'slug' => 'bb-plugin',
|
8 |
'type' => 'plugin',
|
9 |
));
|
includes/vendor/drip/Drip_API.class.php
CHANGED
@@ -68,11 +68,14 @@ Class Drip_Api {
|
|
68 |
|
69 |
// here we distinguish errors from no campaigns.
|
70 |
// when there's no json that's an error
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
|
|
76 |
|
77 |
return $campaigns;
|
78 |
}
|
@@ -106,11 +109,13 @@ Class Drip_Api {
|
|
106 |
|
107 |
// here we distinguish errors from no campaign
|
108 |
// when there's no json that's an error
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
|
|
|
|
114 |
|
115 |
return $campaigns;
|
116 |
}
|
@@ -145,11 +150,13 @@ Class Drip_Api {
|
|
145 |
|
146 |
// here we distinguish errors from no workflows.
|
147 |
// when there's no json that's an error
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
|
|
|
|
153 |
|
154 |
return $workflows;
|
155 |
}
|
@@ -168,11 +175,13 @@ Class Drip_Api {
|
|
168 |
$raw_json = json_decode($res['buffer'], true);
|
169 |
}
|
170 |
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
|
|
|
|
176 |
|
177 |
return $data;
|
178 |
}
|
@@ -194,11 +203,13 @@ Class Drip_Api {
|
|
194 |
$raw_json = json_decode($res['buffer'], true);
|
195 |
}
|
196 |
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
|
|
|
|
202 |
|
203 |
return $data;
|
204 |
}
|
@@ -229,11 +240,13 @@ Class Drip_Api {
|
|
229 |
$raw_json = json_decode($res['buffer'], true);
|
230 |
}
|
231 |
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
|
|
|
|
237 |
|
238 |
return $data;
|
239 |
}
|
@@ -272,11 +285,13 @@ Class Drip_Api {
|
|
272 |
$raw_json = json_decode($res['buffer'], true);
|
273 |
}
|
274 |
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
|
|
|
|
280 |
|
281 |
return $data;
|
282 |
}
|
@@ -322,11 +337,13 @@ Class Drip_Api {
|
|
322 |
$raw_json = json_decode($res['buffer'], true);
|
323 |
}
|
324 |
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
|
|
|
|
330 |
|
331 |
return $data;
|
332 |
}
|
@@ -368,11 +385,13 @@ Class Drip_Api {
|
|
368 |
$raw_json = json_decode($res['buffer'], true);
|
369 |
}
|
370 |
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
|
|
|
|
376 |
|
377 |
return $data;
|
378 |
}
|
@@ -494,11 +513,13 @@ Class Drip_Api {
|
|
494 |
$raw_json = json_decode($res['buffer'], true);
|
495 |
}
|
496 |
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
|
|
|
|
502 |
|
503 |
return $data;
|
504 |
}
|
68 |
|
69 |
// here we distinguish errors from no campaigns.
|
70 |
// when there's no json that's an error
|
71 |
+
|
72 |
+
if ( empty( $raw_json ) ) {
|
73 |
+
$campaigns = false;
|
74 |
+
} elseif( empty($raw_json['campaigns']) ) {
|
75 |
+
$campaigns = array();
|
76 |
+
} else {
|
77 |
+
$campaigns = $raw_json['campaigns'];
|
78 |
+
}
|
79 |
|
80 |
return $campaigns;
|
81 |
}
|
109 |
|
110 |
// here we distinguish errors from no campaign
|
111 |
// when there's no json that's an error
|
112 |
+
if ( empty( $raw_json ) ) {
|
113 |
+
$campaigns = false;
|
114 |
+
} elseif( empty($raw_json['campaigns']) ) {
|
115 |
+
$campaigns = array();
|
116 |
+
} else {
|
117 |
+
$campaigns = $raw_json['campaigns'];
|
118 |
+
}
|
119 |
|
120 |
return $campaigns;
|
121 |
}
|
150 |
|
151 |
// here we distinguish errors from no workflows.
|
152 |
// when there's no json that's an error
|
153 |
+
if ( empty( $raw_json ) ) {
|
154 |
+
$workflows = false;
|
155 |
+
} elseif( empty($raw_json['workflows']) ) {
|
156 |
+
$workflows = array();
|
157 |
+
} else {
|
158 |
+
$workflows = $raw_json['workflows'];
|
159 |
+
}
|
160 |
|
161 |
return $workflows;
|
162 |
}
|
175 |
$raw_json = json_decode($res['buffer'], true);
|
176 |
}
|
177 |
|
178 |
+
if ( empty( $raw_json ) ) {
|
179 |
+
$data = false;
|
180 |
+
} elseif( empty($raw_json['accounts']) ) {
|
181 |
+
$data = array();
|
182 |
+
} else {
|
183 |
+
$data = $raw_json['accounts'];
|
184 |
+
}
|
185 |
|
186 |
return $data;
|
187 |
}
|
203 |
$raw_json = json_decode($res['buffer'], true);
|
204 |
}
|
205 |
|
206 |
+
if ( empty( $raw_json ) ) {
|
207 |
+
$data = false;
|
208 |
+
} elseif( empty($raw_json['accounts']) ) {
|
209 |
+
$data = array();
|
210 |
+
} else {
|
211 |
+
$data = $raw_json['accounts'];
|
212 |
+
}
|
213 |
|
214 |
return $data;
|
215 |
}
|
240 |
$raw_json = json_decode($res['buffer'], true);
|
241 |
}
|
242 |
|
243 |
+
if ( empty( $raw_json ) ) {
|
244 |
+
$data = false;
|
245 |
+
} elseif( empty($raw_json['subscribers']) ) {
|
246 |
+
$data = array();
|
247 |
+
} else {
|
248 |
+
$data = $raw_json['subscribers'][0];
|
249 |
+
}
|
250 |
|
251 |
return $data;
|
252 |
}
|
285 |
$raw_json = json_decode($res['buffer'], true);
|
286 |
}
|
287 |
|
288 |
+
if ( empty( $raw_json ) ) {
|
289 |
+
$data = false;
|
290 |
+
} elseif( empty($raw_json['subscribers']) ) {
|
291 |
+
$data = array();
|
292 |
+
} else {
|
293 |
+
$data = $raw_json['subscribers'][0];
|
294 |
+
}
|
295 |
|
296 |
return $data;
|
297 |
}
|
337 |
$raw_json = json_decode($res['buffer'], true);
|
338 |
}
|
339 |
|
340 |
+
if ( empty( $raw_json ) ) {
|
341 |
+
$data = false;
|
342 |
+
} elseif( empty($raw_json['subscribers']) ) {
|
343 |
+
$data = array();
|
344 |
+
} else {
|
345 |
+
$data = $raw_json['subscribers'][0];
|
346 |
+
}
|
347 |
|
348 |
return $data;
|
349 |
}
|
385 |
$raw_json = json_decode($res['buffer'], true);
|
386 |
}
|
387 |
|
388 |
+
if ( empty( $raw_json ) ) {
|
389 |
+
$data = false;
|
390 |
+
} elseif( empty($raw_json['subscribers']) ) {
|
391 |
+
$data = array();
|
392 |
+
} else {
|
393 |
+
$data = $raw_json['subscribers'][0];
|
394 |
+
}
|
395 |
|
396 |
return $data;
|
397 |
}
|
513 |
$raw_json = json_decode($res['buffer'], true);
|
514 |
}
|
515 |
|
516 |
+
if ( empty( $raw_json ) ) {
|
517 |
+
$data = false;
|
518 |
+
} elseif( empty($raw_json['subscribers']) ) {
|
519 |
+
$data = array();
|
520 |
+
} else {
|
521 |
+
$data = $raw_json['subscribers'][0];
|
522 |
+
}
|
523 |
|
524 |
return $data;
|
525 |
}
|
js/build/builder.bundle.min.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
/*! For license information please see builder.bundle.min.js.LICENSE.txt */
|
2 |
-
(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var l in n)r.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},856:function(e){e.exports=function(){"use strict";function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var t=Object.hasOwnProperty,n=Object.setPrototypeOf,r=Object.isFrozen,o=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,a=Object.freeze,l=Object.seal,u=Object.create,c="undefined"!=typeof Reflect&&Reflect,s=c.apply,d=c.construct;s||(s=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),l||(l=function(e){return e}),d||(d=function(t,n){return new(Function.prototype.bind.apply(t,[null].concat(e(n))))});var f=_(Array.prototype.forEach),p=_(Array.prototype.pop),m=_(Array.prototype.push),g=_(String.prototype.toLowerCase),y=_(String.prototype.match),v=_(String.prototype.replace),h=_(String.prototype.indexOf),b=_(String.prototype.trim),E=_(RegExp.prototype.test),O=w(TypeError);function _(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return s(e,t,r)}}function w(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return d(e,n)}}function S(e,t){n&&n(e,null);for(var o=t.length;o--;){var i=t[o];if("string"==typeof i){var a=g(i);a!==i&&(r(t)||(t[o]=a),i=a)}e[i]=!0}return e}function C(e){var n=u(null),r=void 0;for(r in e)s(t,e,[r])&&(n[r]=e[r]);return n}function L(e,t){for(;null!==e;){var n=i(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=o(e)}function r(e){return console.warn("fallback value for",e),null}return r}var T=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),A=a(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),D=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),k=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=a(["#text"]),x=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),R=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=l(/\{\{[\s\S]*|[\s\S]*\}\}/gm),I=l(/<%[\s\S]*|[\s\S]*%>/gm),H=l(/^data-[\-\w.\u00B7-\uFFFF]/),U=l(/^aria-[\-\w]+$/),z=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=l(/^(?:\w+script|data):/i),W=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Z(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var V=function(){return"undefined"==typeof window?null:window},Q=function(e,t){if("object"!==(void 0===e?"undefined":Y(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V(),t=function(e){return q(e)};if(t.version="2.3.4",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,o=e.DocumentFragment,i=e.HTMLTemplateElement,l=e.Node,u=e.Element,c=e.NodeFilter,s=e.NamedNodeMap,d=void 0===s?e.NamedNodeMap||e.MozNamedAttrMap:s,_=e.HTMLFormElement,w=e.DOMParser,X=e.trustedTypes,$=u.prototype,K=L($,"cloneNode"),J=L($,"nextSibling"),ee=L($,"childNodes"),te=L($,"parentNode");if("function"==typeof i){var ne=r.createElement("template");ne.content&&ne.content.ownerDocument&&(r=ne.content.ownerDocument)}var re=Q(X,n),oe=re&&Me?re.createHTML(""):"",ie=r,ae=ie.implementation,le=ie.createNodeIterator,ue=ie.createDocumentFragment,ce=ie.getElementsByTagName,se=n.importNode,de={};try{de=C(r).documentMode?r.documentMode:{}}catch(e){}var fe={};t.isSupported="function"==typeof te&&ae&&void 0!==ae.createHTMLDocument&&9!==de;var pe=B,me=I,ge=H,ye=U,ve=G,he=W,be=z,Ee=null,Oe=S({},[].concat(Z(T),Z(N),Z(j),Z(D),Z(P))),_e=null,we=S({},[].concat(Z(x),Z(R),Z(M),Z(F))),Se=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Le=null,Te=!0,Ne=!0,je=!1,Ae=!1,De=!1,ke=!1,Pe=!1,xe=!1,Re=!1,Me=!1,Fe=!0,Be=!0,Ie=!1,He={},Ue=null,ze=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ge=null,We=S({},["audio","video","img","source","image","track"]),Ye=null,Ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml",Xe=qe,$e=!1,Ke=void 0,Je=["application/xhtml+xml","text/html"],et="text/html",tt=void 0,nt=null,rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},it=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":Y(e))||(e={}),e=C(e),Ee="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS):Oe,_e="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR):we,Ye="ADD_URI_SAFE_ATTR"in e?S(C(Ze),e.ADD_URI_SAFE_ATTR):Ze,Ge="ADD_DATA_URI_TAGS"in e?S(C(We),e.ADD_DATA_URI_TAGS):We,Ue="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS):ze,Ce="FORBID_TAGS"in e?S({},e.FORBID_TAGS):{},Le="FORBID_ATTR"in e?S({},e.FORBID_ATTR):{},He="USE_PROFILES"in e&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,De=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,Me=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Be=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Xe=e.NAMESPACE||qe,e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke=Ke=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Ke?function(e){return e}:g,Ae&&(Ne=!1),Re&&(xe=!0),He&&(Ee=S({},[].concat(Z(P))),_e=[],!0===He.html&&(S(Ee,T),S(_e,x)),!0===He.svg&&(S(Ee,N),S(_e,R),S(_e,F)),!0===He.svgFilters&&(S(Ee,j),S(_e,R),S(_e,F)),!0===He.mathMl&&(S(Ee,D),S(_e,M),S(_e,F))),e.ADD_TAGS&&(Ee===Oe&&(Ee=C(Ee)),S(Ee,e.ADD_TAGS)),e.ADD_ATTR&&(_e===we&&(_e=C(_e)),S(_e,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&S(Ye,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Ue===ze&&(Ue=C(Ue)),S(Ue,e.FORBID_CONTENTS)),Be&&(Ee["#text"]=!0),De&&S(Ee,["html","head","body"]),Ee.table&&(S(Ee,["tbody"]),delete Ce.tbody),a&&a(e),nt=e)},at=S({},["mi","mo","mn","ms","mtext"]),lt=S({},["foreignobject","desc","title","annotation-xml"]),ut=S({},N);S(ut,j),S(ut,A);var ct=S({},D);S(ct,k);var st=function(e){var t=te(e);t&&t.tagName||(t={namespaceURI:qe,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===Qe)return t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(ut[n]);if(e.namespaceURI===Ve)return t.namespaceURI===qe?"math"===n:t.namespaceURI===Qe?"math"===n&<[r]:Boolean(ct[n]);if(e.namespaceURI===qe){if(t.namespaceURI===Qe&&!lt[r])return!1;if(t.namespaceURI===Ve&&!at[r])return!1;var o=S({},["title","style","font","a","script"]);return!ct[n]&&(o[n]||!ut[n])}return!1},dt=function(e){m(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ft=function(e,n){try{m(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){m(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!_e[e])if(xe||Re)try{dt(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},pt=function(e){var t=void 0,n=void 0;if(Pe)e="<remove></remove>"+e;else{var o=y(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=re?re.createHTML(e):e;if(Xe===qe)try{t=(new w).parseFromString(i,Ke)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=$e?"":i}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Xe===qe?ce.call(t,De?"html":"body")[0]:De?t.documentElement:a},mt=function(e){return le.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},gt=function(e){return e instanceof _&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},yt=function(e){return"object"===(void 0===l?"undefined":Y(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":Y(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,n,r){fe[e]&&f(fe[e],(function(e){e.call(t,n,r,nt)}))},ht=function(e){var n=void 0;if(vt("beforeSanitizeElements",e,null),gt(e))return dt(e),!0;if(y(e.nodeName,/[\u0080-\uFFFF]/))return dt(e),!0;var r=tt(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:r,allowedTags:Ee}),!yt(e.firstElementChild)&&(!yt(e.content)||!yt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return dt(e),!0;if("select"===r&&E(/<template/i,e.innerHTML))return dt(e),!0;if(!Ee[r]||Ce[r]){if(Be&&!Ue[r]){var o=te(e)||e.parentNode,i=ee(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(K(i[a],!0),J(e))}if(!Ce[r]&&Et(r)){if(Se.tagNameCheck instanceof RegExp&&E(Se.tagNameCheck,r))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(r))return!1}return dt(e),!0}return e instanceof u&&!st(e)?(dt(e),!0):"noscript"!==r&&"noembed"!==r||!E(/<\/no(script|embed)/i,e.innerHTML)?(Ae&&3===e.nodeType&&(n=e.textContent,n=v(n,pe," "),n=v(n,me," "),e.textContent!==n&&(m(t.removed,{element:e.cloneNode()}),e.textContent=n)),vt("afterSanitizeElements",e,null),!1):(dt(e),!0)},bt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Ne&&!Le[t]&&E(ge,t));else if(Te&&E(ye,t));else if(!_e[t]||Le[t]){if(!(Et(e)&&(Se.tagNameCheck instanceof RegExp&&E(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&E(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&E(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(Ye[t]);else if(E(be,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==h(n,"data:")||!Ge[e])if(je&&!E(ve,v(n,he,"")));else if(n)return!1;return!0},Et=function(e){return e.indexOf("-")>0},Ot=function(e){var n=void 0,r=void 0,o=void 0,i=void 0;vt("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e};for(i=a.length;i--;){var u=n=a[i],c=u.name,s=u.namespaceURI;if(r=b(n.value),o=tt(c),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(ft(c,e),l.keepAttr))if(E(/\/>/i,r))ft(c,e);else{Ae&&(r=v(r,pe," "),r=v(r,me," "));var d=tt(e.nodeName);if(bt(d,o,r))try{s?e.setAttributeNS(s,c,r):e.setAttribute(c,r),p(t.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)}},_t=function e(t){var n=void 0,r=mt(t);for(vt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)vt("uponSanitizeShadowNode",n,null),ht(n)||(n.content instanceof o&&e(n.content),Ot(n));vt("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,i){var a=void 0,u=void 0,c=void 0,s=void 0,d=void 0;if(($e=!r)&&(r="\x3c!--\x3e"),"string"!=typeof r&&!yt(r)){if("function"!=typeof r.toString)throw O("toString is not a function");if("string"!=typeof(r=r.toString()))throw O("dirty is not a string, aborting")}if(!t.isSupported){if("object"===Y(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(yt(r))return e.toStaticHTML(r.outerHTML)}return r}if(ke||it(i),t.removed=[],"string"==typeof r&&(Ie=!1),Ie);else if(r instanceof l)1===(u=(a=pt("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?a=u:a.appendChild(u);else{if(!xe&&!Ae&&!De&&-1===r.indexOf("<"))return re&&Me?re.createHTML(r):r;if(!(a=pt(r)))return xe?null:oe}a&&Pe&&dt(a.firstChild);for(var f=mt(Ie?r:a);c=f.nextNode();)3===c.nodeType&&c===s||ht(c)||(c.content instanceof o&&_t(c.content),Ot(c),s=c);if(s=null,Ie)return r;if(xe){if(Re)for(d=ue.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return _e.shadowroot&&(d=se.call(n,d,!0)),d}var p=De?a.outerHTML:a.innerHTML;return Ae&&(p=v(p,pe," "),p=v(p,me," ")),re&&Me?re.createHTML(p):p},t.setConfig=function(e){it(e),ke=!0},t.clearConfig=function(){nt=null,ke=!1},t.isValidAttribute=function(e,t,n){nt||it({});var r=tt(e),o=tt(t);return bt(r,o,n)},t.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],m(fe[e],t))},t.removeHook=function(e){fe[e]&&p(fe[e])},t.removeHooks=function(e){fe[e]&&(fe[e]=[])},t.removeAllHooks=function(){fe={}},t}return q()}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{displayPanel:()=>L,hideCurrentPanel:()=>N,registerPanel:()=>C,setColorScheme:()=>A,setIsEditing:()=>j,setShouldShowShortcuts:()=>S,togglePanel:()=>T});var t={};n.r(t),n.d(t,{colorScheme:()=>B,currentPanel:()=>M,isEditing:()=>F,panels:()=>R,shouldShowShortcuts:()=>x});var r={};n.r(r),n.d(r,{after:()=>H,before:()=>I});var o={};n.r(o),n.d(o,{editing:()=>Re,layout:()=>xe,resizing:()=>Me});var i={};n.r(i),n.d(i,{addColumnGroup:()=>lt,addColumnTemplate:()=>ht,addColumns:()=>et,addModule:()=>Ke,addNodeTemplate:()=>pt,addRow:()=>ut,addRowTemplate:()=>bt,applyTemplate:()=>ft,cancelDisplaySettings:()=>kt,clearHistoryStates:()=>jt,copyColumn:()=>rt,copyModule:()=>Je,copyRow:()=>ct,deleteColumn:()=>it,deleteNode:()=>$e,deleteNodeTemplate:()=>gt,deleteUserTemplate:()=>vt,discardDraft:()=>Tt,displaySettings:()=>Dt,fetchLayout:()=>Et,insertFreeformNode:()=>Ge,insertNode:()=>ze,insertNodes:()=>We,moveColumn:()=>nt,moveNode:()=>Ze,redo:()=>Ue,renderHistoryState:()=>At,renderLayout:()=>_t,renderNode:()=>Ve,reorderColumn:()=>tt,reorderNode:()=>Ye,resetColWidths:()=>at,resetRowWidth:()=>dt,resizeColumn:()=>ot,resizeRowContent:()=>st,resizingComplete:()=>Pt,saveDraft:()=>Lt,saveGlobalSettings:()=>St,saveHistoryState:()=>Nt,saveLayout:()=>Ct,saveLayoutSettings:()=>wt,saveNodeTemplate:()=>mt,saveUserTemplateSettings:()=>yt,setLayout:()=>Ot,undo:()=>He,updateNode:()=>Qe,updateNodeSetting:()=>Xe,updateNodeSettings:()=>qe});var a={};n.r(a),n.d(a,{after:()=>Bt,before:()=>Ft});var l={};n.r(l),n.d(l,{getChildren:()=>$t,getLayoutActions:()=>Vt,getLayoutHooks:()=>Qt,getLayoutState:()=>Zt,getLayoutStore:()=>Yt,getNode:()=>Xt,getSystemActions:()=>Y,getSystemConfig:()=>V,getSystemSelectors:()=>Z,getSystemState:()=>W,getSystemStore:()=>G,nodeExists:()=>Kt,useLayoutState:()=>qt,useSystemState:()=>z});var u={};n.r(u),n.d(u,{copyNode:()=>Qn,deleteNode:()=>Vn,moveNode:()=>Xn,scrollToNode:()=>qn});var c={};n.r(c),n.d(c,{openSettings:()=>$n});var s={};n.r(s),n.d(s,{getActions:()=>tr,getConfig:()=>nr,getStrings:()=>rr});const d=React;var f=n.n(d);const p=ReactDOM,m=FL.vendors.BBAppCore;var g=(0,m.createStoreRegistry)(),y=g.registerStore,v=g.useStore,h=g.getStore,b=g.getDispatch,E=g.getSelectors;function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){return{type:"SET_SHOULD_SHOW_SHORTCUTS",value:e}},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fl/untitled",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={label:"",root:null,render:function(){return null},className:null,routerProps:{},onHistoryChanged:function(){}};return{type:"REGISTER_PANEL",handle:e,options:_(_({},n),t)}},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"SET_CURRENT_PANEL",name:e}},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"TOGGLE_PANEL",name:e}},N=function(){return{type:"HIDE_CURRENT_PANEL"}},j=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"SET_IS_EDITING",value:e}},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return{type:"SET_COLOR_SCHEME",value:e}};function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_SHOULD_SHOW_SHORTCUTS"===t.type?!!t.value:e},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"REGISTER_PANEL"===t.type?k(k({},e),{},P({},t.handle,t.options)):e},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CURRENT_PANEL":return t.name;case"HIDE_CURRENT_PANEL":return null;case"TOGGLE_PANEL":return t.name===e?null:t.name;default:return e}},F=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_IS_EDITING"===t.type?!!t.value:e},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light",t=arguments.length>1?arguments[1]:void 0;return"SET_COLOR_SCHEME"===t.type?"dark"===t.value?"dark":"light":e},I={},H={TOGGLE_PANEL:function(e,t){var n=t.getState().currentPanel,r=document.querySelector("html");n&&FLBuilder._closePanel(),"assistant"===n?r.classList.add("fl-builder-assistant-visible"):r.classList.remove("fl-builder-assistant-visible")},HIDE_CURRENT_PANEL:function(){document.querySelector("html").classList.remove("fl-builder-assistant-visible")}},U="fl-builder/system";y(U,{actions:e,reducers:t,effects:r,state:{isEditing:!0,currentPanel:null,shouldShowShortcuts:!1,colorScheme:FLBuilderConfig.userSettings.skin,panels:{}}});var z=function(){return v(U)},G=function(){return h(U)},W=function(){return h(U).getState()},Y=function(){return b(U)},Z=function(){return E(U)},V=function(){return window.FLBuilderConfig};const Q=Redux;var q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.getState;return function(t){return function(r){var o=t(r),i=n();return void 0!==e[r.type]&&e[r.type](i,r),o}}}},X=function(e){var t=e.before,n=e.after;return function(e){return function(r){return function(o){t&&t[o.type]&&t[o.type](o,e);var i=r(o);return n&&n[o.type]&&n[o.type](o,e),i}}}};const $=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,o=r?r({name:e}):Q.compose;return o((0,Q.applyMiddleware)(q(n),X(t)))};function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=function(e){var t={};return Object.values(e).map((function(e){var n=te({},e);delete n.settings,t[e.node]=n})),t},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={},r=Object.values(e).filter((function(e){return t===e.parent}));return r.map((function(e){return n[e.node]=e})),n},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.layout.present.nodes;return void 0===n[t]?{}:n[t].settings},ae=function(e,t){return Object.keys(e).length!==Object.keys(t).length||Object.values(e).some((function(e){var n=t[e.node];return void 0===e||void 0===n||(e.type!==n.type||e.parent!==n.parent||e.position!==n.position||e.global!==n.global)}))},le=function(e,t){return Object.keys(e).length!==Object.keys(t).length||Object.keys(e).some((function(n){return e[n]!==t[n]}))};const ue=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.layout.present.nodes;return void 0!==t&&(n=oe(n,t)),re(n)};return{useLayoutStore:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0},n=e.getState(),r=(0,d.useRef)(n),o=(0,d.useState)(n),i=K(o,2),a=i[0],l=i[1];return(0,d.useEffect)((function(){return l(e.getState()),e.subscribe((function(){var n=e.getState();t(r.current,n)&&l(te({},n)),r.current=n}))}),[]),a},useNodeSettings:function(t){var n=ie(e.getState(),t),r=(0,d.useRef)(n),o=K((0,d.useState)(n),2),i=o[0],a=o[1];return(0,d.useEffect)((function(){var n=ie(e.getState(),t);return le(n,r.current)&&a(n),r.current=n,e.subscribe((function(){var n=ie(e.getState(),t);le(n,r.current)&&a(n),r.current=n}))}),[t]),i},useNodesWithoutSettings:function(n){var r=t(e.getState(),n),o=(0,d.useRef)(r),i=K((0,d.useState)(r),2),a=i[0],l=i[1];return(0,d.useEffect)((function(){var r=t(e.getState(),n);return ae(r,o.current)&&l(r),o.current=r,e.subscribe((function(){var r=t(e.getState(),n);ae(r,o.current)&&l(r),o.current=r}))}),[]),a}}};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fe={layout:{past:[],present:{attachments:[],nodes:{}},future:[]}},pe={state:{},reducers:{},actions:{},effects:{},tests:{}};const me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fl-builder/layout",n=se(se({},pe),e),r=se(se({},fe),n.state),o=(0,Q.combineReducers)(n.reducers),i=$(t,n.effects,n.tests),a=(0,Q.createStore)(o,r,i);return{store:a,actions:(0,Q.bindActionCreators)(se({},n.actions),a.dispatch),hooks:ue(a)}};const ge=function(e){var t={past:[],present:e(void 0,{}),future:[]};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,r=arguments.length>1?arguments[1]:void 0,o=n.past,i=void 0===o?[]:o,a=n.present,l=n.future,u=void 0===l?[]:l;return"RESIZE_COLUMN"===r.type?(r.persist,{past:i,present:e(a,r),future:u}):{past:i,present:e(a,r),future:u}}};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){he(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be={node:"",type:"",parent:"",position:0,global:!1,settings:{}},Ee=function(e,t){return e.position>t.position?1:e.position<t.position?-1:0},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0!==t[e]},_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).filter((function(e){return t===e.parent})).sort(Ee)},we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=ve(ve(ve({},be),e),t);return"module"===n.type&&void 0===n.settings.type&&(n.settings.type=e.settings.type),n},Se=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o={};if(void 0===r[e])return console.error("Undefined node",e),o;var i=_e(r,t).filter((function(t){return e!==t.node})),a=i.map((function(e){return e.node}));return a.splice(n,0,e),a.map((function(e,n){o[e]=we(r[e],{position:n,parent:t})})),o},Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ve(ve({},e),{},he({},t,we(e[t],n)));return Se(n.node,n.parent,n.position,r)},Le=function(e,t){var n={};if(void 0===t[e])return console.warn("Node to be deleted is undefined",e),t;var r=t[e].parent,o=t[e].type,i=ve({},t);delete i[e],"column"===o&&Ne(r,i)&&delete i[r],function(e,t){var n=[],r=ve({},t);Object.values(r).map((function(t){e===t.parent&&n.push(t.node)})),n.map((function(e){delete r[e]}))}(e,i);var a=_e(i,r);return a.map((function(e,t){if(e.position=t,"column"===e.type){var r=100/a.length;r=r.toPrecision(5),e.settings.size=r}n[e.node]=e})),ve({},i)},Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n={};return e.map((function(e){var r=Object.values(t).filter((function(t){return e===t.parent})),o=(100/r.length).toPrecision(5);r.map((function(e){n[e.node]=we(e,{settings:ve(ve({},e.settings),{},{size:o})})}))})),n},Ne=function(e,t){return 0===Object.values(t).filter((function(t){return t.parent===e})).length},je=function(e){void 0!==e&&(console.assert("node"in e,"Node has no id property"),console.assert("type"in e,"Node has no type property"),console.assert("parent"in e,"Node has no parent property"),console.assert("position"in e,"Node has no position property"),console.assert("settings"in e,"Node has no settings property"),console.assert("global"in e,"Node has no global property"),"module"===e.type&&console.assert("type"in e.settings,"Module settings should contain type property."),"row"!==e.type&&console.assert(null!==e.parent,"Only rows should have a null parent property"))},Ae=function(e){var t=function(e){var t=Object.keys(e);return Object.values(e).filter((function(e){return null!==e.parent&&!t.includes(e.node)}))}(e);console.assert(0===t.length,"There should be no orphaned nodes",t)};function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=ge((0,Q.combineReducers)({attachments:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_LAYOUT"===t.type&&void 0!==t.attachments?t.attachments:e},nodes:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_NODE":return ke(ke({},t),Ce(t,n.id,{node:n.id,parent:n.parent,type:n.nodeType,position:n.position,settings:n.settings,global:n.global}));case"INSERT_FREEFORM_NODE":return ke(ke({},t),Ce(t,n.id,n.node));case"INSERT_NODES":return ke(ke({},t),n.nodes);case"REORDER_NODE":case"REORDER_COLUMN":return ke(ke({},t),Se(n.id,t[n.id].parent,n.position,t));case"REPARENT_NODE":case"REPARENT_COLUMN":return ke(ke({},t),Se(n.id,n.parent,n.position,t));case"UPDATE_NODE":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],n.node)));case"UPDATE_NODE_SETTING":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},Pe({},n.key,n.value))})));case"UPDATE_NODE_SETTINGS":return void 0===t[n.id]?t:ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke(ke({},t[n.id].settings),n.settings),{},{type:"module"===t[n.id].type?t[n.id].settings.type:void 0})})));case"DELETE_NODE":case"DELETE_COLUMN":return Le(n.id,t);case"RESIZE_COLUMN":return ke(ke({},t),{},(Pe(e={},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},{size:n.width})})),Pe(e,n.siblingId,we(t[n.siblingId],{settings:ke(ke({},t[n.siblingId].settings),{},{size:n.siblingWidth})})),e));case"RESET_COLUMN_WIDTHS":return ke(ke({},t),Te(n.groupIds,t));case"RESIZE_ROW_CONTENT":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},{max_content_width:n.width})})));case"RESET_ROW_WIDTH":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},{max_content_width:""})})));case"ADD_COLUMN_TEMPLATE":case"ADD_ROW_TEMPLATE":return console.log(n.type,"Needs node reducer implementation?"),t;case"SET_LAYOUT":return n.nodes;default:return t}},globalSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SAVE_GLOBAL_SETTINGS"===t.type?t.settings:e}})),Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DISPLAY_SETTINGS":return t.id;case"UPDATE_NODE_SETTINGS":case"CANCEL_DISPLAY_SETTINGS":return null;default:return e}},Me=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESIZING_COMPLETE":return!1;case"RESIZE_ROW_CONTENT":return[t.id];case"RESIZE_COLUMN":return[t.id,t.siblingId];default:return e}};function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){Ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var He=function(){return{type:"UNDO"}},Ue=function(){return{type:"REDO"}},ze=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length,l=new Array(a>6?a-6:0),u=6;u<a;u++)l[u-6]=arguments[u];return Be({type:"INSERT_NODE",id:e,parent:t,position:r,nodeType:n,settings:o,global:i},l)},Ge=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"INSERT_FREEFORM_NODE",id:e,node:t}},We=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"INSERT_NODES",nodes:e}},Ye=function(e,t){return{type:"REORDER_NODE",id:e,position:t}},Ze=function(e,t,n){return{type:"REPARENT_NODE",id:e,parent:t,position:n}},Ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return{type:"RENDER_NODE",id:e,callback:t}},Qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"UPDATE_NODE",id:e,node:t}},qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return{type:"UPDATE_NODE_SETTINGS",id:e,settings:t,callback:n}},Xe=function(e,t,n){return{type:"UPDATE_NODE_SETTING",id:e,key:t,value:n}},$e=function(e){return{type:"DELETE_NODE",id:e}},Ke=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{type:"ADD_MODULE",moduleType:e,parent:t,position:n,config:r}},Je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return{type:"COPY_MODULE",id:e,settings:t,callback:n}},et=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"1-col",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return{type:"ADD_COLUMNS",id:e,insert:t,colType:n,nested:r,module:o}},tt=function(e,t){return{type:"REORDER_COLUMN",id:e,position:t}},nt=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return{type:"REPARENT_COLUMN",id:e,parent:t,position:n,resize:r}},rt=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return{type:"COPY_COLUMN",id:e,settings:t,settingsId:n,callback:r}},ot=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return{type:"RESIZE_COLUMN",id:e,width:parseInt(t),siblingId:n,siblingWidth:parseInt(r),shouldPersist:o}},it=function(e,t){return{type:"DELETE_COLUMN",id:e,width:t}},at=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"RESET_COLUMN_WIDTHS",groupIds:e}},lt=function(e,t,n,r){return{type:"ADD_COLUMN_GROUP",id:e,cols:t,position:n,module:r}},ut=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return{type:"ADD_ROW",cols:e,position:t,module:n}},ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return{type:"COPY_ROW",id:e,settings:t,settingsId:n,callback:r}},st=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"RESIZE_ROW_CONTENT",id:e,width:t,shouldPersist:n}},dt=function(e){return{type:"RESET_ROW_WIDTH",id:e}},ft=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"core";return{type:"APPLY_TEMPLATE",id:e,append:t,templateType:n}},pt=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){};return{type:"ADD_NODE_TEMPLATE",nodeType:e,templateId:t,templateType:n,parent:r,position:o,callback:i}},mt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"SAVE_NODE_TEMPLATE",id:e,settings:t}},gt=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"DELETE_NODE_TEMPLATE",id:e,global:t}},yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"SAVE_USER_TEMPLATE_SETTINGS",settings:e}},vt=function(e){return{type:"DELETE_USER_TEMPLATE",id:e}},ht=function(){return{type:"ADD_COLUMN_TEMPLATE"}},bt=function(){return{type:"ADD_ROW_TEMPLATE"}},Et=function(){return{type:"FETCH_LAYOUT"}},Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{type:"SET_LAYOUT",nodes:e,attachments:t}},_t=function(){return{type:"RENDER_LAYOUT"}},wt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"SAVE_LAYOUT_SETTINGS",settings:e}},St=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"SAVE_GLOBAL_SETTINGS",settings:e}},Ct=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return{type:"SAVE_LAYOUT",shouldPublish:e,shouldExit:t,callback:n}},Lt=function(){return{type:"SAVE_DRAFT"}},Tt=function(){return{type:"DISCARD_DRAFT"}},Nt=function(e,t){return{type:"SAVE_HISTORY_STATE",label:e,moduleType:t}},jt=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"CLEAR_HISTORY_STATES",postId:e,shouldExit:t}},At=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return{type:"RENDER_HISTORY_STATE",position:e,callback:t}},Dt=function(e){return{type:"DISPLAY_SETTINGS",id:e}},kt=function(){return{type:"CANCEL_DISPLAY_SETTINGS"}},Pt=function(){return{type:"RESIZING_COMPLETE"}};function xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mt=function(e,t){var n=FLBuilder._jsonParse(e),r=n.newNodes,o=void 0===r?{}:r,i=n.updatedNodes,a=void 0===i?{}:i;0<Object.keys(o).length&&t.dispatch(We(o)),Object.entries(a).map((function(e){var n=xt(e,2),r=n[0],o=n[1];t.dispatch(Qe(r,o))}))},Ft={},Bt={UNDO:function(){window.FLBuilderHistoryManager.renderState("prev")},REDO:function(){window.FLBuilderHistoryManager.renderState("next")},UPDATE_NODE_SETTINGS:function(e){var t=e.id,n=e.settings,r=e.callback;FLBuilder.ajax({action:"save_settings",node_id:t,settings:n},r)},REORDER_NODE:function(e,t){var n=e.id,r=e.position;(0,FL.Builder.__canvas.getActions().moveNode)(n,r),FLBuilder.ajax({action:"reorder_node",node_id:n,position:r},(function(e){Mt(e,t),FLBuilder._reorderNodeComplete(e)}))},REPARENT_NODE:function(e,t){var n=e.id,r=e.parent,o=e.position;(0,FL.Builder.__canvas.getActions().moveNode)(n,o,r),FLBuilder.ajax({action:"move_node",new_parent:r,node_id:n,position:o},(function(e){Mt(e,t),FLBuilder._moveNodeComplete(e)}))},RENDER_NODE:function(e){var t=e.id,n=e.callback;FLBuilder.ajax({action:"render_node",node_id:t},(function(e){var t=FLBuilder._jsonParse(e);FLBuilder._renderLayout(t,n)}))},DELETE_NODE:function(e){var t=e.id;FLBuilder.ajax({action:"delete_node",node_id:t})},ADD_MODULE:function(e,t){var n=e.moduleType,r=e.parent,o=e.position,i=e.config;FLBuilder.ajax({action:"render_new_module",parent_id:r,type:n,position:o,node_preview:i.nodePreview,widget:i.widget,alias:i.alias},(function(e){Mt(e,t),FLBuilder._addModuleComplete(e)}))},COPY_MODULE:function(e,t){var n=e.id,r=e.settings,o=e.callback;FLBuilder.ajax({action:"copy_module",node_id:n,settings:r},(function(e){Mt(e,t),o(e)}))},ADD_COLUMNS:function(e,t){var n=e.id,r=e.insert,o=e.colType,i=e.nested,a=e.module;FLBuilder.ajax({action:"render_new_columns",node_id:n,insert:r,type:o,nested:i,module:a},(function(e){Mt(e,t),FLBuilder._addColsComplete(e)}))},RESIZE_COLUMN:function(e,t){var n=e.id,r=e.width,o=e.siblingId,i=e.siblingWidth;e.shouldPersist&&(t.dispatch(Pt()),FLBuilder.ajax({action:"resize_cols",col_id:n,col_width:r,sibling_id:o,sibling_width:i},(function(e){return Mt(e,t)})))},RESET_COLUMN_WIDTHS:function(e){var t=e.groupIds;FLBuilder.ajax({action:"reset_col_widths",group_id:t},(function(){return FLBuilder.triggerHook("didResetColumnWidthsComplete")}))},DELETE_COLUMN:function(e){var t=e.id,n=e.width;FLBuilder.ajax({action:"delete_col",node_id:t,new_width:n})},REORDER_COLUMN:function(e){var t=e.id,n=e.position;(0,FL.Builder.__canvas.getActions().moveNode)(t,n),FLBuilder.ajax({action:"reorder_col",node_id:t,position:n},(function(){return FLBuilder.triggerHook("didMoveColumn")}))},REPARENT_COLUMN:function(e){var t=e.id,n=e.parent,r=e.position,o=e.resize;(0,FL.Builder.__canvas.getActions().moveNode)(t,r,n),FLBuilder.ajax({action:"move_col",node_id:t,new_parent:n,position:r,resize:o},(function(){return FLBuilder.triggerHook("didMoveColumn")}))},COPY_COLUMN:function(e,t){var n=e.id,r=e.settings,o=e.settingsId,i=e.callback;FLBuilder.ajax({action:"copy_col",node_id:n,settings:r,settings_id:o},(function(e){Mt(e,t),i(e)}))},ADD_COLUMN_GROUP:function(e,t){var n=e.id,r=e.cols,o=e.position,i=e.module;FLBuilder.ajax({action:"render_new_column_group",node_id:n,cols:r,position:o,module:i},(function(e){Mt(e,t),FLBuilder._addColGroupComplete(e)}))},ADD_ROW:function(e,t){var n=e.cols,r=e.position,o=e.module;FLBuilder.ajax({action:"render_new_row",cols:n,position:r,module:o},(function(e){Mt(e,t),FLBuilder._addRowComplete(e)}))},COPY_ROW:function(e,t){var n=e.id,r=e.settings,o=e.settingsId,i=e.callback;FLBuilder.ajax({action:"copy_row",node_id:n,settings:r,settings_id:o},(function(e){Mt(e,t),i(e)}))},RESIZE_ROW_CONTENT:function(e,t){var n=e.id,r=e.width;e.shouldPersist&&(FLBuilder.ajax({action:"resize_row_content",node:n,width:r}),t.dispatch(Pt()))},RESET_ROW_WIDTH:function(e){var t=e.id;FLBuilder.ajax({action:"resize_row_content",node:t,width:""})},APPLY_TEMPLATE:function(e,t){var n=e.id,r=e.append,o=e.templateType,i="core"===o?FLBuilder._applyTemplateComplete:FLBuilder._applyUserTemplateComplete;FLBuilder.ajax({action:"core"===o?"apply_template":"apply_user_template",template_id:n,append:r},(function(e){var n=FLBuilder._jsonParse(e);t.dispatch(Ot(n.newNodes,[])),i(e)}))},ADD_NODE_TEMPLATE:function(e,t){var n=e.nodeType,r=e.templateId,o=e.templateType,i=e.parent,a=e.position,l=e.callback,u="";switch(n){case"row":u="render_new_row_template";break;case"column":u="render_new_col_template";break;default:u="render_new_module"}FLBuilder.ajax({action:u,template_id:r,template_type:o,parent_id:i,position:a},(function(e){Mt(e,t),l(e)}))},SAVE_NODE_TEMPLATE:function(e,t){var n=e.id,r=e.settings;FLBuilder.ajax({action:"save_node_template",node_id:n,settings:r},(function(e){t.dispatch(Et()),FLBuilder._saveNodeTemplateComplete(e),FLBuilder._hideNodeLoading(n)}))},DELETE_NODE_TEMPLATE:function(e){var t=e.id,n=e.global;FLBuilder.ajax({action:"delete_node_template",template_id:t},(function(){n&&FLBuilder._updateLayout()}))},SAVE_USER_TEMPLATE_SETTINGS:function(e){var t=e.settings;FLBuilder.ajax({action:"save_user_template",settings:t},FLBuilder._saveUserTemplateSettingsComplete)},DELETE_USER_TEMPLATE:function(e){var t=e.id;FLBuilder.ajax({action:"delete_user_template",template_id:t})},RENDER_LAYOUT:function(){FLBuilder.ajax({action:"render_layout"},FLBuilder._renderLayout)},FETCH_LAYOUT:function(e,t){FLBuilder.ajax({action:"get_layout"},(function(e){var n=FLBuilder._jsonParse(e),r=n.nodes,o=n.attachments;t.dispatch(Ot(r,o))}))},SAVE_LAYOUT:function(e){var t=e.shouldPublish,n=e.shouldExit,r=e.callback;FLBuilder.ajax({action:"save_layout",publish:t,exit:n?1:0},r)},SAVE_DRAFT:function(){FLBuilder.ajax({action:"save_draft"},FLBuilder._exit)},DISCARD_DRAFT:function(){FLBuilder.ajax({action:"clear_draft_layout"},(function(){FLBuilder.triggerHook("didDiscardChanges"),FLBuilder._exit()}))},SAVE_LAYOUT_SETTINGS:function(e){var t=e.settings;FLBuilder.ajax({action:"save_layout_settings",settings:t},(function(){return FLBuilder._saveLayoutSettingsComplete(t)}))},SAVE_GLOBAL_SETTINGS:function(e){var t=e.settings;FLBuilder.ajax({action:"save_global_settings",settings:t},FLBuilder._saveGlobalSettingsComplete)},SAVE_HISTORY_STATE:function(e){var t=e.label,n=e.moduleType;FLBuilder.ajax({action:"save_history_state",label:t,module_type:n},(function(e){var t=FLBuilder._jsonParse(e);FLBuilderHistoryManager.states=t.states,FLBuilderHistoryManager.position=parseInt(t.position),FLBuilderHistoryManager.setupMainMenuData()}))},CLEAR_HISTORY_STATES:function(e){var t=e.postId,n=e.shouldExit;FLBuilder.ajax({action:"clear_history_states",post_id:t},(function(){n||FLBuilderHistoryManager.saveCurrentState("draft_created")}))},RENDER_HISTORY_STATE:function(e,t){var n=e.position,r=e.callback;FLBuilder.ajax({action:"render_history_state",position:n},(function(e){var n=FLBuilder._jsonParse(e),o=n.newNodes,i=n.config;t.dispatch(Ot(o,i.attachments)),r(e)}))},DISPLAY_SETTINGS:function(e,t){var n=e.id,r=t.getState().layout.present.nodes;if("global"!==n)if("layout"!==n){if(void 0!==r[n]){var o=r[n],i=o.type,a=o.settings,l=o.parent,u=o.global,c=o.template_id;switch(i){case"column-group":break;case"row":FLBuilder._showRowSettings(n,u);break;case"column":var s="column"!==FLBuilderConfig.userTemplateType&&void 0!==c;FLBuilder._showColSettings(n,u,s);break;default:FLBuilder._showModuleSettings({nodeId:n,parentId:l,type:a.type,global:u})}}}else FLBuilder._layoutSettingsClicked();else FLBuilder._globalSettingsClicked()}},It={SET_LAYOUT:function(e){!function(e){Object.values(e).map(je)}(e.layout.present.nodes)},INSERT_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(Oe(t.id,n),"Node should exist after insert."),je(n[t.id]),console.assert(n[t.id].position===t.position,"Node position should be consistent after insert."),Ae(n)},REORDER_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(Oe(t.id,n),"Node no longer exists after reorder."),je(n[t.id]);var r=n[t.id];console.assert(t.position===r.position,"Node position should match action.position")},REPARENT_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(Oe(t.id,n),"Node should not exist after reparent"),je(n[t.id]),console.assert(t.parent===n[t.id].parent,"Node should have correct parent after reparent")},DELETE_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(!Oe(t.id,n),"Node should not exist after delete"),Ae(n)},COPY_MODULE:function(e,t){var n=e.layout.present.nodes,r=Oe(t.id,n);console.assert(r,"Node no longer exists after duplicate."),r&&je(n[t.id])},DELETE_COLUMN:function(e){var t=e.layout.present.nodes;Ae(t)},REPARENT_COLUMN:function(){console.warn("REPARENT_COLUMN needs a test.")},RESET_COLUMN_WIDTHS:function(e,t){var n=e.layout.present.nodes;t.groupIds.map((function(e){var t=_e(n,e),r=100/t.length,o=t.every((function(e){return e.settings.size===r.toPrecision(5)}));console.assert(o,"Column sizes should match after reset")}))}};const Ht=It;var Ut=me({state:{layout:{present:{nodes:{},globalSettings:FLBuilderConfig.global}}},reducers:o,effects:a,actions:i,tests:Ht}),zt=Ut.store,Gt=Ut.actions,Wt=Ut.hooks,Yt=function(){return zt},Zt=function(){return zt.getState()},Vt=function(){return Gt},Qt=function(){return Wt},qt=Wt.useLayoutStore,Xt=function(e){var t=Zt().layout.present.nodes;return e&&e in t?t[e]:t},$t=function(e){var t=Zt().layout.present.nodes;return Object.values(t).filter((function(t){return e===t.parent}))},Kt=function(e){return"undefined"!==Zt().layout.present.nodes[e]};zt.dispatch(Et());var Jt=n(184),en=n.n(Jt),tn={},nn=(0,d.createContext)(tn),rn=function(){return(0,d.useContext)(nn)};const on=FL.vendors.BBFluid;var an=["onClick","label"];function ln(){return ln=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ln.apply(this,arguments)}function un(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function cn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const dn=function(e){var t=e.x,n=e.y,r=e.items,o=void 0===r?{}:r,i=e.clear,a=void 0===i?function(){}:i,l=window.innerWidth-190,u={};return Object.entries(o).map((function(e){var t=cn(e,2),n=t[0],r=t[1];!1!==r.isEnabled&&(u[n]=r)})),f().createElement("div",{className:"fl-builder-context-menu",style:{top:n,left:t<l?t:l,width:180}},f().createElement("ul",null,Object.keys(u).map((function(e){var t=o[e],n=t.onClick,r=t.label,i=un(t,an);return f().createElement("li",{key:e},f().createElement(on.Button,ln({onClick:function(e){n(e),a(),e.stopPropagation()},size:"sm"},i),r))}))))};function fn(){return fn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fn.apply(this,arguments)}function pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gn=function(e){var t=e.children,n=pn((0,d.useState)(!1),2),r=n[0],o=n[1],i=function(){return o(!1)},a={setContextMenu:o,clearContextMenu:i,showContextMenu:!1!==r,contextMenu:r};return f().createElement(nn.Provider,{value:a},f().createElement(yn,null),t,!1!==r&&f().createElement(dn,fn({},r,{clear:i})))},yn=function(){var e=rn().clearContextMenu,t=function(t){document.querySelector(".fl-builder-context-menu")&&!t.target.closest(".fl-builder-context-menu")&&(e(),t.stopPropagation())},n=function(){document.querySelector(".fl-builder-context-menu")&&e()};return(0,d.useEffect)((function(){return window.addEventListener("click",t,{capture:!0}),window.addEventListener("scroll",n,{capture:!0}),function(){window.removeEventListener("click",t,{capture:!0}),window.removeEventListener("scroll",n,{capture:!0})}}),[]),null};function vn(e){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(e)}function hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t,n){return t&&bn(e.prototype,t),n&&bn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function On(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&_n(e,t)}function _n(e,t){return _n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_n(e,t)}function wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ln(e);if(t){var o=Ln(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sn(this,n)}}function Sn(e,t){if(t&&("object"===vn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Cn(e)}function Cn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(e)}var Tn=FLBuilderConfig.lite,Nn=function(e){var t,n={__html:e.children},r=new Date(e.date).toDateString();if("string"==typeof e.url&&""!==e.url){var o=Tn?e.url+"?utm_medium=bb-lite&utm_source=builder-ui&utm_campaign=notification-center":e.url+"?utm_medium=bb-pro&utm_source=builder-ui&utm_campaign=notification-center";t=f().createElement("a",{className:"fl-builder-ui-post",href:o,target:"_blank",rel:"noopener noreferrer"},f().createElement("div",{className:"fl-builder-ui-post-date"},r),f().createElement("div",{className:"fl-builder-ui-post-title"},e.title),f().createElement("div",{className:"fl-builder-ui-post-content",dangerouslySetInnerHTML:n}))}else t=f().createElement("span",{className:"fl-builder-ui-post"},f().createElement("div",{className:"fl-builder-ui-post-date"},r),f().createElement("div",{className:"fl-builder-ui-post-title"},e.title),f().createElement("div",{className:"fl-builder-ui-post-content",dangerouslySetInnerHTML:n}));return t},jn=function(e){On(n,e);var t=wn(n);function n(){return hn(this,n),t.apply(this,arguments)}return En(n,[{key:"getPosts",value:function(e){var t,n,r=FLBuilderStrings.notifications;return 0<e.length?(n=e.map((function(e){return f().createElement(Nn,{key:e.id,title:(t=e.title.rendered,f().createElement("div",{dangerouslySetInnerHTML:{__html:t}})),date:e.date,url:e.meta._fl_notification[0]},e.content.rendered);var t})),t=f().createElement(f().Fragment,null,n)):t=f().createElement("div",{className:"fl-panel-no-message"},r.none),t}},{key:"componentDidMount",value:function(){FLBuilder._initScrollbars()}},{key:"componentDidUpdate",value:function(){FLBuilder._initScrollbars()}},{key:"render",value:function(){var e=this.getPosts(this.props.posts),t=FLBuilderStrings.notifications;return f().createElement("div",{className:"fl-notifications-panel"},f().createElement("div",{className:"fl-panel-title"},t.title),f().createElement("div",{className:"fl-nanoscroller",ref:this.setupScroller},f().createElement("div",{className:"fl-nanoscroller-content"},e)))}}]),n}(d.Component),An=function(e){On(n,e);var t=wn(n);function n(e){var r;hn(this,n),r=t.call(this,e);var o={},i=FLBuilderConfig.notifications.data;try{o=JSON.parse(i)}catch(e){o={}}return r.state={shouldShowNotifications:!1,posts:o},FLBuilder.addHook("toggleNotifications",r.onToggleNotifications.bind(Cn(r))),r}return En(n,[{key:"onToggleNotifications",value:function(){var e=Y().hideCurrentPanel;this.setState({shouldShowNotifications:!this.state.shouldShowNotifications}),e(),!0===this.state.shouldShowNotifications&&FLBuilder.triggerHook("notificationsLoaded")}},{key:"render",value:function(){var e=this.state,t=e.shouldShowNotifications,n=e.posts;return t&&f().createElement(jn,{posts:n})}}]),n}(d.Component);function Dn(e){return Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dn(e)}function kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pn(e,t){return Pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pn(e,t)}function xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mn(e);if(t){var o=Mn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rn(this,n)}}function Rn(e,t){if(t&&("object"===Dn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Mn(e){return Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(e)}var Fn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&Pn(e,t)}(i,e);var t,n,r,o=xn(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var n=(t=o.call(this,e)).props.postId;return t.layoutClass=".fl-builder-content-".concat(n||FLBuilderConfig.postId),t}return t=i,n=[{key:"componentDidMount",value:function(){this.setupHooks=this.setupHooks.bind(this),this.hooked=!1,jQuery(document).on("tinymce-editor-init",this.setupHooks),this.setupHooks()}},{key:"setupHooks",value:function(){if(!("ontouchstart"in document)&&window.tinymce&&!this.hooked&&FLBuilderConfig.inlineEnabled){var e=this.initEditables.bind(this),t=this.refreshEditables.bind(this),n=this.destroyAllEditables.bind(this),r=this.destroyLoadingEditables.bind(this);FLBuilder&&(FLBuilder.addHook("settingsConfigLoaded",e),FLBuilder.addHook("restartEditingSession",e),FLBuilder.addHook("endEditingSession",n),FLBuilder.addHook("didStartNodeLoading",r),FLBuilder.addHook("didRenderLayoutComplete",t),FLBuilder.addHook("didDeleteRow",t),FLBuilder.addHook("didDeleteColumn",t),FLBuilder.addHook("didDeleteModule",t)),this.initEditables(),this.hooked=!0}}},{key:"initEditables",value:function(){var e=this,t=FLBuilderSettingsConfig.editables,n=jQuery(this.layoutClass);if(n.length)for(var r in t){var o='.fl-module[data-type="'.concat(r,'"]:not(.fl-editable):not(.fl-node-global)');n.find(o).each((function(t,n){(n=jQuery(n)).addClass("fl-editable"),n.delegate(".fl-block-overlay","click.fl-inline-editing-init",(function(t){return e.initEditable(t,n)}))}))}}},{key:"initEditable",value:function(e,t){var n=this,r=FLBuilder.preview;r&&t.parents(".fl-node-".concat(r.nodeId)).length&&r._settingsHaveChanged()||(this.setupEditable(t,(function(){n.onModuleOverlayClick(e)})),t.undelegate(".fl-block-overlay","click.fl-inline-editing-init"))}},{key:"setupEditable",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=e.data("node"),o=FLBuilderSettingsConfig.nodes[r];if(void 0===o)return!1;var i=e.data("type"),a=FLBuilderSettingsConfig.editables[i],l=".fl-node-".concat(r," "),u="fl-inline-editor-".concat(r),c=jQuery('<div id="'.concat(u,'" class="fl-inline-editor"></div>')),s=jQuery(".fl-builder-settings[data-node=".concat(r,"]")),d=o.connections;e.append(c),e.on("click",".fl-block-overlay",this.onModuleOverlayClick.bind(this)),e.on("mouseleave",this.onModuleMouseleave.bind(this));var f=function(e){var r=a[e],o=FLBuilderPreview.getFormattedSelector(l,r.selector),i=jQuery(o),c=i.html(),f=s.find("#fl-field-".concat(e," .fl-field-connection-value"));return i.length?f.length&&""!==f.val()||!f.length&&d&&d[e]?"continue":(i.hasClass("mce-content-body")?tinymce.execCommand("mceRemoveEditor",!0,i.attr("id")):(i.data("field",r.field),i.on("drop",t.onEditorDrop.bind(t))),void tinymce.init({selector:o,inline:!0,menubar:!1,paste_as_text:!0,relative_urls:!1,convert_urls:!1,skin:!FLBuilder&&"lightgray",skin_url:!FLBuilder&&"".concat(tinyMCEPreInit.baseURL,"/skins/lightgray/"),theme:"modern",theme_url:"".concat(tinyMCEPreInit.baseURL,"/themes/modern/"),fixed_toolbar_container:"#".concat(u),plugins:t.getEditorPluginConfig(r.field.type),toolbar:"string"==typeof r.field.toolbar?r.field.toolbar:t.getEditorToolbarConfig(r.field.type),init_instance_callback:function(e){t.onEditorInit(e),i.html(c),n()}})):"continue"};for(var p in a)f(p)}},{key:"getEditorPluginConfig",value:function(e){return"editor"===e?"wordpress, wplink, lists, paste":"paste"}},{key:"getEditorToolbarConfig",value:function(e){switch(e){case"editor":return"bold italic strikethrough link underline | alignleft aligncenter alignright";case"unit":return!1;default:return"bold italic strikethrough underline"}}},{key:"destroyEditables",value:function(e){var t=e.find(".mce-content-body"),n=e.find(".fl-inline-editor"),r=jQuery(".wplink-autocomplete, .ui-helper-hidden-accessible");t.removeAttr("contenteditable"),e.undelegate(".fl-block-overlay","click"),e.off("mouseleave"),e.removeClass("fl-editable"),n.remove(),r.remove()}},{key:"destroyAllEditables",value:function(){var e=jQuery(this.layoutClass).find(".fl-editable");this.destroyEditables(e)}},{key:"destroyLoadingEditables",value:function(e,t){var n=jQuery(t);n.hasClass("fl-module")||(n=n.find(".fl-module")),this.destroyEditables(n)}},{key:"refreshEditables",value:function(){this.initEditables(),tinymce.editors.map((function(e){e.inline&&!jQuery("#".concat(e.id)).length&&setTimeout((function(){return tinymce.execCommand("mceRemoveEditor",!0,e.id)}),1)}))}},{key:"getEditorEventVars",value:function(e){var t=jQuery(e).closest(".mce-content-body"),n=tinymce.get(t.attr("id")),r=t.data("field"),o=t.closest(".fl-module"),i=o.data("node");return{editable:t,module:o,editor:n,field:r,nodeId:i}}},{key:"onEditorInit",value:function(e){e.on("change",this.onEditorChange.bind(this)),e.on("keyup",this.onEditorChange.bind(this)),e.on("undo",this.onEditorChange.bind(this)),e.on("redo",this.onEditorChange.bind(this)),e.on("focus",this.onEditorFocus.bind(this)),e.on("blur",this.onEditorBlur.bind(this)),e.on("mousedown",this.onEditorMousedown.bind(this))}},{key:"onEditorChange",value:function(e){var t=e.target.bodyElement?e.target.bodyElement:e.target,n=this.getEditorEventVars(t),r=n.editor,o=n.field,i=n.nodeId,a=jQuery('.fl-builder-settings[data-node="'.concat(i,'"]')),l=r.getContent();if(a.length)if("editor"===o.type){var u=a.find("#fl-field-".concat(o.name," textarea.wp-editor-area")),c=u.attr("id");u.closest(".tmce-active").length?tinymce.get(c).setContent(l):u.val(l)}else{var s=document.createElement("textarea");s.innerHTML=l,a.find('[name="'.concat(o.name,'"]')).val(s.value)}}},{key:"onEditorFocus",value:function(e){var t=this.getEditorEventVars(e.target.bodyElement),n=t.editable,r=t.editor,o=t.module,i=t.field,a=t.nodeId,l=o.find(".fl-inline-editor"),u=this.getSettingHTML(a,i);this.matchHTML(r.getContent(),u)||(n.data("original",{settingHTML:u,editableHTML:n.html()}),n.css("min-height",n.height()),r.setContent(u),r.selection.select(r.getBody(),!0),r.selection.collapse(!1)),r.settings.toolbar?l.removeClass("fl-inline-editor-no-toolbar"):l.addClass("fl-inline-editor-no-toolbar"),o.addClass("fl-editable-focused"),this.showEditorOverlay(o),this.showModuleSettings(o)}},{key:"onEditorBlur",value:function(e){var t=this.getEditorEventVars(e.target.bodyElement),n=t.editable,r=t.editor,o=t.module,i=o.find(".fl-inline-editor"),a=n.data("original");i.removeClass("fl-inline-editor-no-toolbar"),o.removeClass("fl-editable-focused"),a&&this.matchHTML(r.getContent(),a.settingHTML)&&(n.html(a.editableHTML),n.css("min-height",""))}},{key:"onEditorMousedown",value:function(e){var t=this.getEditorEventVars(e.target).module;this.showEditorOverlay(t)}},{key:"onEditorDrop",value:function(e){return e.preventDefault(),!1}},{key:"onModuleOverlayClick",value:function(e){var t=jQuery(e.target).closest(".fl-block-overlay-actions"),n=jQuery(e.currentTarget).closest(".fl-module"),r=n.find(".mce-content-body").first().attr("id");t.length||FLBuilder._colResizing||r&&(tinymce.get(r).focus(),n.addClass("fl-editable-focused"))}},{key:"onModuleMouseleave",value:function(){jQuery(".mce-inline-toolbar-grp:visible, .mce-floatpanel:visible").length||(this.hideEditorOverlays(),this.showNodeOverlays())}},{key:"showEditorOverlay",value:function(e){var t=e.find(".fl-inline-editor");this.hideNodeOverlays(),this.hideEditorOverlays(),t.show(),jQuery(".fl-inline-editor-active-toolbar").removeClass("fl-inline-editor-active-toolbar"),t.find("> .mce-panel:visible").addClass("fl-inline-editor-active-toolbar")}},{key:"hideEditorOverlays",value:function(){jQuery(".fl-inline-editor, .mce-floatpanel").hide()}},{key:"showNodeOverlays",value:function(){jQuery(".fl-block-overlay").show()}},{key:"hideNodeOverlays",value:function(){jQuery(".fl-block-overlay").hide()}},{key:"showModuleSettings",value:function(e){var t=e.data("type"),n=e.data("node"),r=e.closest(".fl-col").data("node"),o=e.hasClass("fl-node-global");jQuery('.fl-builder-settings[data-node="'.concat(n,'"]')).length||FLBuilder._showModuleSettings({type:t,nodeId:n,parentId:r,global:o})}},{key:"getSettingValue",value:function(e,t){var n=jQuery('.fl-builder-settings[data-node="'.concat(e,'"]'));return(n.length?FLBuilder._getSettings(n):FLBuilderSettingsConfig.nodes[e])[t]}},{key:"getSettingHTML",value:function(e,t){var n=this.getSettingValue(e,t.name);return"editor"===t.type&&""!==n?wp.editor.autop(n):n}},{key:"matchHTML",value:function(e,t){return this.cleanHTML(e)===this.cleanHTML(t)}},{key:"cleanHTML",value:function(e){return jQuery("<div>".concat(e,"</div>")).html().trim().replace(/(\r\n|\n|\r)/gm,"")}},{key:"render",value:function(){return null}}],n&&kn(t.prototype,n),r&&kn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);const Bn=Fn;var In=function(){return f().createElement("svg",{id:"fl-symbol-container",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},f().createElement("symbol",{id:"fl-down-caret",viewBox:"0 0 11 6"},f().createElement("polygon",{points:"0 0 2.05697559 0 5.49235478 3.74058411 8.93443824 0 11 0 5.5 6"})))},Hn=function(){};Hn.Close=function(){return f().createElement("svg",{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},f().createElement("g",{stroke:"currentColor",strokeWidth:"2",fill:"none",fillRule:"evenodd",strokeLinecap:"round"},f().createElement("path",{d:"M13,1 L1,13"}),f().createElement("path",{d:"M1,1 L13,13"})))};var Un=["className","children","title","actions","showCloseButton","onClose"];function zn(){return zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zn.apply(this,arguments)}function Gn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wn=function(e){var t=e.className,n=e.children,r=e.title,o=e.actions,i=e.showCloseButton,a=void 0===i||i,l=e.onClose,u=void 0===l?function(){}:l,c=Gn(e,Un),s=en()({"fl-ui-panel-area":!0},t),d=function(){return o||a?f().createElement("div",{className:"fl-ui-panel-trailing-actions"},o,f().createElement("button",{onClick:u,className:"fl-ui-button"},f().createElement(Hn.Close,null))):null};return f().createElement("div",{className:s,onClick:u},f().createElement("div",zn({className:"fl-ui-panel"},c,{onClick:function(e){return e.stopPropagation()}}),f().createElement("div",{className:"fl-ui-panel-topbar"},r&&f().createElement("div",{className:"fl-ui-panel-title"},r),f().createElement(d,null)),f().createElement("div",{className:"fl-ui-panel-content"},n)))},Yn=function(e){var t=e.shortcuts;return 0===Object.keys(t).length?null:f().createElement("ul",{className:"fl-ui-shortcut-list"},Object.values(t).map((function(e,t){var n=e.label,r={__html:e.keyLabel};return f().createElement("li",{key:t},f().createElement("span",null,n),f().createElement("span",{className:"fl-ui-shortcut-item-keycode",dangerouslySetInnerHTML:r}))})))};const Zn=function(){var e=Y().setShouldShowShortcuts;return f().createElement(Wn,{title:"Keyboard Shortcuts",onClose:function(){return e(!1)},className:"fl-ui-help",style:{width:360,maxWidth:"95vw"}},f().createElement(Yn,{shortcuts:FLBuilderConfig.keyboardShortcuts}))};wp.i18n;var Vn=function(e){var t=Vt().deleteNode;if(e){var n=!0,r=Xt(e);if(FLBuilder._needsDeleteConfirmation(r)){var o=function(e){var t=window.FLBuilderStrings,n=t.deleteRowMessage,r=t.deleteColumnMessage,o=t.deleteModuleMessage;switch(e){case"row":return n;case"column":return r;default:return o}}(r.type);n=confirm(o)}if(n){var i=FLBuilder._getJQueryElement(e);if(!i.length&&Kt(e))t(e);else if("module"===r.type)FLBuilder._deleteModule(i);else if("column"===r.type){var a=FLBuilder._getColToDelete(i);FLBuilder._deleteCol(a)}else"row"===r.type&&FLBuilder._deleteRow(i);FLBuilder._highlightEmptyCols(),FLBuilder._resizeLayout(),FLBuilder._removeAllOverlays()}}},Qn=function(e){if(e){var t=Xt(e);t&&void 0!==t.type&&("module"===t.type?FLBuilder._copyModule(e):"column"===t.type?FLBuilder._copyColumn(e):"row"===t.type&&FLBuilder._copyRow(e))}},qn=function(e){var t=document.querySelector("".concat(FLBuilder._contentClass,' [data-node="').concat(e,'"]'));t&&t.scrollIntoView({behavior:"smooth",block:"center"})},Xn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=Vt(),i=o.reorderNode,a=o.moveNode,l=o.reorderColumn,u=o.moveColumn,c=Xt(e),s=c.type,d=c.parent,f=c.position,p="column"===s;if(n===d||null===n){if(t===f)return;p?l(e,t):i(e,t)}else p?u(e,n,t,r):a(e,n,t)},$n=function(e){var t=Vt().displaySettings,n=Y().hideCurrentPanel;t(e),document.body.classList.contains("fl-builder-ui-is-pinned-right")&&n()};function Kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(n),!0).forEach((function(t){er(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tr=function(){var e=Y();return Jn(Jn(Jn({},{registerPanel:e.registerPanel,displayPanel:e.displayPanel,togglePanel:e.togglePanel}),u),c)},nr=function(){return window.FLBuilderConfig},rr=function(){return window.FLBuilderStrings},or=(0,d.createContext)({});or.use=function(){return(0,d.useContext)(or)};const ir=or;var ar=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"1.5",stroke:"currentColor"}))},lr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("rect",{x:"9.5",y:"13.5",width:"11",height:"4",rx:"0.5",transform:"rotate(-90 9.5 13.5)",stroke:"currentColor"}),f().createElement("rect",{x:"2.5",y:"13.5",width:"11",height:"4",rx:"0.5",transform:"rotate(-90 2.5 13.5)",stroke:"currentColor"}))},ur=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("rect",{x:"2.5",y:"9.5",width:"11",height:"4",rx:"0.5",stroke:"currentColor"}),f().createElement("rect",{x:"2.5",y:"2.5",width:"11",height:"4",rx:"0.5",stroke:"currentColor"}))},cr=function(){return f().createElement("svg",{className:"svg",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M12 6c0 1.105-.895 2-2 2-1.105 0-2-.895-2-2 0-1.105.895-2 2-2 1.105 0 2 .895 2 2zm-1 0c0 .552-.448 1-1 1-.552 0-1-.448-1-1 0-.552.448-1 1-1 .552 0 1 .448 1 1zM3 2c-.552 0-1 .448-1 1v10c0 .552.448 1 1 1h10c.552 0 1-.448 1-1V3c0-.552-.448-1-1-1H3zm10 1H3v6.293l2.5-2.5L11.707 13H13V3zM3 13v-2.293l2.5-2.5L10.293 13H3z",fillRule:"evenodd",fillOpacity:"1",fill:"currentCOlor",stroke:"none"}))},sr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M3.48254 7.83023L3.05006 9.22531H5.78441L5.35194 7.83023C5.19383 7.31871 5.03572 6.81183 4.87761 6.3096C4.72881 5.79807 4.58465 5.27724 4.44514 4.74711H4.38934C4.24053 5.27724 4.09172 5.79807 3.94291 6.3096C3.7941 6.81183 3.64065 7.31871 3.48254 7.83023ZM0.692383 12.9502L3.7755 3.79846H5.08688L8.17 12.9502H6.94233L6.07738 10.16H2.7571L1.8782 12.9502H0.692383Z",fill:"currentColor"}),f().createElement("path",{d:"M11.5546 13.1176C11.2384 13.1176 10.9407 13.0711 10.6617 12.9781C10.3827 12.8944 10.1363 12.7735 9.92234 12.6153C9.71773 12.4479 9.55497 12.248 9.43407 12.0155C9.31316 11.7737 9.25271 11.4993 9.25271 11.1924C9.25271 10.811 9.34106 10.4809 9.51777 10.2019C9.70378 9.91355 9.9921 9.66709 10.3827 9.46247C10.7826 9.25786 11.2942 9.09045 11.9173 8.96025C12.5404 8.83004 13.2891 8.72773 14.1634 8.65333C14.1541 8.42082 14.1169 8.20225 14.0518 7.99764C13.9867 7.79303 13.8844 7.61632 13.7449 7.46751C13.6053 7.30941 13.4193 7.18385 13.1868 7.09084C12.9636 6.99784 12.6892 6.95134 12.3637 6.95134C11.9173 6.95134 11.4895 7.03969 11.0803 7.2164C10.671 7.38381 10.3083 7.56517 9.9921 7.76048L9.54567 6.97924C9.71308 6.86763 9.90839 6.75603 10.1316 6.64442C10.3641 6.52351 10.6059 6.41656 10.857 6.32355C11.1175 6.23055 11.3918 6.15614 11.6801 6.10034C11.9685 6.03523 12.2614 6.00268 12.559 6.00268C13.4891 6.00268 14.1773 6.25845 14.6238 6.76998C15.0795 7.2722 15.3073 7.94649 15.3073 8.79284V12.9502H14.3726L14.275 12.0294H14.2331C13.8518 12.327 13.4286 12.5828 12.9636 12.7967C12.5079 13.0106 12.0382 13.1176 11.5546 13.1176ZM11.8615 12.1968C12.2521 12.1968 12.6334 12.1131 13.0055 11.9457C13.3868 11.769 13.7728 11.5179 14.1634 11.1924V9.40667C13.4379 9.46248 12.8288 9.54153 12.3358 9.64383C11.8522 9.74614 11.4616 9.8717 11.164 10.0205C10.8756 10.16 10.671 10.3228 10.5501 10.5088C10.4292 10.6855 10.3688 10.8855 10.3688 11.1087C10.3688 11.304 10.4106 11.4714 10.4943 11.6109C10.578 11.7411 10.685 11.8527 10.8152 11.9457C10.9547 12.0294 11.1128 12.0945 11.2895 12.141C11.4755 12.1782 11.6662 12.1968 11.8615 12.1968Z",fill:"currentColor"}))},dr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M2.375 15.0203H13.625C14.9067 15.0203 15.7271 14.0754 15.7271 12.9109C15.7271 12.5593 15.6392 12.2004 15.4487 11.8708L9.80908 2.04175C9.41357 1.33862 8.71045 0.979736 8 0.979736C7.28955 0.979736 6.5791 1.34595 6.18359 2.04175L0.543945 11.8782C0.353516 12.2078 0.265625 12.5593 0.265625 12.9109C0.265625 14.0754 1.09326 15.0203 2.375 15.0203ZM2.51416 13.614C2.06006 13.614 1.75977 13.2405 1.75977 12.8376C1.75977 12.7205 1.77441 12.574 1.84766 12.4421L7.34082 2.82544C7.4873 2.57642 7.74365 2.45923 8 2.45923C8.25635 2.45923 8.50537 2.57642 8.64453 2.82544L14.145 12.4568C14.2109 12.5813 14.2402 12.7205 14.2402 12.8376C14.2402 13.2405 13.9326 13.614 13.4785 13.614H2.51416ZM8 9.93726C8.40283 9.93726 8.63721 9.71021 8.64453 9.2854L8.75439 5.76245C8.76904 5.33032 8.44678 5.02271 7.99268 5.02271C7.53857 5.02271 7.22363 5.323 7.23828 5.75513L7.34082 9.29272C7.35547 9.71021 7.58984 9.93726 8 9.93726ZM8 12.3689C8.47607 12.3689 8.86426 12.0247 8.86426 11.5632C8.86426 11.0945 8.4834 10.7576 8 10.7576C7.52393 10.7576 7.13574 11.1018 7.13574 11.5632C7.13574 12.0247 7.53125 12.3689 8 12.3689Z",fill:"currentColor"}))},fr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M7.99634 15.5732C12.1492 15.5732 15.5769 12.1455 15.5769 8C15.5769 3.85449 12.1418 0.426758 7.98901 0.426758C3.84351 0.426758 0.423096 3.85449 0.423096 8C0.423096 12.1455 3.85083 15.5732 7.99634 15.5732ZM7.99634 14.0645C4.63452 14.0645 1.94653 11.3618 1.94653 8C1.94653 4.63818 4.63452 1.94287 7.98901 1.94287C11.3508 1.94287 14.0535 4.63818 14.0608 8C14.0681 11.3618 11.3582 14.0645 7.99634 14.0645ZM7.99634 11.1787C10.9919 11.1787 13.0281 8.76172 13.0281 8.00732C13.0281 7.26025 10.9919 4.83594 7.99634 4.83594C5.00806 4.83594 2.94995 7.26025 2.94995 8.00732C2.94995 8.76172 5.02271 11.1787 7.99634 11.1787ZM7.99634 10.0654C6.85376 10.0654 5.93091 9.12793 5.92358 8.00732C5.92358 6.86475 6.85376 5.94922 7.99634 5.94922C9.13159 5.94922 10.0544 6.86475 10.0544 8.00732C10.0544 9.12793 9.13159 10.0654 7.99634 10.0654ZM8.00366 8.9082C8.48706 8.9082 8.89722 8.49072 8.89722 8.00732C8.89722 7.52393 8.48706 7.10645 8.00366 7.10645C7.49829 7.10645 7.08813 7.52393 7.08813 8.00732C7.08813 8.49072 7.49829 8.9082 8.00366 8.9082Z",fill:"currentColor"}))},pr=n(856);function mr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var yr=function(){};const vr=function(e){var t,n,r=e.onClick,o=e.onDoubleClick,i=e.delay,a=void 0===i?300:i,l=mr((t=(0,d.useRef)(yr),n=function(){return t.current()},(0,d.useEffect)((function(){return n}),[]),[function(e){return t.current=e},n]),2),u=l[0],c=l[1];return[function(){c(),function(e,t,n){var r=(new Date).getTime(),o=requestAnimationFrame((function o(){if((new Date).getTime()-r>=t)return e(),void n(yr);var i=requestAnimationFrame(o);n((function(){return cancelAnimationFrame(i)}))}));n((function(){return cancelAnimationFrame(o)}))}(r,a,u)},function(){c(),o()}]};function hr(e){return hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(e)}var br=function(e){var t=function(e){var t=nr().contentItems.module.find((function(t){return t.slug===e}));return"object"===hr(t)&&t}(e);return t?t.name:e},Er=function(e,t,n){return e<=t+n/2},Or=["module","row","column"],_r=function(e){return!nr().simpleUi&&Or.includes(e)},wr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!!Or.includes(t)&&!(t!==e&&!e.includes(t))},Sr=[],Cr=function(e){return function(){if(0>=Sr.length){var e=nr().contentItems;Sr=e.module.map((function(e){return e.slug}))}return Sr}().includes(e)},Lr=["id","type"],Tr=["children","style"];function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nr(Object(n),!0).forEach((function(t){kr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ar(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Dr(){return Dr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dr.apply(this,arguments)}function kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Rr=function e(t){var n,r=t.node,o=t.index,i=t.level,a=t.type,l=t.global,u=void 0!==l&&l,c=t.parent,s=tr().moveNode,p=(0,Qt().useNodesWithoutSettings)(r),m=0<Object.keys(p).length,g=ir.use(),y=g.draggingItem,v=g.setDraggingItem,h=g.clearDraggingItem,b=Pr((0,d.useState)(!1),2),E=b[0],O=b[1],_=Pr((0,d.useState)(!0),2),w=_[0],S=_[1],C=en()("fl-builder-node-outline-item",(kr(n={},"fl-builder-node-type-".concat(a),a),kr(n,"show-drop-before","before"===E),kr(n,"show-drop-after","after"===E),kr(n,"is-dragging-self",r===(null==y?void 0:y.id)),n));return f().createElement("li",{className:C,style:{"--level":i},draggable:_r(a),onDragStart:function(e){var t;e.stopPropagation(),e.dataTransfer.setDragImage(((t=new Image).src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",t.style.opacity=0,t),0,0),e.dataTransfer.setData(a,r),e.dataTransfer.setData("node-id",r),e.dataTransfer.setData("node-type",a),v({id:r,type:a})},onDragEnd:function(){return h()},onDragOver:function(e){if(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move",e.currentTarget.classList.contains("fl-builder-node-outline-item")){if(wr(e.dataTransfer.types,a)){var t=e.currentTarget.getBoundingClientRect(),n=t.y,r=t.height;Er(e.clientY,n,r)&&"before"!==E?O("before"):Er(e.clientY,n,r)||"after"===E||O("after")}}else console.warn("Problem: Something other than fl-builder-node-outline-item-content")},onDragLeave:function(){E&&O(!1)},onDrop:function(e){if(E&&O(!1),h(),wr(e.dataTransfer.types,a)){var t=e.currentTarget.getBoundingClientRect(),n=t.y,r=t.height,i=Er(e.clientY,n,r)?"before":"after",l=e.dataTransfer.getData("node-id"),u=Xt(l),d=u.position,f=u.parent,p=o;if(c===f){if("before"===i){if(d===o-1)return;p=d>o?o:Math.max(0,o-1)}else if("after"===i){if(d===o+1)return;p=d>o?o+1:o}}else p="after"===i?o+1:o;s(l,p,c,[c,f])}}},"column-group"!==a&&f().createElement(Fr,{id:r,type:a,global:u,position:o,level:i,toggleContent:function(){return S(!w)},isShowingContent:w}),"module"!==a&&!m&&!u&&f().createElement(Mr,{id:r,type:a}),0<Object.keys(p).length&&w&&f().createElement("ul",null,Object.values(p).sort(Ee).map((function(t,n){return f().createElement(e,Dr({key:t.node,level:"column-group"===a?i:i+1,index:n},t))}))))},Mr=function(e){var t=e.id,n=e.type,r=Ar(e,Lr),o=Pr((0,d.useState)(!1),2),i=o[0],a=o[1],l=tr().moveNode,u=ir.use().clearDraggingItem,c=en()("fl-builder-node-empty-drop-area",{"is-over":i});return f().createElement("div",Dr({className:c,onDragOver:function(e){"column"===n&&wr(e.dataTransfer.types,"module")&&a(!0)},onDragLeave:function(){return i&&a(!1)},onDrop:function(e){if(a(!1),u(),"column"===n&&wr(e.dataTransfer.types,"module")){var r=e.dataTransfer.getData("node-id");l(r,0,t)}}},r),f().createElement("div",{className:"drop-area"}))},Fr=(0,d.memo)((function(e){var t=e.id,n=e.type,r=e.global,o=e.level,i=e.toggleContent,a=e.isShowingContent,l=void 0===a||a,u=(0,Qt().useNodeSettings)(t),c=rn(),s=c.setContextMenu,d=c.contextMenu,p=c.clearContextMenu,m=tr(),g=m.openSettings,y=m.deleteNode,v=m.copyNode,h=m.scrollToNode,b=nr().simpleUi,E=function(e){var t=e.responsive_display,n=void 0===t?"":t,r=e.visibility_display;return""!==n||""!==(void 0===r?"":r)}(u),O="row"===n&&!r,_=!0;"module"===n&&(_=Cr(u.type));var w=en()("fl-builder-node-outline-item-content",{"has-context-menu":!1!==d&&t===d.id,"is-global-node":r,"is-missing-definition":!_}),S=Pr(vr({onClick:function(){_&&h(t)},onDoubleClick:function(){_&&(h(t),g(t))}}),2),C=S[0],L=S[1];return f().createElement("div",{className:w,onClick:C,onDoubleClick:L,onPointerEnter:function(){var e=document.querySelector(".fl-node-".concat(t));e&&(e.style.boxShadow="inset 0 0 0 2px var(--fl-builder-".concat(r?"orange":"blue"," ), 0 0 0 1px hsla( 210, 0%, 0%, .5 )"))},onPointerLeave:function(){var e=document.querySelector(".fl-node-".concat(t));e&&(e.style.boxShadow="")},onContextMenu:function(e){if(!1===d||t!==d.id){var o={settings:{label:"Open Settings",isEnabled:_,onClick:function(){h(t),g(t)}},clone:{label:"Duplicate",isEnabled:_&&!b,onClick:function(){return v(t)}},delete:{label:FLBuilderStrings.remove,isEnabled:!b,status:"destructive",onClick:function(){return y(t)}}};s({id:t,items:o,type:n,global:r,x:e.clientX,y:e.clientY}),e.preventDefault()}else p()}},O&&f().createElement("span",{className:"fl-builder-outline-item-gutter"},f().createElement("button",{className:!l&&"is-hiding-content",onClick:function(e){i(e),e.preventDefault(),e.stopPropagation()}},f().createElement(zr,null))),f().createElement("span",{className:"fl-builder-outline-item-icon-wrap"},f().createElement(Hr,{type:n,moduleType:u.type,settings:u,hasDefinition:_})),f().createElement("span",{className:"fl-builder-outline-item-label-wrap"},f().createElement(Br,{type:n,settings:u,level:o})),f().createElement(Ur,{id:t,type:n,size:parseFloat(u.size),width:u.max_content_width,widthUnit:u.max_content_width_unit}),E&&f().createElement("span",{className:"fl-builder-outline-item-icon-wrap"},f().createElement(fr,null)))})),Br=function(e){var t=e.type,n=e.settings,r=void 0===n?{}:n,o=e.level,i=void 0!==r.type?br(r.type):t,a="";if("column"===t&&3<=o&&(i=FLBuilderStrings.childColumn),"row"===i&&(i=FLBuilderStrings.row),"column"===i&&(i=FLBuilderStrings.column),"module"===t&&"type"in r)switch(r.type){case"heading":i=r.tag,a=r.heading;break;case"html":a=r.html;break;case"rich-text":case"icon":case"button":a=r.text;break;case"callout":a=r.title}if("node_label"in r&&""!==r.node_label){var l=r.node_label;a=a&&""!==a?l+" - "+a:l}return f().createElement(f().Fragment,null,i,a&&f().createElement("span",{style:{opacity:.6}},": "+function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,pr.sanitize)(e,{ALLOWED_TAGS:[]}).substring(0,48)}(a)))},Ir=function(e){var t=e.children,n=e.style,r=Ar(e,Tr);return f().createElement("span",Dr({style:jr({textTransform:"lowercase",background:"rgba(0,0,0,.05)",color:"#828282",fontSize:11,flex:"0 0 auto",display:"inline-flex",padding:"2px 6px",borderRadius:25,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontFamily:"monospace"},n),title:t},r),t)},Hr=(0,d.memo)((function(e){var t=e.type,n=e.moduleType,r=e.settings,o=e.hasDefinition;switch(t){case"row":return f().createElement(ur,null);case"column":return f().createElement(lr,null);case"module":var i=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=FLBuilderConfig.contentItems.module;if(!n)return dr;switch(e){case"rich-text":return sr;case"photo":return cr;case"icon":if("icon"in t)return function(){return f().createElement("i",{className:t.icon,"aria-hidden":"true"})};break;default:var o=r.find((function(t){return e===t.slug}));return o&&"icon"in o?function(){return f().createElement("div",{style:{flexShrink:0,width:16,height:16,fill:"currentColor"},dangerouslySetInnerHTML:{__html:o.icon}})}:ar}}(n,r,o);return f().createElement(i,null)}})),Ur=function(e){var t=e.id,n=e.type,r=e.size,o=e.width,i=e.widthUnit,a=qt().resizing,l="";return a&&a.includes(t)&&("column"===n?l+=" ".concat(r,"% "):"row"===n&&(l+="Max: ".concat(o+i))),""===l?null:f().createElement(Ir,{style:{background:"var(--fl-builder-blue)",color:"white"}},l)},zr=function(){return f().createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79289 1.29289C3.18342 0.902369 3.81658 0.902369 4.20711 1.29289L7.20711 4.29289C7.59763 4.68342 7.59763 5.31658 7.20711 5.70711L4.20711 8.70711C3.81658 9.09763 3.18342 9.09763 2.79289 8.70711C2.40237 8.31658 2.40237 7.68342 2.79289 7.29289L5.08579 5L2.79289 2.70711C2.40237 2.31658 2.40237 1.68342 2.79289 1.29289Z",fill:"currentColor"}))};const Gr=function(){var e=(0,Qt().useNodesWithoutSettings)(null),t=Object.values(e).sort(Ee),n=Pr((0,d.useState)(!1),2),r=n[0],o=n[1],i=!1!==r,a={draggingItem:r,isDraggingItem:i,clearDraggingItem:function(){return o(!1)},setDraggingItem:function(e){return o(e)}},l=en()("fl-builder-node-outline",kr({"is-dragging":i},"is-dragging-type-".concat(r.type),r));return f().createElement(ir.Provider,{value:a},f().createElement("ul",{className:l},t.map((function(e,t){return f().createElement(Rr,Dr({key:e.node,level:1,index:t},e))}))))};var Wr=["className"];function Yr(){return Yr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yr.apply(this,arguments)}function Zr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Vr=function(e){var t=e.className,n=Zr(e,Wr),r=en()("fl-builder-workspace-panel",t);return f().createElement("div",Yr({className:r},n))};const Qr=function(){var e=z(),t=e.currentPanel,n=e.panels;if(!(t in n))return null;var r,o=n[t],i=o.routerProps,a=o.onHistoryChanged,l=o.root,u=o.render,c=o.frame,s=void 0===c?Vr:c,p=o.className,g=o.wrapClassName,y=!1===s?d.Fragment:s,v=l||u;return f().createElement("div",{className:g},f().createElement(y,{className:!1!==s&&p},f().createElement(m.Root,{routerProps:(r=i,"function"==typeof r?r():r),onHistoryChanged:a},f().createElement(v,null))))};!function(){FLBuilder.addHook("didInitUI",(function(){var t=document.querySelector(".fl-builder-bar-actions"),n=t.querySelector(".fl-builder--saving-indicator"),r=document.createElement("button");r.classList.add("fl-builder-button","fl-builder-button-silent"),r.innerHTML='<svg width="20px" x="0px" y="0px" viewBox="0 0 238 238" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="EMF-by-Xara-X" serif:id="EMF by Xara X"><path d="M170.734,183.655l-32.623,-35.483c-19.089,5.332 -40.624,6.6 -61.992,2.707c-54.118,-9.858 -86.793,-49.103 -72.935,-87.598c13.859,-38.494 69.029,-61.737 123.148,-51.878c7.553,1.375 14.687,3.324 21.334,5.762l-6.462,12.195c-5.266,-1.731 -10.922,-3.111 -16.913,-4.082c-42.267,-6.842 -85.356,9.291 -96.18,36.014c-10.824,26.722 14.695,53.963 56.963,60.808c41.535,6.724 83.865,-8.739 95.589,-34.637l13.176,22.511l0.064,0.113c-4.574,7.429 -10.792,14.102 -18.26,19.85l27.897,25.151c15.605,14.906 -15.073,47.906 -32.806,28.567Zm9.595,-26.401l-34.191,-30.641c-36.604,14.182 -70.685,6.876 -98.296,-5.59c23.399,17.456 58.534,24.774 94.542,14.959l30.526,29.179c1.989,-3.304 4.559,-6.305 7.419,-7.907Z"/><path d="M42.292,90.276l27.528,0l16.45,-26.827l34.049,52.376l44.83,-68.557l34.474,58.905l37.878,0l-29.225,-7.239l-43.694,-98.934l-43.696,82.469l-33.055,-51.241l-24.826,54.79l-20.713,4.258Z" style="fill:#1195d0;"/></g></svg>',r.onclick=function(){return e()},r.title="Query Monitor",jQuery("#query-monitor-main").length>0&&t.insertBefore(r,n)}));var e=function(){var e=document.getElementById("query-monitor-main");if(t(e)){(n=document.getElementById("wp-admin-bar-query-monitor").getElementsByTagName("a"))[0].click()}else{var n=document.getElementsByClassName("qm-button-container-close");n[0].click()}},t=function(e){return"none"===window.getComputedStyle(e).display}}();const qr=function(){var e=z(),t=e.isEditing,n=e.shouldShowShortcuts,r=e.colorScheme,o=en()(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},"fluid-color-scheme-".concat(r),r));return f().createElement("div",{className:o},f().createElement(gn,null,f().createElement(Bn,null),t&&f().createElement(f().Fragment,null,f().createElement(In,null),f().createElement(An,null),n&&f().createElement(Zn,null),f().createElement(Qr,null))))};function Xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xr(Object(n),!0).forEach((function(t){Kr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jr,eo=tr(),to=eo.registerPanel,no=eo.displayPanel,ro=eo.togglePanel,oo=window.FL||{},io=$r($r($r({},oo.Builder||{}),s),{},{data:l,registerPanel:to,displayPanel:no,togglePanel:ro});window.FL=$r($r({},oo),{},{Builder:io}),(void 0===(Jr=V().showOutlinePanel)||Jr)&&function(){var e=window.FL.Builder,t=e.registerPanel,n=e.togglePanel;t("outline",{label:"Outline",render:Gr,root:Gr}),FLBuilder.addHook("didInitUI",(function(){var e=document.querySelector(".fl-builder-bar-actions"),t=e.querySelector(".fl-builder--saving-indicator"),r=document.createElement("button");r.classList.add("fl-builder-button","fl-builder-button-silent"),r.innerHTML='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.38672 5.33984C2.1582 5.33984 2.77344 4.72461 2.77344 3.95312C2.77344 3.19141 2.1582 2.56641 1.38672 2.56641C0.625 2.56641 0 3.19141 0 3.95312C0 4.72461 0.625 5.33984 1.38672 5.33984ZM5.97656 4.89062H14.0565C14.5838 4.89062 15.0038 4.48047 15.0038 3.95312C15.0038 3.42578 14.5936 3.01562 14.0565 3.01562H5.97656C5.45898 3.01562 5.03906 3.42578 5.03906 3.95312C5.03906 4.48047 5.44922 4.89062 5.97656 4.89062ZM3.88672 11.3457C4.64844 11.3457 5.27344 10.7305 5.27344 9.95898C5.27344 9.19727 4.64844 8.57227 3.88672 8.57227C3.11523 8.57227 2.49023 9.19727 2.49023 9.95898C2.49023 10.7305 3.11523 11.3457 3.88672 11.3457ZM8.47656 10.8965H16.5794C17.1068 10.8965 17.5169 10.4863 17.5169 9.95898C17.5169 9.43164 17.1068 9.02148 16.5794 9.02148H8.47656C7.94922 9.02148 7.53906 9.43164 7.53906 9.95898C7.53906 10.4863 7.94922 10.8965 8.47656 10.8965ZM6.37695 17.3516C7.14844 17.3516 7.76367 16.7363 7.76367 15.9648C7.76367 15.2031 7.14844 14.5781 6.37695 14.5781C5.61523 14.5781 4.99023 15.2031 4.99023 15.9648C4.99023 16.7363 5.61523 17.3516 6.37695 17.3516ZM10.9668 16.9023H19.0251C19.5524 16.9023 19.9626 16.4922 19.9626 15.9648C19.9626 15.4375 19.5524 15.0273 19.0251 15.0273H10.9668C10.4395 15.0273 10.0293 15.4375 10.0293 15.9648C10.0293 16.4922 10.4395 16.9023 10.9668 16.9023Z" fill="currentColor"/></svg>',r.onclick=function(){return n("outline")},r.title="Outline",e.insertBefore(r,t)}))}();var ao=document.getElementById("fl-ui-root");ao.classList.add("fluid","fl","uid"),(0,p.render)(f().createElement(qr,null),ao)})()})();
|
1 |
/*! For license information please see builder.bundle.min.js.LICENSE.txt */
|
2 |
+
(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&e.push(a)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var l in n)r.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},856:function(e){e.exports=function(){"use strict";function e(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var t=Object.hasOwnProperty,n=Object.setPrototypeOf,r=Object.isFrozen,o=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,a=Object.freeze,l=Object.seal,u=Object.create,c="undefined"!=typeof Reflect&&Reflect,s=c.apply,d=c.construct;s||(s=function(e,t,n){return e.apply(t,n)}),a||(a=function(e){return e}),l||(l=function(e){return e}),d||(d=function(t,n){return new(Function.prototype.bind.apply(t,[null].concat(e(n))))});var f=_(Array.prototype.forEach),p=_(Array.prototype.pop),m=_(Array.prototype.push),g=_(String.prototype.toLowerCase),y=_(String.prototype.match),v=_(String.prototype.replace),h=_(String.prototype.indexOf),b=_(String.prototype.trim),E=_(RegExp.prototype.test),O=w(TypeError);function _(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return s(e,t,r)}}function w(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return d(e,n)}}function S(e,t){n&&n(e,null);for(var o=t.length;o--;){var i=t[o];if("string"==typeof i){var a=g(i);a!==i&&(r(t)||(t[o]=a),i=a)}e[i]=!0}return e}function C(e){var n=u(null),r=void 0;for(r in e)s(t,e,[r])&&(n[r]=e[r]);return n}function L(e,t){for(;null!==e;){var n=i(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=o(e)}function r(e){return console.warn("fallback value for",e),null}return r}var T=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),N=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),j=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),A=a(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),D=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),k=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),P=a(["#text"]),x=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),R=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),M=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),F=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B=l(/\{\{[\s\S]*|[\s\S]*\}\}/gm),I=l(/<%[\s\S]*|[\s\S]*%>/gm),H=l(/^data-[\-\w.\u00B7-\uFFFF]/),U=l(/^aria-[\-\w]+$/),z=l(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=l(/^(?:\w+script|data):/i),W=l(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Z(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var V=function(){return"undefined"==typeof window?null:window},Q=function(e,t){if("object"!==(void 0===e?"undefined":Y(e))||"function"!=typeof e.createPolicy)return null;var n=null,r="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(r)&&(n=t.currentScript.getAttribute(r));var o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V(),t=function(e){return q(e)};if(t.version="2.3.5",t.removed=[],!e||!e.document||9!==e.document.nodeType)return t.isSupported=!1,t;var n=e.document,r=e.document,o=e.DocumentFragment,i=e.HTMLTemplateElement,l=e.Node,u=e.Element,c=e.NodeFilter,s=e.NamedNodeMap,d=void 0===s?e.NamedNodeMap||e.MozNamedAttrMap:s,_=e.HTMLFormElement,w=e.DOMParser,X=e.trustedTypes,$=u.prototype,K=L($,"cloneNode"),J=L($,"nextSibling"),ee=L($,"childNodes"),te=L($,"parentNode");if("function"==typeof i){var ne=r.createElement("template");ne.content&&ne.content.ownerDocument&&(r=ne.content.ownerDocument)}var re=Q(X,n),oe=re?re.createHTML(""):"",ie=r,ae=ie.implementation,le=ie.createNodeIterator,ue=ie.createDocumentFragment,ce=ie.getElementsByTagName,se=n.importNode,de={};try{de=C(r).documentMode?r.documentMode:{}}catch(e){}var fe={};t.isSupported="function"==typeof te&&ae&&void 0!==ae.createHTMLDocument&&9!==de;var pe=B,me=I,ge=H,ye=U,ve=G,he=W,be=z,Ee=null,Oe=S({},[].concat(Z(T),Z(N),Z(j),Z(D),Z(P))),_e=null,we=S({},[].concat(Z(x),Z(R),Z(M),Z(F))),Se=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Le=null,Te=!0,Ne=!0,je=!1,Ae=!1,De=!1,ke=!1,Pe=!1,xe=!1,Re=!1,Me=!1,Fe=!0,Be=!0,Ie=!1,He={},Ue=null,ze=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ge=null,We=S({},["audio","video","img","source","image","track"]),Ye=null,Ze=S({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ve="http://www.w3.org/1998/Math/MathML",Qe="http://www.w3.org/2000/svg",qe="http://www.w3.org/1999/xhtml",Xe=qe,$e=!1,Ke=void 0,Je=["application/xhtml+xml","text/html"],et="text/html",tt=void 0,nt=null,rt=r.createElement("form"),ot=function(e){return e instanceof RegExp||e instanceof Function},it=function(e){nt&&nt===e||(e&&"object"===(void 0===e?"undefined":Y(e))||(e={}),e=C(e),Ee="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS):Oe,_e="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR):we,Ye="ADD_URI_SAFE_ATTR"in e?S(C(Ze),e.ADD_URI_SAFE_ATTR):Ze,Ge="ADD_DATA_URI_TAGS"in e?S(C(We),e.ADD_DATA_URI_TAGS):We,Ue="FORBID_CONTENTS"in e?S({},e.FORBID_CONTENTS):ze,Ce="FORBID_TAGS"in e?S({},e.FORBID_TAGS):{},Le="FORBID_ATTR"in e?S({},e.FORBID_ATTR):{},He="USE_PROFILES"in e&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,je=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,De=e.WHOLE_DOCUMENT||!1,xe=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,Me=e.RETURN_TRUSTED_TYPE||!1,Pe=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Be=!1!==e.KEEP_CONTENT,Ie=e.IN_PLACE||!1,be=e.ALLOWED_URI_REGEXP||be,Xe=e.NAMESPACE||qe,e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Se.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ot(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Se.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Se.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ke=Ke=-1===Je.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Ke?function(e){return e}:g,Ae&&(Ne=!1),Re&&(xe=!0),He&&(Ee=S({},[].concat(Z(P))),_e=[],!0===He.html&&(S(Ee,T),S(_e,x)),!0===He.svg&&(S(Ee,N),S(_e,R),S(_e,F)),!0===He.svgFilters&&(S(Ee,j),S(_e,R),S(_e,F)),!0===He.mathMl&&(S(Ee,D),S(_e,M),S(_e,F))),e.ADD_TAGS&&(Ee===Oe&&(Ee=C(Ee)),S(Ee,e.ADD_TAGS)),e.ADD_ATTR&&(_e===we&&(_e=C(_e)),S(_e,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&S(Ye,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Ue===ze&&(Ue=C(Ue)),S(Ue,e.FORBID_CONTENTS)),Be&&(Ee["#text"]=!0),De&&S(Ee,["html","head","body"]),Ee.table&&(S(Ee,["tbody"]),delete Ce.tbody),a&&a(e),nt=e)},at=S({},["mi","mo","mn","ms","mtext"]),lt=S({},["foreignobject","desc","title","annotation-xml"]),ut=S({},N);S(ut,j),S(ut,A);var ct=S({},D);S(ct,k);var st=function(e){var t=te(e);t&&t.tagName||(t={namespaceURI:qe,tagName:"template"});var n=g(e.tagName),r=g(t.tagName);if(e.namespaceURI===Qe)return t.namespaceURI===qe?"svg"===n:t.namespaceURI===Ve?"svg"===n&&("annotation-xml"===r||at[r]):Boolean(ut[n]);if(e.namespaceURI===Ve)return t.namespaceURI===qe?"math"===n:t.namespaceURI===Qe?"math"===n&<[r]:Boolean(ct[n]);if(e.namespaceURI===qe){if(t.namespaceURI===Qe&&!lt[r])return!1;if(t.namespaceURI===Ve&&!at[r])return!1;var o=S({},["title","style","font","a","script"]);return!ct[n]&&(o[n]||!ut[n])}return!1},dt=function(e){m(t.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},ft=function(e,n){try{m(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch(e){m(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),"is"===e&&!_e[e])if(xe||Re)try{dt(n)}catch(e){}else try{n.setAttribute(e,"")}catch(e){}},pt=function(e){var t=void 0,n=void 0;if(Pe)e="<remove></remove>"+e;else{var o=y(e,/^[\r\n\t ]+/);n=o&&o[0]}"application/xhtml+xml"===Ke&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=re?re.createHTML(e):e;if(Xe===qe)try{t=(new w).parseFromString(i,Ke)}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Xe,"template",null);try{t.documentElement.innerHTML=$e?"":i}catch(e){}}var a=t.body||t.documentElement;return e&&n&&a.insertBefore(r.createTextNode(n),a.childNodes[0]||null),Xe===qe?ce.call(t,De?"html":"body")[0]:De?t.documentElement:a},mt=function(e){return le.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},gt=function(e){return e instanceof _&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},yt=function(e){return"object"===(void 0===l?"undefined":Y(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":Y(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},vt=function(e,n,r){fe[e]&&f(fe[e],(function(e){e.call(t,n,r,nt)}))},ht=function(e){var n=void 0;if(vt("beforeSanitizeElements",e,null),gt(e))return dt(e),!0;if(y(e.nodeName,/[\u0080-\uFFFF]/))return dt(e),!0;var r=tt(e.nodeName);if(vt("uponSanitizeElement",e,{tagName:r,allowedTags:Ee}),!yt(e.firstElementChild)&&(!yt(e.content)||!yt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return dt(e),!0;if("select"===r&&E(/<template/i,e.innerHTML))return dt(e),!0;if(!Ee[r]||Ce[r]){if(Be&&!Ue[r]){var o=te(e)||e.parentNode,i=ee(e)||e.childNodes;if(i&&o)for(var a=i.length-1;a>=0;--a)o.insertBefore(K(i[a],!0),J(e))}if(!Ce[r]&&Et(r)){if(Se.tagNameCheck instanceof RegExp&&E(Se.tagNameCheck,r))return!1;if(Se.tagNameCheck instanceof Function&&Se.tagNameCheck(r))return!1}return dt(e),!0}return e instanceof u&&!st(e)?(dt(e),!0):"noscript"!==r&&"noembed"!==r||!E(/<\/no(script|embed)/i,e.innerHTML)?(Ae&&3===e.nodeType&&(n=e.textContent,n=v(n,pe," "),n=v(n,me," "),e.textContent!==n&&(m(t.removed,{element:e.cloneNode()}),e.textContent=n)),vt("afterSanitizeElements",e,null),!1):(dt(e),!0)},bt=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in r||n in rt))return!1;if(Ne&&!Le[t]&&E(ge,t));else if(Te&&E(ye,t));else if(!_e[t]||Le[t]){if(!(Et(e)&&(Se.tagNameCheck instanceof RegExp&&E(Se.tagNameCheck,e)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(e))&&(Se.attributeNameCheck instanceof RegExp&&E(Se.attributeNameCheck,t)||Se.attributeNameCheck instanceof Function&&Se.attributeNameCheck(t))||"is"===t&&Se.allowCustomizedBuiltInElements&&(Se.tagNameCheck instanceof RegExp&&E(Se.tagNameCheck,n)||Se.tagNameCheck instanceof Function&&Se.tagNameCheck(n))))return!1}else if(Ye[t]);else if(E(be,v(n,he,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==h(n,"data:")||!Ge[e])if(je&&!E(ve,v(n,he,"")));else if(n)return!1;return!0},Et=function(e){return e.indexOf("-")>0},Ot=function(e){var n=void 0,r=void 0,o=void 0,i=void 0;vt("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_e};for(i=a.length;i--;){var u=n=a[i],c=u.name,s=u.namespaceURI;if(r=b(n.value),o=tt(c),l.attrName=o,l.attrValue=r,l.keepAttr=!0,l.forceKeepAttr=void 0,vt("uponSanitizeAttribute",e,l),r=l.attrValue,!l.forceKeepAttr&&(ft(c,e),l.keepAttr))if(E(/\/>/i,r))ft(c,e);else{Ae&&(r=v(r,pe," "),r=v(r,me," "));var d=tt(e.nodeName);if(bt(d,o,r))try{s?e.setAttributeNS(s,c,r):e.setAttribute(c,r),p(t.removed)}catch(e){}}}vt("afterSanitizeAttributes",e,null)}},_t=function e(t){var n=void 0,r=mt(t);for(vt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)vt("uponSanitizeShadowNode",n,null),ht(n)||(n.content instanceof o&&e(n.content),Ot(n));vt("afterSanitizeShadowDOM",t,null)};return t.sanitize=function(r,i){var a=void 0,u=void 0,c=void 0,s=void 0,d=void 0;if(($e=!r)&&(r="\x3c!--\x3e"),"string"!=typeof r&&!yt(r)){if("function"!=typeof r.toString)throw O("toString is not a function");if("string"!=typeof(r=r.toString()))throw O("dirty is not a string, aborting")}if(!t.isSupported){if("object"===Y(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof r)return e.toStaticHTML(r);if(yt(r))return e.toStaticHTML(r.outerHTML)}return r}if(ke||it(i),t.removed=[],"string"==typeof r&&(Ie=!1),Ie){if(r.nodeName){var f=tt(r.nodeName);if(!Ee[f]||Ce[f])throw O("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof l)1===(u=(a=pt("\x3c!----\x3e")).ownerDocument.importNode(r,!0)).nodeType&&"BODY"===u.nodeName||"HTML"===u.nodeName?a=u:a.appendChild(u);else{if(!xe&&!Ae&&!De&&-1===r.indexOf("<"))return re&&Me?re.createHTML(r):r;if(!(a=pt(r)))return xe?null:Me?oe:""}a&&Pe&&dt(a.firstChild);for(var p=mt(Ie?r:a);c=p.nextNode();)3===c.nodeType&&c===s||ht(c)||(c.content instanceof o&&_t(c.content),Ot(c),s=c);if(s=null,Ie)return r;if(xe){if(Re)for(d=ue.call(a.ownerDocument);a.firstChild;)d.appendChild(a.firstChild);else d=a;return _e.shadowroot&&(d=se.call(n,d,!0)),d}var m=De?a.outerHTML:a.innerHTML;return Ae&&(m=v(m,pe," "),m=v(m,me," ")),re&&Me?re.createHTML(m):m},t.setConfig=function(e){it(e),ke=!0},t.clearConfig=function(){nt=null,ke=!1},t.isValidAttribute=function(e,t,n){nt||it({});var r=tt(e),o=tt(t);return bt(r,o,n)},t.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],m(fe[e],t))},t.removeHook=function(e){fe[e]&&p(fe[e])},t.removeHooks=function(e){fe[e]&&(fe[e]=[])},t.removeAllHooks=function(){fe={}},t}return q()}()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e={};n.r(e),n.d(e,{displayPanel:()=>L,hideCurrentPanel:()=>N,registerPanel:()=>C,setColorScheme:()=>A,setIsEditing:()=>j,setShouldShowShortcuts:()=>S,togglePanel:()=>T});var t={};n.r(t),n.d(t,{colorScheme:()=>B,currentPanel:()=>M,isEditing:()=>F,panels:()=>R,shouldShowShortcuts:()=>x});var r={};n.r(r),n.d(r,{after:()=>H,before:()=>I});var o={};n.r(o),n.d(o,{editing:()=>Re,layout:()=>xe,resizing:()=>Me});var i={};n.r(i),n.d(i,{addColumnGroup:()=>lt,addColumnTemplate:()=>ht,addColumns:()=>et,addModule:()=>Ke,addNodeTemplate:()=>pt,addRow:()=>ut,addRowTemplate:()=>bt,applyTemplate:()=>ft,cancelDisplaySettings:()=>kt,clearHistoryStates:()=>jt,copyColumn:()=>rt,copyModule:()=>Je,copyRow:()=>ct,deleteColumn:()=>it,deleteNode:()=>$e,deleteNodeTemplate:()=>gt,deleteUserTemplate:()=>vt,discardDraft:()=>Tt,displaySettings:()=>Dt,fetchLayout:()=>Et,insertFreeformNode:()=>Ge,insertNode:()=>ze,insertNodes:()=>We,moveColumn:()=>nt,moveNode:()=>Ze,redo:()=>Ue,renderHistoryState:()=>At,renderLayout:()=>_t,renderNode:()=>Ve,reorderColumn:()=>tt,reorderNode:()=>Ye,resetColWidths:()=>at,resetRowWidth:()=>dt,resizeColumn:()=>ot,resizeRowContent:()=>st,resizingComplete:()=>Pt,saveDraft:()=>Lt,saveGlobalSettings:()=>St,saveHistoryState:()=>Nt,saveLayout:()=>Ct,saveLayoutSettings:()=>wt,saveNodeTemplate:()=>mt,saveUserTemplateSettings:()=>yt,setLayout:()=>Ot,undo:()=>He,updateNode:()=>Qe,updateNodeSetting:()=>Xe,updateNodeSettings:()=>qe});var a={};n.r(a),n.d(a,{after:()=>Bt,before:()=>Ft});var l={};n.r(l),n.d(l,{getChildren:()=>$t,getLayoutActions:()=>Vt,getLayoutHooks:()=>Qt,getLayoutState:()=>Zt,getLayoutStore:()=>Yt,getNode:()=>Xt,getSystemActions:()=>Y,getSystemConfig:()=>V,getSystemSelectors:()=>Z,getSystemState:()=>W,getSystemStore:()=>G,nodeExists:()=>Kt,useLayoutState:()=>qt,useSystemState:()=>z});var u={};n.r(u),n.d(u,{copyNode:()=>Qn,deleteNode:()=>Vn,moveNode:()=>Xn,scrollToNode:()=>qn});var c={};n.r(c),n.d(c,{openSettings:()=>$n});var s={};n.r(s),n.d(s,{getActions:()=>tr,getConfig:()=>nr,getStrings:()=>rr});const d=React;var f=n.n(d);const p=ReactDOM,m=FL.vendors.BBAppCore;var g=(0,m.createStoreRegistry)(),y=g.registerStore,v=g.useStore,h=g.getStore,b=g.getDispatch,E=g.getSelectors;function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){return{type:"SET_SHOULD_SHOW_SHORTCUTS",value:e}},C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fl/untitled",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={label:"",root:null,render:function(){return null},className:null,routerProps:{},onHistoryChanged:function(){}};return{type:"REGISTER_PANEL",handle:e,options:_(_({},n),t)}},L=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"SET_CURRENT_PANEL",name:e}},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return{type:"TOGGLE_PANEL",name:e}},N=function(){return{type:"HIDE_CURRENT_PANEL"}},j=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return{type:"SET_IS_EDITING",value:e}},A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light";return{type:"SET_COLOR_SCHEME",value:e}};function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){P(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var x=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_SHOULD_SHOW_SHORTCUTS"===t.type?!!t.value:e},R=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"REGISTER_PANEL"===t.type?k(k({},e),{},P({},t.handle,t.options)):e},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"SET_CURRENT_PANEL":return t.name;case"HIDE_CURRENT_PANEL":return null;case"TOGGLE_PANEL":return t.name===e?null:t.name;default:return e}},F=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1?arguments[1]:void 0;return"SET_IS_EDITING"===t.type?!!t.value:e},B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light",t=arguments.length>1?arguments[1]:void 0;return"SET_COLOR_SCHEME"===t.type?"dark"===t.value?"dark":"light":e},I={},H={TOGGLE_PANEL:function(e,t){var n=t.getState().currentPanel,r=document.querySelector("html");n&&FLBuilder._closePanel(),"assistant"===n?r.classList.add("fl-builder-assistant-visible"):r.classList.remove("fl-builder-assistant-visible")},HIDE_CURRENT_PANEL:function(){document.querySelector("html").classList.remove("fl-builder-assistant-visible")}},U="fl-builder/system";y(U,{actions:e,reducers:t,effects:r,state:{isEditing:!0,currentPanel:null,shouldShowShortcuts:!1,colorScheme:FLBuilderConfig.userSettings.skin,panels:{}}});var z=function(){return v(U)},G=function(){return h(U)},W=function(){return h(U).getState()},Y=function(){return b(U)},Z=function(){return E(U)},V=function(){return window.FLBuilderConfig};const Q=Redux;var q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.getState;return function(t){return function(r){var o=t(r),i=n();return void 0!==e[r.type]&&e[r.type](i,r),o}}}},X=function(e){var t=e.before,n=e.after;return function(e){return function(r){return function(o){t&&t[o.type]&&t[o.type](o,e);var i=r(o);return n&&n[o.type]&&n[o.type](o,e),i}}}};const $=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,o=r?r({name:e}):Q.compose;return o((0,Q.applyMiddleware)(q(n),X(t)))};function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var re=function(e){var t={};return Object.values(e).map((function(e){var n=te({},e);delete n.settings,t[e.node]=n})),t},oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n={},r=Object.values(e).filter((function(e){return t===e.parent}));return r.map((function(e){return n[e.node]=e})),n},ie=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.layout.present.nodes;return void 0===n[t]?{}:n[t].settings},ae=function(e,t){return Object.keys(e).length!==Object.keys(t).length||Object.values(e).some((function(e){var n=t[e.node];return void 0===e||void 0===n||(e.type!==n.type||e.parent!==n.parent||e.position!==n.position||e.global!==n.global)}))},le=function(e,t){return Object.keys(e).length!==Object.keys(t).length||Object.keys(e).some((function(n){return e[n]!==t[n]}))};const ue=function(e){var t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.layout.present.nodes;return void 0!==t&&(n=oe(n,t)),re(n)};return{useLayoutStore:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){return!0},n=e.getState(),r=(0,d.useRef)(n),o=(0,d.useState)(n),i=K(o,2),a=i[0],l=i[1];return(0,d.useEffect)((function(){return l(e.getState()),e.subscribe((function(){var n=e.getState();t(r.current,n)&&l(te({},n)),r.current=n}))}),[]),a},useNodeSettings:function(t){var n=ie(e.getState(),t),r=(0,d.useRef)(n),o=K((0,d.useState)(n),2),i=o[0],a=o[1];return(0,d.useEffect)((function(){var n=ie(e.getState(),t);return le(n,r.current)&&a(n),r.current=n,e.subscribe((function(){var n=ie(e.getState(),t);le(n,r.current)&&a(n),r.current=n}))}),[t]),i},useNodesWithoutSettings:function(n){var r=t(e.getState(),n),o=(0,d.useRef)(r),i=K((0,d.useState)(r),2),a=i[0],l=i[1];return(0,d.useEffect)((function(){var r=t(e.getState(),n);return ae(r,o.current)&&l(r),o.current=r,e.subscribe((function(){var r=t(e.getState(),n);ae(r,o.current)&&l(r),o.current=r}))}),[]),a}}};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(n),!0).forEach((function(t){de(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ce(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fe={layout:{past:[],present:{attachments:[],nodes:{}},future:[]}},pe={state:{},reducers:{},actions:{},effects:{},tests:{}};const me=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"fl-builder/layout",n=se(se({},pe),e),r=se(se({},fe),n.state),o=(0,Q.combineReducers)(n.reducers),i=$(t,n.effects,n.tests),a=(0,Q.createStore)(o,r,i);return{store:a,actions:(0,Q.bindActionCreators)(se({},n.actions),a.dispatch),hooks:ue(a)}};const ge=function(e){var t={past:[],present:e(void 0,{}),future:[]};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,r=arguments.length>1?arguments[1]:void 0,o=n.past,i=void 0===o?[]:o,a=n.present,l=n.future,u=void 0===l?[]:l;return"RESIZE_COLUMN"===r.type?(r.persist,{past:i,present:e(a,r),future:u}):{past:i,present:e(a,r),future:u}}};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ve(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){he(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var be={node:"",type:"",parent:"",position:0,global:!1,settings:{}},Ee=function(e,t){return e.position>t.position?1:e.position<t.position?-1:0},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0!==t[e]},_e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Object.values(e).filter((function(e){return t===e.parent})).sort(Ee)},we=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=ve(ve(ve({},be),e),t);return"module"===n.type&&void 0===n.settings.type&&(n.settings.type=e.settings.type),n},Se=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o={};if(void 0===r[e])return console.error("Undefined node",e),o;var i=_e(r,t).filter((function(t){return e!==t.node})),a=i.map((function(e){return e.node}));return a.splice(n,0,e),a.map((function(e,n){o[e]=we(r[e],{position:n,parent:t})})),o},Ce=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ve(ve({},e),{},he({},t,we(e[t],n)));return Se(n.node,n.parent,n.position,r)},Le=function(e,t){var n={};if(void 0===t[e])return console.warn("Node to be deleted is undefined",e),t;var r=t[e].parent,o=t[e].type,i=ve({},t);delete i[e],"column"===o&&Ne(r,i)&&delete i[r],function(e,t){var n=[],r=ve({},t);Object.values(r).map((function(t){e===t.parent&&n.push(t.node)})),n.map((function(e){delete r[e]}))}(e,i);var a=_e(i,r);return a.map((function(e,t){if(e.position=t,"column"===e.type){var r=100/a.length;r=r.toPrecision(5),e.settings.size=r}n[e.node]=e})),ve({},i)},Te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n={};return e.map((function(e){var r=Object.values(t).filter((function(t){return e===t.parent})),o=(100/r.length).toPrecision(5);r.map((function(e){n[e.node]=we(e,{settings:ve(ve({},e.settings),{},{size:o})})}))})),n},Ne=function(e,t){return 0===Object.values(t).filter((function(t){return t.parent===e})).length},je=function(e){void 0!==e&&(console.assert("node"in e,"Node has no id property"),console.assert("type"in e,"Node has no type property"),console.assert("parent"in e,"Node has no parent property"),console.assert("position"in e,"Node has no position property"),console.assert("settings"in e,"Node has no settings property"),console.assert("global"in e,"Node has no global property"),"module"===e.type&&console.assert("type"in e.settings,"Module settings should contain type property."),"row"!==e.type&&console.assert(null!==e.parent,"Only rows should have a null parent property"))},Ae=function(e){var t=function(e){var t=Object.keys(e);return Object.values(e).filter((function(e){return null!==e.parent&&!t.includes(e.node)}))}(e);console.assert(0===t.length,"There should be no orphaned nodes",t)};function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?De(Object(n),!0).forEach((function(t){Pe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):De(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xe=ge((0,Q.combineReducers)({attachments:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;return"SET_LAYOUT"===t.type&&void 0!==t.attachments?t.attachments:e},nodes:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;switch(n.type){case"INSERT_NODE":return ke(ke({},t),Ce(t,n.id,{node:n.id,parent:n.parent,type:n.nodeType,position:n.position,settings:n.settings,global:n.global}));case"INSERT_FREEFORM_NODE":return ke(ke({},t),Ce(t,n.id,n.node));case"INSERT_NODES":return ke(ke({},t),n.nodes);case"REORDER_NODE":case"REORDER_COLUMN":return ke(ke({},t),Se(n.id,t[n.id].parent,n.position,t));case"REPARENT_NODE":case"REPARENT_COLUMN":return ke(ke({},t),Se(n.id,n.parent,n.position,t));case"UPDATE_NODE":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],n.node)));case"UPDATE_NODE_SETTING":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},Pe({},n.key,n.value))})));case"UPDATE_NODE_SETTINGS":return void 0===t[n.id]?t:ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke(ke({},t[n.id].settings),n.settings),{},{type:"module"===t[n.id].type?t[n.id].settings.type:void 0})})));case"DELETE_NODE":case"DELETE_COLUMN":return Le(n.id,t);case"RESIZE_COLUMN":return ke(ke({},t),{},(Pe(e={},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},{size:n.width})})),Pe(e,n.siblingId,we(t[n.siblingId],{settings:ke(ke({},t[n.siblingId].settings),{},{size:n.siblingWidth})})),e));case"RESET_COLUMN_WIDTHS":return ke(ke({},t),Te(n.groupIds,t));case"RESIZE_ROW_CONTENT":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},{max_content_width:n.width})})));case"RESET_ROW_WIDTH":return ke(ke({},t),{},Pe({},n.id,we(t[n.id],{settings:ke(ke({},t[n.id].settings),{},{max_content_width:""})})));case"ADD_COLUMN_TEMPLATE":case"ADD_ROW_TEMPLATE":return console.log(n.type,"Needs node reducer implementation?"),t;case"SET_LAYOUT":return n.nodes;default:return t}},globalSettings:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return"SAVE_GLOBAL_SETTINGS"===t.type?t.settings:e}})),Re=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DISPLAY_SETTINGS":return t.id;case"UPDATE_NODE_SETTINGS":case"CANCEL_DISPLAY_SETTINGS":return null;default:return e}},Me=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"RESIZING_COMPLETE":return!1;case"RESIZE_ROW_CONTENT":return[t.id];case"RESIZE_COLUMN":return[t.id,t.siblingId];default:return e}};function Fe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(n),!0).forEach((function(t){Ie(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var He=function(){return{type:"UNDO"}},Ue=function(){return{type:"REDO"}},ze=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length,l=new Array(a>6?a-6:0),u=6;u<a;u++)l[u-6]=arguments[u];return Be({type:"INSERT_NODE",id:e,parent:t,position:r,nodeType:n,settings:o,global:i},l)},Ge=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"INSERT_FREEFORM_NODE",id:e,node:t}},We=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"INSERT_NODES",nodes:e}},Ye=function(e,t){return{type:"REORDER_NODE",id:e,position:t}},Ze=function(e,t,n){return{type:"REPARENT_NODE",id:e,parent:t,position:n}},Ve=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return{type:"RENDER_NODE",id:e,callback:t}},Qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"UPDATE_NODE",id:e,node:t}},qe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return{type:"UPDATE_NODE_SETTINGS",id:e,settings:t,callback:n}},Xe=function(e,t,n){return{type:"UPDATE_NODE_SETTING",id:e,key:t,value:n}},$e=function(e){return{type:"DELETE_NODE",id:e}},Ke=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return{type:"ADD_MODULE",moduleType:e,parent:t,position:n,config:r}},Je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return{type:"COPY_MODULE",id:e,settings:t,callback:n}},et=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"1-col",r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return{type:"ADD_COLUMNS",id:e,insert:t,colType:n,nested:r,module:o}},tt=function(e,t){return{type:"REORDER_COLUMN",id:e,position:t}},nt=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];return{type:"REPARENT_COLUMN",id:e,parent:t,position:n,resize:r}},rt=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return{type:"COPY_COLUMN",id:e,settings:t,settingsId:n,callback:r}},ot=function(e,t,n,r){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return{type:"RESIZE_COLUMN",id:e,width:parseInt(t),siblingId:n,siblingWidth:parseInt(r),shouldPersist:o}},it=function(e,t){return{type:"DELETE_COLUMN",id:e,width:t}},at=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return{type:"RESET_COLUMN_WIDTHS",groupIds:e}},lt=function(e,t,n,r){return{type:"ADD_COLUMN_GROUP",id:e,cols:t,position:n,module:r}},ut=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return{type:"ADD_ROW",cols:e,position:t,module:n}},ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return{type:"COPY_ROW",id:e,settings:t,settingsId:n,callback:r}},st=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return{type:"RESIZE_ROW_CONTENT",id:e,width:t,shouldPersist:n}},dt=function(e){return{type:"RESET_ROW_WIDTH",id:e}},ft=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"core";return{type:"APPLY_TEMPLATE",id:e,append:t,templateType:n}},pt=function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){};return{type:"ADD_NODE_TEMPLATE",nodeType:e,templateId:t,templateType:n,parent:r,position:o,callback:i}},mt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"SAVE_NODE_TEMPLATE",id:e,settings:t}},gt=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"DELETE_NODE_TEMPLATE",id:e,global:t}},yt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"SAVE_USER_TEMPLATE_SETTINGS",settings:e}},vt=function(e){return{type:"DELETE_USER_TEMPLATE",id:e}},ht=function(){return{type:"ADD_COLUMN_TEMPLATE"}},bt=function(){return{type:"ADD_ROW_TEMPLATE"}},Et=function(){return{type:"FETCH_LAYOUT"}},Ot=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return{type:"SET_LAYOUT",nodes:e,attachments:t}},_t=function(){return{type:"RENDER_LAYOUT"}},wt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"SAVE_LAYOUT_SETTINGS",settings:e}},St=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:"SAVE_GLOBAL_SETTINGS",settings:e}},Ct=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return{type:"SAVE_LAYOUT",shouldPublish:e,shouldExit:t,callback:n}},Lt=function(){return{type:"SAVE_DRAFT"}},Tt=function(){return{type:"DISCARD_DRAFT"}},Nt=function(e,t){return{type:"SAVE_HISTORY_STATE",label:e,moduleType:t}},jt=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{type:"CLEAR_HISTORY_STATES",postId:e,shouldExit:t}},At=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};return{type:"RENDER_HISTORY_STATE",position:e,callback:t}},Dt=function(e){return{type:"DISPLAY_SETTINGS",id:e}},kt=function(){return{type:"CANCEL_DISPLAY_SETTINGS"}},Pt=function(){return{type:"RESIZING_COMPLETE"}};function xt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Rt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Mt=function(e,t){var n=FLBuilder._jsonParse(e),r=n.newNodes,o=void 0===r?{}:r,i=n.updatedNodes,a=void 0===i?{}:i;0<Object.keys(o).length&&t.dispatch(We(o)),Object.entries(a).map((function(e){var n=xt(e,2),r=n[0],o=n[1];t.dispatch(Qe(r,o))}))},Ft={},Bt={UNDO:function(){window.FLBuilderHistoryManager.renderState("prev")},REDO:function(){window.FLBuilderHistoryManager.renderState("next")},UPDATE_NODE_SETTINGS:function(e){var t=e.id,n=e.settings,r=e.callback;FLBuilder.ajax({action:"save_settings",node_id:t,settings:n},r)},REORDER_NODE:function(e,t){var n=e.id,r=e.position;(0,FL.Builder.__canvas.getActions().moveNode)(n,r),FLBuilder.ajax({action:"reorder_node",node_id:n,position:r},(function(e){Mt(e,t),FLBuilder._reorderNodeComplete(e)}))},REPARENT_NODE:function(e,t){var n=e.id,r=e.parent,o=e.position;(0,FL.Builder.__canvas.getActions().moveNode)(n,o,r),FLBuilder.ajax({action:"move_node",new_parent:r,node_id:n,position:o},(function(e){Mt(e,t),FLBuilder._moveNodeComplete(e)}))},RENDER_NODE:function(e){var t=e.id,n=e.callback;FLBuilder.ajax({action:"render_node",node_id:t},(function(e){var t=FLBuilder._jsonParse(e);FLBuilder._renderLayout(t,n)}))},DELETE_NODE:function(e){var t=e.id;FLBuilder.ajax({action:"delete_node",node_id:t})},ADD_MODULE:function(e,t){var n=e.moduleType,r=e.parent,o=e.position,i=e.config;FLBuilder.ajax({action:"render_new_module",parent_id:r,type:n,position:o,node_preview:i.nodePreview,widget:i.widget,alias:i.alias},(function(e){Mt(e,t),FLBuilder._addModuleComplete(e)}))},COPY_MODULE:function(e,t){var n=e.id,r=e.settings,o=e.callback;FLBuilder.ajax({action:"copy_module",node_id:n,settings:r},(function(e){Mt(e,t),o(e)}))},ADD_COLUMNS:function(e,t){var n=e.id,r=e.insert,o=e.colType,i=e.nested,a=e.module;FLBuilder.ajax({action:"render_new_columns",node_id:n,insert:r,type:o,nested:i,module:a},(function(e){Mt(e,t),FLBuilder._addColsComplete(e)}))},RESIZE_COLUMN:function(e,t){var n=e.id,r=e.width,o=e.siblingId,i=e.siblingWidth;e.shouldPersist&&(t.dispatch(Pt()),FLBuilder.ajax({action:"resize_cols",col_id:n,col_width:r,sibling_id:o,sibling_width:i},(function(e){return Mt(e,t)})))},RESET_COLUMN_WIDTHS:function(e){var t=e.groupIds;FLBuilder.ajax({action:"reset_col_widths",group_id:t},(function(){return FLBuilder.triggerHook("didResetColumnWidthsComplete")}))},DELETE_COLUMN:function(e){var t=e.id,n=e.width;FLBuilder.ajax({action:"delete_col",node_id:t,new_width:n})},REORDER_COLUMN:function(e){var t=e.id,n=e.position;(0,FL.Builder.__canvas.getActions().moveNode)(t,n),FLBuilder.ajax({action:"reorder_col",node_id:t,position:n},(function(){return FLBuilder.triggerHook("didMoveColumn")}))},REPARENT_COLUMN:function(e){var t=e.id,n=e.parent,r=e.position,o=e.resize;(0,FL.Builder.__canvas.getActions().moveNode)(t,r,n),FLBuilder.ajax({action:"move_col",node_id:t,new_parent:n,position:r,resize:o},(function(){return FLBuilder.triggerHook("didMoveColumn")}))},COPY_COLUMN:function(e,t){var n=e.id,r=e.settings,o=e.settingsId,i=e.callback;FLBuilder.ajax({action:"copy_col",node_id:n,settings:r,settings_id:o},(function(e){Mt(e,t),i(e)}))},ADD_COLUMN_GROUP:function(e,t){var n=e.id,r=e.cols,o=e.position,i=e.module;FLBuilder.ajax({action:"render_new_column_group",node_id:n,cols:r,position:o,module:i},(function(e){Mt(e,t),FLBuilder._addColGroupComplete(e)}))},ADD_ROW:function(e,t){var n=e.cols,r=e.position,o=e.module;FLBuilder.ajax({action:"render_new_row",cols:n,position:r,module:o},(function(e){Mt(e,t),FLBuilder._addRowComplete(e)}))},COPY_ROW:function(e,t){var n=e.id,r=e.settings,o=e.settingsId,i=e.callback;FLBuilder.ajax({action:"copy_row",node_id:n,settings:r,settings_id:o},(function(e){Mt(e,t),i(e)}))},RESIZE_ROW_CONTENT:function(e,t){var n=e.id,r=e.width;e.shouldPersist&&(FLBuilder.ajax({action:"resize_row_content",node:n,width:r}),t.dispatch(Pt()))},RESET_ROW_WIDTH:function(e){var t=e.id;FLBuilder.ajax({action:"resize_row_content",node:t,width:""})},APPLY_TEMPLATE:function(e,t){var n=e.id,r=e.append,o=e.templateType,i="core"===o?FLBuilder._applyTemplateComplete:FLBuilder._applyUserTemplateComplete;FLBuilder.ajax({action:"core"===o?"apply_template":"apply_user_template",template_id:n,append:r},(function(e){var n=FLBuilder._jsonParse(e);t.dispatch(Ot(n.newNodes,[])),i(e)}))},ADD_NODE_TEMPLATE:function(e,t){var n=e.nodeType,r=e.templateId,o=e.templateType,i=e.parent,a=e.position,l=e.callback,u="";switch(n){case"row":u="render_new_row_template";break;case"column":u="render_new_col_template";break;default:u="render_new_module"}FLBuilder.ajax({action:u,template_id:r,template_type:o,parent_id:i,position:a},(function(e){Mt(e,t),l(e)}))},SAVE_NODE_TEMPLATE:function(e,t){var n=e.id,r=e.settings;FLBuilder.ajax({action:"save_node_template",node_id:n,settings:r},(function(e){t.dispatch(Et()),FLBuilder._saveNodeTemplateComplete(e),FLBuilder._hideNodeLoading(n)}))},DELETE_NODE_TEMPLATE:function(e){var t=e.id,n=e.global;FLBuilder.ajax({action:"delete_node_template",template_id:t},(function(){n&&FLBuilder._updateLayout()}))},SAVE_USER_TEMPLATE_SETTINGS:function(e){var t=e.settings;FLBuilder.ajax({action:"save_user_template",settings:t},FLBuilder._saveUserTemplateSettingsComplete)},DELETE_USER_TEMPLATE:function(e){var t=e.id;FLBuilder.ajax({action:"delete_user_template",template_id:t})},RENDER_LAYOUT:function(){FLBuilder.ajax({action:"render_layout"},FLBuilder._renderLayout)},FETCH_LAYOUT:function(e,t){FLBuilder.ajax({action:"get_layout"},(function(e){var n=FLBuilder._jsonParse(e),r=n.nodes,o=n.attachments;t.dispatch(Ot(r,o))}))},SAVE_LAYOUT:function(e){var t=e.shouldPublish,n=e.shouldExit,r=e.callback;FLBuilder.ajax({action:"save_layout",publish:t,exit:n?1:0},r)},SAVE_DRAFT:function(){FLBuilder.ajax({action:"save_draft"},FLBuilder._exit)},DISCARD_DRAFT:function(){FLBuilder.ajax({action:"clear_draft_layout"},(function(){FLBuilder.triggerHook("didDiscardChanges"),FLBuilder._exit()}))},SAVE_LAYOUT_SETTINGS:function(e){var t=e.settings;FLBuilder.ajax({action:"save_layout_settings",settings:t},(function(){return FLBuilder._saveLayoutSettingsComplete(t)}))},SAVE_GLOBAL_SETTINGS:function(e){var t=e.settings;FLBuilder.ajax({action:"save_global_settings",settings:t},FLBuilder._saveGlobalSettingsComplete)},SAVE_HISTORY_STATE:function(e){var t=e.label,n=e.moduleType;FLBuilder.ajax({action:"save_history_state",label:t,module_type:n},(function(e){var t=FLBuilder._jsonParse(e);FLBuilderHistoryManager.states=t.states,FLBuilderHistoryManager.position=parseInt(t.position),FLBuilderHistoryManager.setupMainMenuData()}))},CLEAR_HISTORY_STATES:function(e){var t=e.postId,n=e.shouldExit;FLBuilder.ajax({action:"clear_history_states",post_id:t},(function(){n||FLBuilderHistoryManager.saveCurrentState("draft_created")}))},RENDER_HISTORY_STATE:function(e,t){var n=e.position,r=e.callback;FLBuilder.ajax({action:"render_history_state",position:n},(function(e){var n=FLBuilder._jsonParse(e),o=n.newNodes,i=n.config;t.dispatch(Ot(o,i.attachments)),r(e)}))},DISPLAY_SETTINGS:function(e,t){var n=e.id,r=t.getState().layout.present.nodes;if("global"!==n)if("layout"!==n){if(void 0!==r[n]){var o=r[n],i=o.type,a=o.settings,l=o.parent,u=o.global,c=o.template_id;switch(i){case"column-group":break;case"row":FLBuilder._showRowSettings(n,u);break;case"column":var s="column"!==FLBuilderConfig.userTemplateType&&void 0!==c;FLBuilder._showColSettings(n,u,s);break;default:FLBuilder._showModuleSettings({nodeId:n,parentId:l,type:a.type,global:u})}}}else FLBuilder._layoutSettingsClicked();else FLBuilder._globalSettingsClicked()}},It={SET_LAYOUT:function(e){!function(e){Object.values(e).map(je)}(e.layout.present.nodes)},INSERT_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(Oe(t.id,n),"Node should exist after insert."),je(n[t.id]),console.assert(n[t.id].position===t.position,"Node position should be consistent after insert."),Ae(n)},REORDER_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(Oe(t.id,n),"Node no longer exists after reorder."),je(n[t.id]);var r=n[t.id];console.assert(t.position===r.position,"Node position should match action.position")},REPARENT_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(Oe(t.id,n),"Node should not exist after reparent"),je(n[t.id]),console.assert(t.parent===n[t.id].parent,"Node should have correct parent after reparent")},DELETE_NODE:function(e,t){var n=e.layout.present.nodes;console.assert(!Oe(t.id,n),"Node should not exist after delete"),Ae(n)},COPY_MODULE:function(e,t){var n=e.layout.present.nodes,r=Oe(t.id,n);console.assert(r,"Node no longer exists after duplicate."),r&&je(n[t.id])},DELETE_COLUMN:function(e){var t=e.layout.present.nodes;Ae(t)},REPARENT_COLUMN:function(){console.warn("REPARENT_COLUMN needs a test.")},RESET_COLUMN_WIDTHS:function(e,t){var n=e.layout.present.nodes;t.groupIds.map((function(e){var t=_e(n,e),r=100/t.length,o=t.every((function(e){return e.settings.size===r.toPrecision(5)}));console.assert(o,"Column sizes should match after reset")}))}};const Ht=It;var Ut=me({state:{layout:{present:{nodes:{},globalSettings:FLBuilderConfig.global}}},reducers:o,effects:a,actions:i,tests:Ht}),zt=Ut.store,Gt=Ut.actions,Wt=Ut.hooks,Yt=function(){return zt},Zt=function(){return zt.getState()},Vt=function(){return Gt},Qt=function(){return Wt},qt=Wt.useLayoutStore,Xt=function(e){var t=Zt().layout.present.nodes;return e&&e in t?t[e]:t},$t=function(e){var t=Zt().layout.present.nodes;return Object.values(t).filter((function(t){return e===t.parent}))},Kt=function(e){return"undefined"!==Zt().layout.present.nodes[e]};zt.dispatch(Et());var Jt=n(184),en=n.n(Jt),tn={},nn=(0,d.createContext)(tn),rn=function(){return(0,d.useContext)(nn)};const on=FL.vendors.BBFluid;var an=["onClick","label"];function ln(){return ln=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ln.apply(this,arguments)}function un(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function cn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const dn=function(e){var t=e.x,n=e.y,r=e.items,o=void 0===r?{}:r,i=e.clear,a=void 0===i?function(){}:i,l=window.innerWidth-190,u={};return Object.entries(o).map((function(e){var t=cn(e,2),n=t[0],r=t[1];!1!==r.isEnabled&&(u[n]=r)})),f().createElement("div",{className:"fl-builder-context-menu",style:{top:n,left:t<l?t:l,width:180}},f().createElement("ul",null,Object.keys(u).map((function(e){var t=o[e],n=t.onClick,r=t.label,i=un(t,an);return f().createElement("li",{key:e},f().createElement(on.Button,ln({onClick:function(e){n(e),a(),e.stopPropagation()},size:"sm"},i),r))}))))};function fn(){return fn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fn.apply(this,arguments)}function pn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mn(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gn=function(e){var t=e.children,n=pn((0,d.useState)(!1),2),r=n[0],o=n[1],i=function(){return o(!1)},a={setContextMenu:o,clearContextMenu:i,showContextMenu:!1!==r,contextMenu:r};return f().createElement(nn.Provider,{value:a},f().createElement(yn,null),t,!1!==r&&f().createElement(dn,fn({},r,{clear:i})))},yn=function(){var e=rn().clearContextMenu,t=function(t){document.querySelector(".fl-builder-context-menu")&&!t.target.closest(".fl-builder-context-menu")&&(e(),t.stopPropagation())},n=function(){document.querySelector(".fl-builder-context-menu")&&e()};return(0,d.useEffect)((function(){return window.addEventListener("click",t,{capture:!0}),window.addEventListener("scroll",n,{capture:!0}),function(){window.removeEventListener("click",t,{capture:!0}),window.removeEventListener("scroll",n,{capture:!0})}}),[]),null};function vn(e){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vn(e)}function hn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function En(e,t,n){return t&&bn(e.prototype,t),n&&bn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function On(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_n(e,t)}function _n(e,t){return _n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_n(e,t)}function wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ln(e);if(t){var o=Ln(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Sn(this,n)}}function Sn(e,t){if(t&&("object"===vn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Cn(e)}function Cn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ln(e){return Ln=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ln(e)}var Tn=FLBuilderConfig.lite,Nn=function(e){var t,n={__html:e.children},r=new Date(e.date).toDateString();if("string"==typeof e.url&&""!==e.url){var o=Tn?e.url+"?utm_medium=bb-lite&utm_source=builder-ui&utm_campaign=notification-center":e.url+"?utm_medium=bb-pro&utm_source=builder-ui&utm_campaign=notification-center";t=f().createElement("a",{className:"fl-builder-ui-post",href:o,target:"_blank",rel:"noopener noreferrer"},f().createElement("div",{className:"fl-builder-ui-post-date"},r),f().createElement("div",{className:"fl-builder-ui-post-title"},e.title),f().createElement("div",{className:"fl-builder-ui-post-content",dangerouslySetInnerHTML:n}))}else t=f().createElement("span",{className:"fl-builder-ui-post"},f().createElement("div",{className:"fl-builder-ui-post-date"},r),f().createElement("div",{className:"fl-builder-ui-post-title"},e.title),f().createElement("div",{className:"fl-builder-ui-post-content",dangerouslySetInnerHTML:n}));return t},jn=function(e){On(n,e);var t=wn(n);function n(){return hn(this,n),t.apply(this,arguments)}return En(n,[{key:"getPosts",value:function(e){var t,n,r=FLBuilderStrings.notifications;return 0<e.length?(n=e.map((function(e){return f().createElement(Nn,{key:e.id,title:(t=e.title.rendered,f().createElement("div",{dangerouslySetInnerHTML:{__html:t}})),date:e.date,url:e.meta._fl_notification[0]},e.content.rendered);var t})),t=f().createElement(f().Fragment,null,n)):t=f().createElement("div",{className:"fl-panel-no-message"},r.none),t}},{key:"componentDidMount",value:function(){FLBuilder._initScrollbars()}},{key:"componentDidUpdate",value:function(){FLBuilder._initScrollbars()}},{key:"render",value:function(){var e=this.getPosts(this.props.posts),t=FLBuilderStrings.notifications;return f().createElement("div",{className:"fl-notifications-panel"},f().createElement("div",{className:"fl-panel-title"},t.title),f().createElement("div",{className:"fl-nanoscroller",ref:this.setupScroller},f().createElement("div",{className:"fl-nanoscroller-content"},e)))}}]),n}(d.Component),An=function(e){On(n,e);var t=wn(n);function n(e){var r;hn(this,n),r=t.call(this,e);var o={},i=FLBuilderConfig.notifications.data;try{o=JSON.parse(i)}catch(e){o={}}return r.state={shouldShowNotifications:!1,posts:o},FLBuilder.addHook("toggleNotifications",r.onToggleNotifications.bind(Cn(r))),r}return En(n,[{key:"onToggleNotifications",value:function(){var e=Y().hideCurrentPanel;this.setState({shouldShowNotifications:!this.state.shouldShowNotifications}),e(),!0===this.state.shouldShowNotifications&&FLBuilder.triggerHook("notificationsLoaded")}},{key:"render",value:function(){var e=this.state,t=e.shouldShowNotifications,n=e.posts;return t&&f().createElement(jn,{posts:n})}}]),n}(d.Component);function Dn(e){return Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dn(e)}function kn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pn(e,t){return Pn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Pn(e,t)}function xn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mn(e);if(t){var o=Mn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Rn(this,n)}}function Rn(e,t){if(t&&("object"===Dn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Mn(e){return Mn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(e)}var Fn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pn(e,t)}(i,e);var t,n,r,o=xn(i);function i(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var n=(t=o.call(this,e)).props.postId;return t.layoutClass=".fl-builder-content-".concat(n||FLBuilderConfig.postId),t}return t=i,n=[{key:"componentDidMount",value:function(){this.setupHooks=this.setupHooks.bind(this),this.hooked=!1,jQuery(document).on("tinymce-editor-init",this.setupHooks),this.setupHooks()}},{key:"setupHooks",value:function(){if(!("ontouchstart"in document)&&window.tinymce&&!this.hooked&&FLBuilderConfig.inlineEnabled){var e=this.initEditables.bind(this),t=this.refreshEditables.bind(this),n=this.destroyAllEditables.bind(this),r=this.destroyLoadingEditables.bind(this);FLBuilder&&(FLBuilder.addHook("settingsConfigLoaded",e),FLBuilder.addHook("restartEditingSession",e),FLBuilder.addHook("endEditingSession",n),FLBuilder.addHook("didStartNodeLoading",r),FLBuilder.addHook("didRenderLayoutComplete",t),FLBuilder.addHook("didDeleteRow",t),FLBuilder.addHook("didDeleteColumn",t),FLBuilder.addHook("didDeleteModule",t)),this.initEditables(),this.hooked=!0}}},{key:"initEditables",value:function(){var e=this,t=FLBuilderSettingsConfig.editables,n=jQuery(this.layoutClass);if(n.length)for(var r in t){var o='.fl-module[data-type="'.concat(r,'"]:not(.fl-editable):not(.fl-node-global)');n.find(o).each((function(t,n){(n=jQuery(n)).addClass("fl-editable"),n.delegate(".fl-block-overlay","click.fl-inline-editing-init",(function(t){return e.initEditable(t,n)}))}))}}},{key:"initEditable",value:function(e,t){var n=this,r=FLBuilder.preview;r&&t.parents(".fl-node-".concat(r.nodeId)).length&&r._settingsHaveChanged()||(this.setupEditable(t,(function(){n.onModuleOverlayClick(e)})),t.undelegate(".fl-block-overlay","click.fl-inline-editing-init"))}},{key:"setupEditable",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=e.data("node"),o=FLBuilderSettingsConfig.nodes[r];if(void 0===o)return!1;var i=e.data("type"),a=FLBuilderSettingsConfig.editables[i],l=".fl-node-".concat(r," "),u="fl-inline-editor-".concat(r),c=jQuery('<div id="'.concat(u,'" class="fl-inline-editor"></div>')),s=jQuery(".fl-builder-settings[data-node=".concat(r,"]")),d=o.connections;e.append(c),e.on("click",".fl-block-overlay",this.onModuleOverlayClick.bind(this)),e.on("mouseleave",this.onModuleMouseleave.bind(this));var f=function(e){var r=a[e],o=FLBuilderPreview.getFormattedSelector(l,r.selector),i=jQuery(o),c=i.html(),f=s.find("#fl-field-".concat(e," .fl-field-connection-value"));return i.length?f.length&&""!==f.val()||!f.length&&d&&d[e]?"continue":(i.hasClass("mce-content-body")?tinymce.execCommand("mceRemoveEditor",!0,i.attr("id")):(i.data("field",r.field),i.on("drop",t.onEditorDrop.bind(t))),void tinymce.init({selector:o,inline:!0,menubar:!1,paste_as_text:!0,relative_urls:!1,convert_urls:!1,skin:!FLBuilder&&"lightgray",skin_url:!FLBuilder&&"".concat(tinyMCEPreInit.baseURL,"/skins/lightgray/"),theme:"modern",theme_url:"".concat(tinyMCEPreInit.baseURL,"/themes/modern/"),fixed_toolbar_container:"#".concat(u),plugins:t.getEditorPluginConfig(r.field.type),toolbar:"string"==typeof r.field.toolbar?r.field.toolbar:t.getEditorToolbarConfig(r.field.type),init_instance_callback:function(e){t.onEditorInit(e),i.html(c),n()}})):"continue"};for(var p in a)f(p)}},{key:"getEditorPluginConfig",value:function(e){return"editor"===e?"wordpress, wplink, lists, paste":"paste"}},{key:"getEditorToolbarConfig",value:function(e){switch(e){case"editor":return"bold italic strikethrough link underline | alignleft aligncenter alignright";case"unit":return!1;default:return"bold italic strikethrough underline"}}},{key:"destroyEditables",value:function(e){var t=e.find(".mce-content-body"),n=e.find(".fl-inline-editor"),r=jQuery(".wplink-autocomplete, .ui-helper-hidden-accessible");t.removeAttr("contenteditable"),e.undelegate(".fl-block-overlay","click"),e.off("mouseleave"),e.removeClass("fl-editable"),n.remove(),r.remove()}},{key:"destroyAllEditables",value:function(){var e=jQuery(this.layoutClass).find(".fl-editable");this.destroyEditables(e)}},{key:"destroyLoadingEditables",value:function(e,t){var n=jQuery(t);n.hasClass("fl-module")||(n=n.find(".fl-module")),this.destroyEditables(n)}},{key:"refreshEditables",value:function(){this.initEditables(),tinymce.editors.map((function(e){e.inline&&!jQuery("#".concat(e.id)).length&&setTimeout((function(){return tinymce.execCommand("mceRemoveEditor",!0,e.id)}),1)}))}},{key:"getEditorEventVars",value:function(e){var t=jQuery(e).closest(".mce-content-body"),n=tinymce.get(t.attr("id")),r=t.data("field"),o=t.closest(".fl-module"),i=o.data("node");return{editable:t,module:o,editor:n,field:r,nodeId:i}}},{key:"onEditorInit",value:function(e){e.on("change",this.onEditorChange.bind(this)),e.on("keyup",this.onEditorChange.bind(this)),e.on("undo",this.onEditorChange.bind(this)),e.on("redo",this.onEditorChange.bind(this)),e.on("focus",this.onEditorFocus.bind(this)),e.on("blur",this.onEditorBlur.bind(this)),e.on("mousedown",this.onEditorMousedown.bind(this))}},{key:"onEditorChange",value:function(e){var t=e.target.bodyElement?e.target.bodyElement:e.target,n=this.getEditorEventVars(t),r=n.editor,o=n.field,i=n.nodeId,a=jQuery('.fl-builder-settings[data-node="'.concat(i,'"]')),l=r.getContent();if(a.length)if("editor"===o.type){var u=a.find("#fl-field-".concat(o.name," textarea.wp-editor-area")),c=u.attr("id");u.closest(".tmce-active").length?tinymce.get(c).setContent(l):u.val(l)}else{var s=document.createElement("textarea");s.innerHTML=l,a.find('[name="'.concat(o.name,'"]')).val(s.value)}}},{key:"onEditorFocus",value:function(e){var t=this.getEditorEventVars(e.target.bodyElement),n=t.editable,r=t.editor,o=t.module,i=t.field,a=t.nodeId,l=o.find(".fl-inline-editor"),u=this.getSettingHTML(a,i);this.matchHTML(r.getContent(),u)||(n.data("original",{settingHTML:u,editableHTML:n.html()}),n.css("min-height",n.height()),r.setContent(u),r.selection.select(r.getBody(),!0),r.selection.collapse(!1)),r.settings.toolbar?l.removeClass("fl-inline-editor-no-toolbar"):l.addClass("fl-inline-editor-no-toolbar"),o.addClass("fl-editable-focused"),this.showEditorOverlay(o),this.showModuleSettings(o)}},{key:"onEditorBlur",value:function(e){var t=this.getEditorEventVars(e.target.bodyElement),n=t.editable,r=t.editor,o=t.module,i=o.find(".fl-inline-editor"),a=n.data("original");i.removeClass("fl-inline-editor-no-toolbar"),o.removeClass("fl-editable-focused"),a&&this.matchHTML(r.getContent(),a.settingHTML)&&(n.html(a.editableHTML),n.css("min-height",""))}},{key:"onEditorMousedown",value:function(e){var t=this.getEditorEventVars(e.target).module;this.showEditorOverlay(t)}},{key:"onEditorDrop",value:function(e){return e.preventDefault(),!1}},{key:"onModuleOverlayClick",value:function(e){var t=jQuery(e.target).closest(".fl-block-overlay-actions"),n=jQuery(e.currentTarget).closest(".fl-module"),r=n.find(".mce-content-body").first().attr("id");t.length||FLBuilder._colResizing||r&&(tinymce.get(r).focus(),n.addClass("fl-editable-focused"))}},{key:"onModuleMouseleave",value:function(){jQuery(".mce-inline-toolbar-grp:visible, .mce-floatpanel:visible").length||(this.hideEditorOverlays(),this.showNodeOverlays())}},{key:"showEditorOverlay",value:function(e){var t=e.find(".fl-inline-editor");this.hideNodeOverlays(),this.hideEditorOverlays(),t.show(),jQuery(".fl-inline-editor-active-toolbar").removeClass("fl-inline-editor-active-toolbar"),t.find("> .mce-panel:visible").addClass("fl-inline-editor-active-toolbar")}},{key:"hideEditorOverlays",value:function(){jQuery(".fl-inline-editor, .mce-floatpanel").hide()}},{key:"showNodeOverlays",value:function(){jQuery(".fl-block-overlay").show()}},{key:"hideNodeOverlays",value:function(){jQuery(".fl-block-overlay").hide()}},{key:"showModuleSettings",value:function(e){var t=e.data("type"),n=e.data("node"),r=e.closest(".fl-col").data("node"),o=e.hasClass("fl-node-global");jQuery('.fl-builder-settings[data-node="'.concat(n,'"]')).length||FLBuilder._showModuleSettings({type:t,nodeId:n,parentId:r,global:o})}},{key:"getSettingValue",value:function(e,t){var n=jQuery('.fl-builder-settings[data-node="'.concat(e,'"]'));return(n.length?FLBuilder._getSettings(n):FLBuilderSettingsConfig.nodes[e])[t]}},{key:"getSettingHTML",value:function(e,t){var n=this.getSettingValue(e,t.name);return"editor"===t.type&&""!==n?wp.editor.autop(n):n}},{key:"matchHTML",value:function(e,t){return this.cleanHTML(e)===this.cleanHTML(t)}},{key:"cleanHTML",value:function(e){return jQuery("<div>".concat(e,"</div>")).html().trim().replace(/(\r\n|\n|\r)/gm,"")}},{key:"render",value:function(){return null}}],n&&kn(t.prototype,n),r&&kn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(d.Component);const Bn=Fn;var In=function(){return f().createElement("svg",{id:"fl-symbol-container",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},f().createElement("symbol",{id:"fl-down-caret",viewBox:"0 0 11 6"},f().createElement("polygon",{points:"0 0 2.05697559 0 5.49235478 3.74058411 8.93443824 0 11 0 5.5 6"})))},Hn=function(){};Hn.Close=function(){return f().createElement("svg",{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},f().createElement("g",{stroke:"currentColor",strokeWidth:"2",fill:"none",fillRule:"evenodd",strokeLinecap:"round"},f().createElement("path",{d:"M13,1 L1,13"}),f().createElement("path",{d:"M1,1 L13,13"})))};var Un=["className","children","title","actions","showCloseButton","onClose"];function zn(){return zn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zn.apply(this,arguments)}function Gn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var Wn=function(e){var t=e.className,n=e.children,r=e.title,o=e.actions,i=e.showCloseButton,a=void 0===i||i,l=e.onClose,u=void 0===l?function(){}:l,c=Gn(e,Un),s=en()({"fl-ui-panel-area":!0},t),d=function(){return o||a?f().createElement("div",{className:"fl-ui-panel-trailing-actions"},o,f().createElement("button",{onClick:u,className:"fl-ui-button"},f().createElement(Hn.Close,null))):null};return f().createElement("div",{className:s,onClick:u},f().createElement("div",zn({className:"fl-ui-panel"},c,{onClick:function(e){return e.stopPropagation()}}),f().createElement("div",{className:"fl-ui-panel-topbar"},r&&f().createElement("div",{className:"fl-ui-panel-title"},r),f().createElement(d,null)),f().createElement("div",{className:"fl-ui-panel-content"},n)))},Yn=function(e){var t=e.shortcuts;return 0===Object.keys(t).length?null:f().createElement("ul",{className:"fl-ui-shortcut-list"},Object.values(t).map((function(e,t){var n=e.label,r={__html:e.keyLabel};return f().createElement("li",{key:t},f().createElement("span",null,n),f().createElement("span",{className:"fl-ui-shortcut-item-keycode",dangerouslySetInnerHTML:r}))})))};const Zn=function(){var e=Y().setShouldShowShortcuts;return f().createElement(Wn,{title:"Keyboard Shortcuts",onClose:function(){return e(!1)},className:"fl-ui-help",style:{width:360,maxWidth:"95vw"}},f().createElement(Yn,{shortcuts:FLBuilderConfig.keyboardShortcuts}))};wp.i18n;var Vn=function(e){var t=Vt().deleteNode;if(e){var n=!0,r=Xt(e);if(FLBuilder._needsDeleteConfirmation(r)){var o=function(e){var t=window.FLBuilderStrings,n=t.deleteRowMessage,r=t.deleteColumnMessage,o=t.deleteModuleMessage;switch(e){case"row":return n;case"column":return r;default:return o}}(r.type);n=confirm(o)}if(n){var i=FLBuilder._getJQueryElement(e);if(!i.length&&Kt(e))t(e);else if("module"===r.type)FLBuilder._deleteModule(i);else if("column"===r.type){var a=FLBuilder._getColToDelete(i);FLBuilder._deleteCol(a)}else"row"===r.type&&FLBuilder._deleteRow(i);FLBuilder._highlightEmptyCols(),FLBuilder._resizeLayout(),FLBuilder._removeAllOverlays()}}},Qn=function(e){if(e){var t=Xt(e);t&&void 0!==t.type&&("module"===t.type?FLBuilder._copyModule(e):"column"===t.type?FLBuilder._copyColumn(e):"row"===t.type&&FLBuilder._copyRow(e))}},qn=function(e){var t=document.querySelector("".concat(FLBuilder._contentClass,' [data-node="').concat(e,'"]'));t&&t.scrollIntoView({behavior:"smooth",block:"center"})},Xn=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o=Vt(),i=o.reorderNode,a=o.moveNode,l=o.reorderColumn,u=o.moveColumn,c=Xt(e),s=c.type,d=c.parent,f=c.position,p="column"===s;if(n===d||null===n){if(t===f)return;p?l(e,t):i(e,t)}else p?u(e,n,t,r):a(e,n,t)},$n=function(e){var t=Vt().displaySettings,n=Y().hideCurrentPanel;t(e),document.body.classList.contains("fl-builder-ui-is-pinned-right")&&n()};function Kn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kn(Object(n),!0).forEach((function(t){er(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var tr=function(){var e=Y();return Jn(Jn(Jn({},{registerPanel:e.registerPanel,displayPanel:e.displayPanel,togglePanel:e.togglePanel}),u),c)},nr=function(){return window.FLBuilderConfig},rr=function(){return window.FLBuilderStrings},or=(0,d.createContext)({});or.use=function(){return(0,d.useContext)(or)};const ir=or;var ar=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"1.5",stroke:"currentColor"}))},lr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("rect",{x:"9.5",y:"13.5",width:"11",height:"4",rx:"0.5",transform:"rotate(-90 9.5 13.5)",stroke:"currentColor"}),f().createElement("rect",{x:"2.5",y:"13.5",width:"11",height:"4",rx:"0.5",transform:"rotate(-90 2.5 13.5)",stroke:"currentColor"}))},ur=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("rect",{x:"2.5",y:"9.5",width:"11",height:"4",rx:"0.5",stroke:"currentColor"}),f().createElement("rect",{x:"2.5",y:"2.5",width:"11",height:"4",rx:"0.5",stroke:"currentColor"}))},cr=function(){return f().createElement("svg",{className:"svg",width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M12 6c0 1.105-.895 2-2 2-1.105 0-2-.895-2-2 0-1.105.895-2 2-2 1.105 0 2 .895 2 2zm-1 0c0 .552-.448 1-1 1-.552 0-1-.448-1-1 0-.552.448-1 1-1 .552 0 1 .448 1 1zM3 2c-.552 0-1 .448-1 1v10c0 .552.448 1 1 1h10c.552 0 1-.448 1-1V3c0-.552-.448-1-1-1H3zm10 1H3v6.293l2.5-2.5L11.707 13H13V3zM3 13v-2.293l2.5-2.5L10.293 13H3z",fillRule:"evenodd",fillOpacity:"1",fill:"currentCOlor",stroke:"none"}))},sr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M3.48254 7.83023L3.05006 9.22531H5.78441L5.35194 7.83023C5.19383 7.31871 5.03572 6.81183 4.87761 6.3096C4.72881 5.79807 4.58465 5.27724 4.44514 4.74711H4.38934C4.24053 5.27724 4.09172 5.79807 3.94291 6.3096C3.7941 6.81183 3.64065 7.31871 3.48254 7.83023ZM0.692383 12.9502L3.7755 3.79846H5.08688L8.17 12.9502H6.94233L6.07738 10.16H2.7571L1.8782 12.9502H0.692383Z",fill:"currentColor"}),f().createElement("path",{d:"M11.5546 13.1176C11.2384 13.1176 10.9407 13.0711 10.6617 12.9781C10.3827 12.8944 10.1363 12.7735 9.92234 12.6153C9.71773 12.4479 9.55497 12.248 9.43407 12.0155C9.31316 11.7737 9.25271 11.4993 9.25271 11.1924C9.25271 10.811 9.34106 10.4809 9.51777 10.2019C9.70378 9.91355 9.9921 9.66709 10.3827 9.46247C10.7826 9.25786 11.2942 9.09045 11.9173 8.96025C12.5404 8.83004 13.2891 8.72773 14.1634 8.65333C14.1541 8.42082 14.1169 8.20225 14.0518 7.99764C13.9867 7.79303 13.8844 7.61632 13.7449 7.46751C13.6053 7.30941 13.4193 7.18385 13.1868 7.09084C12.9636 6.99784 12.6892 6.95134 12.3637 6.95134C11.9173 6.95134 11.4895 7.03969 11.0803 7.2164C10.671 7.38381 10.3083 7.56517 9.9921 7.76048L9.54567 6.97924C9.71308 6.86763 9.90839 6.75603 10.1316 6.64442C10.3641 6.52351 10.6059 6.41656 10.857 6.32355C11.1175 6.23055 11.3918 6.15614 11.6801 6.10034C11.9685 6.03523 12.2614 6.00268 12.559 6.00268C13.4891 6.00268 14.1773 6.25845 14.6238 6.76998C15.0795 7.2722 15.3073 7.94649 15.3073 8.79284V12.9502H14.3726L14.275 12.0294H14.2331C13.8518 12.327 13.4286 12.5828 12.9636 12.7967C12.5079 13.0106 12.0382 13.1176 11.5546 13.1176ZM11.8615 12.1968C12.2521 12.1968 12.6334 12.1131 13.0055 11.9457C13.3868 11.769 13.7728 11.5179 14.1634 11.1924V9.40667C13.4379 9.46248 12.8288 9.54153 12.3358 9.64383C11.8522 9.74614 11.4616 9.8717 11.164 10.0205C10.8756 10.16 10.671 10.3228 10.5501 10.5088C10.4292 10.6855 10.3688 10.8855 10.3688 11.1087C10.3688 11.304 10.4106 11.4714 10.4943 11.6109C10.578 11.7411 10.685 11.8527 10.8152 11.9457C10.9547 12.0294 11.1128 12.0945 11.2895 12.141C11.4755 12.1782 11.6662 12.1968 11.8615 12.1968Z",fill:"currentColor"}))},dr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M2.375 15.0203H13.625C14.9067 15.0203 15.7271 14.0754 15.7271 12.9109C15.7271 12.5593 15.6392 12.2004 15.4487 11.8708L9.80908 2.04175C9.41357 1.33862 8.71045 0.979736 8 0.979736C7.28955 0.979736 6.5791 1.34595 6.18359 2.04175L0.543945 11.8782C0.353516 12.2078 0.265625 12.5593 0.265625 12.9109C0.265625 14.0754 1.09326 15.0203 2.375 15.0203ZM2.51416 13.614C2.06006 13.614 1.75977 13.2405 1.75977 12.8376C1.75977 12.7205 1.77441 12.574 1.84766 12.4421L7.34082 2.82544C7.4873 2.57642 7.74365 2.45923 8 2.45923C8.25635 2.45923 8.50537 2.57642 8.64453 2.82544L14.145 12.4568C14.2109 12.5813 14.2402 12.7205 14.2402 12.8376C14.2402 13.2405 13.9326 13.614 13.4785 13.614H2.51416ZM8 9.93726C8.40283 9.93726 8.63721 9.71021 8.64453 9.2854L8.75439 5.76245C8.76904 5.33032 8.44678 5.02271 7.99268 5.02271C7.53857 5.02271 7.22363 5.323 7.23828 5.75513L7.34082 9.29272C7.35547 9.71021 7.58984 9.93726 8 9.93726ZM8 12.3689C8.47607 12.3689 8.86426 12.0247 8.86426 11.5632C8.86426 11.0945 8.4834 10.7576 8 10.7576C7.52393 10.7576 7.13574 11.1018 7.13574 11.5632C7.13574 12.0247 7.53125 12.3689 8 12.3689Z",fill:"currentColor"}))},fr=function(){return f().createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{d:"M7.99634 15.5732C12.1492 15.5732 15.5769 12.1455 15.5769 8C15.5769 3.85449 12.1418 0.426758 7.98901 0.426758C3.84351 0.426758 0.423096 3.85449 0.423096 8C0.423096 12.1455 3.85083 15.5732 7.99634 15.5732ZM7.99634 14.0645C4.63452 14.0645 1.94653 11.3618 1.94653 8C1.94653 4.63818 4.63452 1.94287 7.98901 1.94287C11.3508 1.94287 14.0535 4.63818 14.0608 8C14.0681 11.3618 11.3582 14.0645 7.99634 14.0645ZM7.99634 11.1787C10.9919 11.1787 13.0281 8.76172 13.0281 8.00732C13.0281 7.26025 10.9919 4.83594 7.99634 4.83594C5.00806 4.83594 2.94995 7.26025 2.94995 8.00732C2.94995 8.76172 5.02271 11.1787 7.99634 11.1787ZM7.99634 10.0654C6.85376 10.0654 5.93091 9.12793 5.92358 8.00732C5.92358 6.86475 6.85376 5.94922 7.99634 5.94922C9.13159 5.94922 10.0544 6.86475 10.0544 8.00732C10.0544 9.12793 9.13159 10.0654 7.99634 10.0654ZM8.00366 8.9082C8.48706 8.9082 8.89722 8.49072 8.89722 8.00732C8.89722 7.52393 8.48706 7.10645 8.00366 7.10645C7.49829 7.10645 7.08813 7.52393 7.08813 8.00732C7.08813 8.49072 7.49829 8.9082 8.00366 8.9082Z",fill:"currentColor"}))},pr=n(856);function mr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function gr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var yr=function(){};const vr=function(e){var t,n,r=e.onClick,o=e.onDoubleClick,i=e.delay,a=void 0===i?300:i,l=mr((t=(0,d.useRef)(yr),n=function(){return t.current()},(0,d.useEffect)((function(){return n}),[]),[function(e){return t.current=e},n]),2),u=l[0],c=l[1];return[function(){c(),function(e,t,n){var r=(new Date).getTime(),o=requestAnimationFrame((function o(){if((new Date).getTime()-r>=t)return e(),void n(yr);var i=requestAnimationFrame(o);n((function(){return cancelAnimationFrame(i)}))}));n((function(){return cancelAnimationFrame(o)}))}(r,a,u)},function(){c(),o()}]};function hr(e){return hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(e)}var br=function(e){var t=function(e){var t=nr().contentItems.module.find((function(t){return t.slug===e}));return"object"===hr(t)&&t}(e);return t?t.name:e},Er=function(e,t,n){return e<=t+n/2},Or=["module","row","column"],_r=function(e){return!nr().simpleUi&&Or.includes(e)},wr=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return!!Or.includes(t)&&!(t!==e&&!e.includes(t))},Sr=[],Cr=function(e){return function(){if(0>=Sr.length){var e=nr().contentItems;Sr=e.module.map((function(e){return e.slug}))}return Sr}().includes(e)},Lr=["id","type"],Tr=["children","style"];function Nr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nr(Object(n),!0).forEach((function(t){kr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ar(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Dr(){return Dr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dr.apply(this,arguments)}function kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,l=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(l)throw o}}return i}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return xr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xr(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Rr=function e(t){var n,r=t.node,o=t.index,i=t.level,a=t.type,l=t.global,u=void 0!==l&&l,c=t.parent,s=tr().moveNode,p=(0,Qt().useNodesWithoutSettings)(r),m=0<Object.keys(p).length,g=ir.use(),y=g.draggingItem,v=g.setDraggingItem,h=g.clearDraggingItem,b=Pr((0,d.useState)(!1),2),E=b[0],O=b[1],_=Pr((0,d.useState)(!0),2),w=_[0],S=_[1],C=en()("fl-builder-node-outline-item",(kr(n={},"fl-builder-node-type-".concat(a),a),kr(n,"show-drop-before","before"===E),kr(n,"show-drop-after","after"===E),kr(n,"is-dragging-self",r===(null==y?void 0:y.id)),n));return f().createElement("li",{className:C,style:{"--level":i},draggable:_r(a),onDragStart:function(e){var t;e.stopPropagation(),e.dataTransfer.setDragImage(((t=new Image).src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",t.style.opacity=0,t),0,0),e.dataTransfer.setData(a,r),e.dataTransfer.setData("node-id",r),e.dataTransfer.setData("node-type",a),v({id:r,type:a})},onDragEnd:function(){return h()},onDragOver:function(e){if(e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect="move",e.currentTarget.classList.contains("fl-builder-node-outline-item")){if(wr(e.dataTransfer.types,a)){var t=e.currentTarget.getBoundingClientRect(),n=t.y,r=t.height;Er(e.clientY,n,r)&&"before"!==E?O("before"):Er(e.clientY,n,r)||"after"===E||O("after")}}else console.warn("Problem: Something other than fl-builder-node-outline-item-content")},onDragLeave:function(){E&&O(!1)},onDrop:function(e){if(E&&O(!1),h(),wr(e.dataTransfer.types,a)){var t=e.currentTarget.getBoundingClientRect(),n=t.y,r=t.height,i=Er(e.clientY,n,r)?"before":"after",l=e.dataTransfer.getData("node-id"),u=Xt(l),d=u.position,f=u.parent,p=o;if(c===f){if("before"===i){if(d===o-1)return;p=d>o?o:Math.max(0,o-1)}else if("after"===i){if(d===o+1)return;p=d>o?o+1:o}}else p="after"===i?o+1:o;s(l,p,c,[c,f])}}},"column-group"!==a&&f().createElement(Fr,{id:r,type:a,global:u,position:o,level:i,toggleContent:function(){return S(!w)},isShowingContent:w}),"module"!==a&&!m&&!u&&f().createElement(Mr,{id:r,type:a}),0<Object.keys(p).length&&w&&f().createElement("ul",null,Object.values(p).sort(Ee).map((function(t,n){return f().createElement(e,Dr({key:t.node,level:"column-group"===a?i:i+1,index:n},t))}))))},Mr=function(e){var t=e.id,n=e.type,r=Ar(e,Lr),o=Pr((0,d.useState)(!1),2),i=o[0],a=o[1],l=tr().moveNode,u=ir.use().clearDraggingItem,c=en()("fl-builder-node-empty-drop-area",{"is-over":i});return f().createElement("div",Dr({className:c,onDragOver:function(e){"column"===n&&wr(e.dataTransfer.types,"module")&&a(!0)},onDragLeave:function(){return i&&a(!1)},onDrop:function(e){if(a(!1),u(),"column"===n&&wr(e.dataTransfer.types,"module")){var r=e.dataTransfer.getData("node-id");l(r,0,t)}}},r),f().createElement("div",{className:"drop-area"}))},Fr=(0,d.memo)((function(e){var t=e.id,n=e.type,r=e.global,o=e.level,i=e.toggleContent,a=e.isShowingContent,l=void 0===a||a,u=(0,Qt().useNodeSettings)(t),c=rn(),s=c.setContextMenu,d=c.contextMenu,p=c.clearContextMenu,m=tr(),g=m.openSettings,y=m.deleteNode,v=m.copyNode,h=m.scrollToNode,b=nr().simpleUi,E=function(e){var t=e.responsive_display,n=void 0===t?"":t,r=e.visibility_display;return""!==n||""!==(void 0===r?"":r)}(u),O="row"===n&&!r,_=!0;"module"===n&&(_=Cr(u.type));var w=en()("fl-builder-node-outline-item-content",{"has-context-menu":!1!==d&&t===d.id,"is-global-node":r,"is-missing-definition":!_}),S=Pr(vr({onClick:function(){_&&h(t)},onDoubleClick:function(){_&&(h(t),g(t))}}),2),C=S[0],L=S[1];return f().createElement("div",{className:w,onClick:C,onDoubleClick:L,onPointerEnter:function(){var e=document.querySelector(".fl-node-".concat(t));e&&(e.style.boxShadow="inset 0 0 0 2px var(--fl-builder-".concat(r?"orange":"blue"," ), 0 0 0 1px hsla( 210, 0%, 0%, .5 )"))},onPointerLeave:function(){var e=document.querySelector(".fl-node-".concat(t));e&&(e.style.boxShadow="")},onContextMenu:function(e){if(!1===d||t!==d.id){var o={settings:{label:"Open Settings",isEnabled:_,onClick:function(){h(t),g(t)}},clone:{label:"Duplicate",isEnabled:_&&!b,onClick:function(){return v(t)}},delete:{label:FLBuilderStrings.remove,isEnabled:!b,status:"destructive",onClick:function(){return y(t)}}};s({id:t,items:o,type:n,global:r,x:e.clientX,y:e.clientY}),e.preventDefault()}else p()}},O&&f().createElement("span",{className:"fl-builder-outline-item-gutter"},f().createElement("button",{className:!l&&"is-hiding-content",onClick:function(e){i(e),e.preventDefault(),e.stopPropagation()}},f().createElement(zr,null))),f().createElement("span",{className:"fl-builder-outline-item-icon-wrap"},f().createElement(Hr,{type:n,moduleType:u.type,settings:u,hasDefinition:_})),f().createElement("span",{className:"fl-builder-outline-item-label-wrap"},f().createElement(Br,{type:n,settings:u,level:o})),f().createElement(Ur,{id:t,type:n,size:parseFloat(u.size),width:u.max_content_width,widthUnit:u.max_content_width_unit}),E&&f().createElement("span",{className:"fl-builder-outline-item-icon-wrap"},f().createElement(fr,null)))})),Br=function(e){var t=e.type,n=e.settings,r=void 0===n?{}:n,o=e.level,i=void 0!==r.type?br(r.type):t,a="";if("column"===t&&3<=o&&(i=FLBuilderStrings.childColumn),"row"===i&&(i=FLBuilderStrings.row),"column"===i&&(i=FLBuilderStrings.column),"module"===t&&"type"in r)switch(r.type){case"heading":i=r.tag,a=r.heading;break;case"html":a=r.html;break;case"rich-text":case"icon":case"button":a=r.text;break;case"callout":a=r.title}if("node_label"in r&&""!==r.node_label){var l=r.node_label;a=a&&""!==a?l+" - "+a:l}return f().createElement(f().Fragment,null,i,a&&f().createElement("span",{style:{opacity:.6}},": "+function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(0,pr.sanitize)(e,{ALLOWED_TAGS:[]}).substring(0,48)}(a)))},Ir=function(e){var t=e.children,n=e.style,r=Ar(e,Tr);return f().createElement("span",Dr({style:jr({textTransform:"lowercase",background:"rgba(0,0,0,.05)",color:"#828282",fontSize:11,flex:"0 0 auto",display:"inline-flex",padding:"2px 6px",borderRadius:25,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontFamily:"monospace"},n),title:t},r),t)},Hr=(0,d.memo)((function(e){var t=e.type,n=e.moduleType,r=e.settings,o=e.hasDefinition;switch(t){case"row":return f().createElement(ur,null);case"column":return f().createElement(lr,null);case"module":var i=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=FLBuilderConfig.contentItems.module;if(!n)return dr;switch(e){case"rich-text":return sr;case"photo":return cr;case"icon":if("icon"in t)return function(){return f().createElement("i",{className:t.icon,"aria-hidden":"true"})};break;default:var o=r.find((function(t){return e===t.slug}));return o&&"icon"in o?function(){return f().createElement("div",{style:{flexShrink:0,width:16,height:16,fill:"currentColor"},dangerouslySetInnerHTML:{__html:o.icon}})}:ar}}(n,r,o);return f().createElement(i,null)}})),Ur=function(e){var t=e.id,n=e.type,r=e.size,o=e.width,i=e.widthUnit,a=qt().resizing,l="";return a&&a.includes(t)&&("column"===n?l+=" ".concat(r,"% "):"row"===n&&(l+="Max: ".concat(o+i))),""===l?null:f().createElement(Ir,{style:{background:"var(--fl-builder-blue)",color:"white"}},l)},zr=function(){return f().createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"},f().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.79289 1.29289C3.18342 0.902369 3.81658 0.902369 4.20711 1.29289L7.20711 4.29289C7.59763 4.68342 7.59763 5.31658 7.20711 5.70711L4.20711 8.70711C3.81658 9.09763 3.18342 9.09763 2.79289 8.70711C2.40237 8.31658 2.40237 7.68342 2.79289 7.29289L5.08579 5L2.79289 2.70711C2.40237 2.31658 2.40237 1.68342 2.79289 1.29289Z",fill:"currentColor"}))};const Gr=function(){var e=(0,Qt().useNodesWithoutSettings)(null),t=Object.values(e).sort(Ee),n=Pr((0,d.useState)(!1),2),r=n[0],o=n[1],i=!1!==r,a={draggingItem:r,isDraggingItem:i,clearDraggingItem:function(){return o(!1)},setDraggingItem:function(e){return o(e)}},l=en()("fl-builder-node-outline",kr({"is-dragging":i},"is-dragging-type-".concat(r.type),r));return f().createElement(ir.Provider,{value:a},f().createElement("ul",{className:l},t.map((function(e,t){return f().createElement(Rr,Dr({key:e.node,level:1,index:t},e))}))))};var Wr=["className"];function Yr(){return Yr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yr.apply(this,arguments)}function Zr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}const Vr=function(e){var t=e.className,n=Zr(e,Wr),r=en()("fl-builder-workspace-panel",t);return f().createElement("div",Yr({className:r},n))};const Qr=function(){var e=z(),t=e.currentPanel,n=e.panels;if(!(t in n))return null;var r,o=n[t],i=o.routerProps,a=o.onHistoryChanged,l=o.root,u=o.render,c=o.frame,s=void 0===c?Vr:c,p=o.className,g=o.wrapClassName,y=!1===s?d.Fragment:s,v=l||u;return f().createElement("div",{className:g},f().createElement(y,{className:!1!==s&&p},f().createElement(m.Root,{routerProps:(r=i,"function"==typeof r?r():r),onHistoryChanged:a},f().createElement(v,null))))};!function(){FLBuilder.addHook("didInitUI",(function(){var t=document.querySelector(".fl-builder-bar-actions"),n=t.querySelector(".fl-builder--saving-indicator"),r=document.createElement("button");r.classList.add("fl-builder-button","fl-builder-button-silent"),r.innerHTML='<svg width="20px" x="0px" y="0px" viewBox="0 0 238 238" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="EMF-by-Xara-X" serif:id="EMF by Xara X"><path d="M170.734,183.655l-32.623,-35.483c-19.089,5.332 -40.624,6.6 -61.992,2.707c-54.118,-9.858 -86.793,-49.103 -72.935,-87.598c13.859,-38.494 69.029,-61.737 123.148,-51.878c7.553,1.375 14.687,3.324 21.334,5.762l-6.462,12.195c-5.266,-1.731 -10.922,-3.111 -16.913,-4.082c-42.267,-6.842 -85.356,9.291 -96.18,36.014c-10.824,26.722 14.695,53.963 56.963,60.808c41.535,6.724 83.865,-8.739 95.589,-34.637l13.176,22.511l0.064,0.113c-4.574,7.429 -10.792,14.102 -18.26,19.85l27.897,25.151c15.605,14.906 -15.073,47.906 -32.806,28.567Zm9.595,-26.401l-34.191,-30.641c-36.604,14.182 -70.685,6.876 -98.296,-5.59c23.399,17.456 58.534,24.774 94.542,14.959l30.526,29.179c1.989,-3.304 4.559,-6.305 7.419,-7.907Z"/><path d="M42.292,90.276l27.528,0l16.45,-26.827l34.049,52.376l44.83,-68.557l34.474,58.905l37.878,0l-29.225,-7.239l-43.694,-98.934l-43.696,82.469l-33.055,-51.241l-24.826,54.79l-20.713,4.258Z" style="fill:#1195d0;"/></g></svg>',r.onclick=function(){return e()},r.title="Query Monitor",jQuery("#query-monitor-main").length>0&&t.insertBefore(r,n)}));var e=function(){var e=document.getElementById("query-monitor-main");if(t(e)){(n=document.getElementById("wp-admin-bar-query-monitor").getElementsByTagName("a"))[0].click()}else{var n=document.getElementsByClassName("qm-button-container-close");n[0].click()}},t=function(e){return"none"===window.getComputedStyle(e).display}}();const qr=function(){var e=z(),t=e.isEditing,n=e.shouldShowShortcuts,r=e.colorScheme,o=en()(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},"fluid-color-scheme-".concat(r),r));return f().createElement("div",{className:o},f().createElement(gn,null,f().createElement(Bn,null),t&&f().createElement(f().Fragment,null,f().createElement(In,null),f().createElement(An,null),n&&f().createElement(Zn,null),f().createElement(Qr,null))))};function Xr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xr(Object(n),!0).forEach((function(t){Kr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jr,eo=tr(),to=eo.registerPanel,no=eo.displayPanel,ro=eo.togglePanel,oo=window.FL||{},io=$r($r($r({},oo.Builder||{}),s),{},{data:l,registerPanel:to,displayPanel:no,togglePanel:ro});window.FL=$r($r({},oo),{},{Builder:io}),(void 0===(Jr=V().showOutlinePanel)||Jr)&&function(){var e=window.FL.Builder,t=e.registerPanel,n=e.togglePanel;t("outline",{label:"Outline",render:Gr,root:Gr}),FLBuilder.addHook("didInitUI",(function(){var e=document.querySelector(".fl-builder-bar-actions"),t=e.querySelector(".fl-builder--saving-indicator"),r=document.createElement("button");r.classList.add("fl-builder-button","fl-builder-button-silent"),r.innerHTML='<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.38672 5.33984C2.1582 5.33984 2.77344 4.72461 2.77344 3.95312C2.77344 3.19141 2.1582 2.56641 1.38672 2.56641C0.625 2.56641 0 3.19141 0 3.95312C0 4.72461 0.625 5.33984 1.38672 5.33984ZM5.97656 4.89062H14.0565C14.5838 4.89062 15.0038 4.48047 15.0038 3.95312C15.0038 3.42578 14.5936 3.01562 14.0565 3.01562H5.97656C5.45898 3.01562 5.03906 3.42578 5.03906 3.95312C5.03906 4.48047 5.44922 4.89062 5.97656 4.89062ZM3.88672 11.3457C4.64844 11.3457 5.27344 10.7305 5.27344 9.95898C5.27344 9.19727 4.64844 8.57227 3.88672 8.57227C3.11523 8.57227 2.49023 9.19727 2.49023 9.95898C2.49023 10.7305 3.11523 11.3457 3.88672 11.3457ZM8.47656 10.8965H16.5794C17.1068 10.8965 17.5169 10.4863 17.5169 9.95898C17.5169 9.43164 17.1068 9.02148 16.5794 9.02148H8.47656C7.94922 9.02148 7.53906 9.43164 7.53906 9.95898C7.53906 10.4863 7.94922 10.8965 8.47656 10.8965ZM6.37695 17.3516C7.14844 17.3516 7.76367 16.7363 7.76367 15.9648C7.76367 15.2031 7.14844 14.5781 6.37695 14.5781C5.61523 14.5781 4.99023 15.2031 4.99023 15.9648C4.99023 16.7363 5.61523 17.3516 6.37695 17.3516ZM10.9668 16.9023H19.0251C19.5524 16.9023 19.9626 16.4922 19.9626 15.9648C19.9626 15.4375 19.5524 15.0273 19.0251 15.0273H10.9668C10.4395 15.0273 10.0293 15.4375 10.0293 15.9648C10.0293 16.4922 10.4395 16.9023 10.9668 16.9023Z" fill="currentColor"/></svg>',r.onclick=function(){return n("outline")},r.title="Outline",e.insertBefore(r,t)}))}();var ao=document.getElementById("fl-ui-root");ao.classList.add("fluid","fl","uid"),(0,p.render)(f().createElement(qr,null),ao)})()})();
|
js/build/builder.bundle.min.js.LICENSE.txt
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
http://jedwatson.github.io/classnames
|
5 |
*/
|
6 |
|
7 |
-
/*! @license DOMPurify 2.3.
|
4 |
http://jedwatson.github.io/classnames
|
5 |
*/
|
6 |
|
7 |
+
/*! @license DOMPurify 2.3.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.5/LICENSE */
|
js/build/vendor-bb-app-core.bundle.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{App:()=>re,Error:()=>B,Root:()=>G,createAppState:()=>s,createStoreRegistry:()=>R});const r=React;var n=e.n(r);const o=Redux,c=ReactRouterDOM;function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l={handle:"",label:"",render:function(){return null},icon:function(){return null},isEnabled:!0},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;return{reducers:{apps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REGISTER_APP":return u(a({},r.handle,u(u({},e),{},{handle:r.handle},r.config)),t);case"UNREGISTER_APP":return delete t[r.handle],u({},t);default:return t}}},actions:{registerApp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"REGISTER_APP",handle:e,config:t}},unregisterApp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{type:"UNREGISTER_APP",handle:e}}}}};function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(c.push(n.value),!t||c.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var b=function(e,t){return y(e)===y(t)&&("string"==typeof e||"number"==typeof e?e===t:JSON.stringify(e)===JSON.stringify(t))},g=function(e,t,r){return"boolean"==typeof e?e:"function"==typeof e?e(t,r):"string"==typeof e?!b(t[e],r[e]):!!Array.isArray(e)&&e.some((function(e){return!b(t[e],r[e])}))};function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O={exports:{}};const h=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");return t=Object.assign({pascalCase:!1},t),0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=(e=>{let t=!1,r=!1,n=!1;for(let o=0;o<e.length;o++){const c=e[o];t&&/[a-zA-Z]/.test(c)&&c.toUpperCase()===c?(e=e.slice(0,o)+"-"+e.slice(o),t=!1,n=r,r=!0,o++):r&&n&&/[a-zA-Z]/.test(c)&&c.toLowerCase()===c?(e=e.slice(0,o-1)+"-"+e.slice(o-1),n=r,r=!1,t=!0):(t=c.toLowerCase()===c&&c.toUpperCase()!==c,n=r,r=c.toUpperCase()===c&&c.toLowerCase()!==c)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,((e,t)=>t.toUpperCase())).replace(/\d+(\w|$)/g,(e=>e.toUpperCase())),r=e,t.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r);var r};O.exports=h,O.exports.default=h;var m=O.exports,j=function(e,t,r){return Object.entries(r).map((function(r){var n=p(r,1)[0];if(!t[n]){var o="SET_".concat(n.toUpperCase()),c=m("set_".concat(n));e[c]=function(e){return{type:o,value:e}}}})),e},w=function(e,t){return Object.keys(e).length||Object.keys(t).length?(Object.entries(t).map((function(t){var r=p(t,2),n=r[0],o=r[1];e[n]||(e[n]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return t.type==="SET_".concat(n.toUpperCase())?t.value:e})})),(0,o.combineReducers)(e)):function(e){return e}},E=function(e,t){var r="undefined"==typeof window?null:window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;return(r?r({name:e}):o.compose)((0,o.applyMiddleware)(S(t)))},S=function(e){var t=e.before,r=e.after;return function(e){return function(n){return function(o){t&&t[o.type]&&t[o.type](o,e);var c=n(o);return r&&r[o.type]&&r[o.type](o,e),c}}}},P=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=function(){var e={};return{registerStore:function(t,r){var n=r.state,c=void 0===n?{}:n,a=r.cache,i=void 0===a?[]:a,u=r.actions,l=void 0===u?{}:u,s=r.reducers,f=void 0===s?{}:s,y=r.selectors,b=void 0===y?{}:y,g=r.effects,v=void 0===g?{}:g;if(!t)throw new Error("Missing key required for registerStore.");if(e[t])throw new Error("A store with the key '".concat(t,"' already exists."));var O,h,S,P=function(e,t){if("undefined"!=typeof localStorage){var r=localStorage.getItem(e);if(r){var n=JSON.parse(r);return d(d({},t),n)}}return t}(t,c);e[t]={actions:j(C({},l),f,P),store:(0,o.createStore)(w(C({},f),P),P,E(t,v))},e[t].selectors=function(e,t){var r={},n=t.getState();return Object.entries(n).map((function(t){var r=p(t,1)[0],n=m("get_".concat(r));e[n]||(e[n]=function(e){return e[r]})})),Object.entries(e).map((function(e){var n=p(e,2),o=n[0],c=n[1];r[o]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c.apply(void 0,[t.getState()].concat(r))}})),r}(C({},b),e[t].store),O=t,h=e[t].store,(S=i).length&&"undefined"!=typeof localStorage&&h.subscribe((function(){var e=h.getState(),t={};S.map((function(r){t[r]=e[r]})),localStorage.setItem(O,JSON.stringify(t))}))},useStore:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e[t].store,c=o.getState(),a=(0,r.useRef)(c),i=(0,r.useState)(c),u=p(i,2),l=u[0],s=u[1];return(0,r.useEffect)((function(){return s(o.getState()),o.subscribe((function(){var e=o.getState();g(n,a.current,e)&&s(C({},e)),a.current=e}))}),[]),l},getStore:function(t){return e[t].store},getDispatch:function(t){var r=e[t],n=r.actions,o=r.store,c={};return Object.entries(n).map((function(e){var t=p(e,2),r=t[0],n=t[1];c[r]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new Promise((function(e){e(o.dispatch(n.apply(void 0,t)))}))}})),c},getSelectors:function(t){return e[t].selectors},getHooks:function(t){var n=e[t],c=n.actions,a=n.store;return function(e,t){var n=e.getState(),o={};return Object.keys(n).map((function(n){var c="use".concat(P(n));o[c]=function(){var o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],c=p((0,r.useState)(e.getState()[n]),2),a=c[0],i=c[1],u=(0,r.useRef)(e.getState()[n]);(0,r.useLayoutEffect)((function(){return i(e.getState()[n]),u.current=e.getState()[n],e.subscribe((function(){var t=e.getState();g(o,a,u.current)&&i(t[n]),u.current=t[n]}))}),[]);var l="set".concat(P(n)),s=t[l];return[a,s]}})),o}(a,(0,o.bindActionCreators)(c,a.dispatch))}}};function _(){return(_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function D(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var U=["error","title","children","style"];function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var B={},N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(a,r.Component);var t,n,o,c=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=T(e);if(t){var o=T(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return L(this,r)}}(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=c.call(this,e)).state={hasError:!1,error:null},t}return t=a,o=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}],(n=[{key:"render",value:function(){var e=this.props,t=e.alternate,n=void 0===t?F:t,o=e.children,c=this.state,a=c.hasError,i=c.error;return a?(0,r.createElement)(n,{error:i}):o}}])&&x(t.prototype,n),o&&x(t,o),a}(),F=function(e){var t=e.error,r=e.title,o=void 0===r?"There seems to be an error":r,c=e.children,a=e.style,i=void 0===a?{}:a,u=D(e,U),l=M(M({},i),{},{display:"flex",flexDirection:"column",flex:"1 1 auto",justifyContent:"center",alignItems:"center",padding:40,textAlign:"center",minHeight:0,maxHeight:"100%"});return n().createElement("div",_({style:l},u),n().createElement("h1",{style:{marginBottom:20}},o),n().createElement("code",{style:{padding:10}},t.message),c)};B.Boundary=N,B.Page=F;var H=function(){return n().createElement("div",null,"Loading...")},G=function(e){var t=e.children,o=e.error,a=e.loading,i=void 0===a?H:a,u=e.router,l=void 0===u?c.MemoryRouter:u,s=e.routerProps,f=void 0===s?{}:s;return n().createElement(B.Boundary,{alternate:o},n().createElement(l,f,n().createElement(r.Suspense,{fallback:n().createElement(i,null)},t)))},J={handle:null,label:null,isAppRoot:!1},$=(0,r.createContext)(J),z=function(){return(0,r.useContext)($)},X=["root"];function Z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Z(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Z(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var V=function(e){return n().createElement(B.Page,_({title:"App Core: There seems to be an issue rendering current app."},e))},Y=function(){return console.log("default loading screen"),n().createElement("h1",{style:{margin:"auto"}},"Loading...")},K=function(e){var t=e.loading,o=e.error,a=void 0===o?ee:o,i=e.apps,u=(0,c.useHistory)(),l=(0,c.useLocation)(),s=(0,c.useParams)().app;if((0,r.useEffect)((function(){if(i[s]&&"function"==typeof i[s].onMount)return i[s].onMount()}),[s]),!i[s])return u.go(-u.length),u.replace("/",{}),null;var f=i[s],p=f.label,y=void 0===p?"":p,b=f.root,g=2>=l.pathname.split("/").length,v=q(q({},J),{},{handle:s,baseURL:"/".concat(s),label:y,isAppRoot:g});return n().createElement($.Provider,{value:v},n().createElement(B.Boundary,{alternate:a},n().createElement(r.Suspense,{fallback:n().createElement(t,null)},n().createElement(W,_({root:b},v)))))},Q=function(){return n().createElement(te,null,n().createElement("h1",null,"App Not Found"))},W=(0,r.memo)((function(e){var t=e.root,r=D(e,X);return t?n().createElement(t,r):n().createElement(Q,null)})),ee=function(e){var t=z().label;return n().createElement(B.Page,_({title:"There seems to be an issue with the ".concat(t," app.")},e))},te=function(e){var t=e.children;return n().createElement("div",{style:{flex:"1 1 auto",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},t)},re={};re.use=z,re.Content=function(e){var t=e.apps,r=void 0===t?{}:t,o=e.defaultApp,a=void 0===o?"home":o,i=e.loading,u=void 0===i?Y:i;return Object.keys(r).length?n().createElement(B.Boundary,{alternate:V},n().createElement(c.Switch,null,a&&n().createElement(c.Route,{exact:!0,path:"/"},n().createElement(c.Redirect,{to:"/".concat(a)})),n().createElement(c.Route,{path:"/:app",render:function(){return n().createElement(K,{loading:u,apps:r})}}))):(console.warn("App Core: You have no apps."),null)},window.FL=window.FL||{},FL.vendors=FL.vendors||{},FL.vendors.BBAppCore=t})();
|
1 |
+
(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{App:()=>te,Error:()=>B,Root:()=>H,createAppState:()=>s,createStoreRegistry:()=>R});const r=React;var n=e.n(r);const o=Redux,c=ReactRouterDOM;function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l={handle:"",label:"",render:function(){return null},icon:function(){return null},isEnabled:!0},s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l;return{reducers:{apps:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;switch(r.type){case"REGISTER_APP":return u(a({},r.handle,u(u({},e),{},{handle:r.handle},r.config)),t);case"UNREGISTER_APP":return delete t[r.handle],u({},t);default:return t}}},actions:{registerApp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{type:"REGISTER_APP",handle:e,config:t}},unregisterApp:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{type:"UNREGISTER_APP",handle:e}}}}};function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,c=[],a=!0,i=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(c.push(n.value),!t||c.length!==t);a=!0);}catch(e){i=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(i)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var b=function(e,t){return y(e)===y(t)&&("string"==typeof e||"number"==typeof e?e===t:JSON.stringify(e)===JSON.stringify(t))},g=function(e,t,r){return"boolean"==typeof e?e:"function"==typeof e?e(t,r):"string"==typeof e?!b(t[e],r[e]):!!Array.isArray(e)&&e.some((function(e){return!b(t[e],r[e])}))};function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var O={exports:{}};const h=(e,t)=>{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");return t=Object.assign({pascalCase:!1},t),0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length?"":1===e.length?t.pascalCase?e.toUpperCase():e.toLowerCase():(e!==e.toLowerCase()&&(e=(e=>{let t=!1,r=!1,n=!1;for(let o=0;o<e.length;o++){const c=e[o];t&&/[a-zA-Z]/.test(c)&&c.toUpperCase()===c?(e=e.slice(0,o)+"-"+e.slice(o),t=!1,n=r,r=!0,o++):r&&n&&/[a-zA-Z]/.test(c)&&c.toLowerCase()===c?(e=e.slice(0,o-1)+"-"+e.slice(o-1),n=r,r=!1,t=!0):(t=c.toLowerCase()===c&&c.toUpperCase()!==c,n=r,r=c.toUpperCase()===c&&c.toLowerCase()!==c)}return e})(e)),e=e.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,((e,t)=>t.toUpperCase())).replace(/\d+(\w|$)/g,(e=>e.toUpperCase())),r=e,t.pascalCase?r.charAt(0).toUpperCase()+r.slice(1):r);var r};O.exports=h,O.exports.default=h;var m=O.exports,j=function(e,t,r){return Object.entries(r).map((function(r){var n=p(r,1)[0];if(!t[n]){var o="SET_".concat(n.toUpperCase()),c=m("set_".concat(n));e[c]=function(e){return{type:o,value:e}}}})),e},w=function(e,t){return Object.keys(e).length||Object.keys(t).length?(Object.entries(t).map((function(t){var r=p(t,2),n=r[0],o=r[1];e[n]||(e[n]=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o,t=arguments.length>1?arguments[1]:void 0;return t.type==="SET_".concat(n.toUpperCase())?t.value:e})})),(0,o.combineReducers)(e)):function(e){return e}},P=function(e,t){var r="undefined"==typeof window?null:window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;return(r?r({name:e}):o.compose)((0,o.applyMiddleware)(S(t)))},S=function(e){var t=e.before,r=e.after;return function(e){return function(n){return function(o){t&&t[o.type]&&t[o.type](o,e);var c=n(o);return r&&r[o.type]&&r[o.type](o,e),c}}}},E=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var R=function(){var e={};return{registerStore:function(t,r){var n=r.state,c=void 0===n?{}:n,a=r.cache,i=void 0===a?[]:a,u=r.actions,l=void 0===u?{}:u,s=r.reducers,f=void 0===s?{}:s,y=r.selectors,b=void 0===y?{}:y,g=r.effects,v=void 0===g?{}:g;if(!t)throw new Error("Missing key required for registerStore.");if(e[t])throw new Error("A store with the key '".concat(t,"' already exists."));var O,h,S,E=function(e,t,r){if(r.length&&"undefined"!=typeof localStorage){var n=localStorage.getItem(e);if(n){var o=JSON.parse(n),c={};return r.map((function(e){o[e]&&(c[e]=o[e])})),d(d({},t),c)}}return t}(t,c,i);e[t]={actions:j(C({},l),f,E),store:(0,o.createStore)(w(C({},f),E),E,P(t,v))},e[t].selectors=function(e,t){var r={},n=t.getState();return Object.entries(n).map((function(t){var r=p(t,1)[0],n=m("get_".concat(r));e[n]||(e[n]=function(e){return e[r]})})),Object.entries(e).map((function(e){var n=p(e,2),o=n[0],c=n[1];r[o]=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return c.apply(void 0,[t.getState()].concat(r))}})),r}(C({},b),e[t].store),O=t,h=e[t].store,(S=i).length&&"undefined"!=typeof localStorage&&h.subscribe((function(){var e=h.getState(),t={};S.map((function(r){t[r]=e[r]})),localStorage.setItem(O,JSON.stringify(t))}))},useStore:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=e[t].store,c=o.getState(),a=(0,r.useRef)(c),i=(0,r.useState)(c),u=p(i,2),l=u[0],s=u[1];return(0,r.useEffect)((function(){return s(o.getState()),o.subscribe((function(){var e=o.getState();g(n,a.current,e)&&s(C({},e)),a.current=e}))}),[]),l},getStore:function(t){return e[t].store},getDispatch:function(t){var r=e[t],n=r.actions,o=r.store,c={};return Object.entries(n).map((function(e){var t=p(e,2),r=t[0],n=t[1];c[r]=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return new Promise((function(e){e(o.dispatch(n.apply(void 0,t)))}))}})),c},getSelectors:function(t){return e[t].selectors},getHooks:function(t){var n=e[t],c=n.actions,a=n.store;return function(e,t){var n=e.getState(),o={};return Object.keys(n).map((function(n){var c="use".concat(E(n));o[c]=function(){var o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],c=p((0,r.useState)(e.getState()[n]),2),a=c[0],i=c[1],u=(0,r.useRef)(e.getState()[n]);(0,r.useLayoutEffect)((function(){return i(e.getState()[n]),u.current=e.getState()[n],e.subscribe((function(){var t=e.getState();g(o,a,u.current)&&i(t[n]),u.current=t[n]}))}),[]);var l="set".concat(E(n)),s=t[l];return[a,s]}})),o}(a,(0,o.bindActionCreators)(c,a.dispatch))}}};function _(){return(_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function D(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},c=Object.keys(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(n=0;n<c.length;n++)r=c[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e,t){return!t||"object"!==y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var U=["error","title","children","style"];function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function M(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var B={},N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(a,r.Component);var t,n,o,c=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=T(e);if(t){var o=T(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return L(this,r)}}(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=c.call(this,e)).state={hasError:!1,error:null},t}return t=a,o=[{key:"getDerivedStateFromError",value:function(e){return{hasError:!0,error:e}}}],(n=[{key:"render",value:function(){var e=this.props,t=e.alternate,n=void 0===t?F:t,o=e.children,c=this.state,a=c.hasError,i=c.error;return a?(0,r.createElement)(n,{error:i}):o}}])&&x(t.prototype,n),o&&x(t,o),a}(),F=function(e){var t=e.error,r=e.title,o=void 0===r?"There seems to be an error":r,c=e.children,a=e.style,i=void 0===a?{}:a,u=D(e,U),l=M(M({},i),{},{display:"flex",flexDirection:"column",flex:"1 1 auto",justifyContent:"center",alignItems:"center",padding:40,textAlign:"center",minHeight:0,maxHeight:"100%"});return n().createElement("div",_({style:l},u),n().createElement("h1",{style:{marginBottom:20}},o),n().createElement("code",{style:{padding:10}},t.message),c)};B.Boundary=N,B.Page=F;var H=function(e){var t=e.children,r=e.error,o=e.router,a=void 0===o?c.MemoryRouter:o,i=e.routerProps,u=void 0===i?{}:i;return n().createElement(B.Boundary,{alternate:r},n().createElement(a,u,t))},G={handle:null,label:null,isAppRoot:!1},J=(0,r.createContext)(G),z=function(){return(0,r.useContext)(J)},$=["root"];function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var q=function(e){return n().createElement(B.Page,_({title:"App Core: There seems to be an issue rendering current app."},e))},V=function(){return console.log("default loading screen"),n().createElement("h1",{style:{margin:"auto"}},"Loading...")},Y=function(e){var t=e.loading,o=e.error,a=void 0===o?W:o,i=e.apps,u=(0,c.useHistory)(),l=(0,c.useLocation)(),s=(0,c.useParams)().app;if((0,r.useEffect)((function(){if(i[s]&&"function"==typeof i[s].onMount)return i[s].onMount()}),[s]),!i[s])return u.go(-u.length),u.replace("/",{}),null;var f=i[s],p=f.label,y=void 0===p?"":p,b=f.root,g=f.lazyLoad,v=2>=l.pathname.split("/").length,d=Z(Z({},G),{},{handle:s,baseURL:"/".concat(s),label:y,isAppRoot:v}),O=function(){return void 0===g||g};return n().createElement(J.Provider,{value:d},n().createElement(B.Boundary,{alternate:a},O()&&n().createElement(r.Suspense,{fallback:n().createElement(t,null)},n().createElement(Q,_({root:b},d))),!O()&&n().createElement(Q,_({root:b},d))))},K=function(){return n().createElement(ee,null,n().createElement("h1",null,"App Not Found"))},Q=(0,r.memo)((function(e){var t=e.root,r=D(e,$);return t?n().createElement(t,r):n().createElement(K,null)})),W=function(e){var t=z().label;return n().createElement(B.Page,_({title:"There seems to be an issue with the ".concat(t," app.")},e))},ee=function(e){var t=e.children;return n().createElement("div",{style:{flex:"1 1 auto",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},t)},te={};te.use=z,te.Content=function(e){var t=e.apps,r=void 0===t?{}:t,o=e.defaultApp,a=void 0===o?"home":o,i=e.loading,u=void 0===i?V:i;return Object.keys(r).length?n().createElement(B.Boundary,{alternate:q},n().createElement(c.Switch,null,a&&n().createElement(c.Route,{exact:!0,path:"/"},n().createElement(c.Redirect,{to:"/".concat(a)})),n().createElement(c.Route,{path:"/:app",render:function(){return n().createElement(Y,{loading:u,apps:r})}}))):(console.warn("App Core: You have no apps."),null)},window.FL=window.FL||{},FL.vendors=FL.vendors||{},FL.vendors.BBAppCore=t})();
|
js/build/wp-editor.bundle.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{var e={585:()=>{var e=wp.data.registerStore,t={launching:!1};e("fl-builder",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,n=arguments.length>1?arguments[1]:void 0;if("SET_LAUNCHING"===n.type)e.launching=n.launching;return e},actions:{setLaunching:function(e){return{type:"SET_LAUNCHING",launching:e}}},selectors:{isLaunching:function(e){return e.launching}}})}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=window||{},i=r.wp,c=void 0===i?{}:i,u=c.data,l=void 0===u?{}:u,a=c.blocks,s=void 0===a?{}:a,f=l.dispatch,p=l.select,d=s.createBlock,y=f("core/block-editor"),b=y.replaceBlock,h=function(e){var t=e.name,n=void 0===t?"":t,o=e.attributes,r=void 0===o?{}:o,i=e.innerBlocks;return d(n,r,void 0===i?[]:i)},v=null!==n&&"object"===e(n)&&null!==n.clientId&&"string"==typeof n.clientId;if(!0!==v)return!1;var m=p("core/block-editor").getBlock(n.clientId);if(!0!=!m){var k=m.clientId,g=void 0===k?"":k,w=m.isValid,B=void 0===w||w,P=m.innerBlocks,O=void 0===P?[]:P,j=null!==O&&Array.isArray(O)&&O.length>=1;if(!0!==B){var S=h(m);b(g,S),!0===o&&c.data.dispatch("core/editor").savePost()}j&&O.forEach((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(e,o)}))}return!1},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=window||{},o=n.wp,r=void 0===o?{}:o,i=r.domReady,c=r.data,u=void 0===c?{}:c,l=u.select;i((function(){setTimeout((function(){var n=l("core/block-editor").getBlocks();!0===(Array.isArray(n)&&n.length>=1)&&n.forEach((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(n,e)}))}),1)}))};var r=(window||{}).wp,i=void 0===r?{}:r,c=i.domReady,u=i.data;jQuery(document).on("fl-builder-fix-blocks",(function(){!0===(!0===(!0===jQuery("body").hasClass("post-php")&&jQuery(".block-editor").length>=1&&jQuery("body").hasClass("fl-builder-blocks"))&&!0===(void 0!==c&&void 0!==u))&&o(!1)}));n(585);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var r=y(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var b=FLBuilderConfig,h=b.builder,v=b.strings,m=b.urls,k=wp.blocks,g=k.rawHandler,w=k.serialize,B=wp.components,P=B.Button,O=B.Placeholder,j=B.Spinner,S=wp.compose.compose,R=wp.data,C=R.withDispatch,L=R.withSelect,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&f(e,t)}(i,e);var t,n,o,r=p(i);function i(){return a(this,i),r.apply(this,arguments)}return t=i,n=[{key:"componentDidMount",value:function(){1===this.props.blockCount&&this.toggleEditor("disable")}},{key:"componentWillUnmount",value:function(){this.toggleEditor("enable")}},{key:"render",value:function(){var e,t,n,o=this.props,r=o.blockCount,i=(o.onReplace,o.isLaunching);return 1===r?(e=h.access?v.launch:v.view,t=this.launchBuilder.bind(this)):(e=v.convert,t=this.convertToBuilder.bind(this)),n=h.enabled?v.active:v.description,!1===h.showui?"":React.createElement(O,{key:"placeholder",instructions:n,label:v.title,className:"fl-builder-layout-launch-view"},i&&React.createElement(j,null),!i&&React.createElement(P,{isLarge:!0,isPrimary:!0,type:"submit",onClick:t},e),!i&&React.createElement(P,{isLarge:!0,type:"submit",onClick:this.convertToBlocks.bind(this)},v.editor))}},{key:"toggleEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"enable",t=document.body.classList,n="fl-builder-layout-enabled";"enable"===e?t.contains(n)&&t.remove(n):t.contains(n)||t.add(n)}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t().then((function(){setTimeout((function(){window.location.href=h.access?m.edit:m.view}),2e3)}))}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.clientId,n=e.blocks,o=e.setAttributes,r=e.removeBlocks,i=w(n),c=n.map((function(e){return e.clientId})).filter((function(e){return e!==t}));o({content:i.replace(/<!--(.*?)-->/g,"")}),r(c),this.launchBuilder()}},{key:"convertToBlocks",value:function(){var e=this.props,t=e.attributes,n=e.clientId,o=e.replaceBlocks,r=e.onReplace;t.content&&!confirm(v.warning)||(t.content?o([n],g({HTML:t.content,mode:"BLOCKS"})):r([]))}}],n&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),T=S(C((function(e,t){var n=e("core/block-editor"),o=e("core/editor"),r=e("fl-builder");return{removeBlocks:n.removeBlocks,replaceBlocks:n.replaceBlocks,savePost:o.savePost,setLaunching:r.setLaunching}})),L((function(e){var t=e("core/block-editor"),n=(e("core/editor"),e("fl-builder"));return{blockCount:t.getBlockCount(),blocks:t.getBlocks(),isLaunching:n.isLaunching()}})))(E);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function D(e,t){return D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},D(e,t)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=A(e);if(t){var r=A(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var H=FLBuilderConfig,Q=H.builder,U=H.strings,G=H.urls,z=wp.blocks,K=z.rawHandler,W=z.serialize,V=wp.components,q=V.Button,J=V.Placeholder,X=V.Spinner,Y=wp.compose.compose,Z=wp.data,$=Z.subscribe,ee=Z.withDispatch,te=Z.withSelect,ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&D(e,t)}(i,e);var t,n,o,r=F(i);function i(){var e;return I(this,i),(e=r.apply(this,arguments)).unsubscribe=$(e.storeDidUpdate.bind(N(e))),e}return t=i,n=[{key:"storeDidUpdate",value:function(){var e=this.props,t=e.isLaunching,n=e.isSavingPost;t&&!n&&(this.unsubscribe(),this.redirectToBuilder())}},{key:"componentDidMount",value:function(){1===this.props.blockCount&&this.toggleEditor("disable")}},{key:"componentWillUnmount",value:function(){this.unsubscribe(),this.toggleEditor("enable")}},{key:"render",value:function(){var e,t,n,o=this.props,r=o.blockCount,i=(o.onReplace,o.isLaunching);return 1===r?(e=Q.access?U.launch:U.view,t=this.launchBuilder.bind(this)):(e=U.convert,t=this.convertToBuilder.bind(this)),n=Q.enabled?U.active:U.description,!1===Q.showui?"":React.createElement(J,{key:"placeholder",instructions:n,icon:"welcome-widgets-menus",label:U.title,className:"fl-builder-layout-launch-view"},i&&React.createElement(X,null),!i&&React.createElement(q,{isLarge:!0,isPrimary:!0,type:"submit",onClick:t},e),!i&&React.createElement(q,{isLarge:!0,type:"submit",onClick:this.convertToBlocks.bind(this)},U.editor))}},{key:"toggleEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"enable",t=document.body.classList,n="fl-builder-layout-enabled";"enable"===e?t.contains(n)&&t.remove(n):t.contains(n)||t.add(n)}},{key:"redirectToBuilder",value:function(){window.location.href=Q.access?G.edit:G.view}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t()}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.clientId,n=e.blocks,o=e.setAttributes,r=e.removeBlocks,i=W(n),c=n.map((function(e){return e.clientId})).filter((function(e){return e!==t}));o({content:i.replace(/<!--(.*?)-->/g,"")}),r(c),this.launchBuilder()}},{key:"convertToBlocks",value:function(){var e=this.props,t=e.attributes,n=e.clientId,o=e.replaceBlocks,r=e.onReplace;t.content&&!confirm(U.warning)||(t.content?o([n],K({HTML:t.content,mode:"BLOCKS"})):r([]))}}],n&&x(t.prototype,n),o&&x(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),oe=Y(ee((function(e,t){var n=e("core/editor"),o=e("fl-builder");return{savePost:n.savePost,removeBlocks:n.removeBlocks,replaceBlocks:n.replaceBlocks,setLaunching:o.setLaunching}})),te((function(e){var t=e("core/editor"),n=e("fl-builder");return{blockCount:t.getBlockCount(),blocks:t.getBlocks(),isSavingPost:t.isSavingPost(),isLaunching:n.isLaunching()}})))(ne),re=FLBuilderConfig,ie=re.builder,ce=re.strings,ue=FLBuilderConfig.wp.version,le=wp.blocks.registerBlockType,ae=wp.element.RawHTML;function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function de(e,t){return de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},de(e,t)}function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=he(e);if(t){var r=he(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return be(this,n)}}function be(e,t){if(t&&("object"===se(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}(ie.access&&ie.unrestricted||ie.enabled)&&le("fl-builder/layout",{title:ce.title,description:ce.description,icon:"welcome-widgets-menus",category:"layout",useOnce:!0,supports:{customClassName:!1,className:!1,html:!1},attributes:{content:{type:"string",source:"html"}},edit:parseFloat(ue)<5.3?oe:T,save:function(e){var t=e.attributes;return React.createElement(ae,null,t.content)}});var ve=FLBuilderConfig,me=ve.builder,ke=ve.strings,ge=ve.urls,we=wp.blocks,Be=we.createBlock,Pe=we.serialize,Oe=(wp.components.Button,wp.compose.compose),je=wp.data,Se=je.withDispatch,Re=je.withSelect,Ce=wp.editPost.PluginMoreMenuItem,Le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&de(e,t)}(i,e);var t,n,o,r=ye(i);function i(){return fe(this,i),r.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return this.hasBuilderBlock()&&(jQuery("body").addClass("fl-builder-blocks"),jQuery(document).trigger("fl-builder-fix-blocks")),React.createElement(Ce,{onClick:this.menuItemClicked.bind(this)},this.hasBuilderBlock()?ke.launch:ke.convert)}},{key:"hasBuilderBlock",value:function(){return!!this.props.blocks.filter((function(e){return"fl-builder/layout"===e.name})).length}},{key:"menuItemClicked",value:function(){this.hasBuilderBlock()?this.launchBuilder():this.convertToBuilder()}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.blocks,n=e.insertBlock,o=e.removeBlocks,r=t.map((function(e){return e.clientId})),i=Pe(t).replace(/<!--(.*?)-->/g,"");n(Be("fl-builder/layout",{content:i}),0),o(r)}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t().then((function(){setTimeout((function(){window.location.href=me.access?ge.edit:ge.view}),2e3)}))}}])&&pe(t.prototype,n),o&&pe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),Ee=Oe(Se((function(e,t){var n=e("core/block-editor"),o=e("core/editor"),r=e("fl-builder");return{insertBlock:n.insertBlock,removeBlocks:n.removeBlocks,savePost:o.savePost,setLaunching:r.setLaunching}})),Re((function(e){return{blocks:e("core/block-editor").getBlocks()}})))(Le);function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function xe(e,t){return xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xe(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Me(e);if(t){var r=Me(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){if(t&&("object"===Te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}var Ne=FLBuilderConfig.strings,Ae=wp.blocks,He=Ae.createBlock,Qe=Ae.serialize,Ue=(wp.components.Button,wp.compose.compose),Ge=wp.data,ze=Ge.withDispatch,Ke=Ge.withSelect,We=wp.editPost.PluginSidebarMoreMenuItem,Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");Object.defineProperty(e,"prototype",{value:Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),writable:!1}),t&&xe(e,t)}(i,e);var t,n,o,r=De(i);function i(){return _e(this,i),r.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return React.createElement(We,null,React.createElement("div",{className:"fl-builder-plugin-sidebar-button",onClick:this.menuItemClicked.bind(this)}),this.hasBuilderBlock()?Ne.launch:Ne.convert)}},{key:"hasBuilderBlock",value:function(){return!!this.props.blocks.filter((function(e){return"fl-builder/layout"===e.name})).length}},{key:"menuItemClicked",value:function(){var e=this.props.closeGeneralSidebar;this.hasBuilderBlock()?this.launchBuilder():this.convertToBuilder(),setTimeout(e,100)}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.blocks,n=e.insertBlock,o=e.removeBlocks,r=t.map((function(e){return e.clientId})),i=Qe(t).replace(/<!--(.*?)-->/g,"");n(He("fl-builder/layout",{content:i}),0),o(r)}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t()}}])&&Ie(t.prototype,n),o&&Ie(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),qe=Ue(ze((function(e,t){var n=e("core/editor"),o=e("core/edit-post"),r=e("fl-builder");return{savePost:n.savePost,insertBlock:n.insertBlock,removeBlocks:n.removeBlocks,closeGeneralSidebar:o.closeGeneralSidebar,setLaunching:r.setLaunching}})),Ke((function(e){return{blocks:e("core/editor").getBlocks()}})))(Ve),Je=FLBuilderConfig.wp.version;(0,wp.plugins.registerPlugin)("fl-builder-plugin-sidebar",{icon:"welcome-widgets-menus",render:parseFloat(Je)<5.3?qe:Ee})})()})();
|
1 |
+
(()=>{var e={585:()=>{var e=wp.data.registerStore,t={launching:!1};e("fl-builder",{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,n=arguments.length>1?arguments[1]:void 0;if("SET_LAUNCHING"===n.type)e.launching=n.launching;return e},actions:{setLaunching:function(e){return{type:"SET_LAUNCHING",launching:e}}},selectors:{isLaunching:function(e){return e.launching}}})}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}var t=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=window||{},i=r.wp,c=void 0===i?{}:i,u=c.data,l=void 0===u?{}:u,s=c.blocks,a=void 0===s?{}:s,f=l.dispatch,p=l.select,d=a.createBlock,y=f("core/block-editor"),b=y.replaceBlock,h=function(e){var t=e.name,n=void 0===t?"":t,o=e.attributes,r=void 0===o?{}:o,i=e.innerBlocks;return d(n,r,void 0===i?[]:i)},v=null!==n&&"object"===e(n)&&null!==n.clientId&&"string"==typeof n.clientId;if(!0!==v)return!1;var m=p("core/block-editor").getBlock(n.clientId);if(!0!=!m){var k=m.clientId,g=void 0===k?"":k,w=m.isValid,B=void 0===w||w,P=m.innerBlocks,O=void 0===P?[]:P,j=null!==O&&Array.isArray(O)&&O.length>=1;if(!0!==B){var S=h(m);b(g,S),!0===o&&c.data.dispatch("core/editor").savePost()}j&&O.forEach((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(e,o)}))}return!1},o=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=window||{},o=n.wp,r=void 0===o?{}:o,i=r.domReady,c=r.data,u=void 0===c?{}:c,l=u.select;i((function(){setTimeout((function(){var n=l("core/block-editor").getBlocks();!0===(Array.isArray(n)&&n.length>=1)&&n.forEach((function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(n,e)}))}),1)}))};var r=(window||{}).wp,i=void 0===r?{}:r,c=i.domReady,u=i.data;jQuery(document).on("fl-builder-fix-blocks",(function(){!0===(!0===(!0===jQuery("body").hasClass("post-php")&&jQuery(".block-editor").length>=1&&jQuery("body").hasClass("fl-builder-blocks"))&&!0===(void 0!==c&&void 0!==u))&&o(!1)}));n(585);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var r=y(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return d(this,n)}}function d(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var b=FLBuilderConfig,h=b.builder,v=b.strings,m=b.urls,k=wp.blocks,g=k.rawHandler,w=k.serialize,B=wp.components,P=B.Button,O=B.Placeholder,j=B.Spinner,S=wp.compose.compose,R=wp.data,C=R.withDispatch,L=R.withSelect,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(i,e);var t,n,o,r=p(i);function i(){return s(this,i),r.apply(this,arguments)}return t=i,n=[{key:"componentDidMount",value:function(){1===this.props.blockCount&&this.toggleEditor("disable")}},{key:"componentWillUnmount",value:function(){this.toggleEditor("enable")}},{key:"render",value:function(){var e,t,n,o=this.props,r=o.blockCount,i=(o.onReplace,o.isLaunching);return 1===r?(e=h.access?v.launch:v.view,t=this.launchBuilder.bind(this)):(e=v.convert,t=this.convertToBuilder.bind(this)),n=h.enabled?v.active:v.description,!1===h.showui?"":React.createElement(O,{key:"placeholder",instructions:n,label:v.title,className:"fl-builder-layout-launch-view"},i&&React.createElement(j,null),!i&&React.createElement(P,{isLarge:!0,isPrimary:!0,type:"submit",onClick:t},e),!i&&React.createElement(P,{isLarge:!0,type:"submit",onClick:this.convertToBlocks.bind(this)},v.editor))}},{key:"toggleEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"enable",t=document.body.classList,n="fl-builder-layout-enabled";"enable"===e?t.contains(n)&&t.remove(n):t.contains(n)||t.add(n)}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t().then((function(){setTimeout((function(){window.location.href=h.access?m.edit:m.view}),2e3)}))}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.clientId,n=e.blocks,o=e.setAttributes,r=e.removeBlocks,i=w(n),c=n.map((function(e){return e.clientId})).filter((function(e){return e!==t}));o({content:i.replace(/<!--(.*?)-->/g,"")}),r(c),this.launchBuilder()}},{key:"convertToBlocks",value:function(){var e=this.props,t=e.attributes,n=e.clientId,o=e.replaceBlocks,r=e.onReplace;t.content&&!confirm(v.warning)||(t.content?o([n],g({HTML:t.content,mode:"BLOCKS"})):r([]))}}],n&&a(t.prototype,n),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),T=S(C((function(e,t){var n=e("core/block-editor"),o=e("core/editor"),r=e("fl-builder");return{removeBlocks:n.removeBlocks,replaceBlocks:n.replaceBlocks,savePost:o.savePost,setLaunching:r.setLaunching}})),L((function(e){var t=e("core/block-editor"),n=(e("core/editor"),e("fl-builder"));return{blockCount:t.getBlockCount(),blocks:t.getBlocks(),isLaunching:n.isLaunching()}})))(E);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function D(e,t){return D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},D(e,t)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=A(e);if(t){var r=A(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&("object"===_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}var H=FLBuilderConfig,Q=H.builder,U=H.strings,G=H.urls,z=wp.blocks,K=z.rawHandler,W=z.serialize,V=wp.components,q=V.Button,J=V.Placeholder,X=V.Spinner,Y=wp.compose.compose,Z=wp.data,$=Z.subscribe,ee=Z.withDispatch,te=Z.withSelect,ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(i,e);var t,n,o,r=F(i);function i(){var e;return I(this,i),(e=r.apply(this,arguments)).unsubscribe=$(e.storeDidUpdate.bind(N(e))),e}return t=i,n=[{key:"storeDidUpdate",value:function(){var e=this.props,t=e.isLaunching,n=e.isSavingPost;t&&!n&&(this.unsubscribe(),this.redirectToBuilder())}},{key:"componentDidMount",value:function(){1===this.props.blockCount&&this.toggleEditor("disable")}},{key:"componentWillUnmount",value:function(){this.unsubscribe(),this.toggleEditor("enable")}},{key:"render",value:function(){var e,t,n,o=this.props,r=o.blockCount,i=(o.onReplace,o.isLaunching);return 1===r?(e=Q.access?U.launch:U.view,t=this.launchBuilder.bind(this)):(e=U.convert,t=this.convertToBuilder.bind(this)),n=Q.enabled?U.active:U.description,!1===Q.showui?"":React.createElement(J,{key:"placeholder",instructions:n,icon:"welcome-widgets-menus",label:U.title,className:"fl-builder-layout-launch-view"},i&&React.createElement(X,null),!i&&React.createElement(q,{isLarge:!0,isPrimary:!0,type:"submit",onClick:t},e),!i&&React.createElement(q,{isLarge:!0,type:"submit",onClick:this.convertToBlocks.bind(this)},U.editor))}},{key:"toggleEditor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"enable",t=document.body.classList,n="fl-builder-layout-enabled";"enable"===e?t.contains(n)&&t.remove(n):t.contains(n)||t.add(n)}},{key:"redirectToBuilder",value:function(){window.location.href=Q.access?G.edit:G.view}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t()}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.clientId,n=e.blocks,o=e.setAttributes,r=e.removeBlocks,i=W(n),c=n.map((function(e){return e.clientId})).filter((function(e){return e!==t}));o({content:i.replace(/<!--(.*?)-->/g,"")}),r(c),this.launchBuilder()}},{key:"convertToBlocks",value:function(){var e=this.props,t=e.attributes,n=e.clientId,o=e.replaceBlocks,r=e.onReplace;t.content&&!confirm(U.warning)||(t.content?o([n],K({HTML:t.content,mode:"BLOCKS"})):r([]))}}],n&&x(t.prototype,n),o&&x(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),oe=Y(ee((function(e,t){var n=e("core/editor"),o=e("fl-builder");return{savePost:n.savePost,removeBlocks:n.removeBlocks,replaceBlocks:n.replaceBlocks,setLaunching:o.setLaunching}})),te((function(e){var t=e("core/editor"),n=e("fl-builder");return{blockCount:t.getBlockCount(),blocks:t.getBlocks(),isSavingPost:t.isSavingPost(),isLaunching:n.isLaunching()}})))(ne),re=FLBuilderConfig,ie=re.builder,ce=re.strings,ue=FLBuilderConfig.wp.version,le=wp.blocks.registerBlockType,se=wp.element.RawHTML;function ae(e){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ae(e)}function fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function de(e,t){return de=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},de(e,t)}function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=he(e);if(t){var r=he(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return be(this,n)}}function be(e,t){if(t&&("object"===ae(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function he(e){return he=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},he(e)}(ie.access&&ie.unrestricted||ie.enabled)&&le("fl-builder/layout",{title:ce.title,description:ce.description,icon:"welcome-widgets-menus",category:"layout",useOnce:!0,supports:{customClassName:!1,className:!1,html:!1},attributes:{content:{type:"string",source:"html"}},edit:parseFloat(ue)<5.3?oe:T,save:function(e){var t=e.attributes;return React.createElement(se,null,t.content)}});var ve=FLBuilderConfig,me=ve.builder,ke=ve.strings,ge=ve.urls,we=wp.blocks,Be=we.createBlock,Pe=we.serialize,Oe=(wp.components.Button,wp.compose.compose),je=wp.data,Se=je.withDispatch,Re=je.withSelect,Ce=wp.editPost.PluginMoreMenuItem,Le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&de(e,t)}(i,e);var t,n,o,r=ye(i);function i(){return fe(this,i),r.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return this.hasBuilderBlock()&&(jQuery("body").addClass("fl-builder-blocks"),jQuery(document).trigger("fl-builder-fix-blocks")),React.createElement(Ce,{onClick:this.menuItemClicked.bind(this)},this.hasBuilderBlock()?ke.launch:ke.convert)}},{key:"hasBuilderBlock",value:function(){return!!this.props.blocks.filter((function(e){return"fl-builder/layout"===e.name})).length}},{key:"menuItemClicked",value:function(){this.hasBuilderBlock()?this.launchBuilder():this.convertToBuilder()}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.blocks,n=e.insertBlock,o=e.removeBlocks,r=t.map((function(e){return e.clientId})),i=Pe(t).replace(/<!--(.*?)-->/g,"");n(Be("fl-builder/layout",{content:i}),0),o(r)}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t().then((function(){setTimeout((function(){window.location.href=me.access?ge.edit:ge.view}),2e3)}))}}])&&pe(t.prototype,n),o&&pe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),Ee=Oe(Se((function(e,t){var n=e("core/block-editor"),o=e("core/editor"),r=e("fl-builder");return{insertBlock:n.insertBlock,removeBlocks:n.removeBlocks,savePost:o.savePost,setLaunching:r.setLaunching}})),Re((function(e){return{blocks:e("core/block-editor").getBlocks()}})))(Le);function Te(e){return Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Te(e)}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ie(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function xe(e,t){return xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},xe(e,t)}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Me(e);if(t){var r=Me(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Fe(this,n)}}function Fe(e,t){if(t&&("object"===Te(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}var Ne=FLBuilderConfig.strings,Ae=wp.blocks,He=Ae.createBlock,Qe=Ae.serialize,Ue=(wp.components.Button,wp.compose.compose),Ge=wp.data,ze=Ge.withDispatch,Ke=Ge.withSelect,We=wp.editPost.PluginSidebarMoreMenuItem,Ve=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xe(e,t)}(i,e);var t,n,o,r=De(i);function i(){return _e(this,i),r.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){return React.createElement(We,null,React.createElement("div",{className:"fl-builder-plugin-sidebar-button",onClick:this.menuItemClicked.bind(this)}),this.hasBuilderBlock()?Ne.launch:Ne.convert)}},{key:"hasBuilderBlock",value:function(){return!!this.props.blocks.filter((function(e){return"fl-builder/layout"===e.name})).length}},{key:"menuItemClicked",value:function(){var e=this.props.closeGeneralSidebar;this.hasBuilderBlock()?this.launchBuilder():this.convertToBuilder(),setTimeout(e,100)}},{key:"convertToBuilder",value:function(){var e=this.props,t=e.blocks,n=e.insertBlock,o=e.removeBlocks,r=t.map((function(e){return e.clientId})),i=Qe(t).replace(/<!--(.*?)-->/g,"");n(He("fl-builder/layout",{content:i}),0),o(r)}},{key:"launchBuilder",value:function(){var e=this.props,t=e.savePost;(0,e.setLaunching)(!0),t()}}])&&Ie(t.prototype,n),o&&Ie(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(wp.element.Component),qe=Ue(ze((function(e,t){var n=e("core/editor"),o=e("core/edit-post"),r=e("fl-builder");return{savePost:n.savePost,insertBlock:n.insertBlock,removeBlocks:n.removeBlocks,closeGeneralSidebar:o.closeGeneralSidebar,setLaunching:r.setLaunching}})),Ke((function(e){return{blocks:e("core/editor").getBlocks()}})))(Ve),Je=FLBuilderConfig.wp.version;(0,wp.plugins.registerPlugin)("fl-builder-plugin-sidebar",{icon:"welcome-widgets-menus",render:parseFloat(Je)<5.3?qe:Ee})})()})();
|
js/fl-builder-ui.js
CHANGED
@@ -521,14 +521,15 @@
|
|
521 |
*/
|
522 |
onPublishCacheClear: function() {
|
523 |
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
url: FLBuilderConfig.url + ''
|
529 |
});
|
530 |
},
|
531 |
|
|
|
|
|
532 |
/**
|
533 |
* Hides the entire UI.
|
534 |
* @return void
|
521 |
*/
|
522 |
onPublishCacheClear: function() {
|
523 |
|
524 |
+
FLBuilder.ajax({
|
525 |
+
action: 'clear_cache_for_layout',
|
526 |
+
}, function(response) {
|
527 |
+
console.log(response);
|
|
|
528 |
});
|
529 |
},
|
530 |
|
531 |
+
|
532 |
+
|
533 |
/**
|
534 |
* Hides the entire UI.
|
535 |
* @return void
|
js/fl-builder.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var FLBuilderColorPicker;!function(u){var i=[],t=navigator.userAgent.toLowerCase(),l="Microsoft Internet Explorer"===navigator.appName,o=l?parseFloat(t.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,n=l&&o<10,s=!1,r=["-moz-","-webkit-","-o-","-ms-"];function a(e,t){return e="top"===e?"top":"left",t=Array.isArray(t)?t:Array.prototype.slice.call(arguments,1),"webkit"===s?(o=[],i="top"===(i=e)?"0% 0%,0% 100%,":"0% 100%,100% 100%,",l=d(l=t),u.each(l,function(e,t){o.push("color-stop("+parseFloat(t.stop)/100+", "+t.color+")")}),"-webkit-gradient(linear,"+i+o.join(",")+")"):r[s]+"linear-gradient("+e+", "+t.join(", ")+")";var i,l,o}function d(e){var n=[],s=[],t=[],i=e.length-1;return u.each(e,function(e,t){var i=t,l=!1,o=t.match(/1?[0-9]{1,2}%$/);o&&(i=t.replace(/\s?1?[0-9]{1,2}%$/,""),l=o.shift()),n.push(i),s.push(l)}),!1===s[0]&&(s[0]="0%"),!1===s[i]&&(s[i]="100%"),s=function e(t){var i,l,o,n,s=0,r=t.length-1,a=0,d=!1;if(t.length<=2||u.inArray(!1,t)<0)return t;for(;a<t.length-1;)d||!1!==t[a]?d&&!1!==t[a]&&(r=a,a=t.length):(s=a-1,d=!0),a++;l=r-s;n=parseInt(t[s].replace("%"),10);i=(parseFloat(t[r].replace("%"))-n)/l;a=s+1;o=1;for(;a<r;)t[a]=n+o*i+"%",o++,a++;return e(t)}(s),u.each(s,function(e){t[e]={color:n[e],stop:s[e]}}),t}flBuilderParseColorValue=function(e){var t=e.replace(/\s+/g,""),e=-1!==t.indexOf("rgba")?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100;return{value:t,alpha:e,rgba:e<100}},u.fn.flBuilderColorPickerGradient=function(){var e=arguments;return this.each(function(){n?function(e,l){var o,t,n,s,r;e="top"===e?"top":"left",l=Array.isArray(l)?l:Array.prototype.slice.call(arguments,1),o="top"===e?0:1,t=u(this),n=l.length-1,s='<div class="iris-ie-gradient-shim" style="position:absolute;'+(1==o?"height":"width")+":100%;"+(1==o?"left":"top")+":%start%;"+(1==o?"right":"bottom")+':%end%;filter:%filter%;" data-color:"%color%"></div>',r="","static"===t.css("position")&&t.css({position:"relative"}),l=d(l),u.each(l,function(e,t){var i;return e!==n&&(i=l[e+1],void(t.stop!==i.stop&&(e=100-parseFloat(i.stop)+"%",t.octoHex=new FLBuilderColor(t.color).toIEOctoHex(),i.octoHex=new FLBuilderColor(i.color).toIEOctoHex(),i="progid:DXImageTransform.Microsoft.Gradient(GradientType="+o+", StartColorStr='"+t.octoHex+"', EndColorStr='"+i.octoHex+"')",r+=s.replace("%start%",t.stop).replace("%end%",e).replace("%filter%",i))))}),t.find(".iris-ie-gradient-shim").remove(),u(r).prependTo(t)}.apply(this,e):u(this).css("backgroundImage",a.apply(this,e))})},u.fn.flBuilderColorPickerRaninbowGradient=function(e,t){var i,l,o;for(e=e||"top",i="hsl(%h%,"+(t=u.extend({},{s:100,l:50},t)).s+"%,"+t.l+"%)",l=0,o=[];l<=360;)o.push(i.replace("%h%",l)),l+=30;return this.each(function(){u(this).flBuilderColorPickerGradient(e,o)})},(FLBuilderColorPicker=function(e){this._html='<div class="fl-color-picker-ui"><div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="javascript:void(0);"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div></div>';this.options=u.extend({},{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!"}},e),(!1==n||!0==n&&7<o)&&this._init()}).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 e=this;u(e.options.elements);u("html").hasClass("fl-color-picker-init")?this._prepareColorFields():(this._color=new FLBuilderColor("#ff0000").setHSpace(e.options.mode),i=this.options.presets,!1===s&&function(){var i,l="backgroundImage";n?s="filter":(i=u('<div id="iris-gradtest" />'),u.each(r,function(e,t){if(i.css(l,t+"linear-gradient(top,#fff,#000)"),i.css(l).match("gradient"))return s=e,!1}),!1===s&&(i.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),i.css(this.bgImageString).match("gradient")&&(s="webkit")),i.remove())}(),e.picker=u(this._html).appendTo("body"),l?9===o?e.picker.addClass("iris-ie-9"):o<=8&&e.picker.addClass("iris-ie-lt9"):t.indexOf("compatible")<0&&t.indexOf("khtml")<0&&t.match(/mozilla/)&&e.picker.addClass("iris-mozilla"),e.controls={square:e.picker.find(".iris-square"),squareDrag:e.picker.find(".iris-square-value"),horiz:e.picker.find(".iris-square-horiz"),vert:e.picker.find(".iris-square-vert"),strip:e.picker.find(".iris-strip"),stripSlider:e.picker.find(".iris-strip .iris-slider-offset")},"hsv"===e.options.mode&&e._has("l",e.options.controls)?e.options.controls=e._defaultHSVControls:"hsl"===e.options.mode&&e._has("v",e.options.controls)&&(e.options.controls=e._defaultHSLControls),e.hue=e._color.h(),this._setTemplates(),this._ui=u(".fl-color-picker-ui"),this._iris=u(".iris-picker"),this._wrapper=u("body"),this._ui.prepend(this._hexHtml).append(this._presetsHtml),e.element=this._ui.find(".fl-color-picker-input"),e._initControls(),e.active="external",e._change(),e._addInputListeners(e.element),this._buildUI(),this._prepareColorFields(),this._pickerControls(),this._presetsControls(),this._buildAlphaUI(),u("html").addClass("fl-color-picker-init"))},_prepareColorFields:function(){var n=this;u(".fl-color-picker-value").each(function(){var e=u(this),t=e.val(),i=e.parent().find(".fl-color-picker-color"),l=flBuilderParseColorValue(t),o="";t&&(i.hasClass("fl-color-picker-alpha-enabled")&&l.rgba?o=e.val().toString():!i.hasClass("fl-color-picker-alpha-enabled")&&l.rgba?(t=(t=t.replace("rgba","rgb")).substr(0,t.lastIndexOf(","))+")",n._color._alpha=1,o=t,e.val(t)):o="#"+e.val().toString(),i.css({backgroundColor:o}))})},_setTemplates:function(){this._alphaHtml='<div class="fl-alpha-wrap"><div class="fl-alpha-slider"></div><div class="fl-alpha-slider-offset"></div><div class="fl-alpha-text"></div></div>',this._presetsHtml='<div class="fl-color-picker-presets"><div class="fl-color-picker-presets-toggle"><div class="fl-color-picker-presets-open-label fl-color-picker-active">'+this.options.labels.colorPresets+' <span class="fl-color-picker-icon-arrow-up"></span></div><div class="fl-color-picker-presets-close-label">'+this.options.labels.colorPicker+' <span class="fl-color-picker-icon-arrow-down"></span></div></div><ul class="fl-color-picker-presets-list"></ul></div>',this._hexHtml='<input type="text" class="fl-color-picker-input" 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(i,e){var l=!1;return u.each(e,function(e,t){if(i===t)return!(l=!0)}),l},_buildUI:function(){var i=this;i._presetsList=this._ui.find(".fl-color-picker-presets-list"),i._presetsList.html(""),0<this.options.presets.length?u.each(this.options.presets,function(e,t){i._addPresetView(t)}):i._presetsList.append(this._noPresetsTpl)},_addPresetView:function(e){var t=this._presetsList.find(".fl-color-picker-no-preset");0<t.length&&t.remove();var i=u(this._presetsTpl),t=FLBuilderColor(e);i.attr("data-color",e).find(".fl-color-picker-preset-color").css({backgroundColor:t.toString()}).end().find(".fl-color-picker-preset-label").html(t.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(){u(this).remove()})},_pickerControls:function(){var i=this;this._wrapper.on("click",".fl-color-picker-color",function(){var e=u(this);i._currentElement=e.parent().find(".fl-color-picker-value"),i._ui.position({my:"left top",at:"left bottom",of:e,collision:"flip",using:function(e,t){i._togglePicker(e)}})}).on("click",".fl-color-picker-clear",function(){var e=u(this);i._currentElement=e.parent().find(".fl-color-picker-value"),e.prev(".fl-color-picker-color").css({backgroundColor:"transparent"}).addClass("fl-color-picker-empty"),i._setColor(""),i.element.val(""),i._currentElement.val("").trigger("change")}),u(document).on("mousedown",function(e){0===u(e.target).closest(".fl-color-picker-ui").length&&(presets=i._ui.find(".fl-color-picker-presets"),presetsCloseLabel=presets.find(".fl-color-picker-presets-close-label"),presetsList=presets.find(".fl-color-picker-presets-list"),presetsCloseLabel.hasClass("fl-color-picker-active")&&(list=presetsList.find("li").find("span.fl-color-picker-preset-label"),0<list.length&&(presets=[],u.each(list,function(e,t){presets.push(u(t).text())}),u(FLBuilder.colorPicker).trigger("presetSorted",{presets:presets}))),u(".fl-color-picker-ui.fl-color-picker-active").removeClass("fl-color-picker-active"))})},_presetsControls:function(){var i=this,e=i._ui.find(".fl-color-picker-preset-add"),l=i._ui.find(".fl-color-picker-presets"),o=l.find(".fl-color-picker-presets-open-label"),n=l.find(".fl-color-picker-presets-close-label"),s=l.find(".fl-color-picker-presets-list");e.off("click").on("click",function(){i._addPreset(i.element.val())}),s.css({height:i.element.innerHeight()+i._iris.innerHeight()+14+"px"}).hide(),s.sortable(),l.off("click").on("click",".fl-color-picker-presets-toggle",function(){n.hasClass("fl-color-picker-active")&&(list=s.find("li").find("span.fl-color-picker-preset-label"),0<list.length&&(l=[],u.each(list,function(e,t){l.push(u(t).text())}),u(FLBuilder.colorPicker).trigger("presetSorted",{presets:l}))),o.toggleClass("fl-color-picker-active"),n.toggleClass("fl-color-picker-active"),s.slideToggle(500)}).on("click",".fl-color-picker-preset",function(e){var t=new FLBuilderColor(u(this).data("color").toString());i._setColor(t),i._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:t.toString()}).removeClass("fl-color-picker-empty"),o.toggleClass("fl-color-picker-active"),n.toggleClass("fl-color-picker-active"),s.slideToggle(500)}).on("click",".fl-color-picker-preset-remove",function(e){e.stopPropagation(),i._removePreset(u(this).parent().data("color"))})},_removePreset:function(e){var t;confirm(this.options.labels.removePresetConfirm)&&(t=e.toString(),-1<(e=i.indexOf(t))&&(i.splice(e,1),this.options.presets=i,this._presetsList.find('.fl-color-picker-preset[data-color="'+t+'"]').slideUp(function(){u(this).remove()})),i.length<1&&this._presetsList.append(this._noPresetsTpl),u(this).trigger("presetRemoved",{presets:i}))},_addPreset:function(e){if(!this._CheckValidColor(e))return alert(this.options.labels.noneColorSelected),!1;e=e.toString().replace(/^#/,"");""===e?alert(this.options.labels.noneColorSelected):-1<i.indexOf(e)?alert(this.options.labels.alreadySaved.replace("%s","#"+e)):(this._addPresetView(e),this._addPresetFeedback(),i.push(e),this.options.presets=i,u(this).trigger("presetAdded",{presets:i}))},_CheckValidColor:function(e){if(!e.match(/^#/)&&!e.match(/^rgb/)&&!e.match(/^hsl/))return!1;var t=document.getElementById("divValidColor");return t||((t=document.createElement("div")).id="divValidColor"),t.style.borderColor="",t.style.borderColor=e,0!=t.style.borderColor.length},_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(){this._paintDimension("right","strip"),this._paintDimension("top","vert"),this._paintDimension("left","horiz")},_paintDimension:function(e,t){var i,l=this,o=l._color,n=l.options.mode,s=l._getHSpaceColor(),r=l.controls[t],a=l.options.controls;if(t!==l.active&&("square"!==l.active||"strip"===t))switch(a[t]){case"h":if("hsv"===n){switch(s=o.clone(),t){case"horiz":s[a.vert](100);break;case"vert":s[a.horiz](100);break;case"strip":s.setHSpace("hsl")}i=s.toHsl()}else i="strip"===t?{s:s.s,l:s.l}:{s:100,l:s.l};r.flBuilderColorPickerRaninbowGradient(e,i);break;case"s":"hsv"===n?"vert"===t?i=[o.clone().a(0).s(0).toCSS("rgba"),o.clone().a(1).s(0).toCSS("rgba")]:"strip"===t?i=[o.clone().s(100).toCSS("hsl"),o.clone().s(0).toCSS("hsl")]:"horiz"===t&&(i=["#fff","hsl("+s.h+",100%,50%)"]):i="vert"===t&&"h"===l.options.controls.horiz?["hsla(0, 0%, "+s.l+"%, 0)","hsla(0, 0%, "+s.l+"%, 1)"]:["hsl("+s.h+",0%,50%)","hsl("+s.h+",100%,50%)"],r.flBuilderColorPickerGradient(e,i);break;case"l":i="strip"===t?["hsl("+s.h+",100%,100%)","hsl("+s.h+", "+s.s+"%,50%)","hsl("+s.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],r.flBuilderColorPickerGradient(e,i);break;case"v":i="strip"===t?[o.clone().v(100).toCSS(),o.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],r.flBuilderColorPickerGradient(e,i)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(e){var t,i=this,l=i.options,o=i.controls.square,n=i.picker.find(".iris-strip"),s=l.border?l.width-20:l.width;if(e&&(o.css("width",""),n.css("width",""),i.picker.css({width:"",height:""})),t=s*(parseFloat("77.5%")/100),e=s*(parseFloat("12%")/100),s=l.border?20+t:t,o.width(t).height(t),n.height(t).width(e),i.picker.css({width:l.width,height:s}),!l.palettes)return i.picker.css("paddingBottom","")},_addInputListeners:function(o){function e(e){var t=new FLBuilderColor(o.val()),i=o.val().replace(/^#/,""),l=n._currentElement.hasClass("fl-color-picker-empty");if(o.removeClass("iris-error"),t.error)""!==i&&o.addClass("iris-error");else if(t.toString()!==n._color.toString()||""!==n._color.toString()&&l)if("keyup"===e.type)i.match(/^[0-9a-fA-F]{3}$/)||(n._setColor(i),n._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:FLBuilderColor(i).toString()}).removeClass("fl-color-picker-empty"),n._currentElement.val(i).trigger("change"));else if("paste"===e.type)return i=e.originalEvent.clipboardData.getData("text").replace(/^#/,""),hex=FLBuilderColor(i).toString(),n._setColor(i),o.val(hex),n._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:hex}).removeClass("fl-color-picker-empty"),n._currentElement.val(i).trigger("change"),!1}var n=this;o.on("change",e).on("keyup",n._debounce(e,100))},_initControls:function(){var n=this,s=n.controls,e=s.square,i=n.options.controls,l=n._scale[i.strip];s.stripSlider.slider({orientation:"horizontal",max:l,slide:function(e,t){n.active="strip","h"===i.strip&&(t.value=l-t.value),n._color[i.strip](t.value),n._change.apply(n,arguments)}}),s.squareDrag.draggable({containment:s.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(e,t){n._squareDrag(e,t)},start:function(){e.addClass("iris-dragging"),u(this).addClass("ui-state-focus")},stop:function(){e.removeClass("iris-dragging"),u(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(e){var t="ui-state-focus";e.preventDefault(),"mousedown"===e.type?(n.picker.find("."+t).removeClass(t).blur(),u(this).addClass(t).focus()):u(this).removeClass(t)}).on("keydown",function(e){var t=s.square,i=s.squareDrag,l=i.position(),o=2;switch(e.altKey&&(o*=10),e.keyCode){case 37:l.left-=o;break;case 38:l.top-=o;break;case 39:l.left+=o;break;case 40:l.top+=o;break;default:return!0}l.left=Math.max(0,Math.min(l.left,t.width())),l.top=Math.max(0,Math.min(l.top,t.height())),i.css(l),n._squareDrag(e,{position:l}),e.preventDefault()}),e.mousedown(function(e){var t;1===e.which&&u(e.target).is("div")&&(t=n.controls.square.offset(),t={top:e.pageY-t.top,left:e.pageX-t.left},e.preventDefault(),n._squareDrag(e,{position:t}),e.target=n.controls.squareDrag.get(0),n.controls.squareDrag.css(t).trigger(e))})},_squareDrag:function(e,t){var i=this,l=i.options.controls,o=i._squareDimensions(),n=Math.round((o.h-t.position.top)/o.h*i._scale[l.vert]),o=i._scale[l.horiz]-Math.round((o.w-t.position.left)/o.w*i._scale[l.horiz]);i._color[l.horiz](o)[l.vert](n),i.active="square",i._change.apply(i,arguments)},_setColor:function(e){var t=this,i=t.options.color;""===e?(e="#ff0000",t.default=!0):t.default=!1,(e=""+(t.options.color=e)).replace(/^#/,""),(e=new FLBuilderColor(e).setHSpace(t.options.mode)).error?t.options.color=i:(t._color=e,t.options.color=t._color.toString(),t.active="external",t._change())},_squareDimensions:function(e){var t=this.controls.square;return void 0!==e&&t.data("dimensions")?t.data("dimensions"):(this.controls.squareDrag,e={w:t.width(),h:t.height()},t.data("dimensions",e),e)},_isNonHueControl:function(e,t){return"square"===e&&"h"===this.options.controls.strip||"external"!==t&&("h"!==t||"strip"!==e)},_change:function(){var l=this,o=l.controls,n=l._getHSpaceColor(),e=["square","strip"],s=l.options.controls,t=s[l.active]||"external",i=l.hue;"strip"===l.active?e=[]:"external"!==l.active&&e.pop(),u.each(e,function(e,t){var i;if(t!==l.active)switch(t){case"strip":i="h"===s.strip?l._scale[s.strip]-n[s.strip]:n[s.strip],o.stripSlider.slider("value",i);break;case"square":i=l._squareDimensions(),i={left:n[s.horiz]/l._scale[s.horiz]*i.w,top:i.h-n[s.vert]/l._scale[s.vert]*i.h},l.controls.squareDrag.css(i)}}),n.h!==i&&l._isNonHueControl(l.active,t)&&l._color.h(i),l.hue=l._color.h(),l.options.color=l._color.toString(),l.element.is(":input")&&!l._color.error&&(l.element.removeClass("iris-error"),l.element.val()!==l._color.toString()&&(l.element.val(l._color.toString()),this._currentElement&&(!l.default||l.default&&"external"!==l.active?this._currentElement.val(l._color.toString().replace(/^#/,"")).parent().find(".fl-color-picker-color").css({backgroundColor:l._color.toString()}).removeClass("fl-color-picker-empty"):this._currentElement.val(""),l._wrapper.find(".fl-alpha-slider-offset").css("background-color",l._color.toString()),this._currentElement.trigger("change")))),l._paint(),l._inited=!0,l.active=!1},_debounce:function(o,n,s){var r,a;return function(){var e=this,t=arguments,i=function(){r=null,s||(a=o.apply(e,t))},l=s&&!r;return clearTimeout(r),r=setTimeout(i,n),a=l?o.apply(e,t):a}},_buildAlphaUI:function(){var t=this;t._wrapper.on("click",".fl-color-picker-color",function(){var e=u(this);t._currentElement.val();e.hasClass("fl-color-picker-alpha-enabled")?(t._ui.find(".fl-alpha-wrap").length<=0&&u(t._alphaHtml).insertAfter(t._iris),t.picker.addClass("fl-color-alpha-enabled"),t._pickerAlphaControls()):(t.picker.removeClass("fl-color-alpha-enabled"),t._ui.find(".fl-alpha-wrap").remove())})},_pickerAlphaControls:function(){var l=this,e=l._currentElement,t=flBuilderParseColorValue(e.val()),i=parseFloat(t.alpha/100),o=l._wrapper,e=l._ui.find(".fl-alpha-wrap"),n=e.find(".fl-alpha-slider"),s=e.find(".fl-alpha-text"),r=e.find(".fl-alpha-slider-offset");alphaHandle=e.find(".ui-slider-handle"),s.text(i<1?i:""),n.slider({orientation:"vertical",slide:function(e,t){var i=parseFloat(t.value/100);l._color._alpha=i,s.text(i<1?i:""),l._change.apply(l,arguments)},create:function(){r.css({backgroundColor:t.value}),o.on("click",".fl-color-picker-clear",function(){l._color._alpha=1,s.text(""),n.slider("value",100).trigger("slide")})},value:t.alpha,step:1,min:0,max:100})}}}(jQuery),function(e,u){function n(e,t){return this instanceof n?this._init(e,t):new n(e,t)}n.fn=n.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 t="noop";switch(typeof e){case"object":return e.a!==u&&this.a(e.a),this[t=e.r!==u?"fromRgb":e.l!==u?"fromHsl":e.v!==u?"fromHsv":t](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 n(this.toInt()),t=["_alpha","_hSpace","_hsl","_hsv","error"],i=t.length-1;0<=i;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,i=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,(e=e.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,"")).match(i)&&e.match(/\)$/)){if((t=e.replace(/(\s|%)/g,"").replace(i,"").replace(/,?\);?$/,"").split(",")).length<3)return this._error();if(4===t.length&&(this.a(parseFloat(t.pop())),this.error))return this;for(var l=t.length-1;0<=l;l--)if(t[l]=parseInt(t[l],10),isNaN(t[l]))return this._error();return e.match(/^rgb/)?this.fromRgb({r:t[0],g:t[1],b:t[2]}):e.match(/^hsv/)?this.fromHsv({h:t[0],s:t[1],v:t[2]}):this.fromHsl({h:t[0],s:t[1],l:t[2]})}return this.fromHex(e)},fromRgb:function(e,t){return"object"!=typeof e||e.r===u||e.g===u||e.b===u?this._error():(this.error=!1,this.fromInt(parseInt((e.r<<16)+(e.g<<8)+e.b,10),t))},fromHex:function(e){return 3===(e=e.replace(/^#/,"").replace(/^0x/,"")).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 t,i,l,o,n;return"object"!=typeof e||e.h===u||e.s===u||e.l===u?this._error():(this._hsl=e,this._hSpace="hsl",o=e.h/360,n=e.s/100,e=e.l/100,0==n?t=i=l=e:(t=this.hue2rgb(n=2*e-(e=e<.5?e*(1+n):e+n-e*n),e,o+1/3),i=this.hue2rgb(n,e,o),l=this.hue2rgb(n,e,o-1/3)),this.fromRgb({r:255*t,g:255*i,b:255*l},!0))},fromHsv:function(e){var t,i,l,o,n,s,r,a,d;if("object"!=typeof e||e.h===u||e.s===u||e.v===u)return this._error();switch(this._hsv=e,this._hSpace="hsv",s=e.h/360,t=e.s/100,r=(i=e.v/100)*(1-t),a=i*(1-(s=6*s-(e=Math.floor(6*s)))*t),d=i*(1-(1-s)*t),e%6){case 0:l=i,o=d,n=r;break;case 1:l=a,o=i,n=r;break;case 2:l=r,o=i,n=d;break;case 3:l=r,o=a,n=i;break;case 4:l=d,o=r,n=i;break;case 5:l=i,o=r,n=a}return this.fromRgb({r:255*l,g:255*o,b:255*n},!0)},fromInt:function(e,t){return this._color=parseInt(e,10),isNaN(this._color)&&(this._color=0),16777215<this._color?this._color=16777215:this._color<0&&(this._color=0),t===u&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,i){return i<0&&(i+=1),1<i&&--i,i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},toString:function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;0<=t;t--)e="0"+e;return"#"+e},toCSS:function(e,t){switch(e=e||"hex",t=parseFloat(t||this._alpha),e){case"rgb":case"rgba":var i=this.toRgb();return t<1?"rgba( "+i.r+", "+i.g+", "+i.b+", "+t+" )":"rgb( "+i.r+", "+i.g+", "+i.b+" )";case"hsl":case"hsla":i=this.toHsl();return t<1?"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=this.toRgb(),i=t.r/255,l=t.g/255,o=t.b/255,n=Math.max(i,l,o),s=Math.min(i,l,o),t=(n+s)/2;if(n===s)e=a=0;else{var r=n-s,a=.5<t?r/(2-n-s):r/(n+s);switch(n){case i:e=(l-o)/r+(l<o?6:0);break;case l:e=(o-i)/r+2;break;case o:e=(i-l)/r+4}e/=6}return{h:e=0===(e=Math.round(360*e))&&this._hsl.h!==e?this._hsl.h:e,s:a=0===(a=Math.round(100*a))&&this._hsl.s?this._hsl.s:a,l:Math.round(100*t)}},toHsv:function(){var e,t=this.toRgb(),i=t.r/255,l=t.g/255,o=t.b/255,n=Math.max(i,l,o),s=Math.min(i,l,o),r=n,a=n-s,t=0===n?0:a/n;if(n===s)e=t=0;else{switch(n){case i:e=(l-o)/a+(l<o?6:0);break;case l:e=(o-i)/a+2;break;case o:e=(i-l)/a+4}e/=6}return{h:e=0===(e=Math.round(360*e))&&this._hsv.h!==e?this._hsv.h:e,s:t=0===(t=Math.round(100*t))&&this._hsv.s?this._hsv.s:t,v:Math.round(100*r)}},toInt:function(){return this._color},toIEOctoHex:function(){var e=this.toString(),t=parseInt(255*this._alpha,10).toString(16);return"#"+(t=1===t.length?"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 n))throw"getDistanceLuminosityFrom requires a Color object";var t=this.toLuminosity(),e=e.toLuminosity();return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)},getMaxContrastColor:function(){var e=this.toLuminosity();return new n(.5<=e?"000000":"ffffff")},getReadableContrastingColor:function(e,t){if(!(e instanceof n))return this;var i=t===u?5:t,l=e.getDistanceLuminosityFrom(this),t=e.getMaxContrastColor();if(t.getDistanceLuminosityFrom(e)<=i)return t;if(i<=l)return this;for(var o=0===t.toInt()?-1:1;l<i&&(this.l(o,!0),l=this.getDistanceLuminosityFrom(e),0!==this._color&&16777215!==this._color););return this},a:function(e){if(e===u)return this._alpha;e=parseFloat(e);return isNaN(e)?this._error():(this._alpha=e,this)},darken:function(e){return this.l(-(e=e||5),!0)},lighten:function(e){return this.l(e=e||5,!0)},saturate:function(e){return this.s(e=e||15,!0)},desaturate:function(e){return this.s(-(e=e||15),!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(e){return this.h(180+30*(e=e||1),!0)},getAnalog:function(e){return this.h(30*(e=e||1),!0)},getTetrad:function(e){return this.h(60*(e=e||1),!0)},getTriad:function(e){return this.h(120*(e=e||1),!0)},_partial:function(l){var o=i[l];return function(e,t){var i=this._spaceFunc("to",o.space);return e===u?i[l]:(!0===t&&(e=i[l]+e),o.mod&&(e%=o.mod),o.range&&(e=e<o.range[0]?o.range[0]:e>o.range[1]?o.range[1]:e),i[l]=e,this._spaceFunc("from",o.space,i))}},_spaceFunc:function(e,t,i){t=t||this._hSpace;return this[e+t.charAt(0).toUpperCase()+t.substr(1)](i)}};var t,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(t in i)i.hasOwnProperty(t)&&(n.fn[t]=n.fn._partial(t));"object"==typeof exports?module.exports=n:(e.FLBuilderColor=n,e.Color=n)}(this),function(s){FLLightbox=function(e){this._init(e)},FLLightbox.closeParent=function(e){e=s(e).closest(".fl-lightbox-wrap").attr("data-instance-id");_.isUndefined(e)||FLLightbox._instances[e].close()},FLLightbox.getResizableControlClass=function(){var e=s(".fl-lightbox-resizable").eq(0),t="far fa-window-maximize";return t=e.length&&e.hasClass("fl-lightbox-width-full")?"far fa-window-minimize":t},FLLightbox.unbindAll=function(){for(var e in FLLightbox._instances)FLLightbox._instances[e]._unbind()},FLLightbox.bindAll=function(){for(var e in FLLightbox._instances)FLLightbox._instances[e]._bind()},FLLightbox.closeAll=function(){for(var e in FLLightbox._instances)FLLightbox._instances[e].close()},FLLightbox._instances={},FLLightbox.prototype={_id:null,_node:null,_visible:!1,_allowClosing:!0,_resizeTimer:null,_defaults:{className:"",destroyOnClose:!1,resizable:!1},open:function(e){var t=this._node.find(".fl-lightbox"),i=t.closest(".fl-builder-ui-pinned").length,l=this._getPositionSettings();!i&&l&&this._defaults.resizable&&t.css(l),this._bind(),this._node.show(),this._visible=!0,void 0!==e?this.setContent(e):this._resize(),this.trigger("open"),FLBuilder.triggerHook("didShowLightbox",this)},close:function(){var e=this._node.data("parent");this._allowClosing&&(this.trigger("beforeCloseLightbox"),this._unbind(),this._node.hide(),this._visible=!1,this.trigger("close"),FLBuilder.triggerHook("didHideLightbox"),this._defaults.resizable&&_.isUndefined(e)&&FLBuilder.triggerHook("didHideAllLightboxes"),this._defaults.destroyOnClose&&this.destroy())},disableClose:function(){this._allowClosing=!1},enableClose:function(){this._allowClosing=!0},setContent:function(e){this._node.find(".fl-lightbox-content").html(e),this._resize(),0==s(".fl-builder-content-panel-button").length&&s(".fl-builder-panel-drag-handle").show()},empty:function(){this._node.find(".fl-lightbox-content").empty()},on:function(e,t){this._node.on(e,t)},off:function(e,t){this._node.off(e,t)},trigger:function(e,t){this._node.trigger(e,t)},destroy:function(){this._node.empty(),this._node.remove(),FLLightbox._instances[this._id]="undefined";try{delete FLLightbox._instances[this._id]}catch(e){}},_init:function(e){var t=0,i=null;for(i in FLLightbox._instances)t++;this._defaults=s.extend({},this._defaults,e),this._id=(new Date).getTime()+t,(FLLightbox._instances[this._id]=this)._render(),this._resizable()},_render:function(){this._node=s('<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),s("body").append(this._node)},_bind:function(){s(window).on("resize.fl-lightbox-"+this._id,this._delayedResize.bind(this))},_unbind:function(){s(window).off("resize.fl-lightbox-"+this._id)},_resizable:function(){s("body");var e=this._node.find(".fl-lightbox-mask"),t=this._node.find(".fl-lightbox"),i=s(".fl-lightbox-resizable").eq(0);this._defaults.resizable?(e.hide(),t.addClass("fl-lightbox-resizable"),t.on("click",".fl-lightbox-resize-toggle",this._resizeClicked.bind(this)),t.draggable({cursor:"move",handle:".fl-lightbox-header"}).resizable({handles:"all",minHeight:500,minWidth:380,start:this._resizeStart.bind(this),stop:this._resizeStop.bind(this)}),i.length&&i.hasClass("fl-lightbox-width-full")?(t.addClass("fl-lightbox-width-full"),t.draggable("disable")):this._restorePosition()):e.show(),this._resize()},_delayedResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._resize.bind(this),250)},_resize:function(){var e=this._node.find(".fl-lightbox"),t=parseInt(this._node.css("padding-top")),i=parseInt(this._node.css("padding-bottom")),l=(parseInt(this._node.css("padding-left")),parseInt(this._node.css("padding-right")),e.height()),o=e.width(),n=s(window),i=n.height()-t-i,n=(n.width(),"0px");this._defaults.resizable?(o<600?e.addClass("fl-lightbox-width-slim"):e.removeClass("fl-lightbox-width-slim"),o<450?e.addClass("fl-lightbox-width-micro"):e.removeClass("fl-lightbox-width-micro"),this._resizeEditors()):(l<i&&(n=(i-l-46)/2+"px"),e.attr("style","").css("margin",n+" auto 0")),this.trigger("resized")},_resizeStart:function(){s("body").addClass("fl-builder-resizable-is-resizing"),s(".fl-builder-lightbox:visible").append('<div class="fl-builder-resizable-iframe-fix"></div>'),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},_resizeStop:function(e,t){var i=s(".fl-lightbox-resizable:visible");parseInt(i.css("top"))<0&&i.css("top","0"),this._savePosition(),s("body").removeClass("fl-builder-resizable-is-resizing"),s(".fl-builder-resizable-iframe-fix").remove(),FLBuilder._bindOverlayEvents()},_resizeClicked:function(){s(".fl-lightbox-resizable").find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox").hasClass("fl-lightbox-width-full")?this._resizeExitFull():this._resizeEnterFull(),this._resize()},_resizeEnterFull:function(){var e=s(".fl-lightbox-resizable"),t=e.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");t.removeClass("fa-window-maximize").addClass("fa-window-minimize"),e.addClass("fl-lightbox-width-full"),e.draggable("disable"),e.resizable("disable")},_resizeExitFull:function(){var e=s(".fl-lightbox-resizable"),t=e.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");t.removeClass("fa-window-minimize").addClass("fa-window-maximize"),e.removeClass("fl-lightbox-width-full"),e.draggable("enable"),e.resizable("enable")},_resizeEditors:function(){s(".fl-lightbox-resizable").each(function(){var e=s(this),t=e.find(".fl-builder-settings-fields").height(),e=e.find(".mce-edit-area > iframe, textarea.wp-editor-area, .ace_editor"),i=null;t<350&&(t=350),e.each(function(){(i=s(this)).hasClass("ace_editor")?(i.height(t-60),i.closest(".fl-field").data("editor").resize()):i.closest(".mce-container-body").find(".mce-toolbar-grp .mce-toolbar.mce-last").is(":visible")?i.height(t-175):i.height(t-150)})})},_savePosition:function(){var e=this._node.find(".fl-lightbox"),t={width:e.width(),height:e.height(),top:parseInt(e.css("top"))<0?"0px":e.css("top"),left:e.css("left")};e.closest(".fl-builder-ui-pinned").length||(FLBuilderConfig.userSettings.lightbox=t,FLBuilder.ajax({action:"save_lightbox_position",data:t}))},_restorePosition:function(){var e=this._node.find(".fl-lightbox"),t=this._getPositionSettings();t?e.css(t):e.css({top:25,left:FLBuilderConfig.isRtl?"-25":25})},_getPositionSettings:function(){var e=FLBuilderConfig.userSettings.lightbox;if(!e)return!1;var t=window.innerHeight,i=parseInt(e.height),l=parseInt(e.top),o=parseInt(e.left),n=(parseInt(e.top),parseInt(e.width));return o+n+100>screen.width&&(e.left=screen.width-n-250),o<0&&(e.left=50),(t<i&&546<t||t<l+i)&&(t<i&&(e.height=t-50),e.top=0),e}}}(jQuery),function(s){FLIconSelector={_content:null,_lightbox:null,_rendered:!1,_filterText:"",_liveFilterText:"",open:function(i){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(),s(".fl-icons-filter-text-live").focus()),FLIconSelector._lightbox.on("icon-selected",function(e,t){FLIconSelector._lightbox.off("icon-selected"),FLIconSelector._lightbox.close(),i(t)})},_render:function(){FLIconSelector._lightbox=new FLLightbox({className:"fl-icon-selector"}),FLIconSelector._rendered=!0,FLBuilder.addHook("endEditingSession",function(){FLIconSelector._lightbox.close()})},_getContentComplete:function(e){e=FLBuilder._jsonParse(e);FLIconSelector._content=e.html,FLIconSelector._lightbox.setContent(e.html),s(".fl-icons-filter-text-live").on("keyup",s.debounce(1e3,FLIconSelector.livefilter)),s(".fl-icons-filter-text-live").focus(),s(".fl-icons-list i").on("click",FLIconSelector._select),s(".fl-icon-selector-cancel").on("click",s.proxy(FLIconSelector._lightbox.close,FLIconSelector._lightbox)),FLIconSelector.renderRecent()},renderRecent:function(){var e=FLBuilderConfig.recentIcons;if(e.length<1)return s(".fl-icons-section.recent h2.recent").hide(),!1;s(".fl-icons-section.recent h2.recent").show(),s(".fl-icons-section.recent").show(),s(".recent-icons").html(""),s.each(e,function(e,t){s(".recent-icons").append('<i class="'+t+'"></i>')}),s(".recent-icons").show(),s(".recent-icons i").on("click",FLIconSelector._select),recents=s(".recent-icons i"),s.each(recents,function(e,t){"none"==window.getComputedStyle(s(t)[0],":before").getPropertyValue("content")&&s(t).hide()})},livefilter:function(){var e=s(".fl-icons-filter-text-live").val();if(e===FLIconSelector._liveFilterText)return!1;s(".fl-icons-section.results").html(""),""===e?(FLIconSelector._liveFilterText="",s(".fl-icons-section").show(),FLIconSelector.renderRecent()):(s(".fl-icons-section.recent").hide(),s(".fl-icons-section.all-icons").hide(),s(".fl-icons-section.results").html('<i class="fas fa-spinner fa-spin"></i>'),FLIconSelector._liveFilterText=e,FLBuilder.ajax({action:"query_icons",text:e},FLIconSelector._query_result))},_query_result:function(e){var t=s(".fl-icons-section.results"),o="";if(!e||"[]"===e)return o="<h2>No Icons Found</h2>",FLIconSelector.renderRecent(),t.html(o),t.show(),!1;var e=FLBuilder._jsonParse(e),n="";s.each(e,function(e,l){o+="<h2>"+l.name+"</h2>",s.each(l.data,function(e,i){s.each(i.styles,function(e,t){switch(n="",t){case"solid":n="fas";break;case"regular":n="far";break;case"light":n="fal";break;case"duotone":n="fad";break;case"thin":n="fa-thin";break;case"brands":n="fa-brands fab";break;case"legacy":n=l.prefix}0<n.length&&(n+=" "),o+='<i class="'+n+i.tag+'" title="'+i.label+'"></i>'})})}),t.html(o),t.show(),s(".fl-icons-section.results i").on("click",FLIconSelector._select)},_filter:function(){var e=s(".fl-icons-filter-select").val(),t=s(".fl-icons-filter-text").val()||"";"all"==e?s(".fl-icons-section").show():(s(".fl-icons-section").hide(),s(".fl-"+e).show()),""!==(FLIconSelector._filterText=t)?s(".fl-icons-list i").each(FLIconSelector._filterIcon):s(".fl-icons-list i").show()},_filterIcon:function(){var e=s(this);-1==e.attr("class").indexOf(FLIconSelector._filterText)?e.hide():e.show()},_select:function(){var e=s(this).attr("class");FLBuilder.ajax({action:"recent_icons",icon:e},FLIconSelector._updateRecents),FLIconSelector._lightbox.trigger("icon-selected",e)},_updateRecents:function(e){FLBuilderConfig.recentIcons=FLBuilder._jsonParse(e)}}}(jQuery),function(i){FLStyleSheet=function(e){"object"==typeof e&&i.extend(this,e),this._createSheet()},FLStyleSheet.prototype={id:null,_sheet:null,_sheetElement:null,updateRule:function(e,t,i){for(var l=this._sheet.cssRules||this._sheet.rules,o=null,n=0;n<l.length;n++)l[n].selectorText.toLowerCase().replace(/\s/g,"")==e.toLowerCase().replace(/\s/g,"")&&(o=l[n]);if(o)if("object"==typeof t)for(n in t)this.setProperty(o,n,t[n]);else this.setProperty(o,t,i);else this.addRule(e,t,i)},setProperty:function(e,t,i){var l="";e.style.setProperty?(-1<i.indexOf("!important")&&(l="important",i=i.replace("!important","").trim()),e.style.setProperty(t,i,l)):e.style[this._toCamelCase(t)]=i},addRule:function(e,t,i){var l="",o="";if("object"==typeof t)for(o in t)l+=o+":"+t[o]+";";else l=t+":"+i+";";this._sheet.insertRule?this._sheet.insertRule(e+" { "+l+" }",this._sheet.cssRules.length):this._sheet.addRule(e,l)},destroy:function(){this._sheetElement&&(this._sheetElement.remove(),this._sheetElement=null),this._sheet&&(this._sheet=null)},disable:function(){this._sheet.disabled=!0},enable:function(){this._sheet.disabled=!1},_createSheet:function(){var e=this.id?' id="'+this.id+'"':"",t=this.className?' class="'+this.className+'"':"";this._sheet||(this._sheetElement=i('<style type="text/css"'+e+t+"></style>"),i("body").append(this._sheetElement),this._sheet=this._sheetElement[0].sheet)},_toCamelCase:function(e){return e.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}}(jQuery),function(y){FLBuilder={preview:null,_actionsLightbox:null,_ajaxQueue:[],_ajaxRequest:null,_colResizeData:null,_colResizing:!1,_contentClass:!1,_dragEnabled:!1,_dragging:!1,_dragInitialScrollTop:0,_exitUrl:null,_layout:null,_layoutQueue:[],_layoutSettingsCSSCache:null,_layoutSettingsCSSTimeout:null,_lightbox:null,_lightboxScrollbarTimeout:null,_loadedModuleAssets:[],_moduleHelpers:{},_multiplePhotoSelector:null,_newColParent:null,_newColPosition:0,_newColGroupParent:null,_newColGroupPosition:0,_newModuleParent:null,_newModulePosition:0,_newRowPosition:0,_selectedTemplateId:null,_selectedTemplateType:null,_singlePhotoSelector:null,_singleVideoSelector:null,_multipleAudiosSelector:null,_codeDisabled:!1,_sandbox:{},_publishAndRemain:!1,_init:function(){FLBuilder._initJQueryReadyFix(),FLBuilder._initGlobalErrorHandling(),FLBuilder._initPostLock(),FLBuilder._initClassNames(),FLBuilder._initMediaUploader(),FLBuilder._initOverflowFix(),FLBuilder._initScrollbars(),FLBuilder._initLightboxes(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._initStrings(),FLBuilder._initSanityChecks(),FLBuilder._initTipTips(),FLBuilder._initTinyMCE(),FLBuilder._bindEvents(),FLBuilder._bindOverlayEvents(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._checkEnv(),FLBuilder.addHook("didInitUI",FLBuilder._showTourOrTemplates.bind(FLBuilder)),FLBuilder.addHook("endEditingSession",FLBuilder._doStats.bind(this)),FLBuilder.triggerHook("init")},_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(y)}catch(e){FLBuilder.logError(e)}})})},_initSanityChecks:function(){FLBuilderConfig.uploadPath&&"undefined"==typeof FLBuilderLayout&&(url='<a href="'+FLBuilderConfig.uploadUrl+'">wp-admin -> Settings -> Media</a>',FLBuilder.alert('<strong>Critcal Error</strong><p style="font-size:15px;">Please go to '+url+" and make sure uploads folder settings is blank</p>"),y(".fl-builder-alert-close").hide())},_initGlobalErrorHandling:function(){FLBuilderConfig.debug||(window.onerror=function(e,t,i,l,o){return FLBuilder.logGlobalError(e,t,i,l,o),!0})},_initPostLock:function(){void 0!==wp.heartbeat&&(wp.heartbeat.interval(30),wp.heartbeat.enqueue("fl_builder_post_lock",{post_id:FLBuilderConfig.postId}))},_initClassNames:function(){var e=y("html"),t=y("body");e.addClass("fl-builder-edit"),t.addClass("fl-builder"),FLBuilderConfig.simpleUi&&t.addClass("fl-builder-simple"),FLBuilder._contentClass=".fl-builder-content-"+FLBuilderConfig.postId,y(FLBuilder._contentClass).addClass("fl-builder-content-editing")},_initMediaUploader:function(){wp.media.model.settings.post.id=FLBuilderConfig.postId},_initOverflowFix:function(){y(FLBuilder._contentClass).parents().css("overflow","visible")},_initScrollbars:function(){var e=y(".fl-nanoscroller").nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"}).filter(".fl-builder-settings-fields"),t=e.find(".fl-nanoscroller-pane");t.length&&(t=t.get(0).style.display,e=e.find(".fl-nanoscroller-content"),"none"===t?e.removeClass("has-scrollbar"):e.addClass("has-scrollbar"))},_initSortables:function(){var e={appendTo:FLBuilder._contentClass,cursor:"move",cursorAt:{left:85,top:20},distance:1,helper:FLBuilder._blockDragHelper,start:FLBuilder._blockDragStart,sort:FLBuilder._blockDragSort,change:FLBuilder._blockDragChange,stop:FLBuilder._blockDragStop,placeholder:"fl-builder-drop-zone",tolerance:"intersect"},t="",i="",l="",l="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-content":"column"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-col-content":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col:not(.fl-builder-node-loading):not(.fl-node-global) .fl-col-content",i="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target",t=FLBuilderConfig.nestedColumns?l:"row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target";y(".fl-builder-rows").sortable(y.extend({},e,{connectWith:t,items:".fl-builder-block-row",stop:FLBuilder._rowDragStop})),y(".fl-builder-row-templates").sortable(y.extend({},e,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-row-template:not(.fl-builder-block-disabled)",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-saved-rows").sortable(y.extend({},e,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-saved-row",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-saved-columns").sortable(y.extend({},e,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:i,items:".fl-builder-block-saved-column",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-modules, .fl-builder-widgets").sortable(y.extend({},e,{connectWith:l,items:".fl-builder-block-module:not(.fl-builder-block-disabled)",stop:FLBuilder._moduleDragStop})),y(".fl-builder-module-templates").sortable(y.extend({},e,{connectWith:l,items:".fl-builder-block-module-template",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-saved-modules").sortable(y.extend({},e,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:l,items:".fl-builder-block-saved-module",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-row-sortable-proxy").sortable(y.extend({},e,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",helper:FLBuilder._rowDragHelper,start:FLBuilder._rowDragStart,stop:FLBuilder._rowDragStop})),y(".fl-col-sortable-proxy").sortable(y.extend({},e,{connectWith:l,helper:FLBuilder._colDragHelper,start:FLBuilder._colDragStart,stop:FLBuilder._colDragStop})),y(FLBuilder._contentClass+" .fl-col-content").sortable(y.extend({},e,{connectWith:l,handle:".fl-module-sortable-proxy",helper:FLBuilder._moduleDragHelper,items:".fl-module, .fl-col-group",start:FLBuilder._moduleDragStart,stop:FLBuilder._moduleDragStop})),y(FLBuilder._contentClass+" .fl-row-drop-target").sortable(e),y(FLBuilder._contentClass+" .fl-col-group-drop-target").sortable(e),y(FLBuilder._contentClass+" .fl-col-drop-target").sortable(e)},_refreshSortables:function(){y(".ui-sortable").sortable("refresh")},_initStrings:function(){y.validator.messages.required=FLBuilderStrings.validateRequiredMessage},_bindEvents:function(){var e=FLBuilderLayout._isTouch();$excludedLinks=y(".fl-builder-bar a, .fl-builder--content-library-panel a, .fl-page-nav .nav a"),y("a").not($excludedLinks).on("click",FLBuilder._preventDefault),y(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),y("body").on("click",".fl-builder-content a",FLBuilder._preventDefault),y("body").on("mouseup","button.fl-builder-button",this._buttonMouseUp.bind(this)),y(document).on("heartbeat-tick",FLBuilder._initPostLock),y(window).on("beforeunload",FLBuilder._warnBeforeUnload),y("body").on("click touchend",".fl-builder-has-submenu",FLBuilder._submenuParentClicked),y("body").on("click touchend",".fl-builder-has-submenu a",FLBuilder._submenuChildClicked),y("body").on("mouseenter",".fl-builder-submenu",FLBuilder._submenuMouseenter),y("body").on("mouseleave",".fl-builder-submenu",FLBuilder._submenuMouseleave),y("body").on("mouseenter",".fl-builder-submenu .fl-builder-has-submenu",FLBuilder._submenuNestedParentMouseenter),y(".fl-builder-panel-actions .fl-builder-panel-close").on("click",FLBuilder._closePanel),y(".fl-builder-blocks-section-title").on("click",FLBuilder._blockSectionTitleClicked),y("body").on("mousedown",".fl-builder-node-template-actions",FLBuilder._stopPropagation),y("body").on("mousedown",".fl-builder-node-template-edit",FLBuilder._stopPropagation),y("body").on("mousedown",".fl-builder-node-template-delete",FLBuilder._stopPropagation),y("body").on("click",".fl-builder-node-template-edit",FLBuilder._editNodeTemplateClicked),y("body").on("click",".fl-builder-node-template-delete",FLBuilder._deleteNodeTemplateClicked),y("body").on("mousedown",".fl-builder-block:not(.fl-builder-block-disabled)",FLBuilder._blockDragInit),y("body").on("mouseup",FLBuilder._blockDragCancel),y("body").on("click",".fl-builder-actions .fl-builder-cancel-button",FLBuilder._cancelButtonClicked),y("body").on("click",".fl-builder-save-user-template-button",FLBuilder._saveUserTemplateClicked),y("body").on("click",".fl-builder-duplicate-layout-button",FLBuilder._duplicateLayoutClicked),y("body").on("click",".fl-builder-layout-settings-button",FLBuilder._layoutSettingsClicked),y("body").on("click",".fl-builder-layout-settings .fl-builder-settings-save",FLBuilder._saveLayoutSettingsClicked),y("body").on("click",".fl-builder-layout-settings .fl-builder-settings-cancel",FLBuilder._cancelLayoutSettingsClicked),y("body").on("click",".fl-builder-global-settings-button",FLBuilder._globalSettingsClicked),y("body").on("click",".fl-builder-global-settings .fl-builder-settings-save",FLBuilder._saveGlobalSettingsClicked),y("body").on("click",".fl-builder-global-settings .fl-builder-settings-cancel",FLBuilder._cancelLayoutSettingsClicked),y("body").on("click",".fl-user-template",FLBuilder._userTemplateClicked),y("body").on("click",".fl-user-template-edit",FLBuilder._editUserTemplateClicked),y("body").on("click",".fl-user-template-delete",FLBuilder._deleteUserTemplateClicked),y("body").on("click",".fl-builder-template-replace-button",FLBuilder._templateReplaceClicked),y("body").on("click",".fl-builder-template-append-button",FLBuilder._templateAppendClicked),y("body").on("click",".fl-builder-template-actions .fl-builder-cancel-button",FLBuilder._templateCancelClicked),y("body").on("click",".fl-builder-user-template-settings .fl-builder-settings-save",FLBuilder._saveUserTemplateSettings),y("body").on("click",".fl-builder-help-tour-button",FLBuilder._startHelpTour),y("body").on("click",".fl-builder-knowledge-base-button",FLBuilder._viewKnowledgeBaseClicked),y("body").on("click",".fl-builder-forums-button",FLBuilder._visitForumsClicked),y("body").on("click",".fl-builder-no-tour-button",FLBuilder._noTourButtonClicked),y("body").on("click",".fl-builder-yes-tour-button",FLBuilder._yesTourButtonClicked),y("body").on("click",".fl-builder-alert-close",FLBuilder._alertClose),y("body").on("contextmenu",".fl-block-overlay",FLBuilder._onContextmenu),y("body").on("click touchend",".fl-row-overlay .fl-block-remove",FLBuilder._deleteRowClicked),y("body").on("click touchend",".fl-row-overlay .fl-block-copy",FLBuilder._rowCopyClicked),y("body").on("mousedown",".fl-row-overlay .fl-block-move",FLBuilder._rowDragInit),y("body").on("touchstart",".fl-row-overlay .fl-block-move",FLBuilder._rowDragInitTouch),y("body").on("click touchend",".fl-row-overlay .fl-block-settings",FLBuilder._rowSettingsClicked),y("body").on("click",".fl-builder-row-settings .fl-builder-settings-save",FLBuilder._saveSettings),e?y("body").on("touchend",".fl-row-overlay",FLBuilder._rowSettingsClicked):y("body").on("click",".fl-row-overlay",FLBuilder._rowSettingsClicked),y("body").on("click touchend",".fl-block-col-submenu .fl-block-row-reset",FLBuilder._resetRowWidthClicked),y("body").on("mousedown",".fl-col-overlay .fl-block-move",FLBuilder._colDragInit),y("body").on("touchstart",".fl-col-overlay .fl-block-move",FLBuilder._colDragInitTouch),y("body").on("click touchend",".fl-block-col-copy",FLBuilder._copyColClicked),y("body").on("click touchend",".fl-col-overlay .fl-block-remove",FLBuilder._deleteColClicked),y("body").on("click touchend",".fl-col-overlay .fl-block-settings",FLBuilder._colSettingsClicked),y("body").on("click",".fl-builder-col-settings .fl-builder-settings-save",FLBuilder._saveSettings),e?y("body").on("touchend",".fl-col-overlay",FLBuilder._colSettingsClicked):y("body").on("click",".fl-col-overlay",FLBuilder._colSettingsClicked),y("body").on("mousedown",".fl-block-col-submenu .fl-block-col-move",FLBuilder._colDragInit),y("body").on("touchstart",".fl-block-col-submenu .fl-block-col-move",FLBuilder._colDragInitTouch),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-edit",FLBuilder._colSettingsClicked),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-delete",FLBuilder._deleteColClicked),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-reset",FLBuilder._resetColumnWidthsClicked),y("body").on("mouseenter",".fl-block-col-submenu li",FLBuilder._showColHighlightGuide),y("body").on("mouseleave",".fl-block-col-submenu li",FLBuilder._removeColHighlightGuides),y("body").on("mousedown",".fl-block-col-submenu .fl-block-col-move-parent",FLBuilder._colDragInit),y("body").on("touchstart",".fl-block-col-submenu .fl-block-col-move-parent",FLBuilder._colDragInitTouch),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-edit-parent",FLBuilder._colSettingsClicked),y("body").on("click touchend",".fl-module-overlay .fl-block-remove",FLBuilder._deleteModuleClicked),y("body").on("click touchend",".fl-module-overlay .fl-block-copy",FLBuilder._moduleCopyClicked),y("body").on("mousedown",".fl-module-overlay .fl-block-move",FLBuilder._moduleDragInit),y("body").on("touchstart",".fl-module-overlay .fl-block-move",FLBuilder._moduleDragInitTouch),y("body").on("click touchend",".fl-module-overlay .fl-block-settings",FLBuilder._moduleSettingsClicked),y("body").on("click",".fl-builder-module-settings .fl-builder-settings-save",FLBuilder._saveModuleClicked),y("body").on("click touchend",".fl-module-overlay .fl-block-col-settings",FLBuilder._colSettingsClicked),e?y("body").on("touchend",".fl-module-overlay",FLBuilder._moduleSettingsClicked):y("body").on("click",".fl-module-overlay",FLBuilder._moduleSettingsClicked),y("body").on("click",".fl-builder-settings-save-as",FLBuilder._showNodeTemplateSettings),y("body").on("click",".fl-builder-node-template-settings .fl-builder-settings-save",FLBuilder._saveNodeTemplate),y("body").on("click",".fl-builder-settings-tabs a",FLBuilder._settingsTabClicked),y("body").on("show",".fl-builder-settings-tabs a",FLBuilder._calculateSettingsTabsOverflow),y("body").on("hide",".fl-builder-settings-tabs a",FLBuilder._calculateSettingsTabsOverflow),y("body").on("click",".fl-builder-settings-cancel",FLBuilder._settingsCancelClicked),y("body").on("click",".fl-builder-settings-tabs-overflow-menu > a",FLBuilder._settingsTabsToOverflowMenuItemClicked.bind(this)),y("body").on("click",".fl-builder-settings-tabs-more",FLBuilder._toggleTabsOverflowMenu.bind(this)),y("body").on("click",".fl-builder-settings-tabs-overflow-click-mask",FLBuilder._hideTabsOverflowMenu.bind(this)),y("body").on("mouseover",".fl-help-tooltip-icon",FLBuilder._showHelpTooltip),y("body").on("mouseout",".fl-help-tooltip-icon",FLBuilder._hideHelpTooltip),y("body").on("click",".fl-builder-field-add",FLBuilder._addFieldClicked),y("body").on("click",".fl-builder-field-copy",FLBuilder._copyFieldClicked),y("body").on("click",".fl-builder-field-delete",FLBuilder._deleteFieldClicked),y("body").on("click",".fl-photo-field .fl-photo-select",FLBuilder._selectSinglePhoto),y("body").on("click",".fl-photo-field .fl-photo-edit",FLBuilder._selectSinglePhoto),y("body").on("click",".fl-photo-field .fl-photo-replace",FLBuilder._selectSinglePhoto),y("body").on("click",".fl-photo-field .fl-photo-remove",FLBuilder._singlePhotoRemoved),y("body").on("click",".fl-multiple-photos-field .fl-multiple-photos-select",FLBuilder._selectMultiplePhotos),y("body").on("click",".fl-multiple-photos-field .fl-multiple-photos-edit",FLBuilder._selectMultiplePhotos),y("body").on("click",".fl-multiple-photos-field .fl-multiple-photos-add",FLBuilder._selectMultiplePhotos),y("body").on("click",".fl-video-field .fl-video-select",FLBuilder._selectSingleVideo),y("body").on("click",".fl-video-field .fl-video-replace",FLBuilder._selectSingleVideo),y("body").on("click",".fl-video-field .fl-video-remove",FLBuilder._singleVideoRemoved),y("body").on("click",".fl-multiple-audios-field .fl-multiple-audios-select",FLBuilder._selectMultipleAudios),y("body").on("click",".fl-multiple-audios-field .fl-multiple-audios-edit",FLBuilder._selectMultipleAudios),y("body").on("click",".fl-multiple-audios-field .fl-multiple-audios-add",FLBuilder._selectMultipleAudios),y("body").on("click",".fl-icon-field .fl-icon-select",FLBuilder._selectIcon),y("body").on("click",".fl-icon-field .fl-icon-replace",FLBuilder._selectIcon),y("body").on("click",".fl-icon-field .fl-icon-remove",FLBuilder._removeIcon),y("body").on("click",".fl-form-field .fl-form-field-edit",FLBuilder._formFieldClicked),y("body").on("click",".fl-form-field-settings .fl-builder-settings-save",FLBuilder._saveFormFieldClicked),y("body").on("click",".fl-layout-field-option",FLBuilder._layoutFieldClicked),y("body").on("click",".fl-link-field-select",FLBuilder._linkFieldSelectClicked),y("body").on("click",".fl-link-field-search-cancel",FLBuilder._linkFieldSelectCancelClicked),y("body").on("change",".fl-loop-data-source-select select[name=data_source]",FLBuilder._loopDataSourceChange),y("body").on("change",".fl-custom-query select[name=post_type]",FLBuilder._customQueryPostTypeChange),y("body").on("change",".fl-text-field-add-value",FLBuilder._textFieldAddValueSelectChange),y("body").on("focus",".fl-field input[type=number]",FLBuilder._onNumberFieldFocus),y("body").on("blur",".fl-field input[type=number]",FLBuilder._onNumberFieldBlur),FLBuilder.addHook("didCompleteAJAX",FLBuilder._refreshSettingsPreviewReference),FLBuilder.addHook("didRenderLayoutComplete",FLBuilder._refreshSettingsPreviewReference)},_unbindEvents:function(){y("a").off("click",FLBuilder._preventDefault),y(".fl-page-nav .nav a").off("click",FLBuilder._headerLinkClicked),y("body").undelegate(".fl-builder-content a","click",FLBuilder._preventDefault)},_rebindEvents:function(){y("a").on("click",FLBuilder._preventDefault),y(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),y("body").on("click",".fl-builder-content a",FLBuilder._preventDefault)},_bindOverlayEvents:function(){var e=y(FLBuilder._contentClass);e.on("mouseenter touchstart",".fl-row",FLBuilder._rowMouseenter),e.on("mouseleave",".fl-row",FLBuilder._rowMouseleave),e.on("mouseleave",".fl-row-overlay",FLBuilder._rowMouseleave),e.on("mouseenter touchstart",".fl-col",FLBuilder._colMouseenter),e.on("mouseleave",".fl-col",FLBuilder._colMouseleave),e.on("mouseenter touchstart",".fl-module",FLBuilder._moduleMouseenter),e.on("mouseleave",".fl-module",FLBuilder._moduleMouseleave)},_destroyOverlayEvents:function(){var e=y(FLBuilder._contentClass);e.undelegate(".fl-row","mouseenter touchstart",FLBuilder._rowMouseenter),e.undelegate(".fl-row","mouseleave",FLBuilder._rowMouseleave),e.undelegate(".fl-row-overlay","mouseleave",FLBuilder._rowMouseleave),e.undelegate(".fl-col","mouseenter touchstart",FLBuilder._colMouseenter),e.undelegate(".fl-col","mouseleave",FLBuilder._colMouseleave),e.undelegate(".fl-module","mouseenter touchstart",FLBuilder._moduleMouseenter),e.undelegate(".fl-module","mouseleave",FLBuilder._moduleMouseleave)},_onContextmenu:function(e){y(this).hide()},_preventDefault:function(e){e.preventDefault()},_stopPropagation:function(e){e.stopPropagation()},_headerLinkClicked:function(e){var t=y(this).attr("href");this.hash||(e.preventDefault(),FLBuilderConfig.isUserTemplate||(FLBuilder._exitUrl=-1<t.indexOf("?")?t:t+"?fl_builder",FLBuilder.triggerHook("triggerDone")))},_warnBeforeUnload:function(){var e=0<y(".fl-builder-row-settings").length,t=0<y(".fl-builder-col-settings").length,i=0<y(".fl-builder-module-settings").length;if(e||t||i)return FLBuilderStrings.unloadWarning},_upgradeClicked:function(){window.open(FLBuilderConfig.upgradeUrl)},_toggleProModules:function(){var e=y(".fl-builder-blocks-pro-expand"),t=y(".fl-builder-blocks-pro-closed"),i=y(".fl-builder-blocks-pro-open");e.toggleClass("fl-builder-blocks-pro-expand-rotate"),t.length?(t.removeClass("fl-builder-blocks-pro-closed"),t.addClass("fl-builder-blocks-pro-open")):(i.removeClass("fl-builder-blocks-pro-open"),i.addClass("fl-builder-blocks-pro-closed"))},_showProMessage:function(e){var t,i;FLBuilderConfig.lite&&(t=new FLLightbox({className:"fl-builder-pro-lightbox",destroyOnClose:!0}),i=wp.template("fl-pro-lightbox"),t.open(i({feature:e})))},_initTipTips:function(){var e=y(".fl-tip:not(.fl-has-tip)");e.each(function(){var e=y(this);e.addClass("fl-has-tip"),null==e.attr("data-title")&&e.attr("data-title",e.attr("title"))}),FLBuilderLayout._isTouch()||e.tipTip({defaultPosition:"top",delay:300,maxWidth:"auto"})},_hideTipTips:function(){y("#tiptip_holder").stop().hide()},_submenuParentClicked:function(e){var t=y("body"),i=y(this),l=i.find(".fl-builder-submenu");i.hasClass("fl-builder-submenu-open")?(t.removeClass("fl-builder-submenu-open"),i.removeClass("fl-builder-submenu-open"),i.removeClass("fl-builder-submenu-right")):(i.offset().left+l.width()>y(window).width()&&i.addClass("fl-builder-submenu-right"),t.addClass("fl-builder-submenu-open"),i.addClass("fl-builder-submenu-open")),l.closest(".fl-row-overlay").addClass("fl-row-menu-active"),FLBuilder._hideTipTips(),e.preventDefault(),e.stopPropagation()},_submenuChildClicked:function(e){var t=y("body"),i=y(this).parents(".fl-builder-has-submenu");i.parents(".fl-builder-has-submenu").length||(t.removeClass("fl-builder-submenu-open"),i.removeClass("fl-builder-submenu-open"))},_submenuMouseenter:function(e){var t=y(this).data("timeout");void 0!==t&&clearTimeout(t)},_submenuMouseleave:function(e){var t=y("body"),i=y(this),l=setTimeout(function(){t.removeClass("fl-builder-submenu-open"),i.closest(".fl-builder-has-submenu").removeClass("fl-builder-submenu-open")},500);i.closest(".fl-row-overlay").removeClass("fl-row-menu-active"),i.data("timeout",l)},_submenuNestedParentMouseenter:function(e){var t=y(this),i=t.find(".fl-builder-submenu");t.width()+t.offset().left+i.width()>y(window).width()&&t.addClass("fl-builder-submenu-right")},_closeAllSubmenus:function(){y(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},_buttonMouseUp:function(e){y(e.currentTarget).blur()},_closePanel:function(){FLBuilder.triggerHook("hideContentPanel")},_showPanel:function(){FLBuilder.triggerHook("showContentPanel")},_togglePanel:function(){FLBuilder.triggerHook("toggleContentPanel")},_blockSectionTitleClicked:function(){var e=y(this).parent();e.hasClass("fl-active")?e.removeClass("fl-active"):(y(".fl-builder-blocks-section").removeClass("fl-active"),e.addClass("fl-active")),FLBuilder._initScrollbars()},_publishLayout:function(e,t){if(FLBuilder._triggerSettingsSave(t,!0)){_.isUndefined(e)&&(e=!0);const i=FL.Builder.data.getLayoutActions();t=FLBuilder._onPublishComplete.bind(FLBuilder,e);i.saveLayout(!0,e,t)}},_publishButtonClicked:function(e){FLBuilder._publishLayout(e)},_onPublishComplete:function(e){e&&(FLBuilderConfig.shouldRefreshOnPublish?FLBuilder._exit():FLBuilder._exitWithoutRefresh()),y("#wp-admin-bar-fl-builder-frontend-edit-link .fl-builder-admin-bar-status-dot").css("color","#6bc373"),FLBuilder.triggerHook("didPublishLayout",{shouldExit:e})},_draftButtonClicked:function(){FLBuilder.showAjaxLoader();const e=FL.Builder.data.getLayoutActions();e.saveDraft()},_discardButtonClicked:function(){if(confirm(FLBuilderStrings.discardMessage)){FLBuilder.showAjaxLoader();const e=FL.Builder.data.getLayoutActions();e.discardDraft()}else FLBuilder.triggerHook("didCancelDiscard")},_cancelButtonClicked:function(){FLBuilder._exitUrl=null,FLBuilder._actionsLightbox.close()},_exit:function(){var e=window.location.href;try{var t=void 0!==window.opener.FLBuilder}catch(e){t=!1}FLBuilderConfig.isUserTemplate&&void 0!==window.opener&&window.opener?(t&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):(e=FLBuilder._exitUrl||(e=(e=e.replace("?fl_builder&","?")).replace("?fl_builder","")).replace("&fl_builder",""),window.location.href=e)},_exitWithoutRefresh:function(){window.location.href;try{var t=void 0!==window.opener.FLBuilder}catch(e){t=!1}FLBuilderConfig.isUserTemplate&&t&&window.opener?(t&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):FLBuilder.triggerHook("endEditingSession")},_duplicateLayoutClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"duplicate_post"},FLBuilder._duplicateLayoutComplete)},_duplicateLayoutComplete:function(e){var t=FLBuilderConfig.adminUrl;window.location.href=t+"post.php?post="+e+"&action=edit"},_layoutSettingsClicked:function(){FLBuilderSettingsForms.render({id:"layout",className:"fl-builder-layout-settings",settings:FLBuilderSettingsConfig.settings.layout},function(){FLBuilder._layoutSettingsInitCSS()})},_layoutSettingsInitCSS:function(){var e=y(".fl-builder-settings #fl-field-css textarea:not(.ace_text-input)");e.on("change",FLBuilder._layoutSettingsCSSChanged),FLBuilder._layoutSettingsCSSCache=e.val()},_layoutSettingsCSSChanged:function(){FLBuilder._layoutSettingsCSSTimeout&&clearTimeout(FLBuilder._layoutSettingsCSSTimeout),FLBuilder._layoutSettingsCSSTimeout=setTimeout(y.proxy(FLBuilder._layoutSettingsCSSDoChange,this),600)},_layoutSettingsCSSDoChange:function(){var e=y(".fl-builder-settings"),t=y(this);0<t.parents("#fl-field-css").find(".ace_error").length||((e.hasClass("fl-builder-layout-settings")?y("#fl-builder-layout-css"):y("#fl-builder-global-css")).html(t.val()),FLBuilder._layoutSettingsCSSTimeout=null)},_saveLayoutSettingsClicked:function(){for(var e=y(this).closest(".fl-builder-settings").serializeArray(),t={},i=0;i<e.length;i++)t[e[i].name]=e[i].value;FLBuilder.showAjaxLoader(),FLBuilder._lightbox.close(),FLBuilder._layoutSettingsCSSCache=null;const l=FL.Builder.data.getLayoutActions();l.saveLayoutSettings(t)},_cancelLayoutSettingsClicked:function(){(y(".fl-builder-settings").hasClass("fl-builder-layout-settings")?y("#fl-builder-layout-css"):y("#fl-builder-global-css")).html(FLBuilder._layoutSettingsCSSCache),FLBuilder._layoutSettingsCSSCache=null},_saveLayoutSettingsComplete:function(e){FLBuilder.triggerHook("didSaveLayoutSettingsComplete",e),FLBuilder._updateLayout()},_globalSettingsClicked:function(){FLBuilderSettingsForms.render({id:"global",className:"fl-builder-global-settings",settings:FLBuilderSettingsConfig.settings.global},function(){FLBuilder._layoutSettingsInitCSS()})},_saveGlobalSettingsClicked:function(){var e=y(this).closest(".fl-builder-settings"),t=e.validate().form(),e=FLBuilder._getSettings(e);if(t){FLBuilder.showAjaxLoader(),FLBuilder._layoutSettingsCSSCache=null;const i=FL.Builder.data.getLayoutActions();i.saveGlobalSettings(e),FLBuilder._lightbox.close()}},_saveGlobalSettingsComplete:function(e){FLBuilder.triggerHook("didSaveGlobalSettingsComplete",FLBuilder._jsonParse(e)),FLBuilder._updateLayout()},_initTemplateSelector:function(){0<y(FLBuilder._contentClass).find(".fl-row").length||FLBuilder.ContentPanel.show("modules")},_requestTemplateInsert:function(e,t){FLBuilder.layoutHasContent()?0==e?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate(0,!1,t)):(FLBuilder._selectedTemplateId=e,FLBuilder._selectedTemplateType=t,FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(e,!1,t)},_showTemplateActions:function(){var e=[];e[10]={key:"template-replace",label:FLBuilderStrings.templateReplace},e[20]={key:"template-append",label:FLBuilderStrings.templateAppend},FLBuilder._showActionsLightbox({className:"fl-builder-template-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_templateReplaceClicked:function(){confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!1,FLBuilder._selectedTemplateType))},_templateAppendClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!0,FLBuilder._selectedTemplateType)},_templateCancelClicked:function(){FLBuilder.triggerHook("showContentPanel")},_applyTemplate:function(e,t,i){t=void 0!==t&&t?"1":"0",i=void 0===i?"core":i,FLBuilder._lightbox.close(),FLBuilder.showAjaxLoader();const l=FL.Builder.data.getLayoutActions();l.applyTemplate(e,t,i),FLBuilder.triggerHook("didApplyTemplate")},_applyTemplateComplete:function(e){e=FLBuilder._jsonParse(e);FLBuilder._renderLayout(e.layout),FLBuilder.triggerHook("didApplyTemplateComplete",e.config)},_applyUserTemplateComplete:function(e){e=FLBuilder._jsonParse(e);null!==e.layout_css&&y("#fl-builder-layout-css").html(e.layout_css),FLBuilder._renderLayout(e.layout),FLBuilder.triggerHook("didApplyTemplateComplete",e.config)},_saveUserTemplateClicked:function(){FLBuilderConfig.lite?FLBuilder._showProMessage("Saving Templates"):FLBuilderSettingsForms.render({id:"user_template",className:"fl-builder-user-template-settings",rules:{name:{required:!0}}})},_saveUserTemplateSettings:function(){var e=y(this).closest(".fl-builder-settings"),t=e.validate().form(),e=FLBuilder._getSettings(e);if(t){const i=FL.Builder.data.getLayoutActions();i.saveUserTemplateSettings(e),FLBuilder._lightbox.close()}},_saveUserTemplateSettingsComplete:function(e){e&&(e=FLBuilder._jsonParse(e),FLBuilderConfig.contentItems.template.push(e),FLBuilder.triggerHook("contentItemsChanged"))},_userTemplateClicked:function(){var e=y(this).attr("data-id");0<y(FLBuilder._contentClass).children(".fl-row").length?"blank"==e?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate("blank",!1,"user")):(FLBuilder._selectedTemplateId=e,FLBuilder._selectedTemplateType="user",FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(e,!1,"user")},_editUserTemplateClicked:function(e){e.preventDefault(),e.stopPropagation(),window.open(y(this).attr("href"))},_deleteUserTemplateClicked:function(e){var t=y(this).closest(".fl-user-template").attr("data-id"),i=(y(".fl-user-template[data-id="+t+"]"),null),l=null;if(confirm(FLBuilderStrings.deleteTemplate)){const o=FL.Builder.data.getLayoutActions();for(l in o.deleteUserTemplate(t),FLBuilderConfig.contentItems.template)FLBuilderConfig.contentItems.template[l].postId==t&&(i=l);_.isNull(i)||(FLBuilderConfig.contentItems.template.splice(i,1),FLBuilder.triggerHook("contentItemsChanged"))}e.stopPropagation()},_viewKnowledgeBaseClicked:function(){window.open(FLBuilderConfig.help.knowledge_base_url)},_visitForumsClicked:function(){window.open(FLBuilderConfig.help.forums_url)},_showTourOrTemplates:function(){FLBuilderConfig.simpleUi||FLBuilderConfig.isUserTemplate||(FLBuilderConfig.help.tour&&FLBuilderConfig.newUser?FLBuilder._showTourLightbox():FLBuilder._initTemplateSelector())},_doStats:function(){1==FLBuilderConfig.statsEnabled&&(args={"screen-width":screen.width,"screen-height":screen.height,"pixel-ratio":window.devicePixelRatio,"user-agent":window.navigator.userAgent,isrtl:FLBuilderConfig.isRtl},FLBuilder.ajax({action:"save_browser_stats",browser_data:args}))},_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 e=y(FLBuilder._contentClass);FLBuilderConfig.isUserTemplate&&"module"==FLBuilderConfig.userTemplateType||FLBuilderConfig.isUserTemplate&&"column"==FLBuilderConfig.userTemplateType||(e.removeClass("fl-builder-empty"),e.find(".fl-builder-empty-message").remove(),e.find(".fl-row, .fl-builder-block").length||(e.addClass("fl-builder-empty"),e.append('<span class="fl-builder-empty-message">'+FLBuilderStrings.emptyMessage+"</span>"),FLBuilder._initSortables()))},_updateNode:function(e,t){if(y(".fl-node-"+e).length){FLBuilder._showNodeLoading(e);const i=FL.Builder.data.getLayoutActions();i.renderNode(e,t)}},_updateLayout:function(){FLBuilder.showAjaxLoader();const e=FL.Builder.data.getLayoutActions();e.renderLayout(),e.fetchLayout()},_renderLayout:function(e,t){FLBuilder._layout?FLBuilder._layoutQueue.push({data:e,callback:t}):FLBuilder._layout=new FLBuilderAJAXLayout(e,t)},_renderLayoutComplete:function(){var e;FLBuilder._layout&&(FLBuilder._layout._complete(),FLBuilder._layout=null),FLBuilder._layoutQueue.length&&(e=FLBuilder._layoutQueue.shift(),FLBuilder._layout=new FLBuilderAJAXLayout(e.data,e.callback))},_resizeLayout:function(){y(window).trigger("resize"),"undefined"!=typeof YUI&&YUI().use("node-event-simulate",function(e){e.one(window).simulate("resize")})},layoutHasContent:function(){return 0<y(FLBuilder._contentClass).children(".fl-row").length},_initMediaElements:function(){var e={};void 0!==y.fn.mediaelementplayer&&("undefined"!=typeof _wpmejsSettings&&(e.pluginPath=_wpmejsSettings.pluginPath),y(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").mediaelementplayer(e))},_initDropTargets:function(){var e="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",t=y(FLBuilder._contentClass+" .fl-row"),i=null,l=y(FLBuilder._contentClass+" .fl-row"+e).find(".fl-col-group"),o=null,n=null,e="column"==FLBuilderConfig.userTemplateType?y(FLBuilder._contentClass+"> .fl-col").eq(0):null,s=0;for(y(".fl-col-drop-target").remove(),y(".fl-col-group-drop-target").remove(),y(".fl-row-drop-target").remove(),y(FLBuilder._contentClass).append('<div class="fl-drop-target fl-row-drop-target"></div>'),t.prepend('<div class="fl-drop-target fl-row-drop-target"></div>'),t.append('<div class="fl-drop-target fl-drop-target-last fl-row-drop-target fl-row-drop-target-last"></div>');s<t.length;s++)0===(i=t.eq(s)).find(".fl-col-group").length&&i.find(".fl-row-content").prepend('<div class="fl-drop-target fl-col-group-drop-target"></div>');for(e&&0===l.length&&(l=e.find(".fl-col-group"),e.append('<div class="fl-drop-target fl-col-drop-target"></div>'),e.append('<div class="fl-drop-target fl-drop-target-last fl-col-drop-target fl-col-drop-target-last"></div>')),s=0;s<l.length;s++)n=(o=l.eq(s)).find("> .fl-col"),o.hasClass("fl-col-group-nested")||(o.append('<div class="fl-drop-target fl-col-group-drop-target"></div>'),o.append('<div class="fl-drop-target fl-drop-target-last fl-col-group-drop-target fl-col-group-drop-target-last"></div>')),n.append('<div class="fl-drop-target fl-col-drop-target"></div>'),n.append('<div class="fl-drop-target fl-drop-target-last fl-col-drop-target fl-col-drop-target-last"></div>')},_blockDragHelper:function(e,t){var i=t.clone();return t.clone().insertAfter(t),i.addClass("fl-builder-block-drag-helper"),i},_blockDragInit:function(e){var t=y(e.currentTarget),i=null,l=y(window).scrollTop(),o=0;FLBuilder._dragEnabled=!0,FLBuilder._dragInitialScrollTop=l,0<t.closest("[data-node]").length?(i=t.closest("[data-node]")).addClass("fl-node-drag-init"):t.hasClass("fl-builder-block")&&y(".fl-row").each(function(){null===i&&0<y(this).offset().top-l&&(i=y(this))}),null!==i&&(o=i.offset().top-l),FLBuilder._highlightRowsAndColsForDrag(t),FLBuilder._adjustColHeightsForDrag(),FLBuilder._disableGlobalRows(),FLBuilder._disableGlobalCols(),FLBuilder._destroyOverlayEvents(),FLBuilder._initSortables(),y("body").addClass("fl-builder-dragging"),y(".fl-builder-empty-message").hide(),y(".fl-sortable-disabled").removeClass("fl-sortable-disabled"),"touchstart"===e.type||y(e.target).hasClass("fl-sortable-proxy-item ")||FLBuilder._removeAllOverlays(),0<o&&scrollTo(0,i.offset().top-o),FLBuilder.triggerHook("didInitDrag")},_blockDragStart:function(e,t){FLBuilder._dragging=!0,y(".fl-node-drag-init").removeClass("fl-node-drag-init"),FLBuilder.triggerHook("didStartDrag")},_blockDragSort:function(e,t){var i=t.placeholder.parent(),l=FLBuilderStrings.insert;FLBuilder._blockPreventSort(t.item,i)||(i.hasClass("fl-col-content")?l=t.item.hasClass("fl-builder-block-row")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-col-sortable-proxy-item")?FLBuilderStrings.column:t.item.hasClass("fl-builder-block-module")||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"):i.hasClass("fl-col-drop-target")||i.hasClass("fl-col-group-drop-target")?l="":i.hasClass("fl-row-drop-target")&&(l=t.item.hasClass("fl-builder-block-row")||t.item.hasClass("fl-builder-block-saved-row")||t.item.hasClass("fl-builder-block-saved-column")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-row-sortable-proxy-item")?FLBuilderStrings.row:FLBuilderStrings.newRow),t.placeholder.html(l),t.item.hasClass("fl-node-global")||t.item.hasClass("fl-builder-block-global")||y(".fl-node-dragging").hasClass("fl-node-global")?t.placeholder.addClass("fl-builder-drop-zone-global"):t.placeholder.removeClass("fl-builder-drop-zone-global"))},_blockDragChange:function(e,t){t.placeholder.css("opacity","0"),t.placeholder.animate({opacity:"1"},100)},_blockPreventSort:function(e,t){var i=!1,l=e.hasClass("fl-builder-block-row"),o=e.hasClass("fl-col-sortable-proxy-item"),n=t.hasClass("fl-col-content"),s=t.hasClass("fl-col-drop-target"),r=t.parents(".fl-col-group:not(.fl-col-group-nested)"),a=t.parents(".fl-col-group-nested");return(l||o)&&n&&0<a.length&&(i=!0),n&&!t.find(".fl-module, .fl-col").length&&(l&&"1-col"==e.data("cols")||o)&&(i=!0),l&&n&&-1<y.inArray(e.data("cols"),["5-cols","6-cols"])&&(i=!0),o&&0<y(".fl-node-dragging").find(".fl-col-group-nested").length&&(n||s&&0<a.length)&&(i=!0),s&&0<r.length&&0===a.length&&11<r.find("> .fl-col:visible").length&&(i=!0),(i=s&&0<a.length&&3<a.find(".fl-col:visible").length?!0:i)&&t.addClass("fl-sortable-disabled"),i},_blockDragStop:function(e,t){var i=y(window).scrollTop(),l=t.item.parent(),t=null,t=l.hasClass("fl-drop-target")&&l.closest("[data-node]").length?(l=l.closest("[data-node]")).offset().top-i:l.offset().top-i;l.hasClass("fl-builder-blocks-section-content")&&FLBuilder._showPanel(),FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._removeEmptyRowAndColHighlights(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._enableGlobalCols(),FLBuilder._setupEmptyLayout(),y("body").removeClass("fl-builder-dragging"),scrollTo(0,l.offset().top-t),FLBuilder.triggerHook("didStopDrag")},_blockDragCancel:function(){FLBuilder._dragEnabled&&!FLBuilder._dragging&&(FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._removeEmptyRowAndColHighlights(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._setupEmptyLayout(),y("body").removeClass("fl-builder-dragging"),y(".fl-node-drag-init").removeClass("fl-node-drag-init"),y(".fl-node-dragging").removeClass("fl-node-dragging"),scrollTo(0,FLBuilder._dragInitialScrollTop))},_reorderNode:function(e,t){const i=FL.Builder.getActions();i.moveNode(e,t)},_reorderNodeComplete:function(e){var t=FLBuilder._jsonParse(e),e="didMove"+t.nodeType.charAt(0).toUpperCase()+t.nodeType.slice(1);FLBuilder.triggerHook("didMoveNode",t),FLBuilder.triggerHook(e,t)},_moveNode:function(e,t,i){const l=FL.Builder.getActions();l.moveNode(t,i,e)},_moveNodeComplete:function(e){const t=FLBuilder._jsonParse(e);e="didMove"+t.nodeType.charAt(0).toUpperCase()+t.nodeType.slice(1);FLBuilder.triggerHook("didMoveNode",t),FLBuilder.triggerHook(e,t)},_removeAllOverlays:function(){FLBuilder._removeRowOverlays(),FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._removeModuleOverlays(),FLBuilder._hideTipTips(),FLBuilder._closeAllSubmenus()},_appendOverlay:function(e,t){var i=0,l=null,o=e.hasClass("fl-row")?e.find("> .fl-row-content-wrap"):e.find("> .fl-node-content"),n=parseInt(o.css("margin-top"),10),o=parseInt(o.css("margin-bottom"),10);return e.append(t),e.addClass("fl-block-overlay-active"),FLBuilder._initTipTips(),l=e.find("> .fl-block-overlay"),n<0&&(i=parseInt(l.css("top"),10),i=isNaN(i)?0:i,l.css("top",n+i+"px")),o<0&&(i=parseInt(l.css("bottom"),10),i=isNaN(i)?0:i,l.css("bottom",o+i+"px")),l},_buildOverlayOverflowMenu:function(e){var t,i=e.find(".fl-block-overlay-header"),l=e.find(".fl-block-overlay-actions"),o=e.find(".fl-block-has-rules"),n=l.data("original"),s=null,r=0,a=null,d=0,u=[],c=[],h=[],e=wp.template("fl-overlay-overflow-menu");for(null!=n&&(l.after(n),l.remove(),l=n),l.data("original",l.clone()),t=Math.floor(l[0].getBoundingClientRect().width)-8,s=l.find(" > i, > span.fl-builder-has-submenu"),o.length&&t+o.outerWidth()>i.outerWidth()&&(r+=o.outerWidth());d<s.length;d++)a=s.eq(d),t<(r+=Math.floor(a[0].getBoundingClientRect().width))?(c.push(a),a.remove()):u.push(a);if(0<c.length){for(0<u.length&&c.unshift(u.pop().remove()),d=0;d<c.length;d++)c[d].is(".fl-builder-has-submenu")?h.push({type:"submenu",label:c[d].find(".fa, .fas, .far").data("title"),submenu:c[d].find(".fl-builder-submenu")[0].outerHTML}):h.push({type:"action",label:c[d].data("title"),className:c[d].removeClass(function(e,t){return t.replace(/fl-block-([^\s]+)/,"")}).attr("class")});l.append(e(h)),FLBuilder._initTipTips()}},_removeRowOverlays:function(){y(".fl-row").removeClass("fl-block-overlay-active"),y(".fl-row-overlay").remove(),y(".fl-module").removeClass("fl-module-adjust-height"),y("body").removeClass("fl-builder-row-resizing"),FLBuilder._closeAllSubmenus()},_disableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&y(".fl-row.fl-node-global").addClass("fl-node-disabled")},_disableGlobalCols:function(){"column"!=FLBuilderConfig.userTemplateType&&y(".fl-row:not(.fl-node-global) .fl-col.fl-node-global").addClass("fl-node-disabled")},_enableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&y(".fl-node-disabled").removeClass("fl-node-disabled")},_enableGlobalCols:function(){"column"!=FLBuilderConfig.userTemplateType&&y(".fl-node-disabled").removeClass("fl-node-disabled")},_rowMouseenter:function(){var e=y(this),t=e.attr("data-node"),i=e.offset().top,l=null,o=null,n=wp.template("fl-row-overlay"),s=FLBuilderResponsiveEditing._mode;e.closest(".fl-builder-node-loading").length||e.hasClass("fl-block-overlay-active")||(FLBuilder._removeRowOverlays(),o=FLBuilder._appendOverlay(e,n({node:t,global:e.hasClass("fl-node-global"),hasRules:e.hasClass("fl-node-has-rules"),rulesTextRow:e.attr("data-rules-text"),rulesTypeRow:e.attr("data-rules-type")})),e.find(".fl-node-content:visible").each(function(){var e=y(this).offset().top;l=null===l||e<l?e:l}),null!==l&&l<i&&o.css("top",l-i-30+"px"),("default"===s&&o.offset().top<43||"default"!==s&&0===e.index())&&o.addClass("fl-row-overlay-header-bottom"),e.find(".fl-module").each(function(){var e=y(this);e.outerHeight(!0)<20&&e.addClass("fl-module-adjust-height")}),FLBuilder._buildOverlayOverflowMenu(o))},_rowMouseleave:function(e){var t=y(e.target),i=y(e.toElement)||y(e.relatedTarget),l=i.hasClass("fl-row-overlay"),o=0<i.closest(".fl-row-overlay").length,e=i.is("#tiptip_holder"),i=0<i.closest("#tiptip_holder").length;t.closest(".fl-block-col-resize").length||l||o||e||i||FLBuilder._removeRowOverlays()},_rowDragHelper:function(){return y('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.row+"</div>")},_rowDragInit:function(e){var t=y(e.target),i=y(".fl-row-sortable-proxy-item");t.closest(".fl-row").addClass("fl-node-dragging"),FLBuilder._blockDragInit(e),e.target=i[0],i.trigger(e)},_rowDragInitTouch:function(t){var e=y(t.target),i=y(".fl-row-sortable-proxy-item"),l=e.closest(".fl-row"),o=!1;e.on("touchmove",function(e){o||(t.currentTarget=l[0],FLBuilder._rowDragInit(t),o=!0),i.trigger(e)}),e.on("touchend",function(e){i.trigger(e)})},_rowDragStart:function(e,t){var i=y(FLBuilder._contentClass+" .fl-row"),l=y(".fl-node-dragging");1===i.length&&y(FLBuilder._contentClass).addClass("fl-builder-empty"),l.hide(),FLBuilder._blockDragStart(e,t)},_rowDragStop:function(e,t){var i=t.item,l=i.parent(),o=null,n=0;if(FLBuilder._blockDragStop(e,t),l.hasClass("fl-builder-rows"))i.remove();else if(l.hasClass("fl-row-sortable-proxy"))y(".fl-node-dragging").removeClass("fl-node-dragging").show();else if(i.hasClass("fl-builder-block")){if(l.hasClass("fl-sortable-disabled"))return i.remove(),void FLBuilder._showPanel();l.hasClass("fl-col-content")?FLBuilder._addColGroup(i.closest(".fl-col").attr("data-node"),i.attr("data-cols"),l.find("> .fl-module, .fl-col-group, .fl-builder-block").index(i)):l.hasClass("fl-col-drop-target")?FLBuilder._addCols(l.closest(".fl-col"),l.hasClass("fl-col-drop-target-last")?"after":"before",i.attr("data-cols"),0<l.closest(".fl-col-group-nested").length):l.hasClass("fl-col-group-drop-target")?(e=i.closest(".fl-col-group"),n=i.closest(".fl-row").find(".fl-row-content > .fl-col-group").index(e),FLBuilder._addColGroup(i.closest(".fl-row").attr("data-node"),i.attr("data-cols"),l.hasClass("fl-drop-target-last")?n+1:n)):(n=(o=i.closest(".fl-row")).length?y(FLBuilder._contentClass+" > .fl-row").index(o):0,FLBuilder._addRow(i.attr("data-cols"),l.hasClass("fl-drop-target-last")?n+1:n)),i.remove(),FLBuilder._showPanel(),y(".fl-builder-modules").siblings(".fl-builder-blocks-section-title").eq(0).trigger("click")}else o=y(".fl-node-dragging").removeClass("fl-node-dragging").show(),l.parent().hasClass("fl-builder-content")||(l.hasClass("fl-drop-target-last")?l.parent().after(o):l.parent().before(o),FLBuilder._reorderNode(o.attr("data-node"),o.index())),y(".fl-row-sortable-proxy").append(t.item)},_addRow:function(e,t,i){FLBuilder._showNodeLoadingPlaceholder(y(FLBuilder._contentClass),t),FLBuilder._newRowPosition=t;const l=FL.Builder.data.getLayoutActions();l.addRow(e,t,i)},_addRowComplete:function(e){var t="object"==typeof e?e:FLBuilder._jsonParse(e),e=y(FLBuilder._contentClass),i=y(t.html).data("node");t.nodeParent=e,t.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(t,function(){FLBuilder._removeNodeLoadingPlaceholder(y(".fl-node-"+i)),FLBuilder.triggerHook("didAddRow",i)})},_deleteRowClicked:function(e){var t=y(e.target).closest(".fl-row").data("node");FL.Builder.getActions().deleteNode(t),e.stopPropagation()},_deleteRow:function(e){var t=e.attr("data-node");const i=FL.Builder.data.getLayoutActions();i.deleteNode(t),e.empty(),e.remove(),FLBuilder._setupEmptyLayout(),FLBuilder._removeRowOverlays(),FLBuilder.triggerHook("didDeleteRow",t)},_rowCopyClicked:function(e){var t=y(this).closest(".fl-row").attr("data-node");FLBuilder._copyRow(t),e.stopPropagation()},_copyRow:function(t){var e=FLBuilder._getJQueryElement(t),i=e.clone(),l=y(".fl-builder-settings[data-node]"),o=l.attr("data-node"),n=o===t?e:e.find('[data-node="'+o+'"]'),s=null;l.length&&n.length&&(s=FLBuilder._getSettings(l),FLBuilderSettingsConfig.nodes[o]=s),i.addClass("fl-node-"+t+"-clone fl-builder-node-clone"),i.find(".fl-block-overlay").remove(),e.after(i),FLBuilder._showNodeLoading(t+"-clone");const r=i.get(0);r.scrollIntoView({behavior:"smooth",block:"center"});const a=FL.Builder.data.getLayoutActions();a.copyRow(t,s,o,function(e){e=FLBuilder._jsonParse(e);e.nodeParent=y(FLBuilder._contentClass),e.nodePosition=y(FLBuilder._contentClass+" > .fl-row").index(i),e.duplicatedRow=t,e.onAddNewHTML=function(){i.remove()},FLBuilder._rowCopyComplete(e)})},_rowCopyComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateRow",{newNodeId:e.nodeId,oldNodeId:e.duplicatedRow})})},_rowSettingsClicked:function(e){var t=y(this),i=y(this).closest(".fl-row").attr("data-node"),l=0<t.closest(".fl-block-overlay-global").length;if(t.hasClass("fl-block-settings")||l&&"row"!=FLBuilderConfig.userTemplateType){const o=FL.Builder.data.getLayoutActions();o.displaySettings(i)}e.stopPropagation()},_showRowSettings:function(e,t){let i=null;t&&"row"!=FLBuilderConfig.userTemplateType?FLBuilderConfig.userCanEditGlobalTemplates&&(i=window.open(y('.fl-row[data-node="'+e+'"]').attr("data-template-url")),i.FLBuilderGlobalNodeId=e):FLBuilderSettingsForms.render({id:"row",nodeId:e,className:"fl-builder-row-settings",attrs:'data-node="'+e+'"',buttons:t||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:t?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[e],preview:{type:"row"}},function(){y("#fl-field-width select").on("change",FLBuilder._rowWidthChanged),y("#fl-field-content_width select").on("change",FLBuilder._rowWidthChanged)})},_rowWidthChanged:function(){var e=y("#fl-field-width select").val(),t=y("#fl-field-content_width select").val(),i=y("#fl-field-max_content_width");"fixed"==e||"full"==e&&"fixed"==t?i.show():i.hide()},_resetRowWidthClicked:function(e){var t=y(this).closest(".fl-row"),i=t.attr("data-node"),l=t.find(".fl-row-content"),o=FLBuilderConfig.global.row_width+"px",n=y(".fl-builder-row-settings");t.hasClass("fl-row-fixed-width")&&t.css("max-width",o),l.css("max-width",o),n.length&&n.find("[name=max_content_width]").val("");const s=FL.Builder.data.getLayoutActions();s.resetRowWidth(i),FLBuilder._closeAllSubmenus(),FLBuilder.triggerHook("didResetRowWidth",i),e.stopPropagation()},_highlightEmptyCols:function(){var e="row"==FLBuilderConfig.userTemplateType||"column"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",e=(y(FLBuilder._contentClass+" .fl-row"+e),y(FLBuilder._contentClass+" .fl-col"+e));e.removeClass("fl-col-highlight").find(".fl-col-content").css("height",""),e.each(function(){var e=y(this);0===e.find(".fl-module, .fl-col").length&&e.addClass("fl-col-highlight")})},_highlightRowsAndColsForDrag:function(e){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)";"column"==FLBuilderConfig.userTemplateType&&(t=":not(:first)"),y(FLBuilder._contentClass+" .fl-row").addClass("fl-row-highlight"),e&&e.closest(".fl-row-overlay").length||y(FLBuilder._contentClass+" .fl-col"+t).addClass("fl-col-highlight")},_removeEmptyRowAndColHighlights:function(){y(".fl-row-highlight").removeClass("fl-row-highlight"),y(".fl-col-highlight").removeClass("fl-col-highlight")},_adjustColHeightsForDrag:function(){var e="row"==FLBuilderConfig.userTemplateType?"":".fl-row:not(.fl-node-global) ",t="column"==FLBuilderConfig.userTemplateType?"":".fl-col:not(.fl-node-global) ",i=y(FLBuilder._contentClass),l=i.find(e+".fl-col-group:not(.fl-col-group-nested) > "+t+"> .fl-col-content"),o=i.find(e+".fl-col-group-nested "+t+".fl-col-content"),n=0;for(y(".fl-node-drag-init").hide();n<o.length;n++)FLBuilder._adjustColHeightForDrag(o.eq(n));for(n=0;n<l.length;n++)FLBuilder._adjustColHeightForDrag(l.eq(n));y(".fl-node-drag-init").show()},_adjustColHeightForDrag:function(e){e.find(".fl-module:visible, .fl-col:visible").length&&e.height(e.height()+45)},_showColHighlightGuide:function(){var e=y(this),t=e.find("a"),i=e.closest(".fl-col"),l=i.parents(".fl-col"),o=y('<div class="fl-col-highlight-guide"></div>'),e=e.closest(".fl-block-overlay").offset().top;(i=t.hasClass("fl-block-col-move-parent")||t.hasClass("fl-block-col-edit-parent")?l:i).hasClass("fl-col-highlight")||(i.find("> .fl-col-content").append(o),i.addClass("fl-col-has-highlight-guide"),e<(i=o.offset().top)&&o.css("top",e-i+4+"px"))},_removeColHighlightGuides:function(){y(".fl-col-has-highlight-guide").removeClass("fl-col-has-highlight-guide"),y(".fl-col-highlight-guide").remove()},_colMouseenter:function(e){var t=y(this),i=t.closest(".fl-col-group"),l=(i.attr("data-node"),i.hasClass("fl-col-group-has-child-loading")),o=t.hasClass("fl-node-global"),n=0<t.parents(".fl-node-global").length,s=t.closest(".fl-col-group").find("> .fl-col").length,r=i.find("> .fl-col").index(t),a=0===r,d=s===r+1,u=0<t.find(".fl-col").length,c=0<t.find(".fl-module").length,h=t.parents(".fl-col"),f=h.closest(".fl-col-group"),g=0<h.length,i=void 0!==t.data("template-url"),r="column"==FLBuilderConfig.userTemplateType&&!g;numParentCols=g?f.find("> .fl-col").length:0,parentIndex=f.find("> .fl-col").index(h),parentFirst=g&&0===parentIndex,parentLast=g&&numParentCols===parentIndex+1,row=t.closest(".fl-row"),rowIsFixedWidth=!!row.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,userCanResizeRows=FLBuilderConfig.rowResize.userCanResizeRows,hasRules=t.hasClass("fl-node-has-rules"),template=wp.template("fl-col-overlay"),overlay=null,FLBuilderConfig.simpleUi&&!o||o&&n&&c&&!i||o&&"column"==FLBuilderConfig.userTemplateType&&c||!o&&0<t.find(".fl-module").length||0<t.find(".fl-builder-node-loading-placeholder").length||!c&&u||n&&u&&!i||t.closest(".fl-builder-node-loading").length||(t.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),overlay=FLBuilder._appendOverlay(t,template({global:o,groupLoading:l,numCols:s,first:a,last:d,isRootCol:r,hasChildCols:u,hasParentCol:g,parentFirst:parentFirst,parentLast:parentLast,numParentCols:numParentCols,rowIsFixedWidth:rowIsFixedWidth,userCanResizeRows:userCanResizeRows,hasRules:hasRules})),FLBuilder._buildOverlayOverflowMenu(overlay),FLBuilder._initColDragResizing()),y("body").addClass("fl-block-overlay-muted"))},_colMouseleave:function(e){var t=y(this),i=y(e.target),l=y(e.toElement)||y(e.relatedTarget),o=0<t.find(".fl-module").length,e=(t.hasClass("fl-node-global"),void 0!==t.data("template-url")),t=l.is("#tiptip_holder"),l=0<l.closest("#tiptip_holder").length;i.closest(".fl-block-col-resize").length||t||l||o&&!e||(FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._closeAllSubmenus())},_removeColOverlays:function(){var e=y(".fl-col");e.removeClass("fl-block-overlay-active"),e.find(".fl-col-overlay").remove(),y("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_colDragHelper:function(){return y('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.column+"</div>")},_colDragInit:function(e){var t=y(e.target),i=y(".fl-col-sortable-proxy-item"),l=t.closest(".fl-col");(l=t.hasClass("fl-block-col-move-parent")?l.parents(".fl-col"):l).addClass("fl-node-dragging"),FLBuilder._blockDragInit(e),FLBuilder._removeColHighlightGuides(),e.target=i[0],i.trigger(e)},_colDragInitTouch:function(t){var e=y(t.target),i=y(".fl-col-sortable-proxy-item"),l=e.closest(".fl-col"),o=(e.closest(".fl-module"),!1);e.on("touchmove",function(e){o||(t.currentTarget=l[0],FLBuilder._colDragInit(t),o=!0),i.trigger(e)}),e.on("touchend",function(e){i.trigger(e)})},_colDragStart:function(e,t){var i=y(".fl-node-dragging");i.hide(),FLBuilder._resetColumnWidths(i.parent()),FLBuilder._blockDragStart(e,t)},_colDragStop:function(e,t){FLBuilder._blockDragStop(e,t);var i=y(".fl-node-dragging").removeClass("fl-node-dragging").show(),l=i.attr("data-node"),o=t.item.parent(),n=i.parent(),e=n.attr("data-node");newGroup=o.closest(".fl-col-group"),newGroupId=newGroup.attr("data-node"),newRow=o.closest(".fl-row"),position=0,o.closest('[data-node="'+l+'"]').length||o.hasClass("fl-sortable-disabled")||o.hasClass("fl-col-sortable-proxy")?FLBuilder._resetColumnWidths(n):o.hasClass("fl-col-content")?(i.remove(),0===n.find(".fl-col").length&&n.remove(),position=o.find("> .fl-module, .fl-col-group, .fl-col-sortable-proxy-item").index(t.item),FLBuilder._addColGroup(o.closest(".fl-col").attr("data-node"),l,position)):o.hasClass("fl-col-drop-target")?(o.hasClass("fl-col-drop-target-last")?o.parent().after(i):o.parent().before(i),FLBuilder._resetColumnWidths(newGroup),FL.Builder.data.getLayoutActions(),e==newGroupId?FL.Builder.getActions().moveNode(l,i.index()):FL.Builder.getActions().moveNode(l,i.index(),newGroupId,[e,newGroupId]),FLBuilder._resizeLayout()):o.hasClass("fl-col-group-drop-target")?(i.remove(),0===n.find(".fl-col").length&&n.remove(),position=newRow.find(".fl-row-content > .fl-col-group").index(newGroup),position=o.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addColGroup(newRow.attr("data-node"),l,position)):o.hasClass("fl-row-drop-target")&&(i.remove(),position=o.closest(".fl-builder-content").find(".fl-row").index(newRow),position=o.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addRow(l,position)),0===n.find(".fl-col").length&&n.remove(),y(".fl-col-sortable-proxy").append(t.item),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._closeAllSubmenus()},_colSettingsClicked:function(e){var t=y(this),i=t.closest(".fl-col"),l=i.attr("data-node"),o=0<t.parent().find("ul.fl-builder-submenu").length,n=0<t.closest(".fl-block-overlay-global").length;t.closest(".fl-block-overlay-global").hasClass("fl-col-overlay"),"column"!=FLBuilderConfig.userTemplateType&&i.attr("data-template-url");if(!FLBuilder._colResizing&&(!n||FLBuilderConfig.userCanEditGlobalTemplates)&&(!o||t.hasClass("fl-col-overlay"))){t.hasClass("fl-block-col-edit-parent")&&(l=i.parents(".fl-col").attr("data-node"));const s=FL.Builder.data.getLayoutActions();s.displaySettings(l),e.stopPropagation()}},_showColSettings:function(t,e,i){if(e&&i&&"row"!==FLBuilderConfig.userTemplateType){if(FLBuilderConfig.userCanEditGlobalTemplates){let e=window.open(y('.fl-col[data-node="'+t+'"]').attr("data-template-url"));e.FLBuilderGlobalNodeId=t}}else FLBuilderSettingsForms.render({id:"col",nodeId:t,className:"fl-builder-col-settings",attrs:'data-node="'+t+'"',buttons:e||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:e?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[t],preview:{type:"col"}},function(){0===y(".fl-col.fl-node-"+t).siblings(".fl-col").length&&y("#fl-field-equal_height, #fl-field-content_alignment").hide()})},_copyColClicked:function(e){var t=y(this).closest(".fl-col").attr("data-node");FLBuilder._copyColumn(t),e.stopPropagation()},_copyColumn:function(t){var e=FLBuilder._getJQueryElement(t),i=e.clone(),l=e.parent(),o=y(".fl-builder-settings[data-node]"),n=o.attr("data-node"),s=n===t?e:e.find('[data-node="'+n+'"]'),r=null;o.length&&s.length&&(r=FLBuilder._getSettings(o),FLBuilderSettingsConfig.nodes[n]=r),i.addClass("fl-node-"+t+"-clone fl-builder-node-clone"),i.find(".fl-block-overlay").remove(),e.after(i),FLBuilder._showNodeLoading(t+"-clone"),FLBuilder._resetColumnWidths(l);const a=FL.Builder.data.getLayoutActions();a.copyColumn(t,r,n,function(e){e=FLBuilder._jsonParse(e);e.nodeParent=l,e.nodePosition=i.index(),e.duplicatedColumn=t,e.onAddNewHTML=function(){i.remove()},FLBuilder._copyColComplete(e)})},_copyColComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._resetColumnWidths(e.nodeParent),FLBuilder.triggerHook("didDuplicateColumn",{newNodeId:e.nodeId,oldNodeId:e.duplicatedColumn})})},_deleteColClicked:function(e){var t=y(e.target).closest(".fl-col").data("node");FL.Builder.getActions().deleteNode(t),e.stopPropagation()},_getColToDelete:function(e){var t=e,i=t.closest(".fl-col-group"),l=t.parents(".fl-col"),o=0<l.length,n=l.find("> .fl-col-content > .fl-module, > .fl-col-content > .fl-col-group"),e=t.siblings(".fl-col");return o&&1===n.length&&(0===e.length?t=l:1!==e.length||e.find(".fl-module").length||(t=i)),t},_deleteCol:function(e){var t=e.attr("data-node"),i=e.closest(".fl-row"),l=e.closest(".fl-col-group"),o=0;if(e.remove(),rowCols=i.find(".fl-row-content > .fl-col-group > .fl-col"),groupCols=l.find(" > .fl-col"),0===rowCols.length&&"row"!=FLBuilderConfig.userTemplateType&&"column"!=FLBuilderConfig.userTemplateType)FLBuilder._deleteRow(i);else{0===groupCols.length?l.remove():(o=6===groupCols.length?16.65:7===groupCols.length?14.28:Math.round(100/groupCols.length*100)/100,groupCols.css("width",o+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:groupCols}));const n=FL.Builder.data.getLayoutActions();n.deleteColumn(t,o),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder.triggerHook("didDeleteColumn",t)}},_addCols:function(e,t,i,l,o){var n=e.closest(".fl-col-group"),s=n.find(".fl-col").index(e),e=e.attr("data-node");i=void 0===i?"1-col":i,l=(l=void 0!==l&&l)?1:0,"after"==t&&s++,FLBuilder._showNodeLoadingPlaceholder(n,s),FLBuilder._removeAllOverlays();const r=FL.Builder.data.getLayoutActions();r.addColumns(e,t,i,l,o)},_addColsComplete:function(e){var t="object"==typeof e?e:FLBuilder._jsonParse(e);t.nodeParent=FLBuilder._newColParent,t.nodePosition=FLBuilder._newColPosition,FLBuilder._renderLayout(t,function(){FLBuilder._removeNodeLoadingPlaceholder(y(".fl-node-"+t.nodeId)),FLBuilder.triggerHook("didAddColumn",t.nodeId),FLBuilder.triggerHook("didResetColumnWidths",{cols:y(".fl-node-"+t.nodeId).find("> .fl-col")})})},_addColGroup:function(e,t,i,l){var o=y(".fl-node-"+e);FLBuilder._newColGroupPosition=i,o.hasClass("fl-col")?FLBuilder._newColGroupParent=o.find(" > .fl-col-content"):FLBuilder._newColGroupParent=o.find(".fl-row-content"),FLBuilder._showNodeLoadingPlaceholder(FLBuilder._newColGroupParent,i);const n=FL.Builder.data.getLayoutActions();n.addColumnGroup(e,t,i,l)},_addColGroupComplete:function(e){var t=FLBuilder._jsonParse(e),e=y(t.html),i=e.data("node");e.find(".fl-col").data("node");t.nodeParent=FLBuilder._newColGroupParent,t.nodePosition=FLBuilder._newColGroupPosition,FLBuilder._renderLayout(t,function(){t.nodeParent.hasClass("fl-col-content")&&t.nodeParent.parents(".fl-col").addClass("fl-col-has-cols"),FLBuilder._removeNodeLoadingPlaceholder(y(".fl-node-"+i)),FLBuilder.triggerHook("didAddColumnGroup",i)})},_initColDragResizing:function(){y(".fl-block-col-resize").not(".fl-block-row-resize").draggable({axis:"x",start:FLBuilder._colDragResizeStart,drag:FLBuilder._colDragResize,stop:FLBuilder._colDragResizeStop})},_colDragResizeStart:function(e,t){for(var i=y(t.helper),l="",o=i.hasClass("fl-block-col-resize-parent"),n=o?i.closest(".fl-col").parents(".fl-col"):null,s=o?n.parents(".fl-col-group"):i.closest(".fl-col-group"),r=s.find("> .fl-col"),a=o?n:i.closest(".fl-col"),d=a.attr("data-node"),u=y("[data-node="+d+"] #fl-field-size input"),c=null,h=100,f=0,o=null,n=null,d=(c=i.hasClass("fl-block-col-resize-e")?(l="e",a.nextAll(".fl-col").first()):(l="w",a.prevAll(".fl-col").first())).attr("data-node"),d=y("[data-node="+d+"] #fl-field-size input");f<r.length;f++)r.eq(f).data("node")!=a.data("node")&&r.eq(f).data("node")!=c.data("node")&&(h-=parseFloat(r.eq(f)[0].style.width));u.length?(o=u,n="col"):d.length&&(o=d,n="sibling"),FLBuilder._colResizeData={handle:i,feedbackLeft:i.find(".fl-block-col-resize-feedback-left"),feedbackRight:i.find(".fl-block-col-resize-feedback-right"),direction:l,groupWidth:s.outerWidth(),col:a,id:a.attr("data-node"),colWidth:parseFloat(a[0].style.width)/100,sibling:c,siblingId:c.attr("data-node"),offset:t.position.left,availWidth:h,setting:o,settingType:n,layoutActions:FL.Builder.data.getLayoutActions()},FLBuilder._colResizing=!0,y("body").addClass("fl-builder-col-resizing"),FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents(),FLBuilder.triggerHook("col-resize-start")},_colDragResize:function(e,t){var i=FLBuilder._colResizeData,l=FLBuilderConfig.isRtl?"w":"e",o=i.handle.closest(".fl-block-overlay"),t=(i.offset-t.position.left)/i.groupWidth,t=l==i.direction?100*(i.colWidth-t):100*(i.colWidth+t),n=Math.round(100*t)/100,t=i.availWidth-t,s=Math.round(100*t)/100,t=Math.round(100*(i.availWidth-8))/100;n<8?(n=8,s=t):s<8&&(n=t,s=8),requestAnimationFrame(()=>{l==i.direction?(i.feedbackLeft.html(n.toFixed(1)+"%").show(),i.feedbackRight.html(s.toFixed(1)+"%").show()):(i.feedbackLeft.html(s.toFixed(1)+"%").show(),i.feedbackRight.html(n.toFixed(1)+"%").show()),i.col.css("width",n+"%"),i.sibling.css("width",s+"%"),i.setting&&("col"===i.settingType?i.setting.val(parseFloat(i.col[0].style.width)):"sibling"===i.settingType&&i.setting.val(parseFloat(i.sibling[0].style.width))),i.layoutActions.resizeColumn(i.id,n,i.siblingId,s,!1)}),FLBuilder._buildOverlayOverflowMenu(o),FLBuilder.triggerHook("col-resize-drag")},_colDragResizeStop:function(e,t){var i=FLBuilder._colResizeData,l=FLBuilder._colResizeData.handle.closest(".fl-block-overlay"),o=i.id,n=parseFloat(i.col[0].style.width),s=i.sibling.data("node"),i=parseFloat(i.sibling[0].style.width);FLBuilder._colResizeData.feedbackLeft.hide(),FLBuilder._colResizeData.feedbackRight.hide();const r=FL.Builder.data.getLayoutActions();r.resizeColumn(o,n,s,i),FLBuilder._buildOverlayOverflowMenu(l),FLBuilder._colResizeData=null,y("body").removeClass("fl-builder-col-resizing"),FLBuilder._bindOverlayEvents(),setTimeout(function(){FLBuilder._colResizing=!1},50),FLBuilder.triggerHook("col-resize-stop"),FLBuilder.triggerHook("didResizeColumn",{colId:o,colWidth:n,siblingId:s,siblingWidth:i})},_resetColumnWidthsClicked:function(e){var t=y(this),i=!!t.closest(".fl-row-overlay").length,l=null,o=[],n=null,s=0,r=y(".fl-builder-col-settings");(i?t.closest(".fl-row").find(".fl-row-content > .fl-col-group"):t.parents(".fl-col-group").last()).each(function(){for(l=y(this),n=l.find(".fl-col-group"),o.push(l.data("node")),FLBuilder._resetColumnWidths(l),s=0;s<n.length;s++)FLBuilder._resetColumnWidths(n.eq(s)),o.push(n.eq(s).data("node"))}),r.length&&(t=y(".fl-node-"+r.attr("data-node")),r.find("#fl-field-size input").val(parseFloat(t[0].style.width)));const a=FL.Builder.data.getLayoutActions();a.resetColWidths(o),FLBuilder.triggerHook("col-reset-widths"),FLBuilder._closeAllSubmenus(),e.stopPropagation()},_resetColumnWidths:function(e){var t=e,e=(t=!(e instanceof jQuery)?y(e):t).find(" > .fl-col:visible"),t=0,t=6===e.length?16.65:7===e.length?14.28:Math.round(100/e.length*100)/100;e.css("width",t+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:e})},_moduleMouseenter:function(e){var t=y(this),i=(t.attr("data-node"),t.attr("data-name")),l=t.hasClass("fl-node-global"),o=0<t.parents(".fl-node-global").length,n=t.parents(".fl-col-group").last().hasClass("fl-col-group-has-child-loading"),s=t.closest(".fl-col-group").find("> .fl-col").length,r=t.closest(".fl-col"),a=0===r.index(),d=s===r.index()+1,u=r.parents(".fl-col"),c=0<u.length,h=c?u.closest(".fl-col-group").find("> .fl-col").length:0,f=c&&0===u.index(),g=c&&h===u.index()+1,p="column"==FLBuilderConfig.userTemplateType&&!c,m=t.closest(".fl-row"),b=m.hasClass("fl-node-global"),v=!!m.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,_=FLBuilderConfig.rowResize.userCanResizeRows,L=t.hasClass("fl-node-has-rules"),F=t.attr("data-rules-text"),w=t.attr("data-rules-type"),C=r.attr("data-rules-text"),u=r.attr("data-rules-type"),m=r.hasClass("fl-node-has-rules"),r=wp.template("fl-module-overlay");l&&o&&"row"!=FLBuilderConfig.userTemplateType&&b||l&&o&&"column"!=FLBuilderConfig.userTemplateType&&!b||t.closest(".fl-builder-node-loading").length||t.find(".fl-inline-editor:visible").length||(t.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),m=FLBuilder._appendOverlay(t,r({global:l,moduleName:i,groupLoading:n,numCols:s,colFirst:a,colLast:d,isRootCol:p,hasParentCol:c,numParentCols:h,parentFirst:f,parentLast:g,rowIsFixedWidth:v,userCanResizeRows:_,hasRules:L,rulesTextModule:F,rulesTypeModule:w,rulesTextCol:C,rulesTypeCol:u,colHasRules:m})),FLBuilder._buildOverlayOverflowMenu(m),FLBuilder._initColDragResizing()),y("body").addClass("fl-block-overlay-muted"))},_moduleMouseleave:function(e){y(this);var t=y(e.target),i=y(e.toElement)||y(e.relatedTarget),e=i.is("#tiptip_holder"),i=0<i.closest("#tiptip_holder").length;t.closest(".fl-block-col-resize").length||e||i||(FLBuilder._removeModuleOverlays(),FLBuilder._removeColHighlightGuides())},_removeModuleOverlays:function(){var e=y(".fl-module");e.removeClass("fl-block-overlay-active"),e.find(".fl-module-overlay").remove(),y("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_moduleDragHelper:function(e,t){return y('<div class="fl-builder-block-drag-helper">'+t.attr("data-name")+"</div>")},_moduleDragInit:function(e){var t=y(e.target).closest(".fl-module");FLBuilder._blockDragInit(e),t.append('<div class="fl-module-sortable-proxy"></div>'),e.target=t.find(".fl-module-sortable-proxy")[0],t.trigger(e)},_moduleDragInitTouch:function(t){var e=y(t.target),i=e.closest(".fl-module"),l=!1;e.on("touchmove",function(e){l||(t.currentTarget=i[0],FLBuilder._moduleDragInit(t),l=!0),e.target=i.find(".fl-module-sortable-proxy")[0],y(e.target).trigger(e)}),e.on("touchend",function(e){e.target=i.find(".fl-module-sortable-proxy")[0],y(e.target).trigger(e),e.stopPropagation(),i.find(".fl-module-sortable-proxy").remove()})},_moduleDragStart:function(e,t){y(t.item).data("original-position",t.item.index()),FLBuilder._removeRowOverlays(),FLBuilder._blockDragStart(e,t)},_moduleDragStop:function(e,t){FLBuilder._blockDragStop(e,t);var i=t.item,l=i.parent(),o=null,n=0,s=0;if(y(".fl-module-sortable-proxy").remove(),l.hasClass("fl-builder-modules")||l.hasClass("fl-builder-widgets"))i.remove();else{if(i.hasClass("fl-builder-block")){if(l.hasClass("fl-sortable-disabled"))return i.remove(),void FLBuilder._showPanel();l.hasClass("fl-row-drop-target")?(l=i.closest(".fl-builder-content"),s=0,o=i.closest(".fl-row"),n=l.find(".fl-row").index(o)):l.hasClass("fl-col-group-drop-target")?(s=(l=i.closest(".fl-row-content")).closest(".fl-row").attr("data-node"),o=i.closest(".fl-col-group"),n=l.find(" > .fl-col-group").index(o)):l.hasClass("fl-col-drop-target")?(s=(l=i.closest(".fl-col-group")).attr("data-node"),o=i.closest(".fl-col"),n=l.find(" > .fl-col").index(o)):(n=l.find("> .fl-module, .fl-col-group, .fl-builder-block").index(i),s=i.closest(".fl-col").attr("data-node")),i.closest(".fl-drop-target-last").length&&(n+=1),FLBuilder._addModule(l,s,i.attr("data-type"),n,i.attr("data-widget"),i.attr("data-alias")),i.remove()}else{if(l.hasClass("fl-sortable-disabled"))return y(e.target).append(t.item),y(e.target).children().eq(t.item.data("original-position")).before(t.item),void FLBuilder._highlightEmptyCols();l.hasClass("fl-row-drop-target")?(o=i.closest(".fl-row"),n=i.closest(".fl-builder-content").children(".fl-row").index(o),n=i.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addRow("1-col",n,i.attr("data-node")),i.remove()):l.hasClass("fl-col-group-drop-target")?(o=i.closest(".fl-col-group"),n=i.closest(".fl-row-content ").find(" > .fl-col-group").index(o),n=i.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addColGroup(i.closest(".fl-row").attr("data-node"),"1-col",n,i.attr("data-node")),i.remove()):l.hasClass("fl-col-drop-target")?(o=i.closest(".fl-col"),n=i.closest(".fl-col-drop-target-last").length?"after":"before",FLBuilder._addCols(o,n,"1-col",0<i.closest(".fl-col-group-nested").length,i.attr("data-node")),i.remove()):FLBuilder._reorderModule(i)}FLBuilder._resizeLayout()}},_reorderModule:function(e){var t=e.closest(".fl-col").attr("data-node"),i=e.attr("data-parent"),l=e.attr("data-node"),o=e.index();t==i?FLBuilder._reorderNode(l,o):(e.attr("data-parent",t),FLBuilder._moveNode(t,l,o))},_deleteModuleClicked:function(e){var t=y(e.target).closest(".fl-module").data("node");FL.Builder.getActions().deleteNode(t),e.stopPropagation()},_getJQueryElement:function(e){return y(FLBuilder._contentClass).find('[data-node="'+e+'"]')},_needsDeleteConfirmation:function(e){if("module"===e.type)return!0;const t=FLBuilder._getJQueryElement(e.node);return 0<t.find(".fl-module").length},_deleteModule:function(e){var t=e.closest(".fl-row"),i=e.attr("data-node");const l=FL.Builder.data.getLayoutActions();l.deleteNode(i),e.empty(),e.remove(),t.removeClass("fl-block-overlay-muted"),FLBuilder._highlightEmptyCols(),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didDeleteModule",{nodeId:i,moduleType:e.attr("data-type")})},_moduleCopyClicked:function(e){var t=y(this).closest(".fl-module").data("node");const i=FL.Builder.getActions();i.copyNode(t),e.stopPropagation()},_copyModule:function(t){var e=FLBuilder._getJQueryElement(t),i=e.clone(),l=e.parent(),o=y(".fl-builder-module-settings[data-node="+t+"]"),n={};o.length&&(n=FLBuilder._getSettings(o),FLBuilderSettingsConfig.nodes[t]=n),i.addClass("fl-node-"+t+"-clone fl-builder-node-clone"),i.find(".fl-block-overlay").remove(),e.after(i),FLBuilder._showNodeLoading(t+"-clone");const s=i.get(0);s.scrollIntoView({behavior:"smooth",block:"center"});const r=FL.Builder.data.getLayoutActions();r.copyModule(t,n,function(e){e=FLBuilder._jsonParse(e);e.nodeParent=l,e.nodePosition=l.find(" > .fl-col-group, > .fl-module").index(i),e.duplicatedModule=t,e.onAddNewHTML=function(){i.remove()},FLBuilder._moduleCopyComplete(e)})},_moduleCopyComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateModule",{newNodeId:e.nodeId,oldNodeId:e.duplicatedModule,moduleType:e.moduleType})})},_moduleSettingsClicked:function(e){var t=y(this),i=(t.closest(".fl-module").attr("data-type"),t.closest(".fl-module").attr("data-node")),t=(t.closest(".fl-col").attr("data-node"),0<t.closest(".fl-block-overlay-global").length);if(e.stopPropagation(),!FLBuilder._colResizing&&(!t||FLBuilderConfig.userCanEditGlobalTemplates)){const l=FL.Builder.getActions();l.openSettings(i)}},_showModuleSettings:function(e,t){var i,l,o;FLBuilderSettingsConfig.modules&&(i=FLBuilderSettingsConfig.modules[e.type],l=e.settings||FLBuilderSettingsConfig.nodes[e.nodeId],o=y("head"),-1===y.inArray(e.type,FLBuilder._loadedModuleAssets)&&(""!==i.assets.css&&o.append(i.assets.css),""!==i.assets.js&&o.append(i.assets.js),FLBuilder._loadedModuleAssets.push(e.type)),FLBuilderSettingsForms.render({type:"module",id:e.type,nodeId:e.nodeId,className:"fl-builder-module-settings fl-builder-"+e.type+"-settings",attrs:'data-node="'+e.nodeId+'" data-parent="'+e.parentId+'" data-type="'+e.type+'"',buttons:e.global||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:e.global?[FLBuilderStrings.global]:[],settings:l,legacy:e.legacy,helper:FLBuilder._moduleHelpers[e.type],rules:FLBuilder._moduleHelpers[e.type]?FLBuilder._moduleHelpers[e.type].rules:null,messages:FLBuilder._moduleHelpers[e.type]?FLBuilder._moduleHelpers[e.type].messages:null,hide:!(FLBuilderConfig.userCanEditGlobalTemplates||!e.global),preview:{type:"module",layout:e.layout,callback:function(){FLBuilder.triggerHook("didAddModule",{nodeId:e.nodeId,moduleType:l.type})}}},t))},_saveModuleClicked:function(){var e=y(this).closest(".fl-builder-settings"),t=e.attr("data-type"),i=(e.attr("data-node"),FLBuilder._moduleHelpers[t]),t=!0;void 0!==i&&(e.find("label.error").remove(),e.validate().hideErrors(),t=(t=e.validate().form())&&i.submit()),t?FLBuilder._saveSettings():FLBuilder._toggleSettingsTabErrors()},_addModule:function(e,t,i,l,o,n){FLBuilder._showNodeLoadingPlaceholder(e,l),e.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=e,FLBuilder._newModulePosition=l);const s=FL.Builder.data.getLayoutActions();s.addModule(i,t,l,{widget:void 0===o?"":o,alias:void 0===n?"":n,nodePreview:1})},_addModuleComplete:function(e){e=FLBuilder._jsonParse(e);e.layout&&(FLBuilder._newModuleParent&&FLBuilder._newModuleParent.find(".fl-builder-node-loading-placeholder").hide(),e.layout.nodeParent=FLBuilder._newModuleParent,e.layout.nodePosition=FLBuilder._newModulePosition),e.settings||(e.settings=FLBuilderSettingsConfig.defaults.modules[e.type]),y("form.fl-builder-settings").length||e.global?e.layout&&FLBuilder._renderLayout(e.layout):FLBuilder._showModuleSettings(e,function(){y(".fl-builder-module-settings").data("new-module","1")})},registerModuleHelper:function(e,t){FLBuilder._moduleHelpers[e]=y.extend({},{rules:{},init:function(){},submit:function(){return!0},preview:function(){}},t)},_registerModuleHelper:function(e,t){FLBuilder.registerModuleHelper(e,t)},_showNodeTemplateSettings:function(e){var t=y(".fl-builder-settings-lightbox .fl-builder-settings"),i=t.attr("data-node"),l=FLBuilderStrings.saveModule;if(t.hasClass("fl-builder-row-settings")?l=FLBuilderStrings.saveRow:t.hasClass("fl-builder-col-settings")&&(l=FLBuilderStrings.saveColumn),!FLBuilder._triggerSettingsSave(!1,!1,!1))return!1;FLBuilderSettingsForms.render({id:"node_template",nodeId:i,title:l,attrs:'data-node="'+i+'"',className:"fl-builder-node-template-settings",rules:{name:{required:!0}}},function(){FLBuilderConfig.userCanEditGlobalTemplates||y("#fl-field-global").hide()})},_saveNodeTemplate:function(){var e=y(".fl-builder-node-template-settings"),t=e.attr("data-node");if(e.validate().form()){FLBuilder._showNodeLoading(t);const i=FL.Builder.data.getLayoutActions();i.saveNodeTemplate(t,FLBuilder._getSettings(e)),FLBuilder._lightbox.close()}},_saveNodeTemplateComplete:function(e){var t,i=FLBuilder._jsonParse(e),l=y(".fl-builder-saved-"+i.type+"s"),o=l.find(".fl-builder-block"),n=null,s=i.name.toLowerCase(),r=0,a=wp.template("fl-node-template-block"),e={name:i.name,isGlobal:i.global,content:i.type,id:i.id,postID:i.postID,kind:"template",type:"user",link:i.link,category:{uncategorized:FLBuilderStrings.uncategorized}};if(FLBuilderConfig.contentItems.template.push(e),FLBuilder.triggerHook("contentItemsChanged"),i.layout&&(FLBuilder._renderLayout(i.layout),FLBuilder.triggerHook("didSaveGlobalNodeTemplate",i.config)),0===o.length)l.append(a(i));else for(;r<o.length;r++){if(t=(n=o.eq(r)).text().toLowerCase().trim(),0===r&&s<t){l.prepend(a(i));break}if(s<t){n.before(a(i));break}if(o.length-1===r){l.append(a(i));break}}l.find(".fl-builder-block-no-node-templates").remove()},_nodeTemplateDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var l=i.item,o=l.parent(),n=null,t=0,i=null,s="",r=null;if(o.hasClass("fl-builder-blocks-section-content"))l.remove();else{if(l.hasClass("fl-builder-block-saved-row")||l.hasClass("fl-builder-block-row-template"))t=(i=l.closest(".fl-row")).length?y(FLBuilder._contentClass+" .fl-row").index(i):0,t=o.hasClass("fl-drop-target-last")?t+1:t,n=null,s="render_new_row_template",r=FLBuilder._addRowComplete,FLBuilder._newRowPosition=t,FLBuilder._showNodeLoadingPlaceholder(y(FLBuilder._contentClass),t);else if(l.hasClass("fl-builder-block-saved-column")){if(i=l.closest(".fl-col"),colGroup=o.closest(".fl-col-group"),colGroupId=colGroup.attr("data-node"),s="render_new_col_template",r=FLBuilder._addColsComplete,o.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();o.hasClass("fl-row-drop-target")?(i=l.closest(".fl-row"),n=0,o=y(FLBuilder._contentClass),t=i.length?o.find(".fl-row").index(i):0):o.hasClass("fl-col-group-drop-target")?(o=l.closest(".fl-row-content"),n=l.closest(".fl-row").attr("data-node"),t=l.closest(".fl-row").find(".fl-row-content > .fl-col-group").index(l.closest(".fl-col-group"))):o.hasClass("fl-col-drop-target")&&(t=(o=l.closest(".fl-col-group")).children(".fl-col").index(l.closest(".fl-col")),n=o.attr("data-node")),l.closest(".fl-drop-target-last").length&&(t+=1),o.hasClass("fl-col-group")?FLBuilder._newColParent=null:FLBuilder._newColParent=o,FLBuilder._newColPosition=t,FLBuilder._showNodeLoadingPlaceholder(o,t)}else if(l.hasClass("fl-builder-block-saved-module")||l.hasClass("fl-builder-block-module-template")){if(s="render_new_module",r=FLBuilder._addModuleComplete,o.hasClass("fl-sortable-disabled"))return l.remove(),void FLBuilder._showPanel();o.hasClass("fl-row-drop-target")?(n=0,t=(o=l.closest(".fl-builder-content")).find(".fl-row").index(l.closest(".fl-row"))):o.hasClass("fl-col-group-drop-target")?(n=(o=l.closest(".fl-row-content")).closest(".fl-row").attr("data-node"),t=o.find(" > .fl-col-group").index(l.closest(".fl-col-group"))):n=o.hasClass("fl-col-drop-target")?(t=(o=l.closest(".fl-col-group")).children(".fl-col").index(l.closest(".fl-col")),o.attr("data-node")):(t=o.children(".fl-module, .fl-builder-block").index(l),l.closest(".fl-col").attr("data-node")),l.closest(".fl-drop-target-last").length&&(t+=1),o.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=o,FLBuilder._newModulePosition=t),FLBuilder._showNodeLoadingPlaceholder(o,t)}i=l.attr("data-id"),o=l.attr("data-type");let e="render_new_row_template"===s?"row":"render_new_col_template"===s?"column":"module";const a=FL.Builder.data.getLayoutActions();a.addNodeTemplate(e,i,o,n,t,function(e){var t;-1<s.indexOf("row")?(t=FLBuilder._jsonParse(e),FLBuilder.triggerHook("didApplyRowTemplateComplete",t.config),r(t.layout)):-1<s.indexOf("col")?(t=FLBuilder._jsonParse(e),FLBuilder.triggerHook("didApplyColTemplateComplete",t.config),r(t.layout)):r(e)}),l.remove()}},_editNodeTemplateClicked:function(e){e.preventDefault(),e.stopPropagation(),window.open(y(this).attr("href"))},_deleteNodeTemplateClicked:function(e){var t=y(e.target),i=t.closest(".fl-builder-blocks-section").find(".fl-builder-blocks-section-content"),l=i.find(".fl-builder-block"),o=t.closest(".fl-builder-block"),n=o.hasClass("fl-builder-block-global"),e=n?FLBuilderStrings.deleteGlobalTemplate:FLBuilderStrings.deleteTemplate,t=o.attr("data-id");if(confirm(e)){o.remove(),1===l.length&&(o.hasClass("fl-builder-block-saved-row")?i.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedRows+"</span>"):i.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedModules+"</span>")),o.hasClass("fl-builder-block-global")&&FLBuilder.showAjaxLoader();const s=FL.Builder.data.getLayoutActions();s.deleteNodeTemplate(t,n),o=_.findIndex(FLBuilderConfig.contentItems.template,{id:o.attr("data-id"),type:"user"}),FLBuilderConfig.contentItems.template.splice(o,1),FLBuilder.triggerHook("contentItemsChanged")}},_initSettingsForms:function(){FLBuilder._initSettingsSections(),FLBuilder._initButtonGroupFields(),FLBuilder._initCompoundFields(),FLBuilder._CodeFieldSSLCheck(),FLBuilder._initCodeFields(),FLBuilder._initColorPickers(),FLBuilder._initGradientPickers(),FLBuilder._initIconFields(),FLBuilder._initPhotoFields(),FLBuilder._initSelectFields(),FLBuilder._initEditorFields(),FLBuilder._initMultipleFields(),FLBuilder._initAutoSuggestFields(),FLBuilder._initLinkFields(),FLBuilder._initFontFields(),FLBuilder._initOrderingFields(),FLBuilder._initTimezoneFields(),FLBuilder._initDimensionFields(),FLBuilder._initFieldPopupSliders(),FLBuilder._initPresetFields(),FLBuilder._focusFirstSettingsControl(),FLBuilder._calculateSettingsTabsOverflow(),FLBuilder._lightbox._resizeEditors(),y(".fl-builder-settings-fields").css("visibility","visible"),y(".fl-builder-settings button").on("click",function(e){e.preventDefault()}),FLBuilder.triggerHook("settings-form-init")},_destroySettingsForms:function(){FLBuilder._destroyEditorFields()},_setSettingsFormContent:function(e){y(".fl-legacy-settings").remove(),y("body").append(e)},_settingsTabClicked:function(e){var t=y(this),i=t.closest(".fl-builder-settings"),t=t.attr("href").split("#").pop();FLBuilder._resetSettingsTabsState(),i.find(".fl-builder-settings-tab").removeClass("fl-active"),i.find("#"+t).addClass("fl-active"),i.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),i.find("a[href*="+t+"]").addClass("fl-active"),FLBuilderConfig.rememberTab?localStorage.setItem("fl-builder-settings-tab",t):localStorage.setItem("fl-builder-settings-tab",""),FLBuilder._focusFirstSettingsControl(),e.preventDefault()},_resetSettingsTabsState:function(){var e=y(".fl-lightbox:visible");FLBuilder._hideTabsOverflowMenu(),e.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),e.find(".fl-builder-settings-tabs-overflow-menu .fl-active").removeClass("fl-active"),e.find(".fl-contains-active").removeClass("fl-contains-active")},_calculateSettingsTabsOverflow:function(){var e=y(".fl-lightbox:visible"),t=e.outerWidth(),i=e.hasClass("fl-lightbox-width-slim"),l=e.find(".fl-builder-settings-tabs"),o=e.find(".fl-builder-settings-tabs-overflow-menu"),n=e.find(".fl-builder-settings-tabs-more"),l=l.find("a"),s=!1,r=t-60,a=0,d=i?16:30;o.html(""),FLBuilder._hideTabsOverflowMenu(),l.removeClass("fl-overflowed"),l.each(function(){return!y(this).is(":visible")||(s||(t=y(this).textWidth()+d+12,r<=(a+=t)&&(s=!0)),void(s?(i=y(this).html(),e=y(this).attr("href"),t="",y(this).hasClass("fl-active")&&(t="fl-active"),y(this).hasClass("error")&&(t+=" error"),i=y('<a href="'+e+'" '+(t=""!==t?'class="'+t+'"':t)+">"+i+"</a>"),o.append(i),y(this).addClass("fl-overflowed")):y(this).removeClass("fl-overflowed")));var e,t,i}),s?e.addClass("fl-lightbox-has-tab-overflow"):e.removeClass("fl-lightbox-has-tab-overflow"),0<o.find(".fl-active").length?n.addClass("fl-contains-active"):n.removeClass("fl-contains-active"),0<o.find(".error").length?n.addClass("fl-contains-errors"):n.removeClass("fl-contains-errors")},_settingsTabsToOverflowMenuItemClicked:function(e){var t=y(e.currentTarget),i=t.attr("href"),l=t.closest(".fl-lightbox-header-wrap").find(".fl-builder-settings-tabs"),i=l.find('a[href="'+i+'"]'),l=l.find(".fl-builder-settings-tabs-more");FLBuilder._resetSettingsTabsState(),i.trigger("click"),t.addClass("fl-active"),l.addClass("fl-contains-active"),FLBuilder._hideTabsOverflowMenu(),e.preventDefault()},_hasOverflowTabs:function(){return 0<y(".fl-lightbox:visible").find(".fl-builder-settings-tabs-overflow-menu a").length},_showTabsOverflowMenu:function(){var e;FLBuilder._hasOverflowTabs()&&((e=y(".fl-lightbox:visible")).find(".fl-builder-settings-tabs-overflow-menu").css("display","flex"),e.find(".fl-builder-settings-tabs-overflow-click-mask").show(),this.isShowingSettingsTabsOverflowMenu=!0)},_hideTabsOverflowMenu:function(){var e=y(".fl-lightbox:visible");e.find(".fl-builder-settings-tabs-overflow-menu").css("display","none"),e.find(".fl-builder-settings-tabs-overflow-click-mask").hide(),this.isShowingSettingsTabsOverflowMenu=!1},_toggleTabsOverflowMenu:function(e){FLBuilder.isShowingSettingsTabsOverflowMenu?FLBuilder._hideTabsOverflowMenu():FLBuilder._showTabsOverflowMenu(),e.stopPropagation()},_initSettingsSections:function(){y(".fl-builder-settings:visible").find(".fl-builder-settings-section").each(FLBuilder._initSection)},_settingsCancelClicked:function(e){var t=y(".fl-builder-lightbox[data-parent]"),i=y(".fl-builder-module-settings"),l=null,o=null,n=null,s="column"==FLBuilderConfig.userTemplateType;if(0<t.length)FLBuilder._closeNestedSettings();else{0<i.length&&void 0!==i.data("new-module")?(l=y(FLBuilder.preview.state.html),n=(o=y(".fl-node-"+i.data("node"))).closest(".fl-col"),0<l.find(".fl-node-"+n.data("node")).length||s?FLBuilder._deleteModule(o):FLBuilder._deleteCol(n)):FLBuilder.preview&&FLBuilder.preview.revert();const r=FL.Builder.data.getLayoutActions();r.cancelDisplaySettings(),FLBuilder.preview=null,FLLightbox.closeParent(this),FLBuilder.triggerHook("didCancelNodeSettings")}},_focusFirstSettingsControl:function(){var e=y(".fl-builder-settings:visible"),t=e.find(".fl-builder-settings-tab.fl-active"),e=e.data("node"),i=t.find(".fl-field").first(),l=i.find('input:not([type="hidden"]), textarea, select, button, a, .fl-editor-field').first();e&&y(".fl-node-"+e+" .fl-inline-editor").length||("undefined"!=typeof tinyMCE&&l.hasClass("fl-editor-field")?(e=l.find("textarea.wp-editor-area").attr("id"),tinyMCE.get(e).focus()):setTimeout(function(){l.focus().css("animation-name","fl-grab-attention")},300),i.css("animation-name","fl-grab-attention"),i.on("animationend",function(){i.css("animation-name","")}))},_initSettingsValidation:function(e,t){y(".fl-builder-settings").last().validate({ignore:".fl-ignore-validation",rules:e,messages:t=t||{},errorPlacement:FLBuilder._settingsErrorPlacement})},_settingsErrorPlacement:function(e,t){e.appendTo(t.parent())},_toggleSettingsTabErrors:function(){for(var e,t=y(".fl-builder-settings:visible"),i=t.find(".fl-builder-settings-tab"),l=null,o=0;o<i.length;o++)e=(l=i.eq(o)).find("label.error"),tabLink=t.find(".fl-builder-settings-tabs a[href*="+l.attr("id")+"]"),tabLink.find(".fl-error-icon").remove(),tabLink.removeClass("error"),0<e.length&&(tabLink.append('<span class="fl-error-icon"></span>'),tabLink.addClass("error"));FLBuilder._calculateSettingsTabsOverflow()},_getSettings:function(e){FLBuilder._updateEditorFields();for(var t,i,l=e.serializeArray(),o=0,n=0,s="",r=[],a=[],d={},o=0;o<l.length;o++)if(t=l[o].value.replace(/\r/gm,"").replace(/'/g,"'"),!(-1<l[o].name.indexOf("flrich")))if(-1<l[o].name.indexOf("[")){for(i=l[o].name.replace(/\[(.*)\]/,""),r=[],a=(s=l[o].name.replace(i,"")).match(/\[[^\]]*\]/g),n=0;n<a.length;n++)"[]"!=a[n]&&r.push(a[n].replace(/\[|\]/g,""));s.match(/\[\]\[[^\]]*\]\[[^\]]+\]/)||s.match(/\[\]\[[^\]]*\]\[\]\[[^\]]+\]/)?(void 0===d[i]&&(d[i]={}),void 0===d[i][r[0]]&&(d[i][r[0]]={}),d[i][r[0]][r[1]]=t):s.match(/\[\]\[[^\]]*\]\[\]/)?(void 0===d[i]&&(d[i]={}),void 0===d[i][r[0]]&&(d[i][r[0]]=[]),d[i][r[0]].push(t)):s.match(/\[\]\[[^\]]*\]/)?(void 0===d[i]&&(d[i]={}),d[i][r[0]]=t):s.match(/\[\]/)&&(void 0===d[i]&&(d[i]=[]),d[i].push(t))}else d[l[o].name]=t;for(s in d)if(void 0!==d["as_values_"+s]){d[s]=y.grep(d["as_values_"+s].split(","),function(e){return""!==e}).join(",");try{delete d["as_values_"+s]}catch(e){}}return y.each(e.find("[name]"),function(e,t){t=y(t).attr("name").replace(/\[(.*)\]/,"");t in d||(d[t]="")}),d=y.extend({},FLBuilder._getOriginalSettings(e),d)},_getSettingsJSONForHTML:function(e){return JSON.stringify(e).replace(/\'/g,"'").replace("<wbr />","<wbr>")},_getOriginalSettings:function(e,t){var i=e.find(".fl-builder-settings-json"),l=e.data("node"),e=FLBuilderSettingsConfig.nodes,o=null,n={};if(l&&e[l]?o=e[l]:i.length&&(o=FLBuilder._jsonParse(i.val().replace(/'/g,"'"))),o)for(key in o)(key.match(/[a-z0-9-_]+$/)&&y("#fl-field-"+key).length||t)&&(n[key]=o[key]);return n},_getSettingsForChangedCheck:function(e,t){var i=FLBuilder._getSettings(t);if(e){t=y(".fl-node-"+e);if(t.hasClass("fl-module")){t=t.data("type"),t=FLBuilderSettingsConfig.editables[t];if(t&&FLBuilderSettingsConfig.nodes[e])for(var l in t)i[l]=FLBuilderSettingsConfig.nodes[e][l]}}return i},_saveSettings:function(i){var e=y(".fl-builder-settings-lightbox .fl-builder-settings"),t=e.data("new-module"),l=e.attr("data-node"),o=FLBuilder._getSettings(e),n=FLBuilder.preview;function s(){FLBuilder._showNodeLoading(l),FLBuilderSettingsConfig.nodes[l]=o;const e=FL.Builder.data.getLayoutActions();var t=FLBuilder._saveSettingsComplete.bind(this,i,n);e.updateNodeSettings(l,o,t),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:l,settings:o}),FLBuilder._lightbox.close()}!FLBuilder.isUndefined(i)&&FLBuilder.isBoolean(i)||(i=!0),n&&!n._settingsHaveChanged()&&FLBuilder.isUndefined(t)?FLBuilder._lightbox.close():FLBuilderConfig.userCaps.unfiltered_html?s():(FLBuilderSettingsForms.showLightboxLoader(),FLBuilder.ajax({action:"verify_settings",settings:o},function(e){"true"===e?s():(msg='<p style="font-weight:bold;text-align:center;">'+FLBuilderStrings.noScriptWarn.heading+"</p>",FLBuilderConfig.userCaps.global_unfiltered_html?msg+="<p>"+FLBuilderStrings.noScriptWarn.global+"</p>":msg+="<p>"+FLBuilderStrings.noScriptWarn.message+"</p>",msg+='<p><div class="fl-diff"></div></p>',msg+="<p>"+FLBuilderStrings.noScriptWarn.footer+"</p>",FLBuilderSettingsForms.hideLightboxLoader(),FLBuilder.alert(msg),data=y.parseJSON(e),""!==data.diff&&(y(".fl-diff").html(data.diff),y(".fl-diff").prepend("<p>"+FLBuilderStrings.codeErrorDetected+"</p>"),y(".fl-diff .diff-deletedline").each(function(){(y(this).find("del").length<1?y(this).css("background-color","rgb(255, 192, 203, 0.7)").css("padding","10px"):y(this).find("del").css("background-color","rgb(255, 192, 203, 0.7)")).css("border","1px solid pink")}),console.log("============"),console.log("key: "+data.key),console.log("value: "+data.value),console.log("parsed: "+data.parsed),console.log("============")))}))},_saveSettingsComplete:function(e,t,i){function l(){t&&o.layout.partial&&o.layout.nodeId===t.nodeId&&!FLBuilder._publishAndRemain&&(t.clear(),t=null,FLBuilder._publishAndRemain=!1)}var o=FLBuilder._jsonParse(i),n=o.layout.nodeType,s=o.layout.moduleType,i="didSave"+n.charAt(0).toUpperCase()+n.slice(1)+"SettingsComplete";!0===e?FLBuilder._renderLayout(o.layout,l):l(),FLBuilder.triggerHook("didSaveNodeSettingsComplete",{nodeId:o.node_id,nodeType:n,moduleType:s,settings:o.settings}),FLBuilder.triggerHook(i,{nodeId:o.node_id,nodeType:n,moduleType:s,settings:o.settings})},_triggerSettingsSave:function(e,t,i){var l=FLBuilder._lightbox._node.find("form.fl-builder-settings"),o=FLBuilder._lightbox._node.data("instance-id"),n=FLLightbox._instances[o],s=y(".fl-lightbox-wrap[data-parent]:visible"),o=!0;return e=!_.isUndefined(e)&&e,t=!_.isUndefined(t)&&t,(i=_.isUndefined(i)?!e:i)||(FLBuilder._publishAndRemain=!0),l.length&&(s.length&&(s.find(".fl-builder-settings-save").trigger("click"),(s.find("label.error").length||y(".fl-builder-alert-lightbox:visible").length)&&(o=!1)),o&&!l.validate({ignore:".fl-ignore-validation"}).form()&&(o=!1),s=FLBuilderSettingsForms.settingsHaveChanged(),o&&s&&(e&&n.disableClose(),l.find(".fl-builder-settings-save").trigger("click"),e&&n.enableClose(),(l.find("label.error").length||y(".fl-builder-alert-lightbox:visible").length)&&(o=!1)),i?(FLBuilder._destroySettingsForms(),!s&&FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)):FLBuilderSettingsForms.cacheCurrentSettings(),s||e||n.close()),o?FLBuilder.triggerHook("didTriggerSettingsSave"):(FLBuilder.triggerHook("didFailSettingsSave"),FLBuilder._toggleSettingsTabErrors(),t&&!y(".fl-builder-alert-lightbox:visible").length&&FLBuilder.alert(FLBuilderStrings.settingsHaveErrors)),o},_refreshSettingsPreviewReference:function(){FLBuilder.preview&&FLBuilder.preview._initElementsAndClasses()},_openNestedSettings:function(e){e.className&&-1===e.className.indexOf("fl-builder-settings-lightbox")&&(e.className+=" fl-builder-settings-lightbox"),e=y.extend({className:"fl-builder-lightbox fl-builder-settings-lightbox",destroyOnClose:!0,resizable:!0},e);var t=y(".fl-lightbox-wrap:visible"),i=t.find(".fl-lightbox"),l=new FLLightbox(e),o=l._node,e=o.find(".fl-lightbox");return t.hide(),o.attr("data-parent",t.attr("data-instance-id")),e.attr("style",i.attr("style")),l.on("resized",FLBuilder._calculateSettingsTabsOverflow),l.open('<div class="fl-builder-lightbox-loading"></div>'),l},_closeNestedSettings:function(){var e=y(".fl-builder-lightbox[data-parent]:visible"),t=e.find(".fl-lightbox"),i=e.attr("data-instance-id"),i=FLLightbox._instances[i],e=e.attr("data-parent"),l=y('[data-instance-id="'+e+'"]'),o=l.find(".fl-lightbox"),n=l.find("form"),s=FLLightbox._instances[e];i&&(i.on("close",function(){o.attr("style",t.attr("style")),l.show(),s._resize(),l.find("label.error").remove(),n.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors(),FLBuilder._initMultipleFields()}),i.close())},_showHelpTooltip:function(){y(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){y(this).siblings(".fl-help-tooltip-text").fadeOut()},_initSection:function(){var e=y(this);e.find(".fl-builder-settings-section-header").on("click",function(){e.toggleClass("fl-builder-settings-section-collapsed")})},_initButtonGroupFields:function(){y(".fl-builder-settings:visible").find(".fl-button-group-field").each(FLBuilder._initButtonGroupField)},_initButtonGroupField:function(){var e=y(this),i=e.find(".fl-button-group-field-option"),l=e.find("input");i.on("click",function(){var e=y(this);"1"==e.attr("data-selected")?(e.attr("data-selected","0"),l.val("").trigger("change")):(i.attr("data-selected","0"),e.attr("data-selected","1"),l.val(e.data("value")).trigger("change"))}),l.on("change",function(e){var t=l.val(),t=i.filter('[data-value="'+t+'"]');i.attr("data-selected","0"),t.attr("data-selected","1")})},_initCompoundFields:function(){y(".fl-builder-settings:visible").find(".fl-compound-field").each(FLBuilder._initCompoundField)},_initCompoundField:function(){var e=y(this),t=e.find(".fl-compound-field-section"),i=e.find(".fl-compound-field-section-toggle"),e=e.find(".fl-compound-field-setting").has(".fl-dimension-field-units");t.each(function(){var e=y(this);e.find(".fl-compound-field-section-toggle").length||e.addClass("fl-compound-field-section-visible")}),i.on("click",function(){var e=y(this),t=e.closest(".fl-field"),e="."+e.closest(".fl-compound-field-section").attr("class").split(" ").join(".");t.find(e).toggleClass("fl-compound-field-section-visible")}),e.each(function(){var e=y(this),t=e.find(".fl-compound-field-label");t.length&&!e.find(".fl-shadow-field").length&&t.append('<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>')})},_initAutoSuggestFields:function(){var t,i=y(".fl-builder-settings:visible .fl-suggest-field"),e=null,l=null,o=[];i.each(function(){""!==(e=y(this)).attr("data-value")&&(FLBuilderSettingsForms.showFieldLoader(e),o.push({name:e.attr("name"),value:e.attr("data-value"),action:e.attr("data-action"),data:e.attr("data-action-data")}))}),o.length?FLBuilder.ajax({action:"get_autosuggest_values",fields:o},function(e){for(l in t=FLBuilder._jsonParse(e))y('.fl-suggest-field[name="'+l+'"]').attr("data-value",t[l]);i.each(FLBuilder._initAutoSuggestField)}):i.each(FLBuilder._initAutoSuggestField)},_initAutoSuggestField:function(){var e=y(this);e.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:e.data("action"),fl_as_action_data:e.data("action-data"),_wpnonce:FLBuilderConfig.ajaxNonce}),y.extend({},{asHtmlID:e.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:2,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,preFill:e.data("value"),queryParam:"fl_as_query",afterSelectionAdd:FLBuilder._updateAutoSuggestField,afterSelectionRemove:FLBuilder._updateAutoSuggestField,selectionLimit:e.data("limit"),canGenerateNewSelections:!1},e.data("args"))),FLBuilderSettingsForms.hideFieldLoader(e)},_updateAutoSuggestField:function(e,t,i){var l=this;y(this).siblings(".as-values").val(i.join(",")).trigger("change"),y(this).parents(".as-selections").sortable({items:":not(.as-original)",update:function(e,t){var i=[];set=l.parents(".as-selections").find("li.as-selection-item"),y.each(set,function(e,t){i.push(y(t).attr("data-value"))}),y(l).siblings(".as-values").val(i.join(",")).trigger("change")}})},_CodeFieldSSLCheck:function(){y("body").append('<div class="sg-test" style="display:none"><svg xmlns="http://www.w3.org/2000/svg"></svg></div>'),"https://www.w3.org/2000/svg"===y(".sg-test").find("svg").attr("xmlns")&&(FLBuilder._codeDisabled=!0),y(".sg-test").remove()},_initCodeFields:function(){FLBuilder._codeDisabled||y(".fl-builder-settings:visible").find(".fl-code-field").each(FLBuilder._initCodeField)},_initCodeField:function(){var e=y(this),n=e.closest(".fl-builder-settings"),t=e.find("textarea"),i=(t.attr("id"),t.data("editor")),l=t.data("wrap"),e=y("<div>",{position:"absolute",height:20*parseInt(t.attr("rows"),10)}),s=null,r=!(!n.hasClass("fl-builder-global-settings")&&!n.hasClass("fl-builder-layout-settings"));e.insertBefore(t),e.attr("contentEditable",!0),e.addClass("fl-ignore-validation"),t.css("display","none"),ace.require("ace/ext/language_tools"),(s=ace.edit(e[0])).$blockScrolling=1/0,s.getSession().setValue(t.val()),s.getSession().setMode("ace/mode/"+i),l&&s.getSession().setUseWrapMode(!0),s.setOptions(FLBuilderConfig.AceEditorSettings),s.getSession().on("change",function(e){t.val(s.getSession().getValue()).trigger("change")}),s.getSession().on("changeAnnotation",function(){for(var e=s.getSession().getAnnotations(),t=n.find(".fl-builder-settings-save"),i=n.find(".fl-builder-settings-error"),l=!1,o=0;o<e.length;o++)if(!(-1<e[o].text.indexOf("DOCTYPE")||-1<e[o].text.indexOf("Named entity expected")||-1<e[o].text.indexOf("@supports")||"error"!==e[o].type)){l=!0;break}val=s.getSession().getValue(),r&&l&&null!==val.match(/<\/iframe>|<\/script>/gm)&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldCriticalError)),l&&!t.hasClass("fl-builder-settings-error")&&i.length&&FLBuilderConfig.CheckCodeErrors&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldError)),l||(i.removeClass("fl-builder-settings-error"),i.off("click",FLBuilder._showCodeFieldError),i.off("click",FLBuilder._showCodeFieldCriticalError))}),t.closest(".fl-field").data("editor",s)},_showCodeFieldError:function(e){e.stopImmediatePropagation(),FLBuilder.confirm({message:FLBuilderStrings.codeError,cancel:function(){var e=y(".fl-builder-settings:visible .fl-builder-settings-save");e.removeClass("fl-builder-settings-error"),e.off("click",FLBuilder._showCodeFieldError),e.trigger("click")},strings:{ok:FLBuilderStrings.codeErrorFix,cancel:FLBuilderStrings.codeErrorIgnore}})},_showCodeFieldCriticalError:function(e){e.stopImmediatePropagation(),FLBuilder.alert(FLBuilderStrings.codeerrorhtml)},_initMultipleFields:function(){y(".fl-builder-settings:visible .fl-builder-field-multiples").each(function(){var e=y(this),t=null,i=0,l=FLBuilderConfig.isRtl?{left:10}:{right:10},o=e.attr("data-limit")||0,n=e.find("tr").length||0;for(0<parseInt(o)&&n-1>=parseInt(o)?(e.find(".fl-builder-field-copy").hide(),e.find(".fl-builder-field-add").fadeOut()):e.find(".fl-builder-field-copy, .fl-builder-field-add").show();i<e.length;i++)1===(t=e.eq(i).find(".fl-builder-field-multiple")).length?t.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):t.find(".fl-builder-field-actions").removeClass("fl-builder-field-actions-single");y(".fl-builder-field-multiples").sortable({items:".fl-builder-field-multiple",cursor:"move",cursorAt:l,distance:5,opacity:.5,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer",axis:"y"})})},_addFieldClicked:function(){var e=y(this),t=e.attr("data-field"),i=e.closest("tr").siblings("tr[data-field="+t+"]").last(),l=i.clone(),o=l.find(".fl-form-field"),n=null,s=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;l.find("th label span.fl-builder-field-index").html(s),l.find(".fl-form-field-preview-text").html(""),l.find(".fl-form-field-before").remove(),l.find(".fl-form-field-after").remove(),l.find("input, textarea, select").val(""),i.after(l),FLBuilder._initMultipleFields(),o.length?(n=o.find(".fl-form-field-edit").data("type"),o.find("input").val(JSON.stringify(FLBuilderSettingsConfig.defaults.forms[n]))):((n=(o=e.closest("form.fl-builder-settings")).data("type"))&&o.hasClass("fl-builder-module-settings")&&(t=FLBuilderSettingsConfig.defaults.modules[n][t][0],l.find("input, textarea, select").val(t)),FLBuilder._renumberFields(l.closest(".fl-field")))},_copyFieldClicked:function(){var e=y(this).closest("tr"),t=e.clone(),i=parseInt(e.find("label span.fl-builder-field-index").html(),10)+1;t.find("th label span.fl-builder-field-index").html(i),e.after(t),FLBuilder._renumberFields(e.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var e=y(this).closest("tr"),t=e.parent();confirm(FLBuilderStrings.deleteFieldMessage)&&(e.remove(),FLBuilder._renumberFields(t),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){e.find(".fl-builder-field-multiple").each(function(e,t){y(t).find("th label span.fl-builder-field-index").html(e+1),FLBuilder._renumberFieldAttr(t,"name",e),FLBuilder._renumberFieldAttr(t,"id",e),FLBuilder._renumberFieldAttr(t,"for",e)})},_renumberFieldAttr:function(e,l,o){y(e).find("["+l+"]").each(function(e,t){var i=(i=y(t).attr(l)).replace(/\[(\d+)\]/,"["+o+"]");y(t).attr(l,i)})},_fieldDragHelper:function(){return y('<div class="fl-builder-field-dd-helper"></div>')},_fieldDragStop:function(e,t){FLBuilder._renumberFields(t.item.parent()),FLBuilder.preview.delayPreview()},_initSelectFields:function(){var e=y(".fl-builder-settings:visible").find("select");e.on("change",FLBuilder._settingsSelectChanged),e.trigger("change"),e.on("change",FLBuilder._calculateSettingsTabsOverflow);e=y(".fl-builder-settings:visible").find(".fl-button-group-field input[type=hidden]");e.on("change",FLBuilder._settingsSelectChanged),e.trigger("change"),e.on("change",FLBuilder._calculateSettingsTabsOverflow)},_settingsSelectChanged:function(){var e=y(this),t=e.attr("data-toggle"),i=e.attr("data-hide"),l=e.attr("data-trigger"),o=e.val(),n=0,s=FLBuilderResponsiveEditing._mode,r=e.closest(".fl-field-responsive-setting"),s="fl-field-responsive-setting-"+s;if(!r.length||e.parent().hasClass(s)){if(void 0!==t){for(n in t=FLBuilder._jsonParse(t))FLBuilder._settingsSelectToggle(t[n].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(t[n].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(t[n].tabs,"hide","a[href*=fl-builder-settings-tab-","]");void 0!==t[o]&&(FLBuilder._settingsSelectToggle(t[o].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(t[o].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(t[o].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if(void 0!==i){for(n in i=FLBuilder._jsonParse(i))FLBuilder._settingsSelectToggle(i[n].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(i[n].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[n].tabs,"show","a[href*=fl-builder-settings-tab-","]");void 0!==i[o]&&(FLBuilder._settingsSelectToggle(i[o].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[o].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[o].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))}if(void 0!==l&&void 0!==(l=FLBuilder._jsonParse(l))[o]&&void 0!==l[o].fields)for(n=0;n<l[o].fields.length;n++)y("#fl-field-"+l[o].fields[n]).find("select").trigger("change")}},_settingsSelectToggle:function(e,t,i,l){var o=0;if(l=void 0===l?"":l,void 0!==e)for(;o<e.length;o++)y(".fl-builder-settings:visible").find(i+e[o]+l)[t](),y(i+e[o]+l).parent().find('.fl-field[data-type="code"]').each(function(){FLBuilder._codeDisabled||y(this).data("editor").resize()})},_initColorPickers:function(){var e=FLBuilderConfig.colorPresets||[];FLBuilder.colorPicker=new FLBuilderColorPicker({mode:"hsv",elements:".fl-color-picker .fl-color-picker-value",presets:e,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}}),y(FLBuilder.colorPicker).on("presetRemoved presetAdded presetSorted",function(e,t){FLBuilder.ajax({action:"save_color_presets",presets:t.presets})})},_initGradientPickers:function(){y(".fl-builder-settings:visible .fl-gradient-picker").each(FLBuilder._initGradientPicker)},_initGradientPicker:function(){var e=y(this),t=e.find(".fl-gradient-picker-type-select"),i=e.find(".fl-gradient-picker-angle-wrap"),l=e.find(".fl-gradient-picker-position");t.on("change",function(){"linear"===y(this).val()?(i.show(),l.hide()):(i.hide(),l.show())})},_initPhotoFields:function(){var e=y(".fl-builder-settings:visible").find(".fl-photo-field select");e.on("change",FLBuilder._toggleSettingsOnIconChange),e.trigger("change")},_initSinglePhotoSelector:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:FLBuilderConfig.uploadTypes.image},multiple:!1}),FLBuilder._singlePhotoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="photo")},_selectSinglePhoto:function(){FLBuilder._initSinglePhotoSelector(),FLBuilder._singlePhotoSelector.once("open",y.proxy(FLBuilder._singlePhotoOpened,this)),FLBuilder._singlePhotoSelector.once("select",y.proxy(FLBuilder._singlePhotoSelected,this)),FLBuilder._singlePhotoSelector.open()},_singlePhotoOpened:function(){var e=FLBuilder._singlePhotoSelector.state().get("selection"),t=y(this).closest(".fl-photo-field"),i=t.find("input[type=hidden]"),l=i.val(),o=null;y(this).hasClass("fl-photo-replace")?(e.reset(),t.addClass("fl-photo-empty"),i.val("")):""!==l?((o=wp.media.attachment(l)).fetch(),e.add(o?[o]:[])):e.reset()},_singlePhotoSelected:function(){var e=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),t=y(this).closest(".fl-photo-field"),i=t.find("input[type=hidden]"),l=t.find(".fl-photo-preview img"),o=t.find("select");e.url&&e.url.endsWith(".svg")&&(e.sizes={full:{url:e.url,filename:e.url.split("/").pop(),height:"",width:""}}),i.val(e.id),l.attr("src",FLBuilder._getPhotoSrc(e)),t.removeClass("fl-photo-empty").removeClass("fl-photo-no-attachment"),t.find("label.error").remove(),o.show(),o.html(FLBuilder._getPhotoSizeOptions(e,o.val())),o.trigger("change"),FLBuilderSettingsConfig.attachments[e.id]=e},_singlePhotoRemoved:function(){FLBuilder._initSinglePhotoSelector();var e=FLBuilder._singlePhotoSelector.state(),t=void 0!==e?e.get("selection"):null,i=y(this).closest(".fl-photo-field"),l=i.find("input[type=hidden]"),e=i.find("select");t&&t.reset(),i.addClass("fl-photo-empty"),l.val(""),e.html('<option value="" selected></option>'),e.trigger("change")},_getPhotoSrc:function(e){return(void 0===e.sizes?e:void 0!==e.sizes.thumbnail?e.sizes.thumbnail:e.sizes.full).url},_getPhotoSizeOptions:function(e,t){var i="",l=null,o=null,n=!1,s="",r="",a={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if(void 0===e.sizes||0===e.sizes.length)i+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else{for(sizecheck in t=t&&t.split(/[\\/]/).pop(),selectedverified=!1,e.sizes)if(e.sizes[sizecheck].url.split(/[\\/]/).pop()===t){selectedverified=!0;break}for(l in selectedverified||(t=!1),e.sizes)o="",s=void 0!==a[l]?a[l]:void 0!==FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]:"",t?t!==e.sizes[l].url.split(/[\\/]/).pop()||n||(o=' selected="selected"',n=!0):(void 0===FLBuilderConfig.photomodulesize||l!==FLBuilderConfig.photomodulesize||n)&&(l!=FLBuilderConfig.defaultImageSize||n)||(o=' selected="selected"',n=!0),e.sizes[l].width&&e.sizes[l].height&&(s=s&&s+" - ",r=e.sizes[l].width+" x "+e.sizes[l].height),i+='<option data-size="'+l+'" value="'+e.sizes[l].url+'"'+o+">"+s+r+"</option>"}return i},_selectMultiplePhotos:function(){var e=y(this).closest(".fl-multiple-photos-field").find("input[type=hidden]").val(),t=""===e?"":FLBuilder._jsonParse(e),i=wp.media.gallery.defaults.id,l='[gallery ids="-1"]',o=null,e=null,n=null,s=null,r=[];if("object"==typeof t){for(s in t)r.push(t[s]);l='[gallery ids="'+r.join()+'"]'}o=wp.shortcode.next("gallery",l).shortcode,_.isUndefined(o.get("id"))&&!_.isUndefined(i)&&o.set("id",i),e=wp.media.gallery.attachments(o),(n=new wp.media.model.Selection(e.models,{props:e.props.toJSON(),multiple:!0})).gallery=e.gallery,n.more().done(function(){n.length||FLBuilder._multiplePhotoSelector.setState("gallery-library"),n.props.set({query:!1}),n.unmirror(),n.props.unset("orderby")}),FLBuilder._multiplePhotoSelector&&FLBuilder._multiplePhotoSelector.dispose(),FLBuilder._multiplePhotoSelector=wp.media({frame:"post",state:y(this).hasClass("fl-multiple-photos-edit")?"gallery-edit":"gallery-library",title:wp.media.view.l10n.editGalleryTitle,editing:!0,multiple:!0,selection:n}).open(),y(FLBuilder._multiplePhotoSelector.views.view.el).addClass("fl-multiple-photos-lightbox"),FLBuilder._multiplePhotoSelector.once("update",y.proxy(FLBuilder._multiplePhotosSelected,this))},_multiplePhotosSelected:function(e){for(var t=y(this).closest(".fl-multiple-photos-field"),i=t.find("input[type=hidden]"),l=t.find(".fl-multiple-photos-count"),o=[],n=0;n<e.models.length;n++)o.push(e.models[n].id);1==o.length?l.html("1 "+FLBuilderStrings.photoSelected):l.html(o.length+" "+FLBuilderStrings.photosSelected),t.removeClass("fl-multiple-photos-empty"),t.find("label.error").remove(),i.val(JSON.stringify(o)).trigger("change")},_initSingleVideoSelector:function(){var e;null===FLBuilder._singleVideoSelector&&(e=_wpPluploadSettings.defaults.filters.mime_types[0].extensions,_wpPluploadSettings.defaults.multipart_params.fl_upload_type="video",_wpPluploadSettings.defaults.filters.mime_types[0].extensions=FLBuilderConfig.uploadTypes.videoTypes,FLBuilder._singleVideoSelector=wp.media({title:FLBuilderStrings.selectVideo,button:{text:FLBuilderStrings.selectVideo},library:{type:["video/mp4","video/webm"]},multiple:!1}),FLBuilder._singleVideoSelector.on("open",FLBuilder._wpmedia_reset_errors),FLBuilder._singleVideoSelector.on("close",function(){_wpPluploadSettings.defaults.filters.mime_types[0].extensions=e}))},_selectSingleVideo:function(){FLBuilder._initSingleVideoSelector(),FLBuilder._singleVideoSelector.once("select",y.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var e=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),t=y(this).closest(".fl-video-field"),i=t.find(".fl-video-preview-img"),l=t.find(".fl-video-preview-filename"),o=t.find("input[type=hidden]");i.html('<span class="dashicons dashicons-media-video"></span>'),l.html(e.filename),t.removeClass("fl-video-empty"),t.find("label.error").remove(),o.val(e.id).trigger("change"),FLBuilderSettingsConfig.attachments[e.id]=e},_singleVideoRemoved:function(){FLBuilder._initSingleVideoSelector();var e=FLBuilder._singleVideoSelector.state(),t=void 0!==e?e.get("selection"):null,i=y(this).closest(".fl-video-field"),l=i.find(".fl-video-preview-img img"),o=i.find(".fl-video-preview-filename"),e=i.find("input[type=hidden]");t&&t.reset(),l.attr("src",""),o.html(""),i.addClass("fl-video-empty"),e.val("").trigger("change")},_selectMultipleAudios:function(){var e=y(this).closest(".fl-multiple-audios-field").find("input[type=hidden]").val(),t=""==e?'[playlist ids="-1"]':'[playlist ids="'+FLBuilder._jsonParse(e).join()+'"]',i=wp.shortcode.next("playlist",t).shortcode,e=wp.media.playlist.defaults.id,t=null,l=null;_.isUndefined(i.get("id"))&&!_.isUndefined(e)&&i.set("id",e),t=wp.media.playlist.attachments(i),(l=new wp.media.model.Selection(t.models,{props:t.props.toJSON(),multiple:!0})).playlist=t.playlist,l.more().done(function(){l.props.set({query:!1}),l.unmirror(),l.props.unset("orderby")}),FLBuilder._multipleAudiosSelector&&FLBuilder._multipleAudiosSelector.dispose(),FLBuilder._multipleAudiosSelector=wp.media({frame:"post",state:y(this).hasClass("fl-multiple-audios-edit")?"playlist-edit":"playlist-library",title:wp.media.view.l10n.editPlaylistTitle,editing:!0,multiple:!0,selection:l}).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",y.proxy(FLBuilder._multipleAudiosSelected,this))},_multipleAudiosSelected:function(e){for(var t=y(this).closest(".fl-multiple-audios-field"),i=t.find(".fl-multiple-audios-count"),l=t.find("input[type=hidden]"),o=[],n=0;n<e.models.length;n++)o.push(e.models[n].id);1==o.length?i.html("1 "+FLBuilderStrings.audioSelected):i.html(o.length+" "+FLBuilderStrings.audiosSelected),l.val(JSON.stringify(o)).trigger("change"),t.removeClass("fl-multiple-audios-empty"),t.find("label.error").remove()},_initIconFields:function(){var e=y(".fl-builder-settings:visible").find(".fl-icon-field input");e.on("change",FLBuilder._toggleSettingsOnIconChange),e.trigger("change")},_toggleSettingsOnIconChange:function(){var e=y(this),t=e.val(),e=e.attr("data-show");void 0!==e&&(e=FLBuilder._jsonParse(e),FLBuilder._settingsSelectToggle(e.fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(e.sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(e.tabs,"hide","a[href*=fl-builder-settings-tab-","]"),t&&(FLBuilder._settingsSelectToggle(e.fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(e.sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(e.tabs,"show","a[href*=fl-builder-settings-tab-","]"),FLBuilder._calculateSettingsTabsOverflow()))},_selectIcon:function(){var t=this;FLIconSelector.open(function(e){FLBuilder._iconSelected.apply(t,[e])})},_iconSelected:function(e){var t=y(this).closest(".fl-icon-field"),i=t.find("input[type=hidden]"),l=t.find("i"),o=l.attr("data-icon");i.val(e).trigger("change"),l.removeClass(o),l.addClass(e),l.attr("data-icon",e),t.removeClass("fl-icon-empty"),t.find("label.error").remove()},_removeIcon:function(){var e=y(this).closest(".fl-icon-field"),t=e.find("input[type=hidden]"),i=e.find("i");t.val("").trigger("change"),i.removeClass(),i.attr("data-icon",""),e.addClass("fl-icon-empty")},_formFieldClicked:function(){var e=y(this),t=e.closest(".fl-builder-settings"),i=e.attr("data-type"),l=e.siblings("input").val(),o=FLBuilder._moduleHelpers[i],n=(FLBuilderSettingsConfig.forms[i],FLBuilder._openNestedSettings({className:"fl-builder-lightbox fl-form-field-settings"}));""===l&&(l=JSON.stringify(FLBuilderSettingsConfig.forms[i])),FLBuilderSettingsForms.render({id:i,nodeId:t.attr("data-node"),nodeSettings:FLBuilder._getSettings(t),settings:FLBuilder._jsonParse(l.replace(/'/g,"'")),lightbox:n,rules:o?o.rules:null,helper:{init:function(){o&&o.init(),FLBuilder._initFormFieldSettingsPreview(n)}}},function(){e.attr("id","fl-"+n._node.attr("data-instance-id")),n._node.find("form.fl-builder-settings").attr("data-type",i),FLBuilderResponsiveEditing._switchAllSettingsToCurrentMode()})},_saveFormFieldClicked:function(){var e=y(this).closest(".fl-builder-settings");FLBuilder._saveFormFieldSettings(e)?FLBuilder._closeNestedSettings():FLBuilder._toggleSettingsTabErrors()},_initFormFieldSettingsPreview:function(e){var t=e._node.find(".fl-field"),e=e._node.find("textarea.wp-editor-area");t.find("input:not([type=hidden]), textarea").on("input",FLBuilder._previewFormFieldSettings),t.find("input[type=hidden], select").on("change",FLBuilder._previewFormFieldSettings),"undefined"!=typeof tinyMCE&&e.each(function(e,t){(t=tinyMCE.get(y(t).attr("id"))).on("change",FLBuilder._previewFormFieldSettings),t.on("keyup",FLBuilder._previewFormFieldSettings)})},_previewFormFieldSettings:function(){var e=this.formElement||this,t=y(e).closest(".fl-builder-settings"),e=t.data("timeout");e&&clearTimeout(e),e=setTimeout(function(){FLBuilder._saveFormFieldSettings(t)},1e3),t.data("timeout",e)},_saveFormFieldSettings:function(e){var t=e.closest(".fl-lightbox-wrap").attr("data-instance-id"),i=e.attr("data-type"),l=FLBuilder._getSettings(e),o=FLBuilder._moduleHelpers[i],n=y(".fl-builder-settings #fl-"+t),s=n.parent().attr("data-preview-text"),r=e.find("#fl-field-"+s),a=l[s],d=y('select[name="'+s+'"]'),i=document.createElement("div"),t=!0;return 0<d.length&&(a=d.find('option[value="'+l[s]+'"]').text()),void 0!==o&&(e.find("label.error").remove(),e.validate().hideErrors(),t=(t=e.validate().form())&&o.submit()),!!t&&(void 0!==s&&void 0!==a&&("icon"===r.data("type")?a='<i class="'+a+'"></i>':35<a.length&&(i.innerHTML=a,a=(i.textContent||i.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),n.siblings(".fl-form-field-preview-text").html(a)),0<n.length&&(""!=(a=n.siblings("input").val().replace(/'/g,"'"))&&(l=y.extend(FLBuilder._jsonParse(a),l)),n.siblings("input").val(JSON.stringify(l)).trigger("change")),!0)},_layoutFieldClicked:function(){var e=y(this);e.siblings().removeClass("fl-layout-field-option-selected"),e.addClass("fl-layout-field-option-selected"),e.siblings("input").val(e.attr("data-value"))},_initLinkFields:function(){y(".fl-builder-settings:visible .fl-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var e=y(this),t=e.find(".fl-link-field-search-input"),e=e.find(".fl-link-field-options-wrap input[type=checkbox]");t.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links",_wpnonce:FLBuilderConfig.ajaxNonce}),{asHtmlID:t.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,formatList:function(e,t){return t.html(e.name+'<span class="type">['+e.type+"]</span>")}}),e.on("click",FLBuilder._linkFieldCheckboxClicked)},_updateLinkField:function(e,t,i){var l=e.closest(".fl-link-field"),o=l.find(".fl-link-field-search"),e=l.find(".fl-link-field-search-input");l.find(".fl-link-field-input").val(t.value).trigger("keyup"),e.autoSuggest("remove",t.value),o.hide()},_linkFieldSelectClicked:function(){var e=y(this).closest(".fl-link-field").find(".fl-link-field-search");e.show(),e.find("input").focus()},_linkFieldSelectCancelClicked:function(){var e=y(this);e.parent().hide(),e.closest(".fl-link-field").find("input.fl-link-field-input").focus()},_linkFieldCheckboxClicked:function(){var e=y(this),t=e.is(":checked"),i=e.siblings("input[type=hidden]"),l="",l=e.hasClass("fl-link-field-target-cb")?t?"_blank":"_self":t?"yes":"no";i.val(l)},_initFontFields:function(){y(".fl-builder-settings:visible .fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var e=y(this),t=e.attr("data-value"),i=e.find(".fl-font-field-font"),e=e.find(".fl-font-field-weight");FLBuilderConfig.select2Enabled&&i.select2({width:"100%"}).on("select2:open",function(e){y(".select2-search__field").attr("placeholder",FLBuilderStrings.placeholderSelect2)}),i.on("change",function(){FLBuilder._getFontWeights(i)}),-1<t.indexOf("family")&&(t=FLBuilder._jsonParse(t),i.val(t.family),i.trigger("change"),e.find("option[value="+t.weight+"]").length&&e.val(t.weight))},_getFontWeights:function(e){var i=e.closest(".fl-font-field").find(".fl-font-field-weight"),l=e.val(),o=i.val(),n=FLBuilderConfig.FontWeights,t={},s=e.closest(".fl-font-field").find(".recent-fonts option");i.html(""),0<s.length&&!1==0<y(s).filter(function(e,t){return t.value===l}).length&&e.closest(".fl-font-field").find(".recent-fonts").append(y("<option>",{value:l,text:l})),t=void 0!==FLBuilderFontFamilies.system[l]?FLBuilderFontFamilies.system[l].weights:(void 0!==FLBuilderFontFamilies.google[l]?FLBuilderFontFamilies.google:FLBuilderFontFamilies.default)[l],y.each(t,function(e,t){i.append('<option value="'+t+'"'+(o===t?" selected":"")+">"+n[t]+"</option>")})},_initTinyMCE:function(){"object"==typeof tinymce&&void 0!==tinymce.ui.FloatPanel&&(tinymce.ui.FloatPanel.zIndex=100100),y(".fl-builder-hidden-editor").each(FLBuilder._initEditorField)},_initEditorFields:function(){y(".fl-builder-settings:visible .fl-editor-field").each(FLBuilder._initEditorField)},_initEditorField:function(){var e=y(this),t=e.find("textarea"),i=e.attr("data-name"),l="flrich"+(new Date).getTime()+"_"+i,o=FLBuilderConfig.wp_editor,n=tinyMCEPreInit,s=Number(e.attr("data-buttons")),r=e.attr("data-rows"),i=null,e=null,o=o.replace(/flbuildereditor/g,l),n=FLBuilder._jsonParse(JSON.stringify(n).replace(/flbuildereditor/g,l));n=JSONfn.parse(JSONfn.stringify(n).replace(/flbuildereditor/g,l)),t.after(o).remove(),y("textarea#"+l).val(t.val()),void 0!==n.mceInit[l]&&((i=n.mceInit[l]).setup=function(e){e.on("SaveContent",function(e){e.content=e.content.replace(/<a href="(\.\.\/){1,2}/g,'<a href="'+FLBuilderConfig.homeUrl+"/"),e.content=e.content.replace(/src="(\.\.\/){1,2}/g,'src="'+FLBuilderConfig.homeUrl+"/")})},(e=tinymce.$("#wp-"+l+"-wrap")).find("textarea").attr("rows",r),e.find("textarea").attr("contentEditable",!0),s||e.find(".wp-media-buttons").remove(),!e.hasClass("tmce-active")&&n.qtInit.hasOwnProperty(l)||i.wp_skip_init||tinymce.init(i)),quicktags(n.qtInit[l]),window.wpActiveEditor=l},_reinitEditorFields:function(){y(".fl-lightbox-resizable:visible").length&&setTimeout(function(){var e,t;if("undefined"!=typeof tinymce){for(e=tinymce.editors.length-1;-1<e;e--)tinymce.editors[e].inline||(t=tinymce.editors[e].id,tinyMCE.execCommand("mceRemoveEditor",!0,t),tinyMCE.execCommand("mceAddEditor",!0,t));FLBuilder.preview&&FLBuilder.preview._initDefaultFieldPreviews(y('.fl-field[data-type="editor"]'))}},1)},_destroyEditorFields:function(){var e;if("undefined"!=typeof tinymce){for(e=tinymce.editors.length-1;-1<e;e--)tinymce.editors[e].inline||tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[e].id);y(".wplink-autocomplete").remove(),y(".ui-helper-hidden-accessible").remove()}},_updateEditorFields:function(){y(".fl-builder-settings:visible textarea.wp-editor-area").each(FLBuilder._updateEditorField)},_updateEditorField:function(){var e=y(this),t=e.closest(".fl-editor-field"),i=(e.closest(".fl-builder-settings"),e.closest(".wp-editor-wrap")),l=e.attr("id"),o=t.attr("data-name"),n="undefined"!=typeof tinymce&&tinymce.get(l),l=e.siblings('textarea[name="'+o+'"]'),t=t.data("wpautop");0===l.length&&(l=y('<textarea name="'+o+'"></textarea>').hide(),e.after(l)),t?n&&i.hasClass("tmce-active")?l.val(n.getContent()):"undefined"!=typeof switchEditors?l.val(switchEditors.wpautop(e.val())):l.val(e.val()):(n&&i.hasClass("tmce-active")&&n.save(),l.val(e.val()))},_loopDataSourceChange:function(){var e=y(this).val();y(".fl-loop-data-source").hide(),y('.fl-loop-data-source[data-source="'+e+'"]').show()},_customQueryPostTypeChange:function(){var e=y(this).val();y(".fl-custom-query-filter").hide(),y(".fl-custom-query-"+e+"-filter").show()},_initOrderingFields:function(){y(".fl-builder-settings:visible .fl-ordering-field-options").each(FLBuilder._initOrderingField)},_initOrderingField:function(){y(this).sortable({items:".fl-ordering-field-option",containment:"parent",tolerance:"pointer",stop:FLBuilder._updateOrderingField})},_updateOrderingField:function(e){var t=y(e.target),e=t.siblings("input[type=hidden]"),i=[];t.find(".fl-ordering-field-option").each(function(){i.push(y(this).attr("data-key"))}),e.val(JSON.stringify(i)).trigger("change")},_textFieldAddValueSelectChange:function(){var e=y(this),t=y('input[name="'+e.data("target")+'"]'),i=t.val(),l=e.val();-1==i.indexOf(l)&&(l=(i.trim()+" "+l.trim()).trim(),t.val(l).trigger("change").trigger("keyup")),e.val("")},_onNumberFieldFocus:function(e){var t=y(e.currentTarget);t.addClass("mousetrap"),Mousetrap.bind("up",function(){t.attr("step",1)}),Mousetrap.bind("down",function(){t.attr("step",1)}),Mousetrap.bind("shift+up",function(){t.attr("step",10)}),Mousetrap.bind("shift+down",function(){t.attr("step",10)})},_onNumberFieldBlur:function(e){y(e.currentTarget).attr("step","any").removeClass("mousetrap")},_initTimezoneFields:function(){y(".fl-builder-settings:visible .fl-field[data-type=timezone]").each(FLBuilder._initTimezoneField)},_initTimezoneField:function(){var e=y(this).find("select"),t=e.attr("data-value");e.find('option[value="'+t+'"]').prop("selected",!0)},_initDimensionFields:function(){var e=y(".fl-builder-settings:visible");e.find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionField),e.find(".fl-dimension-field-link").on("click",FLBuilder._dimensionFieldLinkClicked),FLBuilder.addHook("responsive-editing-switched",this._initResponsiveDimensionFieldLinking),e.find(".fl-compound-field-setting").has(".fl-dimension-field-link").each(FLBuilder._initDimensionFieldLinking)},_initDimensionField:function(){var e=y(this),t=e.find(".fl-field-label label"),i=e.find(".fl-field-control-wrapper"),e='<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>';t.append(e),i.prepend(e),FLBuilder._initTipTips(),FLBuilder._initDimensionFieldLinking.apply(this)},_initDimensionFieldLinking:function(){var e=y(this),t=e.find(".fl-dimension-field-link"),e=FLBuilder._getDimensionFieldLinkingInputs(e);FLBuilder._dimensionFieldInputsAreEqual(e)?(t.removeClass("dashicons-admin-links"),t.addClass("dashicons-editor-unlink"),e.off("input",FLBuilder._dimensionFieldLinkedValueChange),e.on("input",FLBuilder._dimensionFieldLinkedValueChange)):(t.addClass("dashicons-admin-links"),t.removeClass("dashicons-editor-unlink"))},_initResponsiveDimensionFieldLinking:function(){y(".fl-builder-settings:visible").find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionFieldLinking)},_dimensionFieldLinkClicked:function(){var e=y(this),t=e.closest(".fl-compound-field-setting"),i=t.length?t:e.closest(".fl-field"),t=i.find(".fl-dimension-field-link"),e=t.hasClass("dashicons-editor-unlink"),i=FLBuilder._getDimensionFieldLinkingInputs(i);t.toggleClass("dashicons-admin-links"),t.toggleClass("dashicons-editor-unlink"),e?i.off("input",FLBuilder._dimensionFieldLinkedValueChange):(i.val(i.eq(0).val()).trigger("input"),i.on("input",FLBuilder._dimensionFieldLinkedValueChange))},_dimensionFieldLinkedValueChange:function(){var e=y(this),t=e.attr("name"),t=e.closest(".fl-dimension-field-units").find('input:not([name="'+t+'"])');t.off("input",FLBuilder._dimensionFieldLinkedValueChange),t.val(e.val()).trigger("input"),t.on("input",FLBuilder._dimensionFieldLinkedValueChange)},_getDimensionFieldLinkingInputs:function(e){var t=!!e.find(".fl-field-responsive-setting").length,i=FLBuilderResponsiveEditing._mode;return t?e.find(".fl-field-responsive-setting-"+i+" input"):e.find(".fl-dimension-field-unit input")},_dimensionFieldInputsAreEqual:function(e){var t=e.eq(0).val();if(""===t)return!1;for(var i=1;i<4;i++)if(e.eq(i).val()!==t)return!1;return!0},_initFieldPopupSliders:function(){y(".fl-builder-settings:visible").find(".fl-field-popup-slider").each(FLBuilder._initFieldPopupSlider)},_initFieldPopupSlider:function(){var n=y("body"),s=y(this),r=s.find(".fl-field-popup-slider-input"),a=s.find(".fl-field-popup-slider-arrow"),e=s.data("input"),d=y('input[name="'+e+'"]');d.on("click",function(){r.hasClass("fl-field-popup-slider-init")||(r.slider({value:d.val(),slide:function(e,t){d.val(t.value).trigger("input")}}),d.on("input",function(){r.slider("value",y(this).val())}),r.addClass("fl-field-popup-slider-init"),r.find(".ui-slider-handle").removeAttr("tabindex")),FLBuilder._setFieldPopupSliderMinMax(r),FLBuilder._hideFieldPopupSliders(),n.on("mousedown",FLBuilder._hideFieldPopupSliders),d.addClass("fl-field-popup-slider-focus"),s.show();var e=y(".fl-builder-settings:visible .fl-builder-settings-tab.fl-active"),t=e.offset(),i=d.offset(),l=d.width(),o=s.offset();o.top+s.outerHeight()>t.top+e.outerHeight()&&s.addClass("fl-field-popup-slider-top"),a.css("left",2+i.left-o.left+l/2+"px")}),d.on("focus",function(){FLBuilder._hideFieldPopupSliders()})},_hideFieldPopupSliders:function(e){var t=e?y(e.target):null,i=y("body"),l=y(".fl-field-popup-slider:visible"),e=y(".fl-field-popup-slider-focus");if(t){if(t.closest(".fl-field-popup-slider").length)return;if(t.closest(".fl-field-popup-slider-focus").length)return}i.off("mousedown",FLBuilder._hideFieldPopupSliders),e.removeClass("fl-field-popup-slider-focus"),l.hide()},_setFieldPopupSliderMinMax:function(e){var t=e.parent(),i=t.parent().parent().find("select.fl-field-unit-select"),l=i.val(),o=t.data("slider"),n=0,s=100,t=1;""!==l&&"em"!==l&&"rem"!==l||(s=10,t=.1),"object"==typeof o&&(n=o.min?parseFloat(o.min):n,s=o.max?parseFloat(o.max):s,t=o.step?parseFloat(o.step):t,i.length&&o[l]&&(n=o[l].min?parseFloat(o[l].min):n,s=o[l].max?parseFloat(o[l].max):s,t=o[l].step?parseFloat(o[l].step):t)),e.slider({min:n,max:s,step:t})},_initPresetFields:function(){y(".fl-builder-settings:visible").find(".fl-preset-select-controls").each(FLBuilder._initPresetField)},_initPresetField:function(){var e=y(this),t=e.find("select"),i=e.data("presets"),e=e.data("prefix");t.on("change",FLBuilder._setFormPreset.bind(this,i,e))},_setFormPreset:function(e,t,i){var l=y(i.currentTarget).val();if(presetLists=FLBuilderConfig.presets,presets=presetLists[e],form=y(".fl-builder-settings:visible"),"undefined"!==presets&&"undefined"!==presets[l]){var o,n=presets[l].settings;for(o in n){var l=n[o],s=void 0!==t&&""!==t?form.find('[name="'+t+o+'"]'):form.find('[name="'+o+'"]');s.val(l).trigger("change").trigger("input")}}},ajax:function(t,i){if(!FLBuilder._ajaxRequest){for(var e in FLBuilder.triggerHook("didBeginAJAX",t),t)void 0===t[e]&&(t[e]=null);return(t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=FLBuilderConfig.postId,t.fl_builder=1,t.fl_action=t.action,void 0!==t.settings&&(t.settings=FLBuilder._ajaxModSecFix(y.extend(!0,{},t.settings))),void 0!==t.node_settings&&(t.node_settings=FLBuilder._ajaxModSecFix(y.extend(!0,{},t.node_settings))),void 0!==t.node_preview&&(t.node_preview=FLBuilder._ajaxModSecFix(y.extend(!0,{},t.node_preview))),t.settings=FLBuilder._inputVarsCheck(t.settings),t.node_settings=FLBuilder._inputVarsCheck(t.node_settings),"error"===t.settings||"error"===t.node_settings)?0:(t={fl_builder_data:t},FLBuilder._ajaxRequest=y.post(FLBuilder._ajaxUrl(),t,function(e){void 0!==i&&i.call(this,e),FLBuilder.triggerHook("didCompleteAJAX",t)}).always(FLBuilder._ajaxComplete).fail(function(e,t,i){switch(msg=!1,e.status){case 403:case 409:msg="Something you entered has triggered a "+e.status+" error.<br /><br />This is nearly always due to mod_security settings from your hosting provider.",window.crash_vars.white_label||(msg+='<br /><br />See this <a target="_blank" style="color: #428bca;font-size:inherit" href="https://docs.wpbeaverbuilder.com/beaver-builder/troubleshooting/common-issues/403-forbidden-or-blocked-error">Knowledge Base</a> article for more info.</br />')}msg&&(console.log(e),console.log(i),FLBuilder.alert(msg))}),FLBuilder._ajaxRequest)}FLBuilder._ajaxQueue.push({data:t,callback:i})},_inputVarsCheck:function(e){var t=FLBuilderConfig.MaxInputVars||0;return void 0!==e&&0<t&&(count=y.map(e,function(e,t){return t}).length,count>t)?(FLBuilder.alert('<h1 style="font-size:2em;text-align:center">Critical Issue</h1><br />The number of settings being saved ('+count+") exceeds the PHP Max Input Vars setting ("+t+").<br />Please contact your host to have this value increased, the default is 1000."),console.log("Vars Count: "+count),console.log("Max Input: "+t),"error"):e},_ajaxComplete:function(){var e;FLBuilder._ajaxRequest=null,FLBuilder.hideAjaxLoader(),FLBuilder._ajaxQueue.length&&(e=FLBuilder._ajaxQueue.shift(),FLBuilder.ajax(e.data,e.callback))},_ajaxUrl:function(e){var t=FLBuilderConfig.shortlink,i=null;if(void 0!==e)for(i in e)t+=-1<t.indexOf("?")?"&":"?",t+=i+"="+e[i];return t},showAjaxLoader:function(){0===y(".fl-builder-lightbox-loading").length&&y(".fl-builder-loading").show()},hideAjaxLoader:function(){y(".fl-builder-loading").hide()},_showNodeLoading:function(e){e=y(".fl-node-"+e);e.addClass("fl-builder-node-loading"),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didStartNodeLoading",e)},_hideNodeLoading:function(e){y(".fl-node-"+e).removeClass("fl-builder-node-loading")},_showNodeLoadingPlaceholder:function(e,t){var i=y('<div class="fl-builder-node-loading-placeholder"></div>');y(".fl-builder-node-loading-placeholder").remove(),siblings=e.hasClass("fl-builder-content")?e.find(" > .fl-row"):e.hasClass("fl-row-content")?e.find(" > .fl-col-group"):e.hasClass("fl-col-group")?(e.addClass("fl-col-group-has-child-loading"),e.find(" > .fl-col")):e.find(" > .fl-col-group, > .fl-module"),0===siblings.length||siblings.length==t?e.append(i):siblings.eq(t).before(i)},_removeNodeLoadingPlaceholder:function(e){var t=e.prev(".fl-builder-node-loading-placeholder"),e=e.next(".fl-builder-node-loading-placeholder");(t.length?t:e).remove()},_ajaxModSecFix:function(e){if(FLBuilderConfig.modSecFix&&"undefined"!=typeof btoa)if("string"==typeof e)e=FLBuilder._btoa(e);else for(var t in e)type=typeof e[t],"string"==type||"number"==type?e[t]=FLBuilder._btoa(e[t]):"object"==type&&(e[t]=FLBuilder._ajaxModSecFix(e[t]));return e},_btoa:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},_wpmedia_reset_errors:function(){y(".upload-error").remove(),y(".media-uploader-status").removeClass("errors").hide()},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox",resizable:!0}),FLBuilder._lightbox.on("resized",FLBuilder._calculateSettingsTabsOverflow),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._lightbox.on("beforeCloseLightbox",FLBuilder._destroyEditorFields),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_showLightbox:function(e){e=e||'<div class="fl-builder-lightbox-loading"></div>',FLBuilder._lightbox.open(e),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder.triggerHook("settings-lightbox-closed"),FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=null},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder.triggerHook("actions-lightbox-settings",e),FLBuilder._actionsLightbox.open(t(e))},_checkEnv:function(){"svg"===FLBuilderConfig.fontAwesome&&FLBuilder.alert(FLBuilderStrings.fontAwesome)},alert:function(e){var t=new FLLightbox({className:"fl-builder-alert-lightbox",destroyOnClose:!0}),i=wp.template("fl-alert-lightbox");t.open(i({message:e}))},crashMessage:function(e){FLLightbox.closeAll();var t=new FLLightbox({className:"fl-builder-alert-lightbox fl-builder-crash-lightbox",destroyOnClose:!0}),i=wp.template("fl-crash-lightbox"),l=window.crash_vars.product,o=window.crash_vars.white_label,n=window.crash_vars.labeled_txt;message=l+" has detected a plugin conflict that is preventing the page from saving.<p>( In technical terms there’s probably a PHP error in Ajax. )</p>",info="<p>If you contact Beaver Builder Support, we need to know what the error is in the JavaScript console in your browser.</p>",info+="<div><div style='width:49%;float:left;'>",info+="<p>MacOS Users:<br />Chrome: View > Developer > JavaScript Console<br />Firefox: Tools > Web Developer > Browser Console<br />Safari: Develop > Show JavaScript console</p>",info+="</div>",info+="<div style='width:49%;float:right;'>",info+="<p>Windows Users:<br />Chrome: Settings > More Tools > Developer > Console<br />Firefox: Menu/Settings > Web Developer > Web Console<br />Edge: Settings and More > More Tools > Console</p>",info+="</div></div>",info+="<p style='display:inline-block;'>Copy the errors you find there and submit them with your Support ticket. It saves us having to ask you that as a second step.<br /><br />If you want to troubleshoot further, you can check our <a class='link' target='_blank' href='https://docs.wpbeaverbuilder.com/beaver-builder/troubleshooting/debugging/known-beaver-builder-incompatibilities'>Knowledge Base</a> for plugins we know to be incompatible. Then deactivate your plugins one by one while you try to save the page in the Beaver Builder editor. When the page saves normally, you have identified the plugin causing the conflict. <a class='link' target='_blank' href='https://www.wpbeaverbuilder.com/beaver-builder-support/'>Contact Support</a> if you need further help.</p>",FLBuilderConfig.MaxInputVars<=3e3&&(info+="<br /><br />The PHP config value max_input_vars is only set to "+FLBuilderConfig.MaxInputVars+'. If you are using 3rd party addons this could very likely be the cause of this error. [<a class="link" href="https://docs.wpbeaverbuilder.com/beaver-builder/troubleshooting/common-issues/exceeds-php-max-input-vars">doc link</a>].'),o&&(info=n),t.open(i({message:message,info:info,debug:!1}))},_alertClose:function(){FLLightbox.closeParent(this)},confirm:function(e){var t={message:"",ok:function(){},cancel:function(){},strings:{ok:FLBuilderStrings.ok,cancel:FLBuilderStrings.cancel}},e=y.extend({},t,void 0===e?{}:e);lightbox=new FLLightbox({className:"fl-builder-confirm-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),template=wp.template("fl-confirm-lightbox"),lightbox.open(template(e)),lightbox._node.find(".fl-builder-confirm-ok").on("click",e.ok),lightbox._node.find(".fl-builder-confirm-cancel").on("click",e.cancel)},triggerHook:function(e,t){y("body").trigger("fl-builder."+e,t)},addHook:function(e,t){y("body").on("fl-builder."+e,t)},removeHook:function(e,t){y("body").off("fl-builder."+e,t)},log:function(e){void 0!==window.console&&void 0!==window.console.log&&console.log(e)},logError:function(e,t){var i=null;void 0!==e&&(void 0!==e.stack?i=e.stack:void 0!==e.message&&(i=e.message),i&&(FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(i),void 0!==t&&t&&(FLBuilder.log("Debug Info"),console.log(t)),y.each(window.crash_vars.vars,function(e,t){console.log(e+": "+t)}),FLBuilder.log("************************************************************************"),void 0!==t&&t&&(i=t+"\n"+i),FLBuilder.crashMessage(i)))},logGlobalError:function(e,t,i,l,o){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",i).replace("{file}",t)),void 0!==o&&void 0!==o.stack&&FLBuilder.log(o.stack),FLBuilder.log("************************************************************************")},_jsonParse:function(t){try{t=JSON.parse(t)}catch(e){FLBuilder.logError(e,FLBuilder._parseError(t))}return t},_parseError:function(e){if(e.indexOf("</head>"))return"AJAX returned HTML page instead of data. (Possible 404 or max_input_vars)";if(php=e.match(/^<.*/gm)||!1,php&&0<php.length){var i="";return y.each(php,function(e,t){i+=t}),y(i).text()}return!1},isUndefined:function(e){return void 0===e},isBoolean:function(e){return!0===e||!1===e},getSandbox:function(e){return e in this._sandbox&&this._sandbox[e]},setSandbox:function(e,t){this._sandbox[e]=t},deleteSandbox:function(e){delete this._sandbox[e]}},y(function(){FLBuilder._init()})}(jQuery),function(n){FLBuilderAJAXLayout=function(e,t){this._data=n.extend({},this._defaults,"string"==typeof e?FLBuilder._jsonParse(e):e),this._callback=t,this._post=FLBuilderConfig.postId,this._head=n("head").eq(0),this._body=n("body").eq(0),this._data.css&&("inline"===FLBuilderConfig.enqueueMethod?(this._oldCss=n("#fl-builder-layout-"+this._post+"-inline-css"),this._newCss=n('<style id="fl-builder-layout-'+this._post+'-inline-css" type="text/css">'+this._data.css+"</style>")):(this._loader=n('<img src="'+this._data.css+'" />'),this._oldCss=n('link[href*="/cache/'+this._post+'-layout"]'),this._newCss=n('<link rel="stylesheet" id="fl-builder-layout-'+this._post+'-css" href="'+this._data.css+'" />'))),this._data.partial?(this._data.js&&(this._oldJs=n("#fl-builder-partial-refresh-js"),this._newJs=n('<script type="text/javascript" id="fl-builder-partial-refresh-js">'+this._data.js+"<\/script>")),this._data.nodeId&&(this._data.oldNodeId?(this._oldScriptsStyles=n('.fl-builder-node-scripts-styles[data-node="'+this._data.oldNodeId+'"]'),this._content=n(".fl-node-"+this._data.oldNodeId)):(this._oldScriptsStyles=n('.fl-builder-node-scripts-styles[data-node="'+this._data.nodeId+'"]'),this._content=n(".fl-node-"+this._data.nodeId).eq(0)))):("inline"===FLBuilderConfig.enqueueMethod?(this._oldJs=n("#fl-builder-layout-"+this._post+"-inline-js"),this._newJs=n('<script id="fl-builder-layout-'+this._post+'-inline-js">'+this._data.js+"<\/script>")):(this._oldJs=n('script[src*="/cache/'+this._post+'"]'),this._newJs=n('<script src="'+this._data.js+'"><\/script>')),this._oldScriptsStyles=n(".fl-builder-layout-scripts-styles"),this._content=n(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._data.css?"inline"===FLBuilderConfig.enqueueMethod?(this._addNewCSS(),this._finish()):"onload"in document.createElement("link")?(this._newCss.on("load",n.proxy(this._finish,this)),this._addNewCSS()):(this._loader.on("error",n.proxy(this._loadNewCSSFallbackComplete,this)),this._body.append(this._loader)):this._finish()},_loadNewCSSFallbackComplete:function(){this._loader.remove(),this._addNewCSS(),setTimeout(n.proxy(this._finish,this),250)},_addNewCSS:function(){0<this._oldCss.length?this._oldCss.after(this._newCss):this._head.append(this._newCss)},_finish:function(){this._removeOldContentAndAssets(),this._cleanNewHTML(),this._cleanNewAssets(),this._addNewHTML(),this._addNewScriptsStyles(),this._addNewJS(),n(FLBuilder._contentClass).trigger("fl-builder.layout-rendered"),FLBuilder.hideAjaxLoader()},_removeOldContentAndAssets:function(){this._content&&this._content.empty(),this._oldCss&&this._oldCss.remove(),this._oldJs&&this._oldJs.remove(),this._oldScriptsStyles&&this._oldScriptsStyles.remove()},_cleanNewHTML:function(){var e,t,i,l;this._data.scriptsStyles&&(e=n("<div>"+this._data.html+"</div>"),t="fl-row",i=this._data.scriptsStyles,l="",this._data.partial&&(t="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),e.find("> *, script").each(function(){n(this).hasClass(t)||"application/json"==n(this).attr("type")||(l=n(this).remove(),i+=l[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=e.html(),this._data.scriptsStyles=i)},_addNewHTML:function(){var e;this._data.partial?this._data.nodeParent?(0===(e=(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.hasClass("fl-col-group")?this._data.nodeParent.find(" > .fl-col"):this._data.nodeParent.find(" > .fl-col-group, > .fl-module")).filter(":not(.fl-builder-node-clone)")).length||this._data.nodePosition>=e.length?this._data.nodeParent.append(this._data.html):e.eq(this._data.nodePosition).before(this._data.html),this._data.nodeId&&FLBuilder._removeNodeLoadingPlaceholder(n(".fl-node-"+this._data.nodeId))):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.html),FLBuilder.preview&&this._data.nodeId&&this._data.nodeId!=FLBuilder.preview.nodeId&&((e=n(FLBuilder.preview.classes.node)).closest(".fl-node-"+this._data.nodeId).length&&e.html(FLBuilder.preview.elements.node.html())),this._data.onAddNewHTML&&this._data.onAddNewHTML()},_cleanNewAssets:function(){var e=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?n(".fl-builder-node-scripts-styles").each(function(){-1<e._data.html.indexOf("fl-node-"+n(this).data("node"))&&n(this).remove()}):(n("#fl-builder-partial-refresh-js").remove(),n(".fl-builder-node-scripts-styles").remove())},_removeDuplicateAssets:function(e){var t=n("<div>"+e+"</div>"),i="",l="",e=window.location,o=e.protocol+"//"+e.hostname+(e.port?":"+e.port:"");return t.find("script").each(function(){void 0!==(i=n(this).attr("src"))&&(i=i.replace(o,""),0<n('script[src*="'+i+'"]').length&&n(this).remove())}),t.find("link").each(function(){void 0!==(l=n(this).attr("href"))&&(l=l.replace(o,""),0<n('link[href*="'+l+'"]').length&&n(this).remove())}),t.html()},_addNewScriptsStyles:function(){this._data.scriptsStyles&&""!==this._data.scriptsStyles&&this._body.append(this._data.scriptsStyles)},_addNewJS:function(){setTimeout(n.proxy(function(){this._newJs&&this._head.append(this._newJs),FLBuilder.triggerHook("didRenderLayoutJSComplete")},this),50)},_complete:function(){FLBuilder._dragging?(FLBuilder._highlightRowsAndColsForDrag(),FLBuilder._refreshSortables()):(FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._resizeLayout()),FLBuilder._initMediaElements(),FLBuilderLayout.init(),FLBuilderResponsiveEditing.refreshPreview(this._callback),FLBuilder.triggerHook("didRenderLayoutComplete"),this._body.height("auto")}}}(jQuery),function(h){FLBuilderPreview=function(e){this.id=(new Date).getTime(),this.type=e.type,this._saveState(),e.layout?FLBuilder._renderLayout(e.layout,function(){this._init(),e.callback&&e.callback()}.bind(this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.getFormattedSelector=function(e,t){for(var i="",l=t.split(","),o=0;o<l.length;o++)-1<l[o].indexOf("{node}")?i+=l[o].replace("{node}",e):-1<l[o].indexOf("{node_id}")?i+=l[o].replace(/{node_id}/g,this.nodeId):i+=e+" "+l[o],o!=l.length-1&&(i+=", ");return i},FLBuilderPreview.prototype={id:"",type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_styleSheetMedium:null,_styleSheetResponsive:null,_timeout:null,_loaderTimeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=h(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),this._createSheets(),this._initResponsivePreviews(),this._initDefaultFieldPreviews(),this.type){case"row":this._initRow();break;case"col":this._initColumn();break;case"module":this._initModule()}FLBuilder.triggerHook("preview-init",this)},_saveSettings:function(){var e=h(".fl-builder-settings-lightbox .fl-builder-settings");this._savedSettings=FLBuilder._getSettingsForChangedCheck(this.nodeId,e)},_settingsHaveChanged:function(){var e=h(".fl-builder-settings-lightbox .fl-builder-settings"),e=FLBuilder._getSettings(e);return JSON.stringify(this._savedSettings)!=JSON.stringify(e)},_initElementsAndClasses:function(){var e="row"==this.type?".fl-row-content-wrap":".fl-"+this.type+"-content";h.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+" > "+e}),h.extend(this.elements,{settings:h(this.classes.settings),settingsHeader:h(this.classes.settingsHeader),node:h(this.classes.node),content:h(this.classes.content)})},_createSheets:function(){this._destroySheets(),this._styleSheet||(this._styleSheet=new FLStyleSheet({id:"fl-builder-preview",className:"fl-builder-preview-style"})),this._styleSheetMedium||(this._styleSheetMedium=new FLStyleSheet({id:"fl-builder-preview-medium",className:"fl-builder-preview-style"}),this._styleSheetMedium.disable()),this._styleSheetResponsive||(this._styleSheetResponsive=new FLStyleSheet({id:"fl-builder-preview-responsive",className:"fl-builder-preview-style"}),this._styleSheetResponsive.disable())},_destroySheets:function(){this._styleSheet&&(this._styleSheet.destroy(),this._styleSheet=null),this._styleSheetMedium&&(this._styleSheetMedium.destroy(),this._styleSheetMedium=null),this._styleSheetResponsive&&(this._styleSheetResponsive.destroy(),this._styleSheetResponsive=null)},_disableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=FLBuilderConfig.global,i=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.responsive_breakpoint),this._styleSheetResponsive.disable()):"medium"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.medium_breakpoint),this._styleSheetMedium.disable()):i.removeClass(function(e,t){return(t.match(/fl-node-[^\s]*/g)||[]).join(" ")})},_enableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetResponsive.enable()):"medium"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetMedium.enable()):t.addClass("fl-node-"+t.data("node"))},_getDefaultValue:function(e,t){var i="",l=h(e),e=l.closest("[data-node]");return"width"===t?i="auto":-1===h.inArray(t,["line-height","font-weight"])&&e.length&&(this._disableStyles(),i=l.css(t),this._enableStyles()),i},updateCSSRule:function(e,t,i,l){var o=FLBuilderResponsiveEditing._mode,n="";""!==i&&"null"!==i||(i=this._getDefaultValue(e,t)),l?(n="string"==typeof l?this.toUpperCaseWords(l):"default"===o?"":this.toUpperCaseWords(o),this["_styleSheet"+n].updateRule(e,t,i)):this._styleSheet.updateRule(e,t,i)},delay:function(e,t){this._cancelDelay(),this._timeout=setTimeout(t,e)},_cancelDelay:function(){null!==this._timeout&&clearTimeout(this._timeout)},hexToRgb:function(e){e=parseInt(e,16);return[e>>16&255,e>>8&255,255&e]},hexOrRgb:function(e){return e=e.indexOf("rgb")<0&&e.indexOf("#")<0?"#"+e:e},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_initResponsivePreviews:function(){var e=".preview-"+this.id;FLBuilder.addHook("responsive-editing-switched"+e,h.proxy(this._responsiveEditingSwitched,this)),FLBuilder.addHook("responsive-editing-before-preview-fields"+e,h.proxy(this._responsiveEditingPreviewFields,this))},_destroyResponsivePreviews:function(){var e=".preview-"+this.id;FLBuilder.removeHook("responsive-editing-switched"+e),FLBuilder.removeHook("responsive-editing-before-preview-fields"+e)},_responsiveEditingSwitched:function(e,t){"default"==t?(this._styleSheetMedium.disable(),this._styleSheetResponsive.disable()):"medium"==t?(this._styleSheetMedium.enable(),this._styleSheetResponsive.disable()):"responsive"==t&&(this._styleSheetMedium.enable(),this._styleSheetResponsive.enable())},_responsiveEditingPreviewFields:function(e,t){"medium"===t&&"col"===this.type&&this.elements.node[0].style.width&&(size=parseFloat(this.elements.node[0].style.width),this.elements.size.val(size))},updateResponsiveCSSRule:function(e,t,i){this.updateCSSRule(e,t,i,!0)},_saveState:function(){var e=FLBuilderConfig.postId,t=h('link[href*="/cache/'+e+'"]').attr("href"),i=h('script[src*="/cache/'+e+'"]').attr("src"),e=h(FLBuilder._contentClass).html();this.state={css:t,js:i,html:e}},preview:function(){var e=h(".fl-builder-settings-lightbox .fl-builder-settings"),t=e.attr("data-node"),e=FLBuilder._getSettings(e);if(FLBuilder._showNodeLoading(t),this._cancelPreview(),"error"===(e=FLBuilder._inputVarsCheck(e)))return 0;this._xhr=FLBuilder.ajax({action:"render_layout",node_id:t,node_preview:e},h.proxy(this._renderPreview,this))},delayPreview:function(e){var t=void 0===e?[]:h(e.target).closest("tr").find("th"),i=h(".fl-builder-widget-settings .fl-builder-settings-title"),l=h(".fl-builder-settings .fl-lightbox-header"),e=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.svg",o=h('<img class="fl-builder-preview-loader" src="'+e+'" />');this.delay(1e3,h.proxy(this.preview,this)),this._loaderTimeout=setTimeout(function(){h(".fl-builder-preview-loader").remove(),0<t.length?t.append(o):0<i.length?i.append(o):0<l.length&&l.append(o)},1500)},_cancelPreview:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)},_renderPreview:function(e){this._xhr=null,FLBuilder._renderLayout(e,h.proxy(this._renderPreviewComplete,this))},_renderPreviewComplete:function(){this._createSheets(),this._initElementsAndClasses(),this._initDefaultFieldPreviews(),null!==this._loaderTimeout&&clearTimeout(this._loaderTimeout),h(".fl-builder-preview-loader").remove(),h(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){var e=this.nodeId;this._settingsHaveChanged()?("col"===this.type&&(e=this.elements.node.closest(".fl-col-group").data("node")),FLBuilder._updateNode(e,function(){this.clear()}.bind(this))):this.clear()},cancel:function(){this._cancelDelay(),this._cancelPreview()},clear:function(){this.cancel(),this._destroySheets(),this._destroyResponsivePreviews()},_initNodeTextColor:function(){h.extend(this.elements,{textColor:h(this.classes.settings+" input[name=text_color]"),linkColor:h(this.classes.settings+" input[name=link_color]"),hoverColor:h(this.classes.settings+" input[name=hover_color]"),headingColor:h(this.classes.settings+" input[name=heading_color]")}),this.elements.textColor.on("change",h.proxy(this._textColorChange,this)),this.elements.linkColor.on("change",h.proxy(this._textColorChange,this)),this.elements.hoverColor.on("change",h.proxy(this._textColorChange,this)),this.elements.headingColor.on("change",h.proxy(this._textColorChange,this))},_textColorChange:function(e){var t=this.elements.textColor.val(),i=this.elements.linkColor.val(),l=this.elements.hoverColor.val(),o=this.elements.headingColor.val(),i=""===i?t:i,l=""===l?t:l,o=""===o?t:o;t&&t.indexOf("rgb")<0&&(t="#"+t),i&&i.indexOf("rgb")<0&&(i="#"+i),l&&l.indexOf("rgb")<0&&(l="#"+l),o&&o.indexOf("rgb")<0&&(o="#"+o),this.delay(50,h.proxy(function(){""===t?this.updateCSSRule(this.classes.node,"color",""):this.updateCSSRule(this.classes.node,"color",t),""===i?this.updateCSSRule(this.classes.node+" a","color",""):this.updateCSSRule(this.classes.node+" a","color",i),""===l?this.updateCSSRule(this.classes.node+" a:hover","color",""):this.updateCSSRule(this.classes.node+" a:hover","color",l),""===o?(this.updateCSSRule(this.classes.node+" h1","color",""),this.updateCSSRule(this.classes.node+" h2","color",""),this.updateCSSRule(this.classes.node+" h3","color",""),this.updateCSSRule(this.classes.node+" h4","color",""),this.updateCSSRule(this.classes.node+" h5","color",""),this.updateCSSRule(this.classes.node+" h6","color",""),this.updateCSSRule(this.classes.node+" h1 a","color",""),this.updateCSSRule(this.classes.node+" h2 a","color",""),this.updateCSSRule(this.classes.node+" h3 a","color",""),this.updateCSSRule(this.classes.node+" h4 a","color",""),this.updateCSSRule(this.classes.node+" h5 a","color",""),this.updateCSSRule(this.classes.node+" h6 a","color","")):(this.updateCSSRule(this.classes.node+" h1","color",o),this.updateCSSRule(this.classes.node+" h2","color",o),this.updateCSSRule(this.classes.node+" h3","color",o),this.updateCSSRule(this.classes.node+" h4","color",o),this.updateCSSRule(this.classes.node+" h5","color",o),this.updateCSSRule(this.classes.node+" h6","color",o),this.updateCSSRule(this.classes.node+" h1 a","color",o),this.updateCSSRule(this.classes.node+" h2 a","color",o),this.updateCSSRule(this.classes.node+" h3 a","color",o),this.updateCSSRule(this.classes.node+" h4 a","color",o),this.updateCSSRule(this.classes.node+" h5 a","color",o),this.updateCSSRule(this.classes.node+" h6 a","color",o))},this))},_initNodeBg:function(){h.extend(this.elements,{bgType:h(this.classes.settings+" select[name=bg_type]"),bgColor:h(this.classes.settings+" input[name=bg_color]"),bgColorPicker:h(this.classes.settings+" .fl-picker-bg_color"),bgGradientType:h(this.classes.settings+" select.fl-gradient-picker-type-select"),bgVideoSource:h(this.classes.settings+" select[name=bg_video_source]"),bgVideo:h(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:h(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:h(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:h(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:h(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:h(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:h(this.classes.settings+" input[name=ss_speed]"),bgSlideshowTrans:h(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:h(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:h(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayType:h(this.classes.settings+" select[name=bg_overlay_type]"),bgOverlayColor:h(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayGradient:h(this.classes.settings+" #fl-field-bg_overlay_gradient select")}),this.elements.bgType.on("change",h.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",h.proxy(this._bgColorChange,this)),this.elements.bgVideoServiceUrl.on("change",h.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",h.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",h.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayType.on("change",h.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayColor.on("change",h.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val(),i=FLBuilderResponsiveEditing._mode;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"),this.updateCSSRule(this.classes.content,"background-image","none"),this.updateCSSRule(this.classes.content,"background-image","none","medium"),this.updateCSSRule(this.classes.content,"background-image","none","responsive"),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"gradient"==t?(this.elements.bgGradientType.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.settings.find('[data-device="'+i+'"] select[name*="bg_"]').trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(e){var t;""===this.elements.bgColor.val()?this.updateCSSRule(this.classes.content,"background-color","transparent"):(t=this.hexOrRgb(this.elements.bgColor.val()),this.delay(100,h.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",t)},this)))},_bgVideoChange:function(e){var t=this.elements,i=t.bgVideoSource.val(),l=t.bgVideo.val(),o=t.bgVideoServiceUrl.val(),t=h("<script>");"video_service"==i&&""!=o?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(o)&&h('script[src*="youtube.com"').length<1?t.attr("src","https://www.youtube.com/iframe_api"):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(o)&&h('script[src*="vimeo.com"').length<1&&t.attr("src","https://player.vimeo.com/api/player.js"),t.attr("type","text/javascript").appendTo("head"),this.delay(500,h.proxy(this.preview,this))):""!=l&&this.preview()},_bgSlideshowChange:function(e){var t=this.elements,i=t.bgSlideshowSource.val(),l=t.bgSlideshowPhotos.val(),o=t.bgSlideshowFeedUrl.val(),n=t.bgSlideshowSpeed.val(),t=t.bgSlideshowTransSpeed.val();"wordpress"==i&&""===l||"smugmug"==i&&""===o||isNaN(parseInt(n))||isNaN(parseInt(t))||this.delay(500,h.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(e){var t,i=this.elements.bgOverlayType.val(),l=this.elements.bgOverlayColor.val();"color"===i?(""===l?(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")):(t=this.hexOrRgb(this.elements.bgOverlayColor.val()),this.delay(100,h.proxy(function(){this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color",t)},this))),this.updateCSSRule(this.classes.content+"::after","background-image","none")):"gradient"===i?(this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.elements.bgOverlayGradient.trigger("change")):(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"),this.updateCSSRule(this.classes.content+"::after","background-image","none"))},_bgOverlayAddClasses:function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay")},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click"),this.elements.bgOverlayType.val("color").trigger("change")},_initNodeClassName:function(){h.extend(this.elements,{className:h(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",h.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},_initNodeDimensions:function(e){for(var t,i={},l=["Top","Bottom","Left","Right"],o=["","Medium","Responsive"],n=this.classes.settings,s="",r=null,a=null,r=0;r<l.length;r++)for(a=0;a<o.length;a++)t=e+l[r]+o[a],s=e+"_"+l[r].toLowerCase(),""!=o[a]&&(s+="_"+o[a].toLowerCase()),i[t]=h(n+" input[name="+s+"]");h.extend(this.elements,i)},_initRow:function(){h.extend(this.elements,{width:h(this.classes.settings+" select[name=width]"),contentWidth:h(this.classes.settings+" select[name=content_width]"),maxContentWidth:h(this.classes.settings+" input[name=max_content_width]"),maxContentWidthUnit:h(this.classes.settings+" select[name=max_content_width_unit]"),height:h(this.classes.settings+" select[name=full_height]"),minHeight:h(this.classes.settings+" input[name=min_height]"),align:h(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",h.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",h.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("input",h.proxy(this._rowMaxContentWidthChange,this)),this.elements.maxContentWidthUnit.on("change",h.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",h.proxy(this._rowHeightChange,this)),this.elements.align.on("change",h.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_rowWidthChange:function(e){FLBuilderConfig.global;var t=this.elements.node,i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"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")),this._rowMaxContentWidthChange()},_rowContentWidthChange:function(e){FLBuilderConfig.global;var t=this.elements.node,i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.contentWidth.val()?(i.removeClass("fl-row-fixed-width"),i.addClass("fl-row-full-width")):(i.removeClass("fl-row-full-width"),i.addClass("fl-row-fixed-width"),this._rowMaxContentWidthChange())},_rowMaxContentWidthChange:function(e){var t=FLBuilderConfig.global,i=this.elements.node,l=this.elements.content.find(".fl-row-content"),o=this.elements.maxContentWidth.val(),n=this.elements.maxContentWidthUnit.val();""==o?o=t.row_width+t.row_width_unit:o+=n,"fixed"===this.elements.width.val()&&i.css("max-width",o),l.css("max-width",o)},_rowHeightChange:function(e){var t=this.elements.node;this.elements.content;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),t.removeClass("fl-row-full-height"),t.removeClass("fl-row-custom-height"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.val("").trigger("input")):"custom"==this.elements.height.val()?(t.addClass("fl-row-custom-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.trigger("input")):this.elements.minHeight.val("").trigger("input")},_initColumn:function(){h.extend(this.elements,{size:h(this.classes.settings+" input[name=size]"),sizeMedium:h(this.classes.settings+" input[name=size_medium]"),sizeResponsive:h(this.classes.settings+" input[name=size_responsive]"),columnHeight:h(this.classes.settings+" select[name=equal_height]"),columnAlign:h(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:h(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("input",h.proxy(this._colSizeChange,this)),this.elements.sizeMedium.on("input",h.proxy(this._colSizeChange,this)),this.elements.sizeResponsive.on("input",h.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",h.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",h.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",h.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_colSizeChange:function(e){var t=h(e.target),i=92,l=parseFloat(t.val()),o=this.elements.node.closest(".fl-col-group"),n=this.elements.node.prev(".fl-col"),e=this.elements.node.next(".fl-col"),s=0===e.length?n:e,n=this.elements.node.siblings(".fl-col"),r=0,e=FLBuilderResponsiveEditing._mode;0!==n.length&&(isNaN(l)&&("medium"===e?l=this.elements.size.val():"responsive"===e&&(l=this.elements.sizeMedium.val()?this.elements.sizeMedium.val():"auto"),"auto"!==l&&isNaN(l)&&(l=8)),"default"===e?(n.each(function(){h(this).data("node")!=s.data("node")&&(i-=parseFloat(h(this)[0].style.width),r+=parseFloat(h(this)[0].style.width))}),i<(l=l<8?8:l)&&(l=i),this.elements.node.css("width",l+"%"),s.css("width",100-r-l+"%")):(100<l&&t.val(l=100),this.updateCSSRule(this.classes.node,{"max-width":("auto"===l?100:l)+"% !important",width:("auto"===l?l:l+"%")+" !important"},void 0,!0),"responsive"===e&&(t.val()?(this.updateCSSRule(this.classes.node,"float",FLBuilderConfig.isRtl?"right":"left",!0),this.updateCSSRule(this.classes.node,"clear","none",!0)):(this.updateCSSRule(this.classes.node,"float","none",!0),this.updateCSSRule(this.classes.node,"clear","both",!0)),t.val()||this._colsHaveCustomResponsiveWidth(n)?o.addClass("fl-col-group-custom-width"):o.removeClass("fl-col-group-custom-width"))))},_colsHaveCustomResponsiveWidth:function(e){var t=FLBuilderSettingsConfig.nodes,i=!1;return e.each(function(){var e=h(this).data("node");t[e]&&t[e].size_responsive&&(i=!0)}),i},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initNodeDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var t,i,e=FLBuilder.isUndefined(e)?this.elements.settings.find(".fl-field"):e,l=null,o=0;o<e.length;o++)t=(l=e.eq(o)).data("type"),"refresh"==(i=l.data("preview")).type&&this._initFieldRefreshPreview(l),"text"==i.type&&this._initFieldTextPreview(l),"css"==i.type&&this._initFieldCSSPreview(l),"widget"==i.type&&this._initFieldWidgetPreview(l),"font"==i.type&&this._initFieldFontPreview(l),"attribute"==i.type&&this._initFieldAttributePreview(l),"animation"==i.type&&this._initFieldAnimationPreview(i,l),"callback"==i.type&&this._initFieldCallbackPreview(i,l,t,e),this._initFieldUnitSelect(l)},_initFieldCallbackPreview:function(e,t,i,l){var o=e.callback,n=h(".fl-builder-settings:visible"),s=n.data("node"),r=h(".fl-builder-content .fl-node-"+s);if(void 0!==FLBuilderPreviewCallbacks[o]?u=FLBuilderPreviewCallbacks[o]:void 0!==window[o]&&(u=window[o]),"function"==typeof u){var a={field:t,fields:l,type:i,preview:e,form:n,nodeID:s,node:r};switch(i){case"align":case"button-group":case"text":case"multiple-photos":case"video":case"icon":case"ordering":a.input=t.find("input"),a.getValue=function(){return a.input.val()};break;case"color":a.input=t.find("input.fl-color-picker-value"),a.getValues=function(){var e=a.input.val();FLBuilderPreview.formatColor(e)};break;case"textarea":case"code":a.textarea=t.find("textarea"),a.getValue=function(){return a.textarea.val()};break;case"select":case"photo-sizes":case"post-type":a.select=t.find("select"),a.getValue=function(){return a.select.val()};break;case"photo":a.input=t.find("input[type=hidden]"),a.sizeSelect=t.find("select"),a.getValues=function(){return{value:a.input.val(),size:a.sizeSelect.val()}};break;case"unit":a.input=t.find("input[type=number]"),a.unitSelect=t.find(".fl-field-unit-select"),a.getValues=function(){var e=a.input.val(),t=a.unitSelect.val();return{value:e,unit:t,formattedValue:e+t}};break;case"dimension":a.inputs=t.find("input[type=number]"),a.unitSelect=t.find(".fl-field-unit-select"),a.getValues=function(){var l={inputs:[],props:{},unit:a.unitSelect.val()};return a.inputs.each(function(e,t){var i=(t=h(t)).val(),t=t.data("unit");l.inputs.push(i),l.props[t]=i}),l};break;case"animation":a.input=t.find("input"),a.select=t.find("select"),a.getValues=function(){return{delay:a.input.val(),style:a.select.val()}};break;case"link":a.input=t.find(".fl-link-field-input-wrap input"),a.targetInput=t.find("input[name$=_target]"),a.noFollowInput=t.find("input[name$=_nofollow]"),a.getValues=function(){return{url:a.input.val(),target:a.targetInput.val(),noFollow:a.noFollowInput.val()}};break;case"shadow":a.colorInput=t.find("input.fl-color-picker-value"),a.inputs=t.find("input[type=number]"),a.getValues=function(){a.colorInput.val(),a.inputs[0].val(),a.inputs[1].val(),a.inputs[2].val(),a.inputs[3].val()};break;case"gradient":a.inputs=t.find("input"),a.select=t.find("select"),a.gradientInputs={},a.gradientInputs.type=t.find('select[name$="[type]"]'),a.gradientInputs.angle=t.find('input[name$="[angle]"]'),a.gradientInputs.position=t.find('select[name$="[position]"]'),a.gradientInputs.stops=[],t.find(".fl-gradient-picker-colors .fl-gradient-picker-color-row").each(function(e,t){t=h(t),a.gradientInputs.stops.push({color:t.find(".fl-gradient-picker-color input"),stop:t.find(".fl-gradient-picker-stop input")})}),a.getValues=function(){var e,t={type:a.gradientInputs.type.val(),angle:a.gradientInputs.angle.val(),position:a.gradientInputs.position.val(),stops:[]};for(e in a.gradientInputs.stops){var i=a.gradientInputs.stops[e];t.stops[e]={color:i.color.val(),stop:i.stop.val()}}return t};break;case"shape-transform":a.inputs=t.find("input"),a.getValues=function(){return{scaleXSign:a.inputs.eq(0).val(),scaleYSign:a.inputs.eq(1).val(),skewX:a.inputs.eq(2).val(),skewY:a.inputs.eq(3).val(),scaleX:a.inputs.eq(4).val(),rotate:a.inputs.eq(5).val(),scaleY:a.inputs.eq(6).val()}};break;default:a.input=t.find("input"),a.getValue=function(){return a.input.val()}}i=t.find(".fl-field-responsive-toggle");a.responsiveToggle=!!i.length&&i;var d,u=u.bind(this,a),c={input:"change keyup input",inputs:"change keyup input",targetInput:"change keyup input",noFollowInput:"change keyup input",colorInput:"change input",textarea:"change keyup input",select:"change",sizeSelect:"change",unitSelect:"change"};for(d in c)void 0!==a[d]&&a[d].on(c[d],u)}},_initFieldRefreshPreview:function(e){var t=e.data("type"),i=e.data("preview"),l=h.proxy(this.delayPreview,this);switch(t){case"align":e.find("input").on("change",l);break;case"text":e.find("input[type=text]").on("keyup",l);break;case"textarea":e.find("textarea").on("keyup",l);break;case"select":e.find("select").on("change",l);break;case"color":e.find(".fl-color-picker-value").on("change",l);break;case"photo":e.find("select").on("change",l);break;case"multiple-photos":e.find("input").on("change",l);break;case"photo-sizes":e.find("select").on("change",l);break;case"video":case"multiple-audios":case"icon":e.find("input").on("change",l);break;case"form":e.on("change","input",l);break;case"editor":this._addTextEditorCallback(e,i);break;case"code":e.find("textarea").on("change",l);break;case"post-type":e.find("select").on("change",l);break;case"suggest":e.find(".as-values").on("change",l),e.find("select").on("change",l);break;case"unit":case"dimension":e.find("input[type=number]").on("input",l);break;case"ordering":e.find("input[type=hidden]").on("change",l);break;default:e.on("change",l)}},_initFieldTextPreview:function(e){var t=e.data("type"),i=e.data("preview"),l=h.proxy(this._previewText,this,i);switch(t){case"text":e.find("input[type=text]").on("keyup",l);break;case"unit":e.find("input[type=number]").on("keyup",l);break;case"textarea":e.find("textarea").on("keyup",l);break;case"code":e.find("textarea").on("change",l);break;case"editor":this._addTextEditorCallback(e,i)}},_previewText:function(e,t){var i=this._getPreviewSelector(this.classes.node,e.selector),e=h(i),i=h("<div>"+h(t.target).val()+"</div>");0<e.length?(i.find("script").remove(),e.html(i.html())):this.delayPreview(t)},_previewTextEditor:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=h(l),e="undefined"!=typeof tinyMCE?tinyMCE.get(t):null,l=h("#"+t),t="";0<o.length&&((t=e&&"none"==l.css("display")?h("<div>"+e.getContent()+"</div>"):"undefined"==typeof switchEditors||void 0===switchEditors.wpautop?h("<div>"+l.val()+"</div>"):h("<div>"+switchEditors.wpautop(l.val())+"</div>")).find("script").remove(),o.html(t.html()))},_addTextEditorCallback:function(e,t){var i=e.find("textarea.wp-editor-area").attr("id"),e=null;if("refresh"==t.type)e=h.proxy(this.delayPreview,this);else{if("text"!=t.type)return;e=h.proxy(this._previewTextEditor,this,t,i)}h("#"+i).on("keyup",e),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(i),editor.on("change",e),editor.on("keyup",e))},_initFieldFontPreview:function(e){var t=e.data("type"),i=e.data("preview");i.id=e.attr("id");i=h.proxy(this._previewFont,this,i);"font"==t&&e.find(".fl-font-field").on("change","select",i)},_previewFont:function(e,t){var i=h(t.delegateTarget),l=i.find(".fl-font-field-font"),o=h(l).find(":selected").parent().attr("label"),n=i.find(".fl-font-field-weight"),s=e.id+"-"+this.nodeId,t=this._getPreviewSelector(this.classes.node,e.selector),i=e.important?" !important":"",e="";"Google"!=o&&"Recently Used"!=o||this._buildFontStylesheet(s,l.val(),n.val());e=l.val();new RegExp("[0-9]").test(l.val())&&(e='"'+l.val()+'"'),this.updateCSSRule(t,"font-family","Default"===l.val()?"":e+i),this.updateCSSRule(t,"font-weight","default"===n.val()?"":n.val()+i)},_buildFontStylesheet:function(e,t,i){var l=FLBuilderConfig.googleFontsUrl,o="",n={},s={};n[t]=[i],FLBuilderPreview._fontsList[e]=n,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var i=FLBuilderPreview._fontsList[e];Object.keys(i).forEach(function(t){var e=i[t];s[t]=s[t]||[],e=e.filter(function(e){return s[t].indexOf(e)<0}),s[t]=s[t].concat(e)})}),h.each(s,function(e,t){o+="Molle"===e?e+":i|":e+":"+t.join()+"|"}),o=l+o.slice(0,-1).replace(" ","+"),h("#fl-builder-google-fonts-preview").length<1?h("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",o).appendTo("head"):h("#fl-builder-google-fonts-preview").attr("href",o)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if(void 0!==t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(e,t){switch(e.data("type")){case"align":e.find("input").on("change",h.proxy(this._previewCSS,this,t,e));break;case"border":e.find("select").on("change",h.proxy(this._previewBorderCSS,this,t,e)),e.find("input[type=number]").on("input",h.proxy(this._previewBorderCSS,this,t,e)),e.find("input[type=hidden]").on("change",h.proxy(this._previewBorderCSS,this,t,e));break;case"color":e.find(".fl-color-picker-value").on("change",h.proxy(this._previewColorCSS,this,t,e));break;case"dimension":e.find("input[type=number]").on("input",h.proxy(this._previewDimensionCSS,this,t,e));break;case"gradient":e.find("select").on("change",h.proxy(this._previewGradientCSS,this,t,e)),e.find(".fl-gradient-picker-angle").on("input",h.proxy(this._previewGradientCSS,this,t,e)),e.find(".fl-color-picker-value").on("change",h.proxy(this._previewGradientCSS,this,t,e)),e.find(".fl-gradient-picker-stop").on("input",h.proxy(this._previewGradientCSS,this,t,e));break;case"photo":case"select":e.find("select").on("change",h.proxy(this._previewCSS,this,t,e));break;case"shadow":e.find("input").on("input",h.proxy(this._previewShadowCSS,this,t,e)),e.find(".fl-color-picker-value").on("change",h.proxy(this._previewShadowCSS,this,t,e));break;case"text":e.find("input[type=text]").on("keyup",h.proxy(this._previewCSS,this,t,e));break;case"typography":e.find("select").on("change",h.proxy(this._previewTypographyCSS,this,t,e)),e.find("input[type=number]").on("input",h.proxy(this._previewTypographyCSS,this,t,e)),e.find("input[type=hidden]").on("change",h.proxy(this._previewTypographyCSS,this,t,e));break;case"unit":e.find("input[type=number]").on("input",h.proxy(this._previewCSS,this,t,e))}},_previewCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=e.property,n=this._getPreviewCSSUnit(e,t,i),t=h(i.target),i=t.val(),t=!!t.closest(".fl-field-responsive-setting").length,e=e.important&&""!==i?" !important":"";-1<o.indexOf("image")&&i?i="url("+i+")":"%"===n&&"opacity"===o?i=parseInt(i)/100:""!==i&&(i+=n),this.updateCSSRule(l,o,i+e,t)},_previewBorderCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=h(i.target),t=o.closest(".fl-field"),n=o.closest(".fl-compound-field-setting"),s=n.data("property"),r=o.val(),a=(n.find(".fl-field-unit-select"),!!o.closest(".fl-field-responsive-setting").length),o=e.important&&""!==r?" !important":"";"border-color"===(e.property=s)?this._previewColorCSS(e,t,i):"border-width"===s||"border-radius"===s?this._previewDimensionCSS(e,t,i):"box-shadow"===s?this._previewShadowCSS(e,n,i):("border-style"===s&&t.find(".fl-border-field-width input:visible").trigger("input"),this.updateCSSRule(l,s,r+o,a))},_previewColorCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=h(i.target),n=o.val(),i=!!o.closest(".fl-field-responsive-setting").length,o=e.important&&""!==n?" !important":"";""!==n&&n.indexOf("rgb")<0&&(n="#"+n),this.updateCSSRule(l,e.property,n+o,i)},_previewDimensionCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=e.property,n=t.attr("id").replace("fl-field-",""),s=h(i.target).data("unit"),i=this._getDimensionValue(e,t,s,i),t=!!t.find(".fl-field-responsive-setting").length,e=e.important&&""!==i?" !important":"",o="border-radius"===o?"border-"+s.replace("_","-")+"-radius":"border-width"===o?"border-"+s+"-width":o+"-"+s;this.updateCSSRule(l,o,i+e,t),"margin"!==n&&"padding"!==n&&"border"!==n||this.elements.node.find(".fl-bg-slideshow").length&&FLBuilder._resizeLayout()},_getDimensionValue:function(e,t,i,l){var o=h(l.target).val();return null===(o=o.toLowerCase().replace(/[^a-z0-9%.\-]/g,""))||""===o||isNaN(o)||(l=this._getPreviewCSSUnit(e,t,l),o=parseFloat(o)+(l||"px")),o},_getPreviewCSSUnit:function(e,t,i){var l=h(i.target),o=(FLBuilderResponsiveEditing._mode,!!l.closest(".fl-compound-field-setting").length),n=!!l.closest(".fl-field-responsive-setting").length,i=null;return(i=(o?l.closest(".fl-compound-field-setting"):n?l.closest(".fl-field-responsive-setting"):t).find(".fl-field-unit-select"))&&i.length?"SELECT"===i.prop("tagName")?i.val():i.text():e.unit||""},_initFieldUnitSelect:function(e){e.find(".fl-field-unit-select").on("change",function(){var e=h(this),t=e.closest(".fl-field-responsive-setting"),e=e.closest(".fl-field");(t.length?t:e).find("input").trigger("input")})},_previewGradientCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=t.find(".fl-gradient-picker-type-select").val(),n=t.find(".fl-gradient-picker-angle").val(),s=t.find(".fl-gradient-picker-position").val(),r=t.find(".fl-color-picker-value"),a=t.find(".fl-gradient-picker-stop input"),d=[],t="";r.each(function(e){var t=h(this).val(),e=a.eq(e).val();(t=""===t?"rgba(255,255,255,0)":t).indexOf("rgb")<0&&(t="#"+t),isNaN(e)&&(e=0),d.push(t+" "+e+"%")}),d=d.join(", "),t="linear"===o?"linear-gradient("+(n=isNaN(n)?0:n)+"deg, "+d+")":"radial-gradient(at "+s+", "+d+")",s=e.important&&""!==t?" !important":"",this.updateCSSRule(l,e.property,t+s)},_previewShadowCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=t.find(".fl-shadow-field-color input").val(),n=t.find(".fl-shadow-field-horizontal input").val(),s=t.find(".fl-shadow-field-vertical input").val(),r=t.find(".fl-shadow-field-blur input").val(),a=t.find(".fl-shadow-field-spread input").val(),d=!!t.find(".fl-shadow-field-spread input").length,u=!!h(i.target).closest(".fl-field-responsive-setting").length,t="",i="";""!==o&&(""===a&&(a=0),t=(n=""===n?0:n)+"px ",t+=(s=""===s?0:s)+"px ",t+=(r=""===r?0:r)+"px ",d&&(t+=a+"px "),t+=o=o.indexOf("rgb")<0?"#"+o:o,t+=i),i=e.important&&""!==t?" !important":"",this.updateCSSRule(l,e.property,t,u)},_previewTypographyCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=h(i.target),t=o.closest(".fl-field"),n=o.closest(".fl-compound-field-setting"),s=n.data("property"),r=o.val(),a=n.find(".fl-field-unit-select"),d=!!o.closest(".fl-field-responsive-setting").length,o=e.important&&""!==r?" !important":"";"font-family"===s?(e.id=t.attr("id"),this._previewFont(e,{delegateTarget:n})):"text-shadow"===s?(e.property="text-shadow",this._previewShadowCSS(e,n,i)):(a.length&&""!==r&&("vw"===a.val()?r="calc("+FLBuilderConfig.global.responsive_base_fontsize+"px + "+r+"vw)":r+="SELECT"===a.prop("tagName")?a.val():"px"),this.updateCSSRule(l,s,r+o,d))},_initFieldAttributePreview:function(e){var t=e.data("preview"),i=t.attribute,l=e.find("input"),e=(e.val(),window[t.format_callback]),t=this._getPreviewSelector(this.classes.node,t.selector),t=h(t),e=this._previewAttribute.bind(this,l,t,i,e);l.on("change",e),l.on("keyup",e),l.on("input",e)},_previewAttribute:function(e,t,l,o){var n=e.val();for("function"==typeof o&&(n=o(n)),i=0;i<t.length;i++)t[i].setAttribute(l,n)},_initFieldWidgetPreview:function(e){var t=h.proxy(this.delayPreview,this);e.find("input").on("keyup",t),e.find("input[type=checkbox]").on("click",t),e.find("textarea").on("keyup",t),e.find("select").on("change",t)},_initFieldAnimationPreview:function(e,t){t.find(".fl-animation-field-style select").on("change",h.proxy(this._previewAnimationField,this,e,t)),t.find(".fl-animation-field-duration input").on("input",h.proxy(this._previewAnimationField,this,e,t))},_previewAnimationField:function(e,t,i){var e=this._getPreviewSelector(this.classes.node,e.selector),l=h(e),e=t.find(".fl-animation-field-style select"),t=t.find(".fl-animation-field-duration input"),o=e[0].options;l.removeClass("fl-animated"),l.removeClass("fl-animation"),l.css("animation-duration","");for(var n=0;n<o.length;n++)l.removeClass("fl-"+o[n].value);""!==e.val()&&(l.addClass("fl-animation"),l.addClass("fl-"+e.val()),l.data("animation-delay",0),l.data("animation-duration",t.val())),FLBuilderLayout._doModuleAnimation.apply(l)},_getPreviewSelector:function(e,t){return FLBuilderPreview.getFormattedSelector.call(this,e,t)},toUpperCaseWords:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},FLBuilderPreview.formatColor=function(e){return e=""!==e&&e.indexOf("rgb")<0&&e.indexOf("url")<0?"#"+e:e},FLBuilderPreviewCallbacks={previewShape:function(e,t){var i=e.preview.position,l=e.preview.prefix,e=e.form;yOrientation=e.find('input[name="'+(l+"transform[][scaleYSign]")+'"]'),"bottom"===i?yOrientation.val("invert"):yOrientation.val(""),yOrientation.trigger("change"),this.delayPreview()},previewShapeLayerSize:function(e,t){var i,l=e.getValues(),o=l.unit,n=l.props.width,s=l.props.height,r=l.props.top,a=e.preview.prefix,d=e.preview.position,u=this._getPreviewSelector(this.classes.node,".fl-builder-"+d+"-edge-layer"),c=u+" > *",h=e.form.find('[name="'+a+'align"]').val().split(" "),l=h[0],h=h[1],a=e.form.find('[name="'+a+'shape"]').val(),a=FLBuilderConfig.presets.shape[a];if(shapeProps={width:"100%",left:"auto",right:"auto",height:"auto",top:"auto",bottom:"auto"},n){shapeProps.width=n+o;var f=n/2+o;switch(h){case"left":shapeProps.left="0",shapeProps.right="auto";break;case"right":shapeProps.left="auto",shapeProps.right="0";break;case"center":shapeProps.left="calc( 50% - "+f+")",shapeProps.right="auto"}}switch(this.updateCSSRule(c,"width",shapeProps.width),this.updateCSSRule(c,"left",shapeProps.left),this.updateCSSRule(c,"right",shapeProps.right),i=s?s/2+o:n?n/a.data.viewBox.width*100/2+o:"",s&&(shapeProps.height=s+o),l){case"top":shapeProps.top="0",shapeProps.bottom="auto";break;case"bottom":shapeProps.top="auto",shapeProps.bottom="0";break;case"center":shapeProps.top="calc( 50% - "+i+")",shapeProps.bottom="auto"}this.updateCSSRule(c,"height",shapeProps.height),this.updateCSSRule(c,"top",shapeProps.top),this.updateCSSRule(c,"bottom",shapeProps.bottom),""===r?this.updateCSSRule(u,d,"0"):this.updateCSSRule(u,d,r+o)},previewShapeAlign:function(e,t){var i=e.preview.prefix;e.form.find('[name="'+i+'size_width"]').trigger("input")},previewShapeFillStyle:function(e,t){var i=e.input.val(),l=e.preview,o=e.preview.prefix,n="fl-row-"+e.nodeID+"-"+o+"-linear-gradient",s="fl-row-"+e.nodeID+"-"+o+"-radial-gradient",r="fl-row-"+e.nodeID+"-"+o+"-pattern",a=e.form;if(void 0!==i){var d=this._getPreviewSelector(this.classes.node,l.selector);switch(i){case"color":var u=a.find("[name="+o+"fill_color]").val();this.updateCSSRule(d,"fill",FLBuilderPreview.formatColor(u));break;case"gradient":u=a.find("#fl-field-"+o+"fill_gradient").find('select[name$="[type]"]').val();this.updateCSSRule(d,"fill","url(#"+("radial"===u?s:n)+")");break;case"pattern":this.updateCSSRule(d,"fill","url(#"+r+")")}}},previewShapeGradientFill:function(e,t){var i=e.getValues(),l=e.node,o=".fl-builder-"+e.preview.position+"-edge-layer",e=l.find(o+" "+i.type+"Gradient"),l="url(#"+e.attr("id")+")",o=this._getPreviewSelector(this.classes.node,o+" .fl-shape");this.updateCSSRule(o,"fill",l);var n,s=e.find("stop");for(n in i.stops){var r=i.stops[n],a=s.eq(n),d=r.color,u=r.stop,c=1;0===d.indexOf("rgba")&&(c=(r=d.substring(d.indexOf("(")+1,d.lastIndexOf(")")).split(/,\s*/)).pop(),d="rgb("+r.join(",")+")"),a.attr("stop-color",FLBuilderPreview.formatColor(d)),a.attr("stop-opacity",c),a.attr("offset",u+"%")}if("linear"===i.type&&void 0!==e[0]&&e[0].setAttribute("gradientTransform","rotate("+i.angle+" .5 .5 )"),"radial"===i.type){parts=i.position.split(" ");var h,f,o=parts[0],l=parts[1];switch(o){case"top":case"left":h=0;break;case"center":h=.5;break;case"bottom":case"right":h=1}switch(l){case"top":case"left":f=0;break;case"center":f=.5;break;case"bottom":case"right":f=1}(l=.5)===h&&.5===f||(l=1),e.attr("cx",h),e.attr("cy",f),e.attr("r",l)}},previewShapeTransform:function(e,t){e.form;var i=e.preview,i=(i.prefix,this._getPreviewSelector(this.classes.node,i.selector)+" > *"),l=e.getValues(),o=[];Object.keys(l).map(function(e){var t=l[e],i="";switch(e){case"scaleXSign":case"scaleYSign":return;case"scaleX":case"scaleY":t&&""!==t&&0!==t||(t="1"),t="invert"===("scaleX"===e?l.scaleXSign:l.scaleYSign)?-Math.abs(t):Math.abs(t),o.push(e+"("+t+")");break;case"translateX":case"translateY":t&&o.push(e+"("+t+(i="px")+")");break;case"skewX":case"skewY":t&&o.push(e+"("+t+(i="deg")+")");break;case"rotate":i="deg",""!==t&&"0"!==t&&o.push("rotate("+t+i+")")}}),this.updateCSSRule(i,"transform",o.join(" "))}}}(jQuery),function(u){var i={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^{]*{([\s\S]+?})\s*}/gi,empty:/@media[^{]*{([^{}]*?)}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,l.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var e,t,i,l=null,o=null,n=null,s=!1,r=0,a=0;r<document.styleSheets.length;r++)if(element=document.styleSheets[r].ownerNode,l=element.href,e=element.id,t=element.tagName.toLowerCase(),o=element.rel,i=element.media,n=l?l.split("?").shift():e||"style-"+r,s=!1,"style"===t||l&&o&&"stylesheet"===o.toLowerCase()){for(a=0;a<this.ignored.length;a++)if(-1<n.indexOf(this.ignored[a])){s=!0;break}if(!s){for(a=0;a<this.reparsed.length;a++)if(-1<n.indexOf(this.reparsed[a])){this.sheets[n]=null;break}void 0!==this.sheets[n]&&this.sheets[n]||this.queue.push({docSheet:document.styleSheets[r],element:u(element),key:n,tagName:t,href:l,id:e,media:i})}}return this.queue.length},runQueue:function(){var t;this.queue.length?"style"===(t=this.queue.shift()).tagName?(this.parse(t.element.html(),t),this.runQueue()):u.get(t.href,u.proxy(function(e){this.parse(e,t),this.runQueue()},this)).fail(this.runQueue.bind(this)):this.applyStyles()},parse:function(e,t){var i,l=this.regex,o=this.cleanStyles(e),n=o.match(l.media),s=n&&n.length||0,r=!s&&t.media,a=null,e="",d=0,u=0;for(n?e=o.replace(l.media,""):r&&"all"!=t.media?s=1:e=o,this.sheets[t.key]={docSheet:t.docSheet,element:t.element,key:t.key,tagName:t.tagName,href:t.href,id:t.id,all:e,queries:[]},d=0;d<s;d++)for(o=r?(a=t.media,this.convertURLs(o,t.href)):(a=n[d].match(l.findStyles)&&RegExp.$1,RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),i=a.split(","),u=0;u<i.length;u++)"print"!=((a=i[u]).split("(")[0].match(l.only)&&RegExp.$2)&&(a.replace(l.minmaxwh,"").match(l.other)||this.sheets[t.key].queries.push({minw:a.match(l.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:a.match(l.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:o}))},applyStyles:function(){var e=u("head"),t={all:"",queries:[]},i=null,l=null,o=null,n=null,s=null,r=null,a=null,d=!1;for(o in this.clearStyles(),this.sheets)if((l=this.sheets[o]).queries.length&&this.width){for(t.all+=l.all,s=0;s<l.queries.length;s++)r=(n=l.queries[s]).minw,a=n.maxw,d=!1,r&&(r=parseFloat(r)*(-1<r.indexOf("em")?this.getEmPxValue():1),this.width>=r&&(t.queries.push({media:"min",width:r,styles:n.styles}),d=!0)),a&&!d&&(a=parseFloat(a)*(-1<a.indexOf("em")?this.getEmPxValue():1),this.width<=a&&t.queries.push({media:"max",width:a,styles:n.styles}));l.docSheet.disabled=!0}for(""!==t.all&&(i=u('<style class="fl-builder-media-query" data-query="all"></style>'),this.styles.push(i),e.append(i),i.html(t.all)),s=0;s<t.queries.length;s++)n=t.queries[s],i=u('<style class="fl-builder-media-query" data-query="'+n.media+'" data-value="'+n.width+'"></style>'),this.styles.push(i),e.append(i),i.html(n.styles);this.callback&&(this.callback(),this.callback=null)},clearStyles:function(){var e=null,t=this.styles.slice(0);for(e in this.styles=[],this.sheets)this.sheets[e].docSheet.disabled=!1;for(var i=0;i<t.length;i++)t[i].empty(),t[i].remove()},disableStyles:function(e){for(var t,i,l=0;l<this.styles.length;l++)t=(i=this.styles[l]).attr("data-query"),i=parseInt(i.attr("data-value")),"max"===t&&!isNaN(i)&&i<=e&&(this.styles[l][0].sheet.disabled=!0)},enableStyles:function(){for(var e=0;e<this.styles.length;e++)this.styles[e][0].sheet.disabled=!1,this.styles[e][0].sheet.disabled=!0,this.styles[e][0].sheet.disabled=!1},cleanStyles:function(e){var t=this.regex;return e.replace(t.comments,"").replace(t.keyframes,"").replace(t.empty,"")},convertURLs:function(e,t){return t?((t=t.substring(0,t.lastIndexOf("/"))).length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")):e},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=window.document,t=e.documentElement,i=e.body,l=e.createElement("div"),o=t.style.fontSize,n=i&&i.style.fontSize,s=!1;return l.style.cssText="position:absolute;font-size:1em;width:1em",i||((i=s=e.createElement("body")).style.background="none"),t.style.fontSize="100%",i.style.fontSize="100%",i.appendChild(l),s&&t.insertBefore(i,t.firstChild),e=parseFloat(l.offsetWidth),s?t.removeChild(i):i.removeChild(l),t.style.fontSize=o,i.style.fontSize=n||"",this.emPxValue=e}},l={_functions:null,update:function(){if(!this._functions)for(var e in this._functions={},t)this._functions[e]=jQuery.fn[e];if(i.width)for(e in t)jQuery.fn[e]=t[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},t={width:function(e){return null!=e?l._functions.width.call(this,e):u.isWindow(this[0])?i.width:l._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){i.ignore(e)},reparse:function(e){i.reparse(e)},update:function(e,t){i.update(e,t)},disableStyles:function(e){i.disableStyles(e)},enableStyles:function(){i.enableStyles()}}}(jQuery),function(d){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(e){var t;d(".fl-responsive-preview").length&&"default"!==this._mode?("responsive"==this._mode?(t=320<=FLBuilderConfig.global.responsive_breakpoint?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(t,e)):"medium"==this._mode&&(t=769<=FLBuilderConfig.global.medium_breakpoint?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(t,e)),FLBuilder._resizeLayout()):e&&e()},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("endEditingSession",this._clearPreview),FLBuilder.addHook("didEnterRevisionPreview",this._clearPreview),FLBuilder.addHook("responsiveEditing",this._menuToggleClicked),FLBuilder.addHook("preview-init",this._switchAllSettingsToCurrentMode),FLBuilder.addHook("responsive-editing-switched",this._showSize),d("body").on("click",".fl-field-responsive-toggle",this._settingToggleClicked),d("body").on("click",".fl-responsive-preview-message button",this._previewToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,FLBuilderConfig.relativePluginUrl]),ignorelist=d.map(FLBuilderConfig.responsiveIgnore,function(e,t){return[e]}),FLBuilderSimulateMediaQuery.ignore(ignorelist),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css",FLBuilderConfig.postId+"-layout-draft-partial.css",FLBuilderConfig.postId+"-layout-preview.css",FLBuilderConfig.postId+"-layout-preview-partial.css",FLBuilderConfig.postId+"-inline-css","fl-builder-global-css","fl-builder-layout-css"])},_showSize:function(){var e=d(".fl-responsive-preview-message .size"),t="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,i="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,l="";d(".fl-responsive-preview").hasClass("fl-preview-responsive")?l=FLBuilderStrings.mobile+" "+i+"px":d(".fl-responsive-preview").hasClass("fl-preview-medium")&&(l=FLBuilderStrings.medium+" "+t+"px"),e.html("").html(l)},_switchTo:function(e,t){var i=d("html"),l=d("body"),o=d(FLBuilder._contentClass),n=d(".fl-responsive-preview"),s=d(".fl-responsive-preview-mask"),r=d(".fl-content-placeholder"),a=null;if("default"==(FLBuilderResponsiveEditing._mode=e)){if(0===r.length)return;i.removeClass("fl-responsive-preview-enabled"),r.after(o),r.remove(),n.remove(),s.remove()}else 0===n.length?(i.addClass("fl-responsive-preview-enabled"),o.after('<div class="fl-content-placeholder"></div>'),l.prepend(wp.template("fl-responsive-preview")()),d(".fl-responsive-preview").addClass("fl-preview-"+e),d(".fl-responsive-preview-content").append(o)):(n.removeClass("fl-preview-responsive fl-preview-medium"),n.addClass("fl-preview-"+e));"responsive"==e?(a="1"!==FLBuilderConfig.global.responsive_preview&&360<=FLBuilderConfig.global.responsive_breakpoint?360:FLBuilderConfig.global.responsive_breakpoint,o.width(a),FLBuilderSimulateMediaQuery.update(a,t),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):"medium"==e?(a="1"!==FLBuilderConfig.global.responsive_preview&&769<=FLBuilderConfig.global.medium_breakpoint?769:FLBuilderConfig.global.medium_breakpoint,o.width(a),FLBuilderSimulateMediaQuery.update(a,t),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):(o.width(""),FLBuilderSimulateMediaQuery.update(null,t)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),this._previewFields(),FLBuilder.triggerHook("responsive-editing-switched",e)},_setContentBackgroundColor:function(){var e=d(FLBuilder._contentClass),t=d(".fl-responsive-preview"),i=d(".fl-content-placeholder").parents(),l="#fff",o=0;if(0===t.length)e.css("background-color","");else{for(;o<i.length&&"rgba(0, 0, 0, 0)"==(l=i.eq(o).css("background-color"));o++);e.css("background-color",l)}},_switchToAndScroll:function(i){var e=d(".fl-builder-settings").data("node"),t=void 0===e?void 0:d(".fl-node-"+e);FLBuilderResponsiveEditing._switchTo(i,function(){var e;void 0!==t&&t&&(d(window),(e=d(".fl-responsive-preview-content")).length?(e.scrollTop(0),e.scrollTop(t.offset().top-150)):d("html, body").scrollTop(t.offset().top-100)),d(".fl-row-bg-parallax").each(function(){var e=d(this),t=e.find("> .fl-row-content-wrap"),e={default:e.data("parallax-image"),medium:e.data("parallax-image-medium"),responsive:e.data("parallax-image-responsive")};void 0!==e[i]&&t.css("background-image","url("+e[i]+")")})})},_switchAllSettingsTo:function(e){var t="dashicons-desktop dashicons-tablet dashicons-smartphone";d(".fl-field-responsive-toggle").removeClass(t),d(".fl-field-responsive-setting").hide(),t="default"==e?"dashicons-desktop":"medium"==e?"dashicons-tablet":"dashicons-smartphone",d(".fl-field-responsive-toggle").addClass(t).data("mode",e),d(".fl-field-responsive-setting-"+e).css("display","inline-block")},_switchAllSettingsToCurrentMode:function(){var e=FLBuilderResponsiveEditing;e._switchAllSettingsTo(e._mode),FLBuilder.triggerHook("responsive-editing-switched",e._mode)},_setMarginPaddingPlaceholders:function(){var e="#fl-field-padding .fl-field-responsive-setting-default",t={values:{top:d(e+' input[ name="padding_top" ]').val(),right:d(e+' input[ name="padding_right" ]').val(),bottom:d(e+' input[ name="padding_bottom" ]').val(),left:d(e+' input[ name="padding_left" ]').val()},placeholders:{top:d(e+' input[ name="padding_top" ]').attr("placeholder"),right:d(e+' input[ name="padding_right" ]').attr("placeholder"),bottom:d(e+' input[ name="padding_bottom" ]').attr("placeholder"),left:d(e+' input[ name="padding_left" ]').attr("placeholder")}},i="#fl-field-padding .fl-field-responsive-setting-medium",l={values:{top:d(i+' input[ name="padding_top_medium" ]').val(),right:d(i+' input[ name="padding_right_medium" ]').val(),bottom:d(i+' input[ name="padding_bottom_medium" ]').val(),left:d(i+' input[ name="padding_left_medium" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}},o="#fl-field-padding .fl-field-responsive-setting-responsive",n=(d(i+' input[ name="padding_top_responsive" ]').val(),d(i+' input[ name="padding_right_responsive" ]').val(),d(i+' input[ name="padding_bottom_responsive" ]').val(),d(i+' input[ name="padding_left_responsive" ]').val(),"#fl-field-margin .fl-field-responsive-setting-default"),s={values:{top:d(n+' input[ name="margin_top" ]').val(),right:d(n+' input[ name="margin_right" ]').val(),bottom:d(n+' input[ name="margin_bottom" ]').val(),left:d(n+' input[ name="margin_left" ]').val()},placeholders:{top:d(n+' input[ name="margin_top" ]').attr("placeholder"),right:d(n+' input[ name="margin_right" ]').attr("placeholder"),bottom:d(n+' input[ name="margin_bottom" ]').attr("placeholder"),left:d(n+' input[ name="margin_left" ]').attr("placeholder")}},r="#fl-field-margin .fl-field-responsive-setting-medium",e={values:{top:d(r+' input[ name="margin_top_medium" ]').val(),right:d(r+' input[ name="margin_right_medium" ]').val(),bottom:d(r+' input[ name="margin_bottom_medium" ]').val(),left:d(r+' input[ name="margin_left_medium" ]').val()},placeholders:{top:s.values.top||s.placeholders.top,right:s.values.right||s.placeholders.right,bottom:s.values.bottom||s.placeholders.bottom,left:s.values.left||s.placeholders.left}},n="#fl-field-margin .fl-field-responsive-setting-responsive";d(n+' input[ name="margin_top_responsive" ]').val(),d(n+' input[ name="margin_right_responsive" ]').val(),d(n+' input[ name="margin_bottom_responsive" ]').val(),d(n+' input[ name="margin_left_responsive" ]').val();""!=t.values.top?d(i+' input[ name="padding_top_medium"] ').attr("placeholder",t.values.top):d(i+' input[ name="padding_top_medium"] ').attr("placeholder",t.placeholders.top),""!=t.values.right?d(i+' input[ name="padding_right_medium"] ').attr("placeholder",t.values.right):d(i+' input[ name="padding_right_medium"] ').attr("placeholder",t.placeholders.right),""!=t.values.bottom?d(i+' input[ name="padding_bottom_medium"] ').attr("placeholder",t.values.bottom):d(i+' input[ name="padding_bottom_medium"] ').attr("placeholder",t.placeholders.bottom),""!=t.values.left?d(i+' input[ name="padding_left_medium"] ').attr("placeholder",t.values.left):d(i+' input[ name="padding_left_medium"] ').attr("placeholder",t.placeholders.left),""!=l.values.top?d(o+' input[ name="padding_top_responsive"] ').attr("placeholder",l.values.top):""!=t.values.top?d(o+' input[ name="padding_top_responsive"] ').attr("placeholder",t.values.top):d(o+' input[ name="padding_top_responsive"] ').attr("placeholder",t.placeholders.top),""!=l.values.right?d(o+' input[ name="padding_right_responsive"] ').attr("placeholder",l.values.right):""!=t.values.right?d(o+' input[ name="padding_right_responsive"] ').attr("placeholder",t.values.right):d(o+' input[ name="padding_right_responsive"] ').attr("placeholder",t.placeholders.right),""!=l.values.bottom?d(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",l.values.bottom):""!=t.values.bottom?d(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",t.values.bottom):d(o+' input[ name="padding_bottom_responsive"] ').attr("placeholder",t.placeholders.bottom),""!=l.values.left?d(o+' input[ name="padding_left_responsive"] ').attr("placeholder",l.values.left):""!=t.values.left?d(o+' input[ name="padding_left_responsive"] ').attr("placeholder",t.values.left):d(o+' input[ name="padding_left_responsive"] ').attr("placeholder",t.placeholders.left),""!=s.values.top?d(r+' input[ name="margin_top_medium" ]').attr("placeholder",s.values.top):d(r+' input[ name="margin_top_medium" ]').attr("placeholder",s.placeholders.top),""!=s.values.right?d(r+' input[ name="margin_right_medium" ]').attr("placeholder",s.values.right):d(r+' input[ name="margin_right_medium" ]').attr("placeholder",s.placeholders.right),""!=s.values.bottom?d(r+' input[ name="margin_bottom_medium" ]').attr("placeholder",s.values.bottom):d(r+' input[ name="margin_bottom_medium" ]').attr("placeholder",s.placeholders.bottom),""!=s.values.left?d(r+' input[ name="margin_left_medium" ]').attr("placeholder",s.values.left):d(r+' input[ name="margin_left_medium" ]').attr("placeholder",s.placeholders.left),""!=e.values.top?d(n+' input[ name="margin_top_responsive" ]').attr("placeholder",e.values.top):""!=s.values.top?d(n+' input[ name="margin_top_responsive" ]').attr("placeholder",s.values.top):d(n+' input[ name="margin_top_responsive" ]').attr("placeholder",s.placeholders.top),""!=e.values.right?d(n+' input[ name="margin_right_responsive" ]').attr("placeholder",e.values.right):""!=s.values.right?d(n+' input[ name="margin_right_responsive" ]').attr("placeholder",s.values.right):d(n+' input[ name="margin_right_responsive" ]').attr("placeholder",s.placeholders.right),""!=e.values.bottom?d(n+' input[ name="margin_bottom_responsive" ]').attr("placeholder",e.values.bottom):""!=s.values.bottom?d(n+' input[ name="margin_bottom_responsive" ]').attr("placeholder",s.values.bottom):d(n+' input[ name="margin_bottom_responsive" ]').attr("placeholder",s.placeholders.bottom),""!=e.values.left?d(n+' input[ name="margin_left_responsive" ]').attr("placeholder",e.values.left):""!=s.values.left?d(n+' input[ name="margin_left_responsive" ]').attr("placeholder",s.values.left):d(n+' input[ name="margin_left_responsive" ]').attr("placeholder",s.placeholders.left)},_settingToggleClicked:function(){var e=d(this),t="default"==(t=e.data("mode"))?"medium":"medium"==t?"responsive":"default";FLBuilderResponsiveEditing._switchAllSettingsTo(t),FLBuilderResponsiveEditing._switchToAndScroll(t),e.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_menuToggleClicked:function(){var e="default"==(e=FLBuilderResponsiveEditing._mode)?"medium":"medium"==e?"responsive":"default";FLBuilder.MainMenu.hide(),FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_previewToggleClicked:function(){var e=d(this).data("mode");FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_previewFields:function(){var o=FLBuilderResponsiveEditing._mode,e=d(".fl-builder-settings:visible");0!==e.length&&void 0!==e.attr("data-node")&&(FLBuilder.triggerHook("responsive-editing-before-preview-fields",o),e.find(".fl-builder-settings-tab").each(function(){var e=d(this);e.css("display","block"),e.find(".fl-field-responsive-setting-"+o+":visible").each(function(){var e=d(this),t=e.closest(".fl-field"),i=t.data("type"),l=t.data("preview"),t=t.find(".fl-field-connection-visible").length;"refresh"!=l.type&&(t?"photo"===i&&"default"!==o&&e.find(".fl-photo-remove").trigger("click"):(e.find("input").trigger("keyup"),e.find("select").trigger("change")))}),e.css("display","")}),FLBuilder.triggerHook("responsive-editing-after-preview-fields",o))}},d(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(n){FLBuilderResponsivePreview={enter:function(){this.render()},exit:function(){this.destroy()},switchTo:function(e){var t=FLBuilderConfig.global,i=n("#fl-builder-preview-frame"),l="100%";"responsive"==e?(l="1"!==t.responsive_preview&&360<=t.responsive_breakpoint?360:t.responsive_breakpoint,i.width(l)):"medium"==e&&(l="1"!==t.responsive_preview&&769<=t.medium_breakpoint?769:t.medium_breakpoint,i.width(l)),i.width(l)},render:function(){var e=n("body"),t=FLBuilderConfig.previewUrl,i=n("#fl-builder-preview-mask, #fl-builder-preview-frame"),l=n('<div id="fl-builder-preview-mask"></div>'),t=n('<iframe id="fl-builder-preview-frame" src="'+t+'"></iframe>');i.remove(),e.append(l),e.append(t),e.css("overflow","hidden")},_showSize:function(e){var t=n(".fl-builder--preview-actions .size"),i="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,l="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,o="";"responsive"===e?o=FLBuilderStrings.mobile+" "+l+"px":"medium"===e&&(o=FLBuilderStrings.medium+" "+i+"px"),t.html("").html(o)},destroy:function(){n("#fl-builder-preview-mask, #fl-builder-preview-frame").remove(),n("body").css("overflow","visible"),n(".fl-builder--preview-actions .size").html("")}}}(jQuery),function(d){var u={init:function(){var e=d("body");e.on("change",".fl-builder-service-select",this._serviceChange),e.on("click",".fl-builder-service-connect-button",this._connectClicked),e.on("change",".fl-builder-service-account-select",this._accountChange),e.on("click",".fl-builder-service-account-delete",this._accountDeleteClicked),e.on("change",".fl-builder-campaign-monitor-client-select",this._campaignMonitorClientChange),e.on("change",".fl-builder-mailchimp-list-select",this._mailChimpListChange),e.on("change",".fl-builder-activecampaign-list_type-select",this._activeCampaignChange)},_startSettingsLoading:function(e){var t=d(".fl-builder-settings"),i=e.closest(".fl-builder-service-settings"),e=d(".fl-builder-service-error");t.append('<div class="fl-builder-loading"></div>'),i.addClass("fl-builder-service-settings-loading"),e.remove()},_finishSettingsLoading:function(){var e=d(".fl-builder-settings"),t=d(".fl-builder-service-settings-loading");e.find(".fl-builder-loading").remove(),t.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this),i=t.closest("tr"),l=t.val();i.siblings("tr.fl-builder-service-account-row").remove(),i.siblings("tr.fl-builder-service-connect-row").remove(),i.siblings("tr.fl-builder-service-field-row").remove(),d(".fl-builder-service-error").remove(),""!==l&&(u._startSettingsLoading(t),FLBuilder.ajax({action:"render_service_settings",node_id:e,service:l},u._serviceChangeComplete))},_serviceChangeComplete:function(e){var t=FLBuilder._jsonParse(e),e=d(".fl-builder-service-settings-loading");e.find(".fl-builder-service-select-row").after(t.html),u._addAccountDelete(e),u._finishSettingsLoading()},_connectClicked:function(){for(var e,t=d(".fl-builder-settings").data("node"),i=d(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),o=i.find(".fl-builder-service-connect-row"),n=i.find(".fl-builder-service-connect-input"),s=null,r=0,a={action:"connect_service",node_id:t,service:l.val(),fields:{}};r<n.length;r++)e=(s=n.eq(r)).attr("name"),a.fields[e]=s.val();o.hide(),u._startSettingsLoading(l),FLBuilder.ajax(a,u._connectComplete)},_connectComplete:function(e){var t=FLBuilder._jsonParse(e),i=d(".fl-builder-service-settings-loading"),l=i.find(".fl-builder-service-select-row"),o=i.find(".fl-builder-service-select"),n=i.find(".fl-builder-service-account-row"),s=i.find(".fl-builder-service-account-select"),e=i.find(".fl-builder-service-connect-row");t.error?(e.show(),(0===s.length?o:s).after('<div class="fl-builder-service-error">'+t.error+"</div>")):(e.remove(),n.remove(),l.after(t.html)),u._addAccountDelete(i),u._finishSettingsLoading()},_accountChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),o=t.find(".fl-builder-service-connect-row"),n=t.find("tr.fl-builder-service-field-row"),s=d(".fl-builder-service-error"),r=l.val(),l=null;o.remove(),n.remove(),s.remove(),"add_new_account"==r?l={action:"render_service_settings",node_id:e,service:i.val(),add_new:!0}:""!==r&&(l={action:"render_service_fields",node_id:e,service:i.val(),account:r}),l&&(u._startSettingsLoading(i),FLBuilder.ajax(l,u._accountChangeComplete)),u._addAccountDelete(t)},_accountChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-service-account-row").after(e.html),u._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");0<t.length&&(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 e=d(this).closest(".fl-builder-service-settings"),t=e.find(".fl-builder-service-select"),e=e.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:t.val(),account:e.val()},u._accountDeleteComplete),u._startSettingsLoading(e))},_accountDeleteComplete:function(){var e=d(".fl-builder-service-settings-loading").find(".fl-builder-service-select");u._finishSettingsLoading(),e.trigger("change")},_campaignMonitorClientChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),o=d(this),t=t.find(".fl-builder-service-list-select"),o=o.val();0!==t.length&&t.closest("tr").remove(),""!==o&&(u._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_fields",node_id:e,service:i.val(),account:l.val(),client:o},u._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-campaign-monitor-client-select").closest("tr").after(e.html),u._finishSettingsLoading()},_mailChimpListChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),t=t.find(".fl-builder-service-list-select");d(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==t.val()&&(u._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_fields",node_id:e,service:i.val(),account:l.val(),list_id:t.val()},u._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-service-list-select").closest("tr").after(e.html),u._finishSettingsLoading()},_activeCampaignChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),o=t.find(".fl-builder-service-list-select");list_type=t.find('select[name="list_type"]'),0!==o.length&&o.closest("tr").remove(),""!==list_type.val()&&(u._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_fields",node_id:e,service:i.val(),account:l.val(),list_type:list_type.val()},u._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-service-field-row").after(e.html),u._finishSettingsLoading()}};d(function(){u.init()})}(jQuery),function(t){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var e={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fas fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),t(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),t(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),t(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),t(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),t(".fl-row").eq(0).trigger("mouseleave"),t(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-bar-title",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="fas 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"disabled"!=FLBuilderConfig.enabledTemplates&&"fl-builder-template"!=FLBuilderConfig.postType||e.steps.shift(),e},_onStart:function(){var e=t("body");e.scrollTop(0),e.append('<div class="fl-builder-tour-mask"></div>'),"module"!=FLBuilderConfig.userTemplateType&&(0===t(".fl-row").length?(t(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-builder-tour-placeholder-content fl-row fl-row-full-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()):t(".fl-row").eq(0).addClass("fl-builder-tour-demo-content"))},_onPrev:function(){t(".fl-builder-tour-dimmed").remove()},_onNext:function(){t(".fl-builder-tour-dimmed").remove()},_onEnd:function(){t("body").off("fl-builder.template-selector-loaded"),t(".fl-builder-tour-mask").remove(),t(".fl-builder-tour-dimmed").remove(),t(".fl-builder-tour-placeholder-content").remove(),t(".fl-builder-tour-demo-content").removeClass("fl-builder-tour-demo-content"),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(e){t(e).find(".fl-builder-tour-dimmed").remove(),t(e).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(r,o){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(t=t||0,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var i=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length;e=i.indexOf(e,t);return-1!==e&&e===t}),r.fn.textWidth=function(e,t){return r.fn.textWidth.fakeEl||(r.fn.textWidth.fakeEl=r("<span>").hide().appendTo(document.body)),r.fn.textWidth.fakeEl.text(e||this.val()||this.text()).css("font",t||this.css("font")),r.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(e){var t=Object.create(this),t=r.extend(t,e);return r(this).trigger("onCreate"),t}},r.fn.switchClass=function(o,e){return this.each(function(){return r(this).removeClass(function(e,t){var i=[],l=t.split(" ");for(e in l)l[e].startsWith(o)&&i.push(l[e]);return i.join(" ")}),r(this).addClass(o+e)})};var e={init:function(){o.addHook("cancelTask",this.onCancelTask.bind(this)),o.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),o.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),o.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),o.addHook("endEditingSession",this.onEndEditingSession.bind(this)),o.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(e,t,i){e=r.proxy(this,"onTriggerKey",e);i?Mousetrap.bindGlobal(t,e):Mousetrap.bind(t,e)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){for(var e in this.reset(),FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,t){o.triggerHook(e),t.preventDefault?t.preventDefault():t.returnValue=!1},onCancelTask:function(){i.isPreviewing?i.endPreview():t.isShowing?t.hide():o.ContentPanel.isShowing&&o.ContentPanel.hide()},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!1),document.documentElement.classList.remove("fl-builder-assistant-visible"),this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!0),"assistant"===FL.Builder.data.getSystemState().currentPanel&&document.documentElement.classList.add("fl-builder-assistant-visible"),this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){var e;e=o.SaveManager.layoutNeedsPublish()?FLBuilderStrings.savedStatus.hasAlreadySaved:FLBuilderStrings.savedStatus.nothingToSave,o.SaveManager.showStatusMessage(e),setTimeout(function(){o.SaveManager.resetStatusMessage()},2e3)},onNextPrevTabShortcut:function(e,t){var i=r(".fl-lightbox:visible"),l=i.find(".fl-builder-settings-tabs a");0<i.length&&(i=l.filter("a.fl-active"),("next"==e?i.is(l.last())?l.first():i.next("a"):i.is(l.first())?l.last():i.prev("a")).trigger("click")),o._calculateSettingsTabsOverflow(),t.preventDefault()}},t=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=r(".fl-builder-publish-actions"),this.$defaultBarButtons=r(".fl-builder-bar-actions"),this.$clickAwayMask=r(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click touchend",this.onActionClicked.bind(this)),o.addHook("triggerDone",this.onDoneTriggered.bind(this));var e=this.hide.bind(this);o.addHook("cancelPublishActions",e),o.addHook("endEditingSession",e),this.$clickAwayMask.on("click",e)},onDoneTriggered:function(){o.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?o._exit():o._exitWithoutRefresh()},show:function(){this.isShowing||o._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,o.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(e){e=r(e.currentTarget).data("action");switch(e){case"dismiss":this.hide();break;case"discard":this.hide(),i.muteToolbar(),o._discardButtonClicked();break;case"publish":this.hide(),i.muteToolbar(),o._publishButtonClicked(),o._destroyOverlayEvents();break;default:this.hide(),i.muteToolbar(),o._draftButtonClicked()}o.triggerHook(e+"ButtonClicked")}}),i={isPreviewing:!1,init:function(){this.$el=r("body"),this.$mainToolbar=r(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=r("#wpadminbar"),this.$endPreviewBtn=r(".fl-builder--preview-actions .end-preview-btn"),o.addHook("endEditingSession",this.endEditingSession.bind(this)),o.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=r(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this)),this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a").on("click",this.onClickPageBuilderToolbarLink.bind(this)),r("#wpadminbar a").attr("tabindex","-1");var e=this.restartEditingSession.bind(this);o.addHook("restartEditingSession",e),o.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),o.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),o.addHook("didEnterRevisionPreview",this.hide.bind(this)),o.addHook("didExitRevisionPreview",this.show.bind(this)),o.addHook("didPublishLayout",this.onPublish.bind(this)),o.addHook("didPublishLayout",this.onPublishCacheClear.bind(this))},endEditingSession:function(){o._destroyOverlayEvents(),o._removeAllOverlays(),o._removeEmptyRowAndColHighlights(),o._removeColHighlightGuides(),o._unbindEvents(),r("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),r("body").removeClass("fl-builder-edit"),r("#wpadminbar a").attr("tabindex",null),r(o._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),o.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(e){o._initTemplateSelector(),o._bindOverlayEvents(),o._highlightEmptyCols(),o._rebindEvents(),r("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),r("body").addClass("fl-builder-edit"),r("#wpadminbar a").attr("tabindex","-1"),r(o._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),e.preventDefault()},onClickPageBuilderToolbarLink:function(e){o.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span").css("color","#6bc373")},onPublishCacheClear:function(){url=FLBuilderConfig.url,url+=(0<=url.indexOf("?")?"&":"?")+"r="+(Math.random()+1).toString(36).substring(7),console.log("ajax url: ",FLBuilderConfig.url+""),r.ajax({url:FLBuilderConfig.url+""})},hide:function(){r("html").hasClass("fl-builder-edit")&&(o._unbindEvents(),o._destroyOverlayEvents(),o._removeAllOverlays(),r("html").removeClass("fl-builder-edit"),r("body").removeClass("admin-bar"),this.hideMainToolbar(),o.ContentPanel.hide(),FLBuilderLayout.init(),o.triggerHook("didHideEditingUI"))},show:function(){r("html").hasClass("fl-builder-edit")||(o._rebindEvents(),o._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),r("html").addClass("fl-builder-edit"),r("body").addClass("admin-bar"),o.triggerHook("didShowEditingUI"))},beginPreview:function(){o._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),r("html").addClass("fl-builder-preview"),r("html, body").removeClass("fl-builder-edit"),o._removeEmptyRowAndColHighlights(),o._removeColHighlightGuides(),o.triggerHook("didBeginPreview"),FLBuilderResponsivePreview.enter())},endPreview:function(){this.isPreviewing=!1,this.show(),o._highlightEmptyCols(),FLBuilderResponsivePreview.exit(),r("html").removeClass("fl-builder-preview"),r("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),r("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),r("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(e){e=r(e.target).data("mode");FLBuilderResponsivePreview.switchTo(e),FLBuilderResponsivePreview._showSize(e)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),o._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},l={isEditing:!0,init:function(){history.pushState&&(o.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),o.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl);const e=FL.Builder.data.getSystemActions();e.setIsEditing(!0),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url);const e=FL.Builder.data.getSystemActions();e.setIsEditing(!1),this.isEditing=!1}},n={$row:null,$rowContent:null,row:null,drag:{},init:function(){var e;this.userCanResize()&&((e=r(o._contentClass)).on("mouseenter touchstart",".fl-row",this.onDragHandleHover.bind(this)),e.on("mousedown touchstart",".fl-block-row-resize",this.onDragHandleDown.bind(this)))},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(e){var t,i,l,o,n,s;this.drag.isDragging||(t=this,i=r(e.target).closest(".fl-row"),l=i.data("node"),o=r(".fl-builder-row-settings[data-node="+l+"]"),n=o.find("[name=max_content_width_unit]"),s="px",t.onSettingsReady(l,function(e){n.length?s=n.length:void 0!==e&&(s=e.max_content_width_unit),t.$row=i,t.$rowContent=t.$row.find(".fl-row-content"),t.row={node:l,form:o,unit:s,isFixedWidth:t.$row.hasClass("fl-row-fixed-width"),parentWidth:("vw"===s?r(window):t.$row.parent()).width()},t.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},t.row.isFixedWidth?t.drag.originalWidth=t.$row.width():t.drag.originalWidth=t.$rowContent.width(),t.dragInit()}))},onSettingsReady:function(e,t){var i=void 0!==FLBuilderSettingsConfig.nodes?FLBuilderSettingsConfig.nodes:null;null!==i&&void 0!==i[e]?(t(i[e]),null!=n._mouseEnterTimeout&&(clearTimeout(n._mouseEnterTimeout),n._mouseEnterTimeout=null)):(clearTimeout(n._mouseEnterTimeout),n._mouseEnterTimeout=setTimeout(this.onSettingsReady.bind(this),350,e,t))},onDragHandleDown:function(){r("body").addClass("fl-builder-row-resizing"),null!=n._mouseEnterTimeout&&(clearTimeout(n._mouseEnterTimeout),n._mouseEnterTimeout=null)},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(e,t){var i=r("body"),t=r(t.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),t.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=t.find(".fl-block-col-resize-feedback-left")),t.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=t.find(".fl-block-col-resize-feedback-right")),i.addClass("fl-builder-row-resizing"),o._colResizing=!0,o._destroyOverlayEvents(),o._closePanel()},dragging:function(e,t){var i=t.position.left,l=t.originalPosition.left,o=this.drag.originalWidth,n=this.drag.edge,s=FLBuilderConfig.rowResize.minAllowedWidth,t=FLBuilderConfig.rowResize.maxAllowedWidth;l!==i&&(FLBuilderConfig.isRtl&&(n="w"==n?"e":"w"),this.drag.operation=i<l?"w"===n?"+":"-":"e"===n?"+":"-",i=Math.abs(l-i),"+"===this.drag.operation?this.drag.calculatedWidth=o+2*i:this.drag.calculatedWidth=o-2*i,!1!==s&&this.drag.calculatedWidth<s&&(this.drag.calculatedWidth=s),!1!==t&&this.drag.calculatedWidth>t&&(this.drag.calculatedWidth=t),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),"px"!==this.row.unit&&(this.drag.calculatedWidth=Math.round(this.drag.calculatedWidth/this.row.parentWidth*100)),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+this.row.unit).show(),this.row.form.length&&this.row.form.find("[name=max_content_width]").val(this.drag.calculatedWidth),requestAnimationFrame(()=>{const e=FL.Builder.data.getLayoutActions();e.resizeRowContent(this.row.node,this.drag.calculatedWidth,!1)}))},dragStop:function(e,t){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();const i=FL.Builder.data.getLayoutActions();i.resizeRowContent(this.row.node,this.drag.calculatedWidth),o._bindOverlayEvents(),r("body").removeClass("fl-builder-row-resizing"),r(".fl-block-overlay").each(function(){o._buildOverlayOverflowMenu(r(this))}),setTimeout(function(){o._colResizing=!1},50),o.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},s={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips(),this.$el.find(".fl-builder-content-panel-button").on("click",o._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",o._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",o._upgradeClicked),this.$el.find("#fl-builder-toggle-notifications").on("click",this.onNotificationsButtonClicked.bind(this)),o.addHook("notificationsLoaded",this.onNotificationsLoaded.bind(this))},render:function(e){e=r(this.template(e));this.$el=e,this.el=e.get(0),i.$mainToolbar=this.$el,r("body").prepend(e),r("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){r(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),r(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})},onNotificationsButtonClicked:function(){o.triggerHook("toggleNotifications")},onNotificationsLoaded:function(){r("body").removeClass("fl-builder-has-new-notifications");o.ajax({action:"fl_builder_notifications",read:!0})}};r(function(){o.ContentPanel.init(),FLBuilderConfig.simpleUi||o.MainMenu.init(),FLBuilderConfig.showToolbar?(s.init(),o.ContentPanel.alignPanelArrow()):r("html").addClass("fl-builder-no-toolbar"),e.init(),i.init(),l.init(),n.init(),t.init(),o.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(o,n){var s=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing"),this.isShowing=!0},hide:function(){this.$el.removeClass("is-showing"),this.isShowing=!1},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),e=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){for(var e in this.template=wp.template(this.templateName),o("body").prepend(this.template(this)),this.$el=o(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html(""),FLBuilderConfig.mainMenu)this.renderPanel(e);o("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=o(".fl-builder-bar-title"),o("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var t=this.hide.bind(this);n.addHook("didShowPublishActions",t),n.addHook("didBeginSearch",t),n.addHook("didBeginPreview",t),n.addHook("didShowContentPanel",t),n.addHook("endEditingSession",t),n.addHook("didFocusSearchBox",t),n.addHook("didEnterRevisionPreview",t),n.addHook("didFailSettingsSave",t),n.addHook("showKeyboardShortcuts",t),this.$mask=o(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",t),i.init(),l.init()},renderPanel:function(e){var t,i=this.views[e],l=FLBuilderConfig.mainMenu[e];l.handle=e,(t=s.create(l)).init(),l=o(t.render()),t.$el=l,o(".fl-builder--main-menu-panel-views").append(l),t.bindEvents(),t.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),void 0!==i&&(i.$el.remove(),i.isShowing&&(this.currentView=t).show()),t.isRootView&&(this.rootView=t,this.currentView=t),this.views[e]=t},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),n.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(e){var t=o(e.currentTarget);switch(t.data("type")){case"view":var i=t.data("view");this.goToView(i);break;case"event":i=t.data("event");n.triggerHook(i,t)}},goToView:function(e){var t=this.currentView,e=this.views[e];t.transitionOut(),e.transitionIn(),this.currentView=e,this.viewNavigationStack.push(t)},goToPreviousView:function(){var e=this.currentView,t=this.viewNavigationStack.pop();e.transitionOut(!0),t.transitionIn(!0),this.currentView=t,o(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}});n.MainMenu=e;var i={init:function(){var e;n.addHook("saveTemplate",this.saveTemplate.bind(this)),n.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),n.addHook("duplicateLayout",this.duplicateLayout.bind(this)),n.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),n.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),n.addHook("toggleUISkin",this.toggleUISkin.bind(this)),n.addHook("clearLayoutCache",this.clearLayoutCache.bind(this)),n.addHook("launchThemerLayouts",this.launchThemerLayouts.bind(this)),"FL"in window&&"Builder"in FL&&(e=FL.Builder.data.getSystemActions(),n.addHook("showKeyboardShortcuts",function(){e.setShouldShowShortcuts(!0)}))},saveTemplate:function(){n._saveUserTemplateClicked(),e.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),e.hide()},duplicateLayout:function(){n._duplicateLayoutClicked(),e.hide()},showGlobalSettings:function(){n._globalSettingsClicked(),e.hide()},showLayoutSettings:function(){n._layoutSettingsClicked(),e.hide()},clearLayoutCache:function(){n.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),n.showAjaxLoader(),e.hide()},toggleUISkin:function(e){o('a[data-event="toggleUISkin"]');var t,i,l=o("body");l.hasClass("fl-builder-ui-skin--light")&&(t="light",i="dark"),l.hasClass("fl-builder-ui-skin--dark")&&(t="dark",i="light"),l.removeClass("fl-builder-ui-skin--"+t).addClass("fl-builder-ui-skin--"+i),l.removeClass("fluid-color-scheme-"+t).addClass("fluid-color-scheme-"+i),"Builder"in FL&&"data"in FL.Builder&&FL.Builder.data.getSystemActions().setColorScheme(i),n.ajax({action:"save_ui_skin",skin_name:i})},launchThemerLayouts:function(){FLBuilderConfig.lite?n._showProMessage("Themer Layouts"):window.open(FLBuilderConfig.themerLayoutsUrl),e.hide()}},l={init:function(){n.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),e.hide()}}}(jQuery,FLBuilder),function(n,o){var s=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(e){this.categorySelector=i.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),n(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));var t;e.views;this.initViews(e.views),0===Object.keys(this.views).length&&this.addView(t={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"}),this.activeView||(e=Object.keys(this.views)[0],t=this.views[e],this.activeView=t),this.defaultView=this.activeView,n(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),n(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),o.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){t=e[t];this.categorySelector.addItem(t),"separator"!==t.type&&this.addView(t)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=r;break;case"rows":t=a;break;case"templates":t=d;break;case"saved":t=u;break;default:t=l}var i=(t=!_.isNull(this.viewController)&&!_.isUndefined(this.viewController)?window[this.viewController]:t).create(e),e=i.handle;i.init(),(this.views[e]=i).isShowing&&(this.activeView=i)},renderView:function(e){var t;this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),t=_.isObject(e)?e:this.views[e],_.isObject(t)&&_.isFunction(t.render)&&(e=t.render(),this.$el.find(".fl-nanoscroller-content").html(e),this.activeView=t,o._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0))},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){n(this.activeView).trigger("onBeforeShow"),this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e,t=this.panel.$groupSelect,i=this.panel.$el.find(".fl-builder-panel-search");this.isSearchEnabled?i.show():i.hide(),1<Object.keys(this.views).length&&!_.isUndefined(this.categorySelector)?(e=this.categorySelector.render(),this.panel.$el.find(".fl-builder-content-group-select"),t.html(e),t.show(),this.panel.$el.removeClass("single-view")):(t.hide(),i.hide(),this.panel.$el.addClass("single-view"))},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),n(this).on("afterRender",this.bindEvents.bind(this)),n(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=o.Search.byQuery(this.query)),e},render:function(){n(this).trigger("beforeRender");var e=this.filterTemplateData(this),e=n(this.template(e));return this.$el=e,n(this).trigger("afterRender"),e},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),r=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),a=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),d=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=n(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(e){var t=n(e.currentTarget),e=t.val(),t=t.siblings("button");""!==e?t.show():t.hide()},onSaveButtonClick:function(e){var t=n(e.currentTarget),e=t.siblings('input[name="template-name"]').val(),t=t.siblings('input[name="template-category"]').val();""!==e&&o.ajax({action:"save_user_template",settings:{name:e,category:t}},o._saveUserTemplateSettingsComplete)},onTemplateClick:function(e){var t=n(e.currentTarget),i=t.data("id"),l=t.data("type"),e=t.data("premium");FLBuilderConfig.lite&&e?o._showProMessage(t.find(".fl-builder--template-name").text()):o._requestTemplateInsert(i,l)}}),u=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=o.Search.byQuery({kind:"template",type:"user",content:["module","column","row"]}),e}}),i=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),n(this).on("afterRender",this.bindEvents.bind(this)),n(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var e=n(this.template(this));return this.$el=e,n(this).trigger("afterRender"),e},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle;this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(e){var t=n(e.target),i=t.data("view");t.hasClass("fl-has-children")?((e=n('[data-parent="'+i+'"]')).is(":visible")?(this.items[i].hasChildrenOpen=!1,t.removeClass("fl-has-children-showing"),e.hide()):(this.items[i].hasChildrenOpen=!0,t.addClass("fl-has-children-showing"),e.show()),t.blur()):n(this).trigger("categorySelected",i)}});o.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e,t=FLBuilderConfig.panelData.tabs;for(e in t){var i=t[e],l=s.create(i);l.panel=this,l.views={},l.init(i),(this.tabs[e]=l).isShowing&&(this.activeTab=l),this.activeTab||(i=Object.keys(this.tabs)[0],(l=this.tabs[i]).isShowing=!0,this.activeTab=l)}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),o.triggerHook("contentPanelDidInit")}},render:function(){n("body").prepend(this.template(this)),this.$el=n(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),n(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),o.addHook("showContentPanel",this.show.bind(this)),o.addHook("showModules",this.show.bind(this,"modules")),o.addHook("showRows",this.show.bind(this,"rows")),o.addHook("showTemplates",this.show.bind(this,"templates")),o.addHook("showSaved",this.show.bind(this,"saved")),o.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this);o.addHook("hideContentPanel",e),o.addHook("didShowLightbox",e),o.addHook("didShowPublishActions",e),o.addHook("didBeginSearch",e),o.addHook("didInitDrag",e),o.addHook("didOpenMainMenu",e),o.addHook("didApplyTemplate",e);e=this.toggleShowHide.bind(this);o.addHook("toggleContentPanel",e),o.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var e,t=this.$el,i=this.$el.find(".fl-builder--panel-arrow"),l=n(".fl-builder-content-panel-button"),o=this.$el.css("animation-duration");0!=l.length&&(this.$el.css("animation-duration","0s"),this.show(),e=t[0].getBoundingClientRect(),t=i[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",o),t=(l=(l=l[0].getBoundingClientRect()).x+l.width/2)<e.x?20:l-e.x-t.width/2,i.css({right:"auto",left:t+"px"}))},show:function(e){if("module"!==FLBuilderConfig.userTemplateType&&!FLBuilderConfig.simpleUi&&(o.triggerHook("willShowContentPanel"),void 0!==e&&this.showTab(e),!this.isShowing&&o._triggerSettingsSave(!1,!0)&&(n("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,n(this).trigger("onShow"),o.triggerHook("didShowContentPanel"),"Builder"in FL&&"data"in FL.Builder))){const t=FL.Builder.data.getSystemActions();t.hideCurrentPanel()}},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(n("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,n(this).trigger("onHide"),o.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(e){e=this.tabs[e];_.isObject(e)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),e.show(),this.$tabs.filter('[data-tab="'+e.handle+'"]').addClass("is-showing"),this.activeTab=e,n(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(e){n(e.currentTarget).blur()},onTabItemClick:function(e){e=n(e.target).data("tab");this.showTab(e)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),n(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),n(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),n(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var t,i=this.$searchInput.val();""!==i&&""!=(t=o.Search.byTerm(i)).term?this.showSearchResults(t):this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(e){var t;0<e.total?(t=n(this.renderSearchResults(e)),this.$searchPanel.html(t),o._initSortables()):(t=n(this.renderNoResults(e)),this.$searchPanel.html(t)),n("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){n("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(c){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(e,t){var i=FLBuilderSettingsConfig.forms,l=FLBuilderSettingsConfig.modules;if(!e.nodeId||e.settings){if(t=void 0===t?function(){}:t,(e=c.extend({type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],activeTab:null,buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null,messages:null},e)).id){if("general"===e.type&&void 0!==i[e.id])e=c.extend(!0,e,i[e.id]);else{if("module"!==e.type||void 0===l[e.id])return;e=c.extend(!0,e,l[e.id])}this.config=e,this.renderLightbox(e)&&(e.legacy||!this.renderLegacySettings(e,t)?this.renderComplete(e,t):this.showLightboxLoader());l=FL.Builder.data.getSystemState().currentPanel;if(null!==l&&"outline"!==l){const o=FL.Builder.data.getSystemActions();o.hideCurrentPanel()}}}else this.loadNodeSettings(e,t)},cacheCurrentSettings:function(){var e=c(".fl-builder-settings:visible");e.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,e),FLBuilder.preview&&(FLBuilder.preview._savedSettings=this.settings))},loadNodeSettings:function(t,i){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"get_node_settings",node_id:t.nodeId},function(e){t.settings=FLBuilder._jsonParse(e),FLBuilderSettingsConfig.nodes[t.nodeId]=t.settings,FLBuilderSettingsForms.render(t,i),FLBuilder.hideAjaxLoader()})},renderLightbox:function(e){var t=wp.template("fl-builder-settings"),i=FLBuilder._lightbox._node.find("form.fl-builder-settings"),l=(c(".fl-lightbox-wrap[data-parent]"),localStorage.getItem("fl-builder-settings-tab"));if(e.nodeId&&e.nodeId===i.data("node")&&!e.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(e.hide)return!0;if(l)for(var o in e.tabs)o===l.replace("fl-builder-settings-tab-","")&&(e.activeTab=o);if(e.activeTab||(e.activeTab=Object.keys(e.tabs).shift()),e.lightbox)e.lightbox.setContent(t(e));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(t(e))}return!0},renderComplete:function(e,t){setTimeout(function(){e.legacy&&this.renderLegacySettingsComplete(e.legacy),t(),FLBuilder._initSettingsForms(),e.rules&&FLBuilder._initSettingsValidation(e.rules,e.messages),e.preview&&(FLBuilder.preview=new FLBuilderPreview(e.preview)),e.helper&&e.helper.init(),this.cacheCurrentSettings()}.bind(this),1)},renderFields:function(e,t){var i,l,o=wp.template("fl-builder-settings-row"),n="",s=null,r=null,a=null,d=["align","border","dimension","unit","photo","select","typography"],t=t||this.config.settings,u=FLBuilderConfig.global;for(s in e)l=!!(i=e[s]).multiple,supportsResponsive=-1<c.inArray(i.type,d),r=_.isUndefined(t[s])?"":t[s],i.type&&(_.isUndefined(t[s])&&i.default&&(r=i.default),a=i.responsive&&u.responsive_enabled&&!l&&supportsResponsive?i.responsive:null,n+=o({field:i,name:s,rootName:s,value:r,preview:JSON.stringify(i.preview||{type:"refresh"}),responsive:a,rowClass:i.row_class?" "+i.row_class:"",isMultiple:l,supportsMultiple:"editor"!==i.type&&"service"!==i.type,settings:t,globalSettings:u,template:c("#tmpl-fl-builder-field-"+i.type)}));return n},renderField:function(e){return wp.template("fl-builder-field")(e)},renderSectionTemplate:function(e,t){return wp.template(e.template.id)({section:e,settings:t})},renderTabTemplate:function(e,t){return wp.template(e.template.id)({tab:e,settings:t})},renderLegacySettings:function(t,i){var e=c(".fl-builder-settings:visible"),l=null,o=!1,n={tabs:[],sections:[],fields:[],settings:null,node_id:null};return e.find(".fl-legacy-field").each(function(){l=c(this),n.fields.push(l.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(l),o=!0}),e.find(".fl-legacy-settings-section").each(function(){l=c(this),n.sections.push({tab:l.attr("data-tab"),section:l.attr("data-section")}),o=!0}),e.find(".fl-legacy-settings-tab").each(function(){l=c(this),n.tabs.push(l.attr("data-tab")),o=!0}),e.attr("data-node")?n.node_id=e.attr("data-node"):n.settings=FLBuilder._getOriginalSettings(e,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(c.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:n,form:e.attr("data-form-id"),group:e.attr("data-form-group"),lightbox:e.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),o&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),o},renderLegacySettingsComplete:function(e){var i="object"==typeof e?e:FLBuilder._jsonParse(e),t=null,e=null,l="",o=null,n=null;if(i.lightbox?e=(t=c(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]")).length?t.find(".fl-builder-settings"):null:t=(e=c(".fl-builder-settings:visible")).closest(".fl-builder-lightbox"),e&&e.length){for(l in i.fields)(o=c("#fl-field-"+l).attr("id","")).after(i.fields[l]).remove();for(l in i.extras)o=c("#fl-field-"+l).find(".fl-field-control-wrapper"),i.extras[l].multiple?o.each(function(e,t){e in i.extras[l].before&&""!=i.extras[l].before[e]&&c(this).prepend('<div class="fl-form-field-before">'+i.extras[l].before[e]+"</div>"),e in i.extras[l].after&&""!=i.extras[l].after[e]&&c(this).append('<div class="fl-form-field-after">'+i.extras[l].after[e]+"</div>")}):(""!=i.extras[l].before&&o.prepend('<div class="fl-form-field-before">'+i.extras[l].before+"</div>"),""!=i.extras[l].after&&o.append('<div class="fl-form-field-after">'+i.extras[l].after+"</div>"));for(n in i.sections)for(l in i.sections[n])c("#fl-builder-settings-section-"+l).html(i.sections[n][l]);for(l in i.tabs)(n=c("#fl-builder-settings-tab-"+l)).html(i.tabs[l]);t.data("parent")||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,e),FLBuilder.preview&&(this.settings=c.extend(this.settings,FLBuilder.preview._savedSettings),FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var e=c(".fl-builder-settings:visible"),t=e.closest(".fl-builder-lightbox").attr("data-parent"),i={};return t&&(e=(t=c(".fl-builder-lightbox[data-instance-id="+t+"]")).find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),(e=e.attr("data-node"))&&(i.node_id=e,i.node_settings=t)),i},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),e=FLBuilder._getSettings(e);return!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(e)},closeOnDeleteNode:function(e){var t=c(".fl-builder-settings[data-node]"),i=FLBuilder._contentClass+" .fl-node-"+t.data("node");t.length&&!c(i).length&&FLLightbox.closeAll()},showLightboxLoader:function(){c(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(e){c(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){e.closest(".fl-field-control").find(".fl-field-control-wrapper").hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field");e.closest(".fl-field-control").find(".fl-field-control-wrapper").show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,c.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.reload),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyColTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreHistoryComplete",this.updateOnHistoryRestored.bind(this))},reload:function(){var e=FLBuilderConfig.editUrl+"&fl_builder_load_settings_config=core";c('script[src*="fl_builder_load_settings_config=core"]').remove(),c("head").append('<script src="'+e+'"><\/script>')},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t,FLBuilderConfig.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];-1<e.namespace.indexOf("didAdd")?this.addNode("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):-1<e.namespace.indexOf("didSaveNodeSettings")?this.updateNode(arguments[1].nodeId,arguments[1].settings):-1<e.namespace.indexOf("didDelete")?this.deleteNodes("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):-1<e.namespace.indexOf("didDuplicate")&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(e,t){var i=this;t.cols.each(function(){var e=c(this),t=e.attr("data-node");i.nodes[t]&&(i.nodes[t].size=parseFloat(e[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},updateOnHistoryRestored:function(e,t){this.nodes=t.config.nodes,this.attachments=t.config.attachments,this.settings.layout=t.settings.layout,this.settings.global=t.settings.global,FLBuilderConfig.global=t.settings.global},addNode:function(e,t){var i=c(".fl-node-"+e),l=i.hasClass("fl-row"),o=i.hasClass("fl-col"),n=i.hasClass("fl-col-group"),s=i.hasClass("fl-module"),r=this;this.nodes[e]||(t||(l?t=c.extend({},this.defaults.row):o?t=c.extend({},this.defaults.column):s&&(t=c.extend({},this.defaults.modules[i.attr("data-type")])),l||n?i.find(".fl-col").each(function(){var e=c(this),t=c.extend({},r.defaults.column);t.size=parseFloat(e[0].style.width),r.addNode(e.attr("data-node"),t)}):s&&(r.addNode(i.closest(".fl-row").attr("data-node")),r.addNode(i.closest(".fl-col").attr("data-node")),r.updateOnResetColumnWidths(null,{cols:i.closest(".fl-col-group").find("> .fl-col")}))),t&&(this.nodes[e]=t))},updateNode:function(e,i){var t=c(".fl-node-"+e),l=this;t.hasClass("fl-col")&&t.closest(".fl-col-group").find("> .fl-col").each(function(){var e=c(this),t=e.attr("data-node");l.nodes[t].size=parseFloat(e[0].style.width),l.nodes[t].equal_height=i.equal_height,l.nodes[t].content_alignment=i.content_alignment,l.nodes[t].responsive_order=i.responsive_order}),this.nodes[e]=i},duplicateNode:function(t,i){var e=c(".fl-node-"+i).find("[data-node]"),l=c(".fl-node-"+t).find("[data-node]"),o=this;this.nodes[i]=this.nodes[t],e.each(function(e){t=l.eq(e).attr("data-node"),i=c(this).attr("data-node"),o.nodes[t]&&(o.nodes[i]=o.nodes[t])})},deleteNodes:function(){var e="",t=c(FLBuilder._contentClass).html();if(t)for(e in this.nodes)-1===t.indexOf(e)&&(this.nodes[e]=null,delete this.nodes[e])}}),c(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(c){FLBuilderSettingsCopyPaste={init:function(){FLBuilder.addHook("settings-form-init",this.initExportButton),FLBuilder.addHook("settings-form-init",this.initImportButton)},initExportButton:function(){new ClipboardJS("button.module-export-all",{text:function(e){var t=c(".fl-builder-module-settings").data("node"),i=c(".fl-builder-module-settings[data-node="+t+"]"),t=c(".fl-builder-module-settings").data("type"),i=FLBuilder._getSettings(i),t="/// {type:"+t+"} "+(new Date).toDateString()+" ///",l=c("button.module-export-all"),o=l.attr("title");return l.text(FLBuilderStrings.module_import.copied),setTimeout(function(){l.text(o)},1e3),t+"\n"+JSON.stringify(i)}}),new ClipboardJS("button.module-export-style",{text:function(e){var t,i=c(".fl-builder-module-settings").data("node"),l=c(".fl-builder-module-settings[data-node="+i+"]"),i=c(".fl-builder-module-settings").data("type"),o=FLBuilder._getSettings(l),i="/// {type:"+i+"} "+(new Date).toDateString()+" ///",n=c("button.module-export-style"),s=n.attr("title"),r={};for(t in o){var a=l.find('[name="'+t+'"]'),d=l.find('[name*="'+t+'["]'),u=!1;a.length?u=a.closest(".fl-field").data("is-style"):d.length&&(u=d.closest(".fl-field").data("is-style")),u&&(r[t]=o[t])}return n.text(FLBuilderStrings.module_import.copied),setTimeout(function(){n.text(s)},1e3),i+"\n"+JSON.stringify(r)}})},initImportButton:function(){c("button.module-import-apply").click(function(){var e=c(".fl-builder-settings-lightbox .fl-builder-settings"),t=c(".module-import-input").val(),i=t.match(/\/\/\/\s\{type:([_a-z0-9-]+)/i),l=!1,o=c(".fl-builder-module-settings").data("type"),n=c(".fl-builder-settings-lightbox .module-import-error");if(n.hide(),!(l=i&&void 0!==i[1]?i[1]:l)||l!==o)return n.html(FLBuilderStrings.module_import.type).show(),!1;t=t.replace(/\/\/\/.+\/\/\//,"");try{var s=JSON.parse(t)}catch(e){s=!1;return n.html(FLBuilderStrings.module_import.error).show(),!1}if(s){n=e.attr("data-node"),e=c.extend({},FLBuilderSettingsConfig.nodes[n],s);FLBuilderSettingsConfig.nodes[n]=e;const r=FL.Builder.data.getLayoutActions();s=FLBuilder._saveSettingsComplete.bind(this,!0,null);r.updateNodeSettings(n,e,s),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:n,settings:e}),FLBuilder._lightbox.close()}})}},c(function(){FLBuilderSettingsCopyPaste.init()})}(jQuery),function(a){var e={minWidth:320,maxWidth:600,minHeight:400,init:function(){this.initPanel(),this.pinOrUnpin(),this.bind()},bind:function(){var e=a(window),t=a("body");e.on("resize",_.throttle(this.windowResize.bind(this),250)),t.on("click",".fl-builder-ui-pinned-collapse",this.collapse),t.on("click",".fl-builder--content-library-panel .fl-builder--tabs",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return a(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didPinContentPanel")},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didUnpinContentPanel")},pinOrUnpin:function(){var e=a(".fl-builder--content-library-panel"),t=this.isPinned();e.hasClass("fl-builder-ui-pinned-hidden")||(window.innerWidth<=this.maxWidth?(t&&this.unpin(!1),this.disableDragAndResize()):(t||this.restorePosition(),this.enableDragAndResize()))},show:function(){var e=a(".fl-builder--content-library-panel");e.hasClass("fl-builder-ui-pinned-hidden")&&(e.removeClass("fl-builder-ui-pinned-hidden"),e.show(),this.restorePosition())},hide:function(){var e=a("body"),t=a(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),t.addClass("fl-builder-ui-pinned-hidden"),t.hide(),e.css("margin",""),FLBuilder._resizeLayout())},collapse:function(){var e=a(this).find("i:visible"),t=a("body"),i=e.data("toggle"),l=e.data("position"),o=a(".fl-builder--content-library-panel"),e=o.outerWidth();"hide"===i?(o.css(l,"-"+e+"px"),t.css("margin-"+l,""),t.addClass("fl-builder-ui-pinned-is-collapsed")):(o.css(l,"0px"),t.css("margin-"+l,e+"px"),t.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&a(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return a("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var e=a(".fl-builder--content-library-panel"),t=0==a(".fl-builder-content-panel-button").length?".fl-builder--tabs, .fl-lightbox-header":".fl-builder--tabs";e.draggable({cursor:"move",handle:t,cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:this.minHeight,minWidth:this.minWidth,maxWidth:this.maxWidth,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),e.addClass("fl-builder-ui-pinned-container"),e.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(e){var t=a(".fl-builder--content-library-panel"),i=t.outerWidth(),l=a("body"),o=a(".fl-responsive-preview, .fl-responsive-preview-mask"),n=a(FLBuilder._contentClass).parentsUntil("body").last();l.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+e),l.addClass("fl-builder-content-panel-is-showing"),l.css("margin-"+e,i+"px"),o.css("margin-"+e,i+"px"),n.addClass("fl-builder-ui-pinned-content-transform"),t.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+e),t.find(".ui-resizable-"+("left"===e?"e":"w")).show(),t.on("resize",_.throttle(this.resize.bind(this),250)),t.attr("style",""),FLBuilder.ContentPanel.isShowing=!0,0==a(".fl-builder-content-panel-button").length&&a(".fl-builder-panel-drag-handle").show()},unpinPanel:function(){var e=a(".fl-builder--content-library-panel"),t=e.find(".fl-builder--panel-content .is-showing").data("tab"),i=a("body"),l=a(".fl-responsive-preview, .fl-responsive-preview-mask"),o=a(FLBuilder._contentClass).parentsUntil("body").last();i.css("margin-left",""),i.css("margin-right",""),i.removeClass("fl-builder-ui-is-pinned"),i.removeClass("fl-builder-ui-is-pinned-left"),i.removeClass("fl-builder-ui-is-pinned-right"),l.css("margin-left",""),l.css("margin-right",""),o.removeClass("fl-lightbox-content-transform"),e.removeClass("fl-builder-ui-pinned"),e.removeClass("fl-builder-ui-pinned-left"),e.removeClass("fl-builder-ui-pinned-right"),e.find(".ui-resizable-handle").hide(),e.off("resize"),e.attr("style",""),e.find(".fl-builder--tabs [data-tab="+t+"]").addClass("is-showing")},pinLightboxes:function(){var e=this;a(".fl-lightbox-resizable").each(function(){e.pinLightbox(a(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(e){var t=a(".fl-builder--content-library-panel"),i=e.closest(".fl-lightbox-wrap");i.closest(".fl-builder-ui-pinned").length||(t.append(i),e.attr("style",""),e.draggable("disable"),e.resizable("disable")),e.is(":visible")&&t.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){t=t._node.find(".fl-lightbox-resizable");t.length&&(t.hasClass("fl-builder-ui-pinning-initialized")||(t.draggable("option","start",this.dragStart.bind(this)),t.draggable("option","drag",this.drag.bind(this)),t.draggable("option","stop",this.dragStop.bind(this)),t.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(t),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var e=a(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=e.find(".fl-builder--panel-content .is-showing").data("tab"),e.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),a(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var o=a("body"),n=a(".fl-builder--content-library-panel");n.find(".fl-lightbox-wrap").each(function(){var e,t,i=a(this),l=i.find(".fl-lightbox");l.draggable("enable"),l.resizable("enable"),l.find(".ui-resizable-handle").show(),o.append(i),l.is(":visible")?(e=parseInt(n.css("top"))-parseInt(i.css("top"))-parseInt(i.css("padding-top")),t=parseInt(n.css("left"))-parseInt(i.css("padding-left")),i=parseInt(n.css("right"))-parseInt(i.css("padding-right")),l.css("top",(e<0?0:e)+"px"),l.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?i:t)+"px"),l.addClass("fl-lightbox-prevent-animation"),o.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):l.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){a("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var e=a("body"),t=a(".fl-responsive-preview, .fl-responsive-preview-mask"),i=a(".fl-builder--content-library-panel"),l=i.outerWidth();i.is(":visible")?i.hasClass("fl-builder-ui-pinned-left")?(e.css("margin-left",l+"px"),t.css("margin-left",l+"px")):i.hasClass("fl-builder-ui-pinned-right")&&(e.css("margin-right",l+"px"),t.css("margin-right",l+"px")):e.css("margin","")},resizeStop:function(){a("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(e,t){var i=a("body"),e=(a(e.target),a(".fl-builder-bar-actions"));a(".fl-lightbox-resizable:visible").length||e.addClass("fl-builder-content-panel-pin-zone"),i.addClass("fl-builder-draggable-is-dragging"),i.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),i.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(e,t){var i=a("body"),l=a(".fl-responsive-preview"),o=a(window),n=(l.length?l:o).width(),s=o.scrollTop(),r=a(".fl-builder--content-library-panel").offset().top,l=a(".fl-builder-bar-actions"),o=a(e.target);o.hasClass("fl-builder--content-library-panel")&&(e.clientX<n-75&&r-s<46?l.addClass("fl-builder-content-panel-pin-zone-hover"):l.removeClass("fl-builder-content-panel-pin-zone-hover")),o.hasClass("fl-builder-ui-pinned")?this.unpinPanel():e.clientX<75?i.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):e.clientX>n-75?i.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(i.removeClass("fl-builder-ui-show-pin-zone"),i.removeClass("fl-builder-ui-show-pin-zone-left"),i.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(e,t){a(window);var i=a("body"),l=a(".fl-builder-bar-actions"),o=a(".fl-builder-ui-pin-zone"),n=a(".fl-builder--content-library-panel"),s=a(".fl-lightbox-resizable:visible");a(e.target);i.removeClass("fl-builder-draggable-is-dragging"),l.removeClass("fl-builder-content-panel-pin-zone"),l.removeClass("fl-builder-content-panel-pin-zone-hover"),o.remove(),s.length&&parseInt(s.css("top"))<0&&s.css("top","0"),i.hasClass("fl-builder-ui-show-pin-zone")?(i.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),i.removeClass("fl-builder-ui-show-pin-zone"),i.removeClass("fl-builder-ui-show-pin-zone-left"),i.removeClass("fl-builder-ui-show-pin-zone-right")):n.find(".fl-lightbox").length?(this.unpin(!0),"module"!==FLBuilderConfig.userTemplateType&&!FLBuilderConfig.simpleUi||n.hide()):(n.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var e=a(".fl-builder--content-library-panel"),t=a(".fl-lightbox-resizable");e.draggable("disable"),e.resizable("disable"),t.draggable("disable"),t.resizable("disable")},enableDragAndResize:function(){var e=a(".fl-builder--content-library-panel"),t=a(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");e.draggable("enable"),e.resizable("enable"),this.isPinned()||(t.draggable("enable"),t.resizable("enable"))},savePosition:function(){var e=a(".fl-builder--content-library-panel"),t=a(".fl-lightbox-resizable:visible"),i={pinned:{width:e.outerWidth(),position:null}};e.hasClass("fl-builder-ui-pinned-left")?i.pinned.position="left":e.hasClass("fl-builder-ui-pinned-right")?i.pinned.position="right":t.length&&(i.lightbox={width:t.width(),height:t.height(),top:parseInt(t.css("top"))<0?"0px":t.css("top"),left:t.css("left")}),FLBuilderConfig.userSettings.pinned=i.pinned,i.lightbox&&(FLBuilderConfig.userSettings.lightbox=i.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:i})},restorePosition:function(){var e=a(".fl-builder--content-library-panel"),t=FLBuilderConfig.userSettings.pinned;t&&t.position&&(e.css("width",t.width+"px"),this.pin(t.position,!1),e.css("width",t.width+"px"))}};a(function(){e.init()})}(jQuery),function(r){var i={init:function(){this.setupMainMenuData(),r(".fl-builder--revision-actions select").on("change",this.selectChanged),r(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),r(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var e,t,i=FLBuilderConfig.revisions.posts,l=FLBuilderConfig.revisions.authors,o=wp.template("fl-revision-list-item"),n=r(".fl-builder--revision-actions select"),s=0;if(FLBuilderConfig.mainMenu.revisions.items=[],n.html(""),0===i.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()});else for(;s<i.length;s++)e=FLBuilderStrings.revisionDate.replace("%s",i[s].date.diff),e+=" ("+i[s].date.published+")",t=FLBuilderStrings.revisionAuthor.replace("%s",l[i[s].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:o({id:i[s].id,date:e,author:t,avatar:l[i[s].author].avatar})}),n.append('<option value="'+i[s].id+'">'+e+"</option>");void 0!==FLBuilder.MainMenu&&FLBuilder.MainMenu.renderPanel("revisions")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=FLBuilder._jsonParse(e),this.setupMainMenuData()},itemClicked:function(e,t){t=r(t).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(r(".fl-builder--revision-actions select").val(t),this.preview(t))},selectChanged:function(e){i.preview(r(this).val())},applyClicked:function(e){var t=r(".fl-builder--revision-actions select").val();i.restore(t)},preview:function(e){r(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:e},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){r(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(e){r(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:e},i.restoreComplete)},restoreComplete:function(e){e=FLBuilder._jsonParse(e);FLBuilder._renderLayout(e.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",e.config),settings=e.settings,void 0!==settings.css&&null!==settings.css&&(FLBuilderSettingsConfig.settings.layout.css=settings.css),void 0!==settings.js&&null!==settings.js&&(FLBuilderSettingsConfig.settings.layout.js=settings.js)}};r(function(){i.init()})}(jQuery),function(){var t={query:function(e){var t,i={},l={library:{}};if(e=this.normalizeQuery(e),_.isNull(e.kind))i=FLBuilderConfig.contentItems;else for(var o in e.kind)i[o=e.kind[o]]=FLBuilderConfig.contentItems[o];return t=this.findMatches(e,i),l.library=this.formatResults(t,e),l},normalizeQuery:function(e){return e=_.extend({kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1},e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i,l,o,n,s={},r=null,a=null;for(r in t)for(a in i=t[r],s[r]={items:[]},i)if(l=i[a],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(l.category,e.category)){switch(r){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(o=_.includes(e.content,l.content),n=e.content===l.content,o||n)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==l.type)continue;if(!_.isNull(e.group)){var d=e.group,u=l.group;if(_.isString(d)&&(d=[d]),_.isString(u)&&(u=[u]),_.isEmpty(d)||_.isEmpty(u))continue;var c=!1;for(a in d){var h=d[a];_.includes(u,h)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(!1===e.group&&0<l.group.length)continue;if(!1!==e.group&&!_.includes(l.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(l,e.searchTerm))&&s[r].items.push(l)}return s},matchesCategory:function(e,t){var i,l,o,n;if(e===t)return!0;for(l in t=_.isString(t)?[t]:t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(o in e)if(e[o]===i)return!0;if(_.isObject(e))for(n in e)if(e[n]===i||n===i)return!0}return!1},matchesSearchTerm:function(e,t){var i=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(i))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(i))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(i))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(i))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||!"widget".includes(i))||!(_.isUndefined(e.editor_export)||!"module".includes(i)))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,i){var o,n,s={};return _.forEach(e,function(l,e,t){o=l[i],_.isNull(o)||_.isUndefined(o)||_.isString(o)&&""===l[o]||(_.isString(o)&&(s[o]=s[o]||[],s[o].push(l)),_.isArray(o)&&(n=o,_.forEach(n,function(e,t,i){s[e]=s[e]||[],s[e].push(l)})),_.isObject(o)&&(n=o,_.forEach(n,function(e,t,i){s[e]=s[e]||[],s[e].push(l)})))}),s},search:function(e){var t=this.query({searchTerm:e}),i={total:0,term:e,sections:{}};if(!_.isUndefined(t.library.module.items)){var l,o={};for(l in t.library.module.items){var n=t.library.module.items[l],s=n.group[0],r=n.category;n.name;_.isUndefined(o[s])&&(o[s]={}),_.isUndefined(o[s][r])&&(o[s][r]=[]),o[s][r].push(n)}i.grouped=o}for(l in t.library){var a=t.library[l];!_.isUndefined(a.items)&&0<a.items.length&&(i.sections[l]={name:FLBuilderStrings.typeLabels[l],handle:l,type:"",items:a.items},i.total+=a.items.length)}return i}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){return t.search(e)}}}(jQuery),function(i,l){var o={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=i(".fl-builder--saving-indicator"),l.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),l.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),l.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),l.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),l.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabled||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,i("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&("save_pinned_ui_position"!=e&&("fl_builder_notifications"!=e&&!(-1<e.indexOf("history"))))))))},onLayoutSaved:function(e,t){var i;this.isUpdatingLayout(t.fl_builder_data.action)&&(this.showStatusMessage(this.messages.saved,this.messages.savedTooltip),i=this,setTimeout(function(){i.resetStatusMessage()},2e3))},onLayoutPublished:function(){this.layoutNeedsPublish=!1,i("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(e,t){this.$savingIndicator.html(e),l.isUndefined(t)||(this.$savingIndicator.attr("title",t),i(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fas fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){var e;l.MainMenu.hide(),this.layoutNeedsPublish||FLBuilderSettingsForms.settingsHaveChanged()?l._publishLayout(!1,!0):(this.showStatusMessage(this.messages.noChanges),e=this,setTimeout(function(){e.resetStatusMessage()},2e3))}};l.SaveManager={layoutNeedsPublish:function(){return o.layoutNeedsPublish},showStatusMessage:function(e,t){o.showStatusMessage(e,t)},resetStatusMessage:function(){o.resetStatusMessage()}},i(function(){o.init()})}(jQuery,FLBuilder),function(o){FLBuilderHistoryManager={states:[],position:0,rendering:!1,init:function(){var e=FLBuilderConfig.history,l=this;this.states=e.states,this.position=parseInt(e.position),this.setupMainMenuData(),o.each(e.hooks,function(e,i){FLBuilder.addHook(e,function(e,t){l.saveCurrentState(i,t)})}),FLBuilder.addHook("didPublishLayout",this.clearStatesOnPublish.bind(this)),FLBuilder.addHook("restartEditingSession",this.saveCurrentStateOnRestartSession.bind(this)),FLBuilder.addHook("historyItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("undo",this.onUndo.bind(this)),FLBuilder.addHook("redo",this.onRedo.bind(this))},saveCurrentState:function(e,t){var i=null;void 0!==(t=void 0===t?{}:t).moduleType&&t.moduleType&&(i=t.moduleType);const l=FL.Builder.data.getLayoutActions();l.saveHistoryState(e,i)},saveCurrentStateOnRestartSession:function(e){this.states.length||this.saveCurrentState("draft_created")},clearStatesOnPublish:function(e,t){this.states=[],this.position=0,this.setupMainMenuData();const i=FL.Builder.data.getLayoutActions();i.clearHistoryStates(FLBuilderConfig.postId,t.shouldExit)},renderState:function(e){var t=this;if(!this.rendering&&this.states.length&&!o(".fl-builder-settings:visible").length){var i=setTimeout(FLBuilder.showAjaxLoader,2e3);this.rendering=!0;const l=FL.Builder.data.getLayoutActions();l.renderHistoryState(e,function(e){e=JSON.parse(e);e.error||(t.position=parseInt(e.position),FLBuilder.triggerHook("didRestoreHistoryComplete",e),FLBuilder._renderLayout(e.layout),t.setupMainMenuData()),clearTimeout(i),t.rendering=!1})}},onUndo:function(){const e=FL.Builder.data.getLayoutActions();e.undo()},onRedo:function(){const e=FL.Builder.data.getLayoutActions();e.redo()},setupMainMenuData:function(){var e=FLBuilderConfig.history.labels,t="";FLBuilderConfig.mainMenu.history.items=[];for(var i=this.states.length-1;0<=i;i--)"string"==typeof this.states[i]?t=e[this.states[i]]||this.states[i]:(t=e[this.states[i].label]||this.states[i].label,(this.states[i].moduleType||-1<this.states[i].label.indexOf("module"))&&(t=t.replace("%s",this.getModuleName(this.states[i].moduleType)))),FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:t,current:i===this.position?1:0,position:i})});FLBuilderConfig.history.enabled||FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:FLBuilderConfig.history.labels.history_disabled,current:0,position:0})}),void 0!==FLBuilder.MainMenu&&FLBuilder.MainMenu.renderPanel("history")},getModuleName:function(e){var t=FLBuilderConfig.contentItems.module,i=0;if("widget"===e)return FLBuilderStrings.widget;for(;i<t.length;i++)if(void 0!==t[i].slug&&e===t[i].slug)return t[i].name;return FLBuilderStrings.module},itemClicked:function(e,t){var i=o(t).find(".fl-history-list-item"),l=i.attr("data-position"),t=o(".fl-history-list-item[data-current=1]");o(".fl-builder-settings:visible").length&&(FLBuilder._closeNestedSettings(),FLBuilder._lightbox.close()),t.attr("data-current",0),i.attr("data-current",1),this.renderState(l)}},o(function(){FLBuilderHistoryManager.init()})}(jQuery),function(exports){"use strict";exports.stringify=function(e){return JSON.stringify(e,function(e,t){var i;return t instanceof Function||"function"==typeof t?(i=t.toString()).length<8||"function"!==i.substring(0,8)?"_NuFrRa_"+i:i:t instanceof RegExp?"_PxEgEr_"+t:t})},exports.parse=function(str,date2obj){var iso8061=!!date2obj&&/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/;return JSON.parse(str,function(key,value){var prefix;return"string"!=typeof value?value:value.length<8?value:(prefix=value.substring(0,8),iso8061&&value.match(iso8061)?new Date(value):"function"===prefix?eval("("+value+")"):"_PxEgEr_"===prefix||"_NuFrRa_"===prefix?eval(value.slice(8)):value)})},exports.clone=function(e,t){return exports.parse(exports.stringify(e),t)}}("undefined"==typeof exports?window.JSONfn={}:exports);
|
1 |
+
var FLBuilderColorPicker;!function(u){var i=[],t=navigator.userAgent.toLowerCase(),l="Microsoft Internet Explorer"===navigator.appName,o=l?parseFloat(t.match(/msie ([0-9]{1,}[\.0-9]{0,})/)[1]):0,n=l&&o<10,s=!1,r=["-moz-","-webkit-","-o-","-ms-"];function a(e,t){return e="top"===e?"top":"left",t=Array.isArray(t)?t:Array.prototype.slice.call(arguments,1),"webkit"===s?(o=[],i="top"===(i=e)?"0% 0%,0% 100%,":"0% 100%,100% 100%,",l=d(l=t),u.each(l,function(e,t){o.push("color-stop("+parseFloat(t.stop)/100+", "+t.color+")")}),"-webkit-gradient(linear,"+i+o.join(",")+")"):r[s]+"linear-gradient("+e+", "+t.join(", ")+")";var i,l,o}function d(e){var n=[],s=[],t=[],i=e.length-1;return u.each(e,function(e,t){var i=t,l=!1,o=t.match(/1?[0-9]{1,2}%$/);o&&(i=t.replace(/\s?1?[0-9]{1,2}%$/,""),l=o.shift()),n.push(i),s.push(l)}),!1===s[0]&&(s[0]="0%"),!1===s[i]&&(s[i]="100%"),s=function e(t){var i,l,o,n,s=0,r=t.length-1,a=0,d=!1;if(t.length<=2||u.inArray(!1,t)<0)return t;for(;a<t.length-1;)d||!1!==t[a]?d&&!1!==t[a]&&(r=a,a=t.length):(s=a-1,d=!0),a++;l=r-s;n=parseInt(t[s].replace("%"),10);i=(parseFloat(t[r].replace("%"))-n)/l;a=s+1;o=1;for(;a<r;)t[a]=n+o*i+"%",o++,a++;return e(t)}(s),u.each(s,function(e){t[e]={color:n[e],stop:s[e]}}),t}flBuilderParseColorValue=function(e){var e=e.replace(/\s+/g,""),t=-1!==e.indexOf("rgba")?parseFloat(100*e.replace(/^.*,(.+)\)/,"$1")):100;return{value:e,alpha:t,rgba:t<100}},u.fn.flBuilderColorPickerGradient=function(){var e=arguments;return this.each(function(){n?function(e,l){var o,t,n,s,r;e="top"===e?"top":"left",l=Array.isArray(l)?l:Array.prototype.slice.call(arguments,1),o="top"===e?0:1,t=u(this),n=l.length-1,s='<div class="iris-ie-gradient-shim" style="position:absolute;'+(1==o?"height":"width")+":100%;"+(1==o?"left":"top")+":%start%;"+(1==o?"right":"bottom")+':%end%;filter:%filter%;" data-color:"%color%"></div>',r="","static"===t.css("position")&&t.css({position:"relative"}),l=d(l),u.each(l,function(e,t){var i;return e!==n&&(e=l[e+1],void(t.stop!==e.stop&&(i=100-parseFloat(e.stop)+"%",t.octoHex=new FLBuilderColor(t.color).toIEOctoHex(),e.octoHex=new FLBuilderColor(e.color).toIEOctoHex(),e="progid:DXImageTransform.Microsoft.Gradient(GradientType="+o+", StartColorStr='"+t.octoHex+"', EndColorStr='"+e.octoHex+"')",r+=s.replace("%start%",t.stop).replace("%end%",i).replace("%filter%",e))))}),t.find(".iris-ie-gradient-shim").remove(),u(r).prependTo(t)}.apply(this,e):u(this).css("backgroundImage",a.apply(this,e))})},u.fn.flBuilderColorPickerRaninbowGradient=function(e,t){var i,l,o;for(e=e||"top",i="hsl(%h%,"+(t=u.extend({},{s:100,l:50},t)).s+"%,"+t.l+"%)",l=0,o=[];l<=360;)o.push(i.replace("%h%",l)),l+=30;return this.each(function(){u(this).flBuilderColorPickerGradient(e,o)})},(FLBuilderColorPicker=function(e){this._html='<div class="fl-color-picker-ui"><div class="iris-picker"><div class="iris-picker-inner"><div class="iris-square"><a class="iris-square-value" href="javascript:void(0);"><span class="iris-square-handle ui-slider-handle"></span></a><div class="iris-square-inner iris-square-horiz"></div><div class="iris-square-inner iris-square-vert"></div></div><div class="iris-slider iris-strip"><div class="iris-slider-offset"></div></div></div></div></div>';this.options=u.extend({},{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!"}},e),(!1==n||!0==n&&7<o)&&this._init()}).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 e=this;u(e.options.elements);u("html").hasClass("fl-color-picker-init")?this._prepareColorFields():(this._color=new FLBuilderColor("#ff0000").setHSpace(e.options.mode),i=this.options.presets,!1===s&&function(){var i,l="backgroundImage";n?s="filter":(i=u('<div id="iris-gradtest" />'),u.each(r,function(e,t){if(i.css(l,t+"linear-gradient(top,#fff,#000)"),i.css(l).match("gradient"))return s=e,!1}),!1===s&&(i.css("background","-webkit-gradient(linear,0% 0%,0% 100%,from(#fff),to(#000))"),i.css(this.bgImageString).match("gradient")&&(s="webkit")),i.remove())}(),e.picker=u(this._html).appendTo("body"),l?9===o?e.picker.addClass("iris-ie-9"):o<=8&&e.picker.addClass("iris-ie-lt9"):t.indexOf("compatible")<0&&t.indexOf("khtml")<0&&t.match(/mozilla/)&&e.picker.addClass("iris-mozilla"),e.controls={square:e.picker.find(".iris-square"),squareDrag:e.picker.find(".iris-square-value"),horiz:e.picker.find(".iris-square-horiz"),vert:e.picker.find(".iris-square-vert"),strip:e.picker.find(".iris-strip"),stripSlider:e.picker.find(".iris-strip .iris-slider-offset")},"hsv"===e.options.mode&&e._has("l",e.options.controls)?e.options.controls=e._defaultHSVControls:"hsl"===e.options.mode&&e._has("v",e.options.controls)&&(e.options.controls=e._defaultHSLControls),e.hue=e._color.h(),this._setTemplates(),this._ui=u(".fl-color-picker-ui"),this._iris=u(".iris-picker"),this._wrapper=u("body"),this._ui.prepend(this._hexHtml).append(this._presetsHtml),e.element=this._ui.find(".fl-color-picker-input"),e._initControls(),e.active="external",e._change(),e._addInputListeners(e.element),this._buildUI(),this._prepareColorFields(),this._pickerControls(),this._presetsControls(),this._buildAlphaUI(),u("html").addClass("fl-color-picker-init"))},_prepareColorFields:function(){var n=this;u(".fl-color-picker-value").each(function(){var e=u(this),t=e.val(),i=e.parent().find(".fl-color-picker-color"),l=flBuilderParseColorValue(t),o="";t&&(i.hasClass("fl-color-picker-alpha-enabled")&&l.rgba?o=e.val().toString():!i.hasClass("fl-color-picker-alpha-enabled")&&l.rgba?(l=(l=t.replace("rgba","rgb")).substr(0,l.lastIndexOf(","))+")",n._color._alpha=1,o=l,e.val(l)):o="#"+e.val().toString(),i.css({backgroundColor:o}))})},_setTemplates:function(){this._alphaHtml='<div class="fl-alpha-wrap"><div class="fl-alpha-slider"></div><div class="fl-alpha-slider-offset"></div><div class="fl-alpha-text"></div></div>',this._presetsHtml='<div class="fl-color-picker-presets"><div class="fl-color-picker-presets-toggle"><div class="fl-color-picker-presets-open-label fl-color-picker-active">'+this.options.labels.colorPresets+' <span class="fl-color-picker-icon-arrow-up"></span></div><div class="fl-color-picker-presets-close-label">'+this.options.labels.colorPicker+' <span class="fl-color-picker-icon-arrow-down"></span></div></div><ul class="fl-color-picker-presets-list"></ul></div>',this._hexHtml='<input type="text" class="fl-color-picker-input" 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(i,e){var l=!1;return u.each(e,function(e,t){if(i===t)return!(l=!0)}),l},_buildUI:function(){var i=this;i._presetsList=this._ui.find(".fl-color-picker-presets-list"),i._presetsList.html(""),0<this.options.presets.length?u.each(this.options.presets,function(e,t){i._addPresetView(t)}):i._presetsList.append(this._noPresetsTpl)},_addPresetView:function(e){var t=this._presetsList.find(".fl-color-picker-no-preset"),t=(0<t.length&&t.remove(),u(this._presetsTpl)),i=FLBuilderColor(e);t.attr("data-color",e).find(".fl-color-picker-preset-color").css({backgroundColor:i.toString()}).end().find(".fl-color-picker-preset-label").html(i.toString()),this._presetsList.append(t)},_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(){u(this).remove()})},_pickerControls:function(){var i=this;this._wrapper.on("click",".fl-color-picker-color",function(){var e=u(this);i._currentElement=e.parent().find(".fl-color-picker-value"),i._ui.position({my:"left top",at:"left bottom",of:e,collision:"flip",using:function(e,t){i._togglePicker(e)}})}).on("click",".fl-color-picker-clear",function(){var e=u(this);i._currentElement=e.parent().find(".fl-color-picker-value"),e.prev(".fl-color-picker-color").css({backgroundColor:"transparent"}).addClass("fl-color-picker-empty"),i._setColor(""),i.element.val(""),i._currentElement.val("").trigger("change")}),u(document).on("mousedown",function(e){0===u(e.target).closest(".fl-color-picker-ui").length&&(presets=i._ui.find(".fl-color-picker-presets"),presetsCloseLabel=presets.find(".fl-color-picker-presets-close-label"),presetsList=presets.find(".fl-color-picker-presets-list"),presetsCloseLabel.hasClass("fl-color-picker-active")&&(list=presetsList.find("li").find("span.fl-color-picker-preset-label"),0<list.length&&(presets=[],u.each(list,function(e,t){presets.push(u(t).text())}),u(FLBuilder.colorPicker).trigger("presetSorted",{presets:presets}))),u(".fl-color-picker-ui.fl-color-picker-active").removeClass("fl-color-picker-active"))})},_presetsControls:function(){var i=this,e=i._ui.find(".fl-color-picker-preset-add"),l=i._ui.find(".fl-color-picker-presets"),o=l.find(".fl-color-picker-presets-open-label"),n=l.find(".fl-color-picker-presets-close-label"),s=l.find(".fl-color-picker-presets-list");e.off("click").on("click",function(){i._addPreset(i.element.val())}),s.css({height:i.element.innerHeight()+i._iris.innerHeight()+14+"px"}).hide(),s.sortable(),l.off("click").on("click",".fl-color-picker-presets-toggle",function(){n.hasClass("fl-color-picker-active")&&(list=s.find("li").find("span.fl-color-picker-preset-label"),0<list.length&&(l=[],u.each(list,function(e,t){l.push(u(t).text())}),u(FLBuilder.colorPicker).trigger("presetSorted",{presets:l}))),o.toggleClass("fl-color-picker-active"),n.toggleClass("fl-color-picker-active"),s.slideToggle(500)}).on("click",".fl-color-picker-preset",function(e){var t=new FLBuilderColor(u(this).data("color").toString());i._setColor(t),i._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:t.toString()}).removeClass("fl-color-picker-empty"),o.toggleClass("fl-color-picker-active"),n.toggleClass("fl-color-picker-active"),s.slideToggle(500)}).on("click",".fl-color-picker-preset-remove",function(e){e.stopPropagation(),i._removePreset(u(this).parent().data("color"))})},_removePreset:function(e){var t;confirm(this.options.labels.removePresetConfirm)&&(e=e.toString(),-1<(t=i.indexOf(e))&&(i.splice(t,1),this.options.presets=i,this._presetsList.find('.fl-color-picker-preset[data-color="'+e+'"]').slideUp(function(){u(this).remove()})),i.length<1&&this._presetsList.append(this._noPresetsTpl),u(this).trigger("presetRemoved",{presets:i}))},_addPreset:function(e){if(!this._CheckValidColor(e))return alert(this.options.labels.noneColorSelected),!1;e=e.toString().replace(/^#/,"");""===e?alert(this.options.labels.noneColorSelected):-1<i.indexOf(e)?alert(this.options.labels.alreadySaved.replace("%s","#"+e)):(this._addPresetView(e),this._addPresetFeedback(),i.push(e),this.options.presets=i,u(this).trigger("presetAdded",{presets:i}))},_CheckValidColor:function(e){if(!e.match(/^#/)&&!e.match(/^rgb/)&&!e.match(/^hsl/))return!1;var t=document.getElementById("divValidColor");return t||((t=document.createElement("div")).id="divValidColor"),t.style.borderColor="",t.style.borderColor=e,0!=t.style.borderColor.length},_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(){this._paintDimension("right","strip"),this._paintDimension("top","vert"),this._paintDimension("left","horiz")},_paintDimension:function(e,t){var i,l=this,o=l._color,n=l.options.mode,s=l._getHSpaceColor(),r=l.controls[t],a=l.options.controls;if(t!==l.active&&("square"!==l.active||"strip"===t))switch(a[t]){case"h":if("hsv"===n){switch(s=o.clone(),t){case"horiz":s[a.vert](100);break;case"vert":s[a.horiz](100);break;case"strip":s.setHSpace("hsl")}i=s.toHsl()}else i="strip"===t?{s:s.s,l:s.l}:{s:100,l:s.l};r.flBuilderColorPickerRaninbowGradient(e,i);break;case"s":"hsv"===n?"vert"===t?i=[o.clone().a(0).s(0).toCSS("rgba"),o.clone().a(1).s(0).toCSS("rgba")]:"strip"===t?i=[o.clone().s(100).toCSS("hsl"),o.clone().s(0).toCSS("hsl")]:"horiz"===t&&(i=["#fff","hsl("+s.h+",100%,50%)"]):i="vert"===t&&"h"===l.options.controls.horiz?["hsla(0, 0%, "+s.l+"%, 0)","hsla(0, 0%, "+s.l+"%, 1)"]:["hsl("+s.h+",0%,50%)","hsl("+s.h+",100%,50%)"],r.flBuilderColorPickerGradient(e,i);break;case"l":i="strip"===t?["hsl("+s.h+",100%,100%)","hsl("+s.h+", "+s.s+"%,50%)","hsl("+s.h+",100%,0%)"]:["#fff","rgba(255,255,255,0) 50%","rgba(0,0,0,0) 50%","rgba(0,0,0,1)"],r.flBuilderColorPickerGradient(e,i);break;case"v":i="strip"===t?[o.clone().v(100).toCSS(),o.clone().v(0).toCSS()]:["rgba(0,0,0,0)","#000"],r.flBuilderColorPickerGradient(e,i)}},_getHSpaceColor:function(){return"hsv"===this.options.mode?this._color.toHsv():this._color.toHsl()},_dimensions:function(e){var t,i=this,l=i.options,o=i.controls.square,n=i.picker.find(".iris-strip"),s=l.border?l.width-20:l.width;if(e&&(o.css("width",""),n.css("width",""),i.picker.css({width:"",height:""})),e=s*(parseFloat("77.5%")/100),s=s*(parseFloat("12%")/100),t=l.border?20+e:e,o.width(e).height(e),n.height(e).width(s),i.picker.css({width:l.width,height:t}),!l.palettes)return i.picker.css("paddingBottom","")},_addInputListeners:function(o){function e(e){var t=new FLBuilderColor(o.val()),i=o.val().replace(/^#/,""),l=n._currentElement.hasClass("fl-color-picker-empty");if(o.removeClass("iris-error"),t.error)""!==i&&o.addClass("iris-error");else if(t.toString()!==n._color.toString()||""!==n._color.toString()&&l)if("keyup"===e.type)i.match(/^[0-9a-fA-F]{3}$/)||(n._setColor(i),n._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:FLBuilderColor(i).toString()}).removeClass("fl-color-picker-empty"),n._currentElement.val(i).trigger("change"));else if("paste"===e.type)return i=e.originalEvent.clipboardData.getData("text").replace(/^#/,""),hex=FLBuilderColor(i).toString(),n._setColor(i),o.val(hex),n._currentElement.parent().find(".fl-color-picker-color").css({backgroundColor:hex}).removeClass("fl-color-picker-empty"),n._currentElement.val(i).trigger("change"),!1}var n=this;o.on("change",e).on("keyup",n._debounce(e,100))},_initControls:function(){var n=this,s=n.controls,e=s.square,i=n.options.controls,l=n._scale[i.strip];s.stripSlider.slider({orientation:"horizontal",max:l,slide:function(e,t){n.active="strip","h"===i.strip&&(t.value=l-t.value),n._color[i.strip](t.value),n._change.apply(n,arguments)}}),s.squareDrag.draggable({containment:s.square.find(".iris-square-inner"),zIndex:1e3,cursor:"move",drag:function(e,t){n._squareDrag(e,t)},start:function(){e.addClass("iris-dragging"),u(this).addClass("ui-state-focus")},stop:function(){e.removeClass("iris-dragging"),u(this).removeClass("ui-state-focus")}}).on("mousedown mouseup",function(e){var t="ui-state-focus";e.preventDefault(),"mousedown"===e.type?(n.picker.find("."+t).removeClass(t).blur(),u(this).addClass(t).focus()):u(this).removeClass(t)}).on("keydown",function(e){var t=s.square,i=s.squareDrag,l=i.position(),o=2;switch(e.altKey&&(o*=10),e.keyCode){case 37:l.left-=o;break;case 38:l.top-=o;break;case 39:l.left+=o;break;case 40:l.top+=o;break;default:return!0}l.left=Math.max(0,Math.min(l.left,t.width())),l.top=Math.max(0,Math.min(l.top,t.height())),i.css(l),n._squareDrag(e,{position:l}),e.preventDefault()}),e.mousedown(function(e){var t;1===e.which&&u(e.target).is("div")&&(t=n.controls.square.offset(),t={top:e.pageY-t.top,left:e.pageX-t.left},e.preventDefault(),n._squareDrag(e,{position:t}),e.target=n.controls.squareDrag.get(0),n.controls.squareDrag.css(t).trigger(e))})},_squareDrag:function(e,t){var i=this,l=i.options.controls,o=i._squareDimensions(),n=Math.round((o.h-t.position.top)/o.h*i._scale[l.vert]),o=i._scale[l.horiz]-Math.round((o.w-t.position.left)/o.w*i._scale[l.horiz]);i._color[l.horiz](o)[l.vert](n),i.active="square",i._change.apply(i,arguments)},_setColor:function(e){var t=this,i=t.options.color;""===e?(e="#ff0000",t.default=!0):t.default=!1,(e=""+(t.options.color=e)).replace(/^#/,""),(e=new FLBuilderColor(e).setHSpace(t.options.mode)).error?t.options.color=i:(t._color=e,t.options.color=t._color.toString(),t.active="external",t._change())},_squareDimensions:function(e){var t=this.controls.square;return void 0!==e&&t.data("dimensions")?t.data("dimensions"):(this.controls.squareDrag,e={w:t.width(),h:t.height()},t.data("dimensions",e),e)},_isNonHueControl:function(e,t){return"square"===e&&"h"===this.options.controls.strip||"external"!==t&&("h"!==t||"strip"!==e)},_change:function(){var l=this,o=l.controls,n=l._getHSpaceColor(),e=["square","strip"],s=l.options.controls,t=s[l.active]||"external",i=l.hue;"strip"===l.active?e=[]:"external"!==l.active&&e.pop(),u.each(e,function(e,t){var i;if(t!==l.active)switch(t){case"strip":i="h"===s.strip?l._scale[s.strip]-n[s.strip]:n[s.strip],o.stripSlider.slider("value",i);break;case"square":i=l._squareDimensions(),i={left:n[s.horiz]/l._scale[s.horiz]*i.w,top:i.h-n[s.vert]/l._scale[s.vert]*i.h},l.controls.squareDrag.css(i)}}),n.h!==i&&l._isNonHueControl(l.active,t)&&l._color.h(i),l.hue=l._color.h(),l.options.color=l._color.toString(),l.element.is(":input")&&!l._color.error&&(l.element.removeClass("iris-error"),l.element.val()!==l._color.toString()&&(l.element.val(l._color.toString()),this._currentElement&&(!l.default||l.default&&"external"!==l.active?this._currentElement.val(l._color.toString().replace(/^#/,"")).parent().find(".fl-color-picker-color").css({backgroundColor:l._color.toString()}).removeClass("fl-color-picker-empty"):this._currentElement.val(""),l._wrapper.find(".fl-alpha-slider-offset").css("background-color",l._color.toString()),this._currentElement.trigger("change")))),l._paint(),l._inited=!0,l.active=!1},_debounce:function(o,n,s){var r,a;return function(){var e=this,t=arguments,i=function(){r=null,s||(a=o.apply(e,t))},l=s&&!r;return clearTimeout(r),r=setTimeout(i,n),a=l?o.apply(e,t):a}},_buildAlphaUI:function(){var t=this;t._wrapper.on("click",".fl-color-picker-color",function(){var e=u(this);t._currentElement.val();e.hasClass("fl-color-picker-alpha-enabled")?(t._ui.find(".fl-alpha-wrap").length<=0&&u(t._alphaHtml).insertAfter(t._iris),t.picker.addClass("fl-color-alpha-enabled"),t._pickerAlphaControls()):(t.picker.removeClass("fl-color-alpha-enabled"),t._ui.find(".fl-alpha-wrap").remove())})},_pickerAlphaControls:function(){var l=this,e=l._currentElement,t=flBuilderParseColorValue(e.val()),e=parseFloat(t.alpha/100),i=l._wrapper,o=l._ui.find(".fl-alpha-wrap"),n=o.find(".fl-alpha-slider"),s=o.find(".fl-alpha-text"),r=o.find(".fl-alpha-slider-offset");alphaHandle=o.find(".ui-slider-handle"),s.text(e<1?e:""),n.slider({orientation:"vertical",slide:function(e,t){var i=parseFloat(t.value/100);l._color._alpha=i,s.text(i<1?i:""),l._change.apply(l,arguments)},create:function(){r.css({backgroundColor:t.value}),i.on("click",".fl-color-picker-clear",function(){l._color._alpha=1,s.text(""),n.slider("value",100).trigger("slide")})},value:t.alpha,step:1,min:0,max:100})}}}(jQuery),function(e,u){function n(e,t){return this instanceof n?this._init(e,t):new n(e,t)}n.fn=n.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 t="noop";switch(typeof e){case"object":return e.a!==u&&this.a(e.a),this[t=e.r!==u?"fromRgb":e.l!==u?"fromHsl":e.v!==u?"fromHsv":t](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 n(this.toInt()),t=["_alpha","_hSpace","_hsl","_hsv","error"],i=t.length-1;0<=i;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,i=/^(rgb|hs(l|v))a?\(/;if(this.error=!1,(e=e.replace(/^\s+/,"").replace(/\s+$/,"").replace(/;$/,"")).match(i)&&e.match(/\)$/)){if((t=e.replace(/(\s|%)/g,"").replace(i,"").replace(/,?\);?$/,"").split(",")).length<3)return this._error();if(4===t.length&&(this.a(parseFloat(t.pop())),this.error))return this;for(var l=t.length-1;0<=l;l--)if(t[l]=parseInt(t[l],10),isNaN(t[l]))return this._error();return e.match(/^rgb/)?this.fromRgb({r:t[0],g:t[1],b:t[2]}):e.match(/^hsv/)?this.fromHsv({h:t[0],s:t[1],v:t[2]}):this.fromHsl({h:t[0],s:t[1],l:t[2]})}return this.fromHex(e)},fromRgb:function(e,t){return"object"!=typeof e||e.r===u||e.g===u||e.b===u?this._error():(this.error=!1,this.fromInt(parseInt((e.r<<16)+(e.g<<8)+e.b,10),t))},fromHex:function(e){return 3===(e=e.replace(/^#/,"").replace(/^0x/,"")).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 t,i,l,o,n;return"object"!=typeof e||e.h===u||e.s===u||e.l===u?this._error():(this._hsl=e,this._hSpace="hsl",o=e.h/360,n=e.s/100,e=e.l/100,0==n?t=i=l=e:(t=this.hue2rgb(n=2*e-(e=e<.5?e*(1+n):e+n-e*n),e,o+1/3),i=this.hue2rgb(n,e,o),l=this.hue2rgb(n,e,o-1/3)),this.fromRgb({r:255*t,g:255*i,b:255*l},!0))},fromHsv:function(e){var t,i,l,o,n,s,r,a,d;if("object"!=typeof e||e.h===u||e.s===u||e.v===u)return this._error();switch(this._hsv=e,this._hSpace="hsv",s=e.h/360,t=e.s/100,r=(i=e.v/100)*(1-t),a=i*(1-(s=6*s-(e=Math.floor(6*s)))*t),d=i*(1-(1-s)*t),e%6){case 0:l=i,o=d,n=r;break;case 1:l=a,o=i,n=r;break;case 2:l=r,o=i,n=d;break;case 3:l=r,o=a,n=i;break;case 4:l=d,o=r,n=i;break;case 5:l=i,o=r,n=a}return this.fromRgb({r:255*l,g:255*o,b:255*n},!0)},fromInt:function(e,t){return this._color=parseInt(e,10),isNaN(this._color)&&(this._color=0),16777215<this._color?this._color=16777215:this._color<0&&(this._color=0),t===u&&(this._hsv.h=this._hsv.s=this._hsl.h=this._hsl.s=0),this},hue2rgb:function(e,t,i){return i<0&&(i+=1),1<i&&--i,i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},toString:function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;0<=t;t--)e="0"+e;return"#"+e},toCSS:function(e,t){switch(e=e||"hex",t=parseFloat(t||this._alpha),e){case"rgb":case"rgba":var i=this.toRgb();return t<1?"rgba( "+i.r+", "+i.g+", "+i.b+", "+t+" )":"rgb( "+i.r+", "+i.g+", "+i.b+" )";case"hsl":case"hsla":i=this.toHsl();return t<1?"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=this.toRgb(),i=t.r/255,l=t.g/255,o=t.b/255,t=Math.max(i,l,o),n=Math.min(i,l,o),s=(t+n)/2;if(t===n)e=a=0;else{var r=t-n,a=.5<s?r/(2-t-n):r/(t+n);switch(t){case i:e=(l-o)/r+(l<o?6:0);break;case l:e=(o-i)/r+2;break;case o:e=(i-l)/r+4}e/=6}return{h:e=0===(e=Math.round(360*e))&&this._hsl.h!==e?this._hsl.h:e,s:a=0===(a=Math.round(100*a))&&this._hsl.s?this._hsl.s:a,l:Math.round(100*s)}},toHsv:function(){var e,t=this.toRgb(),i=t.r/255,l=t.g/255,o=t.b/255,t=Math.max(i,l,o),n=Math.min(i,l,o),s=t,r=t-n,a=0===t?0:r/t;if(t===n)e=a=0;else{switch(t){case i:e=(l-o)/r+(l<o?6:0);break;case l:e=(o-i)/r+2;break;case o:e=(i-l)/r+4}e/=6}return{h:e=0===(e=Math.round(360*e))&&this._hsv.h!==e?this._hsv.h:e,s:a=0===(a=Math.round(100*a))&&this._hsv.s?this._hsv.s:a,v:Math.round(100*s)}},toInt:function(){return this._color},toIEOctoHex:function(){var e=this.toString(),t=parseInt(255*this._alpha,10).toString(16);return"#"+(t=1===t.length?"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 n))throw"getDistanceLuminosityFrom requires a Color object";var t=this.toLuminosity(),e=e.toLuminosity();return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)},getMaxContrastColor:function(){var e=this.toLuminosity();return new n(.5<=e?"000000":"ffffff")},getReadableContrastingColor:function(e,t){if(!(e instanceof n))return this;var i=t===u?5:t,l=e.getDistanceLuminosityFrom(this),t=e.getMaxContrastColor();if(t.getDistanceLuminosityFrom(e)<=i)return t;if(i<=l)return this;for(var o=0===t.toInt()?-1:1;l<i&&(this.l(o,!0),l=this.getDistanceLuminosityFrom(e),0!==this._color&&16777215!==this._color););return this},a:function(e){if(e===u)return this._alpha;e=parseFloat(e);return isNaN(e)?this._error():(this._alpha=e,this)},darken:function(e){return this.l(-(e=e||5),!0)},lighten:function(e){return this.l(e=e||5,!0)},saturate:function(e){return this.s(e=e||15,!0)},desaturate:function(e){return this.s(-(e=e||15),!0)},toGrayscale:function(){return this.setHSpace("hsl").s(0)},getComplement:function(){return this.h(180,!0)},getSplitComplement:function(e){return this.h(180+30*(e=e||1),!0)},getAnalog:function(e){return this.h(30*(e=e||1),!0)},getTetrad:function(e){return this.h(60*(e=e||1),!0)},getTriad:function(e){return this.h(120*(e=e||1),!0)},_partial:function(l){var o=i[l];return function(e,t){var i=this._spaceFunc("to",o.space);return e===u?i[l]:(!0===t&&(e=i[l]+e),o.mod&&(e%=o.mod),o.range&&(e=e<o.range[0]?o.range[0]:e>o.range[1]?o.range[1]:e),i[l]=e,this._spaceFunc("from",o.space,i))}},_spaceFunc:function(e,t,i){t=t||this._hSpace;return this[e+t.charAt(0).toUpperCase()+t.substr(1)](i)}};var t,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(t in i)i.hasOwnProperty(t)&&(n.fn[t]=n.fn._partial(t));"object"==typeof exports?module.exports=n:(e.FLBuilderColor=n,e.Color=n)}(this),function(s){FLLightbox=function(e){this._init(e)},FLLightbox.closeParent=function(e){e=s(e).closest(".fl-lightbox-wrap").attr("data-instance-id");_.isUndefined(e)||FLLightbox._instances[e].close()},FLLightbox.getResizableControlClass=function(){var e=s(".fl-lightbox-resizable").eq(0),t="far fa-window-maximize";return t=e.length&&e.hasClass("fl-lightbox-width-full")?"far fa-window-minimize":t},FLLightbox.unbindAll=function(){for(var e in FLLightbox._instances)FLLightbox._instances[e]._unbind()},FLLightbox.bindAll=function(){for(var e in FLLightbox._instances)FLLightbox._instances[e]._bind()},FLLightbox.closeAll=function(){for(var e in FLLightbox._instances)FLLightbox._instances[e].close()},FLLightbox._instances={},FLLightbox.prototype={_id:null,_node:null,_visible:!1,_allowClosing:!0,_resizeTimer:null,_defaults:{className:"",destroyOnClose:!1,resizable:!1},open:function(e){var t=this._node.find(".fl-lightbox"),i=t.closest(".fl-builder-ui-pinned").length,l=this._getPositionSettings();!i&&l&&this._defaults.resizable&&t.css(l),this._bind(),this._node.show(),this._visible=!0,void 0!==e?this.setContent(e):this._resize(),this.trigger("open"),FLBuilder.triggerHook("didShowLightbox",this)},close:function(){var e=this._node.data("parent");this._allowClosing&&(this.trigger("beforeCloseLightbox"),this._unbind(),this._node.hide(),this._visible=!1,this.trigger("close"),FLBuilder.triggerHook("didHideLightbox"),this._defaults.resizable&&_.isUndefined(e)&&FLBuilder.triggerHook("didHideAllLightboxes"),this._defaults.destroyOnClose&&this.destroy())},disableClose:function(){this._allowClosing=!1},enableClose:function(){this._allowClosing=!0},setContent:function(e){this._node.find(".fl-lightbox-content").html(e),this._resize(),0==s(".fl-builder-content-panel-button").length&&s(".fl-builder-panel-drag-handle").show()},empty:function(){this._node.find(".fl-lightbox-content").empty()},on:function(e,t){this._node.on(e,t)},off:function(e,t){this._node.off(e,t)},trigger:function(e,t){this._node.trigger(e,t)},destroy:function(){this._node.empty(),this._node.remove(),FLLightbox._instances[this._id]="undefined";try{delete FLLightbox._instances[this._id]}catch(e){}},_init:function(e){var t=0,i=null;for(i in FLLightbox._instances)t++;this._defaults=s.extend({},this._defaults,e),this._id=(new Date).getTime()+t,(FLLightbox._instances[this._id]=this)._render(),this._resizable()},_render:function(){this._node=s('<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),s("body").append(this._node)},_bind:function(){s(window).on("resize.fl-lightbox-"+this._id,this._delayedResize.bind(this))},_unbind:function(){s(window).off("resize.fl-lightbox-"+this._id)},_resizable:function(){s("body");var e=this._node.find(".fl-lightbox-mask"),t=this._node.find(".fl-lightbox"),i=s(".fl-lightbox-resizable").eq(0);this._defaults.resizable?(e.hide(),t.addClass("fl-lightbox-resizable"),t.on("click",".fl-lightbox-resize-toggle",this._resizeClicked.bind(this)),t.draggable({cursor:"move",handle:".fl-lightbox-header"}).resizable({handles:"all",minHeight:500,minWidth:380,start:this._resizeStart.bind(this),stop:this._resizeStop.bind(this)}),i.length&&i.hasClass("fl-lightbox-width-full")?(t.addClass("fl-lightbox-width-full"),t.draggable("disable")):this._restorePosition()):e.show(),this._resize()},_delayedResize:function(){clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(this._resize.bind(this),250)},_resize:function(){var e=this._node.find(".fl-lightbox"),t=parseInt(this._node.css("padding-top")),i=parseInt(this._node.css("padding-bottom")),l=(parseInt(this._node.css("padding-left")),parseInt(this._node.css("padding-right")),e.height()),o=e.width(),n=s(window),t=n.height()-t-i,i=(n.width(),"0px");this._defaults.resizable?(o<600?e.addClass("fl-lightbox-width-slim"):e.removeClass("fl-lightbox-width-slim"),o<450?e.addClass("fl-lightbox-width-micro"):e.removeClass("fl-lightbox-width-micro"),this._resizeEditors()):(l<t&&(i=(t-l-46)/2+"px"),e.attr("style","").css("margin",i+" auto 0")),this.trigger("resized")},_resizeStart:function(){s("body").addClass("fl-builder-resizable-is-resizing"),s(".fl-builder-lightbox:visible").append('<div class="fl-builder-resizable-iframe-fix"></div>'),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},_resizeStop:function(e,t){var i=s(".fl-lightbox-resizable:visible");parseInt(i.css("top"))<0&&i.css("top","0"),this._savePosition(),s("body").removeClass("fl-builder-resizable-is-resizing"),s(".fl-builder-resizable-iframe-fix").remove(),FLBuilder._bindOverlayEvents()},_resizeClicked:function(){s(".fl-lightbox-resizable").find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox").hasClass("fl-lightbox-width-full")?this._resizeExitFull():this._resizeEnterFull(),this._resize()},_resizeEnterFull:function(){var e=s(".fl-lightbox-resizable"),t=e.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");t.removeClass("fa-window-maximize").addClass("fa-window-minimize"),e.addClass("fl-lightbox-width-full"),e.draggable("disable"),e.resizable("disable")},_resizeExitFull:function(){var e=s(".fl-lightbox-resizable"),t=e.find(".fl-lightbox-resize-toggle");this._node.find(".fl-lightbox");t.removeClass("fa-window-minimize").addClass("fa-window-maximize"),e.removeClass("fl-lightbox-width-full"),e.draggable("enable"),e.resizable("enable")},_resizeEditors:function(){s(".fl-lightbox-resizable").each(function(){var e=s(this),t=e.find(".fl-builder-settings-fields").height(),e=e.find(".mce-edit-area > iframe, textarea.wp-editor-area, .ace_editor"),i=null;t<350&&(t=350),e.each(function(){(i=s(this)).hasClass("ace_editor")?(i.height(t-60),i.closest(".fl-field").data("editor").resize()):i.closest(".mce-container-body").find(".mce-toolbar-grp .mce-toolbar.mce-last").is(":visible")?i.height(t-175):i.height(t-150)})})},_savePosition:function(){var e=this._node.find(".fl-lightbox"),t={width:e.width(),height:e.height(),top:parseInt(e.css("top"))<0?"0px":e.css("top"),left:e.css("left")};e.closest(".fl-builder-ui-pinned").length||(FLBuilderConfig.userSettings.lightbox=t,FLBuilder.ajax({action:"save_lightbox_position",data:t}))},_restorePosition:function(){var e=this._node.find(".fl-lightbox"),t=this._getPositionSettings();t?e.css(t):e.css({top:25,left:FLBuilderConfig.isRtl?"-25":25})},_getPositionSettings:function(){var e=FLBuilderConfig.userSettings.lightbox;if(!e)return!1;var t=window.innerHeight,i=parseInt(e.height),l=parseInt(e.top),o=parseInt(e.left),n=(parseInt(e.top),parseInt(e.width));return o+n+100>screen.width&&(e.left=screen.width-n-250),o<0&&(e.left=50),(t<i&&546<t||t<l+i)&&(t<i&&(e.height=t-50),e.top=0),e}}}(jQuery),function(s){FLIconSelector={_content:null,_lightbox:null,_rendered:!1,_filterText:"",_liveFilterText:"",open:function(i){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(),s(".fl-icons-filter-text-live").focus()),FLIconSelector._lightbox.on("icon-selected",function(e,t){FLIconSelector._lightbox.off("icon-selected"),FLIconSelector._lightbox.close(),i(t)})},_render:function(){FLIconSelector._lightbox=new FLLightbox({className:"fl-icon-selector"}),FLIconSelector._rendered=!0,FLBuilder.addHook("endEditingSession",function(){FLIconSelector._lightbox.close()})},_getContentComplete:function(e){e=FLBuilder._jsonParse(e);FLIconSelector._content=e.html,FLIconSelector._lightbox.setContent(e.html),s(".fl-icons-filter-text-live").on("keyup",s.debounce(1e3,FLIconSelector.livefilter)),s(".fl-icons-filter-text-live").focus(),s(".fl-icons-list i").on("click",FLIconSelector._select),s(".fl-icon-selector-cancel").on("click",s.proxy(FLIconSelector._lightbox.close,FLIconSelector._lightbox)),FLIconSelector.renderRecent()},renderRecent:function(){var e=FLBuilderConfig.recentIcons;if(e.length<1)return s(".fl-icons-section.recent h2.recent").hide(),!1;s(".fl-icons-section.recent h2.recent").show(),s(".fl-icons-section.recent").show(),s(".recent-icons").html(""),s.each(e,function(e,t){s(".recent-icons").append('<i class="'+t+'"></i>')}),s(".recent-icons").show(),s(".recent-icons i").on("click",FLIconSelector._select),recents=s(".recent-icons i"),s.each(recents,function(e,t){"none"==window.getComputedStyle(s(t)[0],":before").getPropertyValue("content")&&s(t).hide()})},livefilter:function(){var e=s(".fl-icons-filter-text-live").val();if(e===FLIconSelector._liveFilterText)return!1;s(".fl-icons-section.results").html(""),""===e?(FLIconSelector._liveFilterText="",s(".fl-icons-section").show(),FLIconSelector.renderRecent()):(s(".fl-icons-section.recent").hide(),s(".fl-icons-section.all-icons").hide(),s(".fl-icons-section.results").html('<i class="fas fa-spinner fa-spin"></i>'),FLIconSelector._liveFilterText=e,FLBuilder.ajax({action:"query_icons",text:e},FLIconSelector._query_result))},_query_result:function(e){var t=s(".fl-icons-section.results"),o="";if(!e||"[]"===e)return o="<h2>No Icons Found</h2>",FLIconSelector.renderRecent(),t.html(o),t.show(),!1;var e=FLBuilder._jsonParse(e),n="";s.each(e,function(e,l){o+="<h2>"+l.name+"</h2>",s.each(l.data,function(e,i){s.each(i.styles,function(e,t){switch(n="",t){case"solid":n="fas";break;case"regular":n="far";break;case"light":n="fal";break;case"duotone":n="fad";break;case"thin":n="fa-thin";break;case"brands":n="fa-brands fab";break;case"legacy":n=l.prefix}0<n.length&&(n+=" "),o+='<i class="'+n+i.tag+'" title="'+i.label+'"></i>'})})}),t.html(o),t.show(),s(".fl-icons-section.results i").on("click",FLIconSelector._select)},_filter:function(){var e=s(".fl-icons-filter-select").val(),t=s(".fl-icons-filter-text").val()||"";"all"==e?s(".fl-icons-section").show():(s(".fl-icons-section").hide(),s(".fl-"+e).show()),""!==(FLIconSelector._filterText=t)?s(".fl-icons-list i").each(FLIconSelector._filterIcon):s(".fl-icons-list i").show()},_filterIcon:function(){var e=s(this);-1==e.attr("class").indexOf(FLIconSelector._filterText)?e.hide():e.show()},_select:function(){var e=s(this).attr("class");FLBuilder.ajax({action:"recent_icons",icon:e},FLIconSelector._updateRecents),FLIconSelector._lightbox.trigger("icon-selected",e)},_updateRecents:function(e){FLBuilderConfig.recentIcons=FLBuilder._jsonParse(e)}}}(jQuery),function(i){FLStyleSheet=function(e){"object"==typeof e&&i.extend(this,e),this._createSheet()},FLStyleSheet.prototype={id:null,_sheet:null,_sheetElement:null,updateRule:function(e,t,i){for(var l=this._sheet.cssRules||this._sheet.rules,o=null,n=0;n<l.length;n++)l[n].selectorText.toLowerCase().replace(/\s/g,"")==e.toLowerCase().replace(/\s/g,"")&&(o=l[n]);if(o)if("object"==typeof t)for(n in t)this.setProperty(o,n,t[n]);else this.setProperty(o,t,i);else this.addRule(e,t,i)},setProperty:function(e,t,i){var l="";e.style.setProperty?(-1<i.indexOf("!important")&&(l="important",i=i.replace("!important","").trim()),e.style.setProperty(t,i,l)):e.style[this._toCamelCase(t)]=i},addRule:function(e,t,i){var l="",o="";if("object"==typeof t)for(o in t)l+=o+":"+t[o]+";";else l=t+":"+i+";";this._sheet.insertRule?this._sheet.insertRule(e+" { "+l+" }",this._sheet.cssRules.length):this._sheet.addRule(e,l)},destroy:function(){this._sheetElement&&(this._sheetElement.remove(),this._sheetElement=null),this._sheet&&(this._sheet=null)},disable:function(){this._sheet.disabled=!0},enable:function(){this._sheet.disabled=!1},_createSheet:function(){var e=this.id?' id="'+this.id+'"':"",t=this.className?' class="'+this.className+'"':"";this._sheet||(this._sheetElement=i('<style type="text/css"'+e+t+"></style>"),i("body").append(this._sheetElement),this._sheet=this._sheetElement[0].sheet)},_toCamelCase:function(e){return e.toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()})}}}(jQuery),function(y){FLBuilder={preview:null,_actionsLightbox:null,_ajaxQueue:[],_ajaxRequest:null,_colResizeData:null,_colResizing:!1,_contentClass:!1,_dragEnabled:!1,_dragging:!1,_dragInitialScrollTop:0,_exitUrl:null,_layout:null,_layoutQueue:[],_layoutSettingsCSSCache:null,_layoutSettingsCSSTimeout:null,_lightbox:null,_lightboxScrollbarTimeout:null,_loadedModuleAssets:[],_moduleHelpers:{},_multiplePhotoSelector:null,_newColParent:null,_newColPosition:0,_newColGroupParent:null,_newColGroupPosition:0,_newModuleParent:null,_newModulePosition:0,_newRowPosition:0,_selectedTemplateId:null,_selectedTemplateType:null,_singlePhotoSelector:null,_singleVideoSelector:null,_multipleAudiosSelector:null,_codeDisabled:!1,_sandbox:{},_publishAndRemain:!1,_init:function(){FLBuilder._initJQueryReadyFix(),FLBuilder._initGlobalErrorHandling(),FLBuilder._initPostLock(),FLBuilder._initClassNames(),FLBuilder._initMediaUploader(),FLBuilder._initOverflowFix(),FLBuilder._initScrollbars(),FLBuilder._initLightboxes(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._initStrings(),FLBuilder._initSanityChecks(),FLBuilder._initTipTips(),FLBuilder._initTinyMCE(),FLBuilder._bindEvents(),FLBuilder._bindOverlayEvents(),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._checkEnv(),FLBuilder.addHook("didInitUI",FLBuilder._showTourOrTemplates.bind(FLBuilder)),FLBuilder.addHook("endEditingSession",FLBuilder._doStats.bind(this)),FLBuilder.triggerHook("init")},_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(y)}catch(e){FLBuilder.logError(e)}})})},_initSanityChecks:function(){FLBuilderConfig.uploadPath&&"undefined"==typeof FLBuilderLayout&&(url='<a href="'+FLBuilderConfig.uploadUrl+'">wp-admin -> Settings -> Media</a>',FLBuilder.alert('<strong>Critcal Error</strong><p style="font-size:15px;">Please go to '+url+" and make sure uploads folder settings is blank</p>"),y(".fl-builder-alert-close").hide())},_initGlobalErrorHandling:function(){FLBuilderConfig.debug||(window.onerror=function(e,t,i,l,o){return FLBuilder.logGlobalError(e,t,i,l,o),!0})},_initPostLock:function(){void 0!==wp.heartbeat&&(wp.heartbeat.interval(30),wp.heartbeat.enqueue("fl_builder_post_lock",{post_id:FLBuilderConfig.postId}))},_initClassNames:function(){var e=y("html"),t=y("body");e.addClass("fl-builder-edit"),t.addClass("fl-builder"),FLBuilderConfig.simpleUi&&t.addClass("fl-builder-simple"),FLBuilder._contentClass=".fl-builder-content-"+FLBuilderConfig.postId,y(FLBuilder._contentClass).addClass("fl-builder-content-editing")},_initMediaUploader:function(){wp.media.model.settings.post.id=FLBuilderConfig.postId},_initOverflowFix:function(){y(FLBuilder._contentClass).parents().css("overflow","visible")},_initScrollbars:function(){var e=y(".fl-nanoscroller").nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"}).filter(".fl-builder-settings-fields"),t=e.find(".fl-nanoscroller-pane");t.length&&(t=t.get(0).style.display,e=e.find(".fl-nanoscroller-content"),"none"===t?e.removeClass("has-scrollbar"):e.addClass("has-scrollbar"))},_initSortables:function(){var e={appendTo:FLBuilder._contentClass,cursor:"move",cursorAt:{left:85,top:20},distance:1,helper:FLBuilder._blockDragHelper,start:FLBuilder._blockDragStart,sort:FLBuilder._blockDragSort,change:FLBuilder._blockDragChange,stop:FLBuilder._blockDragStop,placeholder:"fl-builder-drop-zone",tolerance:"intersect"},t="",i="",l="",l="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-content":"column"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-col-content":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col:not(.fl-builder-node-loading):not(.fl-node-global) .fl-col-content",i="row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target",t=FLBuilderConfig.nestedColumns?l:"row"==FLBuilderConfig.userTemplateType?FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target":FLBuilder._contentClass+" .fl-row-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-group-drop-target, "+FLBuilder._contentClass+" .fl-row:not(.fl-builder-node-loading) .fl-col-drop-target";y(".fl-builder-rows").sortable(y.extend({},e,{connectWith:t,items:".fl-builder-block-row",stop:FLBuilder._rowDragStop})),y(".fl-builder-row-templates").sortable(y.extend({},e,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-row-template:not(.fl-builder-block-disabled)",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-saved-rows").sortable(y.extend({},e,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:FLBuilder._contentClass+" .fl-row-drop-target",items:".fl-builder-block-saved-row",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-saved-columns").sortable(y.extend({},e,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:i,items:".fl-builder-block-saved-column",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-modules, .fl-builder-widgets").sortable(y.extend({},e,{connectWith:l,items:".fl-builder-block-module:not(.fl-builder-block-disabled)",stop:FLBuilder._moduleDragStop})),y(".fl-builder-module-templates").sortable(y.extend({},e,{connectWith:l,items:".fl-builder-block-module-template",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-builder-saved-modules").sortable(y.extend({},e,{cancel:".fl-builder-node-template-actions, .fl-builder-node-template-edit, .fl-builder-node-template-delete",connectWith:l,items:".fl-builder-block-saved-module",stop:FLBuilder._nodeTemplateDragStop})),y(".fl-row-sortable-proxy").sortable(y.extend({},e,{connectWith:FLBuilder._contentClass+" .fl-row-drop-target",helper:FLBuilder._rowDragHelper,start:FLBuilder._rowDragStart,stop:FLBuilder._rowDragStop})),y(".fl-col-sortable-proxy").sortable(y.extend({},e,{connectWith:l,helper:FLBuilder._colDragHelper,start:FLBuilder._colDragStart,stop:FLBuilder._colDragStop})),y(FLBuilder._contentClass+" .fl-col-content").sortable(y.extend({},e,{connectWith:l,handle:".fl-module-sortable-proxy",helper:FLBuilder._moduleDragHelper,items:".fl-module, .fl-col-group",start:FLBuilder._moduleDragStart,stop:FLBuilder._moduleDragStop})),y(FLBuilder._contentClass+" .fl-row-drop-target").sortable(e),y(FLBuilder._contentClass+" .fl-col-group-drop-target").sortable(e),y(FLBuilder._contentClass+" .fl-col-drop-target").sortable(e)},_refreshSortables:function(){y(".ui-sortable").sortable("refresh")},_initStrings:function(){y.validator.messages.required=FLBuilderStrings.validateRequiredMessage},_bindEvents:function(){var e=FLBuilderLayout._isTouch();$excludedLinks=y(".fl-builder-bar a, .fl-builder--content-library-panel a, .fl-page-nav .nav a"),y("a").not($excludedLinks).on("click",FLBuilder._preventDefault),y(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),y("body").on("click",".fl-builder-content a",FLBuilder._preventDefault),y("body").on("mouseup","button.fl-builder-button",this._buttonMouseUp.bind(this)),y(document).on("heartbeat-tick",FLBuilder._initPostLock),y(window).on("beforeunload",FLBuilder._warnBeforeUnload),y("body").on("click touchend",".fl-builder-has-submenu",FLBuilder._submenuParentClicked),y("body").on("click touchend",".fl-builder-has-submenu a",FLBuilder._submenuChildClicked),y("body").on("mouseenter",".fl-builder-submenu",FLBuilder._submenuMouseenter),y("body").on("mouseleave",".fl-builder-submenu",FLBuilder._submenuMouseleave),y("body").on("mouseenter",".fl-builder-submenu .fl-builder-has-submenu",FLBuilder._submenuNestedParentMouseenter),y(".fl-builder-panel-actions .fl-builder-panel-close").on("click",FLBuilder._closePanel),y(".fl-builder-blocks-section-title").on("click",FLBuilder._blockSectionTitleClicked),y("body").on("mousedown",".fl-builder-node-template-actions",FLBuilder._stopPropagation),y("body").on("mousedown",".fl-builder-node-template-edit",FLBuilder._stopPropagation),y("body").on("mousedown",".fl-builder-node-template-delete",FLBuilder._stopPropagation),y("body").on("click",".fl-builder-node-template-edit",FLBuilder._editNodeTemplateClicked),y("body").on("click",".fl-builder-node-template-delete",FLBuilder._deleteNodeTemplateClicked),y("body").on("mousedown",".fl-builder-block:not(.fl-builder-block-disabled)",FLBuilder._blockDragInit),y("body").on("mouseup",FLBuilder._blockDragCancel),y("body").on("click",".fl-builder-actions .fl-builder-cancel-button",FLBuilder._cancelButtonClicked),y("body").on("click",".fl-builder-save-user-template-button",FLBuilder._saveUserTemplateClicked),y("body").on("click",".fl-builder-duplicate-layout-button",FLBuilder._duplicateLayoutClicked),y("body").on("click",".fl-builder-layout-settings-button",FLBuilder._layoutSettingsClicked),y("body").on("click",".fl-builder-layout-settings .fl-builder-settings-save",FLBuilder._saveLayoutSettingsClicked),y("body").on("click",".fl-builder-layout-settings .fl-builder-settings-cancel",FLBuilder._cancelLayoutSettingsClicked),y("body").on("click",".fl-builder-global-settings-button",FLBuilder._globalSettingsClicked),y("body").on("click",".fl-builder-global-settings .fl-builder-settings-save",FLBuilder._saveGlobalSettingsClicked),y("body").on("click",".fl-builder-global-settings .fl-builder-settings-cancel",FLBuilder._cancelLayoutSettingsClicked),y("body").on("click",".fl-user-template",FLBuilder._userTemplateClicked),y("body").on("click",".fl-user-template-edit",FLBuilder._editUserTemplateClicked),y("body").on("click",".fl-user-template-delete",FLBuilder._deleteUserTemplateClicked),y("body").on("click",".fl-builder-template-replace-button",FLBuilder._templateReplaceClicked),y("body").on("click",".fl-builder-template-append-button",FLBuilder._templateAppendClicked),y("body").on("click",".fl-builder-template-actions .fl-builder-cancel-button",FLBuilder._templateCancelClicked),y("body").on("click",".fl-builder-user-template-settings .fl-builder-settings-save",FLBuilder._saveUserTemplateSettings),y("body").on("click",".fl-builder-help-tour-button",FLBuilder._startHelpTour),y("body").on("click",".fl-builder-knowledge-base-button",FLBuilder._viewKnowledgeBaseClicked),y("body").on("click",".fl-builder-forums-button",FLBuilder._visitForumsClicked),y("body").on("click",".fl-builder-no-tour-button",FLBuilder._noTourButtonClicked),y("body").on("click",".fl-builder-yes-tour-button",FLBuilder._yesTourButtonClicked),y("body").on("click",".fl-builder-alert-close",FLBuilder._alertClose),y("body").on("contextmenu",".fl-block-overlay",FLBuilder._onContextmenu),y("body").on("click touchend",".fl-row-overlay .fl-block-remove",FLBuilder._deleteRowClicked),y("body").on("click touchend",".fl-row-overlay .fl-block-copy",FLBuilder._rowCopyClicked),y("body").on("mousedown",".fl-row-overlay .fl-block-move",FLBuilder._rowDragInit),y("body").on("touchstart",".fl-row-overlay .fl-block-move",FLBuilder._rowDragInitTouch),y("body").on("click touchend",".fl-row-overlay .fl-block-settings",FLBuilder._rowSettingsClicked),y("body").on("click",".fl-builder-row-settings .fl-builder-settings-save",FLBuilder._saveSettings),e?y("body").on("touchend",".fl-row-overlay",FLBuilder._rowSettingsClicked):y("body").on("click",".fl-row-overlay",FLBuilder._rowSettingsClicked),y("body").on("click touchend",".fl-block-col-submenu .fl-block-row-reset",FLBuilder._resetRowWidthClicked),y("body").on("mousedown",".fl-col-overlay .fl-block-move",FLBuilder._colDragInit),y("body").on("touchstart",".fl-col-overlay .fl-block-move",FLBuilder._colDragInitTouch),y("body").on("click touchend",".fl-block-col-copy",FLBuilder._copyColClicked),y("body").on("click touchend",".fl-col-overlay .fl-block-remove",FLBuilder._deleteColClicked),y("body").on("click touchend",".fl-col-overlay .fl-block-settings",FLBuilder._colSettingsClicked),y("body").on("click",".fl-builder-col-settings .fl-builder-settings-save",FLBuilder._saveSettings),e?y("body").on("touchend",".fl-col-overlay",FLBuilder._colSettingsClicked):y("body").on("click",".fl-col-overlay",FLBuilder._colSettingsClicked),y("body").on("mousedown",".fl-block-col-submenu .fl-block-col-move",FLBuilder._colDragInit),y("body").on("touchstart",".fl-block-col-submenu .fl-block-col-move",FLBuilder._colDragInitTouch),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-edit",FLBuilder._colSettingsClicked),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-delete",FLBuilder._deleteColClicked),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-reset",FLBuilder._resetColumnWidthsClicked),y("body").on("mouseenter",".fl-block-col-submenu li",FLBuilder._showColHighlightGuide),y("body").on("mouseleave",".fl-block-col-submenu li",FLBuilder._removeColHighlightGuides),y("body").on("mousedown",".fl-block-col-submenu .fl-block-col-move-parent",FLBuilder._colDragInit),y("body").on("touchstart",".fl-block-col-submenu .fl-block-col-move-parent",FLBuilder._colDragInitTouch),y("body").on("click touchend",".fl-block-col-submenu .fl-block-col-edit-parent",FLBuilder._colSettingsClicked),y("body").on("click touchend",".fl-module-overlay .fl-block-remove",FLBuilder._deleteModuleClicked),y("body").on("click touchend",".fl-module-overlay .fl-block-copy",FLBuilder._moduleCopyClicked),y("body").on("mousedown",".fl-module-overlay .fl-block-move",FLBuilder._moduleDragInit),y("body").on("touchstart",".fl-module-overlay .fl-block-move",FLBuilder._moduleDragInitTouch),y("body").on("click touchend",".fl-module-overlay .fl-block-settings",FLBuilder._moduleSettingsClicked),y("body").on("click",".fl-builder-module-settings .fl-builder-settings-save",FLBuilder._saveModuleClicked),y("body").on("click touchend",".fl-module-overlay .fl-block-col-settings",FLBuilder._colSettingsClicked),e?y("body").on("touchend",".fl-module-overlay",FLBuilder._moduleSettingsClicked):y("body").on("click",".fl-module-overlay",FLBuilder._moduleSettingsClicked),y("body").on("click",".fl-builder-settings-save-as",FLBuilder._showNodeTemplateSettings),y("body").on("click",".fl-builder-node-template-settings .fl-builder-settings-save",FLBuilder._saveNodeTemplate),y("body").on("click",".fl-builder-settings-tabs a",FLBuilder._settingsTabClicked),y("body").on("show",".fl-builder-settings-tabs a",FLBuilder._calculateSettingsTabsOverflow),y("body").on("hide",".fl-builder-settings-tabs a",FLBuilder._calculateSettingsTabsOverflow),y("body").on("click",".fl-builder-settings-cancel",FLBuilder._settingsCancelClicked),y("body").on("click",".fl-builder-settings-tabs-overflow-menu > a",FLBuilder._settingsTabsToOverflowMenuItemClicked.bind(this)),y("body").on("click",".fl-builder-settings-tabs-more",FLBuilder._toggleTabsOverflowMenu.bind(this)),y("body").on("click",".fl-builder-settings-tabs-overflow-click-mask",FLBuilder._hideTabsOverflowMenu.bind(this)),y("body").on("mouseover",".fl-help-tooltip-icon",FLBuilder._showHelpTooltip),y("body").on("mouseout",".fl-help-tooltip-icon",FLBuilder._hideHelpTooltip),y("body").on("click",".fl-builder-field-add",FLBuilder._addFieldClicked),y("body").on("click",".fl-builder-field-copy",FLBuilder._copyFieldClicked),y("body").on("click",".fl-builder-field-delete",FLBuilder._deleteFieldClicked),y("body").on("click",".fl-photo-field .fl-photo-select",FLBuilder._selectSinglePhoto),y("body").on("click",".fl-photo-field .fl-photo-edit",FLBuilder._selectSinglePhoto),y("body").on("click",".fl-photo-field .fl-photo-replace",FLBuilder._selectSinglePhoto),y("body").on("click",".fl-photo-field .fl-photo-remove",FLBuilder._singlePhotoRemoved),y("body").on("click",".fl-multiple-photos-field .fl-multiple-photos-select",FLBuilder._selectMultiplePhotos),y("body").on("click",".fl-multiple-photos-field .fl-multiple-photos-edit",FLBuilder._selectMultiplePhotos),y("body").on("click",".fl-multiple-photos-field .fl-multiple-photos-add",FLBuilder._selectMultiplePhotos),y("body").on("click",".fl-video-field .fl-video-select",FLBuilder._selectSingleVideo),y("body").on("click",".fl-video-field .fl-video-replace",FLBuilder._selectSingleVideo),y("body").on("click",".fl-video-field .fl-video-remove",FLBuilder._singleVideoRemoved),y("body").on("click",".fl-multiple-audios-field .fl-multiple-audios-select",FLBuilder._selectMultipleAudios),y("body").on("click",".fl-multiple-audios-field .fl-multiple-audios-edit",FLBuilder._selectMultipleAudios),y("body").on("click",".fl-multiple-audios-field .fl-multiple-audios-add",FLBuilder._selectMultipleAudios),y("body").on("click",".fl-icon-field .fl-icon-select",FLBuilder._selectIcon),y("body").on("click",".fl-icon-field .fl-icon-replace",FLBuilder._selectIcon),y("body").on("click",".fl-icon-field .fl-icon-remove",FLBuilder._removeIcon),y("body").on("click",".fl-form-field .fl-form-field-edit",FLBuilder._formFieldClicked),y("body").on("click",".fl-form-field-settings .fl-builder-settings-save",FLBuilder._saveFormFieldClicked),y("body").on("click",".fl-layout-field-option",FLBuilder._layoutFieldClicked),y("body").on("click",".fl-link-field-select",FLBuilder._linkFieldSelectClicked),y("body").on("click",".fl-link-field-search-cancel",FLBuilder._linkFieldSelectCancelClicked),y("body").on("change",".fl-loop-data-source-select select[name=data_source]",FLBuilder._loopDataSourceChange),y("body").on("change",".fl-custom-query select[name=post_type]",FLBuilder._customQueryPostTypeChange),y("body").on("change",".fl-text-field-add-value",FLBuilder._textFieldAddValueSelectChange),y("body").on("focus",".fl-field input[type=number]",FLBuilder._onNumberFieldFocus),y("body").on("blur",".fl-field input[type=number]",FLBuilder._onNumberFieldBlur),FLBuilder.addHook("didCompleteAJAX",FLBuilder._refreshSettingsPreviewReference),FLBuilder.addHook("didRenderLayoutComplete",FLBuilder._refreshSettingsPreviewReference)},_unbindEvents:function(){y("a").off("click",FLBuilder._preventDefault),y(".fl-page-nav .nav a").off("click",FLBuilder._headerLinkClicked),y("body").undelegate(".fl-builder-content a","click",FLBuilder._preventDefault)},_rebindEvents:function(){y("a").on("click",FLBuilder._preventDefault),y(".fl-page-nav .nav a").on("click",FLBuilder._headerLinkClicked),y("body").on("click",".fl-builder-content a",FLBuilder._preventDefault)},_bindOverlayEvents:function(){var e=y(FLBuilder._contentClass);e.on("mouseenter touchstart",".fl-row",FLBuilder._rowMouseenter),e.on("mouseleave",".fl-row",FLBuilder._rowMouseleave),e.on("mouseleave",".fl-row-overlay",FLBuilder._rowMouseleave),e.on("mouseenter touchstart",".fl-col",FLBuilder._colMouseenter),e.on("mouseleave",".fl-col",FLBuilder._colMouseleave),e.on("mouseenter touchstart",".fl-module",FLBuilder._moduleMouseenter),e.on("mouseleave",".fl-module",FLBuilder._moduleMouseleave)},_destroyOverlayEvents:function(){var e=y(FLBuilder._contentClass);e.undelegate(".fl-row","mouseenter touchstart",FLBuilder._rowMouseenter),e.undelegate(".fl-row","mouseleave",FLBuilder._rowMouseleave),e.undelegate(".fl-row-overlay","mouseleave",FLBuilder._rowMouseleave),e.undelegate(".fl-col","mouseenter touchstart",FLBuilder._colMouseenter),e.undelegate(".fl-col","mouseleave",FLBuilder._colMouseleave),e.undelegate(".fl-module","mouseenter touchstart",FLBuilder._moduleMouseenter),e.undelegate(".fl-module","mouseleave",FLBuilder._moduleMouseleave)},_onContextmenu:function(e){y(this).hide()},_preventDefault:function(e){e.preventDefault()},_stopPropagation:function(e){e.stopPropagation()},_headerLinkClicked:function(e){var t=y(this).attr("href");this.hash||(e.preventDefault(),FLBuilderConfig.isUserTemplate||(FLBuilder._exitUrl=-1<t.indexOf("?")?t:t+"?fl_builder",FLBuilder.triggerHook("triggerDone")))},_warnBeforeUnload:function(){var e=0<y(".fl-builder-row-settings").length,t=0<y(".fl-builder-col-settings").length,i=0<y(".fl-builder-module-settings").length;if(e||t||i)return FLBuilderStrings.unloadWarning},_upgradeClicked:function(){window.open(FLBuilderConfig.upgradeUrl)},_toggleProModules:function(){var e=y(".fl-builder-blocks-pro-expand"),t=y(".fl-builder-blocks-pro-closed"),i=y(".fl-builder-blocks-pro-open");e.toggleClass("fl-builder-blocks-pro-expand-rotate"),t.length?(t.removeClass("fl-builder-blocks-pro-closed"),t.addClass("fl-builder-blocks-pro-open")):(i.removeClass("fl-builder-blocks-pro-open"),i.addClass("fl-builder-blocks-pro-closed"))},_showProMessage:function(e){var t,i;FLBuilderConfig.lite&&(t=new FLLightbox({className:"fl-builder-pro-lightbox",destroyOnClose:!0}),i=wp.template("fl-pro-lightbox"),t.open(i({feature:e})))},_initTipTips:function(){var e=y(".fl-tip:not(.fl-has-tip)");e.each(function(){var e=y(this);e.addClass("fl-has-tip"),null==e.attr("data-title")&&e.attr("data-title",e.attr("title"))}),FLBuilderLayout._isTouch()||e.tipTip({defaultPosition:"top",delay:300,maxWidth:"auto"})},_hideTipTips:function(){y("#tiptip_holder").stop().hide()},_submenuParentClicked:function(e){var t=y("body"),i=y(this),l=i.find(".fl-builder-submenu");i.hasClass("fl-builder-submenu-open")?(t.removeClass("fl-builder-submenu-open"),i.removeClass("fl-builder-submenu-open"),i.removeClass("fl-builder-submenu-right")):(i.offset().left+l.width()>y(window).width()&&i.addClass("fl-builder-submenu-right"),t.addClass("fl-builder-submenu-open"),i.addClass("fl-builder-submenu-open")),l.closest(".fl-row-overlay").addClass("fl-row-menu-active"),FLBuilder._hideTipTips(),e.preventDefault(),e.stopPropagation()},_submenuChildClicked:function(e){var t=y("body"),i=y(this).parents(".fl-builder-has-submenu");i.parents(".fl-builder-has-submenu").length||(t.removeClass("fl-builder-submenu-open"),i.removeClass("fl-builder-submenu-open"))},_submenuMouseenter:function(e){var t=y(this).data("timeout");void 0!==t&&clearTimeout(t)},_submenuMouseleave:function(e){var t=y("body"),i=y(this),l=setTimeout(function(){t.removeClass("fl-builder-submenu-open"),i.closest(".fl-builder-has-submenu").removeClass("fl-builder-submenu-open")},500);i.closest(".fl-row-overlay").removeClass("fl-row-menu-active"),i.data("timeout",l)},_submenuNestedParentMouseenter:function(e){var t=y(this),i=t.find(".fl-builder-submenu");t.width()+t.offset().left+i.width()>y(window).width()&&t.addClass("fl-builder-submenu-right")},_closeAllSubmenus:function(){y(".fl-builder-submenu-open").removeClass("fl-builder-submenu-open")},_buttonMouseUp:function(e){y(e.currentTarget).blur()},_closePanel:function(){FLBuilder.triggerHook("hideContentPanel")},_showPanel:function(){FLBuilder.triggerHook("showContentPanel")},_togglePanel:function(){FLBuilder.triggerHook("toggleContentPanel")},_blockSectionTitleClicked:function(){var e=y(this).parent();e.hasClass("fl-active")?e.removeClass("fl-active"):(y(".fl-builder-blocks-section").removeClass("fl-active"),e.addClass("fl-active")),FLBuilder._initScrollbars()},_publishLayout:function(e,t){if(FLBuilder._triggerSettingsSave(t,!0)){_.isUndefined(e)&&(e=!0);const i=FL.Builder.data.getLayoutActions();t=FLBuilder._onPublishComplete.bind(FLBuilder,e);i.saveLayout(!0,e,t)}},_publishButtonClicked:function(e){FLBuilder._publishLayout(e)},_onPublishComplete:function(e){e&&(FLBuilderConfig.shouldRefreshOnPublish?FLBuilder._exit():FLBuilder._exitWithoutRefresh()),y("#wp-admin-bar-fl-builder-frontend-edit-link .fl-builder-admin-bar-status-dot").css("color","#6bc373"),FLBuilder.triggerHook("didPublishLayout",{shouldExit:e})},_draftButtonClicked:function(){FLBuilder.showAjaxLoader();const e=FL.Builder.data.getLayoutActions();e.saveDraft()},_discardButtonClicked:function(){if(confirm(FLBuilderStrings.discardMessage)){FLBuilder.showAjaxLoader();const e=FL.Builder.data.getLayoutActions();e.discardDraft()}else FLBuilder.triggerHook("didCancelDiscard")},_cancelButtonClicked:function(){FLBuilder._exitUrl=null,FLBuilder._actionsLightbox.close()},_exit:function(){var e=window.location.href;try{var t=void 0!==window.opener.FLBuilder}catch(e){t=!1}FLBuilderConfig.isUserTemplate&&void 0!==window.opener&&window.opener?(t&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):(e=FLBuilder._exitUrl||(e=(e=e.replace("?fl_builder&","?")).replace("?fl_builder","")).replace("&fl_builder",""),window.location.href=e)},_exitWithoutRefresh:function(){window.location.href;try{var t=void 0!==window.opener.FLBuilder}catch(e){t=!1}FLBuilderConfig.isUserTemplate&&t&&window.opener?(t&&("undefined"==typeof FLBuilderGlobalNodeId?window.opener.FLBuilder._updateLayout():window.opener.FLBuilder._updateNode(FLBuilderGlobalNodeId)),window.close()):FLBuilder.triggerHook("endEditingSession")},_duplicateLayoutClicked:function(){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"duplicate_post"},FLBuilder._duplicateLayoutComplete)},_duplicateLayoutComplete:function(e){var t=FLBuilderConfig.adminUrl;window.location.href=t+"post.php?post="+e+"&action=edit"},_layoutSettingsClicked:function(){FLBuilderSettingsForms.render({id:"layout",className:"fl-builder-layout-settings",settings:FLBuilderSettingsConfig.settings.layout},function(){FLBuilder._layoutSettingsInitCSS()})},_layoutSettingsInitCSS:function(){var e=y(".fl-builder-settings #fl-field-css textarea:not(.ace_text-input)");e.on("change",FLBuilder._layoutSettingsCSSChanged),FLBuilder._layoutSettingsCSSCache=e.val()},_layoutSettingsCSSChanged:function(){FLBuilder._layoutSettingsCSSTimeout&&clearTimeout(FLBuilder._layoutSettingsCSSTimeout),FLBuilder._layoutSettingsCSSTimeout=setTimeout(y.proxy(FLBuilder._layoutSettingsCSSDoChange,this),600)},_layoutSettingsCSSDoChange:function(){var e=y(".fl-builder-settings"),t=y(this);0<t.parents("#fl-field-css").find(".ace_error").length||((e.hasClass("fl-builder-layout-settings")?y("#fl-builder-layout-css"):y("#fl-builder-global-css")).html(t.val()),FLBuilder._layoutSettingsCSSTimeout=null)},_saveLayoutSettingsClicked:function(){for(var e=y(this).closest(".fl-builder-settings").serializeArray(),t={},i=0;i<e.length;i++)t[e[i].name]=e[i].value;FLBuilder.showAjaxLoader(),FLBuilder._lightbox.close(),FLBuilder._layoutSettingsCSSCache=null;const l=FL.Builder.data.getLayoutActions();l.saveLayoutSettings(t)},_cancelLayoutSettingsClicked:function(){(y(".fl-builder-settings").hasClass("fl-builder-layout-settings")?y("#fl-builder-layout-css"):y("#fl-builder-global-css")).html(FLBuilder._layoutSettingsCSSCache),FLBuilder._layoutSettingsCSSCache=null},_saveLayoutSettingsComplete:function(e){FLBuilder.triggerHook("didSaveLayoutSettingsComplete",e),FLBuilder._updateLayout()},_globalSettingsClicked:function(){FLBuilderSettingsForms.render({id:"global",className:"fl-builder-global-settings",settings:FLBuilderSettingsConfig.settings.global},function(){FLBuilder._layoutSettingsInitCSS()})},_saveGlobalSettingsClicked:function(){var e=y(this).closest(".fl-builder-settings"),t=e.validate().form(),e=FLBuilder._getSettings(e);if(t){FLBuilder.showAjaxLoader(),FLBuilder._layoutSettingsCSSCache=null;const i=FL.Builder.data.getLayoutActions();i.saveGlobalSettings(e),FLBuilder._lightbox.close()}},_saveGlobalSettingsComplete:function(e){FLBuilder.triggerHook("didSaveGlobalSettingsComplete",FLBuilder._jsonParse(e)),FLBuilder._updateLayout()},_initTemplateSelector:function(){0<y(FLBuilder._contentClass).find(".fl-row").length||FLBuilder.ContentPanel.show("modules")},_requestTemplateInsert:function(e,t){FLBuilder.layoutHasContent()?0==e?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate(0,!1,t)):(FLBuilder._selectedTemplateId=e,FLBuilder._selectedTemplateType=t,FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(e,!1,t)},_showTemplateActions:function(){var e=[];e[10]={key:"template-replace",label:FLBuilderStrings.templateReplace},e[20]={key:"template-append",label:FLBuilderStrings.templateAppend},FLBuilder._showActionsLightbox({className:"fl-builder-template-actions",title:FLBuilderStrings.actionsLightboxTitle,buttons:e})},_templateReplaceClicked:function(){confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!1,FLBuilder._selectedTemplateType))},_templateAppendClicked:function(){FLBuilder._actionsLightbox.close(),FLBuilder._applyTemplate(FLBuilder._selectedTemplateId,!0,FLBuilder._selectedTemplateType)},_templateCancelClicked:function(){FLBuilder.triggerHook("showContentPanel")},_applyTemplate:function(e,t,i){t=void 0!==t&&t?"1":"0",i=void 0===i?"core":i,FLBuilder._lightbox.close(),FLBuilder.showAjaxLoader();const l=FL.Builder.data.getLayoutActions();l.applyTemplate(e,t,i),FLBuilder.triggerHook("didApplyTemplate")},_applyTemplateComplete:function(e){e=FLBuilder._jsonParse(e);FLBuilder._renderLayout(e.layout),FLBuilder.triggerHook("didApplyTemplateComplete",e.config)},_applyUserTemplateComplete:function(e){e=FLBuilder._jsonParse(e);null!==e.layout_css&&y("#fl-builder-layout-css").html(e.layout_css),FLBuilder._renderLayout(e.layout),FLBuilder.triggerHook("didApplyTemplateComplete",e.config)},_saveUserTemplateClicked:function(){FLBuilderConfig.lite?FLBuilder._showProMessage("Saving Templates"):FLBuilderSettingsForms.render({id:"user_template",className:"fl-builder-user-template-settings",rules:{name:{required:!0}}})},_saveUserTemplateSettings:function(){var e=y(this).closest(".fl-builder-settings"),t=e.validate().form(),e=FLBuilder._getSettings(e);if(t){const i=FL.Builder.data.getLayoutActions();i.saveUserTemplateSettings(e),FLBuilder._lightbox.close()}},_saveUserTemplateSettingsComplete:function(e){e&&(e=FLBuilder._jsonParse(e),FLBuilderConfig.contentItems.template.push(e),FLBuilder.triggerHook("contentItemsChanged"))},_userTemplateClicked:function(){var e=y(this).attr("data-id");0<y(FLBuilder._contentClass).children(".fl-row").length?"blank"==e?confirm(FLBuilderStrings.changeTemplateMessage)&&(FLBuilder._lightbox._node.hide(),FLBuilder._applyTemplate("blank",!1,"user")):(FLBuilder._selectedTemplateId=e,FLBuilder._selectedTemplateType="user",FLBuilder._showTemplateActions(),FLBuilder._lightbox._node.hide()):FLBuilder._applyTemplate(e,!1,"user")},_editUserTemplateClicked:function(e){e.preventDefault(),e.stopPropagation(),window.open(y(this).attr("href"))},_deleteUserTemplateClicked:function(e){var t=y(this).closest(".fl-user-template").attr("data-id"),i=(y(".fl-user-template[data-id="+t+"]"),null),l=null;if(confirm(FLBuilderStrings.deleteTemplate)){const o=FL.Builder.data.getLayoutActions();for(l in o.deleteUserTemplate(t),FLBuilderConfig.contentItems.template)FLBuilderConfig.contentItems.template[l].postId==t&&(i=l);_.isNull(i)||(FLBuilderConfig.contentItems.template.splice(i,1),FLBuilder.triggerHook("contentItemsChanged"))}e.stopPropagation()},_viewKnowledgeBaseClicked:function(){window.open(FLBuilderConfig.help.knowledge_base_url)},_visitForumsClicked:function(){window.open(FLBuilderConfig.help.forums_url)},_showTourOrTemplates:function(){FLBuilderConfig.simpleUi||FLBuilderConfig.isUserTemplate||(FLBuilderConfig.help.tour&&FLBuilderConfig.newUser?FLBuilder._showTourLightbox():FLBuilder._initTemplateSelector())},_doStats:function(){1==FLBuilderConfig.statsEnabled&&(args={"screen-width":screen.width,"screen-height":screen.height,"pixel-ratio":window.devicePixelRatio,"user-agent":window.navigator.userAgent,isrtl:FLBuilderConfig.isRtl},FLBuilder.ajax({action:"save_browser_stats",browser_data:args}))},_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 e=y(FLBuilder._contentClass);FLBuilderConfig.isUserTemplate&&"module"==FLBuilderConfig.userTemplateType||FLBuilderConfig.isUserTemplate&&"column"==FLBuilderConfig.userTemplateType||(e.removeClass("fl-builder-empty"),e.find(".fl-builder-empty-message").remove(),e.find(".fl-row, .fl-builder-block").length||(e.addClass("fl-builder-empty"),e.append('<span class="fl-builder-empty-message">'+FLBuilderStrings.emptyMessage+"</span>"),FLBuilder._initSortables()))},_updateNode:function(e,t){if(y(".fl-node-"+e).length){FLBuilder._showNodeLoading(e);const i=FL.Builder.data.getLayoutActions();i.renderNode(e,t)}},_updateLayout:function(){FLBuilder.showAjaxLoader();const e=FL.Builder.data.getLayoutActions();e.renderLayout(),e.fetchLayout()},_renderLayout:function(e,t){FLBuilder._layout?FLBuilder._layoutQueue.push({data:e,callback:t}):FLBuilder._layout=new FLBuilderAJAXLayout(e,t)},_renderLayoutComplete:function(){var e;FLBuilder._layout&&(FLBuilder._layout._complete(),FLBuilder._layout=null),FLBuilder._layoutQueue.length&&(e=FLBuilder._layoutQueue.shift(),FLBuilder._layout=new FLBuilderAJAXLayout(e.data,e.callback))},_resizeLayout:function(){y(window).trigger("resize"),"undefined"!=typeof YUI&&YUI().use("node-event-simulate",function(e){e.one(window).simulate("resize")})},layoutHasContent:function(){return 0<y(FLBuilder._contentClass).children(".fl-row").length},_initMediaElements:function(){var e={};void 0!==y.fn.mediaelementplayer&&("undefined"!=typeof _wpmejsSettings&&(e.pluginPath=_wpmejsSettings.pluginPath),y(".wp-audio-shortcode, .wp-video-shortcode").not(".mejs-container").mediaelementplayer(e))},_initDropTargets:function(){var e="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",t=y(FLBuilder._contentClass+" .fl-row"),i=null,l=y(FLBuilder._contentClass+" .fl-row"+e).find(".fl-col-group"),o=null,n=null,e="column"==FLBuilderConfig.userTemplateType?y(FLBuilder._contentClass+"> .fl-col").eq(0):null,s=0;for(y(".fl-col-drop-target").remove(),y(".fl-col-group-drop-target").remove(),y(".fl-row-drop-target").remove(),y(FLBuilder._contentClass).append('<div class="fl-drop-target fl-row-drop-target"></div>'),t.prepend('<div class="fl-drop-target fl-row-drop-target"></div>'),t.append('<div class="fl-drop-target fl-drop-target-last fl-row-drop-target fl-row-drop-target-last"></div>');s<t.length;s++)0===(i=t.eq(s)).find(".fl-col-group").length&&i.find(".fl-row-content").prepend('<div class="fl-drop-target fl-col-group-drop-target"></div>');for(e&&0===l.length&&(l=e.find(".fl-col-group"),e.append('<div class="fl-drop-target fl-col-drop-target"></div>'),e.append('<div class="fl-drop-target fl-drop-target-last fl-col-drop-target fl-col-drop-target-last"></div>')),s=0;s<l.length;s++)n=(o=l.eq(s)).find("> .fl-col"),o.hasClass("fl-col-group-nested")||(o.append('<div class="fl-drop-target fl-col-group-drop-target"></div>'),o.append('<div class="fl-drop-target fl-drop-target-last fl-col-group-drop-target fl-col-group-drop-target-last"></div>')),n.append('<div class="fl-drop-target fl-col-drop-target"></div>'),n.append('<div class="fl-drop-target fl-drop-target-last fl-col-drop-target fl-col-drop-target-last"></div>')},_blockDragHelper:function(e,t){var i=t.clone();return t.clone().insertAfter(t),i.addClass("fl-builder-block-drag-helper"),i},_blockDragInit:function(e){var t=y(e.currentTarget),i=null,l=y(window).scrollTop(),o=0;FLBuilder._dragEnabled=!0,FLBuilder._dragInitialScrollTop=l,0<t.closest("[data-node]").length?(i=t.closest("[data-node]")).addClass("fl-node-drag-init"):t.hasClass("fl-builder-block")&&y(".fl-row").each(function(){null===i&&0<y(this).offset().top-l&&(i=y(this))}),null!==i&&(o=i.offset().top-l),FLBuilder._highlightRowsAndColsForDrag(t),FLBuilder._adjustColHeightsForDrag(),FLBuilder._disableGlobalRows(),FLBuilder._disableGlobalCols(),FLBuilder._destroyOverlayEvents(),FLBuilder._initSortables(),y("body").addClass("fl-builder-dragging"),y(".fl-builder-empty-message").hide(),y(".fl-sortable-disabled").removeClass("fl-sortable-disabled"),"touchstart"===e.type||y(e.target).hasClass("fl-sortable-proxy-item ")||FLBuilder._removeAllOverlays(),0<o&&scrollTo(0,i.offset().top-o),FLBuilder.triggerHook("didInitDrag")},_blockDragStart:function(e,t){FLBuilder._dragging=!0,y(".fl-node-drag-init").removeClass("fl-node-drag-init"),FLBuilder.triggerHook("didStartDrag")},_blockDragSort:function(e,t){var i=t.placeholder.parent(),l=FLBuilderStrings.insert;FLBuilder._blockPreventSort(t.item,i)||(i.hasClass("fl-col-content")?l=t.item.hasClass("fl-builder-block-row")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-col-sortable-proxy-item")?FLBuilderStrings.column:t.item.hasClass("fl-builder-block-module")||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"):i.hasClass("fl-col-drop-target")||i.hasClass("fl-col-group-drop-target")?l="":i.hasClass("fl-row-drop-target")&&(l=t.item.hasClass("fl-builder-block-row")||t.item.hasClass("fl-builder-block-saved-row")||t.item.hasClass("fl-builder-block-saved-column")?t.item.find(".fl-builder-block-title").text():t.item.hasClass("fl-row-sortable-proxy-item")?FLBuilderStrings.row:FLBuilderStrings.newRow),t.placeholder.html(l),t.item.hasClass("fl-node-global")||t.item.hasClass("fl-builder-block-global")||y(".fl-node-dragging").hasClass("fl-node-global")?t.placeholder.addClass("fl-builder-drop-zone-global"):t.placeholder.removeClass("fl-builder-drop-zone-global"))},_blockDragChange:function(e,t){t.placeholder.css("opacity","0"),t.placeholder.animate({opacity:"1"},100)},_blockPreventSort:function(e,t){var i=!1,l=e.hasClass("fl-builder-block-row"),o=e.hasClass("fl-col-sortable-proxy-item"),n=t.hasClass("fl-col-content"),s=t.hasClass("fl-col-drop-target"),r=t.parents(".fl-col-group:not(.fl-col-group-nested)"),a=t.parents(".fl-col-group-nested");return(l||o)&&n&&0<a.length&&(i=!0),n&&!t.find(".fl-module, .fl-col").length&&(l&&"1-col"==e.data("cols")||o)&&(i=!0),l&&n&&-1<y.inArray(e.data("cols"),["5-cols","6-cols"])&&(i=!0),o&&0<y(".fl-node-dragging").find(".fl-col-group-nested").length&&(n||s&&0<a.length)&&(i=!0),s&&0<r.length&&0===a.length&&11<r.find("> .fl-col:visible").length&&(i=!0),(i=s&&0<a.length&&3<a.find(".fl-col:visible").length?!0:i)&&t.addClass("fl-sortable-disabled"),i},_blockDragStop:function(e,t){var i=y(window).scrollTop(),t=t.item.parent(),l=null,l=t.hasClass("fl-drop-target")&&t.closest("[data-node]").length?(t=t.closest("[data-node]")).offset().top-i:t.offset().top-i;t.hasClass("fl-builder-blocks-section-content")&&FLBuilder._showPanel(),FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._removeEmptyRowAndColHighlights(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._enableGlobalCols(),FLBuilder._setupEmptyLayout(),y("body").removeClass("fl-builder-dragging"),scrollTo(0,t.offset().top-l),FLBuilder.triggerHook("didStopDrag")},_blockDragCancel:function(){FLBuilder._dragEnabled&&!FLBuilder._dragging&&(FLBuilder._dragEnabled=!1,FLBuilder._dragging=!1,FLBuilder._bindOverlayEvents(),FLBuilder._removeEmptyRowAndColHighlights(),FLBuilder._highlightEmptyCols(),FLBuilder._enableGlobalRows(),FLBuilder._setupEmptyLayout(),y("body").removeClass("fl-builder-dragging"),y(".fl-node-drag-init").removeClass("fl-node-drag-init"),y(".fl-node-dragging").removeClass("fl-node-dragging"),scrollTo(0,FLBuilder._dragInitialScrollTop))},_reorderNode:function(e,t){const i=FL.Builder.getActions();i.moveNode(e,t)},_reorderNodeComplete:function(e){var e=FLBuilder._jsonParse(e),t="didMove"+e.nodeType.charAt(0).toUpperCase()+e.nodeType.slice(1);FLBuilder.triggerHook("didMoveNode",e),FLBuilder.triggerHook(t,e)},_moveNode:function(e,t,i){const l=FL.Builder.getActions();l.moveNode(t,i,e)},_moveNodeComplete:function(e){const t=FLBuilder._jsonParse(e);e="didMove"+t.nodeType.charAt(0).toUpperCase()+t.nodeType.slice(1);FLBuilder.triggerHook("didMoveNode",t),FLBuilder.triggerHook(e,t)},_removeAllOverlays:function(){FLBuilder._removeRowOverlays(),FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._removeModuleOverlays(),FLBuilder._hideTipTips(),FLBuilder._closeAllSubmenus()},_appendOverlay:function(e,t){var i=0,l=null,o=e.hasClass("fl-row")?e.find("> .fl-row-content-wrap"):e.find("> .fl-node-content"),n=parseInt(o.css("margin-top"),10),o=parseInt(o.css("margin-bottom"),10);return e.append(t),e.addClass("fl-block-overlay-active"),FLBuilder._initTipTips(),l=e.find("> .fl-block-overlay"),n<0&&(i=parseInt(l.css("top"),10),i=isNaN(i)?0:i,l.css("top",n+i+"px")),o<0&&(i=parseInt(l.css("bottom"),10),i=isNaN(i)?0:i,l.css("bottom",o+i+"px")),l},_buildOverlayOverflowMenu:function(e){var t,u=e.find(".fl-block-overlay-header"),i=e.find(".fl-block-overlay-actions"),e=e.find(".fl-block-has-rules"),l=i.data("original"),o=null,c=0,n=null,s=0,r=[],a=[],d=[],h=wp.template("fl-overlay-overflow-menu");for(null!=l&&(i.after(l),i.remove(),i=l),i.data("original",i.clone()),t=Math.floor(i[0].getBoundingClientRect().width)-8,o=i.find(" > i, > span.fl-builder-has-submenu"),e.length&&t+e.outerWidth()>u.outerWidth()&&(c+=e.outerWidth());s<o.length;s++)n=o.eq(s),t<(c+=Math.floor(n[0].getBoundingClientRect().width))?(a.push(n),n.remove()):r.push(n);if(0<a.length){for(0<r.length&&a.unshift(r.pop().remove()),s=0;s<a.length;s++)a[s].is(".fl-builder-has-submenu")?d.push({type:"submenu",label:a[s].find(".fa, .fas, .far").data("title"),submenu:a[s].find(".fl-builder-submenu")[0].outerHTML}):d.push({type:"action",label:a[s].data("title"),className:a[s].removeClass(function(e,t){return t.replace(/fl-block-([^\s]+)/,"")}).attr("class")});i.append(h(d)),FLBuilder._initTipTips()}},_removeRowOverlays:function(){y(".fl-row").removeClass("fl-block-overlay-active"),y(".fl-row-overlay").remove(),y(".fl-module").removeClass("fl-module-adjust-height"),y("body").removeClass("fl-builder-row-resizing"),FLBuilder._closeAllSubmenus()},_disableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&y(".fl-row.fl-node-global").addClass("fl-node-disabled")},_disableGlobalCols:function(){"column"!=FLBuilderConfig.userTemplateType&&y(".fl-row:not(.fl-node-global) .fl-col.fl-node-global").addClass("fl-node-disabled")},_enableGlobalRows:function(){"row"!=FLBuilderConfig.userTemplateType&&y(".fl-node-disabled").removeClass("fl-node-disabled")},_enableGlobalCols:function(){"column"!=FLBuilderConfig.userTemplateType&&y(".fl-node-disabled").removeClass("fl-node-disabled")},_rowMouseenter:function(){var e=y(this),t=e.attr("data-node"),i=e.offset().top,l=null,o=null,n=wp.template("fl-row-overlay"),s=FLBuilderResponsiveEditing._mode;e.closest(".fl-builder-node-loading").length||e.hasClass("fl-block-overlay-active")||(FLBuilder._removeRowOverlays(),o=FLBuilder._appendOverlay(e,n({node:t,global:e.hasClass("fl-node-global"),hasRules:e.hasClass("fl-node-has-rules"),rulesTextRow:e.attr("data-rules-text"),rulesTypeRow:e.attr("data-rules-type")})),e.find(".fl-node-content:visible").each(function(){var e=y(this).offset().top;l=null===l||e<l?e:l}),null!==l&&l<i&&o.css("top",l-i-30+"px"),("default"===s&&o.offset().top<43||"default"!==s&&0===e.index())&&o.addClass("fl-row-overlay-header-bottom"),e.find(".fl-module").each(function(){var e=y(this);e.outerHeight(!0)<20&&e.addClass("fl-module-adjust-height")}),FLBuilder._buildOverlayOverflowMenu(o))},_rowMouseleave:function(e){var t=y(e.target),e=y(e.toElement)||y(e.relatedTarget),i=e.hasClass("fl-row-overlay"),l=0<e.closest(".fl-row-overlay").length,o=e.is("#tiptip_holder"),e=0<e.closest("#tiptip_holder").length;t.closest(".fl-block-col-resize").length||i||l||o||e||FLBuilder._removeRowOverlays()},_rowDragHelper:function(){return y('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.row+"</div>")},_rowDragInit:function(e){var t=y(e.target),i=y(".fl-row-sortable-proxy-item");t.closest(".fl-row").addClass("fl-node-dragging"),FLBuilder._blockDragInit(e),e.target=i[0],i.trigger(e)},_rowDragInitTouch:function(t){var e=y(t.target),i=y(".fl-row-sortable-proxy-item"),l=e.closest(".fl-row"),o=!1;e.on("touchmove",function(e){o||(t.currentTarget=l[0],FLBuilder._rowDragInit(t),o=!0),i.trigger(e)}),e.on("touchend",function(e){i.trigger(e)})},_rowDragStart:function(e,t){var i=y(FLBuilder._contentClass+" .fl-row"),l=y(".fl-node-dragging");1===i.length&&y(FLBuilder._contentClass).addClass("fl-builder-empty"),l.hide(),FLBuilder._blockDragStart(e,t)},_rowDragStop:function(e,t){var i=t.item,l=i.parent(),o=null,n=0;if(FLBuilder._blockDragStop(e,t),l.hasClass("fl-builder-rows"))i.remove();else if(l.hasClass("fl-row-sortable-proxy"))y(".fl-node-dragging").removeClass("fl-node-dragging").show();else if(i.hasClass("fl-builder-block")){if(l.hasClass("fl-sortable-disabled"))return i.remove(),void FLBuilder._showPanel();l.hasClass("fl-col-content")?FLBuilder._addColGroup(i.closest(".fl-col").attr("data-node"),i.attr("data-cols"),l.find("> .fl-module, .fl-col-group, .fl-builder-block").index(i)):l.hasClass("fl-col-drop-target")?FLBuilder._addCols(l.closest(".fl-col"),l.hasClass("fl-col-drop-target-last")?"after":"before",i.attr("data-cols"),0<l.closest(".fl-col-group-nested").length):l.hasClass("fl-col-group-drop-target")?(e=i.closest(".fl-col-group"),n=i.closest(".fl-row").find(".fl-row-content > .fl-col-group").index(e),FLBuilder._addColGroup(i.closest(".fl-row").attr("data-node"),i.attr("data-cols"),l.hasClass("fl-drop-target-last")?n+1:n)):(n=(o=i.closest(".fl-row")).length?y(FLBuilder._contentClass+" > .fl-row").index(o):0,FLBuilder._addRow(i.attr("data-cols"),l.hasClass("fl-drop-target-last")?n+1:n)),i.remove(),FLBuilder._showPanel(),y(".fl-builder-modules").siblings(".fl-builder-blocks-section-title").eq(0).trigger("click")}else o=y(".fl-node-dragging").removeClass("fl-node-dragging").show(),l.parent().hasClass("fl-builder-content")||(l.hasClass("fl-drop-target-last")?l.parent().after(o):l.parent().before(o),FLBuilder._reorderNode(o.attr("data-node"),o.index())),y(".fl-row-sortable-proxy").append(t.item)},_addRow:function(e,t,i){FLBuilder._showNodeLoadingPlaceholder(y(FLBuilder._contentClass),t),FLBuilder._newRowPosition=t;const l=FL.Builder.data.getLayoutActions();l.addRow(e,t,i)},_addRowComplete:function(e){var e="object"==typeof e?e:FLBuilder._jsonParse(e),t=y(FLBuilder._contentClass),i=y(e.html).data("node");e.nodeParent=t,e.nodePosition=FLBuilder._newRowPosition,FLBuilder._renderLayout(e,function(){FLBuilder._removeNodeLoadingPlaceholder(y(".fl-node-"+i)),FLBuilder.triggerHook("didAddRow",i)})},_deleteRowClicked:function(e){var t=y(e.target).closest(".fl-row").data("node");FL.Builder.getActions().deleteNode(t),e.stopPropagation()},_deleteRow:function(e){var t=e.attr("data-node");const i=FL.Builder.data.getLayoutActions();i.deleteNode(t),e.empty(),e.remove(),FLBuilder._setupEmptyLayout(),FLBuilder._removeRowOverlays(),FLBuilder.triggerHook("didDeleteRow",t)},_rowCopyClicked:function(e){var t=y(this).closest(".fl-row").attr("data-node");FLBuilder._copyRow(t),e.stopPropagation()},_copyRow:function(t){var e=FLBuilder._getJQueryElement(t),i=e.clone(),l=y(".fl-builder-settings[data-node]"),o=l.attr("data-node"),n=o===t?e:e.find('[data-node="'+o+'"]'),s=null;l.length&&n.length&&(s=FLBuilder._getSettings(l),FLBuilderSettingsConfig.nodes[o]=s),i.addClass("fl-node-"+t+"-clone fl-builder-node-clone"),i.find(".fl-block-overlay").remove(),e.after(i),FLBuilder._showNodeLoading(t+"-clone");const r=i.get(0),a=(r.scrollIntoView({behavior:"smooth",block:"center"}),FL.Builder.data.getLayoutActions());a.copyRow(t,s,o,function(e){e=FLBuilder._jsonParse(e);e.nodeParent=y(FLBuilder._contentClass),e.nodePosition=y(FLBuilder._contentClass+" > .fl-row").index(i),e.duplicatedRow=t,e.onAddNewHTML=function(){i.remove()},FLBuilder._rowCopyComplete(e)})},_rowCopyComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateRow",{newNodeId:e.nodeId,oldNodeId:e.duplicatedRow})})},_rowSettingsClicked:function(e){var t=y(this),i=y(this).closest(".fl-row").attr("data-node"),l=0<t.closest(".fl-block-overlay-global").length;if(t.hasClass("fl-block-settings")||l&&"row"!=FLBuilderConfig.userTemplateType){const o=FL.Builder.data.getLayoutActions();o.displaySettings(i)}e.stopPropagation()},_showRowSettings:function(e,t){let i=null;t&&"row"!=FLBuilderConfig.userTemplateType?FLBuilderConfig.userCanEditGlobalTemplates&&(i=window.open(y('.fl-row[data-node="'+e+'"]').attr("data-template-url")),i.FLBuilderGlobalNodeId=e):FLBuilderSettingsForms.render({id:"row",nodeId:e,className:"fl-builder-row-settings",attrs:'data-node="'+e+'"',buttons:t||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:t?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[e],preview:{type:"row"}},function(){y("#fl-field-width select").on("change",FLBuilder._rowWidthChanged),y("#fl-field-content_width select").on("change",FLBuilder._rowWidthChanged)})},_rowWidthChanged:function(){var e=y("#fl-field-width select").val(),t=y("#fl-field-content_width select").val(),i=y("#fl-field-max_content_width");"fixed"==e||"full"==e&&"fixed"==t?i.show():i.hide()},_resetRowWidthClicked:function(e){var t=y(this).closest(".fl-row"),i=t.attr("data-node"),l=t.find(".fl-row-content"),o=FLBuilderConfig.global.row_width+"px",n=y(".fl-builder-row-settings");t.hasClass("fl-row-fixed-width")&&t.css("max-width",o),l.css("max-width",o),n.length&&n.find("[name=max_content_width]").val("");const s=FL.Builder.data.getLayoutActions();s.resetRowWidth(i),FLBuilder._closeAllSubmenus(),FLBuilder.triggerHook("didResetRowWidth",i),e.stopPropagation()},_highlightEmptyCols:function(){var e="row"==FLBuilderConfig.userTemplateType||"column"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)",e=(y(FLBuilder._contentClass+" .fl-row"+e),y(FLBuilder._contentClass+" .fl-col"+e));e.removeClass("fl-col-highlight").find(".fl-col-content").css("height",""),e.each(function(){var e=y(this);0===e.find(".fl-module, .fl-col").length&&e.addClass("fl-col-highlight")})},_highlightRowsAndColsForDrag:function(e){var t="row"==FLBuilderConfig.userTemplateType?"":":not(.fl-node-global)";"column"==FLBuilderConfig.userTemplateType&&(t=":not(:first)"),y(FLBuilder._contentClass+" .fl-row").addClass("fl-row-highlight"),e&&e.closest(".fl-row-overlay").length||y(FLBuilder._contentClass+" .fl-col"+t).addClass("fl-col-highlight")},_removeEmptyRowAndColHighlights:function(){y(".fl-row-highlight").removeClass("fl-row-highlight"),y(".fl-col-highlight").removeClass("fl-col-highlight")},_adjustColHeightsForDrag:function(){var e="row"==FLBuilderConfig.userTemplateType?"":".fl-row:not(.fl-node-global) ",t="column"==FLBuilderConfig.userTemplateType?"":".fl-col:not(.fl-node-global) ",i=y(FLBuilder._contentClass),l=i.find(e+".fl-col-group:not(.fl-col-group-nested) > "+t+"> .fl-col-content"),o=i.find(e+".fl-col-group-nested "+t+".fl-col-content"),n=0;for(y(".fl-node-drag-init").hide();n<o.length;n++)FLBuilder._adjustColHeightForDrag(o.eq(n));for(n=0;n<l.length;n++)FLBuilder._adjustColHeightForDrag(l.eq(n));y(".fl-node-drag-init").show()},_adjustColHeightForDrag:function(e){e.find(".fl-module:visible, .fl-col:visible").length&&e.height(e.height()+45)},_showColHighlightGuide:function(){var e=y(this),t=e.find("a"),i=e.closest(".fl-col"),l=i.parents(".fl-col"),o=y('<div class="fl-col-highlight-guide"></div>'),e=e.closest(".fl-block-overlay").offset().top;(i=t.hasClass("fl-block-col-move-parent")||t.hasClass("fl-block-col-edit-parent")?l:i).hasClass("fl-col-highlight")||(i.find("> .fl-col-content").append(o),i.addClass("fl-col-has-highlight-guide"),e<(t=o.offset().top)&&o.css("top",e-t+4+"px"))},_removeColHighlightGuides:function(){y(".fl-col-has-highlight-guide").removeClass("fl-col-has-highlight-guide"),y(".fl-col-highlight-guide").remove()},_colMouseenter:function(u){var e=y(this),t=e.closest(".fl-col-group"),c=(t.attr("data-node"),t.hasClass("fl-col-group-has-child-loading")),i=e.hasClass("fl-node-global"),l=0<e.parents(".fl-node-global").length,o=e.closest(".fl-col-group").find("> .fl-col").length,t=t.find("> .fl-col").index(e),h=0===t,t=o===t+1,n=0<e.find(".fl-col").length,s=0<e.find(".fl-module").length,r=e.parents(".fl-col"),a=r.closest(".fl-col-group"),d=0<r.length,f=void 0!==e.data("template-url"),p="column"==FLBuilderConfig.userTemplateType&&!d;numParentCols=d?a.find("> .fl-col").length:0,parentIndex=a.find("> .fl-col").index(r),parentFirst=d&&0===parentIndex,parentLast=d&&numParentCols===parentIndex+1,row=e.closest(".fl-row"),rowIsFixedWidth=!!row.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,userCanResizeRows=FLBuilderConfig.rowResize.userCanResizeRows,hasRules=e.hasClass("fl-node-has-rules"),template=wp.template("fl-col-overlay"),overlay=null,FLBuilderConfig.simpleUi&&!i||i&&l&&s&&!f||i&&"column"==FLBuilderConfig.userTemplateType&&s||!i&&0<e.find(".fl-module").length||0<e.find(".fl-builder-node-loading-placeholder").length||!s&&n||l&&n&&!f||e.closest(".fl-builder-node-loading").length||(e.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),overlay=FLBuilder._appendOverlay(e,template({global:i,groupLoading:c,numCols:o,first:h,last:t,isRootCol:p,hasChildCols:n,hasParentCol:d,parentFirst:parentFirst,parentLast:parentLast,numParentCols:numParentCols,rowIsFixedWidth:rowIsFixedWidth,userCanResizeRows:userCanResizeRows,hasRules:hasRules})),FLBuilder._buildOverlayOverflowMenu(overlay),FLBuilder._initColDragResizing()),y("body").addClass("fl-block-overlay-muted"))},_colMouseleave:function(e){var t=y(this),i=y(e.target),e=y(e.toElement)||y(e.relatedTarget),l=0<t.find(".fl-module").length,t=(t.hasClass("fl-node-global"),void 0!==t.data("template-url")),o=e.is("#tiptip_holder"),e=0<e.closest("#tiptip_holder").length;i.closest(".fl-block-col-resize").length||o||e||l&&!t||(FLBuilder._removeColOverlays(),FLBuilder._removeColHighlightGuides(),FLBuilder._closeAllSubmenus())},_removeColOverlays:function(){var e=y(".fl-col");e.removeClass("fl-block-overlay-active"),e.find(".fl-col-overlay").remove(),y("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_colDragHelper:function(){return y('<div class="fl-builder-block-drag-helper">'+FLBuilderStrings.column+"</div>")},_colDragInit:function(e){var t=y(e.target),i=y(".fl-col-sortable-proxy-item"),l=t.closest(".fl-col");(l=t.hasClass("fl-block-col-move-parent")?l.parents(".fl-col"):l).addClass("fl-node-dragging"),FLBuilder._blockDragInit(e),FLBuilder._removeColHighlightGuides(),e.target=i[0],i.trigger(e)},_colDragInitTouch:function(t){var e=y(t.target),i=y(".fl-col-sortable-proxy-item"),l=e.closest(".fl-col"),o=(e.closest(".fl-module"),!1);e.on("touchmove",function(e){o||(t.currentTarget=l[0],FLBuilder._colDragInit(t),o=!0),i.trigger(e)}),e.on("touchend",function(e){i.trigger(e)})},_colDragStart:function(e,t){var i=y(".fl-node-dragging");i.hide(),FLBuilder._resetColumnWidths(i.parent()),FLBuilder._blockDragStart(e,t)},_colDragStop:function(e,t){FLBuilder._blockDragStop(e,t);var e=y(".fl-node-dragging").removeClass("fl-node-dragging").show(),i=e.attr("data-node"),l=t.item.parent(),o=e.parent(),n=o.attr("data-node");newGroup=l.closest(".fl-col-group"),newGroupId=newGroup.attr("data-node"),newRow=l.closest(".fl-row"),position=0,l.closest('[data-node="'+i+'"]').length||l.hasClass("fl-sortable-disabled")||l.hasClass("fl-col-sortable-proxy")?FLBuilder._resetColumnWidths(o):l.hasClass("fl-col-content")?(e.remove(),0===o.find(".fl-col").length&&o.remove(),position=l.find("> .fl-module, .fl-col-group, .fl-col-sortable-proxy-item").index(t.item),FLBuilder._addColGroup(l.closest(".fl-col").attr("data-node"),i,position)):l.hasClass("fl-col-drop-target")?(l.hasClass("fl-col-drop-target-last")?l.parent().after(e):l.parent().before(e),FLBuilder._resetColumnWidths(newGroup),FL.Builder.data.getLayoutActions(),n==newGroupId?FL.Builder.getActions().moveNode(i,e.index()):FL.Builder.getActions().moveNode(i,e.index(),newGroupId,[n,newGroupId]),FLBuilder._resizeLayout()):l.hasClass("fl-col-group-drop-target")?(e.remove(),0===o.find(".fl-col").length&&o.remove(),position=newRow.find(".fl-row-content > .fl-col-group").index(newGroup),position=l.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addColGroup(newRow.attr("data-node"),i,position)):l.hasClass("fl-row-drop-target")&&(e.remove(),position=l.closest(".fl-builder-content").find(".fl-row").index(newRow),position=l.hasClass("fl-drop-target-last")?position+1:position,FLBuilder._addRow(i,position)),0===o.find(".fl-col").length&&o.remove(),y(".fl-col-sortable-proxy").append(t.item),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._closeAllSubmenus()},_colSettingsClicked:function(e){var t=y(this),i=t.closest(".fl-col"),l=i.attr("data-node"),o=0<t.parent().find("ul.fl-builder-submenu").length,n=0<t.closest(".fl-block-overlay-global").length;t.closest(".fl-block-overlay-global").hasClass("fl-col-overlay"),"column"!=FLBuilderConfig.userTemplateType&&i.attr("data-template-url");if(!FLBuilder._colResizing&&(!n||FLBuilderConfig.userCanEditGlobalTemplates)&&(!o||t.hasClass("fl-col-overlay"))){t.hasClass("fl-block-col-edit-parent")&&(l=i.parents(".fl-col").attr("data-node"));const s=FL.Builder.data.getLayoutActions();s.displaySettings(l),e.stopPropagation()}},_showColSettings:function(t,e,i){if(e&&i&&"row"!==FLBuilderConfig.userTemplateType){if(FLBuilderConfig.userCanEditGlobalTemplates){let e=window.open(y('.fl-col[data-node="'+t+'"]').attr("data-template-url"));e.FLBuilderGlobalNodeId=t}}else FLBuilderSettingsForms.render({id:"col",nodeId:t,className:"fl-builder-col-settings",attrs:'data-node="'+t+'"',buttons:e||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:e?[FLBuilderStrings.global]:[],settings:FLBuilderSettingsConfig.nodes[t],preview:{type:"col"}},function(){0===y(".fl-col.fl-node-"+t).siblings(".fl-col").length&&y("#fl-field-equal_height, #fl-field-content_alignment").hide()})},_copyColClicked:function(e){var t=y(this).closest(".fl-col").attr("data-node");FLBuilder._copyColumn(t),e.stopPropagation()},_copyColumn:function(t){var e=FLBuilder._getJQueryElement(t),i=e.clone(),l=e.parent(),o=y(".fl-builder-settings[data-node]"),n=o.attr("data-node"),s=n===t?e:e.find('[data-node="'+n+'"]'),r=null;o.length&&s.length&&(r=FLBuilder._getSettings(o),FLBuilderSettingsConfig.nodes[n]=r),i.addClass("fl-node-"+t+"-clone fl-builder-node-clone"),i.find(".fl-block-overlay").remove(),e.after(i),FLBuilder._showNodeLoading(t+"-clone"),FLBuilder._resetColumnWidths(l);const a=FL.Builder.data.getLayoutActions();a.copyColumn(t,r,n,function(e){e=FLBuilder._jsonParse(e);e.nodeParent=l,e.nodePosition=i.index(),e.duplicatedColumn=t,e.onAddNewHTML=function(){i.remove()},FLBuilder._copyColComplete(e)})},_copyColComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._resetColumnWidths(e.nodeParent),FLBuilder.triggerHook("didDuplicateColumn",{newNodeId:e.nodeId,oldNodeId:e.duplicatedColumn})})},_deleteColClicked:function(e){var t=y(e.target).closest(".fl-col").data("node");FL.Builder.getActions().deleteNode(t),e.stopPropagation()},_getColToDelete:function(e){var t=e.closest(".fl-col-group"),i=e.parents(".fl-col"),l=0<i.length,o=i.find("> .fl-col-content > .fl-module, > .fl-col-content > .fl-col-group"),n=e.siblings(".fl-col");return l&&1===o.length&&(0===n.length?e=i:1!==n.length||n.find(".fl-module").length||(e=t)),e},_deleteCol:function(e){var t=e.attr("data-node"),i=e.closest(".fl-row"),l=e.closest(".fl-col-group"),o=0;if(e.remove(),rowCols=i.find(".fl-row-content > .fl-col-group > .fl-col"),groupCols=l.find(" > .fl-col"),0===rowCols.length&&"row"!=FLBuilderConfig.userTemplateType&&"column"!=FLBuilderConfig.userTemplateType)FLBuilder._deleteRow(i);else{0===groupCols.length?l.remove():(o=6===groupCols.length?16.65:7===groupCols.length?14.28:Math.round(100/groupCols.length*100)/100,groupCols.css("width",o+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:groupCols}));const n=FL.Builder.data.getLayoutActions();n.deleteColumn(t,o),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder.triggerHook("didDeleteColumn",t)}},_addCols:function(e,t,i,l,o){var n=e.closest(".fl-col-group"),s=n.find(".fl-col").index(e),e=e.attr("data-node");i=void 0===i?"1-col":i,l=(l=void 0!==l&&l)?1:0,"after"==t&&s++,FLBuilder._showNodeLoadingPlaceholder(n,s),FLBuilder._removeAllOverlays();const r=FL.Builder.data.getLayoutActions();r.addColumns(e,t,i,l,o)},_addColsComplete:function(e){var t="object"==typeof e?e:FLBuilder._jsonParse(e);t.nodeParent=FLBuilder._newColParent,t.nodePosition=FLBuilder._newColPosition,FLBuilder._renderLayout(t,function(){FLBuilder._removeNodeLoadingPlaceholder(y(".fl-node-"+t.nodeId)),FLBuilder.triggerHook("didAddColumn",t.nodeId),FLBuilder.triggerHook("didResetColumnWidths",{cols:y(".fl-node-"+t.nodeId).find("> .fl-col")})})},_addColGroup:function(e,t,i,l){var o=y(".fl-node-"+e);FLBuilder._newColGroupPosition=i,o.hasClass("fl-col")?FLBuilder._newColGroupParent=o.find(" > .fl-col-content"):FLBuilder._newColGroupParent=o.find(".fl-row-content"),FLBuilder._showNodeLoadingPlaceholder(FLBuilder._newColGroupParent,i);const n=FL.Builder.data.getLayoutActions();n.addColumnGroup(e,t,i,l)},_addColGroupComplete:function(e){var t=FLBuilder._jsonParse(e),e=y(t.html),i=e.data("node");e.find(".fl-col").data("node");t.nodeParent=FLBuilder._newColGroupParent,t.nodePosition=FLBuilder._newColGroupPosition,FLBuilder._renderLayout(t,function(){t.nodeParent.hasClass("fl-col-content")&&t.nodeParent.parents(".fl-col").addClass("fl-col-has-cols"),FLBuilder._removeNodeLoadingPlaceholder(y(".fl-node-"+i)),FLBuilder.triggerHook("didAddColumnGroup",i)})},_initColDragResizing:function(){y(".fl-block-col-resize").not(".fl-block-row-resize").draggable({axis:"x",start:FLBuilder._colDragResizeStart,drag:FLBuilder._colDragResize,stop:FLBuilder._colDragResizeStop})},_colDragResizeStart:function(u,c){for(var e=y(c.helper),t="",i=e.hasClass("fl-block-col-resize-parent"),l=i?e.closest(".fl-col").parents(".fl-col"):null,h=i?l.parents(".fl-col-group"):e.closest(".fl-col-group"),o=h.find("> .fl-col"),n=i?l:e.closest(".fl-col"),i=n.attr("data-node"),l=y("[data-node="+i+"] #fl-field-size input"),s=null,f=100,r=0,i=null,a=null,d=(s=e.hasClass("fl-block-col-resize-e")?(t="e",n.nextAll(".fl-col").first()):(t="w",n.prevAll(".fl-col").first())).attr("data-node"),d=y("[data-node="+d+"] #fl-field-size input");r<o.length;r++)o.eq(r).data("node")!=n.data("node")&&o.eq(r).data("node")!=s.data("node")&&(f-=parseFloat(o.eq(r)[0].style.width));l.length?(i=l,a="col"):d.length&&(i=d,a="sibling"),FLBuilder._colResizeData={handle:e,feedbackLeft:e.find(".fl-block-col-resize-feedback-left"),feedbackRight:e.find(".fl-block-col-resize-feedback-right"),direction:t,groupWidth:h.outerWidth(),col:n,id:n.attr("data-node"),colWidth:parseFloat(n[0].style.width)/100,sibling:s,siblingId:s.attr("data-node"),offset:c.position.left,availWidth:f,setting:i,settingType:a,layoutActions:FL.Builder.data.getLayoutActions()},FLBuilder._colResizing=!0,y("body").addClass("fl-builder-col-resizing"),FLBuilder._closePanel(),FLBuilder._destroyOverlayEvents(),FLBuilder.triggerHook("col-resize-start")},_colDragResize:function(e,t){var i=FLBuilder._colResizeData,l=FLBuilderConfig.isRtl?"w":"e",o=i.handle.closest(".fl-block-overlay"),t=(i.offset-t.position.left)/i.groupWidth,t=l==i.direction?100*(i.colWidth-t):100*(i.colWidth+t),n=Math.round(100*t)/100,t=i.availWidth-t,s=Math.round(100*t)/100,t=Math.round(100*(i.availWidth-8))/100;n<8?(n=8,s=t):s<8&&(n=t,s=8),requestAnimationFrame(()=>{l==i.direction?(i.feedbackLeft.html(n.toFixed(1)+"%").show(),i.feedbackRight.html(s.toFixed(1)+"%").show()):(i.feedbackLeft.html(s.toFixed(1)+"%").show(),i.feedbackRight.html(n.toFixed(1)+"%").show()),i.col.css("width",n+"%"),i.sibling.css("width",s+"%"),i.setting&&("col"===i.settingType?i.setting.val(parseFloat(i.col[0].style.width)):"sibling"===i.settingType&&i.setting.val(parseFloat(i.sibling[0].style.width))),i.layoutActions.resizeColumn(i.id,n,i.siblingId,s,!1)}),FLBuilder._buildOverlayOverflowMenu(o),FLBuilder.triggerHook("col-resize-drag")},_colDragResizeStop:function(e,t){var i=FLBuilder._colResizeData,l=FLBuilder._colResizeData.handle.closest(".fl-block-overlay"),o=i.id,n=parseFloat(i.col[0].style.width),s=i.sibling.data("node"),i=parseFloat(i.sibling[0].style.width);FLBuilder._colResizeData.feedbackLeft.hide(),FLBuilder._colResizeData.feedbackRight.hide();const r=FL.Builder.data.getLayoutActions();r.resizeColumn(o,n,s,i),FLBuilder._buildOverlayOverflowMenu(l),FLBuilder._colResizeData=null,y("body").removeClass("fl-builder-col-resizing"),FLBuilder._bindOverlayEvents(),setTimeout(function(){FLBuilder._colResizing=!1},50),FLBuilder.triggerHook("col-resize-stop"),FLBuilder.triggerHook("didResizeColumn",{colId:o,colWidth:n,siblingId:s,siblingWidth:i})},_resetColumnWidthsClicked:function(e){var t=y(this),i=!!t.closest(".fl-row-overlay").length,l=null,o=[],n=null,s=0,r=y(".fl-builder-col-settings");(i?t.closest(".fl-row").find(".fl-row-content > .fl-col-group"):t.parents(".fl-col-group").last()).each(function(){for(l=y(this),n=l.find(".fl-col-group"),o.push(l.data("node")),FLBuilder._resetColumnWidths(l),s=0;s<n.length;s++)FLBuilder._resetColumnWidths(n.eq(s)),o.push(n.eq(s).data("node"))}),r.length&&(i=y(".fl-node-"+r.attr("data-node")),r.find("#fl-field-size input").val(parseFloat(i[0].style.width)));const a=FL.Builder.data.getLayoutActions();a.resetColWidths(o),FLBuilder.triggerHook("col-reset-widths"),FLBuilder._closeAllSubmenus(),e.stopPropagation()},_resetColumnWidths:function(e){var t=e,e=(t=!(e instanceof jQuery)?y(e):t).find(" > .fl-col:visible"),t=0,t=6===e.length?16.65:7===e.length?14.28:Math.round(100/e.length*100)/100;e.css("width",t+"%"),FLBuilder.triggerHook("didResetColumnWidths",{cols:e})},_moduleMouseenter:function(u){var e=y(this),c=(e.attr("data-node"),e.attr("data-name")),t=e.hasClass("fl-node-global"),i=0<e.parents(".fl-node-global").length,h=e.parents(".fl-col-group").last().hasClass("fl-col-group-has-child-loading"),l=e.closest(".fl-col-group").find("> .fl-col").length,o=e.closest(".fl-col"),f=0===o.index(),p=l===o.index()+1,n=o.parents(".fl-col"),s=0<n.length,r=s?n.closest(".fl-col-group").find("> .fl-col").length:0,g=s&&0===n.index(),n=s&&r===n.index()+1,m="column"==FLBuilderConfig.userTemplateType&&!s,a=e.closest(".fl-row"),d=a.hasClass("fl-node-global"),a=!!a.find(".fl-row-fixed-width").addBack(".fl-row-fixed-width").length,b=FLBuilderConfig.rowResize.userCanResizeRows,v=e.hasClass("fl-node-has-rules"),_=e.attr("data-rules-text"),L=e.attr("data-rules-type"),F=o.attr("data-rules-text"),w=o.attr("data-rules-type"),o=o.hasClass("fl-node-has-rules"),C=wp.template("fl-module-overlay");t&&i&&"row"!=FLBuilderConfig.userTemplateType&&d||t&&i&&"column"!=FLBuilderConfig.userTemplateType&&!d||e.closest(".fl-builder-node-loading").length||e.find(".fl-inline-editor:visible").length||(e.hasClass("fl-block-overlay-active")||(FLBuilder._removeColOverlays(),FLBuilder._removeModuleOverlays(),i=FLBuilder._appendOverlay(e,C({global:t,moduleName:c,groupLoading:h,numCols:l,colFirst:f,colLast:p,isRootCol:m,hasParentCol:s,numParentCols:r,parentFirst:g,parentLast:n,rowIsFixedWidth:a,userCanResizeRows:b,hasRules:v,rulesTextModule:_,rulesTypeModule:L,rulesTextCol:F,rulesTypeCol:w,colHasRules:o})),FLBuilder._buildOverlayOverflowMenu(i),FLBuilder._initColDragResizing()),y("body").addClass("fl-block-overlay-muted"))},_moduleMouseleave:function(e){y(this);var t=y(e.target),e=y(e.toElement)||y(e.relatedTarget),i=e.is("#tiptip_holder"),e=0<e.closest("#tiptip_holder").length;t.closest(".fl-block-col-resize").length||i||e||(FLBuilder._removeModuleOverlays(),FLBuilder._removeColHighlightGuides())},_removeModuleOverlays:function(){var e=y(".fl-module");e.removeClass("fl-block-overlay-active"),e.find(".fl-module-overlay").remove(),y("body").removeClass("fl-block-overlay-muted"),FLBuilder._closeAllSubmenus()},_moduleDragHelper:function(e,t){return y('<div class="fl-builder-block-drag-helper">'+t.attr("data-name")+"</div>")},_moduleDragInit:function(e){var t=y(e.target).closest(".fl-module");FLBuilder._blockDragInit(e),t.append('<div class="fl-module-sortable-proxy"></div>'),e.target=t.find(".fl-module-sortable-proxy")[0],t.trigger(e)},_moduleDragInitTouch:function(t){var e=y(t.target),i=e.closest(".fl-module"),l=!1;e.on("touchmove",function(e){l||(t.currentTarget=i[0],FLBuilder._moduleDragInit(t),l=!0),e.target=i.find(".fl-module-sortable-proxy")[0],y(e.target).trigger(e)}),e.on("touchend",function(e){e.target=i.find(".fl-module-sortable-proxy")[0],y(e.target).trigger(e),e.stopPropagation(),i.find(".fl-module-sortable-proxy").remove()})},_moduleDragStart:function(e,t){y(t.item).data("original-position",t.item.index()),FLBuilder._removeRowOverlays(),FLBuilder._blockDragStart(e,t)},_moduleDragStop:function(e,t){FLBuilder._blockDragStop(e,t);var i=t.item,l=i.parent(),o=null,n=0,s=0;if(y(".fl-module-sortable-proxy").remove(),l.hasClass("fl-builder-modules")||l.hasClass("fl-builder-widgets"))i.remove();else{if(i.hasClass("fl-builder-block")){if(l.hasClass("fl-sortable-disabled"))return i.remove(),void FLBuilder._showPanel();l.hasClass("fl-row-drop-target")?(l=i.closest(".fl-builder-content"),s=0,o=i.closest(".fl-row"),n=l.find(".fl-row").index(o)):l.hasClass("fl-col-group-drop-target")?(s=(l=i.closest(".fl-row-content")).closest(".fl-row").attr("data-node"),o=i.closest(".fl-col-group"),n=l.find(" > .fl-col-group").index(o)):l.hasClass("fl-col-drop-target")?(s=(l=i.closest(".fl-col-group")).attr("data-node"),o=i.closest(".fl-col"),n=l.find(" > .fl-col").index(o)):(n=l.find("> .fl-module, .fl-col-group, .fl-builder-block").index(i),s=i.closest(".fl-col").attr("data-node")),i.closest(".fl-drop-target-last").length&&(n+=1),FLBuilder._addModule(l,s,i.attr("data-type"),n,i.attr("data-widget"),i.attr("data-alias")),i.remove()}else{if(l.hasClass("fl-sortable-disabled"))return y(e.target).append(t.item),y(e.target).children().eq(t.item.data("original-position")).before(t.item),void FLBuilder._highlightEmptyCols();l.hasClass("fl-row-drop-target")?(o=i.closest(".fl-row"),n=i.closest(".fl-builder-content").children(".fl-row").index(o),n=i.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addRow("1-col",n,i.attr("data-node")),i.remove()):l.hasClass("fl-col-group-drop-target")?(o=i.closest(".fl-col-group"),n=i.closest(".fl-row-content ").find(" > .fl-col-group").index(o),n=i.closest(".fl-drop-target-last").length?n+1:n,FLBuilder._addColGroup(i.closest(".fl-row").attr("data-node"),"1-col",n,i.attr("data-node")),i.remove()):l.hasClass("fl-col-drop-target")?(o=i.closest(".fl-col"),n=i.closest(".fl-col-drop-target-last").length?"after":"before",FLBuilder._addCols(o,n,"1-col",0<i.closest(".fl-col-group-nested").length,i.attr("data-node")),i.remove()):FLBuilder._reorderModule(i)}FLBuilder._resizeLayout()}},_reorderModule:function(e){var t=e.closest(".fl-col").attr("data-node"),i=e.attr("data-parent"),l=e.attr("data-node"),o=e.index();t==i?FLBuilder._reorderNode(l,o):(e.attr("data-parent",t),FLBuilder._moveNode(t,l,o))},_deleteModuleClicked:function(e){var t=y(e.target).closest(".fl-module").data("node");FL.Builder.getActions().deleteNode(t),e.stopPropagation()},_getJQueryElement:function(e){return y(FLBuilder._contentClass).find('[data-node="'+e+'"]')},_needsDeleteConfirmation:function(e){if("module"===e.type)return!0;const t=FLBuilder._getJQueryElement(e.node);return 0<t.find(".fl-module").length},_deleteModule:function(e){var t=e.closest(".fl-row"),i=e.attr("data-node");const l=FL.Builder.data.getLayoutActions();l.deleteNode(i),e.empty(),e.remove(),t.removeClass("fl-block-overlay-muted"),FLBuilder._highlightEmptyCols(),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didDeleteModule",{nodeId:i,moduleType:e.attr("data-type")})},_moduleCopyClicked:function(e){var t=y(this).closest(".fl-module").data("node");const i=FL.Builder.getActions();i.copyNode(t),e.stopPropagation()},_copyModule:function(t){var e=FLBuilder._getJQueryElement(t),i=e.clone(),l=e.parent(),o=y(".fl-builder-module-settings[data-node="+t+"]"),n={};o.length&&(n=FLBuilder._getSettings(o),FLBuilderSettingsConfig.nodes[t]=n),i.addClass("fl-node-"+t+"-clone fl-builder-node-clone"),i.find(".fl-block-overlay").remove(),e.after(i),FLBuilder._showNodeLoading(t+"-clone");const s=i.get(0),r=(s.scrollIntoView({behavior:"smooth",block:"center"}),FL.Builder.data.getLayoutActions());r.copyModule(t,n,function(e){e=FLBuilder._jsonParse(e);e.nodeParent=l,e.nodePosition=l.find(" > .fl-col-group, > .fl-module").index(i),e.duplicatedModule=t,e.onAddNewHTML=function(){i.remove()},FLBuilder._moduleCopyComplete(e)})},_moduleCopyComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder.triggerHook("didDuplicateModule",{newNodeId:e.nodeId,oldNodeId:e.duplicatedModule,moduleType:e.moduleType})})},_moduleSettingsClicked:function(e){var t=y(this),i=(t.closest(".fl-module").attr("data-type"),t.closest(".fl-module").attr("data-node")),t=(t.closest(".fl-col").attr("data-node"),0<t.closest(".fl-block-overlay-global").length);if(e.stopPropagation(),!FLBuilder._colResizing&&(!t||FLBuilderConfig.userCanEditGlobalTemplates)){const l=FL.Builder.getActions();l.openSettings(i)}},_showModuleSettings:function(e,t){var i,l,o;FLBuilderSettingsConfig.modules&&(i=FLBuilderSettingsConfig.modules[e.type],l=e.settings||FLBuilderSettingsConfig.nodes[e.nodeId],o=y("head"),-1===y.inArray(e.type,FLBuilder._loadedModuleAssets)&&(""!==i.assets.css&&o.append(i.assets.css),""!==i.assets.js&&o.append(i.assets.js),FLBuilder._loadedModuleAssets.push(e.type)),FLBuilderSettingsForms.render({type:"module",id:e.type,nodeId:e.nodeId,className:"fl-builder-module-settings fl-builder-"+e.type+"-settings",attrs:'data-node="'+e.nodeId+'" data-parent="'+e.parentId+'" data-type="'+e.type+'"',buttons:e.global||FLBuilderConfig.lite||FLBuilderConfig.simpleUi?[]:["save-as"],badges:e.global?[FLBuilderStrings.global]:[],settings:l,legacy:e.legacy,helper:FLBuilder._moduleHelpers[e.type],rules:FLBuilder._moduleHelpers[e.type]?FLBuilder._moduleHelpers[e.type].rules:null,messages:FLBuilder._moduleHelpers[e.type]?FLBuilder._moduleHelpers[e.type].messages:null,hide:!(FLBuilderConfig.userCanEditGlobalTemplates||!e.global),preview:{type:"module",layout:e.layout,callback:function(){FLBuilder.triggerHook("didAddModule",{nodeId:e.nodeId,moduleType:l.type})}}},t))},_saveModuleClicked:function(){var e=y(this).closest(".fl-builder-settings"),t=e.attr("data-type"),t=(e.attr("data-node"),FLBuilder._moduleHelpers[t]),i=!0;void 0!==t&&(e.find("label.error").remove(),e.validate().hideErrors(),i=(i=e.validate().form())&&t.submit()),i?FLBuilder._saveSettings():FLBuilder._toggleSettingsTabErrors()},_addModule:function(e,t,i,l,o,n){FLBuilder._showNodeLoadingPlaceholder(e,l),e.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=e,FLBuilder._newModulePosition=l);const s=FL.Builder.data.getLayoutActions();s.addModule(i,t,l,{widget:void 0===o?"":o,alias:void 0===n?"":n,nodePreview:1})},_addModuleComplete:function(e){e=FLBuilder._jsonParse(e);e.layout&&(FLBuilder._newModuleParent&&FLBuilder._newModuleParent.find(".fl-builder-node-loading-placeholder").hide(),e.layout.nodeParent=FLBuilder._newModuleParent,e.layout.nodePosition=FLBuilder._newModulePosition),e.settings||(e.settings=FLBuilderSettingsConfig.defaults.modules[e.type]),y("form.fl-builder-settings").length||e.global?e.layout&&FLBuilder._renderLayout(e.layout):FLBuilder._showModuleSettings(e,function(){y(".fl-builder-module-settings").data("new-module","1")})},registerModuleHelper:function(e,t){FLBuilder._moduleHelpers[e]=y.extend({},{rules:{},init:function(){},submit:function(){return!0},preview:function(){}},t)},_registerModuleHelper:function(e,t){FLBuilder.registerModuleHelper(e,t)},_showNodeTemplateSettings:function(e){var t=y(".fl-builder-settings-lightbox .fl-builder-settings"),i=t.attr("data-node"),l=FLBuilderStrings.saveModule;if(t.hasClass("fl-builder-row-settings")?l=FLBuilderStrings.saveRow:t.hasClass("fl-builder-col-settings")&&(l=FLBuilderStrings.saveColumn),!FLBuilder._triggerSettingsSave(!1,!1,!1))return!1;FLBuilderSettingsForms.render({id:"node_template",nodeId:i,title:l,attrs:'data-node="'+i+'"',className:"fl-builder-node-template-settings",rules:{name:{required:!0}}},function(){FLBuilderConfig.userCanEditGlobalTemplates||y("#fl-field-global").hide()})},_saveNodeTemplate:function(){var e=y(".fl-builder-node-template-settings"),t=e.attr("data-node");if(e.validate().form()){FLBuilder._showNodeLoading(t);const i=FL.Builder.data.getLayoutActions();i.saveNodeTemplate(t,FLBuilder._getSettings(e)),FLBuilder._lightbox.close()}},_saveNodeTemplateComplete:function(e){var t,i=FLBuilder._jsonParse(e),l=y(".fl-builder-saved-"+i.type+"s"),o=l.find(".fl-builder-block"),n=null,s=i.name.toLowerCase(),r=0,a=wp.template("fl-node-template-block"),e={name:i.name,isGlobal:i.global,content:i.type,id:i.id,postID:i.postID,kind:"template",type:"user",link:i.link,category:{uncategorized:FLBuilderStrings.uncategorized}};if(FLBuilderConfig.contentItems.template.push(e),FLBuilder.triggerHook("contentItemsChanged"),i.layout&&(FLBuilder._renderLayout(i.layout),FLBuilder.triggerHook("didSaveGlobalNodeTemplate",i.config)),0===o.length)l.append(a(i));else for(;r<o.length;r++){if(t=(n=o.eq(r)).text().toLowerCase().trim(),0===r&&s<t){l.prepend(a(i));break}if(s<t){n.before(a(i));break}if(o.length-1===r){l.append(a(i));break}}l.find(".fl-builder-block-no-node-templates").remove()},_nodeTemplateDragStop:function(t,i){FLBuilder._blockDragStop(t,i);var t=i.item,i=t.parent(),l=null,o=0,n=null,s="",r=null;if(i.hasClass("fl-builder-blocks-section-content"))t.remove();else{if(t.hasClass("fl-builder-block-saved-row")||t.hasClass("fl-builder-block-row-template"))o=(n=t.closest(".fl-row")).length?y(FLBuilder._contentClass+" .fl-row").index(n):0,o=i.hasClass("fl-drop-target-last")?o+1:o,l=null,s="render_new_row_template",r=FLBuilder._addRowComplete,FLBuilder._newRowPosition=o,FLBuilder._showNodeLoadingPlaceholder(y(FLBuilder._contentClass),o);else if(t.hasClass("fl-builder-block-saved-column")){if(n=t.closest(".fl-col"),colGroup=i.closest(".fl-col-group"),colGroupId=colGroup.attr("data-node"),s="render_new_col_template",r=FLBuilder._addColsComplete,i.hasClass("fl-sortable-disabled"))return t.remove(),void FLBuilder._showPanel();i.hasClass("fl-row-drop-target")?(n=t.closest(".fl-row"),l=0,i=y(FLBuilder._contentClass),o=n.length?i.find(".fl-row").index(n):0):i.hasClass("fl-col-group-drop-target")?(i=t.closest(".fl-row-content"),l=t.closest(".fl-row").attr("data-node"),o=t.closest(".fl-row").find(".fl-row-content > .fl-col-group").index(t.closest(".fl-col-group"))):i.hasClass("fl-col-drop-target")&&(o=(i=t.closest(".fl-col-group")).children(".fl-col").index(t.closest(".fl-col")),l=i.attr("data-node")),t.closest(".fl-drop-target-last").length&&(o+=1),i.hasClass("fl-col-group")?FLBuilder._newColParent=null:FLBuilder._newColParent=i,FLBuilder._newColPosition=o,FLBuilder._showNodeLoadingPlaceholder(i,o)}else if(t.hasClass("fl-builder-block-saved-module")||t.hasClass("fl-builder-block-module-template")){if(s="render_new_module",r=FLBuilder._addModuleComplete,i.hasClass("fl-sortable-disabled"))return t.remove(),void FLBuilder._showPanel();i.hasClass("fl-row-drop-target")?(l=0,o=(i=t.closest(".fl-builder-content")).find(".fl-row").index(t.closest(".fl-row"))):i.hasClass("fl-col-group-drop-target")?(l=(i=t.closest(".fl-row-content")).closest(".fl-row").attr("data-node"),o=i.find(" > .fl-col-group").index(t.closest(".fl-col-group"))):l=i.hasClass("fl-col-drop-target")?(o=(i=t.closest(".fl-col-group")).children(".fl-col").index(t.closest(".fl-col")),i.attr("data-node")):(o=i.children(".fl-module, .fl-builder-block").index(t),t.closest(".fl-col").attr("data-node")),t.closest(".fl-drop-target-last").length&&(o+=1),i.hasClass("fl-col-group")?(FLBuilder._newModuleParent=null,FLBuilder._newModulePosition=0):(FLBuilder._newModuleParent=i,FLBuilder._newModulePosition=o),FLBuilder._showNodeLoadingPlaceholder(i,o)}n=t.attr("data-id"),i=t.attr("data-type");let e="render_new_row_template"===s?"row":"render_new_col_template"===s?"column":"module";const a=FL.Builder.data.getLayoutActions();a.addNodeTemplate(e,n,i,l,o,function(e){var t;-1<s.indexOf("row")?(t=FLBuilder._jsonParse(e),FLBuilder.triggerHook("didApplyRowTemplateComplete",t.config),r(t.layout)):-1<s.indexOf("col")?(t=FLBuilder._jsonParse(e),FLBuilder.triggerHook("didApplyColTemplateComplete",t.config),r(t.layout)):r(e)}),t.remove()}},_editNodeTemplateClicked:function(e){e.preventDefault(),e.stopPropagation(),window.open(y(this).attr("href"))},_deleteNodeTemplateClicked:function(e){var e=y(e.target),t=e.closest(".fl-builder-blocks-section").find(".fl-builder-blocks-section-content"),i=t.find(".fl-builder-block"),e=e.closest(".fl-builder-block"),l=e.hasClass("fl-builder-block-global"),o=l?FLBuilderStrings.deleteGlobalTemplate:FLBuilderStrings.deleteTemplate,n=e.attr("data-id");if(confirm(o)){e.remove(),1===i.length&&(e.hasClass("fl-builder-block-saved-row")?t.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedRows+"</span>"):t.append('<span class="fl-builder-block-no-node-templates">'+FLBuilderStrings.noSavedModules+"</span>")),e.hasClass("fl-builder-block-global")&&FLBuilder.showAjaxLoader();const s=FL.Builder.data.getLayoutActions();s.deleteNodeTemplate(n,l),o=_.findIndex(FLBuilderConfig.contentItems.template,{id:e.attr("data-id"),type:"user"}),FLBuilderConfig.contentItems.template.splice(o,1),FLBuilder.triggerHook("contentItemsChanged")}},_initSettingsForms:function(){FLBuilder._initSettingsSections(),FLBuilder._initButtonGroupFields(),FLBuilder._initCompoundFields(),FLBuilder._CodeFieldSSLCheck(),FLBuilder._initCodeFields(),FLBuilder._initColorPickers(),FLBuilder._initGradientPickers(),FLBuilder._initIconFields(),FLBuilder._initPhotoFields(),FLBuilder._initSelectFields(),FLBuilder._initEditorFields(),FLBuilder._initMultipleFields(),FLBuilder._initAutoSuggestFields(),FLBuilder._initLinkFields(),FLBuilder._initFontFields(),FLBuilder._initOrderingFields(),FLBuilder._initTimezoneFields(),FLBuilder._initDimensionFields(),FLBuilder._initFieldPopupSliders(),FLBuilder._initPresetFields(),FLBuilder._focusFirstSettingsControl(),FLBuilder._calculateSettingsTabsOverflow(),FLBuilder._lightbox._resizeEditors(),y(".fl-builder-settings-fields").css("visibility","visible"),y(".fl-builder-settings button").on("click",function(e){e.preventDefault()}),FLBuilder.triggerHook("settings-form-init")},_destroySettingsForms:function(){FLBuilder._destroyEditorFields()},_setSettingsFormContent:function(e){y(".fl-legacy-settings").remove(),y("body").append(e)},_settingsTabClicked:function(e){var t=y(this),i=t.closest(".fl-builder-settings"),t=t.attr("href").split("#").pop();FLBuilder._resetSettingsTabsState(),i.find(".fl-builder-settings-tab").removeClass("fl-active"),i.find("#"+t).addClass("fl-active"),i.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),i.find("a[href*="+t+"]").addClass("fl-active"),FLBuilderConfig.rememberTab?localStorage.setItem("fl-builder-settings-tab",t):localStorage.setItem("fl-builder-settings-tab",""),FLBuilder._focusFirstSettingsControl(),e.preventDefault()},_resetSettingsTabsState:function(){var e=y(".fl-lightbox:visible");FLBuilder._hideTabsOverflowMenu(),e.find(".fl-builder-settings-tabs .fl-active").removeClass("fl-active"),e.find(".fl-builder-settings-tabs-overflow-menu .fl-active").removeClass("fl-active"),e.find(".fl-contains-active").removeClass("fl-contains-active")},_calculateSettingsTabsOverflow:function(){var e=y(".fl-lightbox:visible"),t=e.outerWidth(),i=e.hasClass("fl-lightbox-width-slim"),l=e.find(".fl-builder-settings-tabs"),o=e.find(".fl-builder-settings-tabs-overflow-menu"),n=e.find(".fl-builder-settings-tabs-more"),l=l.find("a"),s=!1,r=t-60,a=0,d=i?16:30;o.html(""),FLBuilder._hideTabsOverflowMenu(),l.removeClass("fl-overflowed"),l.each(function(){return!y(this).is(":visible")||(s||(e=y(this).textWidth()+d+12,r<=(a+=e)&&(s=!0)),void(s?(e=y(this).html(),i=y(this).attr("href"),t="",y(this).hasClass("fl-active")&&(t="fl-active"),y(this).hasClass("error")&&(t+=" error"),i=y('<a href="'+i+'" '+(t=""!==t?'class="'+t+'"':t)+">"+e+"</a>"),o.append(i),y(this).addClass("fl-overflowed")):y(this).removeClass("fl-overflowed")));var e,t,i}),s?e.addClass("fl-lightbox-has-tab-overflow"):e.removeClass("fl-lightbox-has-tab-overflow"),0<o.find(".fl-active").length?n.addClass("fl-contains-active"):n.removeClass("fl-contains-active"),0<o.find(".error").length?n.addClass("fl-contains-errors"):n.removeClass("fl-contains-errors")},_settingsTabsToOverflowMenuItemClicked:function(e){var t=y(e.currentTarget),i=t.attr("href"),l=t.closest(".fl-lightbox-header-wrap").find(".fl-builder-settings-tabs"),i=l.find('a[href="'+i+'"]'),l=l.find(".fl-builder-settings-tabs-more");FLBuilder._resetSettingsTabsState(),i.trigger("click"),t.addClass("fl-active"),l.addClass("fl-contains-active"),FLBuilder._hideTabsOverflowMenu(),e.preventDefault()},_hasOverflowTabs:function(){return 0<y(".fl-lightbox:visible").find(".fl-builder-settings-tabs-overflow-menu a").length},_showTabsOverflowMenu:function(){var e;FLBuilder._hasOverflowTabs()&&((e=y(".fl-lightbox:visible")).find(".fl-builder-settings-tabs-overflow-menu").css("display","flex"),e.find(".fl-builder-settings-tabs-overflow-click-mask").show(),this.isShowingSettingsTabsOverflowMenu=!0)},_hideTabsOverflowMenu:function(){var e=y(".fl-lightbox:visible");e.find(".fl-builder-settings-tabs-overflow-menu").css("display","none"),e.find(".fl-builder-settings-tabs-overflow-click-mask").hide(),this.isShowingSettingsTabsOverflowMenu=!1},_toggleTabsOverflowMenu:function(e){FLBuilder.isShowingSettingsTabsOverflowMenu?FLBuilder._hideTabsOverflowMenu():FLBuilder._showTabsOverflowMenu(),e.stopPropagation()},_initSettingsSections:function(){y(".fl-builder-settings:visible").find(".fl-builder-settings-section").each(FLBuilder._initSection)},_settingsCancelClicked:function(e){var t=y(".fl-builder-lightbox[data-parent]"),i=y(".fl-builder-module-settings"),l=null,o=null,n=null,s="column"==FLBuilderConfig.userTemplateType;if(0<t.length)FLBuilder._closeNestedSettings();else{0<i.length&&void 0!==i.data("new-module")?(l=y(FLBuilder.preview.state.html),n=(o=y(".fl-node-"+i.data("node"))).closest(".fl-col"),0<l.find(".fl-node-"+n.data("node")).length||s?FLBuilder._deleteModule(o):FLBuilder._deleteCol(n)):FLBuilder.preview&&FLBuilder.preview.revert();const r=FL.Builder.data.getLayoutActions();r.cancelDisplaySettings(),FLBuilder.preview=null,FLLightbox.closeParent(this),FLBuilder.triggerHook("didCancelNodeSettings")}},_focusFirstSettingsControl:function(){var e=y(".fl-builder-settings:visible"),t=e.find(".fl-builder-settings-tab.fl-active"),e=e.data("node"),i=t.find(".fl-field").first(),l=i.find('input:not([type="hidden"]), textarea, select, button, a, .fl-editor-field').first();e&&y(".fl-node-"+e+" .fl-inline-editor").length||("undefined"!=typeof tinyMCE&&l.hasClass("fl-editor-field")?(t=l.find("textarea.wp-editor-area").attr("id"),tinyMCE.get(t).focus()):setTimeout(function(){l.focus().css("animation-name","fl-grab-attention")},300),i.css("animation-name","fl-grab-attention"),i.on("animationend",function(){i.css("animation-name","")}))},_initSettingsValidation:function(e,t){y(".fl-builder-settings").last().validate({ignore:".fl-ignore-validation",rules:e,messages:t=t||{},errorPlacement:FLBuilder._settingsErrorPlacement})},_settingsErrorPlacement:function(e,t){e.appendTo(t.parent())},_toggleSettingsTabErrors:function(){for(var e,t=y(".fl-builder-settings:visible"),i=t.find(".fl-builder-settings-tab"),l=null,o=0;o<i.length;o++)e=(l=i.eq(o)).find("label.error"),tabLink=t.find(".fl-builder-settings-tabs a[href*="+l.attr("id")+"]"),tabLink.find(".fl-error-icon").remove(),tabLink.removeClass("error"),0<e.length&&(tabLink.append('<span class="fl-error-icon"></span>'),tabLink.addClass("error"));FLBuilder._calculateSettingsTabsOverflow()},_getSettings:function(e){FLBuilder._updateEditorFields();for(var t,i,l=e.serializeArray(),o=0,n=0,s="",r=[],a=[],d={},o=0;o<l.length;o++)if(t=l[o].value.replace(/\r/gm,"").replace(/'/g,"'"),!(-1<l[o].name.indexOf("flrich")))if(-1<l[o].name.indexOf("[")){for(i=l[o].name.replace(/\[(.*)\]/,""),r=[],a=(s=l[o].name.replace(i,"")).match(/\[[^\]]*\]/g),n=0;n<a.length;n++)"[]"!=a[n]&&r.push(a[n].replace(/\[|\]/g,""));s.match(/\[\]\[[^\]]*\]\[[^\]]+\]/)||s.match(/\[\]\[[^\]]*\]\[\]\[[^\]]+\]/)?(void 0===d[i]&&(d[i]={}),void 0===d[i][r[0]]&&(d[i][r[0]]={}),d[i][r[0]][r[1]]=t):s.match(/\[\]\[[^\]]*\]\[\]/)?(void 0===d[i]&&(d[i]={}),void 0===d[i][r[0]]&&(d[i][r[0]]=[]),d[i][r[0]].push(t)):s.match(/\[\]\[[^\]]*\]/)?(void 0===d[i]&&(d[i]={}),d[i][r[0]]=t):s.match(/\[\]/)&&(void 0===d[i]&&(d[i]=[]),d[i].push(t))}else d[l[o].name]=t;for(s in d)if(void 0!==d["as_values_"+s]){d[s]=y.grep(d["as_values_"+s].split(","),function(e){return""!==e}).join(",");try{delete d["as_values_"+s]}catch(e){}}return y.each(e.find("[name]"),function(e,t){t=y(t).attr("name").replace(/\[(.*)\]/,"");t in d||(d[t]="")}),d=y.extend({},FLBuilder._getOriginalSettings(e),d)},_getSettingsJSONForHTML:function(e){return JSON.stringify(e).replace(/\'/g,"'").replace("<wbr />","<wbr>")},_getOriginalSettings:function(e,t){var i=e.find(".fl-builder-settings-json"),e=e.data("node"),l=FLBuilderSettingsConfig.nodes,o=null,n={};if(e&&l[e]?o=l[e]:i.length&&(o=FLBuilder._jsonParse(i.val().replace(/'/g,"'"))),o)for(key in o)(key.match(/[a-z0-9-_]+$/)&&y("#fl-field-"+key).length||t)&&(n[key]=o[key]);return n},_getSettingsForChangedCheck:function(e,t){var i=FLBuilder._getSettings(t);if(e){t=y(".fl-node-"+e);if(t.hasClass("fl-module")){t=t.data("type"),t=FLBuilderSettingsConfig.editables[t];if(t&&FLBuilderSettingsConfig.nodes[e])for(var l in t)i[l]=FLBuilderSettingsConfig.nodes[e][l]}}return i},_saveSettings:function(i){var e=y(".fl-builder-settings-lightbox .fl-builder-settings"),t=e.data("new-module"),l=e.attr("data-node"),o=FLBuilder._getSettings(e),n=FLBuilder.preview;function s(){FLBuilder._showNodeLoading(l),FLBuilderSettingsConfig.nodes[l]=o;const e=FL.Builder.data.getLayoutActions();var t=FLBuilder._saveSettingsComplete.bind(this,i,n);e.updateNodeSettings(l,o,t),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:l,settings:o}),FLBuilder._lightbox.close()}!FLBuilder.isUndefined(i)&&FLBuilder.isBoolean(i)||(i=!0),n&&!n._settingsHaveChanged()&&FLBuilder.isUndefined(t)?FLBuilder._lightbox.close():FLBuilderConfig.userCaps.unfiltered_html?s():(FLBuilderSettingsForms.showLightboxLoader(),FLBuilder.ajax({action:"verify_settings",settings:o},function(e){"true"===e?s():(msg='<p style="font-weight:bold;text-align:center;">'+FLBuilderStrings.noScriptWarn.heading+"</p>",FLBuilderConfig.userCaps.global_unfiltered_html?msg+="<p>"+FLBuilderStrings.noScriptWarn.global+"</p>":msg+="<p>"+FLBuilderStrings.noScriptWarn.message+"</p>",msg+='<p><div class="fl-diff"></div></p>',msg+="<p>"+FLBuilderStrings.noScriptWarn.footer+"</p>",FLBuilderSettingsForms.hideLightboxLoader(),FLBuilder.alert(msg),data=y.parseJSON(e),""!==data.diff&&(y(".fl-diff").html(data.diff),y(".fl-diff").prepend("<p>"+FLBuilderStrings.codeErrorDetected+"</p>"),y(".fl-diff .diff-deletedline").each(function(){(y(this).find("del").length<1?y(this).css("background-color","rgb(255, 192, 203, 0.7)").css("padding","10px"):y(this).find("del").css("background-color","rgb(255, 192, 203, 0.7)")).css("border","1px solid pink")}),console.log("============"),console.log("key: "+data.key),console.log("value: "+data.value),console.log("parsed: "+data.parsed),console.log("============")))}))},_saveSettingsComplete:function(e,t,i){function l(){t&&o.layout.partial&&o.layout.nodeId===t.nodeId&&!FLBuilder._publishAndRemain&&(t.clear(),t=null,FLBuilder._publishAndRemain=!1)}var o=FLBuilder._jsonParse(i),i=o.layout.nodeType,n=o.layout.moduleType,s="didSave"+i.charAt(0).toUpperCase()+i.slice(1)+"SettingsComplete";!0===e?FLBuilder._renderLayout(o.layout,l):l(),FLBuilder.triggerHook("didSaveNodeSettingsComplete",{nodeId:o.node_id,nodeType:i,moduleType:n,settings:o.settings}),FLBuilder.triggerHook(s,{nodeId:o.node_id,nodeType:i,moduleType:n,settings:o.settings})},_triggerSettingsSave:function(e,t,i){var l=FLBuilder._lightbox._node.find("form.fl-builder-settings"),o=FLBuilder._lightbox._node.data("instance-id"),o=FLLightbox._instances[o],n=y(".fl-lightbox-wrap[data-parent]:visible"),s=!0;return e=!_.isUndefined(e)&&e,t=!_.isUndefined(t)&&t,(i=_.isUndefined(i)?!e:i)||(FLBuilder._publishAndRemain=!0),l.length&&(n.length&&(n.find(".fl-builder-settings-save").trigger("click"),(n.find("label.error").length||y(".fl-builder-alert-lightbox:visible").length)&&(s=!1)),s&&!l.validate({ignore:".fl-ignore-validation"}).form()&&(s=!1),n=FLBuilderSettingsForms.settingsHaveChanged(),s&&n&&(e&&o.disableClose(),l.find(".fl-builder-settings-save").trigger("click"),e&&o.enableClose(),(l.find("label.error").length||y(".fl-builder-alert-lightbox:visible").length)&&(s=!1)),i?(FLBuilder._destroySettingsForms(),!n&&FLBuilder.preview&&(FLBuilder.preview.clear(),FLBuilder.preview=null)):FLBuilderSettingsForms.cacheCurrentSettings(),n||e||o.close()),s?FLBuilder.triggerHook("didTriggerSettingsSave"):(FLBuilder.triggerHook("didFailSettingsSave"),FLBuilder._toggleSettingsTabErrors(),t&&!y(".fl-builder-alert-lightbox:visible").length&&FLBuilder.alert(FLBuilderStrings.settingsHaveErrors)),s},_refreshSettingsPreviewReference:function(){FLBuilder.preview&&FLBuilder.preview._initElementsAndClasses()},_openNestedSettings:function(e){e.className&&-1===e.className.indexOf("fl-builder-settings-lightbox")&&(e.className+=" fl-builder-settings-lightbox"),e=y.extend({className:"fl-builder-lightbox fl-builder-settings-lightbox",destroyOnClose:!0,resizable:!0},e);var t=y(".fl-lightbox-wrap:visible"),i=t.find(".fl-lightbox"),e=new FLLightbox(e),l=e._node,o=l.find(".fl-lightbox");return t.hide(),l.attr("data-parent",t.attr("data-instance-id")),o.attr("style",i.attr("style")),e.on("resized",FLBuilder._calculateSettingsTabsOverflow),e.open('<div class="fl-builder-lightbox-loading"></div>'),e},_closeNestedSettings:function(){var e=y(".fl-builder-lightbox[data-parent]:visible"),t=e.find(".fl-lightbox"),i=e.attr("data-instance-id"),i=FLLightbox._instances[i],e=e.attr("data-parent"),l=y('[data-instance-id="'+e+'"]'),o=l.find(".fl-lightbox"),n=l.find("form"),s=FLLightbox._instances[e];i&&(i.on("close",function(){o.attr("style",t.attr("style")),l.show(),s._resize(),l.find("label.error").remove(),n.validate().hideErrors(),FLBuilder._toggleSettingsTabErrors(),FLBuilder._initMultipleFields()}),i.close())},_showHelpTooltip:function(){y(this).siblings(".fl-help-tooltip-text").fadeIn()},_hideHelpTooltip:function(){y(this).siblings(".fl-help-tooltip-text").fadeOut()},_initSection:function(){var e=y(this);e.find(".fl-builder-settings-section-header").on("click",function(){e.toggleClass("fl-builder-settings-section-collapsed")})},_initButtonGroupFields:function(){y(".fl-builder-settings:visible").find(".fl-button-group-field").each(FLBuilder._initButtonGroupField)},_initButtonGroupField:function(){var e=y(this),i=e.find(".fl-button-group-field-option"),l=e.find("input");i.on("click",function(){var e=y(this);"1"==e.attr("data-selected")?(e.attr("data-selected","0"),l.val("").trigger("change")):(i.attr("data-selected","0"),e.attr("data-selected","1"),l.val(e.data("value")).trigger("change"))}),l.on("change",function(e){var t=l.val(),t=i.filter('[data-value="'+t+'"]');i.attr("data-selected","0"),t.attr("data-selected","1")})},_initCompoundFields:function(){y(".fl-builder-settings:visible").find(".fl-compound-field").each(FLBuilder._initCompoundField)},_initCompoundField:function(){var e=y(this),t=e.find(".fl-compound-field-section"),i=e.find(".fl-compound-field-section-toggle"),e=e.find(".fl-compound-field-setting").has(".fl-dimension-field-units");t.each(function(){var e=y(this);e.find(".fl-compound-field-section-toggle").length||e.addClass("fl-compound-field-section-visible")}),i.on("click",function(){var e=y(this),t=e.closest(".fl-field"),e="."+e.closest(".fl-compound-field-section").attr("class").split(" ").join(".");t.find(e).toggleClass("fl-compound-field-section-visible")}),e.each(function(){var e=y(this),t=e.find(".fl-compound-field-label");t.length&&!e.find(".fl-shadow-field").length&&t.append('<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>')})},_initAutoSuggestFields:function(){var t,i=y(".fl-builder-settings:visible .fl-suggest-field"),e=null,l=null,o=[];i.each(function(){""!==(e=y(this)).attr("data-value")&&(FLBuilderSettingsForms.showFieldLoader(e),o.push({name:e.attr("name"),value:e.attr("data-value"),action:e.attr("data-action"),data:e.attr("data-action-data")}))}),o.length?FLBuilder.ajax({action:"get_autosuggest_values",fields:o},function(e){for(l in t=FLBuilder._jsonParse(e))y('.fl-suggest-field[name="'+l+'"]').attr("data-value",t[l]);i.each(FLBuilder._initAutoSuggestField)}):i.each(FLBuilder._initAutoSuggestField)},_initAutoSuggestField:function(){var e=y(this);e.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:e.data("action"),fl_as_action_data:e.data("action-data"),_wpnonce:FLBuilderConfig.ajaxNonce}),y.extend({},{asHtmlID:e.attr("name"),selectedItemProp:"name",searchObjProps:"name",minChars:2,keyDelay:1e3,fadeOut:!1,usePlaceholder:!0,emptyText:FLBuilderStrings.noResultsFound,showResultListWhenNoMatch:!0,preFill:e.data("value"),queryParam:"fl_as_query",afterSelectionAdd:FLBuilder._updateAutoSuggestField,afterSelectionRemove:FLBuilder._updateAutoSuggestField,selectionLimit:e.data("limit"),canGenerateNewSelections:!1},e.data("args"))),FLBuilderSettingsForms.hideFieldLoader(e)},_updateAutoSuggestField:function(e,t,i){var l=this;y(this).siblings(".as-values").val(i.join(",")).trigger("change"),y(this).parents(".as-selections").sortable({items:":not(.as-original)",update:function(e,t){var i=[];set=l.parents(".as-selections").find("li.as-selection-item"),y.each(set,function(e,t){i.push(y(t).attr("data-value"))}),y(l).siblings(".as-values").val(i.join(",")).trigger("change")}})},_CodeFieldSSLCheck:function(){y("body").append('<div class="sg-test" style="display:none"><svg xmlns="http://www.w3.org/2000/svg"></svg></div>'),"https://www.w3.org/2000/svg"===y(".sg-test").find("svg").attr("xmlns")&&(FLBuilder._codeDisabled=!0),y(".sg-test").remove()},_initCodeFields:function(){FLBuilder._codeDisabled||y(".fl-builder-settings:visible").find(".fl-code-field").each(FLBuilder._initCodeField)},_initCodeField:function(){var e=y(this),n=e.closest(".fl-builder-settings"),t=e.find("textarea"),e=(t.attr("id"),t.data("editor")),i=t.data("wrap"),l=y("<div>",{position:"absolute",height:20*parseInt(t.attr("rows"),10)}),s=null,r=!(!n.hasClass("fl-builder-global-settings")&&!n.hasClass("fl-builder-layout-settings"));l.insertBefore(t),l.attr("contentEditable",!0),l.addClass("fl-ignore-validation"),t.css("display","none"),ace.require("ace/ext/language_tools"),(s=ace.edit(l[0])).$blockScrolling=1/0,s.getSession().setValue(t.val()),s.getSession().setMode("ace/mode/"+e),i&&s.getSession().setUseWrapMode(!0),s.setOptions(FLBuilderConfig.AceEditorSettings),s.getSession().on("change",function(e){t.val(s.getSession().getValue()).trigger("change")}),s.getSession().on("changeAnnotation",function(){for(var e=s.getSession().getAnnotations(),t=n.find(".fl-builder-settings-save"),i=n.find(".fl-builder-settings-error"),l=!1,o=0;o<e.length;o++)if(!(-1<e[o].text.indexOf("DOCTYPE")||-1<e[o].text.indexOf("Named entity expected")||-1<e[o].text.indexOf("@supports")||"error"!==e[o].type)){l=!0;break}val=s.getSession().getValue(),r&&l&&null!==val.match(/<\/iframe>|<\/script>/gm)&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldCriticalError)),l&&!t.hasClass("fl-builder-settings-error")&&i.length&&FLBuilderConfig.CheckCodeErrors&&(t.addClass("fl-builder-settings-error"),t.on("click",FLBuilder._showCodeFieldError)),l||(i.removeClass("fl-builder-settings-error"),i.off("click",FLBuilder._showCodeFieldError),i.off("click",FLBuilder._showCodeFieldCriticalError))}),t.closest(".fl-field").data("editor",s)},_showCodeFieldError:function(e){e.stopImmediatePropagation(),FLBuilder.confirm({message:FLBuilderStrings.codeError,cancel:function(){var e=y(".fl-builder-settings:visible .fl-builder-settings-save");e.removeClass("fl-builder-settings-error"),e.off("click",FLBuilder._showCodeFieldError),e.trigger("click")},strings:{ok:FLBuilderStrings.codeErrorFix,cancel:FLBuilderStrings.codeErrorIgnore}})},_showCodeFieldCriticalError:function(e){e.stopImmediatePropagation(),FLBuilder.alert(FLBuilderStrings.codeerrorhtml)},_initMultipleFields:function(){y(".fl-builder-settings:visible .fl-builder-field-multiples").each(function(){var e=y(this),t=null,i=0,l=FLBuilderConfig.isRtl?{left:10}:{right:10},o=e.attr("data-limit")||0,n=e.find("tr").length||0;for(0<parseInt(o)&&n-1>=parseInt(o)?(e.find(".fl-builder-field-copy").hide(),e.find(".fl-builder-field-add").fadeOut()):e.find(".fl-builder-field-copy, .fl-builder-field-add").show();i<e.length;i++)1===(t=e.eq(i).find(".fl-builder-field-multiple")).length?t.eq(0).find(".fl-builder-field-actions").addClass("fl-builder-field-actions-single"):t.find(".fl-builder-field-actions").removeClass("fl-builder-field-actions-single");y(".fl-builder-field-multiples").sortable({items:".fl-builder-field-multiple",cursor:"move",cursorAt:l,distance:5,opacity:.5,placeholder:"fl-builder-field-dd-zone",stop:FLBuilder._fieldDragStop,tolerance:"pointer",axis:"y"})})},_addFieldClicked:function(){var e=y(this),t=e.attr("data-field"),i=e.closest("tr").siblings("tr[data-field="+t+"]").last(),l=i.clone(),o=l.find(".fl-form-field"),n=null,s=parseInt(i.find("label span.fl-builder-field-index").html(),10)+1;l.find("th label span.fl-builder-field-index").html(s),l.find(".fl-form-field-preview-text").html(""),l.find(".fl-form-field-before").remove(),l.find(".fl-form-field-after").remove(),l.find("input, textarea, select").val(""),i.after(l),FLBuilder._initMultipleFields(),o.length?(n=o.find(".fl-form-field-edit").data("type"),o.find("input").val(JSON.stringify(FLBuilderSettingsConfig.defaults.forms[n]))):((n=(o=e.closest("form.fl-builder-settings")).data("type"))&&o.hasClass("fl-builder-module-settings")&&(s=FLBuilderSettingsConfig.defaults.modules[n][t][0],l.find("input, textarea, select").val(s)),FLBuilder._renumberFields(l.closest(".fl-field")))},_copyFieldClicked:function(){var e=y(this).closest("tr"),t=e.clone(),i=parseInt(e.find("label span.fl-builder-field-index").html(),10)+1;t.find("th label span.fl-builder-field-index").html(i),e.after(t),FLBuilder._renumberFields(e.parent()),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview()},_deleteFieldClicked:function(){var e=y(this).closest("tr"),t=e.parent();confirm(FLBuilderStrings.deleteFieldMessage)&&(e.remove(),FLBuilder._renumberFields(t),FLBuilder._initMultipleFields(),FLBuilder.preview.delayPreview())},_renumberFields:function(e){e.find(".fl-builder-field-multiple").each(function(e,t){y(t).find("th label span.fl-builder-field-index").html(e+1),FLBuilder._renumberFieldAttr(t,"name",e),FLBuilder._renumberFieldAttr(t,"id",e),FLBuilder._renumberFieldAttr(t,"for",e)})},_renumberFieldAttr:function(e,l,o){y(e).find("["+l+"]").each(function(e,t){var i=(i=y(t).attr(l)).replace(/\[(\d+)\]/,"["+o+"]");y(t).attr(l,i)})},_fieldDragHelper:function(){return y('<div class="fl-builder-field-dd-helper"></div>')},_fieldDragStop:function(e,t){FLBuilder._renumberFields(t.item.parent()),FLBuilder.preview.delayPreview()},_initSelectFields:function(){var e=y(".fl-builder-settings:visible").find("select"),e=(e.on("change",FLBuilder._settingsSelectChanged),e.trigger("change"),e.on("change",FLBuilder._calculateSettingsTabsOverflow),y(".fl-builder-settings:visible").find(".fl-button-group-field input[type=hidden]"));e.on("change",FLBuilder._settingsSelectChanged),e.trigger("change"),e.on("change",FLBuilder._calculateSettingsTabsOverflow)},_settingsSelectChanged:function(){var e=y(this),t=e.attr("data-toggle"),i=e.attr("data-hide"),l=e.attr("data-trigger"),o=e.val(),n=0,s=FLBuilderResponsiveEditing._mode,r=e.closest(".fl-field-responsive-setting"),s="fl-field-responsive-setting-"+s;if(!r.length||e.parent().hasClass(s)){if(void 0!==t){for(n in t=FLBuilder._jsonParse(t))FLBuilder._settingsSelectToggle(t[n].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(t[n].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(t[n].tabs,"hide","a[href*=fl-builder-settings-tab-","]");void 0!==t[o]&&(FLBuilder._settingsSelectToggle(t[o].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(t[o].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(t[o].tabs,"show","a[href*=fl-builder-settings-tab-","]"))}if(void 0!==i){for(n in i=FLBuilder._jsonParse(i))FLBuilder._settingsSelectToggle(i[n].fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(i[n].sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[n].tabs,"show","a[href*=fl-builder-settings-tab-","]");void 0!==i[o]&&(FLBuilder._settingsSelectToggle(i[o].fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(i[o].sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(i[o].tabs,"hide","a[href*=fl-builder-settings-tab-","]"))}if(void 0!==l&&void 0!==(l=FLBuilder._jsonParse(l))[o]&&void 0!==l[o].fields)for(n=0;n<l[o].fields.length;n++)y("#fl-field-"+l[o].fields[n]).find("select").trigger("change")}},_settingsSelectToggle:function(e,t,i,l){var o=0;if(l=void 0===l?"":l,void 0!==e)for(;o<e.length;o++)y(".fl-builder-settings:visible").find(i+e[o]+l)[t](),y(i+e[o]+l).parent().find('.fl-field[data-type="code"]').each(function(){FLBuilder._codeDisabled||y(this).data("editor").resize()})},_initColorPickers:function(){var e=FLBuilderConfig.colorPresets||[];FLBuilder.colorPicker=new FLBuilderColorPicker({mode:"hsv",elements:".fl-color-picker .fl-color-picker-value",presets:e,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}}),y(FLBuilder.colorPicker).on("presetRemoved presetAdded presetSorted",function(e,t){FLBuilder.ajax({action:"save_color_presets",presets:t.presets})})},_initGradientPickers:function(){y(".fl-builder-settings:visible .fl-gradient-picker").each(FLBuilder._initGradientPicker)},_initGradientPicker:function(){var e=y(this),t=e.find(".fl-gradient-picker-type-select"),i=e.find(".fl-gradient-picker-angle-wrap"),l=e.find(".fl-gradient-picker-position");t.on("change",function(){"linear"===y(this).val()?(i.show(),l.hide()):(i.hide(),l.show())})},_initPhotoFields:function(){var e=y(".fl-builder-settings:visible").find(".fl-photo-field select");e.on("change",FLBuilder._toggleSettingsOnIconChange),e.trigger("change")},_initSinglePhotoSelector:function(){null===FLBuilder._singlePhotoSelector&&(FLBuilder._singlePhotoSelector=wp.media({title:FLBuilderStrings.selectPhoto,button:{text:FLBuilderStrings.selectPhoto},library:{type:FLBuilderConfig.uploadTypes.image},multiple:!1}),FLBuilder._singlePhotoSelector.on("open",FLBuilder._wpmedia_reset_errors),_wpPluploadSettings.defaults.multipart_params.fl_upload_type="photo")},_selectSinglePhoto:function(){FLBuilder._initSinglePhotoSelector(),FLBuilder._singlePhotoSelector.once("open",y.proxy(FLBuilder._singlePhotoOpened,this)),FLBuilder._singlePhotoSelector.once("select",y.proxy(FLBuilder._singlePhotoSelected,this)),FLBuilder._singlePhotoSelector.open()},_singlePhotoOpened:function(){var e=FLBuilder._singlePhotoSelector.state().get("selection"),t=y(this).closest(".fl-photo-field"),i=t.find("input[type=hidden]"),l=i.val(),o=null;y(this).hasClass("fl-photo-replace")?(e.reset(),t.addClass("fl-photo-empty"),i.val("")):""!==l?((o=wp.media.attachment(l)).fetch(),e.add(o?[o]:[])):e.reset()},_singlePhotoSelected:function(){var e=FLBuilder._singlePhotoSelector.state().get("selection").first().toJSON(),t=y(this).closest(".fl-photo-field"),i=t.find("input[type=hidden]"),l=t.find(".fl-photo-preview img"),o=t.find("select");e.url&&e.url.endsWith(".svg")&&(e.sizes={full:{url:e.url,filename:e.url.split("/").pop(),height:"",width:""}}),i.val(e.id),l.attr("src",FLBuilder._getPhotoSrc(e)),t.removeClass("fl-photo-empty").removeClass("fl-photo-no-attachment"),t.find("label.error").remove(),o.show(),o.html(FLBuilder._getPhotoSizeOptions(e,o.val())),o.trigger("change"),FLBuilderSettingsConfig.attachments[e.id]=e},_singlePhotoRemoved:function(){FLBuilder._initSinglePhotoSelector();var e=FLBuilder._singlePhotoSelector.state(),e=void 0!==e?e.get("selection"):null,t=y(this).closest(".fl-photo-field"),i=t.find("input[type=hidden]"),l=t.find("select");e&&e.reset(),t.addClass("fl-photo-empty"),i.val(""),l.html('<option value="" selected></option>'),l.trigger("change")},_getPhotoSrc:function(e){return(void 0===e.sizes?e:void 0!==e.sizes.thumbnail?e.sizes.thumbnail:e.sizes.full).url},_getPhotoSizeOptions:function(e,t){var i="",l=null,o=null,n=!1,s="",r="",a={full:FLBuilderStrings.fullSize,large:FLBuilderStrings.large,medium:FLBuilderStrings.medium,thumbnail:FLBuilderStrings.thumbnail};if(void 0===e.sizes||0===e.sizes.length)i+='<option value="'+e.url+'">'+FLBuilderStrings.fullSize+"</option>";else{for(sizecheck in t=t&&t.split(/[\\/]/).pop(),selectedverified=!1,e.sizes)if(e.sizes[sizecheck].url.split(/[\\/]/).pop()===t){selectedverified=!0;break}for(l in selectedverified||(t=!1),e.sizes)o="",s=void 0!==a[l]?a[l]:void 0!==FLBuilderConfig.customImageSizeTitles[l]?FLBuilderConfig.customImageSizeTitles[l]:"",t?t!==e.sizes[l].url.split(/[\\/]/).pop()||n||(o=' selected="selected"',n=!0):(void 0===FLBuilderConfig.photomodulesize||l!==FLBuilderConfig.photomodulesize||n)&&(l!=FLBuilderConfig.defaultImageSize||n)||(o=' selected="selected"',n=!0),e.sizes[l].width&&e.sizes[l].height&&(s=s&&s+" - ",r=e.sizes[l].width+" x "+e.sizes[l].height),i+='<option data-size="'+l+'" value="'+e.sizes[l].url+'"'+o+">"+s+r+"</option>"}return i},_selectMultiplePhotos:function(){var e=y(this).closest(".fl-multiple-photos-field").find("input[type=hidden]").val(),t=""===e?"":FLBuilder._jsonParse(e),e=wp.media.gallery.defaults.id,i='[gallery ids="-1"]',l=null,o=null,n=null,s=null,r=[];if("object"==typeof t){for(s in t)r.push(t[s]);i='[gallery ids="'+r.join()+'"]'}l=wp.shortcode.next("gallery",i).shortcode,_.isUndefined(l.get("id"))&&!_.isUndefined(e)&&l.set("id",e),o=wp.media.gallery.attachments(l),(n=new wp.media.model.Selection(o.models,{props:o.props.toJSON(),multiple:!0})).gallery=o.gallery,n.more().done(function(){n.length||FLBuilder._multiplePhotoSelector.setState("gallery-library"),n.props.set({query:!1}),n.unmirror(),n.props.unset("orderby")}),FLBuilder._multiplePhotoSelector&&FLBuilder._multiplePhotoSelector.dispose(),FLBuilder._multiplePhotoSelector=wp.media({frame:"post",state:y(this).hasClass("fl-multiple-photos-edit")?"gallery-edit":"gallery-library",title:wp.media.view.l10n.editGalleryTitle,editing:!0,multiple:!0,selection:n}).open(),y(FLBuilder._multiplePhotoSelector.views.view.el).addClass("fl-multiple-photos-lightbox"),FLBuilder._multiplePhotoSelector.once("update",y.proxy(FLBuilder._multiplePhotosSelected,this))},_multiplePhotosSelected:function(e){for(var t=y(this).closest(".fl-multiple-photos-field"),i=t.find("input[type=hidden]"),l=t.find(".fl-multiple-photos-count"),o=[],n=0;n<e.models.length;n++)o.push(e.models[n].id);1==o.length?l.html("1 "+FLBuilderStrings.photoSelected):l.html(o.length+" "+FLBuilderStrings.photosSelected),t.removeClass("fl-multiple-photos-empty"),t.find("label.error").remove(),i.val(JSON.stringify(o)).trigger("change")},_initSingleVideoSelector:function(){var e;null===FLBuilder._singleVideoSelector&&(e=_wpPluploadSettings.defaults.filters.mime_types[0].extensions,_wpPluploadSettings.defaults.multipart_params.fl_upload_type="video",_wpPluploadSettings.defaults.filters.mime_types[0].extensions=FLBuilderConfig.uploadTypes.videoTypes,FLBuilder._singleVideoSelector=wp.media({title:FLBuilderStrings.selectVideo,button:{text:FLBuilderStrings.selectVideo},library:{type:["video/mp4","video/webm"]},multiple:!1}),FLBuilder._singleVideoSelector.on("open",FLBuilder._wpmedia_reset_errors),FLBuilder._singleVideoSelector.on("close",function(){_wpPluploadSettings.defaults.filters.mime_types[0].extensions=e}))},_selectSingleVideo:function(){FLBuilder._initSingleVideoSelector(),FLBuilder._singleVideoSelector.once("select",y.proxy(FLBuilder._singleVideoSelected,this)),FLBuilder._singleVideoSelector.open()},_singleVideoSelected:function(){var e=FLBuilder._singleVideoSelector.state().get("selection").first().toJSON(),t=y(this).closest(".fl-video-field"),i=t.find(".fl-video-preview-img"),l=t.find(".fl-video-preview-filename"),o=t.find("input[type=hidden]");i.html('<span class="dashicons dashicons-media-video"></span>'),l.html(e.filename),t.removeClass("fl-video-empty"),t.find("label.error").remove(),o.val(e.id).trigger("change"),FLBuilderSettingsConfig.attachments[e.id]=e},_singleVideoRemoved:function(){FLBuilder._initSingleVideoSelector();var e=FLBuilder._singleVideoSelector.state(),e=void 0!==e?e.get("selection"):null,t=y(this).closest(".fl-video-field"),i=t.find(".fl-video-preview-img img"),l=t.find(".fl-video-preview-filename"),o=t.find("input[type=hidden]");e&&e.reset(),i.attr("src",""),l.html(""),t.addClass("fl-video-empty"),o.val("").trigger("change")},_selectMultipleAudios:function(){var e=y(this).closest(".fl-multiple-audios-field").find("input[type=hidden]").val(),e=""==e?'[playlist ids="-1"]':'[playlist ids="'+FLBuilder._jsonParse(e).join()+'"]',e=wp.shortcode.next("playlist",e).shortcode,t=wp.media.playlist.defaults.id,i=null,l=null;_.isUndefined(e.get("id"))&&!_.isUndefined(t)&&e.set("id",t),i=wp.media.playlist.attachments(e),(l=new wp.media.model.Selection(i.models,{props:i.props.toJSON(),multiple:!0})).playlist=i.playlist,l.more().done(function(){l.props.set({query:!1}),l.unmirror(),l.props.unset("orderby")}),FLBuilder._multipleAudiosSelector&&FLBuilder._multipleAudiosSelector.dispose(),FLBuilder._multipleAudiosSelector=wp.media({frame:"post",state:y(this).hasClass("fl-multiple-audios-edit")?"playlist-edit":"playlist-library",title:wp.media.view.l10n.editPlaylistTitle,editing:!0,multiple:!0,selection:l}).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",y.proxy(FLBuilder._multipleAudiosSelected,this))},_multipleAudiosSelected:function(e){for(var t=y(this).closest(".fl-multiple-audios-field"),i=t.find(".fl-multiple-audios-count"),l=t.find("input[type=hidden]"),o=[],n=0;n<e.models.length;n++)o.push(e.models[n].id);1==o.length?i.html("1 "+FLBuilderStrings.audioSelected):i.html(o.length+" "+FLBuilderStrings.audiosSelected),l.val(JSON.stringify(o)).trigger("change"),t.removeClass("fl-multiple-audios-empty"),t.find("label.error").remove()},_initIconFields:function(){var e=y(".fl-builder-settings:visible").find(".fl-icon-field input");e.on("change",FLBuilder._toggleSettingsOnIconChange),e.trigger("change")},_toggleSettingsOnIconChange:function(){var e=y(this),t=e.val(),e=e.attr("data-show");void 0!==e&&(e=FLBuilder._jsonParse(e),FLBuilder._settingsSelectToggle(e.fields,"hide","#fl-field-"),FLBuilder._settingsSelectToggle(e.sections,"hide","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(e.tabs,"hide","a[href*=fl-builder-settings-tab-","]"),t&&(FLBuilder._settingsSelectToggle(e.fields,"show","#fl-field-"),FLBuilder._settingsSelectToggle(e.sections,"show","#fl-builder-settings-section-"),FLBuilder._settingsSelectToggle(e.tabs,"show","a[href*=fl-builder-settings-tab-","]"),FLBuilder._calculateSettingsTabsOverflow()))},_selectIcon:function(){var t=this;FLIconSelector.open(function(e){FLBuilder._iconSelected.apply(t,[e])})},_iconSelected:function(e){var t=y(this).closest(".fl-icon-field"),i=t.find("input[type=hidden]"),l=t.find("i"),o=l.attr("data-icon");i.val(e).trigger("change"),l.removeClass(o),l.addClass(e),l.attr("data-icon",e),t.removeClass("fl-icon-empty"),t.find("label.error").remove()},_removeIcon:function(){var e=y(this).closest(".fl-icon-field"),t=e.find("input[type=hidden]"),i=e.find("i");t.val("").trigger("change"),i.removeClass(),i.attr("data-icon",""),e.addClass("fl-icon-empty")},_formFieldClicked:function(){var e=y(this),t=e.closest(".fl-builder-settings"),i=e.attr("data-type"),l=e.siblings("input").val(),o=FLBuilder._moduleHelpers[i],n=(FLBuilderSettingsConfig.forms[i],FLBuilder._openNestedSettings({className:"fl-builder-lightbox fl-form-field-settings"}));""===l&&(l=JSON.stringify(FLBuilderSettingsConfig.forms[i])),FLBuilderSettingsForms.render({id:i,nodeId:t.attr("data-node"),nodeSettings:FLBuilder._getSettings(t),settings:FLBuilder._jsonParse(l.replace(/'/g,"'")),lightbox:n,rules:o?o.rules:null,helper:{init:function(){o&&o.init(),FLBuilder._initFormFieldSettingsPreview(n)}}},function(){e.attr("id","fl-"+n._node.attr("data-instance-id")),n._node.find("form.fl-builder-settings").attr("data-type",i),FLBuilderResponsiveEditing._switchAllSettingsToCurrentMode()})},_saveFormFieldClicked:function(){var e=y(this).closest(".fl-builder-settings");FLBuilder._saveFormFieldSettings(e)?FLBuilder._closeNestedSettings():FLBuilder._toggleSettingsTabErrors()},_initFormFieldSettingsPreview:function(e){var t=e._node.find(".fl-field"),e=e._node.find("textarea.wp-editor-area");t.find("input:not([type=hidden]), textarea").on("input",FLBuilder._previewFormFieldSettings),t.find("input[type=hidden], select").on("change",FLBuilder._previewFormFieldSettings),"undefined"!=typeof tinyMCE&&e.each(function(e,t){(t=tinyMCE.get(y(t).attr("id"))).on("change",FLBuilder._previewFormFieldSettings),t.on("keyup",FLBuilder._previewFormFieldSettings)})},_previewFormFieldSettings:function(){var e=this.formElement||this,t=y(e).closest(".fl-builder-settings"),e=t.data("timeout");e&&clearTimeout(e),e=setTimeout(function(){FLBuilder._saveFormFieldSettings(t)},1e3),t.data("timeout",e)},_saveFormFieldSettings:function(e){var t=e.closest(".fl-lightbox-wrap").attr("data-instance-id"),i=e.attr("data-type"),l=FLBuilder._getSettings(e),i=FLBuilder._moduleHelpers[i],t=y(".fl-builder-settings #fl-"+t),o=t.parent().attr("data-preview-text"),n=e.find("#fl-field-"+o),s=l[o],r=y('select[name="'+o+'"]'),a=document.createElement("div"),d=!0;return 0<r.length&&(s=r.find('option[value="'+l[o]+'"]').text()),void 0!==i&&(e.find("label.error").remove(),e.validate().hideErrors(),d=(d=e.validate().form())&&i.submit()),!!d&&(void 0!==o&&void 0!==s&&("icon"===n.data("type")?s='<i class="'+s+'"></i>':35<s.length&&(a.innerHTML=s,s=(a.textContent||a.innerText||"").replace(/^(.{35}[^\s]*).*/,"$1")+"..."),t.siblings(".fl-form-field-preview-text").html(s)),0<t.length&&(""!=(r=t.siblings("input").val().replace(/'/g,"'"))&&(l=y.extend(FLBuilder._jsonParse(r),l)),t.siblings("input").val(JSON.stringify(l)).trigger("change")),!0)},_layoutFieldClicked:function(){var e=y(this);e.siblings().removeClass("fl-layout-field-option-selected"),e.addClass("fl-layout-field-option-selected"),e.siblings("input").val(e.attr("data-value"))},_initLinkFields:function(){y(".fl-builder-settings:visible .fl-link-field").each(FLBuilder._initLinkField)},_initLinkField:function(){var e=y(this),t=e.find(".fl-link-field-search-input"),e=e.find(".fl-link-field-options-wrap input[type=checkbox]");t.autoSuggest(FLBuilder._ajaxUrl({fl_action:"fl_builder_autosuggest",fl_as_action:"fl_as_links",_wpnonce:FLBuilderConfig.ajaxNonce}),{asHtmlID:t.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,formatList:function(e,t){return t.html(e.name+'<span class="type">['+e.type+"]</span>")}}),e.on("click",FLBuilder._linkFieldCheckboxClicked)},_updateLinkField:function(e,t,i){var e=e.closest(".fl-link-field"),l=e.find(".fl-link-field-search"),o=e.find(".fl-link-field-search-input");e.find(".fl-link-field-input").val(t.value).trigger("keyup"),o.autoSuggest("remove",t.value),l.hide()},_linkFieldSelectClicked:function(){var e=y(this).closest(".fl-link-field").find(".fl-link-field-search");e.show(),e.find("input").focus()},_linkFieldSelectCancelClicked:function(){var e=y(this);e.parent().hide(),e.closest(".fl-link-field").find("input.fl-link-field-input").focus()},_linkFieldCheckboxClicked:function(){var e=y(this),t=e.is(":checked"),i=e.siblings("input[type=hidden]"),l="",l=e.hasClass("fl-link-field-target-cb")?t?"_blank":"_self":t?"yes":"no";i.val(l)},_initFontFields:function(){y(".fl-builder-settings:visible .fl-font-field").each(FLBuilder._initFontField)},_initFontField:function(){var e=y(this),t=e.attr("data-value"),i=e.find(".fl-font-field-font"),e=e.find(".fl-font-field-weight");FLBuilderConfig.select2Enabled&&i.select2({width:"100%"}).on("select2:open",function(e){y(".select2-search__field").attr("placeholder",FLBuilderStrings.placeholderSelect2)}),i.on("change",function(){FLBuilder._getFontWeights(i)}),-1<t.indexOf("family")&&(t=FLBuilder._jsonParse(t),i.val(t.family),i.trigger("change"),e.find("option[value="+t.weight+"]").length&&e.val(t.weight))},_getFontWeights:function(e){var i=e.closest(".fl-font-field").find(".fl-font-field-weight"),l=e.val(),o=i.val(),n=FLBuilderConfig.FontWeights,t={},s=e.closest(".fl-font-field").find(".recent-fonts option");i.html(""),0<s.length&&!1==0<y(s).filter(function(e,t){return t.value===l}).length&&e.closest(".fl-font-field").find(".recent-fonts").append(y("<option>",{value:l,text:l})),t=void 0!==FLBuilderFontFamilies.system[l]?FLBuilderFontFamilies.system[l].weights:(void 0!==FLBuilderFontFamilies.google[l]?FLBuilderFontFamilies.google:FLBuilderFontFamilies.default)[l],y.each(t,function(e,t){i.append('<option value="'+t+'"'+(o===t?" selected":"")+">"+n[t]+"</option>")})},_initTinyMCE:function(){"object"==typeof tinymce&&void 0!==tinymce.ui.FloatPanel&&(tinymce.ui.FloatPanel.zIndex=100100),y(".fl-builder-hidden-editor").each(FLBuilder._initEditorField)},_initEditorFields:function(){y(".fl-builder-settings:visible .fl-editor-field").each(FLBuilder._initEditorField)},_initEditorField:function(){var e=y(this),t=e.find("textarea"),i=e.attr("data-name"),i="flrich"+(new Date).getTime()+"_"+i,l=FLBuilderConfig.wp_editor,o=tinyMCEPreInit,n=Number(e.attr("data-buttons")),e=e.attr("data-rows"),s=null,r=null,l=l.replace(/flbuildereditor/g,i),o=FLBuilder._jsonParse(JSON.stringify(o).replace(/flbuildereditor/g,i));o=JSONfn.parse(JSONfn.stringify(o).replace(/flbuildereditor/g,i)),t.after(l).remove(),y("textarea#"+i).val(t.val()),void 0!==o.mceInit[i]&&((s=o.mceInit[i]).setup=function(e){e.on("SaveContent",function(e){e.content=e.content.replace(/<a href="(\.\.\/){1,2}/g,'<a href="'+FLBuilderConfig.homeUrl+"/"),e.content=e.content.replace(/src="(\.\.\/){1,2}/g,'src="'+FLBuilderConfig.homeUrl+"/")})},(r=tinymce.$("#wp-"+i+"-wrap")).find("textarea").attr("rows",e),r.find("textarea").attr("contentEditable",!0),n||r.find(".wp-media-buttons").remove(),!r.hasClass("tmce-active")&&o.qtInit.hasOwnProperty(i)||s.wp_skip_init||tinymce.init(s)),quicktags(o.qtInit[i]),window.wpActiveEditor=i},_reinitEditorFields:function(){y(".fl-lightbox-resizable:visible").length&&setTimeout(function(){var e,t;if("undefined"!=typeof tinymce){for(e=tinymce.editors.length-1;-1<e;e--)tinymce.editors[e].inline||(t=tinymce.editors[e].id,tinyMCE.execCommand("mceRemoveEditor",!0,t),tinyMCE.execCommand("mceAddEditor",!0,t));FLBuilder.preview&&FLBuilder.preview._initDefaultFieldPreviews(y('.fl-field[data-type="editor"]'))}},1)},_destroyEditorFields:function(){var e;if("undefined"!=typeof tinymce){for(e=tinymce.editors.length-1;-1<e;e--)tinymce.editors[e].inline||tinyMCE.execCommand("mceRemoveEditor",!0,tinymce.editors[e].id);y(".wplink-autocomplete").remove(),y(".ui-helper-hidden-accessible").remove()}},_updateEditorFields:function(){y(".fl-builder-settings:visible textarea.wp-editor-area").each(FLBuilder._updateEditorField)},_updateEditorField:function(){var e=y(this),t=e.closest(".fl-editor-field"),i=(e.closest(".fl-builder-settings"),e.closest(".wp-editor-wrap")),l=e.attr("id"),o=t.attr("data-name"),l="undefined"!=typeof tinymce&&tinymce.get(l),n=e.siblings('textarea[name="'+o+'"]'),t=t.data("wpautop");0===n.length&&(n=y('<textarea name="'+o+'"></textarea>').hide(),e.after(n)),t?l&&i.hasClass("tmce-active")?n.val(l.getContent()):"undefined"!=typeof switchEditors?n.val(switchEditors.wpautop(e.val())):n.val(e.val()):(l&&i.hasClass("tmce-active")&&l.save(),n.val(e.val()))},_loopDataSourceChange:function(){var e=y(this).val();y(".fl-loop-data-source").hide(),y('.fl-loop-data-source[data-source="'+e+'"]').show()},_customQueryPostTypeChange:function(){var e=y(this).val();y(".fl-custom-query-filter").hide(),y(".fl-custom-query-"+e+"-filter").show()},_initOrderingFields:function(){y(".fl-builder-settings:visible .fl-ordering-field-options").each(FLBuilder._initOrderingField)},_initOrderingField:function(){y(this).sortable({items:".fl-ordering-field-option",containment:"parent",tolerance:"pointer",stop:FLBuilder._updateOrderingField})},_updateOrderingField:function(e){var e=y(e.target),t=e.siblings("input[type=hidden]"),i=[];e.find(".fl-ordering-field-option").each(function(){i.push(y(this).attr("data-key"))}),t.val(JSON.stringify(i)).trigger("change")},_textFieldAddValueSelectChange:function(){var e=y(this),t=y('input[name="'+e.data("target")+'"]'),i=t.val(),l=e.val();-1==i.indexOf(l)&&(i=(i.trim()+" "+l.trim()).trim(),t.val(i).trigger("change").trigger("keyup")),e.val("")},_onNumberFieldFocus:function(e){var t=y(e.currentTarget);t.addClass("mousetrap"),Mousetrap.bind("up",function(){t.attr("step",1)}),Mousetrap.bind("down",function(){t.attr("step",1)}),Mousetrap.bind("shift+up",function(){t.attr("step",10)}),Mousetrap.bind("shift+down",function(){t.attr("step",10)})},_onNumberFieldBlur:function(e){y(e.currentTarget).attr("step","any").removeClass("mousetrap")},_initTimezoneFields:function(){y(".fl-builder-settings:visible .fl-field[data-type=timezone]").each(FLBuilder._initTimezoneField)},_initTimezoneField:function(){var e=y(this).find("select"),t=e.attr("data-value");e.find('option[value="'+t+'"]').prop("selected",!0)},_initDimensionFields:function(){var e=y(".fl-builder-settings:visible");e.find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionField),e.find(".fl-dimension-field-link").on("click",FLBuilder._dimensionFieldLinkClicked),FLBuilder.addHook("responsive-editing-switched",this._initResponsiveDimensionFieldLinking),e.find(".fl-compound-field-setting").has(".fl-dimension-field-link").each(FLBuilder._initDimensionFieldLinking)},_initDimensionField:function(){var e=y(this),t=e.find(".fl-field-label label"),e=e.find(".fl-field-control-wrapper"),i='<i class="fl-dimension-field-link fl-tip dashicons dashicons-admin-links" title="Link Values"></i>';t.append(i),e.prepend(i),FLBuilder._initTipTips(),FLBuilder._initDimensionFieldLinking.apply(this)},_initDimensionFieldLinking:function(){var e=y(this),t=e.find(".fl-dimension-field-link"),e=FLBuilder._getDimensionFieldLinkingInputs(e);FLBuilder._dimensionFieldInputsAreEqual(e)?(t.removeClass("dashicons-admin-links"),t.addClass("dashicons-editor-unlink"),e.off("input",FLBuilder._dimensionFieldLinkedValueChange),e.on("input",FLBuilder._dimensionFieldLinkedValueChange)):(t.addClass("dashicons-admin-links"),t.removeClass("dashicons-editor-unlink"))},_initResponsiveDimensionFieldLinking:function(){y(".fl-builder-settings:visible").find(".fl-field[data-type=dimension]").each(FLBuilder._initDimensionFieldLinking)},_dimensionFieldLinkClicked:function(){var e=y(this),t=e.closest(".fl-compound-field-setting"),t=t.length?t:e.closest(".fl-field"),e=t.find(".fl-dimension-field-link"),i=e.hasClass("dashicons-editor-unlink"),t=FLBuilder._getDimensionFieldLinkingInputs(t);e.toggleClass("dashicons-admin-links"),e.toggleClass("dashicons-editor-unlink"),i?t.off("input",FLBuilder._dimensionFieldLinkedValueChange):(t.val(t.eq(0).val()).trigger("input"),t.on("input",FLBuilder._dimensionFieldLinkedValueChange))},_dimensionFieldLinkedValueChange:function(){var e=y(this),t=e.attr("name"),t=e.closest(".fl-dimension-field-units").find('input:not([name="'+t+'"])');t.off("input",FLBuilder._dimensionFieldLinkedValueChange),t.val(e.val()).trigger("input"),t.on("input",FLBuilder._dimensionFieldLinkedValueChange)},_getDimensionFieldLinkingInputs:function(e){var t=!!e.find(".fl-field-responsive-setting").length,i=FLBuilderResponsiveEditing._mode;return t?e.find(".fl-field-responsive-setting-"+i+" input"):e.find(".fl-dimension-field-unit input")},_dimensionFieldInputsAreEqual:function(e){var t=e.eq(0).val();if(""===t)return!1;for(var i=1;i<4;i++)if(e.eq(i).val()!==t)return!1;return!0},_initFieldPopupSliders:function(){y(".fl-builder-settings:visible").find(".fl-field-popup-slider").each(FLBuilder._initFieldPopupSlider)},_initFieldPopupSlider:function(){var n=y("body"),s=y(this),r=s.find(".fl-field-popup-slider-input"),a=s.find(".fl-field-popup-slider-arrow"),e=s.data("input"),d=y('input[name="'+e+'"]');d.on("click",function(){r.hasClass("fl-field-popup-slider-init")||(r.slider({value:d.val(),slide:function(e,t){d.val(t.value).trigger("input")}}),d.on("input",function(){r.slider("value",y(this).val())}),r.addClass("fl-field-popup-slider-init"),r.find(".ui-slider-handle").removeAttr("tabindex")),FLBuilder._setFieldPopupSliderMinMax(r),FLBuilder._hideFieldPopupSliders(),n.on("mousedown",FLBuilder._hideFieldPopupSliders),d.addClass("fl-field-popup-slider-focus"),s.show();var e=y(".fl-builder-settings:visible .fl-builder-settings-tab.fl-active"),t=e.offset(),i=d.offset(),l=d.width(),o=s.offset();o.top+s.outerHeight()>t.top+e.outerHeight()&&s.addClass("fl-field-popup-slider-top"),a.css("left",2+i.left-o.left+l/2+"px")}),d.on("focus",function(){FLBuilder._hideFieldPopupSliders()})},_hideFieldPopupSliders:function(e){var e=e?y(e.target):null,t=y("body"),i=y(".fl-field-popup-slider:visible"),l=y(".fl-field-popup-slider-focus");if(e){if(e.closest(".fl-field-popup-slider").length)return;if(e.closest(".fl-field-popup-slider-focus").length)return}t.off("mousedown",FLBuilder._hideFieldPopupSliders),l.removeClass("fl-field-popup-slider-focus"),i.hide()},_setFieldPopupSliderMinMax:function(e){var t=e.parent(),i=t.parent().parent().find("select.fl-field-unit-select"),l=i.val(),t=t.data("slider"),o=0,n=100,s=1;""!==l&&"em"!==l&&"rem"!==l||(n=10,s=.1),"object"==typeof t&&(o=t.min?parseFloat(t.min):o,n=t.max?parseFloat(t.max):n,s=t.step?parseFloat(t.step):s,i.length&&t[l]&&(o=t[l].min?parseFloat(t[l].min):o,n=t[l].max?parseFloat(t[l].max):n,s=t[l].step?parseFloat(t[l].step):s)),e.slider({min:o,max:n,step:s})},_initPresetFields:function(){y(".fl-builder-settings:visible").find(".fl-preset-select-controls").each(FLBuilder._initPresetField)},_initPresetField:function(){var e=y(this),t=e.find("select"),i=e.data("presets"),e=e.data("prefix");t.on("change",FLBuilder._setFormPreset.bind(this,i,e))},_setFormPreset:function(e,t,i){var l=y(i.currentTarget).val();if(presetLists=FLBuilderConfig.presets,presets=presetLists[e],form=y(".fl-builder-settings:visible"),"undefined"!==presets&&"undefined"!==presets[l]){var o,n=presets[l].settings;for(o in n){var l=n[o],s=void 0!==t&&""!==t?form.find('[name="'+t+o+'"]'):form.find('[name="'+o+'"]');s.val(l).trigger("change").trigger("input")}}},ajax:function(t,i){if(!FLBuilder._ajaxRequest){for(var e in FLBuilder.triggerHook("didBeginAJAX",t),t)void 0===t[e]&&(t[e]=null);return(t._wpnonce=FLBuilderConfig.ajaxNonce,t.post_id=FLBuilderConfig.postId,t.fl_builder=1,t.fl_action=t.action,void 0!==t.settings&&(t.settings=FLBuilder._ajaxModSecFix(y.extend(!0,{},t.settings))),void 0!==t.node_settings&&(t.node_settings=FLBuilder._ajaxModSecFix(y.extend(!0,{},t.node_settings))),void 0!==t.node_preview&&(t.node_preview=FLBuilder._ajaxModSecFix(y.extend(!0,{},t.node_preview))),t.settings=FLBuilder._inputVarsCheck(t.settings),t.node_settings=FLBuilder._inputVarsCheck(t.node_settings),"error"===t.settings||"error"===t.node_settings)?0:(t={fl_builder_data:t},FLBuilder._ajaxRequest=y.post(FLBuilder._ajaxUrl(),t,function(e){void 0!==i&&i.call(this,e),FLBuilder.triggerHook("didCompleteAJAX",t)}).always(FLBuilder._ajaxComplete).fail(function(e,t,i){switch(msg=!1,e.status){case 403:case 409:msg="Something you entered has triggered a "+e.status+" error.<br /><br />This is nearly always due to mod_security settings from your hosting provider.",window.crash_vars.white_label||(msg+='<br /><br />See this <a target="_blank" style="color: #428bca;font-size:inherit" href="https://docs.wpbeaverbuilder.com/beaver-builder/troubleshooting/common-issues/403-forbidden-or-blocked-error">Knowledge Base</a> article for more info.</br />')}msg&&(console.log(e),console.log(i),FLBuilder.alert(msg))}),FLBuilder._ajaxRequest)}FLBuilder._ajaxQueue.push({data:t,callback:i})},_inputVarsCheck:function(e){var t=FLBuilderConfig.MaxInputVars||0;return void 0!==e&&0<t&&(count=y.map(e,function(e,t){return t}).length,count>t)?(FLBuilder.alert('<h1 style="font-size:2em;text-align:center">Critical Issue</h1><br />The number of settings being saved ('+count+") exceeds the PHP Max Input Vars setting ("+t+").<br />Please contact your host to have this value increased, the default is 1000."),console.log("Vars Count: "+count),console.log("Max Input: "+t),"error"):e},_ajaxComplete:function(){var e;FLBuilder._ajaxRequest=null,FLBuilder.hideAjaxLoader(),FLBuilder._ajaxQueue.length&&(e=FLBuilder._ajaxQueue.shift(),FLBuilder.ajax(e.data,e.callback))},_ajaxUrl:function(e){var t=FLBuilderConfig.shortlink,i=null;if(void 0!==e)for(i in e)t=(t+=-1<t.indexOf("?")?"&":"?")+i+"="+e[i];return t},showAjaxLoader:function(){0===y(".fl-builder-lightbox-loading").length&&y(".fl-builder-loading").show()},hideAjaxLoader:function(){y(".fl-builder-loading").hide()},_showNodeLoading:function(e){e=y(".fl-node-"+e);e.addClass("fl-builder-node-loading"),FLBuilder._removeAllOverlays(),FLBuilder.triggerHook("didStartNodeLoading",e)},_hideNodeLoading:function(e){y(".fl-node-"+e).removeClass("fl-builder-node-loading")},_showNodeLoadingPlaceholder:function(e,t){var i=y('<div class="fl-builder-node-loading-placeholder"></div>');y(".fl-builder-node-loading-placeholder").remove(),siblings=e.hasClass("fl-builder-content")?e.find(" > .fl-row"):e.hasClass("fl-row-content")?e.find(" > .fl-col-group"):e.hasClass("fl-col-group")?(e.addClass("fl-col-group-has-child-loading"),e.find(" > .fl-col")):e.find(" > .fl-col-group, > .fl-module"),0===siblings.length||siblings.length==t?e.append(i):siblings.eq(t).before(i)},_removeNodeLoadingPlaceholder:function(e){var t=e.prev(".fl-builder-node-loading-placeholder"),e=e.next(".fl-builder-node-loading-placeholder");(t.length?t:e).remove()},_ajaxModSecFix:function(e){if(FLBuilderConfig.modSecFix&&"undefined"!=typeof btoa)if("string"==typeof e)e=FLBuilder._btoa(e);else for(var t in e)type=typeof e[t],"string"==type||"number"==type?e[t]=FLBuilder._btoa(e[t]):"object"==type&&(e[t]=FLBuilder._ajaxModSecFix(e[t]));return e},_btoa:function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))},_wpmedia_reset_errors:function(){y(".upload-error").remove(),y(".media-uploader-status").removeClass("errors").hide()},_initLightboxes:function(){FLBuilder._lightbox=new FLLightbox({className:"fl-builder-lightbox fl-builder-settings-lightbox",resizable:!0}),FLBuilder._lightbox.on("resized",FLBuilder._calculateSettingsTabsOverflow),FLBuilder._lightbox.on("close",FLBuilder._lightboxClosed),FLBuilder._lightbox.on("beforeCloseLightbox",FLBuilder._destroyEditorFields),FLBuilder._actionsLightbox=new FLLightbox({className:"fl-builder-actions-lightbox"})},_showLightbox:function(e){e=e||'<div class="fl-builder-lightbox-loading"></div>',FLBuilder._lightbox.open(e),FLBuilder._initLightboxScrollbars()},_setLightboxContent:function(e){FLBuilder._lightbox.setContent(e)},_initLightboxScrollbars:function(){FLBuilder._initScrollbars(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=setTimeout(FLBuilder._initLightboxScrollbars,500)},_lightboxClosed:function(){FLBuilder.triggerHook("settings-lightbox-closed"),FLBuilder._lightbox.empty(),clearTimeout(FLBuilder._lightboxScrollbarTimeout),FLBuilder._lightboxScrollbarTimeout=null},_showActionsLightbox:function(e){var t=wp.template("fl-actions-lightbox");FLBuilder.triggerHook("actions-lightbox-settings",e),FLBuilder._actionsLightbox.open(t(e))},_checkEnv:function(){"svg"===FLBuilderConfig.fontAwesome&&FLBuilder.alert(FLBuilderStrings.fontAwesome)},alert:function(e){var t=new FLLightbox({className:"fl-builder-alert-lightbox",destroyOnClose:!0}),i=wp.template("fl-alert-lightbox");t.open(i({message:e}))},crashMessage:function(e){FLLightbox.closeAll();var t=new FLLightbox({className:"fl-builder-alert-lightbox fl-builder-crash-lightbox",destroyOnClose:!0}),i=wp.template("fl-crash-lightbox"),l=window.crash_vars.product,o=window.crash_vars.white_label,n=window.crash_vars.labeled_txt;message=l+" has detected a plugin conflict that is preventing the page from saving.<p>( In technical terms there’s probably a PHP error in Ajax. )</p>",info="<p>If you contact Beaver Builder Support, we need to know what the error is in the JavaScript console in your browser.</p>",info+="<div><div style='width:49%;float:left;'>",info+="<p>MacOS Users:<br />Chrome: View > Developer > JavaScript Console<br />Firefox: Tools > Web Developer > Browser Console<br />Safari: Develop > Show JavaScript console</p>",info+="</div>",info+="<div style='width:49%;float:right;'>",info+="<p>Windows Users:<br />Chrome: Settings > More Tools > Developer > Console<br />Firefox: Menu/Settings > Web Developer > Web Console<br />Edge: Settings and More > More Tools > Console</p>",info+="</div></div>",info+="<p style='display:inline-block;'>Copy the errors you find there and submit them with your Support ticket. It saves us having to ask you that as a second step.<br /><br />If you want to troubleshoot further, you can check our <a class='link' target='_blank' href='https://docs.wpbeaverbuilder.com/beaver-builder/troubleshooting/debugging/known-beaver-builder-incompatibilities'>Knowledge Base</a> for plugins we know to be incompatible. Then deactivate your plugins one by one while you try to save the page in the Beaver Builder editor. When the page saves normally, you have identified the plugin causing the conflict. <a class='link' target='_blank' href='https://www.wpbeaverbuilder.com/beaver-builder-support/'>Contact Support</a> if you need further help.</p>",FLBuilderConfig.MaxInputVars<=3e3&&(info+="<br /><br />The PHP config value max_input_vars is only set to "+FLBuilderConfig.MaxInputVars+'. If you are using 3rd party addons this could very likely be the cause of this error. [<a class="link" href="https://docs.wpbeaverbuilder.com/beaver-builder/troubleshooting/common-issues/exceeds-php-max-input-vars">doc link</a>].'),o&&(info=n),t.open(i({message:message,info:info,debug:!1}))},_alertClose:function(){FLLightbox.closeParent(this)},confirm:function(e){var t={message:"",ok:function(){},cancel:function(){},strings:{ok:FLBuilderStrings.ok,cancel:FLBuilderStrings.cancel}},t=y.extend({},t,void 0===e?{}:e);lightbox=new FLLightbox({className:"fl-builder-confirm-lightbox fl-builder-alert-lightbox",destroyOnClose:!0}),template=wp.template("fl-confirm-lightbox"),lightbox.open(template(t)),lightbox._node.find(".fl-builder-confirm-ok").on("click",t.ok),lightbox._node.find(".fl-builder-confirm-cancel").on("click",t.cancel)},triggerHook:function(e,t){y("body").trigger("fl-builder."+e,t)},addHook:function(e,t){y("body").on("fl-builder."+e,t)},removeHook:function(e,t){y("body").off("fl-builder."+e,t)},log:function(e){void 0!==window.console&&void 0!==window.console.log&&console.log(e)},logError:function(e,t){var i=null;void 0!==e&&(void 0!==e.stack?i=e.stack:void 0!==e.message&&(i=e.message),i&&(FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(i),void 0!==t&&t&&(FLBuilder.log("Debug Info"),console.log(t)),y.each(window.crash_vars.vars,function(e,t){console.log(e+": "+t)}),FLBuilder.log("************************************************************************"),void 0!==t&&t&&(i=t+"\n"+i),FLBuilder.crashMessage(i)))},logGlobalError:function(e,t,i,l,o){FLBuilder.log("************************************************************************"),FLBuilder.log(FLBuilderStrings.errorMessage),FLBuilder.log(FLBuilderStrings.globalErrorMessage.replace("{message}",e).replace("{line}",i).replace("{file}",t)),void 0!==o&&void 0!==o.stack&&FLBuilder.log(o.stack),FLBuilder.log("************************************************************************")},_jsonParse:function(t){try{t=JSON.parse(t)}catch(e){FLBuilder.logError(e,FLBuilder._parseError(t))}return t},_parseError:function(e){return e.indexOf("</head>")?"AJAX returned HTML page instead of data. (Possible 404 or max_input_vars)":(php=e.match(/^<.*/gm)||!1,!!(php&&0<php.length)&&(i="",y.each(php,function(e,t){i+=t}),y(i).text()));var i},isUndefined:function(e){return void 0===e},isBoolean:function(e){return!0===e||!1===e},getSandbox:function(e){return e in this._sandbox&&this._sandbox[e]},setSandbox:function(e,t){this._sandbox[e]=t},deleteSandbox:function(e){delete this._sandbox[e]}},y(function(){FLBuilder._init()})}(jQuery),function(n){FLBuilderAJAXLayout=function(e,t){this._data=n.extend({},this._defaults,"string"==typeof e?FLBuilder._jsonParse(e):e),this._callback=t,this._post=FLBuilderConfig.postId,this._head=n("head").eq(0),this._body=n("body").eq(0),this._data.css&&("inline"===FLBuilderConfig.enqueueMethod?(this._oldCss=n("#fl-builder-layout-"+this._post+"-inline-css"),this._newCss=n('<style id="fl-builder-layout-'+this._post+'-inline-css" type="text/css">'+this._data.css+"</style>")):(this._loader=n('<img src="'+this._data.css+'" />'),this._oldCss=n('link[href*="/cache/'+this._post+'-layout"]'),this._newCss=n('<link rel="stylesheet" id="fl-builder-layout-'+this._post+'-css" href="'+this._data.css+'" />'))),this._data.partial?(this._data.js&&(this._oldJs=n("#fl-builder-partial-refresh-js"),this._newJs=n('<script type="text/javascript" id="fl-builder-partial-refresh-js">'+this._data.js+"<\/script>")),this._data.nodeId&&(this._data.oldNodeId?(this._oldScriptsStyles=n('.fl-builder-node-scripts-styles[data-node="'+this._data.oldNodeId+'"]'),this._content=n(".fl-node-"+this._data.oldNodeId)):(this._oldScriptsStyles=n('.fl-builder-node-scripts-styles[data-node="'+this._data.nodeId+'"]'),this._content=n(".fl-node-"+this._data.nodeId).eq(0)))):("inline"===FLBuilderConfig.enqueueMethod?(this._oldJs=n("#fl-builder-layout-"+this._post+"-inline-js"),this._newJs=n('<script id="fl-builder-layout-'+this._post+'-inline-js">'+this._data.js+"<\/script>")):(this._oldJs=n('script[src*="/cache/'+this._post+'"]'),this._newJs=n('<script src="'+this._data.js+'"><\/script>')),this._oldScriptsStyles=n(".fl-builder-layout-scripts-styles"),this._content=n(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._data.css?"inline"===FLBuilderConfig.enqueueMethod?(this._addNewCSS(),this._finish()):"onload"in document.createElement("link")?(this._newCss.on("load",n.proxy(this._finish,this)),this._addNewCSS()):(this._loader.on("error",n.proxy(this._loadNewCSSFallbackComplete,this)),this._body.append(this._loader)):this._finish()},_loadNewCSSFallbackComplete:function(){this._loader.remove(),this._addNewCSS(),setTimeout(n.proxy(this._finish,this),250)},_addNewCSS:function(){0<this._oldCss.length?this._oldCss.after(this._newCss):this._head.append(this._newCss)},_finish:function(){this._removeOldContentAndAssets(),this._cleanNewHTML(),this._cleanNewAssets(),this._addNewHTML(),this._addNewScriptsStyles(),this._addNewJS(),n(FLBuilder._contentClass).trigger("fl-builder.layout-rendered"),FLBuilder.hideAjaxLoader()},_removeOldContentAndAssets:function(){this._content&&this._content.empty(),this._oldCss&&this._oldCss.remove(),this._oldJs&&this._oldJs.remove(),this._oldScriptsStyles&&this._oldScriptsStyles.remove()},_cleanNewHTML:function(){var e,t,i,l;this._data.scriptsStyles&&(e=n("<div>"+this._data.html+"</div>"),t="fl-row",i=this._data.scriptsStyles,l="",this._data.partial&&(t="column-group"==this._data.nodeType?"fl-col-group":"column"==this._data.nodeType?"fl-col":"fl-"+this._data.nodeType),e.find("> *, script").each(function(){n(this).hasClass(t)||"application/json"==n(this).attr("type")||(l=n(this).remove(),i+=l[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=e.html(),this._data.scriptsStyles=i)},_addNewHTML:function(){var e;this._data.partial?this._data.nodeParent?(0===(e=(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.hasClass("fl-col-group")?this._data.nodeParent.find(" > .fl-col"):this._data.nodeParent.find(" > .fl-col-group, > .fl-module")).filter(":not(.fl-builder-node-clone)")).length||this._data.nodePosition>=e.length?this._data.nodeParent.append(this._data.html):e.eq(this._data.nodePosition).before(this._data.html),this._data.nodeId&&FLBuilder._removeNodeLoadingPlaceholder(n(".fl-node-"+this._data.nodeId))):(this._content.after(this._data.html),this._content.remove()):this._content.append(this._data.html),FLBuilder.preview&&this._data.nodeId&&this._data.nodeId!=FLBuilder.preview.nodeId&&((e=n(FLBuilder.preview.classes.node)).closest(".fl-node-"+this._data.nodeId).length&&e.html(FLBuilder.preview.elements.node.html())),this._data.onAddNewHTML&&this._data.onAddNewHTML()},_cleanNewAssets:function(){var e=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?n(".fl-builder-node-scripts-styles").each(function(){-1<e._data.html.indexOf("fl-node-"+n(this).data("node"))&&n(this).remove()}):(n("#fl-builder-partial-refresh-js").remove(),n(".fl-builder-node-scripts-styles").remove())},_removeDuplicateAssets:function(e){var e=n("<div>"+e+"</div>"),t="",i="",l=window.location,o=l.protocol+"//"+l.hostname+(l.port?":"+l.port:"");return e.find("script").each(function(){void 0!==(t=n(this).attr("src"))&&(t=t.replace(o,""),0<n('script[src*="'+t+'"]').length&&n(this).remove())}),e.find("link").each(function(){void 0!==(i=n(this).attr("href"))&&(i=i.replace(o,""),0<n('link[href*="'+i+'"]').length&&n(this).remove())}),e.html()},_addNewScriptsStyles:function(){this._data.scriptsStyles&&""!==this._data.scriptsStyles&&this._body.append(this._data.scriptsStyles)},_addNewJS:function(){setTimeout(n.proxy(function(){this._newJs&&this._head.append(this._newJs),FLBuilder.triggerHook("didRenderLayoutJSComplete")},this),50)},_complete:function(){FLBuilder._dragging?(FLBuilder._highlightRowsAndColsForDrag(),FLBuilder._refreshSortables()):(FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._initDropTargets(),FLBuilder._initSortables(),FLBuilder._resizeLayout()),FLBuilder._initMediaElements(),FLBuilderLayout.init(),FLBuilderResponsiveEditing.refreshPreview(this._callback),FLBuilder.triggerHook("didRenderLayoutComplete"),this._body.height("auto")}}}(jQuery),function(h){FLBuilderPreview=function(e){this.id=(new Date).getTime(),this.type=e.type,this._saveState(),e.layout?FLBuilder._renderLayout(e.layout,function(){this._init(),e.callback&&e.callback()}.bind(this)):this._init()},FLBuilderPreview._fontsList={},FLBuilderPreview.getFormattedSelector=function(e,t){for(var i="",l=t.split(","),o=0;o<l.length;o++)-1<l[o].indexOf("{node}")?i+=l[o].replace("{node}",e):-1<l[o].indexOf("{node_id}")?i+=l[o].replace(/{node_id}/g,this.nodeId):i+=e+" "+l[o],o!=l.length-1&&(i+=", ");return i},FLBuilderPreview.prototype={id:"",type:"",nodeId:null,classes:{},elements:{},state:null,_savedSettings:null,_styleSheet:null,_styleSheetMedium:null,_styleSheetResponsive:null,_timeout:null,_loaderTimeout:null,_lastClassName:null,_xhr:null,_init:function(){switch(this.nodeId=h(".fl-builder-settings").data("node"),this._saveSettings(),this._initElementsAndClasses(),this._createSheets(),this._initResponsivePreviews(),this._initDefaultFieldPreviews(),this.type){case"row":this._initRow();break;case"col":this._initColumn();break;case"module":this._initModule()}FLBuilder.triggerHook("preview-init",this)},_saveSettings:function(){var e=h(".fl-builder-settings-lightbox .fl-builder-settings");this._savedSettings=FLBuilder._getSettingsForChangedCheck(this.nodeId,e)},_settingsHaveChanged:function(){var e=h(".fl-builder-settings-lightbox .fl-builder-settings"),e=FLBuilder._getSettings(e);return JSON.stringify(this._savedSettings)!=JSON.stringify(e)},_initElementsAndClasses:function(){var e="row"==this.type?".fl-row-content-wrap":".fl-"+this.type+"-content";h.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+" > "+e}),h.extend(this.elements,{settings:h(this.classes.settings),settingsHeader:h(this.classes.settingsHeader),node:h(this.classes.node),content:h(this.classes.content)})},_createSheets:function(){this._destroySheets(),this._styleSheet||(this._styleSheet=new FLStyleSheet({id:"fl-builder-preview",className:"fl-builder-preview-style"})),this._styleSheetMedium||(this._styleSheetMedium=new FLStyleSheet({id:"fl-builder-preview-medium",className:"fl-builder-preview-style"}),this._styleSheetMedium.disable()),this._styleSheetResponsive||(this._styleSheetResponsive=new FLStyleSheet({id:"fl-builder-preview-responsive",className:"fl-builder-preview-style"}),this._styleSheetResponsive.disable())},_destroySheets:function(){this._styleSheet&&(this._styleSheet.destroy(),this._styleSheet=null),this._styleSheetMedium&&(this._styleSheetMedium.destroy(),this._styleSheetMedium=null),this._styleSheetResponsive&&(this._styleSheetResponsive.destroy(),this._styleSheetResponsive=null)},_disableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=FLBuilderConfig.global,i=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.responsive_breakpoint),this._styleSheetResponsive.disable()):"medium"===e?(FLBuilderSimulateMediaQuery.disableStyles(t.medium_breakpoint),this._styleSheetMedium.disable()):i.removeClass(function(e,t){return(t.match(/fl-node-[^\s]*/g)||[]).join(" ")})},_enableStyles:function(){var e=FLBuilderResponsiveEditing._mode,t=this.elements.node;"responsive"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetResponsive.enable()):"medium"===e?(FLBuilderSimulateMediaQuery.enableStyles(),this._styleSheetMedium.enable()):t.addClass("fl-node-"+t.data("node"))},_getDefaultValue:function(e,t){var i="",e=h(e),l=e.closest("[data-node]");return"width"===t?i="auto":-1===h.inArray(t,["line-height","font-weight"])&&l.length&&(this._disableStyles(),i=e.css(t),this._enableStyles()),i},updateCSSRule:function(e,t,i,l){var o=FLBuilderResponsiveEditing._mode,n="";""!==i&&"null"!==i||(i=this._getDefaultValue(e,t)),l?(n="string"==typeof l?this.toUpperCaseWords(l):"default"===o?"":this.toUpperCaseWords(o),this["_styleSheet"+n].updateRule(e,t,i)):this._styleSheet.updateRule(e,t,i)},delay:function(e,t){this._cancelDelay(),this._timeout=setTimeout(t,e)},_cancelDelay:function(){null!==this._timeout&&clearTimeout(this._timeout)},hexToRgb:function(e){e=parseInt(e,16);return[e>>16&255,e>>8&255,255&e]},hexOrRgb:function(e){return e=e.indexOf("rgb")<0&&e.indexOf("#")<0?"#"+e:e},parseFloat:function(e){return isNaN(parseFloat(e))?0:parseFloat(e)},_initResponsivePreviews:function(){var e=".preview-"+this.id;FLBuilder.addHook("responsive-editing-switched"+e,h.proxy(this._responsiveEditingSwitched,this)),FLBuilder.addHook("responsive-editing-before-preview-fields"+e,h.proxy(this._responsiveEditingPreviewFields,this))},_destroyResponsivePreviews:function(){var e=".preview-"+this.id;FLBuilder.removeHook("responsive-editing-switched"+e),FLBuilder.removeHook("responsive-editing-before-preview-fields"+e)},_responsiveEditingSwitched:function(e,t){"default"==t?(this._styleSheetMedium.disable(),this._styleSheetResponsive.disable()):"medium"==t?(this._styleSheetMedium.enable(),this._styleSheetResponsive.disable()):"responsive"==t&&(this._styleSheetMedium.enable(),this._styleSheetResponsive.enable())},_responsiveEditingPreviewFields:function(e,t){"medium"===t&&"col"===this.type&&this.elements.node[0].style.width&&(size=parseFloat(this.elements.node[0].style.width),this.elements.size.val(size))},updateResponsiveCSSRule:function(e,t,i){this.updateCSSRule(e,t,i,!0)},_saveState:function(){var e=FLBuilderConfig.postId,t=h('link[href*="/cache/'+e+'"]').attr("href"),e=h('script[src*="/cache/'+e+'"]').attr("src"),i=h(FLBuilder._contentClass).html();this.state={css:t,js:e,html:i}},preview:function(){var e=h(".fl-builder-settings-lightbox .fl-builder-settings"),t=e.attr("data-node"),e=FLBuilder._getSettings(e);if(FLBuilder._showNodeLoading(t),this._cancelPreview(),"error"===(e=FLBuilder._inputVarsCheck(e)))return 0;this._xhr=FLBuilder.ajax({action:"render_layout",node_id:t,node_preview:e},h.proxy(this._renderPreview,this))},delayPreview:function(e){var t=void 0===e?[]:h(e.target).closest("tr").find("th"),i=h(".fl-builder-widget-settings .fl-builder-settings-title"),l=h(".fl-builder-settings .fl-lightbox-header"),e=FLBuilderLayoutConfig.paths.pluginUrl+"img/ajax-loader-small.svg",o=h('<img class="fl-builder-preview-loader" src="'+e+'" />');this.delay(1e3,h.proxy(this.preview,this)),this._loaderTimeout=setTimeout(function(){h(".fl-builder-preview-loader").remove(),0<t.length?t.append(o):0<i.length?i.append(o):0<l.length&&l.append(o)},1500)},_cancelPreview:function(){this._xhr&&(this._xhr.abort(),this._xhr=null)},_renderPreview:function(e){this._xhr=null,FLBuilder._renderLayout(e,h.proxy(this._renderPreviewComplete,this))},_renderPreviewComplete:function(){this._createSheets(),this._initElementsAndClasses(),this._initDefaultFieldPreviews(),null!==this._loaderTimeout&&clearTimeout(this._loaderTimeout),h(".fl-builder-preview-loader").remove(),h(FLBuilder._contentClass).trigger("fl-builder.preview-rendered")},revert:function(){var e=this.nodeId;this._settingsHaveChanged()?("col"===this.type&&(e=this.elements.node.closest(".fl-col-group").data("node")),FLBuilder._updateNode(e,function(){this.clear()}.bind(this))):this.clear()},cancel:function(){this._cancelDelay(),this._cancelPreview()},clear:function(){this.cancel(),this._destroySheets(),this._destroyResponsivePreviews()},_initNodeTextColor:function(){h.extend(this.elements,{textColor:h(this.classes.settings+" input[name=text_color]"),linkColor:h(this.classes.settings+" input[name=link_color]"),hoverColor:h(this.classes.settings+" input[name=hover_color]"),headingColor:h(this.classes.settings+" input[name=heading_color]")}),this.elements.textColor.on("change",h.proxy(this._textColorChange,this)),this.elements.linkColor.on("change",h.proxy(this._textColorChange,this)),this.elements.hoverColor.on("change",h.proxy(this._textColorChange,this)),this.elements.headingColor.on("change",h.proxy(this._textColorChange,this))},_textColorChange:function(e){var t=this.elements.textColor.val(),i=this.elements.linkColor.val(),l=this.elements.hoverColor.val(),o=this.elements.headingColor.val(),i=""===i?t:i,l=""===l?t:l,o=""===o?t:o;t&&t.indexOf("rgb")<0&&(t="#"+t),i&&i.indexOf("rgb")<0&&(i="#"+i),l&&l.indexOf("rgb")<0&&(l="#"+l),o&&o.indexOf("rgb")<0&&(o="#"+o),this.delay(50,h.proxy(function(){""===t?this.updateCSSRule(this.classes.node,"color",""):this.updateCSSRule(this.classes.node,"color",t),""===i?this.updateCSSRule(this.classes.node+" a","color",""):this.updateCSSRule(this.classes.node+" a","color",i),""===l?this.updateCSSRule(this.classes.node+" a:hover","color",""):this.updateCSSRule(this.classes.node+" a:hover","color",l),""===o?(this.updateCSSRule(this.classes.node+" h1","color",""),this.updateCSSRule(this.classes.node+" h2","color",""),this.updateCSSRule(this.classes.node+" h3","color",""),this.updateCSSRule(this.classes.node+" h4","color",""),this.updateCSSRule(this.classes.node+" h5","color",""),this.updateCSSRule(this.classes.node+" h6","color",""),this.updateCSSRule(this.classes.node+" h1 a","color",""),this.updateCSSRule(this.classes.node+" h2 a","color",""),this.updateCSSRule(this.classes.node+" h3 a","color",""),this.updateCSSRule(this.classes.node+" h4 a","color",""),this.updateCSSRule(this.classes.node+" h5 a","color",""),this.updateCSSRule(this.classes.node+" h6 a","color","")):(this.updateCSSRule(this.classes.node+" h1","color",o),this.updateCSSRule(this.classes.node+" h2","color",o),this.updateCSSRule(this.classes.node+" h3","color",o),this.updateCSSRule(this.classes.node+" h4","color",o),this.updateCSSRule(this.classes.node+" h5","color",o),this.updateCSSRule(this.classes.node+" h6","color",o),this.updateCSSRule(this.classes.node+" h1 a","color",o),this.updateCSSRule(this.classes.node+" h2 a","color",o),this.updateCSSRule(this.classes.node+" h3 a","color",o),this.updateCSSRule(this.classes.node+" h4 a","color",o),this.updateCSSRule(this.classes.node+" h5 a","color",o),this.updateCSSRule(this.classes.node+" h6 a","color",o))},this))},_initNodeBg:function(){h.extend(this.elements,{bgType:h(this.classes.settings+" select[name=bg_type]"),bgColor:h(this.classes.settings+" input[name=bg_color]"),bgColorPicker:h(this.classes.settings+" .fl-picker-bg_color"),bgGradientType:h(this.classes.settings+" select.fl-gradient-picker-type-select"),bgVideoSource:h(this.classes.settings+" select[name=bg_video_source]"),bgVideo:h(this.classes.settings+" input[name=bg_video]"),bgVideoServiceUrl:h(this.classes.settings+" input[name=bg_video_service_url]"),bgVideoFallbackSrc:h(this.classes.settings+" select[name=bg_video_fallback_src]"),bgSlideshowSource:h(this.classes.settings+" select[name=ss_source]"),bgSlideshowPhotos:h(this.classes.settings+" input[name=ss_photos]"),bgSlideshowFeedUrl:h(this.classes.settings+" input[name=ss_feed_url]"),bgSlideshowSpeed:h(this.classes.settings+" input[name=ss_speed]"),bgSlideshowTrans:h(this.classes.settings+" select[name=ss_transition]"),bgSlideshowTransSpeed:h(this.classes.settings+" input[name=ss_transitionDuration]"),bgParallaxImageSrc:h(this.classes.settings+" select[name=bg_parallax_image_src]"),bgOverlayType:h(this.classes.settings+" select[name=bg_overlay_type]"),bgOverlayColor:h(this.classes.settings+" input[name=bg_overlay_color]"),bgOverlayGradient:h(this.classes.settings+" #fl-field-bg_overlay_gradient select")}),this.elements.bgType.on("change",h.proxy(this._bgTypeChange,this)),this.elements.bgColor.on("change",h.proxy(this._bgColorChange,this)),this.elements.bgVideoServiceUrl.on("change",h.proxy(this._bgVideoChange,this)),this.elements.bgSlideshowSource.on("change",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowPhotos.on("change",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowFeedUrl.on("keyup",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowSpeed.on("keyup",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTrans.on("change",h.proxy(this._bgSlideshowChange,this)),this.elements.bgSlideshowTransSpeed.on("keyup",h.proxy(this._bgSlideshowChange,this)),this.elements.bgParallaxImageSrc.on("change",h.proxy(this._bgParallaxChange,this)),this.elements.bgOverlayType.on("change",h.proxy(this._bgOverlayChange,this)),this.elements.bgOverlayColor.on("change",h.proxy(this._bgOverlayChange,this))},_bgTypeChange:function(e){var t=this.elements.bgType.val(),i=FLBuilderResponsiveEditing._mode;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"),this.updateCSSRule(this.classes.content,"background-image","none"),this.updateCSSRule(this.classes.content,"background-image","none","medium"),this.updateCSSRule(this.classes.content,"background-image","none","responsive"),"none"==t?this._bgOverlayClear():"color"==t?(this.elements.bgColor.trigger("change"),this._bgOverlayClear()):"gradient"==t?(this.elements.bgGradientType.trigger("change"),this._bgOverlayClear()):"photo"==t?(this.elements.bgColor.trigger("change"),this.elements.settings.find('[data-device="'+i+'"] select[name*="bg_"]').trigger("change")):"video"==t?(this.elements.bgColor.trigger("change"),this._bgVideoChange()):"slideshow"==t?(this.elements.bgColor.trigger("change"),this._bgSlideshowChange()):"parallax"==t&&(this.elements.bgColor.trigger("change"),this.elements.bgParallaxImageSrc.trigger("change"))},_bgColorChange:function(e){var t;""===this.elements.bgColor.val()?this.updateCSSRule(this.classes.content,"background-color","transparent"):(t=this.hexOrRgb(this.elements.bgColor.val()),this.delay(100,h.proxy(function(){this.updateCSSRule(this.classes.content,"background-color",t)},this)))},_bgVideoChange:function(e){var t=this.elements,i=t.bgVideoSource.val(),l=t.bgVideo.val(),t=t.bgVideoServiceUrl.val(),o=h("<script>");"video_service"==i&&""!=t?(/^(?:(?:(?:https?:)?\/\/)?(?:www.)?(?:youtu(?:be.com|.be))\/(?:watch\?v\=|v\/|embed\/)?([\w\-]+))/i.test(t)&&h('script[src*="youtube.com"').length<1?o.attr("src","https://www.youtube.com/iframe_api"):/^(http\:\/\/|https\:\/\/)?(www\.)?(vimeo\.com\/)([0-9]+)$/.test(t)&&h('script[src*="vimeo.com"').length<1&&o.attr("src","https://player.vimeo.com/api/player.js"),o.attr("type","text/javascript").appendTo("head"),this.delay(500,h.proxy(this.preview,this))):""!=l&&this.preview()},_bgSlideshowChange:function(e){var t=this.elements,i=t.bgSlideshowSource.val(),l=t.bgSlideshowPhotos.val(),o=t.bgSlideshowFeedUrl.val(),n=t.bgSlideshowSpeed.val(),t=t.bgSlideshowTransSpeed.val();"wordpress"==i&&""===l||"smugmug"==i&&""===o||isNaN(parseInt(n))||isNaN(parseInt(t))||this.delay(500,h.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(e){var t,i=this.elements.bgOverlayType.val(),l=this.elements.bgOverlayColor.val();"color"===i?(""===l?(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")):(t=this.hexOrRgb(this.elements.bgOverlayColor.val()),this.delay(100,h.proxy(function(){this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color",t)},this))),this.updateCSSRule(this.classes.content+"::after","background-image","none")):"gradient"===i?(this._bgOverlayAddClasses(),this.updateCSSRule(this.classes.content+"::after","background-color","transparent"),this.elements.bgOverlayGradient.trigger("change")):(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"),this.updateCSSRule(this.classes.content+"::after","background-image","none"))},_bgOverlayAddClasses:function(){this.elements.node.hasClass("fl-col")?this.elements.node.addClass("fl-col-bg-overlay"):this.elements.node.addClass("fl-row-bg-overlay")},_bgOverlayClear:function(e){this.elements.bgOverlayColor.prev(".fl-color-picker-clear").trigger("click"),this.elements.bgOverlayType.val("color").trigger("change")},_initNodeClassName:function(){h.extend(this.elements,{className:h(this.classes.settings+" input[name=class]")}),this.elements.className.on("keyup",h.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},_initNodeDimensions:function(e){for(var t,i={},l=["Top","Bottom","Left","Right"],o=["","Medium","Responsive"],n=this.classes.settings,s="",r=null,a=null,r=0;r<l.length;r++)for(a=0;a<o.length;a++)t=e+l[r]+o[a],s=e+"_"+l[r].toLowerCase(),""!=o[a]&&(s+="_"+o[a].toLowerCase()),i[t]=h(n+" input[name="+s+"]");h.extend(this.elements,i)},_initRow:function(){h.extend(this.elements,{width:h(this.classes.settings+" select[name=width]"),contentWidth:h(this.classes.settings+" select[name=content_width]"),maxContentWidth:h(this.classes.settings+" input[name=max_content_width]"),maxContentWidthUnit:h(this.classes.settings+" select[name=max_content_width_unit]"),height:h(this.classes.settings+" select[name=full_height]"),minHeight:h(this.classes.settings+" input[name=min_height]"),align:h(this.classes.settings+" select[name=content_alignment]")}),this.elements.width.on("change",h.proxy(this._rowWidthChange,this)),this.elements.contentWidth.on("change",h.proxy(this._rowContentWidthChange,this)),this.elements.maxContentWidth.on("input",h.proxy(this._rowMaxContentWidthChange,this)),this.elements.maxContentWidthUnit.on("change",h.proxy(this._rowMaxContentWidthChange,this)),this.elements.height.on("change",h.proxy(this._rowHeightChange,this)),this.elements.align.on("change",h.proxy(this._rowHeightChange,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_rowWidthChange:function(e){FLBuilderConfig.global;var t=this.elements.node,i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"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")),this._rowMaxContentWidthChange()},_rowContentWidthChange:function(e){FLBuilderConfig.global;var t=this.elements.node,i=this.elements.content.find(".fl-row-content");this.elements.maxContentWidth.val(),this.elements.maxContentWidthUnit.val();t.css("max-width","none"),i.css("max-width","none"),"full"==this.elements.contentWidth.val()?(i.removeClass("fl-row-fixed-width"),i.addClass("fl-row-full-width")):(i.removeClass("fl-row-full-width"),i.addClass("fl-row-fixed-width"),this._rowMaxContentWidthChange())},_rowMaxContentWidthChange:function(e){var t=FLBuilderConfig.global,i=this.elements.node,l=this.elements.content.find(".fl-row-content"),o=this.elements.maxContentWidth.val(),n=this.elements.maxContentWidthUnit.val();""==o?o=t.row_width+t.row_width_unit:o+=n,"fixed"===this.elements.width.val()&&i.css("max-width",o),l.css("max-width",o)},_rowHeightChange:function(e){var t=this.elements.node;this.elements.content;t.removeClass("fl-row-align-top"),t.removeClass("fl-row-align-center"),t.removeClass("fl-row-align-bottom"),t.removeClass("fl-row-full-height"),t.removeClass("fl-row-custom-height"),"full"==this.elements.height.val()?(t.addClass("fl-row-full-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.val("").trigger("input")):"custom"==this.elements.height.val()?(t.addClass("fl-row-custom-height"),t.addClass("fl-row-align-"+this.elements.align.val()),this.elements.minHeight.trigger("input")):this.elements.minHeight.val("").trigger("input")},_initColumn:function(){h.extend(this.elements,{size:h(this.classes.settings+" input[name=size]"),sizeMedium:h(this.classes.settings+" input[name=size_medium]"),sizeResponsive:h(this.classes.settings+" input[name=size_responsive]"),columnHeight:h(this.classes.settings+" select[name=equal_height]"),columnAlign:h(this.classes.settings+" select[name=content_alignment]"),responsiveOrder:h(this.classes.settings+" select[name=responsive_order]")}),this.elements.size.on("input",h.proxy(this._colSizeChange,this)),this.elements.sizeMedium.on("input",h.proxy(this._colSizeChange,this)),this.elements.sizeResponsive.on("input",h.proxy(this._colSizeChange,this)),this.elements.columnHeight.on("change",h.proxy(this._colHeightChange,this)),this.elements.columnAlign.on("change",h.proxy(this._colHeightChange,this)),this.elements.responsiveOrder.on("change",h.proxy(this._colResponsiveOrder,this)),this._initNodeTextColor(),this._initNodeBg(),this._initNodeClassName(),this._initNodeDimensions("border"),this._initNodeDimensions("margin"),this._initNodeDimensions("padding")},_colSizeChange:function(e){var e=h(e.target),t=92,i=parseFloat(e.val()),l=this.elements.node.closest(".fl-col-group"),o=this.elements.node.prev(".fl-col"),n=this.elements.node.next(".fl-col"),s=0===n.length?o:n,o=this.elements.node.siblings(".fl-col"),r=0,n=FLBuilderResponsiveEditing._mode;0!==o.length&&(isNaN(i)&&("medium"===n?i=this.elements.size.val():"responsive"===n&&(i=this.elements.sizeMedium.val()?this.elements.sizeMedium.val():"auto"),"auto"!==i&&isNaN(i)&&(i=8)),"default"===n?(o.each(function(){h(this).data("node")!=s.data("node")&&(t-=parseFloat(h(this)[0].style.width),r+=parseFloat(h(this)[0].style.width))}),t<(i=i<8?8:i)&&(i=t),this.elements.node.css("width",i+"%"),s.css("width",100-r-i+"%")):(100<i&&e.val(i=100),this.updateCSSRule(this.classes.node,{"max-width":("auto"===i?100:i)+"% !important",width:("auto"===i?i:i+"%")+" !important"},void 0,!0),"responsive"===n&&(e.val()?(this.updateCSSRule(this.classes.node,"float",FLBuilderConfig.isRtl?"right":"left",!0),this.updateCSSRule(this.classes.node,"clear","none",!0)):(this.updateCSSRule(this.classes.node,"float","none",!0),this.updateCSSRule(this.classes.node,"clear","both",!0)),e.val()||this._colsHaveCustomResponsiveWidth(o)?l.addClass("fl-col-group-custom-width"):l.removeClass("fl-col-group-custom-width"))))},_colsHaveCustomResponsiveWidth:function(e){var t=FLBuilderSettingsConfig.nodes,i=!1;return e.each(function(){var e=h(this).data("node");t[e]&&t[e].size_responsive&&(i=!0)}),i},_colHeightChange:function(){var e=this.elements.node.parent(".fl-col-group");e.removeClass("fl-col-group-align-top"),e.removeClass("fl-col-group-align-center"),e.removeClass("fl-col-group-align-bottom"),"yes"==this.elements.columnHeight.val()?(e.addClass("fl-col-group-equal-height"),e.addClass("fl-col-group-align-"+this.elements.columnAlign.val())):e.removeClass("fl-col-group-equal-height")},_colResponsiveOrder:function(){var e=this.elements.node.parent(".fl-col-group");"reversed"==this.elements.responsiveOrder.val()?e.addClass("fl-col-group-responsive-reversed"):e.removeClass("fl-col-group-responsive-reversed")},_initModule:function(){this._initNodeClassName(),this._initNodeDimensions("margin")},_initDefaultFieldPreviews:function(e){for(var t,i,e=FLBuilder.isUndefined(e)?this.elements.settings.find(".fl-field"):e,l=null,o=0;o<e.length;o++)t=(l=e.eq(o)).data("type"),"refresh"==(i=l.data("preview")).type&&this._initFieldRefreshPreview(l),"text"==i.type&&this._initFieldTextPreview(l),"css"==i.type&&this._initFieldCSSPreview(l),"widget"==i.type&&this._initFieldWidgetPreview(l),"font"==i.type&&this._initFieldFontPreview(l),"attribute"==i.type&&this._initFieldAttributePreview(l),"animation"==i.type&&this._initFieldAnimationPreview(i,l),"callback"==i.type&&this._initFieldCallbackPreview(i,l,t,e),this._initFieldUnitSelect(l)},_initFieldCallbackPreview:function(e,t,i,u){var l,o=e.callback,n=h(".fl-builder-settings:visible"),s=n.data("node"),c=h(".fl-builder-content .fl-node-"+s);if(void 0!==FLBuilderPreviewCallbacks[o]?l=FLBuilderPreviewCallbacks[o]:void 0!==window[o]&&(l=window[o]),"function"==typeof l){var r={field:t,fields:u,type:i,preview:e,form:n,nodeID:s,node:c};switch(i){case"align":case"button-group":case"text":case"multiple-photos":case"video":case"icon":case"ordering":r.input=t.find("input"),r.getValue=function(){return r.input.val()};break;case"color":r.input=t.find("input.fl-color-picker-value"),r.getValues=function(){var e=r.input.val();FLBuilderPreview.formatColor(e)};break;case"textarea":case"code":r.textarea=t.find("textarea"),r.getValue=function(){return r.textarea.val()};break;case"select":case"photo-sizes":case"post-type":r.select=t.find("select"),r.getValue=function(){return r.select.val()};break;case"photo":r.input=t.find("input[type=hidden]"),r.sizeSelect=t.find("select"),r.getValues=function(){return{value:r.input.val(),size:r.sizeSelect.val()}};break;case"unit":r.input=t.find("input[type=number]"),r.unitSelect=t.find(".fl-field-unit-select"),r.getValues=function(){var e=r.input.val(),t=r.unitSelect.val();return{value:e,unit:t,formattedValue:e+t}};break;case"dimension":r.inputs=t.find("input[type=number]"),r.unitSelect=t.find(".fl-field-unit-select"),r.getValues=function(){var l={inputs:[],props:{},unit:r.unitSelect.val()};return r.inputs.each(function(e,t){var i=(t=h(t)).val(),t=t.data("unit");l.inputs.push(i),l.props[t]=i}),l};break;case"animation":r.input=t.find("input"),r.select=t.find("select"),r.getValues=function(){return{delay:r.input.val(),style:r.select.val()}};break;case"link":r.input=t.find(".fl-link-field-input-wrap input"),r.targetInput=t.find("input[name$=_target]"),r.noFollowInput=t.find("input[name$=_nofollow]"),r.getValues=function(){return{url:r.input.val(),target:r.targetInput.val(),noFollow:r.noFollowInput.val()}};break;case"shadow":r.colorInput=t.find("input.fl-color-picker-value"),r.inputs=t.find("input[type=number]"),r.getValues=function(){r.colorInput.val(),r.inputs[0].val(),r.inputs[1].val(),r.inputs[2].val(),r.inputs[3].val()};break;case"gradient":r.inputs=t.find("input"),r.select=t.find("select"),r.gradientInputs={},r.gradientInputs.type=t.find('select[name$="[type]"]'),r.gradientInputs.angle=t.find('input[name$="[angle]"]'),r.gradientInputs.position=t.find('select[name$="[position]"]'),r.gradientInputs.stops=[],t.find(".fl-gradient-picker-colors .fl-gradient-picker-color-row").each(function(e,t){t=h(t),r.gradientInputs.stops.push({color:t.find(".fl-gradient-picker-color input"),stop:t.find(".fl-gradient-picker-stop input")})}),r.getValues=function(){var e,t={type:r.gradientInputs.type.val(),angle:r.gradientInputs.angle.val(),position:r.gradientInputs.position.val(),stops:[]};for(e in r.gradientInputs.stops){var i=r.gradientInputs.stops[e];t.stops[e]={color:i.color.val(),stop:i.stop.val()}}return t};break;case"shape-transform":r.inputs=t.find("input"),r.getValues=function(){return{scaleXSign:r.inputs.eq(0).val(),scaleYSign:r.inputs.eq(1).val(),skewX:r.inputs.eq(2).val(),skewY:r.inputs.eq(3).val(),scaleX:r.inputs.eq(4).val(),rotate:r.inputs.eq(5).val(),scaleY:r.inputs.eq(6).val()}};break;default:r.input=t.find("input"),r.getValue=function(){return r.input.val()}}var a,o=t.find(".fl-field-responsive-toggle"),d=(r.responsiveToggle=!!o.length&&o,l=l.bind(this,r),{input:"change keyup input",inputs:"change keyup input",targetInput:"change keyup input",noFollowInput:"change keyup input",colorInput:"change input",textarea:"change keyup input",select:"change",sizeSelect:"change",unitSelect:"change"});for(a in d)void 0!==r[a]&&r[a].on(d[a],l)}},_initFieldRefreshPreview:function(e){var t=e.data("type"),i=e.data("preview"),l=h.proxy(this.delayPreview,this);switch(t){case"align":e.find("input").on("change",l);break;case"text":e.find("input[type=text]").on("keyup",l);break;case"textarea":e.find("textarea").on("keyup",l);break;case"select":e.find("select").on("change",l);break;case"color":e.find(".fl-color-picker-value").on("change",l);break;case"photo":e.find("select").on("change",l);break;case"multiple-photos":e.find("input").on("change",l);break;case"photo-sizes":e.find("select").on("change",l);break;case"video":case"multiple-audios":case"icon":e.find("input").on("change",l);break;case"form":e.on("change","input",l);break;case"editor":this._addTextEditorCallback(e,i);break;case"code":e.find("textarea").on("change",l);break;case"post-type":e.find("select").on("change",l);break;case"suggest":e.find(".as-values").on("change",l),e.find("select").on("change",l);break;case"unit":case"dimension":e.find("input[type=number]").on("input",l);break;case"ordering":e.find("input[type=hidden]").on("change",l);break;default:e.on("change",l)}},_initFieldTextPreview:function(e){var t=e.data("type"),i=e.data("preview"),l=h.proxy(this._previewText,this,i);switch(t){case"text":e.find("input[type=text]").on("keyup",l);break;case"unit":e.find("input[type=number]").on("keyup",l);break;case"textarea":e.find("textarea").on("keyup",l);break;case"code":e.find("textarea").on("change",l);break;case"editor":this._addTextEditorCallback(e,i)}},_previewText:function(e,t){var e=this._getPreviewSelector(this.classes.node,e.selector),e=h(e),i=h("<div>"+h(t.target).val()+"</div>");0<e.length?(i.find("script").remove(),e.html(i.html())):this.delayPreview(t)},_previewTextEditor:function(e,t,i){var e=this._getPreviewSelector(this.classes.node,e.selector),e=h(e),l="undefined"!=typeof tinyMCE?tinyMCE.get(t):null,t=h("#"+t),o="";0<e.length&&((o=l&&"none"==t.css("display")?h("<div>"+l.getContent()+"</div>"):"undefined"==typeof switchEditors||void 0===switchEditors.wpautop?h("<div>"+t.val()+"</div>"):h("<div>"+switchEditors.wpautop(t.val())+"</div>")).find("script").remove(),e.html(o.html()))},_addTextEditorCallback:function(e,t){var e=e.find("textarea.wp-editor-area").attr("id"),i=null;if("refresh"==t.type)i=h.proxy(this.delayPreview,this);else{if("text"!=t.type)return;i=h.proxy(this._previewTextEditor,this,t,e)}h("#"+e).on("keyup",i),"undefined"!=typeof tinyMCE&&(editor=tinyMCE.get(e),editor.on("change",i),editor.on("keyup",i))},_initFieldFontPreview:function(e){var t=e.data("type"),i=e.data("preview"),i=(i.id=e.attr("id"),h.proxy(this._previewFont,this,i));"font"==t&&e.find(".fl-font-field").on("change","select",i)},_previewFont:function(e,t){var t=h(t.delegateTarget),i=t.find(".fl-font-field-font"),l=h(i).find(":selected").parent().attr("label"),t=t.find(".fl-font-field-weight"),o=e.id+"-"+this.nodeId,n=this._getPreviewSelector(this.classes.node,e.selector),e=e.important?" !important":"",s="";"Google"!=l&&"Recently Used"!=l||this._buildFontStylesheet(o,i.val(),t.val()),s=i.val(),new RegExp("[0-9]").test(i.val())&&(s='"'+i.val()+'"'),this.updateCSSRule(n,"font-family","Default"===i.val()?"":s+e),this.updateCSSRule(n,"font-weight","default"===t.val()?"":t.val()+e)},_buildFontStylesheet:function(e,t,i){var l=FLBuilderConfig.googleFontsUrl,o="",n={},s={};n[t]=[i],FLBuilderPreview._fontsList[e]=n,Object.keys(FLBuilderPreview._fontsList).forEach(function(e){var i=FLBuilderPreview._fontsList[e];Object.keys(i).forEach(function(t){var e=i[t];s[t]=s[t]||[],e=e.filter(function(e){return s[t].indexOf(e)<0}),s[t]=s[t].concat(e)})}),h.each(s,function(e,t){o+="Molle"===e?e+":i|":e+":"+t.join()+"|"}),o=l+o.slice(0,-1).replace(" ","+"),h("#fl-builder-google-fonts-preview").length<1?h("<link>").attr("id","fl-builder-google-fonts-preview").attr("type","text/css").attr("rel","stylesheet").attr("href",o).appendTo("head"):h("#fl-builder-google-fonts-preview").attr("href",o)},_initFieldCSSPreview:function(e){var t=e.data("preview"),i=null;if(void 0!==t.rules)for(i in t.rules)this._initFieldCSSPreviewCallback(e,t.rules[i]);else this._initFieldCSSPreviewCallback(e,t)},_initFieldCSSPreviewCallback:function(e,t){switch(e.data("type")){case"align":e.find("input").on("change",h.proxy(this._previewCSS,this,t,e));break;case"border":e.find("select").on("change",h.proxy(this._previewBorderCSS,this,t,e)),e.find("input[type=number]").on("input",h.proxy(this._previewBorderCSS,this,t,e)),e.find("input[type=hidden]").on("change",h.proxy(this._previewBorderCSS,this,t,e));break;case"color":e.find(".fl-color-picker-value").on("change",h.proxy(this._previewColorCSS,this,t,e));break;case"dimension":e.find("input[type=number]").on("input",h.proxy(this._previewDimensionCSS,this,t,e));break;case"gradient":e.find("select").on("change",h.proxy(this._previewGradientCSS,this,t,e)),e.find(".fl-gradient-picker-angle").on("input",h.proxy(this._previewGradientCSS,this,t,e)),e.find(".fl-color-picker-value").on("change",h.proxy(this._previewGradientCSS,this,t,e)),e.find(".fl-gradient-picker-stop").on("input",h.proxy(this._previewGradientCSS,this,t,e));break;case"photo":case"select":e.find("select").on("change",h.proxy(this._previewCSS,this,t,e));break;case"shadow":e.find("input").on("input",h.proxy(this._previewShadowCSS,this,t,e)),e.find(".fl-color-picker-value").on("change",h.proxy(this._previewShadowCSS,this,t,e));break;case"text":e.find("input[type=text]").on("keyup",h.proxy(this._previewCSS,this,t,e));break;case"typography":e.find("select").on("change",h.proxy(this._previewTypographyCSS,this,t,e)),e.find("input[type=number]").on("input",h.proxy(this._previewTypographyCSS,this,t,e)),e.find("input[type=hidden]").on("change",h.proxy(this._previewTypographyCSS,this,t,e));break;case"unit":e.find("input[type=number]").on("input",h.proxy(this._previewCSS,this,t,e))}},_previewCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=e.property,t=this._getPreviewCSSUnit(e,t,i),i=h(i.target),n=i.val(),i=!!i.closest(".fl-field-responsive-setting").length,e=e.important&&""!==n?" !important":"";-1<o.indexOf("image")&&n?n="url("+n+")":"%"===t&&"opacity"===o?n=parseInt(n)/100:""!==n&&(n+=t),this.updateCSSRule(l,o,n+e,i)},_previewBorderCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=h(i.target),t=o.closest(".fl-field"),n=o.closest(".fl-compound-field-setting"),s=n.data("property"),r=o.val(),o=(n.find(".fl-field-unit-select"),!!o.closest(".fl-field-responsive-setting").length),a=e.important&&""!==r?" !important":"";"border-color"===(e.property=s)?this._previewColorCSS(e,t,i):"border-width"===s||"border-radius"===s?this._previewDimensionCSS(e,t,i):"box-shadow"===s?this._previewShadowCSS(e,n,i):("border-style"===s&&t.find(".fl-border-field-width input:visible").trigger("input"),this.updateCSSRule(l,s,r+a,o))},_previewColorCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),i=h(i.target),o=i.val(),i=!!i.closest(".fl-field-responsive-setting").length,n=e.important&&""!==o?" !important":"";""!==o&&o.indexOf("rgb")<0&&(o="#"+o),this.updateCSSRule(l,e.property,o+n,i)},_previewDimensionCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=e.property,n=t.attr("id").replace("fl-field-",""),s=h(i.target).data("unit"),i=this._getDimensionValue(e,t,s,i),t=!!t.find(".fl-field-responsive-setting").length,e=e.important&&""!==i?" !important":"",o="border-radius"===o?"border-"+s.replace("_","-")+"-radius":"border-width"===o?"border-"+s+"-width":o+"-"+s;this.updateCSSRule(l,o,i+e,t),"margin"!==n&&"padding"!==n&&"border"!==n||this.elements.node.find(".fl-bg-slideshow").length&&FLBuilder._resizeLayout()},_getDimensionValue:function(e,t,i,l){var o=h(l.target).val();return null===(o=o.toLowerCase().replace(/[^a-z0-9%.\-]/g,""))||""===o||isNaN(o)||(e=this._getPreviewCSSUnit(e,t,l),o=parseFloat(o)+(e||"px")),o},_getPreviewCSSUnit:function(e,t,i){var i=h(i.target),l=(FLBuilderResponsiveEditing._mode,!!i.closest(".fl-compound-field-setting").length),o=!!i.closest(".fl-field-responsive-setting").length,n=null;return(n=(l?i.closest(".fl-compound-field-setting"):o?i.closest(".fl-field-responsive-setting"):t).find(".fl-field-unit-select"))&&n.length?"SELECT"===n.prop("tagName")?n.val():n.text():e.unit||""},_initFieldUnitSelect:function(e){e.find(".fl-field-unit-select").on("change",function(){var e=h(this),t=e.closest(".fl-field-responsive-setting"),e=e.closest(".fl-field");(t.length?t:e).find("input").trigger("input")})},_previewGradientCSS:function(e,t,d){var i=this._getPreviewSelector(this.classes.node,e.selector),l=t.find(".fl-gradient-picker-type-select").val(),o=t.find(".fl-gradient-picker-angle").val(),n=t.find(".fl-gradient-picker-position").val(),s=t.find(".fl-color-picker-value"),r=t.find(".fl-gradient-picker-stop input"),a=[],t="";s.each(function(e){var t=h(this).val(),e=r.eq(e).val();(t=""===t?"rgba(255,255,255,0)":t).indexOf("rgb")<0&&(t="#"+t),isNaN(e)&&(e=0),a.push(t+" "+e+"%")}),a=a.join(", "),t="linear"===l?"linear-gradient("+(o=isNaN(o)?0:o)+"deg, "+a+")":"radial-gradient(at "+n+", "+a+")",s=e.important&&""!==t?" !important":"",this.updateCSSRule(i,e.property,t+s)},_previewShadowCSS:function(e,t,i){var u=this._getPreviewSelector(this.classes.node,e.selector),l=t.find(".fl-shadow-field-color input").val(),o=t.find(".fl-shadow-field-horizontal input").val(),n=t.find(".fl-shadow-field-vertical input").val(),s=t.find(".fl-shadow-field-blur input").val(),r=t.find(".fl-shadow-field-spread input").val(),t=!!t.find(".fl-shadow-field-spread input").length,i=!!h(i.target).closest(".fl-field-responsive-setting").length,a="",d="";""!==l&&(""===r&&(r=0),a=(a=(o=""===o?0:o)+"px ")+(n=""===n?0:n)+"px "+(s=""===s?0:s)+"px ",t&&(a+=r+"px "),a=a+(l=l.indexOf("rgb")<0?"#"+l:l)+d),d=e.important&&""!==a?" !important":"",this.updateCSSRule(u,e.property,a,i)},_previewTypographyCSS:function(e,t,i){var l=this._getPreviewSelector(this.classes.node,e.selector),o=h(i.target),t=o.closest(".fl-field"),n=o.closest(".fl-compound-field-setting"),s=n.data("property"),r=o.val(),a=n.find(".fl-field-unit-select"),o=!!o.closest(".fl-field-responsive-setting").length,d=e.important&&""!==r?" !important":"";"font-family"===s?(e.id=t.attr("id"),this._previewFont(e,{delegateTarget:n})):"text-shadow"===s?(e.property="text-shadow",this._previewShadowCSS(e,n,i)):(a.length&&""!==r&&("vw"===a.val()?r="calc("+FLBuilderConfig.global.responsive_base_fontsize+"px + "+r+"vw)":r+="SELECT"===a.prop("tagName")?a.val():"px"),this.updateCSSRule(l,s,r+d,o))},_initFieldAttributePreview:function(e){var t=e.data("preview"),i=t.attribute,l=e.find("input"),e=(e.val(),window[t.format_callback]),t=this._getPreviewSelector(this.classes.node,t.selector),t=h(t),t=this._previewAttribute.bind(this,l,t,i,e);l.on("change",t),l.on("keyup",t),l.on("input",t)},_previewAttribute:function(e,t,l,o){var n=e.val();for("function"==typeof o&&(n=o(n)),i=0;i<t.length;i++)t[i].setAttribute(l,n)},_initFieldWidgetPreview:function(e){var t=h.proxy(this.delayPreview,this);e.find("input").on("keyup",t),e.find("input[type=checkbox]").on("click",t),e.find("textarea").on("keyup",t),e.find("select").on("change",t)},_initFieldAnimationPreview:function(e,t){t.find(".fl-animation-field-style select").on("change",h.proxy(this._previewAnimationField,this,e,t)),t.find(".fl-animation-field-duration input").on("input",h.proxy(this._previewAnimationField,this,e,t))},_previewAnimationField:function(e,t,i){var e=this._getPreviewSelector(this.classes.node,e.selector),l=h(e),e=t.find(".fl-animation-field-style select"),t=t.find(".fl-animation-field-duration input"),o=e[0].options;l.removeClass("fl-animated"),l.removeClass("fl-animation"),l.css("animation-duration","");for(var n=0;n<o.length;n++)l.removeClass("fl-"+o[n].value);""!==e.val()&&(l.addClass("fl-animation"),l.addClass("fl-"+e.val()),l.data("animation-delay",0),l.data("animation-duration",t.val())),FLBuilderLayout._doModuleAnimation.apply(l)},_getPreviewSelector:function(e,t){return FLBuilderPreview.getFormattedSelector.call(this,e,t)},toUpperCaseWords:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},FLBuilderPreview.formatColor=function(e){return e=""!==e&&e.indexOf("rgb")<0&&e.indexOf("url")<0?"#"+e:e},FLBuilderPreviewCallbacks={previewShape:function(e,t){var i=e.preview.position,l=e.preview.prefix,e=e.form;yOrientation=e.find('input[name="'+(l+"transform[][scaleYSign]")+'"]'),"bottom"===i?yOrientation.val("invert"):yOrientation.val(""),yOrientation.trigger("change"),this.delayPreview()},previewShapeLayerSize:function(e,u){var c,t=e.getValues(),i=t.unit,l=t.props.width,o=t.props.height,t=t.props.top,n=e.preview.prefix,s=e.preview.position,r=this._getPreviewSelector(this.classes.node,".fl-builder-"+s+"-edge-layer"),a=r+" > *",d=e.form.find('[name="'+n+'align"]').val().split(" "),h=d[0],d=d[1],e=e.form.find('[name="'+n+'shape"]').val(),n=FLBuilderConfig.presets.shape[e];if(shapeProps={width:"100%",left:"auto",right:"auto",height:"auto",top:"auto",bottom:"auto"},l){shapeProps.width=l+i;var f=l/2+i;switch(d){case"left":shapeProps.left="0",shapeProps.right="auto";break;case"right":shapeProps.left="auto",shapeProps.right="0";break;case"center":shapeProps.left="calc( 50% - "+f+")",shapeProps.right="auto"}}switch(this.updateCSSRule(a,"width",shapeProps.width),this.updateCSSRule(a,"left",shapeProps.left),this.updateCSSRule(a,"right",shapeProps.right),c=o?o/2+i:l?l/n.data.viewBox.width*100/2+i:"",o&&(shapeProps.height=o+i),h){case"top":shapeProps.top="0",shapeProps.bottom="auto";break;case"bottom":shapeProps.top="auto",shapeProps.bottom="0";break;case"center":shapeProps.top="calc( 50% - "+c+")",shapeProps.bottom="auto"}this.updateCSSRule(a,"height",shapeProps.height),this.updateCSSRule(a,"top",shapeProps.top),this.updateCSSRule(a,"bottom",shapeProps.bottom),""===t?this.updateCSSRule(r,s,"0"):this.updateCSSRule(r,s,t+i)},previewShapeAlign:function(e,t){var i=e.preview.prefix;e.form.find('[name="'+i+'size_width"]').trigger("input")},previewShapeFillStyle:function(e,u){var t=e.input.val(),i=e.preview,l=e.preview.prefix,o="fl-row-"+e.nodeID+"-"+l+"-linear-gradient",n="fl-row-"+e.nodeID+"-"+l+"-radial-gradient",s="fl-row-"+e.nodeID+"-"+l+"-pattern",r=e.form;if(void 0!==t){var a=this._getPreviewSelector(this.classes.node,i.selector);switch(t){case"color":var d=r.find("[name="+l+"fill_color]").val();this.updateCSSRule(a,"fill",FLBuilderPreview.formatColor(d));break;case"gradient":d=r.find("#fl-field-"+l+"fill_gradient").find('select[name$="[type]"]').val();this.updateCSSRule(a,"fill","url(#"+("radial"===d?n:o)+")");break;case"pattern":this.updateCSSRule(a,"fill","url(#"+s+")")}}},previewShapeGradientFill:function(e,u){var t,i=e.getValues(),l=e.node,e=".fl-builder-"+e.preview.position+"-edge-layer",l=l.find(e+" "+i.type+"Gradient"),o="url(#"+l.attr("id")+")",e=this._getPreviewSelector(this.classes.node,e+" .fl-shape"),c=(this.updateCSSRule(e,"fill",o),l.find("stop"));for(t in i.stops){var h,n=i.stops[t],s=c.eq(t),r=n.color,n=n.stop,f=1;0===r.indexOf("rgba")&&(f=(h=r.substring(r.indexOf("(")+1,r.lastIndexOf(")")).split(/,\s*/)).pop(),r="rgb("+h.join(",")+")"),s.attr("stop-color",FLBuilderPreview.formatColor(r)),s.attr("stop-opacity",f),s.attr("offset",n+"%")}if("linear"===i.type&&void 0!==l[0]&&l[0].setAttribute("gradientTransform","rotate("+i.angle+" .5 .5 )"),"radial"===i.type){parts=i.position.split(" ");var a,d,e=parts[0],o=parts[1];switch(e){case"top":case"left":a=0;break;case"center":a=.5;break;case"bottom":case"right":a=1}switch(o){case"top":case"left":d=0;break;case"center":d=.5;break;case"bottom":case"right":d=1}(e=.5)===a&&.5===d||(e=1),l.attr("cx",a),l.attr("cy",d),l.attr("r",e)}},previewShapeTransform:function(e,t){e.form;var i=e.preview,i=(i.prefix,this._getPreviewSelector(this.classes.node,i.selector)+" > *"),l=e.getValues(),o=[];Object.keys(l).map(function(e){var t=l[e],i="";switch(e){case"scaleXSign":case"scaleYSign":return;case"scaleX":case"scaleY":t&&""!==t&&0!==t||(t="1"),t="invert"===("scaleX"===e?l.scaleXSign:l.scaleYSign)?-Math.abs(t):Math.abs(t),o.push(e+"("+t+")");break;case"translateX":case"translateY":t&&o.push(e+"("+t+(i="px")+")");break;case"skewX":case"skewY":t&&o.push(e+"("+t+(i="deg")+")");break;case"rotate":i="deg",""!==t&&"0"!==t&&o.push("rotate("+t+i+")")}}),this.updateCSSRule(i,"transform",o.join(" "))}}}(jQuery),function(u){var i={ignored:[],reparsed:[],width:null,callback:null,sheets:{},styles:[],queue:[],emPxValue:null,regex:{media:/@media[^{]*{([\s\S]+?})\s*}/gi,empty:/@media[^{]*{([^{}]*?)}/gi,keyframes:/@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,comments:/\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,urls:/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,findStyles:/@media *([^\{]+)\{([\S\s]+?)\}$/,only:/(only\s+)?([a-zA-Z]+)\s?/,minw:/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,maxw:/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,minmaxwh:/\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,other:/\([^\)]*\)/g},ignore:function(e){Array.prototype.push.apply(this.ignored,e)},reparse:function(e){Array.prototype.push.apply(this.reparsed,e)},update:function(e,t){this.width=void 0===e?null:e,this.callback=void 0===t?null:t,l.update(),this.queueSheets()?this.runQueue():this.applyStyles()},queueSheets:function(){for(var e,t,i,l=null,o=null,n=null,s=!1,r=0,a=0;r<document.styleSheets.length;r++)if(element=document.styleSheets[r].ownerNode,l=element.href,e=element.id,t=element.tagName.toLowerCase(),o=element.rel,i=element.media,n=l?l.split("?").shift():e||"style-"+r,s=!1,"style"===t||l&&o&&"stylesheet"===o.toLowerCase()){for(a=0;a<this.ignored.length;a++)if(-1<n.indexOf(this.ignored[a])){s=!0;break}if(!s){for(a=0;a<this.reparsed.length;a++)if(-1<n.indexOf(this.reparsed[a])){this.sheets[n]=null;break}void 0!==this.sheets[n]&&this.sheets[n]||this.queue.push({docSheet:document.styleSheets[r],element:u(element),key:n,tagName:t,href:l,id:e,media:i})}}return this.queue.length},runQueue:function(){var t;this.queue.length?"style"===(t=this.queue.shift()).tagName?(this.parse(t.element.html(),t),this.runQueue()):u.get(t.href,u.proxy(function(e){this.parse(e,t),this.runQueue()},this)).fail(this.runQueue.bind(this)):this.applyStyles()},parse:function(e,t){var i,l=this.regex,o=this.cleanStyles(e),n=o.match(l.media),s=n&&n.length||0,u=!s&&t.media,r=null,e="",a=0,d=0;for(n?e=o.replace(l.media,""):u&&"all"!=t.media?s=1:e=o,this.sheets[t.key]={docSheet:t.docSheet,element:t.element,key:t.key,tagName:t.tagName,href:t.href,id:t.id,all:e,queries:[]},a=0;a<s;a++)for(o=u?(r=t.media,this.convertURLs(o,t.href)):(r=n[a].match(l.findStyles)&&RegExp.$1,RegExp.$2&&this.convertURLs(RegExp.$2,t.href)),i=r.split(","),d=0;d<i.length;d++)"print"!=((r=i[d]).split("(")[0].match(l.only)&&RegExp.$2)&&(r.replace(l.minmaxwh,"").match(l.other)||this.sheets[t.key].queries.push({minw:r.match(l.minw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),maxw:r.match(l.maxw)&&parseFloat(RegExp.$1)+(RegExp.$2||""),styles:o}))},applyStyles:function(){var e=u("head"),t={all:"",queries:[]},i=null,l=null,o=null,n=null,s=null,r=null,a=null,d=!1;for(o in this.clearStyles(),this.sheets)if((l=this.sheets[o]).queries.length&&this.width){for(t.all+=l.all,s=0;s<l.queries.length;s++)r=(n=l.queries[s]).minw,a=n.maxw,d=!1,r&&(r=parseFloat(r)*(-1<r.indexOf("em")?this.getEmPxValue():1),this.width>=r&&(t.queries.push({media:"min",width:r,styles:n.styles}),d=!0)),a&&!d&&(a=parseFloat(a)*(-1<a.indexOf("em")?this.getEmPxValue():1),this.width<=a&&t.queries.push({media:"max",width:a,styles:n.styles}));l.docSheet.disabled=!0}for(""!==t.all&&(i=u('<style class="fl-builder-media-query" data-query="all"></style>'),this.styles.push(i),e.append(i),i.html(t.all)),s=0;s<t.queries.length;s++)n=t.queries[s],i=u('<style class="fl-builder-media-query" data-query="'+n.media+'" data-value="'+n.width+'"></style>'),this.styles.push(i),e.append(i),i.html(n.styles);this.callback&&(this.callback(),this.callback=null)},clearStyles:function(){var e=null,t=this.styles.slice(0);for(e in this.styles=[],this.sheets)this.sheets[e].docSheet.disabled=!1;for(var i=0;i<t.length;i++)t[i].empty(),t[i].remove()},disableStyles:function(e){for(var t,i,l=0;l<this.styles.length;l++)t=(i=this.styles[l]).attr("data-query"),i=parseInt(i.attr("data-value")),"max"===t&&!isNaN(i)&&i<=e&&(this.styles[l][0].sheet.disabled=!0)},enableStyles:function(){for(var e=0;e<this.styles.length;e++)this.styles[e][0].sheet.disabled=!1,this.styles[e][0].sheet.disabled=!0,this.styles[e][0].sheet.disabled=!1},cleanStyles:function(e){var t=this.regex;return e.replace(t.comments,"").replace(t.keyframes,"").replace(t.empty,"")},convertURLs:function(e,t){return t?((t=t.substring(0,t.lastIndexOf("/"))).length&&(t+="/"),e.replace(this.regex.urls,"$1"+t+"$2$3")):e},getEmPxValue:function(){if(this.emPxValue)return this.emPxValue;var e=window.document,t=e.documentElement,i=e.body,l=e.createElement("div"),o=t.style.fontSize,n=i&&i.style.fontSize,s=!1;return l.style.cssText="position:absolute;font-size:1em;width:1em",i||((i=s=e.createElement("body")).style.background="none"),t.style.fontSize="100%",i.style.fontSize="100%",i.appendChild(l),s&&t.insertBefore(i,t.firstChild),e=parseFloat(l.offsetWidth),s?t.removeChild(i):i.removeChild(l),t.style.fontSize=o,i.style.fontSize=n||"",this.emPxValue=e}},l={_functions:null,update:function(){if(!this._functions)for(var e in this._functions={},t)this._functions[e]=jQuery.fn[e];if(i.width)for(e in t)jQuery.fn[e]=t[e];else for(e in this._functions)jQuery.fn[e]=this._functions[e]}},t={width:function(e){return null!=e?l._functions.width.call(this,e):u.isWindow(this[0])?i.width:l._functions.width.call(this)}};FLBuilderSimulateMediaQuery={ignore:function(e){i.ignore(e)},reparse:function(e){i.reparse(e)},update:function(e,t){i.update(e,t)},disableStyles:function(e){i.disableStyles(e)},enableStyles:function(){i.enableStyles()}}}(jQuery),function(d){FLBuilderResponsiveEditing={_mode:"default",refreshPreview:function(e){var t;d(".fl-responsive-preview").length&&"default"!==this._mode?("responsive"==this._mode?(t=320<=FLBuilderConfig.global.responsive_breakpoint?320:FLBuilderConfig.global.responsive_breakpoint,FLBuilderSimulateMediaQuery.update(t,e)):"medium"==this._mode&&(t=769<=FLBuilderConfig.global.medium_breakpoint?769:FLBuilderConfig.global.medium_breakpoint,FLBuilderSimulateMediaQuery.update(t,e)),FLBuilder._resizeLayout()):e&&e()},_init:function(){this._bind(),this._initMediaQueries()},_bind:function(){FLBuilder.addHook("endEditingSession",this._clearPreview),FLBuilder.addHook("didEnterRevisionPreview",this._clearPreview),FLBuilder.addHook("responsiveEditing",this._menuToggleClicked),FLBuilder.addHook("preview-init",this._switchAllSettingsToCurrentMode),FLBuilder.addHook("responsive-editing-switched",this._showSize),d("body").on("click",".fl-field-responsive-toggle",this._settingToggleClicked),d("body").on("click",".fl-responsive-preview-message button",this._previewToggleClicked)},_initMediaQueries:function(){FLBuilderSimulateMediaQuery.ignore([FLBuilderConfig.pluginUrl,FLBuilderConfig.relativePluginUrl]),ignorelist=d.map(FLBuilderConfig.responsiveIgnore,function(e,t){return[e]}),FLBuilderSimulateMediaQuery.ignore(ignorelist),FLBuilderSimulateMediaQuery.reparse([FLBuilderConfig.postId+"-layout-draft.css",FLBuilderConfig.postId+"-layout-draft-partial.css",FLBuilderConfig.postId+"-layout-preview.css",FLBuilderConfig.postId+"-layout-preview-partial.css",FLBuilderConfig.postId+"-inline-css","fl-builder-global-css","fl-builder-layout-css"])},_showSize:function(){var e=d(".fl-responsive-preview-message .size"),t="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,i="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,l="";d(".fl-responsive-preview").hasClass("fl-preview-responsive")?l=FLBuilderStrings.mobile+" "+i+"px":d(".fl-responsive-preview").hasClass("fl-preview-medium")&&(l=FLBuilderStrings.medium+" "+t+"px"),e.html("").html(l)},_switchTo:function(e,t){var i=d("html"),l=d("body"),o=d(FLBuilder._contentClass),n=d(".fl-responsive-preview"),s=d(".fl-responsive-preview-mask"),r=d(".fl-content-placeholder"),a=null;if("default"==(FLBuilderResponsiveEditing._mode=e)){if(0===r.length)return;i.removeClass("fl-responsive-preview-enabled"),r.after(o),r.remove(),n.remove(),s.remove()}else 0===n.length?(i.addClass("fl-responsive-preview-enabled"),o.after('<div class="fl-content-placeholder"></div>'),l.prepend(wp.template("fl-responsive-preview")()),d(".fl-responsive-preview").addClass("fl-preview-"+e),d(".fl-responsive-preview-content").append(o)):(n.removeClass("fl-preview-responsive fl-preview-medium"),n.addClass("fl-preview-"+e));"responsive"==e?(a="1"!==FLBuilderConfig.global.responsive_preview&&360<=FLBuilderConfig.global.responsive_breakpoint?360:FLBuilderConfig.global.responsive_breakpoint,o.width(a),FLBuilderSimulateMediaQuery.update(a,t),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):"medium"==e?(a="1"!==FLBuilderConfig.global.responsive_preview&&769<=FLBuilderConfig.global.medium_breakpoint?769:FLBuilderConfig.global.medium_breakpoint,o.width(a),FLBuilderSimulateMediaQuery.update(a,t),FLBuilderResponsiveEditing._setMarginPaddingPlaceholders()):(o.width(""),FLBuilderSimulateMediaQuery.update(null,t)),this._setContentBackgroundColor(),FLBuilder._resizeLayout(),this._previewFields(),FLBuilder.triggerHook("responsive-editing-switched",e)},_setContentBackgroundColor:function(){var e=d(FLBuilder._contentClass),t=d(".fl-responsive-preview"),i=d(".fl-content-placeholder").parents(),l="#fff",o=0;if(0===t.length)e.css("background-color","");else{for(;o<i.length&&"rgba(0, 0, 0, 0)"==(l=i.eq(o).css("background-color"));o++);e.css("background-color",l)}},_switchToAndScroll:function(i){var e=d(".fl-builder-settings").data("node"),t=void 0===e?void 0:d(".fl-node-"+e);FLBuilderResponsiveEditing._switchTo(i,function(){var e;void 0!==t&&t&&(d(window),(e=d(".fl-responsive-preview-content")).length?(e.scrollTop(0),e.scrollTop(t.offset().top-150)):d("html, body").scrollTop(t.offset().top-100)),d(".fl-row-bg-parallax").each(function(){var e=d(this),t=e.find("> .fl-row-content-wrap"),e={default:e.data("parallax-image"),medium:e.data("parallax-image-medium"),responsive:e.data("parallax-image-responsive")};void 0!==e[i]&&t.css("background-image","url("+e[i]+")")})})},_switchAllSettingsTo:function(e){var t="dashicons-desktop dashicons-tablet dashicons-smartphone";d(".fl-field-responsive-toggle").removeClass(t),d(".fl-field-responsive-setting").hide(),t="default"==e?"dashicons-desktop":"medium"==e?"dashicons-tablet":"dashicons-smartphone",d(".fl-field-responsive-toggle").addClass(t).data("mode",e),d(".fl-field-responsive-setting-"+e).css("display","inline-block")},_switchAllSettingsToCurrentMode:function(){var e=FLBuilderResponsiveEditing;e._switchAllSettingsTo(e._mode),FLBuilder.triggerHook("responsive-editing-switched",e._mode)},_setMarginPaddingPlaceholders:function(){var e="#fl-field-padding .fl-field-responsive-setting-default",e={values:{top:d(e+' input[ name="padding_top" ]').val(),right:d(e+' input[ name="padding_right" ]').val(),bottom:d(e+' input[ name="padding_bottom" ]').val(),left:d(e+' input[ name="padding_left" ]').val()},placeholders:{top:d(e+' input[ name="padding_top" ]').attr("placeholder"),right:d(e+' input[ name="padding_right" ]').attr("placeholder"),bottom:d(e+' input[ name="padding_bottom" ]').attr("placeholder"),left:d(e+' input[ name="padding_left" ]').attr("placeholder")}},t="#fl-field-padding .fl-field-responsive-setting-medium",i={values:{top:d(t+' input[ name="padding_top_medium" ]').val(),right:d(t+' input[ name="padding_right_medium" ]').val(),bottom:d(t+' input[ name="padding_bottom_medium" ]').val(),left:d(t+' input[ name="padding_left_medium" ]').val()},placeholders:{top:"",right:"",bottom:"",left:""}},l="#fl-field-padding .fl-field-responsive-setting-responsive",o=(d(t+' input[ name="padding_top_responsive" ]').val(),d(t+' input[ name="padding_right_responsive" ]').val(),d(t+' input[ name="padding_bottom_responsive" ]').val(),d(t+' input[ name="padding_left_responsive" ]').val(),"#fl-field-margin .fl-field-responsive-setting-default"),o={values:{top:d(o+' input[ name="margin_top" ]').val(),right:d(o+' input[ name="margin_right" ]').val(),bottom:d(o+' input[ name="margin_bottom" ]').val(),left:d(o+' input[ name="margin_left" ]').val()},placeholders:{top:d(o+' input[ name="margin_top" ]').attr("placeholder"),right:d(o+' input[ name="margin_right" ]').attr("placeholder"),bottom:d(o+' input[ name="margin_bottom" ]').attr("placeholder"),left:d(o+' input[ name="margin_left" ]').attr("placeholder")}},n="#fl-field-margin .fl-field-responsive-setting-medium",s={values:{top:d(n+' input[ name="margin_top_medium" ]').val(),right:d(n+' input[ name="margin_right_medium" ]').val(),bottom:d(n+' input[ name="margin_bottom_medium" ]').val(),left:d(n+' input[ name="margin_left_medium" ]').val()},placeholders:{top:o.values.top||o.placeholders.top,right:o.values.right||o.placeholders.right,bottom:o.values.bottom||o.placeholders.bottom,left:o.values.left||o.placeholders.left}},r="#fl-field-margin .fl-field-responsive-setting-responsive";d(r+' input[ name="margin_top_responsive" ]').val(),d(r+' input[ name="margin_right_responsive" ]').val(),d(r+' input[ name="margin_bottom_responsive" ]').val(),d(r+' input[ name="margin_left_responsive" ]').val();""!=e.values.top?d(t+' input[ name="padding_top_medium"] ').attr("placeholder",e.values.top):d(t+' input[ name="padding_top_medium"] ').attr("placeholder",e.placeholders.top),""!=e.values.right?d(t+' input[ name="padding_right_medium"] ').attr("placeholder",e.values.right):d(t+' input[ name="padding_right_medium"] ').attr("placeholder",e.placeholders.right),""!=e.values.bottom?d(t+' input[ name="padding_bottom_medium"] ').attr("placeholder",e.values.bottom):d(t+' input[ name="padding_bottom_medium"] ').attr("placeholder",e.placeholders.bottom),""!=e.values.left?d(t+' input[ name="padding_left_medium"] ').attr("placeholder",e.values.left):d(t+' input[ name="padding_left_medium"] ').attr("placeholder",e.placeholders.left),""!=i.values.top?d(l+' input[ name="padding_top_responsive"] ').attr("placeholder",i.values.top):""!=e.values.top?d(l+' input[ name="padding_top_responsive"] ').attr("placeholder",e.values.top):d(l+' input[ name="padding_top_responsive"] ').attr("placeholder",e.placeholders.top),""!=i.values.right?d(l+' input[ name="padding_right_responsive"] ').attr("placeholder",i.values.right):""!=e.values.right?d(l+' input[ name="padding_right_responsive"] ').attr("placeholder",e.values.right):d(l+' input[ name="padding_right_responsive"] ').attr("placeholder",e.placeholders.right),""!=i.values.bottom?d(l+' input[ name="padding_bottom_responsive"] ').attr("placeholder",i.values.bottom):""!=e.values.bottom?d(l+' input[ name="padding_bottom_responsive"] ').attr("placeholder",e.values.bottom):d(l+' input[ name="padding_bottom_responsive"] ').attr("placeholder",e.placeholders.bottom),""!=i.values.left?d(l+' input[ name="padding_left_responsive"] ').attr("placeholder",i.values.left):""!=e.values.left?d(l+' input[ name="padding_left_responsive"] ').attr("placeholder",e.values.left):d(l+' input[ name="padding_left_responsive"] ').attr("placeholder",e.placeholders.left),""!=o.values.top?d(n+' input[ name="margin_top_medium" ]').attr("placeholder",o.values.top):d(n+' input[ name="margin_top_medium" ]').attr("placeholder",o.placeholders.top),""!=o.values.right?d(n+' input[ name="margin_right_medium" ]').attr("placeholder",o.values.right):d(n+' input[ name="margin_right_medium" ]').attr("placeholder",o.placeholders.right),""!=o.values.bottom?d(n+' input[ name="margin_bottom_medium" ]').attr("placeholder",o.values.bottom):d(n+' input[ name="margin_bottom_medium" ]').attr("placeholder",o.placeholders.bottom),""!=o.values.left?d(n+' input[ name="margin_left_medium" ]').attr("placeholder",o.values.left):d(n+' input[ name="margin_left_medium" ]').attr("placeholder",o.placeholders.left),""!=s.values.top?d(r+' input[ name="margin_top_responsive" ]').attr("placeholder",s.values.top):""!=o.values.top?d(r+' input[ name="margin_top_responsive" ]').attr("placeholder",o.values.top):d(r+' input[ name="margin_top_responsive" ]').attr("placeholder",o.placeholders.top),""!=s.values.right?d(r+' input[ name="margin_right_responsive" ]').attr("placeholder",s.values.right):""!=o.values.right?d(r+' input[ name="margin_right_responsive" ]').attr("placeholder",o.values.right):d(r+' input[ name="margin_right_responsive" ]').attr("placeholder",o.placeholders.right),""!=s.values.bottom?d(r+' input[ name="margin_bottom_responsive" ]').attr("placeholder",s.values.bottom):""!=o.values.bottom?d(r+' input[ name="margin_bottom_responsive" ]').attr("placeholder",o.values.bottom):d(r+' input[ name="margin_bottom_responsive" ]').attr("placeholder",o.placeholders.bottom),""!=s.values.left?d(r+' input[ name="margin_left_responsive" ]').attr("placeholder",s.values.left):""!=o.values.left?d(r+' input[ name="margin_left_responsive" ]').attr("placeholder",o.values.left):d(r+' input[ name="margin_left_responsive" ]').attr("placeholder",o.placeholders.left)},_settingToggleClicked:function(){var e=d(this),t="default"==(t=e.data("mode"))?"medium":"medium"==t?"responsive":"default";FLBuilderResponsiveEditing._switchAllSettingsTo(t),FLBuilderResponsiveEditing._switchToAndScroll(t),e.siblings(".fl-field-responsive-setting:visible").find("input").focus()},_menuToggleClicked:function(){var e="default"==(e=FLBuilderResponsiveEditing._mode)?"medium":"medium"==e?"responsive":"default";FLBuilder.MainMenu.hide(),FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_previewToggleClicked:function(){var e=d(this).data("mode");FLBuilderResponsiveEditing._switchAllSettingsTo(e),FLBuilderResponsiveEditing._switchToAndScroll(e)},_clearPreview:function(){FLBuilderResponsiveEditing._switchToAndScroll("default")},_previewFields:function(){var o=FLBuilderResponsiveEditing._mode,e=d(".fl-builder-settings:visible");0!==e.length&&void 0!==e.attr("data-node")&&(FLBuilder.triggerHook("responsive-editing-before-preview-fields",o),e.find(".fl-builder-settings-tab").each(function(){var e=d(this);e.css("display","block"),e.find(".fl-field-responsive-setting-"+o+":visible").each(function(){var e=d(this),t=e.closest(".fl-field"),i=t.data("type"),l=t.data("preview"),t=t.find(".fl-field-connection-visible").length;"refresh"!=l.type&&(t?"photo"===i&&"default"!==o&&e.find(".fl-photo-remove").trigger("click"):(e.find("input").trigger("keyup"),e.find("select").trigger("change")))}),e.css("display","")}),FLBuilder.triggerHook("responsive-editing-after-preview-fields",o))}},d(function(){FLBuilderResponsiveEditing._init()})}(jQuery),function(n){FLBuilderResponsivePreview={enter:function(){this.render()},exit:function(){this.destroy()},switchTo:function(e){var t=FLBuilderConfig.global,i=n("#fl-builder-preview-frame"),l="100%";"responsive"==e?(l="1"!==t.responsive_preview&&360<=t.responsive_breakpoint?360:t.responsive_breakpoint,i.width(l)):"medium"==e&&(l="1"!==t.responsive_preview&&769<=t.medium_breakpoint?769:t.medium_breakpoint,i.width(l)),i.width(l)},render:function(){var e=n("body"),t=FLBuilderConfig.previewUrl,i=n("#fl-builder-preview-mask, #fl-builder-preview-frame"),l=n('<div id="fl-builder-preview-mask"></div>'),t=n('<iframe id="fl-builder-preview-frame" src="'+t+'"></iframe>');i.remove(),e.append(l),e.append(t),e.css("overflow","hidden")},_showSize:function(e){var t=n(".fl-builder--preview-actions .size"),i="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.medium_breakpoint:769,l="1"===FLBuilderConfig.global.responsive_preview?FLBuilderConfig.global.responsive_breakpoint:360,o="";"responsive"===e?o=FLBuilderStrings.mobile+" "+l+"px":"medium"===e&&(o=FLBuilderStrings.medium+" "+i+"px"),t.html("").html(o)},destroy:function(){n("#fl-builder-preview-mask, #fl-builder-preview-frame").remove(),n("body").css("overflow","visible"),n(".fl-builder--preview-actions .size").html("")}}}(jQuery),function(d){var u={init:function(){var e=d("body");e.on("change",".fl-builder-service-select",this._serviceChange),e.on("click",".fl-builder-service-connect-button",this._connectClicked),e.on("change",".fl-builder-service-account-select",this._accountChange),e.on("click",".fl-builder-service-account-delete",this._accountDeleteClicked),e.on("change",".fl-builder-campaign-monitor-client-select",this._campaignMonitorClientChange),e.on("change",".fl-builder-mailchimp-list-select",this._mailChimpListChange),e.on("change",".fl-builder-activecampaign-list_type-select",this._activeCampaignChange)},_startSettingsLoading:function(e){var t=d(".fl-builder-settings"),e=e.closest(".fl-builder-service-settings"),i=d(".fl-builder-service-error");t.append('<div class="fl-builder-loading"></div>'),e.addClass("fl-builder-service-settings-loading"),i.remove()},_finishSettingsLoading:function(){var e=d(".fl-builder-settings"),t=d(".fl-builder-service-settings-loading");e.find(".fl-builder-loading").remove(),t.removeClass("fl-builder-service-settings-loading")},_serviceChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this),i=t.closest("tr"),l=t.val();i.siblings("tr.fl-builder-service-account-row").remove(),i.siblings("tr.fl-builder-service-connect-row").remove(),i.siblings("tr.fl-builder-service-field-row").remove(),d(".fl-builder-service-error").remove(),""!==l&&(u._startSettingsLoading(t),FLBuilder.ajax({action:"render_service_settings",node_id:e,service:l},u._serviceChangeComplete))},_serviceChangeComplete:function(e){var e=FLBuilder._jsonParse(e),t=d(".fl-builder-service-settings-loading");t.find(".fl-builder-service-select-row").after(e.html),u._addAccountDelete(t),u._finishSettingsLoading()},_connectClicked:function(){for(var e,t=d(".fl-builder-settings").data("node"),i=d(this).closest(".fl-builder-service-settings"),l=i.find(".fl-builder-service-select"),o=i.find(".fl-builder-service-connect-row"),n=i.find(".fl-builder-service-connect-input"),s=null,r=0,a={action:"connect_service",node_id:t,service:l.val(),fields:{}};r<n.length;r++)e=(s=n.eq(r)).attr("name"),a.fields[e]=s.val();o.hide(),u._startSettingsLoading(l),FLBuilder.ajax(a,u._connectComplete)},_connectComplete:function(e){var e=FLBuilder._jsonParse(e),t=d(".fl-builder-service-settings-loading"),i=t.find(".fl-builder-service-select-row"),l=t.find(".fl-builder-service-select"),o=t.find(".fl-builder-service-account-row"),n=t.find(".fl-builder-service-account-select"),s=t.find(".fl-builder-service-connect-row");e.error?(s.show(),(0===n.length?l:n).after('<div class="fl-builder-service-error">'+e.error+"</div>")):(s.remove(),o.remove(),i.after(e.html)),u._addAccountDelete(t),u._finishSettingsLoading()},_accountChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),o=t.find(".fl-builder-service-connect-row"),n=t.find("tr.fl-builder-service-field-row"),s=d(".fl-builder-service-error"),l=l.val(),r=null;o.remove(),n.remove(),s.remove(),"add_new_account"==l?r={action:"render_service_settings",node_id:e,service:i.val(),add_new:!0}:""!==l&&(r={action:"render_service_fields",node_id:e,service:i.val(),account:l}),r&&(u._startSettingsLoading(i),FLBuilder.ajax(r,u._accountChangeComplete)),u._addAccountDelete(t)},_accountChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-service-account-row").after(e.html),u._finishSettingsLoading()},_addAccountDelete:function(e){var t=e.find(".fl-builder-service-account-select");0<t.length&&(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 e=d(this).closest(".fl-builder-service-settings"),t=e.find(".fl-builder-service-select"),e=e.find(".fl-builder-service-account-select");confirm(FLBuilderStrings.deleteAccountWarning)&&(FLBuilder.ajax({action:"delete_service_account",service:t.val(),account:e.val()},u._accountDeleteComplete),u._startSettingsLoading(e))},_accountDeleteComplete:function(){var e=d(".fl-builder-service-settings-loading").find(".fl-builder-service-select");u._finishSettingsLoading(),e.trigger("change")},_campaignMonitorClientChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),o=d(this),t=t.find(".fl-builder-service-list-select"),o=o.val();0!==t.length&&t.closest("tr").remove(),""!==o&&(u._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_fields",node_id:e,service:i.val(),account:l.val(),client:o},u._campaignMonitorClientChangeComplete))},_campaignMonitorClientChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-campaign-monitor-client-select").closest("tr").after(e.html),u._finishSettingsLoading()},_mailChimpListChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),t=t.find(".fl-builder-service-list-select");d(".fl-builder-mailchimp-group-select").closest("tr").remove(),""!==t.val()&&(u._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_fields",node_id:e,service:i.val(),account:l.val(),list_id:t.val()},u._mailChimpListChangeComplete))},_mailChimpListChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-service-list-select").closest("tr").after(e.html),u._finishSettingsLoading()},_activeCampaignChange:function(){var e=d(".fl-builder-settings").data("node"),t=d(this).closest(".fl-builder-service-settings"),i=t.find(".fl-builder-service-select"),l=t.find(".fl-builder-service-account-select"),o=t.find(".fl-builder-service-list-select");list_type=t.find('select[name="list_type"]'),0!==o.length&&o.closest("tr").remove(),""!==list_type.val()&&(u._startSettingsLoading(i),FLBuilder.ajax({action:"render_service_fields",node_id:e,service:i.val(),account:l.val(),list_type:list_type.val()},u._activeCampaignTypeChangeComplete))},_activeCampaignTypeChangeComplete:function(e){e=FLBuilder._jsonParse(e);d(".fl-builder-service-settings-loading").find(".fl-builder-service-field-row").after(e.html),u._finishSettingsLoading()}};d(function(){u.init()})}(jQuery),function(t){FLBuilderTour={_tour:null,start:function(){FLBuilderTour._tour?FLBuilderTour._tour.restart():(FLBuilderTour._tour=new Tour(FLBuilderTour._config()),FLBuilderTour._tour.init()),FLBuilder._triggerSettingsSave(!1,!0)&&FLBuilderTour._tour.start()},_config:function(){var e={storage:!1,onStart:FLBuilderTour._onStart,onPrev:FLBuilderTour._onPrev,onNext:FLBuilderTour._onNext,onEnd:FLBuilderTour._onEnd,template:'<div class="popover" role="tooltip"> <i class="fas fa-times" data-role="end"></i> <div class="arrow"></div> <h3 class="popover-title"></h3> <div class="popover-content"></div> <div class="popover-navigation clearfix"> <button class="fl-builder-button fl-builder-button-primary fl-builder-tour-next" data-role="next">'+FLBuilderStrings.tourNext+"</button> </div> </div>",steps:[{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourTemplatesTitle,content:FLBuilderStrings.tourTemplates,onShow:function(){FLBuilder.ContentPanel.show("templates")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddRowsTitle,content:FLBuilderStrings.tourAddRows,onShow:function(){FLBuilder.ContentPanel.show("rows")}},{animation:!1,element:".fl-builder--content-library-panel",placement:"left",title:FLBuilderStrings.tourAddContentTitle,content:FLBuilderStrings.tourAddContent,onShow:function(){FLBuilder.ContentPanel.show("modules")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),t(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),t(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-row.fl-builder-tour-demo-content .fl-module-overlay .fl-block-overlay-actions",placement:"top",title:FLBuilderStrings.tourEditContentTitle,content:FLBuilderStrings.tourEditContent2,onShow:function(){FLBuilderTour._dimSection(".fl-builder-bar"),FLBuilder._closePanel(),t(".fl-row.fl-builder-tour-demo-content").trigger("mouseenter"),t(".fl-row.fl-builder-tour-demo-content .fl-module").eq(0).trigger("mouseenter")}},{animation:!1,element:".fl-builder-content-panel-button",placement:"bottom",title:FLBuilderStrings.tourAddContentButtonTitle,content:FLBuilderStrings.tourAddContentButton,onShow:function(){FLBuilderTour._dimSection("body"),t(".fl-row").eq(0).trigger("mouseleave"),t(".fl-module").eq(0).trigger("mouseleave")}},{animation:!1,element:".fl-builder-bar-title",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="fas 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"disabled"!=FLBuilderConfig.enabledTemplates&&"fl-builder-template"!=FLBuilderConfig.postType||e.steps.shift(),e},_onStart:function(){var e=t("body");e.scrollTop(0),e.append('<div class="fl-builder-tour-mask"></div>'),"module"!=FLBuilderConfig.userTemplateType&&(0===t(".fl-row").length?(t(".fl-builder-content").append('<div class="fl-builder-tour-demo-content fl-builder-tour-placeholder-content fl-row fl-row-full-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()):t(".fl-row").eq(0).addClass("fl-builder-tour-demo-content"))},_onPrev:function(){t(".fl-builder-tour-dimmed").remove()},_onNext:function(){t(".fl-builder-tour-dimmed").remove()},_onEnd:function(){t("body").off("fl-builder.template-selector-loaded"),t(".fl-builder-tour-mask").remove(),t(".fl-builder-tour-dimmed").remove(),t(".fl-builder-tour-placeholder-content").remove(),t(".fl-builder-tour-demo-content").removeClass("fl-builder-tour-demo-content"),FLBuilder._setupEmptyLayout(),FLBuilder._highlightEmptyCols(),FLBuilder._showPanel(),FLBuilder._initTemplateSelector()},_dimSection:function(e){t(e).find(".fl-builder-tour-dimmed").remove(),t(e).append('<div class="fl-builder-tour-dimmed"></div>')}}}(jQuery),function(r,o){String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.substr(t=t||0,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var i=this.toString(),i=(("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>i.length)&&(t=i.length),t-=e.length,i.indexOf(e,t));return-1!==i&&i===t}),r.fn.textWidth=function(e,t){return r.fn.textWidth.fakeEl||(r.fn.textWidth.fakeEl=r("<span>").hide().appendTo(document.body)),r.fn.textWidth.fakeEl.text(e||this.val()||this.text()).css("font",t||this.css("font")),r.fn.textWidth.fakeEl.width()},FLExtendableObject={create:function(e){var t=Object.create(this),t=r.extend(t,e);return r(this).trigger("onCreate"),t}},r.fn.switchClass=function(o,e){return this.each(function(){return r(this).removeClass(function(e,t){var i=[],l=t.split(" ");for(e in l)l[e].startsWith(o)&&i.push(l[e]);return i.join(" ")}),r(this).addClass(o+e)})};var e={init:function(){o.addHook("cancelTask",this.onCancelTask.bind(this)),o.addHook("showSavedMessage",this.onSaveShortcut.bind(this)),o.addHook("goToNextTab",this.onNextPrevTabShortcut.bind(this,"next")),o.addHook("goToPrevTab",this.onNextPrevTabShortcut.bind(this,"prev")),o.addHook("endEditingSession",this.onEndEditingSession.bind(this)),o.addHook("restartEditingSession",this.onRestartEditingSession.bind(this)),this.setDefaultKeyboardShortcuts()},addShortcut:function(e,t,i){e=r.proxy(this,"onTriggerKey",e);i?Mousetrap.bindGlobal(t,e):Mousetrap.bind(t,e)},reset:function(){Mousetrap.reset()},setDefaultKeyboardShortcuts:function(){for(var e in this.reset(),FLBuilderConfig.keyboardShortcuts){var t=FLBuilderConfig.keyboardShortcuts[e].keyCode,i=FLBuilderConfig.keyboardShortcuts[e].isGlobal;this.addShortcut(e,t,i)}},onTriggerKey:function(e,t){o.triggerHook(e),t.preventDefault?t.preventDefault():t.returnValue=!1},onCancelTask:function(){i.isPreviewing?i.endPreview():t.isShowing?t.hide():o.ContentPanel.isShowing&&o.ContentPanel.hide()},pause:function(){Mousetrap.pause()},unpause:function(){Mousetrap.unpause()},onEndEditingSession:function(){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!1),document.documentElement.classList.remove("fl-builder-assistant-visible"),this.reset(),this.addShortcut("restartEditingSession","mod+e")},onRestartEditingSession:function(){const e=FL.Builder.data.getSystemActions();e.setIsEditing(!0),"assistant"===FL.Builder.data.getSystemState().currentPanel&&document.documentElement.classList.add("fl-builder-assistant-visible"),this.reset(),this.setDefaultKeyboardShortcuts()},onSaveShortcut:function(){var e;e=o.SaveManager.layoutNeedsPublish()?FLBuilderStrings.savedStatus.hasAlreadySaved:FLBuilderStrings.savedStatus.nothingToSave,o.SaveManager.showStatusMessage(e),setTimeout(function(){o.SaveManager.resetStatusMessage()},2e3)},onNextPrevTabShortcut:function(e,t){var i=r(".fl-lightbox:visible"),l=i.find(".fl-builder-settings-tabs a");0<i.length&&(i=l.filter("a.fl-active"),("next"==e?i.is(l.last())?l.first():i.next("a"):i.is(l.first())?l.last():i.prev("a")).trigger("click")),o._calculateSettingsTabsOverflow(),t.preventDefault()}},t=FLExtendableObject.create({isShowing:!1,init:function(){this.$el=r(".fl-builder-publish-actions"),this.$defaultBarButtons=r(".fl-builder-bar-actions"),this.$clickAwayMask=r(".fl-builder-publish-actions-click-away-mask"),this.$doneBtn=this.$defaultBarButtons.find(".fl-builder-done-button"),this.$doneBtn.on("click",this.onDoneTriggered.bind(this)),this.$actions=this.$el.find(".fl-builder-button"),this.$actions.on("click touchend",this.onActionClicked.bind(this)),o.addHook("triggerDone",this.onDoneTriggered.bind(this));var e=this.hide.bind(this);o.addHook("cancelPublishActions",e),o.addHook("endEditingSession",e),this.$clickAwayMask.on("click",e)},onDoneTriggered:function(){o.SaveManager.layoutNeedsPublish()?this.show():FLBuilderConfig.shouldRefreshOnPublish?o._exit():o._exitWithoutRefresh()},show:function(){this.isShowing||o._triggerSettingsSave(!1,!0)&&(this.$el.removeClass("is-hidden"),this.$defaultBarButtons.css("opacity","0"),this.$clickAwayMask.show(),this.isShowing=!0,o.triggerHook("didShowPublishActions"))},hide:function(){this.isShowing&&(this.$el.addClass("is-hidden"),this.$defaultBarButtons.css("opacity","1"),this.$clickAwayMask.hide(),this.isShowing=!1)},onActionClicked:function(e){e=r(e.currentTarget).data("action");switch(e){case"dismiss":this.hide();break;case"discard":this.hide(),i.muteToolbar(),o._discardButtonClicked();break;case"publish":this.hide(),i.muteToolbar(),o._publishButtonClicked(),o._destroyOverlayEvents();break;default:this.hide(),i.muteToolbar(),o._draftButtonClicked()}o.triggerHook(e+"ButtonClicked")}}),i={isPreviewing:!1,init:function(){this.$el=r("body"),this.$mainToolbar=r(".fl-builder-bar"),this.$mainToolbarContent=this.$mainToolbar.find(".fl-builder-bar-content"),this.$wpAdminBar=r("#wpadminbar"),this.$endPreviewBtn=r(".fl-builder--preview-actions .end-preview-btn"),o.addHook("endEditingSession",this.endEditingSession.bind(this)),o.addHook("previewLayout",this.togglePreview.bind(this)),this.$endPreviewBtn.on("click",this.endPreview.bind(this)),this.$deviceIcons=r(".fl-builder--preview-actions i"),this.$deviceIcons.on("click",this.onDeviceIconClick.bind(this));this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a, #wp-admin-bar-fl-theme-builder-frontend-edit-link > a").on("click",this.onClickPageBuilderToolbarLink.bind(this)),r("#wpadminbar a").attr("tabindex","-1");var e=this.restartEditingSession.bind(this);o.addHook("restartEditingSession",e),o.addHook("didHideAllLightboxes",this.unmuteToolbar.bind(this)),o.addHook("didCancelDiscard",this.unmuteToolbar.bind(this)),o.addHook("didEnterRevisionPreview",this.hide.bind(this)),o.addHook("didExitRevisionPreview",this.show.bind(this)),o.addHook("didPublishLayout",this.onPublish.bind(this)),o.addHook("didPublishLayout",this.onPublishCacheClear.bind(this))},endEditingSession:function(){o._destroyOverlayEvents(),o._removeAllOverlays(),o._removeEmptyRowAndColHighlights(),o._removeColHighlightGuides(),o._unbindEvents(),r("html").removeClass("fl-builder-edit").addClass("fl-builder-show-admin-bar"),r("body").removeClass("fl-builder-edit"),r("#wpadminbar a").attr("tabindex",null),r(o._contentClass).removeClass("fl-builder-content-editing"),this.hideMainToolbar(),o.ContentPanel.hide(),FLBuilderLayout.init()},restartEditingSession:function(e){o._initTemplateSelector(),o._bindOverlayEvents(),o._highlightEmptyCols(),o._rebindEvents(),r("html").addClass("fl-builder-edit").removeClass("fl-builder-show-admin-bar"),r("body").addClass("fl-builder-edit"),r("#wpadminbar a").attr("tabindex","-1"),r(o._contentClass).addClass("fl-builder-content-editing"),this.showMainToolbar(),e.preventDefault()},onClickPageBuilderToolbarLink:function(e){o.triggerHook("restartEditingSession"),e.preventDefault()},onPublish:function(){this.$wpAdminBar.find("#wp-admin-bar-fl-builder-frontend-edit-link > a span").css("color","#6bc373")},onPublishCacheClear:function(){o.ajax({action:"clear_cache_for_layout"},function(e){console.log(e)})},hide:function(){r("html").hasClass("fl-builder-edit")&&(o._unbindEvents(),o._destroyOverlayEvents(),o._removeAllOverlays(),r("html").removeClass("fl-builder-edit"),r("body").removeClass("admin-bar"),this.hideMainToolbar(),o.ContentPanel.hide(),FLBuilderLayout.init(),o.triggerHook("didHideEditingUI"))},show:function(){r("html").hasClass("fl-builder-edit")||(o._rebindEvents(),o._bindOverlayEvents(),this.showMainToolbar(),FLBuilderResponsiveEditing._switchTo("default"),r("html").addClass("fl-builder-edit"),r("body").addClass("admin-bar"),o.triggerHook("didShowEditingUI"))},beginPreview:function(){o._triggerSettingsSave(!1,!0)&&(this.isPreviewing=!0,this.hide(),r("html").addClass("fl-builder-preview"),r("html, body").removeClass("fl-builder-edit"),o._removeEmptyRowAndColHighlights(),o._removeColHighlightGuides(),o.triggerHook("didBeginPreview"),FLBuilderResponsivePreview.enter())},endPreview:function(){this.isPreviewing=!1,this.show(),o._highlightEmptyCols(),FLBuilderResponsivePreview.exit(),r("html").removeClass("fl-builder-preview"),r("html, body").addClass("fl-builder-edit")},togglePreview:function(){this.isPreviewing?this.endPreview():this.beginPreview()},hideMainToolbar:function(){this.$mainToolbar.addClass("is-hidden"),r("html").removeClass("fl-builder-is-showing-toolbar")},showMainToolbar:function(){this.unmuteToolbar(),this.$mainToolbar.removeClass("is-hidden"),r("html").addClass("fl-builder-is-showing-toolbar")},onDeviceIconClick:function(e){e=r(e.target).data("mode");FLBuilderResponsivePreview.switchTo(e),FLBuilderResponsivePreview._showSize(e)},muteToolbar:function(){this.$mainToolbarContent.addClass("is-muted"),o._hideTipTips()},unmuteToolbar:function(){this.$mainToolbarContent.removeClass("is-muted")}},l={isEditing:!0,init:function(){history.pushState&&(o.addHook("endEditingSession",this.onLeaveBuilder.bind(this)),o.addHook("restartEditingSession",this.onEnterBuilder.bind(this)))},onEnterBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.editUrl);const e=FL.Builder.data.getSystemActions();e.setIsEditing(!0),this.isEditing=!0},onLeaveBuilder:function(){history.replaceState({},document.title,FLBuilderConfig.url);const e=FL.Builder.data.getSystemActions();e.setIsEditing(!1),this.isEditing=!1}},n={$row:null,$rowContent:null,row:null,drag:{},init:function(){var e;this.userCanResize()&&((e=r(o._contentClass)).on("mouseenter touchstart",".fl-row",this.onDragHandleHover.bind(this)),e.on("mousedown touchstart",".fl-block-row-resize",this.onDragHandleDown.bind(this)))},userCanResize:function(){return FLBuilderConfig.rowResize.userCanResizeRows},onDragHandleHover:function(e){var t,i,l,o,n,s;this.drag.isDragging||(t=this,i=r(e.target).closest(".fl-row"),l=i.data("node"),o=r(".fl-builder-row-settings[data-node="+l+"]"),n=o.find("[name=max_content_width_unit]"),s="px",t.onSettingsReady(l,function(e){n.length?s=n.length:void 0!==e&&(s=e.max_content_width_unit),t.$row=i,t.$rowContent=t.$row.find(".fl-row-content"),t.row={node:l,form:o,unit:s,isFixedWidth:t.$row.hasClass("fl-row-fixed-width"),parentWidth:("vw"===s?r(window):t.$row.parent()).width()},t.drag={edge:null,isDragging:!1,originalPosition:null,originalWidth:null,calculatedWidth:null,operation:null},t.row.isFixedWidth?t.drag.originalWidth=t.$row.width():t.drag.originalWidth=t.$rowContent.width(),t.dragInit()}))},onSettingsReady:function(e,t){var i=void 0!==FLBuilderSettingsConfig.nodes?FLBuilderSettingsConfig.nodes:null;null!==i&&void 0!==i[e]?(t(i[e]),null!=n._mouseEnterTimeout&&(clearTimeout(n._mouseEnterTimeout),n._mouseEnterTimeout=null)):(clearTimeout(n._mouseEnterTimeout),n._mouseEnterTimeout=setTimeout(this.onSettingsReady.bind(this),350,e,t))},onDragHandleDown:function(){r("body").addClass("fl-builder-row-resizing"),null!=n._mouseEnterTimeout&&(clearTimeout(n._mouseEnterTimeout),n._mouseEnterTimeout=null)},dragInit:function(e){this.$row.find(".fl-block-row-resize").draggable({axis:"x",start:this.dragStart.bind(this),drag:this.dragging.bind(this),stop:this.dragStop.bind(this)})},dragStart:function(e,t){var i=r("body"),t=r(t.helper);this.drag.isDragging=!0,this.row.isFixedWidth?this.drag.originalWidth=this.$row.width():this.drag.originalWidth=this.$rowContent.width(),t.hasClass("fl-block-col-resize-e")&&(this.drag.edge="e",this.$feedback=t.find(".fl-block-col-resize-feedback-left")),t.hasClass("fl-block-col-resize-w")&&(this.drag.edge="w",this.$feedback=t.find(".fl-block-col-resize-feedback-right")),i.addClass("fl-builder-row-resizing"),o._colResizing=!0,o._destroyOverlayEvents(),o._closePanel()},dragging:function(e,t){var i=t.position.left,t=t.originalPosition.left,l=this.drag.originalWidth,o=this.drag.edge,n=FLBuilderConfig.rowResize.minAllowedWidth,s=FLBuilderConfig.rowResize.maxAllowedWidth;t!==i&&(FLBuilderConfig.isRtl&&(o="w"==o?"e":"w"),this.drag.operation=i<t?"w"===o?"+":"-":"e"===o?"+":"-",o=Math.abs(t-i),"+"===this.drag.operation?this.drag.calculatedWidth=l+2*o:this.drag.calculatedWidth=l-2*o,!1!==n&&this.drag.calculatedWidth<n&&(this.drag.calculatedWidth=n),!1!==s&&this.drag.calculatedWidth>s&&(this.drag.calculatedWidth=s),this.row.isFixedWidth&&this.$row.css("max-width",this.drag.calculatedWidth+"px"),this.$rowContent.css("max-width",this.drag.calculatedWidth+"px"),"px"!==this.row.unit&&(this.drag.calculatedWidth=Math.round(this.drag.calculatedWidth/this.row.parentWidth*100)),_.isUndefined(this.$feedback)||this.$feedback.html(this.drag.calculatedWidth+this.row.unit).show(),this.row.form.length&&this.row.form.find("[name=max_content_width]").val(this.drag.calculatedWidth),requestAnimationFrame(()=>{const e=FL.Builder.data.getLayoutActions();e.resizeRowContent(this.row.node,this.drag.calculatedWidth,!1)}))},dragStop:function(e,t){this.drag.isDragging=!1,_.isUndefined(this.$feedback)||this.$feedback.hide();const i=FL.Builder.data.getLayoutActions();i.resizeRowContent(this.row.node,this.drag.calculatedWidth),o._bindOverlayEvents(),r("body").removeClass("fl-builder-row-resizing"),r(".fl-block-overlay").each(function(){o._buildOverlayOverflowMenu(r(this))}),setTimeout(function(){o._colResizing=!1},50),o.triggerHook("didResizeRow",{rowId:this.row.node,rowWidth:this.drag.calculatedWidth})}},s={templateName:"fl-toolbar",init:function(){this.template=wp.template(this.templateName),this.render(),this.initTipTips(),this.$el.find(".fl-builder-content-panel-button").on("click",o._togglePanel),this.$el.find(".fl-builder-buy-button").on("click",o._upgradeClicked),this.$el.find(".fl-builder-upgrade-button").on("click",o._upgradeClicked),this.$el.find("#fl-builder-toggle-notifications").on("click",this.onNotificationsButtonClicked.bind(this)),o.addHook("notificationsLoaded",this.onNotificationsLoaded.bind(this))},render:function(e){e=r(this.template(e));this.$el=e,this.el=e.get(0),i.$mainToolbar=this.$el,r("body").prepend(e),r("html").addClass("fl-builder-is-showing-toolbar")},initTipTips:function(){r(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}),r(".fl-builder-publish-actions .fl-builder-button-group .fl-builder-button").tipTip({defaultPosition:"bottom",edgeOffset:6})},onNotificationsButtonClicked:function(){o.triggerHook("toggleNotifications")},onNotificationsLoaded:function(){r("body").removeClass("fl-builder-has-new-notifications");o.ajax({action:"fl_builder_notifications",read:!0})}};r(function(){o.ContentPanel.init(),FLBuilderConfig.simpleUi||o.MainMenu.init(),FLBuilderConfig.showToolbar?(s.init(),o.ContentPanel.alignPanelArrow()):r("html").addClass("fl-builder-no-toolbar"),e.init(),i.init(),l.init(),n.init(),t.init(),o.triggerHook("didInitUI")})}(jQuery,FLBuilder),function(o,n){var s=FLExtendableObject.create({templateName:"fl-main-menu-panel-view",name:"Untitled View",isShowing:!1,isRootView:!1,items:{},init:function(){this.template=wp.template(this.templateName)},render:function(){return this.template(this)},bindEvents:function(){this.$items=this.$el.find(".fl-builder--menu-item")},show:function(){this.$el.addClass("is-showing"),this.isShowing=!0},hide:function(){this.$el.removeClass("is-showing"),this.isShowing=!1},transitionIn:function(e){requestAnimationFrame(this.show.bind(this))},transitionOut:function(e){this.hide()}}),e=FLExtendableObject.create({templateName:"fl-main-menu-panel",template:null,menu:null,views:{},viewNavigationStack:[],isShowing:!1,shouldShowTabs:!1,init:function(){for(var e in this.template=wp.template(this.templateName),o("body").prepend(this.template(this)),this.$el=o(".fl-builder--main-menu-panel"),this.$el.find(".fl-builder--main-menu-panel-views").html(""),FLBuilderConfig.mainMenu)this.renderPanel(e);o("body").on("click",".fl-builder--main-menu-panel .pop-view",this.goToPreviousView.bind(this)),this.$tabs=this.$el.find(".fl-builder--tabs > span"),this.$tabs.on("click",this.onItemClick.bind(this)),this.$barTitle=o(".fl-builder-bar-title"),o("body").on("click",".fl-builder-bar-title",this.toggle.bind(this));var t=this.hide.bind(this);n.addHook("didShowPublishActions",t),n.addHook("didBeginSearch",t),n.addHook("didBeginPreview",t),n.addHook("didShowContentPanel",t),n.addHook("endEditingSession",t),n.addHook("didFocusSearchBox",t),n.addHook("didEnterRevisionPreview",t),n.addHook("didFailSettingsSave",t),n.addHook("showKeyboardShortcuts",t),this.$mask=o(".fl-builder--main-menu-panel-mask"),this.$mask.on("click",t),i.init(),l.init()},renderPanel:function(e){var t,i=this.views[e],l=FLBuilderConfig.mainMenu[e];l.handle=e,(l=s.create(l)).init(),t=o(l.render()),l.$el=t,o(".fl-builder--main-menu-panel-views").append(t),l.bindEvents(),l.$el.find(".fl-builder--menu-item").on("click",this.onItemClick.bind(this)),void 0!==i&&(i.$el.remove(),i.isShowing&&(this.currentView=l).show()),l.isRootView&&(this.rootView=l,this.currentView=l),this.views[e]=l},show:function(){this.isShowing||(this.$el.addClass("is-showing"),this.$barTitle.addClass("is-showing-menu"),this.currentView.transitionIn(),this.isShowing=!0,this.$mask.show(),n.triggerHook("didOpenMainMenu"))},hide:function(){this.isShowing&&(this.$el.removeClass("is-showing"),this.$barTitle.removeClass("is-showing-menu"),this.isShowing=!1,this.resetViews(),this.$mask.hide())},toggle:function(){this.isShowing?this.hide():this.show()},onItemClick:function(e){var t=o(e.currentTarget);switch(t.data("type")){case"view":var i=t.data("view");this.goToView(i);break;case"event":i=t.data("event");n.triggerHook(i,t)}},goToView:function(e){var t=this.currentView,e=this.views[e];t.transitionOut(),e.transitionIn(),this.currentView=e,this.viewNavigationStack.push(t)},goToPreviousView:function(){var e=this.currentView,t=this.viewNavigationStack.pop();e.transitionOut(!0),t.transitionIn(!0),this.currentView=t,o(".fl-builder-bar-title-caret").focus()},resetViews:function(){this.currentView!=this.rootView&&(this.currentView.hide(),this.rootView.show(),this.currentView=this.rootView,this.viewNavigationStack=[])}}),i=(n.MainMenu=e,{init:function(){var e;n.addHook("saveTemplate",this.saveTemplate.bind(this)),n.addHook("saveCoreTemplate",this.saveCoreTemplate.bind(this)),n.addHook("duplicateLayout",this.duplicateLayout.bind(this)),n.addHook("showLayoutSettings",this.showLayoutSettings.bind(this)),n.addHook("showGlobalSettings",this.showGlobalSettings.bind(this)),n.addHook("toggleUISkin",this.toggleUISkin.bind(this)),n.addHook("clearLayoutCache",this.clearLayoutCache.bind(this)),n.addHook("launchThemerLayouts",this.launchThemerLayouts.bind(this)),"FL"in window&&"Builder"in FL&&(e=FL.Builder.data.getSystemActions(),n.addHook("showKeyboardShortcuts",function(){e.setShouldShowShortcuts(!0)}))},saveTemplate:function(){n._saveUserTemplateClicked(),e.hide()},saveCoreTemplate:function(){FLBuilderCoreTemplatesAdmin._saveClicked(),e.hide()},duplicateLayout:function(){n._duplicateLayoutClicked(),e.hide()},showGlobalSettings:function(){n._globalSettingsClicked(),e.hide()},showLayoutSettings:function(){n._layoutSettingsClicked(),e.hide()},clearLayoutCache:function(){n.ajax({action:"clear_cache"},function(){location.href=FLBuilderConfig.editUrl}),n.showAjaxLoader(),e.hide()},toggleUISkin:function(e){o('a[data-event="toggleUISkin"]');var t,i,l=o("body");l.hasClass("fl-builder-ui-skin--light")&&(t="light",i="dark"),l.hasClass("fl-builder-ui-skin--dark")&&(t="dark",i="light"),l.removeClass("fl-builder-ui-skin--"+t).addClass("fl-builder-ui-skin--"+i),l.removeClass("fluid-color-scheme-"+t).addClass("fluid-color-scheme-"+i),"Builder"in FL&&"data"in FL.Builder&&FL.Builder.data.getSystemActions().setColorScheme(i),n.ajax({action:"save_ui_skin",skin_name:i})},launchThemerLayouts:function(){FLBuilderConfig.lite?n._showProMessage("Themer Layouts"):window.open(FLBuilderConfig.themerLayoutsUrl),e.hide()}}),l={init:function(){n.addHook("beginTour",this.onStartTourClicked.bind(this))},onStartTourClicked:function(){FLBuilderTour.start(),e.hide()}}}(jQuery,FLBuilder),function(n,o){var s=FLExtendableObject.create({handle:"",name:"",panel:null,shouldShowTabItem:!0,isShowing:!1,views:{},activeView:null,defaultView:null,categorySelector:null,init:function(e){this.categorySelector=i.create({handle:"selector-"+this.handle,tab:this,items:[]}),this.categorySelector.init(),n(this.categorySelector).on("categorySelected",this.onViewSelected.bind(this));var t;e.views;this.initViews(e.views),0===Object.keys(this.views).length&&this.addView(t={handle:"noViews",name:"No Views",templateName:"fl-content-panel-no-view"}),this.activeView||(e=Object.keys(this.views)[0],t=this.views[e],this.activeView=t),this.defaultView=this.activeView,n(this.panel).on("afterRender",this.renderView.bind(this,this.activeView)),n(this.panel).on("onShow onShowTab",this.initScroller.bind(this)),o.addHook("contentItemsChanged",this.onLibraryDataChanged.bind(this))},initViews:function(e){for(var t in e){t=e[t];this.categorySelector.addItem(t),"separator"!==t.type&&this.addView(t)}},addView:function(e){var t=l;switch(this.handle){case"modules":t=r;break;case"rows":t=a;break;case"templates":t=d;break;case"saved":t=u;break;default:t=l}var e=(t=!_.isNull(this.viewController)&&!_.isUndefined(this.viewController)?window[this.viewController]:t).create(e),i=e.handle;e.init(),(this.views[i]=e).isShowing&&(this.activeView=e)},renderView:function(e){var t;this.$el=this.panel.$el.find('.fl-builder--panel-view[data-tab="'+this.handle+'"]'),e=_.isObject(e)?e:this.views[e],_.isObject(e)&&_.isFunction(e.render)&&(t=e.render(),this.$el.find(".fl-nanoscroller-content").html(t),this.activeView=e,o._initSortables(),this===this.panel.activeTab&&this.renderGroupSelector(),this.initScroller(),this.$el.find(".fl-nanoscroller-content").scrollTop(0))},initScroller:function(){this.$el.nanoScroller({alwaysVisible:!0,preventPageScrolling:!0,paneClass:"fl-nanoscroller-pane",sliderClass:"fl-nanoscroller-slider",contentClass:"fl-nanoscroller-content"})},show:function(){n(this.activeView).trigger("onBeforeShow"),this.renderGroupSelector(),this.isShowing=!0,this.$el.addClass("is-showing"),this.$el.find(".fl-nanoscroller-content").scrollTop(0)},hide:function(){this.isShowing=!1,this.$el.removeClass("is-showing"),this.activeView!==this.defaultView&&this.renderView(this.defaultView),_.isObject(this.categorySelector)&&this.categorySelector.close()},renderGroupSelector:function(){var e,t=this.panel.$groupSelect,i=this.panel.$el.find(".fl-builder-panel-search");this.isSearchEnabled?i.show():i.hide(),1<Object.keys(this.views).length&&!_.isUndefined(this.categorySelector)?(e=this.categorySelector.render(),this.panel.$el.find(".fl-builder-content-group-select"),t.html(e),t.show(),this.panel.$el.removeClass("single-view")):(t.hide(),i.hide(),this.panel.$el.addClass("single-view"))},onViewSelected:function(e,t){this.renderView(t),this.categorySelector.close()},onLibraryDataChanged:function(){this.renderView(this.activeView)}}),l=FLExtendableObject.create({templateName:"",name:"",handle:"",query:null,init:function(){this.template=wp.template(this.templateName),n(this).on("afterRender",this.bindEvents.bind(this)),n(this).trigger("afterInit")},filterTemplateData:function(e){return _.isNull(this.query)||_.isUndefined(this.query)||(e.queryResults=o.Search.byQuery(this.query)),e},render:function(){n(this).trigger("beforeRender");var e=this.filterTemplateData(this),e=n(this.template(e));return this.$el=e,n(this).trigger("afterRender"),e},bindEvents:function(){},transitionIn:function(){},transitionOut:function(){}}),r=l.create({templateName:"fl-content-panel-modules-view",bindEvents:function(){this.$sections=this.$el,this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),a=l.create({templateName:"fl-content-panel-row-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder-block, .fl-builder-blocks-section-title")}}),d=l.create({templateName:"fl-content-panel-templates-view",bindEvents:function(){this.$items=this.$el.find(".fl-builder--template-collection-item"),this.$items.on("click",this.onTemplateClick.bind(this)),this.$userTemplateSections=n(".fl-user-templates"),this.$userTemplates=this.$el.find(".fl-user-template, .fl-builder--save-new-user-template"),this.$saveNewTemplateInput=this.$el.find('.fl-save-control input[name="template-name"]'),this.$saveNewTemplateCat=this.$el.find('.fl-save-control input[name="template-category"]'),this.$saveNewTemplateBtn=this.$el.find(".fl-save-control button"),this.$saveNewMask=this.$el.find(".fl-save-control-mask"),this.$saveNewTemplateInput.on("focus",this.onSaveInputFocus.bind(this)),this.$saveNewTemplateInput.on("keyup",this.onSaveInputKeyup.bind(this)),this.$saveNewTemplateBtn.on("click",this.onSaveButtonClick.bind(this)),this.$saveNewMask.on("click",this.resetSaveInput.bind(this))},onSaveInputFocus:function(){this.resetSaveInput(),this.$saveNewMask.show()},resetSaveInput:function(){this.$saveNewTemplateInput.val(""),this.$saveNewTemplateBtn.hide(),this.$saveNewMask.hide()},onSaveInputKeyup:function(e){var e=n(e.currentTarget),t=e.val(),e=e.siblings("button");""!==t?e.show():e.hide()},onSaveButtonClick:function(e){var e=n(e.currentTarget),t=e.siblings('input[name="template-name"]').val(),e=e.siblings('input[name="template-category"]').val();""!==t&&o.ajax({action:"save_user_template",settings:{name:t,category:e}},o._saveUserTemplateSettingsComplete)},onTemplateClick:function(e){var e=n(e.currentTarget),t=e.data("id"),i=e.data("type"),l=e.data("premium");FLBuilderConfig.lite&&l?o._showProMessage(e.find(".fl-builder--template-name").text()):o._requestTemplateInsert(t,i)}}),u=l.create({templateName:"fl-content-panel-saved-view",filterTemplateData:function(e){return e.queryResults=o.Search.byQuery({kind:"template",type:"user",content:["module","column","row"]}),e}}),i=FLExtendableObject.create({templateName:"fl-content-panel-category-selector",template:null,tab:null,isOpen:!1,items:{},init:function(){this.template=wp.template(this.templateName),n(this).on("afterRender",this.bindEvents.bind(this)),n(this.tab.panel).on("didShowSearchControls",this.close.bind(this))},render:function(){this.close();var e=n(this.template(this));return this.$el=e,n(this).trigger("afterRender"),e},bindEvents:function(){this.$selectorTitle=this.$el.find(".fl-builder--selector-display"),this.$selectorTitle.on("click",this.toggleOpenClose.bind(this)),this.$categories=this.$el.find(".fl-builder--selector-menu .fl-builder--menu-item"),this.$categories.on("click",this.onCategoryClick.bind(this))},addItem:function(e){var t=_.isUndefined(e.handle)?_.uniqueId("sep_"):e.handle;this.items[t]=e},open:function(){this.isOpen||(this.$el.addClass("is-showing"),this.isOpen=!0)},close:function(){this.isOpen&&(this.$el.removeClass("is-showing"),this.isOpen=!1,this.$selectorTitle.find("button").focus())},toggleOpenClose:function(){this.isOpen?this.close():this.open()},onCategoryClick:function(e){var t,e=n(e.target),i=e.data("view");e.hasClass("fl-has-children")?((t=n('[data-parent="'+i+'"]')).is(":visible")?(this.items[i].hasChildrenOpen=!1,e.removeClass("fl-has-children-showing"),t.hide()):(this.items[i].hasChildrenOpen=!0,e.addClass("fl-has-children-showing"),t.show()),e.blur()):n(this).trigger("categorySelected",i)}});o.ContentPanel=FLExtendableObject.create({templateName:"fl-content-panel-base",template:null,tabs:{},activeTab:null,isShowing:!1,init:function(){if(FLBuilderConfig.panelData){var e,t=FLBuilderConfig.panelData.tabs;for(e in t){var i=t[e],l=s.create(i);l.panel=this,l.views={},l.init(i),(this.tabs[e]=l).isShowing&&(this.activeTab=l),this.activeTab||(i=Object.keys(this.tabs)[0],(l=this.tabs[i]).isShowing=!0,this.activeTab=l)}this.template=wp.template(this.templateName),this.render(),this.renderSearchResults=wp.template("fl-search-results-panel"),this.renderNoResults=wp.template("fl-search-no-results"),o.triggerHook("contentPanelDidInit")}},render:function(){n("body").prepend(this.template(this)),this.$el=n(".fl-builder--content-library-panel"),this.bindEvents(),this.$groupSelect=this.$el.find(".fl-builder-content-group-select"),n(this).trigger("afterRender")},bindEvents:function(){this.$tabs=this.$el.find(".fl-builder--tabs [data-tab]"),this.$tabs.on("mouseup",this.onTabItemMouseUp.bind(this)),this.$tabs.on("click",this.onTabItemClick.bind(this)),this.$search=this.$el.find(".fl-builder-panel-search"),this.$searchBtn=this.$search.find(".fl-builder-toggle-panel-search"),this.$searchInput=this.$search.find('input[name="search-term"]'),this.$searchBtn.on("click",this.onSearchButtonClicked.bind(this)),this.$search.find(".fl-builder-dismiss-panel-search").on("click",this.onDismissButtonClicked.bind(this)),this.$searchInput.on("keyup",this.onSearchTermChanged.bind(this)),this.$searchPanel=this.$el.find(".fl-builder--search-results-panel"),o.addHook("showContentPanel",this.show.bind(this)),o.addHook("showModules",this.show.bind(this,"modules")),o.addHook("showRows",this.show.bind(this,"rows")),o.addHook("showTemplates",this.show.bind(this,"templates")),o.addHook("showSaved",this.show.bind(this,"saved")),o.addHook("showSearch",this.goToSearch.bind(this));var e=this.hide.bind(this),e=(o.addHook("hideContentPanel",e),o.addHook("didShowLightbox",e),o.addHook("didShowPublishActions",e),o.addHook("didBeginSearch",e),o.addHook("didInitDrag",e),o.addHook("didOpenMainMenu",e),o.addHook("didApplyTemplate",e),this.toggleShowHide.bind(this));o.addHook("toggleContentPanel",e),o.addHook("didStopDrag",this.hideSearchControls.bind(this))},alignPanelArrow:function(){var e,t=this.$el,i=this.$el.find(".fl-builder--panel-arrow"),l=n(".fl-builder-content-panel-button"),o=this.$el.css("animation-duration");0!=l.length&&(this.$el.css("animation-duration","0s"),this.show(),t=t[0].getBoundingClientRect(),e=i[0].getBoundingClientRect(),this.hide(),this.$el.css("animation-duration",o),o=(l=(o=l[0].getBoundingClientRect()).x+o.width/2)<t.x?20:l-t.x-e.width/2,i.css({right:"auto",left:o+"px"}))},show:function(e){if("module"!==FLBuilderConfig.userTemplateType&&!FLBuilderConfig.simpleUi&&(o.triggerHook("willShowContentPanel"),void 0!==e&&this.showTab(e),!this.isShowing&&o._triggerSettingsSave(!1,!0)&&(n("body").addClass("fl-builder-content-panel-is-showing"),this.isShowing=!0,n(this).trigger("onShow"),o.triggerHook("didShowContentPanel"),"Builder"in FL&&"data"in FL.Builder))){const t=FL.Builder.data.getSystemActions();t.hideCurrentPanel()}},hide:function(){this.isShowing&&(this.$el.hasClass("fl-builder-ui-pinned")||(n("body").removeClass("fl-builder-content-panel-is-showing"),this.isShowing=!1,n(this).trigger("onHide"),o.triggerHook("didHideContentPanel")))},toggleShowHide:function(){this.isShowing?this.hide():this.show()},showTab:function(e){e=this.tabs[e];_.isObject(e)&&(_.isObject(this.activeTab)&&(this.activeTab.hide(),this.$tabs.filter(".is-showing").removeClass("is-showing")),this.hideSearchControls(),e.show(),this.$tabs.filter('[data-tab="'+e.handle+'"]').addClass("is-showing"),this.activeTab=e,n(this).trigger("onShowTab"))},goToSearch:function(){this.show("modules"),this.$el.find(".fl-builder-toggle-panel-search").trigger("click")},onTabItemMouseUp:function(e){n(e.currentTarget).blur()},onTabItemClick:function(e){e=n(e.target).data("tab");this.showTab(e)},onSearchButtonClicked:function(){this.showSearchControls()},onDismissButtonClicked:function(){this.hideSearchControls(),this.$searchBtn.focus()},showSearchControls:function(){this.$search.addClass("is-showing-input"),this.$search.find('input[name="search-term"]').focus(),n(".fl-builder--selector-display-label").attr("tabindex",-1),this.$searchBtn.attr("tabindex",-1),n(this).trigger("didShowSearchControls")},hideSearchControls:function(){this.$search.removeClass("is-showing-input"),this.clearSearchInput(),this.hideSearchResults(),n(".fl-builder--selector-display-label").attr("tabindex",null),this.$searchBtn.attr("tabindex",null)},onSearchTermChanged:function(e){var t,i=this.$searchInput.val();""!==i&&""!=(t=o.Search.byTerm(i)).term?this.showSearchResults(t):this.hideSearchResults()},clearSearchInput:function(){this.$searchInput.val(""),this.hideSearchResults()},showSearchResults:function(e){var t;0<e.total?(t=n(this.renderSearchResults(e)),this.$searchPanel.html(t),o._initSortables()):(t=n(this.renderNoResults(e)),this.$searchPanel.html(t)),n("body").addClass("fl-builder-search-results-panel-is-showing")},hideSearchResults:function(){n("body").removeClass("fl-builder-search-results-panel-is-showing")}})}(jQuery,FLBuilder),function(c){FLBuilderSettingsForms={config:null,settings:null,legacyXhr:null,init:function(){this.bind()},bind:function(){FLBuilder.addHook("didDeleteRow",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteColumn",this.closeOnDeleteNode),FLBuilder.addHook("didDeleteModule",this.closeOnDeleteNode)},render:function(e,t){var i=FLBuilderSettingsConfig.forms,l=FLBuilderSettingsConfig.modules;if(!e.nodeId||e.settings){if(t=void 0===t?function(){}:t,(e=c.extend({type:"general",id:null,nodeId:null,className:"",attrs:"",title:"",badges:[],tabs:[],activeTab:null,buttons:[],settings:{},legacy:null,rules:null,preview:null,helper:null,messages:null},e)).id){if("general"===e.type&&void 0!==i[e.id])e=c.extend(!0,e,i[e.id]);else{if("module"!==e.type||void 0===l[e.id])return;e=c.extend(!0,e,l[e.id])}this.config=e,this.renderLightbox(e)&&(e.legacy||!this.renderLegacySettings(e,t)?this.renderComplete(e,t):this.showLightboxLoader());i=FL.Builder.data.getSystemState().currentPanel;if(null!==i&&"outline"!==i){const o=FL.Builder.data.getSystemActions();o.hideCurrentPanel()}}}else this.loadNodeSettings(e,t)},cacheCurrentSettings:function(){var e=c(".fl-builder-settings:visible");e.closest(".fl-lightbox-wrap[data-parent]").length||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,e),FLBuilder.preview&&(FLBuilder.preview._savedSettings=this.settings))},loadNodeSettings:function(t,i){FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"get_node_settings",node_id:t.nodeId},function(e){t.settings=FLBuilder._jsonParse(e),FLBuilderSettingsConfig.nodes[t.nodeId]=t.settings,FLBuilderSettingsForms.render(t,i),FLBuilder.hideAjaxLoader()})},renderLightbox:function(e){var t=wp.template("fl-builder-settings"),i=FLBuilder._lightbox._node.find("form.fl-builder-settings"),l=(c(".fl-lightbox-wrap[data-parent]"),localStorage.getItem("fl-builder-settings-tab"));if(e.nodeId&&e.nodeId===i.data("node")&&!e.lightbox)return FLBuilder._focusFirstSettingsControl(),!1;if(e.hide)return!0;if(l)for(var o in e.tabs)o===l.replace("fl-builder-settings-tab-","")&&(e.activeTab=o);if(e.activeTab||(e.activeTab=Object.keys(e.tabs).shift()),e.lightbox)e.lightbox.setContent(t(e));else{if(!FLBuilder._triggerSettingsSave(!0,!0))return!1;FLBuilder.preview&&FLBuilder.preview.cancel(),FLBuilder._closePanel(),FLBuilder._showLightbox(t(e))}return!0},renderComplete:function(e,t){setTimeout(function(){e.legacy&&this.renderLegacySettingsComplete(e.legacy),t(),FLBuilder._initSettingsForms(),e.rules&&FLBuilder._initSettingsValidation(e.rules,e.messages),e.preview&&(FLBuilder.preview=new FLBuilderPreview(e.preview)),e.helper&&e.helper.init(),this.cacheCurrentSettings()}.bind(this),1)},renderFields:function(e,t){var i,l,o=wp.template("fl-builder-settings-row"),n="",s=null,r=null,a=null,u=["align","border","dimension","unit","photo","select","typography"],t=t||this.config.settings,d=FLBuilderConfig.global;for(s in e)l=!!(i=e[s]).multiple,supportsResponsive=-1<c.inArray(i.type,u),r=_.isUndefined(t[s])?"":t[s],i.type&&(_.isUndefined(t[s])&&i.default&&(r=i.default),a=i.responsive&&d.responsive_enabled&&!l&&supportsResponsive?i.responsive:null,n+=o({field:i,name:s,rootName:s,value:r,preview:JSON.stringify(i.preview||{type:"refresh"}),responsive:a,rowClass:i.row_class?" "+i.row_class:"",isMultiple:l,supportsMultiple:"editor"!==i.type&&"service"!==i.type,settings:t,globalSettings:d,template:c("#tmpl-fl-builder-field-"+i.type)}));return n},renderField:function(e){return wp.template("fl-builder-field")(e)},renderSectionTemplate:function(e,t){return wp.template(e.template.id)({section:e,settings:t})},renderTabTemplate:function(e,t){return wp.template(e.template.id)({tab:e,settings:t})},renderLegacySettings:function(t,i){var e=c(".fl-builder-settings:visible"),l=null,o=!1,n={tabs:[],sections:[],fields:[],settings:null,node_id:null};return e.find(".fl-legacy-field").each(function(){l=c(this),n.fields.push(l.attr("data-field")),FLBuilderSettingsForms.showFieldLoader(l),o=!0}),e.find(".fl-legacy-settings-section").each(function(){l=c(this),n.sections.push({tab:l.attr("data-tab"),section:l.attr("data-section")}),o=!0}),e.find(".fl-legacy-settings-tab").each(function(){l=c(this),n.tabs.push(l.attr("data-tab")),o=!0}),e.attr("data-node")?n.node_id=e.attr("data-node"):n.settings=FLBuilder._getOriginalSettings(e,!0),this.legacyXhr&&(this.legacyXhr.abort(),this.legacyXhr=null),this.legacyXhr=FLBuilder.ajax(c.extend(this.getLegacyVars(),{action:"render_legacy_settings",data:n,form:e.attr("data-form-id"),group:e.attr("data-form-group"),lightbox:e.closest(".fl-builder-lightbox").attr("data-instance-id")}),function(e){FLBuilderSettingsForms.renderLegacySettingsComplete(e),o&&FLBuilderSettingsForms.renderComplete(t,i),FLBuilderSettingsForms.hideLightboxLoader()}),o},renderLegacySettingsComplete:function(e){var i="object"==typeof e?e:FLBuilder._jsonParse(e),e=null,t=null,l="",o=null,n=null;if(i.lightbox?t=(e=c(".fl-builder-lightbox[data-instance-id="+i.lightbox+"]")).length?e.find(".fl-builder-settings"):null:e=(t=c(".fl-builder-settings:visible")).closest(".fl-builder-lightbox"),t&&t.length){for(l in i.fields)(o=c("#fl-field-"+l).attr("id","")).after(i.fields[l]).remove();for(l in i.extras)o=c("#fl-field-"+l).find(".fl-field-control-wrapper"),i.extras[l].multiple?o.each(function(e,t){e in i.extras[l].before&&""!=i.extras[l].before[e]&&c(this).prepend('<div class="fl-form-field-before">'+i.extras[l].before[e]+"</div>"),e in i.extras[l].after&&""!=i.extras[l].after[e]&&c(this).append('<div class="fl-form-field-after">'+i.extras[l].after[e]+"</div>")}):(""!=i.extras[l].before&&o.prepend('<div class="fl-form-field-before">'+i.extras[l].before+"</div>"),""!=i.extras[l].after&&o.append('<div class="fl-form-field-after">'+i.extras[l].after+"</div>"));for(n in i.sections)for(l in i.sections[n])c("#fl-builder-settings-section-"+l).html(i.sections[n][l]);for(l in i.tabs)(n=c("#fl-builder-settings-tab-"+l)).html(i.tabs[l]);e.data("parent")||(this.settings=FLBuilder._getSettingsForChangedCheck(this.config.nodeId,t),FLBuilder.preview&&(this.settings=c.extend(this.settings,FLBuilder.preview._savedSettings),FLBuilder.preview._savedSettings=this.settings)),_.isUndefined(window.FLThemeBuilderFieldConnections)||FLThemeBuilderFieldConnections._initSettingsForms(),this.legacyXhr=null}},getLegacyVars:function(){var e=c(".fl-builder-settings:visible"),t=e.closest(".fl-builder-lightbox").attr("data-parent"),i={};return t&&(e=(t=c(".fl-builder-lightbox[data-instance-id="+t+"]")).find("form.fl-builder-settings"),t=FLBuilder._getSettings(e),(e=e.attr("data-node"))&&(i.node_id=e,i.node_settings=t)),i},settingsHaveChanged:function(){var e=FLBuilder._lightbox._node.find("form.fl-builder-settings"),e=FLBuilder._getSettings(e);return!!this.settings&&JSON.stringify(this.settings)!=JSON.stringify(e)},closeOnDeleteNode:function(e){var t=c(".fl-builder-settings[data-node]"),i=FLBuilder._contentClass+" .fl-node-"+t.data("node");t.length&&!c(i).length&&FLLightbox.closeAll()},showLightboxLoader:function(){c(".fl-builder-settings:visible").append('<div class="fl-builder-loading"></div>')},hideLightboxLoader:function(e){c(".fl-builder-settings:visible .fl-builder-loading").remove()},showFieldLoader:function(e){e.closest(".fl-field-control").find(".fl-field-control-wrapper").hide().after('<div class="fl-field-loader">'+FLBuilderStrings.fieldLoading+"</div>")},hideFieldLoader:function(e){var t=e.closest(".fl-field");e.closest(".fl-field-control").find(".fl-field-control-wrapper").show(),t.find(".fl-field-loader").remove()}},FLBuilderSettingsConfig="undefined"==typeof FLBuilderSettingsConfig?{}:FLBuilderSettingsConfig,c.extend(FLBuilderSettingsConfig,{init:function(){FLBuilder.addHook("didSaveNodeSettings",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveNodeSettingsComplete",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didSaveLayoutSettingsComplete",this.updateOnSaveLayoutSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.updateOnSaveGlobalSettings.bind(this)),FLBuilder.addHook("didSaveGlobalSettingsComplete",this.reload),FLBuilder.addHook("didAddRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumnGroup",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didAddModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDeleteModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateRow",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateColumn",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didDuplicateModule",this.updateOnNodeEvent.bind(this)),FLBuilder.addHook("didResizeRow",this.updateOnRowResize.bind(this)),FLBuilder.addHook("didResizeColumn",this.updateOnColumnResize.bind(this)),FLBuilder.addHook("didResetRowWidth",this.updateOnResetRowWidth.bind(this)),FLBuilder.addHook("didResetColumnWidths",this.updateOnResetColumnWidths.bind(this)),FLBuilder.addHook("didApplyTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyRowTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didApplyColTemplateComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didSaveGlobalNodeTemplate",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreRevisionComplete",this.updateOnApplyTemplate.bind(this)),FLBuilder.addHook("didRestoreHistoryComplete",this.updateOnHistoryRestored.bind(this))},reload:function(){var e=FLBuilderConfig.editUrl+"&fl_builder_load_settings_config=core";c('script[src*="fl_builder_load_settings_config=core"]').remove(),c("head").append('<script src="'+e+'"><\/script>')},updateOnSaveGlobalSettings:function(e,t){this.settings.global=t,FLBuilderConfig.global=t},updateOnSaveLayoutSettings:function(e,t){this.settings.layout=t},updateOnNodeEvent:function(){var e=arguments[0];-1<e.namespace.indexOf("didAdd")?this.addNode("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):-1<e.namespace.indexOf("didSaveNodeSettings")?this.updateNode(arguments[1].nodeId,arguments[1].settings):-1<e.namespace.indexOf("didDelete")?this.deleteNodes("object"==typeof arguments[1]?arguments[1].nodeId:arguments[1]):-1<e.namespace.indexOf("didDuplicate")&&this.duplicateNode(arguments[1].oldNodeId,arguments[1].newNodeId)},updateOnRowResize:function(e,t){this.nodes[t.rowId].max_content_width=t.rowWidth},updateOnResetRowWidth:function(e,t){this.nodes[t].max_content_width=""},updateOnColumnResize:function(e,t){this.nodes[t.colId].size=t.colWidth,this.nodes[t.siblingId].size=t.siblingWidth},updateOnResetColumnWidths:function(e,t){var i=this;t.cols.each(function(){var e=c(this),t=e.attr("data-node");i.nodes[t]&&(i.nodes[t].size=parseFloat(e[0].style.width))})},updateOnApplyTemplate:function(e,t){this.nodes=t.nodes,this.attachments=t.attachments},updateOnHistoryRestored:function(e,t){this.nodes=t.config.nodes,this.attachments=t.config.attachments,this.settings.layout=t.settings.layout,this.settings.global=t.settings.global,FLBuilderConfig.global=t.settings.global},addNode:function(e,t){var i=c(".fl-node-"+e),l=i.hasClass("fl-row"),o=i.hasClass("fl-col"),n=i.hasClass("fl-col-group"),s=i.hasClass("fl-module"),r=this;this.nodes[e]||(t||(l?t=c.extend({},this.defaults.row):o?t=c.extend({},this.defaults.column):s&&(t=c.extend({},this.defaults.modules[i.attr("data-type")])),l||n?i.find(".fl-col").each(function(){var e=c(this),t=c.extend({},r.defaults.column);t.size=parseFloat(e[0].style.width),r.addNode(e.attr("data-node"),t)}):s&&(r.addNode(i.closest(".fl-row").attr("data-node")),r.addNode(i.closest(".fl-col").attr("data-node")),r.updateOnResetColumnWidths(null,{cols:i.closest(".fl-col-group").find("> .fl-col")}))),t&&(this.nodes[e]=t))},updateNode:function(e,i){var t=c(".fl-node-"+e),l=this;t.hasClass("fl-col")&&t.closest(".fl-col-group").find("> .fl-col").each(function(){var e=c(this),t=e.attr("data-node");l.nodes[t].size=parseFloat(e[0].style.width),l.nodes[t].equal_height=i.equal_height,l.nodes[t].content_alignment=i.content_alignment,l.nodes[t].responsive_order=i.responsive_order}),this.nodes[e]=i},duplicateNode:function(t,i){var e=c(".fl-node-"+i).find("[data-node]"),l=c(".fl-node-"+t).find("[data-node]"),o=this;this.nodes[i]=this.nodes[t],e.each(function(e){t=l.eq(e).attr("data-node"),i=c(this).attr("data-node"),o.nodes[t]&&(o.nodes[i]=o.nodes[t])})},deleteNodes:function(){var e="",t=c(FLBuilder._contentClass).html();if(t)for(e in this.nodes)-1===t.indexOf(e)&&(this.nodes[e]=null,delete this.nodes[e])}}),c(function(){FLBuilderSettingsConfig.init(),FLBuilderSettingsForms.init()})}(jQuery),function(c){FLBuilderSettingsCopyPaste={init:function(){FLBuilder.addHook("settings-form-init",this.initExportButton),FLBuilder.addHook("settings-form-init",this.initImportButton)},initExportButton:function(){new ClipboardJS("button.module-export-all",{text:function(e){var t=c(".fl-builder-module-settings").data("node"),t=c(".fl-builder-module-settings[data-node="+t+"]"),i=c(".fl-builder-module-settings").data("type"),t=FLBuilder._getSettings(t),i="/// {type:"+i+"} "+(new Date).toDateString()+" ///",l=c("button.module-export-all"),o=l.attr("title");return l.text(FLBuilderStrings.module_import.copied),setTimeout(function(){l.text(o)},1e3),i+"\n"+JSON.stringify(t)}}),new ClipboardJS("button.module-export-style",{text:function(u){var e,t=c(".fl-builder-module-settings").data("node"),i=c(".fl-builder-module-settings[data-node="+t+"]"),t=c(".fl-builder-module-settings").data("type"),l=FLBuilder._getSettings(i),t="/// {type:"+t+"} "+(new Date).toDateString()+" ///",o=c("button.module-export-style"),n=o.attr("title"),s={};for(e in l){var r=i.find('[name="'+e+'"]'),a=i.find('[name*="'+e+'["]'),d=!1;r.length?d=r.closest(".fl-field").data("is-style"):a.length&&(d=a.closest(".fl-field").data("is-style")),d&&(s[e]=l[e])}return o.text(FLBuilderStrings.module_import.copied),setTimeout(function(){o.text(n)},1e3),t+"\n"+JSON.stringify(s)}})},initImportButton:function(){c("button.module-import-apply").click(function(){var e=c(".fl-builder-settings-lightbox .fl-builder-settings"),t=c(".module-import-input").val(),i=t.match(/\/\/\/\s\{type:([_a-z0-9-]+)/i),l=!1,o=c(".fl-builder-module-settings").data("type"),n=c(".fl-builder-settings-lightbox .module-import-error");if(n.hide(),!(l=i&&void 0!==i[1]?i[1]:l)||l!==o)return n.html(FLBuilderStrings.module_import.type).show(),!1;i=t.replace(/\/\/\/.+\/\/\//,"");try{var s=JSON.parse(i)}catch(e){s=!1;return n.html(FLBuilderStrings.module_import.error).show(),!1}if(s){l=e.attr("data-node"),o=c.extend({},FLBuilderSettingsConfig.nodes[l],s);FLBuilderSettingsConfig.nodes[l]=o;const r=FL.Builder.data.getLayoutActions();t=FLBuilder._saveSettingsComplete.bind(this,!0,null);r.updateNodeSettings(l,o,t),FLBuilder.triggerHook("didSaveNodeSettings",{nodeId:l,settings:o}),FLBuilder._lightbox.close()}})}},c(function(){FLBuilderSettingsCopyPaste.init()})}(jQuery),function(a){var e={minWidth:320,maxWidth:600,minHeight:400,init:function(){this.initPanel(),this.pinOrUnpin(),this.bind()},bind:function(){var e=a(window),t=a("body");e.on("resize",_.throttle(this.windowResize.bind(this),250)),t.on("click",".fl-builder-ui-pinned-collapse",this.collapse),t.on("click",".fl-builder--content-library-panel .fl-builder--tabs",this.closeLightboxOnPanelClick),FLBuilder.addHook("didShowLightbox",this.pinLightboxOnOpen.bind(this)),FLBuilder.addHook("didHideAllLightboxes",this.pinnedLightboxClosed.bind(this)),FLBuilder.addHook("endEditingSession",this.hide.bind(this)),FLBuilder.addHook("didHideEditingUI",this.hide.bind(this)),FLBuilder.addHook("publishButtonClicked",this.hide.bind(this)),FLBuilder.addHook("restartEditingSession",this.show.bind(this)),FLBuilder.addHook("didShowEditingUI",this.show.bind(this)),FLBuilder.addHook("didShowLightbox",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.uncollapse.bind(this)),FLBuilder.addHook("willShowContentPanel",this.closeLightboxOnPanelClick.bind(this))},isPinned:function(){return a(".fl-builder--content-library-panel").hasClass("fl-builder-ui-pinned")},pin:function(e,t){this.pinPanel(e),this.pinLightboxes(),t&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didPinContentPanel")},unpin:function(e){this.unpinLightboxes(),this.unpinPanel(),e&&this.savePosition(),FLBuilder._resizeLayout(),FLBuilder.triggerHook("didUnpinContentPanel")},pinOrUnpin:function(){var e=a(".fl-builder--content-library-panel"),t=this.isPinned();e.hasClass("fl-builder-ui-pinned-hidden")||(window.innerWidth<=this.maxWidth?(t&&this.unpin(!1),this.disableDragAndResize()):(t||this.restorePosition(),this.enableDragAndResize()))},show:function(){var e=a(".fl-builder--content-library-panel");e.hasClass("fl-builder-ui-pinned-hidden")&&(e.removeClass("fl-builder-ui-pinned-hidden"),e.show(),this.restorePosition())},hide:function(){var e=a("body"),t=a(".fl-builder--content-library-panel");this.isPinned()&&(this.uncollapse(),t.addClass("fl-builder-ui-pinned-hidden"),t.hide(),e.css("margin",""),FLBuilder._resizeLayout())},collapse:function(){var e=a(this).find("i:visible"),t=a("body"),i=e.data("toggle"),e=e.data("position"),l=a(".fl-builder--content-library-panel"),o=l.outerWidth();"hide"===i?(l.css(e,"-"+o+"px"),t.css("margin-"+e,""),t.addClass("fl-builder-ui-pinned-is-collapsed")):(l.css(e,"0px"),t.css("margin-"+e,o+"px"),t.removeClass("fl-builder-ui-pinned-is-collapsed"))},uncollapse:function(){this.isCollapsed()&&a(".fl-builder-ui-pinned-collapse:visible").trigger("click")},isCollapsed:function(){return a("body").hasClass("fl-builder-ui-pinned-is-collapsed")},initPanel:function(){var e=a(".fl-builder--content-library-panel"),t=0==a(".fl-builder-content-panel-button").length?".fl-builder--tabs, .fl-lightbox-header":".fl-builder--tabs";e.draggable({cursor:"move",handle:t,cancel:".fl-builder--tabs button",scroll:!1,drag:this.drag.bind(this),stop:this.dragStop.bind(this),start:this.dragStart.bind(this)}).resizable({handles:"e, w",minHeight:this.minHeight,minWidth:this.minWidth,maxWidth:this.maxWidth,start:this.resizeStart.bind(this),stop:this.resizeStop.bind(this)}),e.addClass("fl-builder-ui-pinned-container"),e.find(".ui-resizable-e, .ui-resizable-w").hide()},pinPanel:function(e){var t=a(".fl-builder--content-library-panel"),i=t.outerWidth(),l=a("body"),o=a(".fl-responsive-preview, .fl-responsive-preview-mask"),n=a(FLBuilder._contentClass).parentsUntil("body").last();l.addClass("fl-builder-ui-is-pinned fl-builder-ui-is-pinned-"+e),l.addClass("fl-builder-content-panel-is-showing"),l.css("margin-"+e,i+"px"),o.css("margin-"+e,i+"px"),n.addClass("fl-builder-ui-pinned-content-transform"),t.addClass("fl-builder-ui-pinned fl-builder-ui-pinned-"+e),t.find(".ui-resizable-"+("left"===e?"e":"w")).show(),t.on("resize",_.throttle(this.resize.bind(this),250)),t.attr("style",""),FLBuilder.ContentPanel.isShowing=!0,0==a(".fl-builder-content-panel-button").length&&a(".fl-builder-panel-drag-handle").show()},unpinPanel:function(){var e=a(".fl-builder--content-library-panel"),t=e.find(".fl-builder--panel-content .is-showing").data("tab"),i=a("body"),l=a(".fl-responsive-preview, .fl-responsive-preview-mask"),o=a(FLBuilder._contentClass).parentsUntil("body").last();i.css("margin-left",""),i.css("margin-right",""),i.removeClass("fl-builder-ui-is-pinned"),i.removeClass("fl-builder-ui-is-pinned-left"),i.removeClass("fl-builder-ui-is-pinned-right"),l.css("margin-left",""),l.css("margin-right",""),o.removeClass("fl-lightbox-content-transform"),e.removeClass("fl-builder-ui-pinned"),e.removeClass("fl-builder-ui-pinned-left"),e.removeClass("fl-builder-ui-pinned-right"),e.find(".ui-resizable-handle").hide(),e.off("resize"),e.attr("style",""),e.find(".fl-builder--tabs [data-tab="+t+"]").addClass("is-showing")},pinLightboxes:function(){var e=this;a(".fl-lightbox-resizable").each(function(){e.pinLightbox(a(this))}),FLBuilder._reinitEditorFields()},pinLightbox:function(e){var t=a(".fl-builder--content-library-panel"),i=e.closest(".fl-lightbox-wrap");i.closest(".fl-builder-ui-pinned").length||(t.append(i),e.attr("style",""),e.draggable("disable"),e.resizable("disable")),e.is(":visible")&&t.find(".fl-builder--tabs .is-showing").removeClass("is-showing")},pinLightboxOnOpen:function(e,t){t=t._node.find(".fl-lightbox-resizable");t.length&&(t.hasClass("fl-builder-ui-pinning-initialized")||(t.draggable("option","start",this.dragStart.bind(this)),t.draggable("option","drag",this.drag.bind(this)),t.draggable("option","stop",this.dragStop.bind(this)),t.addClass("fl-builder-ui-pinning-initialized")),this.isPinned()&&this.pinLightbox(t),FLBuilder.addHook("responsive-editing-switched",this.resize))},pinnedLightboxClosed:function(){var e=a(".fl-builder--content-library-panel");tab=null,this.isPinned()&&(tab=e.find(".fl-builder--panel-content .is-showing").data("tab"),e.find(".fl-builder--tabs [data-tab="+tab+"]").addClass("is-showing")),a(".fl-lightbox").removeClass("fl-lightbox-prevent-animation")},unpinLightboxes:function(){var o=a("body"),n=a(".fl-builder--content-library-panel");n.find(".fl-lightbox-wrap").each(function(){var e,t,i=a(this),l=i.find(".fl-lightbox");l.draggable("enable"),l.resizable("enable"),l.find(".ui-resizable-handle").show(),o.append(i),l.is(":visible")?(e=parseInt(n.css("top"))-parseInt(i.css("top"))-parseInt(i.css("padding-top")),t=parseInt(n.css("left"))-parseInt(i.css("padding-left")),i=parseInt(n.css("right"))-parseInt(i.css("padding-right")),l.css("top",(e<0?0:e)+"px"),l.css(FLBuilderConfig.isRtl?"right":"left",(FLBuilderConfig.isRtl?i:t)+"px"),l.addClass("fl-lightbox-prevent-animation"),o.removeClass("fl-builder-content-panel-is-showing"),FLBuilder.ContentPanel.isShowing=!1):l.css({top:"25px",left:"25px"})}),FLBuilder._reinitEditorFields()},closeLightboxOnPanelClick:function(){FLBuilder._triggerSettingsSave(!1,!0)},windowResize:function(){this.pinOrUnpin()},resizeStart:function(){a("body").addClass("fl-builder-resizable-is-resizing"),FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()},resize:function(){var e=a("body"),t=a(".fl-responsive-preview, .fl-responsive-preview-mask"),i=a(".fl-builder--content-library-panel"),l=i.outerWidth();i.is(":visible")?i.hasClass("fl-builder-ui-pinned-left")?(e.css("margin-left",l+"px"),t.css("margin-left",l+"px")):i.hasClass("fl-builder-ui-pinned-right")&&(e.css("margin-right",l+"px"),t.css("margin-right",l+"px")):e.css("margin","")},resizeStop:function(){a("body").removeClass("fl-builder-resizable-is-resizing"),FLBuilder._bindOverlayEvents(),FLBuilder._resizeLayout(),this.savePosition()},dragStart:function(e,t){var i=a("body"),e=(a(e.target),a(".fl-builder-bar-actions"));a(".fl-lightbox-resizable:visible").length||e.addClass("fl-builder-content-panel-pin-zone"),i.addClass("fl-builder-draggable-is-dragging"),i.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-left"></div>'),i.append('<div class="fl-builder-ui-pin-zone fl-builder-ui-pin-zone-right"></div>'),FLBuilder._destroyOverlayEvents()},drag:function(e,t){var i=a("body"),l=a(".fl-responsive-preview"),o=a(window),l=(l.length?l:o).width(),o=o.scrollTop(),n=a(".fl-builder--content-library-panel").offset().top,s=a(".fl-builder-bar-actions"),r=a(e.target);r.hasClass("fl-builder--content-library-panel")&&(e.clientX<l-75&&n-o<46?s.addClass("fl-builder-content-panel-pin-zone-hover"):s.removeClass("fl-builder-content-panel-pin-zone-hover")),r.hasClass("fl-builder-ui-pinned")?this.unpinPanel():e.clientX<75?i.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-left"):e.clientX>l-75?i.addClass("fl-builder-ui-show-pin-zone fl-builder-ui-show-pin-zone-right"):(i.removeClass("fl-builder-ui-show-pin-zone"),i.removeClass("fl-builder-ui-show-pin-zone-left"),i.removeClass("fl-builder-ui-show-pin-zone-right"))},dragStop:function(e,t){a(window);var i=a("body"),l=a(".fl-builder-bar-actions"),o=a(".fl-builder-ui-pin-zone"),n=a(".fl-builder--content-library-panel"),s=a(".fl-lightbox-resizable:visible");a(e.target);i.removeClass("fl-builder-draggable-is-dragging"),l.removeClass("fl-builder-content-panel-pin-zone"),l.removeClass("fl-builder-content-panel-pin-zone-hover"),o.remove(),s.length&&parseInt(s.css("top"))<0&&s.css("top","0"),i.hasClass("fl-builder-ui-show-pin-zone")?(i.hasClass("fl-builder-ui-show-pin-zone-left")?this.pin("left",!0):this.pin("right",!0),i.removeClass("fl-builder-ui-show-pin-zone"),i.removeClass("fl-builder-ui-show-pin-zone-left"),i.removeClass("fl-builder-ui-show-pin-zone-right")):n.find(".fl-lightbox").length?(this.unpin(!0),"module"!==FLBuilderConfig.userTemplateType&&!FLBuilderConfig.simpleUi||n.hide()):(n.attr("style",""),this.savePosition()),FLBuilder._bindOverlayEvents()},disableDragAndResize:function(){var e=a(".fl-builder--content-library-panel"),t=a(".fl-lightbox-resizable");e.draggable("disable"),e.resizable("disable"),t.draggable("disable"),t.resizable("disable")},enableDragAndResize:function(){var e=a(".fl-builder--content-library-panel"),t=a(".fl-lightbox-resizable:not(.fl-lightbox-width-full)");e.draggable("enable"),e.resizable("enable"),this.isPinned()||(t.draggable("enable"),t.resizable("enable"))},savePosition:function(){var e=a(".fl-builder--content-library-panel"),t=a(".fl-lightbox-resizable:visible"),i={pinned:{width:e.outerWidth(),position:null}};e.hasClass("fl-builder-ui-pinned-left")?i.pinned.position="left":e.hasClass("fl-builder-ui-pinned-right")?i.pinned.position="right":t.length&&(i.lightbox={width:t.width(),height:t.height(),top:parseInt(t.css("top"))<0?"0px":t.css("top"),left:t.css("left")}),FLBuilderConfig.userSettings.pinned=i.pinned,i.lightbox&&(FLBuilderConfig.userSettings.lightbox=i.lightbox),FLBuilder.ajax({action:"save_pinned_ui_position",data:i})},restorePosition:function(){var e=a(".fl-builder--content-library-panel"),t=FLBuilderConfig.userSettings.pinned;t&&t.position&&(e.css("width",t.width+"px"),this.pin(t.position,!1),e.css("width",t.width+"px"))}};a(function(){e.init()})}(jQuery),function(r){var i={init:function(){this.setupMainMenuData(),r(".fl-builder--revision-actions select").on("change",this.selectChanged),r(".fl-cancel-revision-preview").on("click",this.exitPreview.bind(this)),r(".fl-apply-revision-preview").on("click",this.applyClicked.bind(this)),FLBuilder.addHook("revisionItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("didPublishLayout",this.refreshItems.bind(this))},setupMainMenuData:function(){var e,t,i=FLBuilderConfig.revisions.posts,l=FLBuilderConfig.revisions.authors,o=wp.template("fl-revision-list-item"),n=r(".fl-builder--revision-actions select"),s=0;if(FLBuilderConfig.mainMenu.revisions.items=[],n.html(""),0===i.length)FLBuilderConfig.mainMenu.revisions.items.push({eventName:"noRevisionsMessage",type:"event",label:wp.template("fl-no-revisions-message")()});else for(;s<i.length;s++)e=FLBuilderStrings.revisionDate.replace("%s",i[s].date.diff),e+=" ("+i[s].date.published+")",t=FLBuilderStrings.revisionAuthor.replace("%s",l[i[s].author].name),FLBuilderConfig.mainMenu.revisions.items.push({eventName:"revisionItemClicked",type:"event",label:o({id:i[s].id,date:e,author:t,avatar:l[i[s].author].avatar})}),n.append('<option value="'+i[s].id+'">'+e+"</option>");void 0!==FLBuilder.MainMenu&&FLBuilder.MainMenu.renderPanel("revisions")},refreshItems:function(){FLBuilder.ajax({action:"refresh_revision_items"},this.refreshItemsComplete.bind(this))},refreshItemsComplete:function(e){FLBuilderConfig.revisions=FLBuilder._jsonParse(e),this.setupMainMenuData()},itemClicked:function(e,t){t=r(t).find(".fl-revision-list-item").attr("data-revision-id");FLBuilder._triggerSettingsSave(!1,!0)&&(r(".fl-builder--revision-actions select").val(t),this.preview(t))},selectChanged:function(e){i.preview(r(this).val())},applyClicked:function(e){var t=r(".fl-builder--revision-actions select").val();i.restore(t)},preview:function(e){r(".fl-builder--revision-actions").css("display","flex"),FLBuilder.triggerHook("didEnterRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder.ajax({action:"render_revision_preview",revision_id:e},this.previewRenderComplete.bind(this))},previewRenderComplete:function(e){FLBuilder._renderLayout(e,function(){FLBuilder._destroyOverlayEvents(),FLBuilder._removeAllOverlays()})},exitPreview:function(){r(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder._bindOverlayEvents(),FLBuilder._updateLayout()},restore:function(e){r(".fl-builder--revision-actions").hide(),FLBuilder.triggerHook("didExitRevisionPreview"),FLBuilder.showAjaxLoader(),FLBuilder._bindOverlayEvents(),FLBuilder.ajax({action:"restore_revision",revision_id:e},i.restoreComplete)},restoreComplete:function(e){e=FLBuilder._jsonParse(e);FLBuilder._renderLayout(e.layout),FLBuilder.triggerHook("didRestoreRevisionComplete",e.config),settings=e.settings,void 0!==settings.css&&null!==settings.css&&(FLBuilderSettingsConfig.settings.layout.css=settings.css),void 0!==settings.js&&null!==settings.js&&(FLBuilderSettingsConfig.settings.layout.js=settings.js)}};r(function(){i.init()})}(jQuery),function(){var t={query:function(e){var t,i={},l={library:{}};if(e=this.normalizeQuery(e),_.isNull(e.kind))i=FLBuilderConfig.contentItems;else for(var o in e.kind)i[o=e.kind[o]]=FLBuilderConfig.contentItems[o];return t=this.findMatches(e,i),l.library=this.formatResults(t,e),l},normalizeQuery:function(e){return e=_.extend({kind:null,type:null,category:null,group:null,enabled:!0,global:null,searchTerm:null,categorized:!1},e),_.isString(e.kind)&&(e.kind=[e.kind]),e},findMatches:function(e,t){var i,l,o,u,n={},s=null,r=null;for(s in t)for(r in i=t[s],n[s]={items:[]},i)if(l=i[r],_.isUndefined(e.category)||_.isNull(e.category)||this.matchesCategory(l.category,e.category)){switch(s){case"template":if(!(_.isUndefined(e.content)||_.isNull(e.content)||(o=_.includes(e.content,l.content),u=e.content===l.content,o||u)))continue;if(!_.isUndefined(e.type)&&!_.isNull(e.type)&&e.type!==l.type)continue;if(!_.isNull(e.group)){var a=e.group,d=l.group;if(_.isString(a)&&(a=[a]),_.isString(d)&&(d=[d]),_.isEmpty(a)||_.isEmpty(d))continue;var c=!1;for(r in a){var h=a[r];_.includes(d,h)&&(c=!0)}if(!c)continue}break;case"module":if(!_.isNull(e.group)){if(!1===e.group&&0<l.group.length)continue;if(!1!==e.group&&!_.includes(l.group,e.group))continue}}(_.isUndefined(e.searchTerm)||_.isNull(e.searchTerm)||this.matchesSearchTerm(l,e.searchTerm))&&n[s].items.push(l)}return n},matchesCategory:function(e,t){var i,l,o,n;if(e===t)return!0;for(l in t=_.isString(t)?[t]:t){if(i=t[l],_.isString(e)&&e===i)return!0;if(_.isArray(e))for(o in e)if(e[o]===i)return!0;if(_.isObject(e))for(n in e)if(e[n]===i||n===i)return!0}return!1},matchesSearchTerm:function(e,t){var i=t.toLowerCase();return!(_.isUndefined(e.slug)||!e.slug.toLowerCase().includes(i))||(!(_.isUndefined(e.name)||!e.name.toLowerCase().includes(i))||(!(!_.isString(e.category)||!e.category.toLowerCase().includes(i))||(!(_.isUndefined(e.description)||!e.description.toLowerCase().includes(i))||(!(_.isUndefined(e.id_base)||!e.id_base.includes(t))||(!(!e.isWidget||!"widget".includes(i))||!(_.isUndefined(e.editor_export)||!"module".includes(i)))))))},formatResults:function(e,t){if(t.categorized)for(type in e){var i=e[type].items;e[type].categorized=this.groupBy(i,"category")}return e},groupBy:function(e,i){var o,n,s={};return _.forEach(e,function(l,e,t){o=l[i],_.isNull(o)||_.isUndefined(o)||_.isString(o)&&""===l[o]||(_.isString(o)&&(s[o]=s[o]||[],s[o].push(l)),_.isArray(o)&&(n=o,_.forEach(n,function(e,t,i){s[e]=s[e]||[],s[e].push(l)})),_.isObject(o)&&(n=o,_.forEach(n,function(e,t,i){s[e]=s[e]||[],s[e].push(l)})))}),s},search:function(e){var t=this.query({searchTerm:e}),i={total:0,term:e,sections:{}};if(!_.isUndefined(t.library.module.items)){var l,o={};for(l in t.library.module.items){var n=t.library.module.items[l],s=n.group[0],r=n.category;n.name;_.isUndefined(o[s])&&(o[s]={}),_.isUndefined(o[s][r])&&(o[s][r]=[]),o[s][r].push(n)}i.grouped=o}for(l in t.library){var a=t.library[l];!_.isUndefined(a.items)&&0<a.items.length&&(i.sections[l]={name:FLBuilderStrings.typeLabels[l],handle:l,type:"",items:a.items},i.total+=a.items.length)}return i}};FLBuilder.Search={byQuery:function(e){return t.query(e)},byTerm:function(e){return t.search(e)}}}(jQuery),function(i,l){var o={layoutNeedsPublish:!1,defaultIndicatorMessage:"",defaultTooltipMessage:"",messages:null,init:function(){this.messages=FLBuilderStrings.savedStatus,this.$savingIndicator=i(".fl-builder--saving-indicator"),l.addHook("didBeginAJAX",this.onLayoutSaving.bind(this)),l.addHook("didCompleteAJAX",this.onLayoutSaved.bind(this)),l.addHook("didPublishLayout",this.onLayoutPublished.bind(this)),l.addHook("publishAndRemain",this.onPublishAndRemain.bind(this)),l.addHook("didShowLightbox",this.setLayoutNeedsPublish.bind(this)),!FLBuilderConfig.layoutHasDraftedChanges&&FLBuilderConfig.builderEnabled||(this.setLayoutNeedsPublish(),this.resetStatusMessage())},setLayoutNeedsPublish:function(){this.layoutNeedsPublish||(this.layoutNeedsPublish=!0,i("body").addClass("fl-builder--layout-has-drafted-changes"))},onLayoutSaving:function(e,t){this.isPublishingLayout(t.action)?this.showStatusMessage(this.messages.publishing,this.messages.publishingTooltip):this.isUpdatingLayout(t.action)&&(this.setLayoutNeedsPublish(),this.showStatusMessage(this.messages.saving,this.messages.savingTooltip))},isPublishingLayout:function(e){return"save_layout"==e},isUpdatingLayout:function(e){return!this.isPublishingLayout()&&(e.startsWith("render")?!!e.startsWith("render_new"):!e.startsWith("duplicate")&&(!e.startsWith("refresh")&&("save_ui_skin"!=e&&("save_lightbox_position"!=e&&("save_pinned_ui_position"!=e&&("fl_builder_notifications"!=e&&!(-1<e.indexOf("history"))))))))},onLayoutSaved:function(e,t){var i;this.isUpdatingLayout(t.fl_builder_data.action)&&(this.showStatusMessage(this.messages.saved,this.messages.savedTooltip),i=this,setTimeout(function(){i.resetStatusMessage()},2e3))},onLayoutPublished:function(){this.layoutNeedsPublish=!1,i("body").removeClass("fl-builder--layout-has-drafted-changes"),this.resetStatusMessage()},showStatusMessage:function(e,t){this.$savingIndicator.html(e),l.isUndefined(t)||(this.$savingIndicator.attr("title",t),i(".fl-builder--saving-indicator").tipTip({defaultPosition:"bottom",edgeOffset:14}))},resetStatusMessage:function(){this.layoutNeedsPublish?(this.defaultIndicatorMessage=this.messages.edited+'<i class="fas fa-question-circle"></i>',this.defaultTooltipMessage=this.messages.editedTooltip):(this.defaultIndicatorMessage="",this.defaultTooltipMessage=""),this.showStatusMessage(this.defaultIndicatorMessage,this.defaultTooltipMessage)},onPublishAndRemain:function(){var e;l.MainMenu.hide(),this.layoutNeedsPublish||FLBuilderSettingsForms.settingsHaveChanged()?l._publishLayout(!1,!0):(this.showStatusMessage(this.messages.noChanges),e=this,setTimeout(function(){e.resetStatusMessage()},2e3))}};l.SaveManager={layoutNeedsPublish:function(){return o.layoutNeedsPublish},showStatusMessage:function(e,t){o.showStatusMessage(e,t)},resetStatusMessage:function(){o.resetStatusMessage()}},i(function(){o.init()})}(jQuery,FLBuilder),function(o){FLBuilderHistoryManager={states:[],position:0,rendering:!1,init:function(){var e=FLBuilderConfig.history,l=this;this.states=e.states,this.position=parseInt(e.position),this.setupMainMenuData(),o.each(e.hooks,function(e,i){FLBuilder.addHook(e,function(e,t){l.saveCurrentState(i,t)})}),FLBuilder.addHook("didPublishLayout",this.clearStatesOnPublish.bind(this)),FLBuilder.addHook("restartEditingSession",this.saveCurrentStateOnRestartSession.bind(this)),FLBuilder.addHook("historyItemClicked",this.itemClicked.bind(this)),FLBuilder.addHook("undo",this.onUndo.bind(this)),FLBuilder.addHook("redo",this.onRedo.bind(this))},saveCurrentState:function(e,t){var i=null;void 0!==(t=void 0===t?{}:t).moduleType&&t.moduleType&&(i=t.moduleType);const l=FL.Builder.data.getLayoutActions();l.saveHistoryState(e,i)},saveCurrentStateOnRestartSession:function(e){this.states.length||this.saveCurrentState("draft_created")},clearStatesOnPublish:function(e,t){this.states=[],this.position=0,this.setupMainMenuData();const i=FL.Builder.data.getLayoutActions();i.clearHistoryStates(FLBuilderConfig.postId,t.shouldExit)},renderState:function(e){var t=this;if(!this.rendering&&this.states.length&&!o(".fl-builder-settings:visible").length){var i=setTimeout(FLBuilder.showAjaxLoader,2e3);this.rendering=!0;const l=FL.Builder.data.getLayoutActions();l.renderHistoryState(e,function(e){e=JSON.parse(e);e.error||(t.position=parseInt(e.position),FLBuilder.triggerHook("didRestoreHistoryComplete",e),FLBuilder._renderLayout(e.layout),t.setupMainMenuData()),clearTimeout(i),t.rendering=!1})}},onUndo:function(){const e=FL.Builder.data.getLayoutActions();e.undo()},onRedo:function(){const e=FL.Builder.data.getLayoutActions();e.redo()},setupMainMenuData:function(){var e=FLBuilderConfig.history.labels,t="";FLBuilderConfig.mainMenu.history.items=[];for(var i=this.states.length-1;0<=i;i--)"string"==typeof this.states[i]?t=e[this.states[i]]||this.states[i]:(t=e[this.states[i].label]||this.states[i].label,(this.states[i].moduleType||-1<this.states[i].label.indexOf("module"))&&(t=t.replace("%s",this.getModuleName(this.states[i].moduleType)))),FLBuilderConfig.mainMenu.history.items.push({eventName:"historyItemClicked",type:"event",label:wp.template("fl-history-list-item")({label:t,current:i===this.position?1:0,position:i})});FLBuilderConfig.history.enabled||FLBuilderConfig.mainMenu.history.items.push({eventName:"histo
|