Page Builder by SiteOrigin - Version 2.14.0

Version Description

  • 29 September 2021 =
  • Tablet Styles: Added a new Tablet Styles section to row, cell, and widget styles.
  • Widget Design Settings: Added a Link Hover Color setting.
  • History Browser: Resolved incorrect preview URL.
  • Live Editor: When accessing the Live Editor via the toolbar link, return to the site after saving. Setting available at Settings > Page Builder > General.
  • Polylang: Ensured Page Builder data is copied during page duplication in the Classic Editor.
  • Yoast SEO: Added additional Open Graph compatibility check.
  • Developer: Advanced Custom Fields: Improved repeater support.
  • Developer: Changed CSS Builder $css to public to allow more extensive filtering.
  • Developer: Added setup_style_fields JavaScript event to allow the setup of custom style fields.
  • Developer: Added an optional CSS method for full width containers using siteorigin_panels_theme_container_width and siteorigin_panels_theme_container_selector.
Download this release

Release Info

Developer SiteOrigin
Plugin Icon 128x128 Page Builder by SiteOrigin
Version 2.14.0
Comparing to
See all releases

Code changes from version 2.13.2 to 2.14.0

compat/acf-widgets.php CHANGED
@@ -50,7 +50,7 @@ class SiteOrigin_Panels_Compat_ACF_Widgets {
50
  foreach( $field_groups as $field_group ) {
51
  $fields[] = acf_get_fields( $field_group );
52
  }
53
- $fields = call_user_func_array('array_merge', $fields );
54
 
55
  acf_register_store( 'so_fields', $fields );
56
  acf_register_store( 'so_widget_instance', $instance['acf'] );
@@ -73,26 +73,57 @@ class SiteOrigin_Panels_Compat_ACF_Widgets {
73
 
74
  if ( ! empty( $fields ) ) {
75
  foreach ( $fields->data as $field ) {
76
- if ( $field['key'] == $widget_field['key'] && ! empty( $instance->data[ $field['key'] ] ) ) {
 
 
 
 
 
 
 
77
  return $instance->data[ $field['key'] ];
78
  }
79
  }
80
  }
81
  }
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  /**
84
  * Restores initial ACF form data to prevent saving issue in non SOWB widgets.
 
85
  *
86
  * @param $instance The updated widget settings.
87
  * @param $new_instance An array of new settings.
88
  * @param $old_instance An array of old settings.
89
- * @param $this The current widget instance.
90
  *
91
  */
92
  public function acf_override_instance( $instance, $widget, $old_widget, $the_widget ) {
93
  // Ensure widget update is from Page Builder and there's ACF data present.
94
- if ( ! empty( $widget['panels_info'] ) && ! empty( $instance['acf'] ) ) {
95
- $instance['acf'] = $widget['acf'];
96
  }
97
 
98
  return $instance;
50
  foreach( $field_groups as $field_group ) {
51
  $fields[] = acf_get_fields( $field_group );
52
  }
53
+ $fields = call_user_func_array( 'array_merge', $fields );
54
 
55
  acf_register_store( 'so_fields', $fields );
56
  acf_register_store( 'so_widget_instance', $instance['acf'] );
73
 
74
  if ( ! empty( $fields ) ) {
75
  foreach ( $fields->data as $field ) {
76
+ if ( $widget_field['type'] != 'repeater' ) {
77
+ if (
78
+ $field['key'] == $widget_field['key'] &&
79
+ ! empty( $instance->data[ $field['key'] ] )
80
+ ) {
81
+ return $instance->data[ $field['key'] ];
82
+ }
83
+ } elseif ( $field['key'] == $widget_field['key'] ) {
84
  return $instance->data[ $field['key'] ];
85
  }
86
  }
87
  }
88
  }
89
 
90
+ /**
91
+ * Generates and filters out invalid fields and indexes from the ACF Widget fields array.
92
+ *
93
+ * @param $fields A possible array containing fields, or a string containing a field value.
94
+ *
95
+ */
96
+ private function generate_fields_array( $fields ) {
97
+ if ( is_array( $fields ) ) {
98
+ foreach ( $fields as $field_id => $field ) {
99
+ // If it's a cloneindex, or empty, don't keep it.
100
+ if ( $field_id == 'acfcloneindex' || empty( $field ) ) {
101
+ unset( $fields[ $field_id ] );
102
+ continue;
103
+ }
104
+ $fields[ $field_id ] = $this->generate_fields_array( $field );
105
+ }
106
+ }
107
+
108
+ if ( $fields != '' ) {
109
+ return $fields;
110
+ }
111
+ }
112
+
113
  /**
114
  * Restores initial ACF form data to prevent saving issue in non SOWB widgets.
115
+ * Supports arrays to account for field types like the repeater.
116
  *
117
  * @param $instance The updated widget settings.
118
  * @param $new_instance An array of new settings.
119
  * @param $old_instance An array of old settings.
120
+ * @param $the_widget The current widget instance.
121
  *
122
  */
123
  public function acf_override_instance( $instance, $widget, $old_widget, $the_widget ) {
124
  // Ensure widget update is from Page Builder and there's ACF data present.
125
+ if ( ! empty( $widget['panels_info'] ) && ! empty( $widget['acf'] ) ) {
126
+ $instance['acf'] = $this->generate_fields_array( $widget['acf'] );
127
  }
128
 
129
  return $instance;
compat/polylang.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * When Polylang duplicates a post, copy over panels_data if it exists.
4
+ *
5
+ */
6
+ function siteorigin_polylang_include_panels_data( $keys, $sync ) {
7
+ if ( ! $sync ) {
8
+ $keys[] = 'panels_data';
9
+ }
10
+ return $keys;
11
+ }
12
+ add_filter( 'pll_copy_post_metas', 'siteorigin_polylang_include_panels_data', 10, 2 );
compat/yoast.php CHANGED
@@ -14,8 +14,13 @@ function siteorigin_yoast_opengraph_panels_disable( $content ) {
14
  }
15
  return $content;
16
  }
 
17
  // If Yoast OpenGraph is enabled, disable Page Builder as needed.
18
- if ( class_exists( 'WPSEO_Options' ) && WPSEO_Options::get( 'opengraph' ) ) {
 
 
 
 
19
  add_filter( 'the_content', 'siteorigin_yoast_opengraph_panels_disable', 1 );
20
  }
21
 
14
  }
15
  return $content;
16
  }
17
+
18
  // If Yoast OpenGraph is enabled, disable Page Builder as needed.
19
+ if (
20
+ class_exists( 'WPSEO_Options' ) &&
21
+ method_exists( 'WPSEO_Options', 'get' ) &&
22
+ WPSEO_Options::get( 'opengraph' )
23
+ ) {
24
  add_filter( 'the_content', 'siteorigin_yoast_opengraph_panels_disable', 1 );
25
  }
26
 
inc/admin.php CHANGED
@@ -286,9 +286,24 @@ class SiteOrigin_Panels_Admin {
286
  delete_post_meta( $post_id, 'panels_data' );
287
  }
288
 
 
 
 
 
 
 
 
 
289
  $this->in_save_post = false;
290
  }
291
 
 
 
 
 
 
 
 
292
  /**
293
  * Enqueue the panels admin scripts
294
  *
286
  delete_post_meta( $post_id, 'panels_data' );
287
  }
288
 
289
+ // If this is a Live Editor Quick Edit, setup redirection.
290
+ if (
291
+ siteorigin_panels_setting( 'live-editor-quick-link-close-after' ) &&
292
+ strpos( $_POST['_wp_http_referer'], 'so_live_editor' ) !== false
293
+ ) {
294
+ add_filter( 'redirect_post_location', array( $this, 'live_editor_redirect_after' ), 10, 2 );
295
+ }
296
+
297
  $this->in_save_post = false;
298
  }
299
 
300
+ /*
301
+ * Handles Live Editor Quick Link redirection after editing.
302
+ */
303
+ public function live_editor_redirect_after( $location, $post_id ) {
304
+ return get_permalink( $post_id );
305
+ }
306
+
307
  /**
308
  * Enqueue the panels admin scripts
309
  *
inc/css-builder.php CHANGED
@@ -8,7 +8,7 @@
8
  */
9
  class SiteOrigin_Panels_Css_Builder {
10
 
11
- private $css;
12
 
13
  function __construct() {
14
  $this->css = array();
8
  */
9
  class SiteOrigin_Panels_Css_Builder {
10
 
11
+ public $css;
12
 
13
  function __construct() {
14
  $this->css = array();
inc/renderer.php CHANGED
@@ -3,6 +3,7 @@
3
  class SiteOrigin_Panels_Renderer {
4
 
5
  private $inline_css;
 
6
 
7
  function __construct() {
8
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 1 );
@@ -77,6 +78,10 @@ class SiteOrigin_Panels_Renderer {
77
  $layout_data = apply_filters( 'siteorigin_panels_layout_data', $layout_data, $post_id );
78
  }
79
 
 
 
 
 
80
  // Get some of the default settings
81
  $settings = siteorigin_panels_setting();
82
  $panels_tablet_width = $settings['tablet-width'];
@@ -102,6 +107,10 @@ class SiteOrigin_Panels_Renderer {
102
 
103
  $cell_count = count( $row['cells'] );
104
 
 
 
 
 
105
  // Add the cell sizing
106
  foreach ( $row['cells'] as $ci => $cell ) {
107
  $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
@@ -117,7 +126,7 @@ class SiteOrigin_Panels_Renderer {
117
  str_replace( ',', '.', $rounded_width ),
118
  str_replace( ',', '.', (int) $gutter ? $calc_width : '' ), // Exclude if there's a zero gutter
119
  )
120
- ) );
121
 
122
  // Add in any widget specific CSS
123
  foreach ( $cell['widgets'] as $wi => $widget ) {
@@ -218,7 +227,9 @@ class SiteOrigin_Panels_Renderer {
218
  // Uses rows custom collapse point or sets mobile collapse point set on settings page.
219
  $css->add_row_css( $post_id, $ri, array(
220
  '.panel-no-style',
221
- '.panel-has-style > .panel-row-style'
 
 
222
  ), array(
223
  '-webkit-flex-direction' => $collapse_order == 'left-top' ? 'column' : 'column-reverse',
224
  '-ms-flex-direction' => $collapse_order == 'left-top' ? 'column' : 'column-reverse',
@@ -247,9 +258,18 @@ class SiteOrigin_Panels_Renderer {
247
  ), $collapse_point );
248
  }
249
  }
 
 
 
 
 
 
 
 
 
 
250
 
251
  if( $panels_mobile_margin_bottom != $panels_margin_bottom && ! empty( $panels_mobile_margin_bottom ) ) {
252
- // If we need a different bottom margin for
253
  $css->add_row_css( $post_id, $ri, '', array(
254
  'margin-bottom' => $panels_mobile_margin_bottom
255
  ), $collapse_point );
@@ -284,6 +304,52 @@ class SiteOrigin_Panels_Renderer {
284
  ), $panels_mobile_width );
285
  }
286
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
  // Let other plugins and components filter the CSS object.
288
  $css = apply_filters( 'siteorigin_panels_css_object', $css, $panels_data, $post_id, $layout_data );
289
 
@@ -342,6 +408,10 @@ class SiteOrigin_Panels_Renderer {
342
  if ( empty( $panels_data ) || empty( $panels_data['grids'] ) ) {
343
  return '';
344
  }
 
 
 
 
345
 
346
  if ( $is_preview ) {
347
  $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] = true;
@@ -430,6 +500,10 @@ class SiteOrigin_Panels_Renderer {
430
  $standard_css = apply_filters( 'siteorigin_panels_' . $name . '_style_css', $standard_css, $style );
431
  $standard_css = apply_filters( 'siteorigin_panels_general_style_css', $standard_css, $style );
432
 
 
 
 
 
433
  $mobile_css = array();
434
  $mobile_css = apply_filters( 'siteorigin_panels_' . $name . '_style_mobile_css', $mobile_css, $style );
435
  $mobile_css = apply_filters( 'siteorigin_panels_general_style_mobile_css', $mobile_css, $style );
@@ -788,6 +862,16 @@ class SiteOrigin_Panels_Renderer {
788
  echo $row_style_wrapper;
789
  }
790
 
 
 
 
 
 
 
 
 
 
 
791
  // This allows other themes and plugins to add HTML inside of the row before the row contents.
792
  echo apply_filters( 'siteorigin_panels_inside_row_before', '', $row );
793
 
@@ -803,6 +887,14 @@ class SiteOrigin_Panels_Renderer {
803
  // This allows other themes and plugins to add HTML inside of the row after the row contents.
804
  echo apply_filters( 'siteorigin_panels_inside_row_after', '', $row );
805
 
 
 
 
 
 
 
 
 
806
  // Close the style wrapper
807
  if ( ! empty( $row_style_wrapper ) ) {
808
  echo '</div>';
3
  class SiteOrigin_Panels_Renderer {
4
 
5
  private $inline_css;
6
+ private $container;
7
 
8
  function __construct() {
9
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ), 1 );
78
  $layout_data = apply_filters( 'siteorigin_panels_layout_data', $layout_data, $post_id );
79
  }
80
 
81
+ if ( empty( $this->container ) ) {
82
+ $this->container = SiteOrigin_Panels::container_settings();
83
+ }
84
+
85
  // Get some of the default settings
86
  $settings = siteorigin_panels_setting();
87
  $panels_tablet_width = $settings['tablet-width'];
107
 
108
  $cell_count = count( $row['cells'] );
109
 
110
+ // If the CSS Container Breaker is enabled, and this row is using it,
111
+ // we need to remove the cell widths on mobile.
112
+ $css_container_cutoff = $this->container['css_override'] && isset( $row['style']['row_stretch'] ) && $row['style']['row_stretch'] == 'full' ? ":$panels_mobile_width" : 1920;
113
+
114
  // Add the cell sizing
115
  foreach ( $row['cells'] as $ci => $cell ) {
116
  $weight = apply_filters( 'siteorigin_panels_css_cell_weight', $cell['weight'], $row, $ri, $cell, $ci - 1, $panels_data, $post_id );
126
  str_replace( ',', '.', $rounded_width ),
127
  str_replace( ',', '.', (int) $gutter ? $calc_width : '' ), // Exclude if there's a zero gutter
128
  )
129
+ ), $css_container_cutoff );
130
 
131
  // Add in any widget specific CSS
132
  foreach ( $cell['widgets'] as $wi => $widget ) {
227
  // Uses rows custom collapse point or sets mobile collapse point set on settings page.
228
  $css->add_row_css( $post_id, $ri, array(
229
  '.panel-no-style',
230
+ '.panel-has-style > .panel-row-style',
231
+ // When CSS override is enabled, a full width row has a special wrapper so need to account for that.
232
+ $this->container['css_override'] && isset( $row['style']['row_stretch'] ) && $row['style']['row_stretch'] == 'full' ? ' .so-panels-full-wrapper' : '',
233
  ), array(
234
  '-webkit-flex-direction' => $collapse_order == 'left-top' ? 'column' : 'column-reverse',
235
  '-ms-flex-direction' => $collapse_order == 'left-top' ? 'column' : 'column-reverse',
258
  ), $collapse_point );
259
  }
260
  }
261
+
262
+ if (
263
+ $settings['tablet-layout'] &&
264
+ $panels_tablet_width > $collapse_point &&
265
+ ! empty( $row['style']['tablet_bottom_margin'] )
266
+ ) {
267
+ $css->add_row_css( $post_id, $ri, '', array(
268
+ 'margin-bottom' => $row['style']['tablet_bottom_margin']
269
+ ), "$panels_tablet_width:$collapse_point" );
270
+ }
271
 
272
  if( $panels_mobile_margin_bottom != $panels_margin_bottom && ! empty( $panels_mobile_margin_bottom ) ) {
 
273
  $css->add_row_css( $post_id, $ri, '', array(
274
  'margin-bottom' => $panels_mobile_margin_bottom
275
  ), $collapse_point );
304
  ), $panels_mobile_width );
305
  }
306
 
307
+ if ( $this->container['css_override'] ) {
308
+ $css->add_css(
309
+ esc_html( $this->container['selector'] ),
310
+ array(
311
+ 'max-width' => 'none',
312
+ // Clear horizontal spacing from container to prevent any indents.
313
+ 'padding-right' => '0',
314
+ 'padding-left' => '0',
315
+ 'margin-right' => '0',
316
+ 'margin-left' => '0',
317
+ ),
318
+ 1920
319
+ );
320
+
321
+ $css->add_css(
322
+ '.so-panels-full-wrapper, .panel-grid.panel-no-style, .panel-row-style:not([data-stretch-type])',
323
+ array(
324
+ 'max-width' => esc_attr( $this->container['width'] ),
325
+ 'margin' => '0 auto',
326
+ ),
327
+ 1920
328
+ );
329
+
330
+ // Allow .so-panels-full-wrapper to handle columns correctly.
331
+ $css->add_css(
332
+ '.so-panels-full-wrapper',
333
+ array(
334
+ 'display' => 'flex',
335
+ 'flex-wrap' => 'nowrap',
336
+ 'justify-content' => 'space-between',
337
+ 'align-items' => 'flex-start',
338
+ 'width' => '100%',
339
+ ),
340
+ 1920
341
+ );
342
+
343
+ // Ensure cells inside of .so-panels-full-wrapper are full width when collapsed.
344
+ $css->add_css(
345
+ '.so-panels-full-wrapper .panel-grid-cell',
346
+ array(
347
+ 'width' => '100%',
348
+ ),
349
+ siteorigin_panels_setting( 'mobile-width' )
350
+ );
351
+ }
352
+
353
  // Let other plugins and components filter the CSS object.
354
  $css = apply_filters( 'siteorigin_panels_css_object', $css, $panels_data, $post_id, $layout_data );
355
 
408
  if ( empty( $panels_data ) || empty( $panels_data['grids'] ) ) {
409
  return '';
410
  }
411
+
412
+ if ( empty( $this->container ) ) {
413
+ $this->container = SiteOrigin_Panels::container_settings();
414
+ }
415
 
416
  if ( $is_preview ) {
417
  $GLOBALS[ 'SITEORIGIN_PANELS_PREVIEW_RENDER' ] = true;
500
  $standard_css = apply_filters( 'siteorigin_panels_' . $name . '_style_css', $standard_css, $style );
501
  $standard_css = apply_filters( 'siteorigin_panels_general_style_css', $standard_css, $style );
502
 
503
+ $tablet_css = array();
504
+ $tablet_css = siteorigin_panels_setting( 'tablet-layout' ) ? apply_filters( 'siteorigin_panels_' . $name . '_style_tablet_css', $tablet_css, $style ) : '';
505
+ $tablet_css = apply_filters( 'siteorigin_panels_general_style_tablet_css', $tablet_css, $style );
506
+
507
  $mobile_css = array();
508
  $mobile_css = apply_filters( 'siteorigin_panels_' . $name . '_style_mobile_css', $mobile_css, $style );
509
  $mobile_css = apply_filters( 'siteorigin_panels_general_style_mobile_css', $mobile_css, $style );
862
  echo $row_style_wrapper;
863
  }
864
 
865
+ if (
866
+ $this->container['css_override'] &&
867
+ isset( $row['style']['row_stretch'] ) &&
868
+ $row['style']['row_stretch'] == 'full'
869
+ ) {
870
+ $this->render_element( 'div', array(
871
+ 'class' => 'so-panels-full-wrapper',
872
+ ) );
873
+ }
874
+
875
  // This allows other themes and plugins to add HTML inside of the row before the row contents.
876
  echo apply_filters( 'siteorigin_panels_inside_row_before', '', $row );
877
 
887
  // This allows other themes and plugins to add HTML inside of the row after the row contents.
888
  echo apply_filters( 'siteorigin_panels_inside_row_after', '', $row );
889
 
890
+ if (
891
+ $this->container['css_override'] &&
892
+ isset( $row['style']['row_stretch'] ) &&
893
+ $row['style']['row_stretch'] == 'full'
894
+ ) {
895
+ echo '</div>';
896
+ }
897
+
898
  // Close the style wrapper
899
  if ( ! empty( $row_style_wrapper ) ) {
900
  echo '</div>';
inc/settings.php CHANGED
@@ -116,37 +116,48 @@ class SiteOrigin_Panels_Settings {
116
  $defaults['load-on-attach'] = false;
117
  $defaults['use-classic'] = true;
118
 
119
- // The Parallax Type default depends on whether a different setting settings is set.
120
- // This is done here rather than using `siteorigin_panels_version_changed` as
121
- // that hook is triggered after the settings are loaded.
 
 
 
 
122
  $so_settings = get_option( 'siteorigin_panels_settings' );
123
 
124
  if ( empty( $so_settings ) ) {
125
  // New install.
126
  $parallax_type = 'modern';
127
- } elseif ( isset( $so_settings['parallax-type'] ) ) {
128
- // If parallax-type already exists, use the existing value to prevent a potential override.
129
- $parallax_type = $so_settings['parallax-type'];
130
- } elseif ( isset( $so_settings['parallax-delay'] ) ) {
131
- // User is upgrading.
132
- $parallax_type = 'legacy';
133
  } else {
134
- // If all else fails, fallback to modern.
135
- $parallax_type = 'modern';
 
 
 
 
 
 
 
 
 
 
136
  }
137
 
 
138
  // The general fields
139
- $defaults['post-types'] = array( 'page', 'post' );
140
- $defaults['live-editor-quick-link'] = true;
141
- $defaults['admin-post-state'] = true;
142
- $defaults['admin-widget-count'] = false;
143
- $defaults['parallax-type'] = $parallax_type;
144
- $defaults['parallax-mobile'] = false;
145
- $defaults['parallax-motion'] = ''; // legacy parallax
146
- $defaults['parallax-delay'] = 0.4;
147
- $defaults['parallax-scale'] = 1.2;
148
- $defaults['sidebars-emulator'] = true;
149
- $defaults['layout-block-default-mode'] = 'preview';
 
150
 
151
  // Widgets fields
152
  $defaults['title-html'] = '<h3 class="widget-title">{{title}}</h3>';
@@ -283,8 +294,13 @@ class SiteOrigin_Panels_Settings {
283
 
284
  $fields['general']['fields']['live-editor-quick-link'] = array(
285
  'type' => 'checkbox',
286
- 'label' => __( 'Live Editor Quick Link', 'siteorigin-panels' ),
287
- 'description' => __( 'Display a Live Editor button in the WordPress admin bar.', 'siteorigin-panels' ),
 
 
 
 
 
288
  );
289
 
290
  $fields['general']['fields']['admin-post-state'] = array(
116
  $defaults['load-on-attach'] = false;
117
  $defaults['use-classic'] = true;
118
 
119
+ /**
120
+ * Certain settings have different defaults depending on if this is a new
121
+ * install, or not.
122
+ *
123
+ * This is done here rather than using `siteorigin_panels_version_changed` as
124
+ * that hook is triggered after the settings are loaded.
125
+ */
126
  $so_settings = get_option( 'siteorigin_panels_settings' );
127
 
128
  if ( empty( $so_settings ) ) {
129
  // New install.
130
  $parallax_type = 'modern';
131
+ $live_editor_close_after = true;
 
 
 
 
 
132
  } else {
133
+ $live_editor_close_after = false;
134
+ // Parallax Type.
135
+ if ( isset( $so_settings['parallax-type'] ) ) {
136
+ // If parallax-type already exists, use the existing value to prevent a potential override.
137
+ $parallax_type = $so_settings['parallax-type'];
138
+ } elseif ( isset( $so_settings['parallax-delay'] ) ) {
139
+ // User is upgrading.
140
+ $parallax_type = 'legacy';
141
+ } else {
142
+ // If all else fails, fallback to modern.
143
+ $parallax_type = 'modern';
144
+ }
145
  }
146
 
147
+
148
  // The general fields
149
+ $defaults['post-types'] = array( 'page', 'post' );
150
+ $defaults['live-editor-quick-link'] = true;
151
+ $defaults['live-editor-quick-link-close-after'] = $live_editor_close_after;
152
+ $defaults['admin-post-state'] = true;
153
+ $defaults['admin-widget-count'] = false;
154
+ $defaults['parallax-type'] = $parallax_type;
155
+ $defaults['parallax-mobile'] = false;
156
+ $defaults['parallax-motion'] = ''; // legacy parallax
157
+ $defaults['parallax-delay'] = 0.4;
158
+ $defaults['parallax-scale'] = 1.2;
159
+ $defaults['sidebars-emulator'] = true;
160
+ $defaults['layout-block-default-mode'] = 'preview';
161
 
162
  // Widgets fields
163
  $defaults['title-html'] = '<h3 class="widget-title">{{title}}</h3>';
294
 
295
  $fields['general']['fields']['live-editor-quick-link'] = array(
296
  'type' => 'checkbox',
297
+ 'label' => __( 'Live Editor Toolbar Link', 'siteorigin-panels' ),
298
+ 'description' => __( 'Display a Live Editor link in the toolbar when viewing site.', 'siteorigin-panels' ),
299
+ );
300
+ $fields['general']['fields']['live-editor-quick-link-close-after'] = array(
301
+ 'type' => 'checkbox',
302
+ 'label' => __( 'Live Editor Toolbar Link: Close After Editing', 'siteorigin-panels' ),
303
+ 'description' => __( 'When accessing the Live Editor via the toolbar link, return to the site after saving.', 'siteorigin-panels' ),
304
  );
305
 
306
  $fields['general']['fields']['admin-post-state'] = array(
inc/styles-admin.php CHANGED
@@ -103,9 +103,13 @@ class SiteOrigin_Panels_Styles_Admin {
103
  'name' => __( 'Layout', 'siteorigin-panels' ),
104
  'priority' => 10
105
  ),
 
 
 
 
106
  'mobile_layout' => array(
107
  'name' => __( 'Mobile Layout', 'siteorigin-panels' ),
108
- 'priority' => 11
109
  ),
110
  'design' => array(
111
  'name' => __( 'Design', 'siteorigin-panels' ),
@@ -113,6 +117,10 @@ class SiteOrigin_Panels_Styles_Admin {
113
  ),
114
  );
115
 
 
 
 
 
116
  // Check if we need a default group
117
  foreach ( $fields as $field_id => $field ) {
118
  if ( empty( $field['group'] ) || $field['group'] == 'theme' ) {
103
  'name' => __( 'Layout', 'siteorigin-panels' ),
104
  'priority' => 10
105
  ),
106
+ 'tablet_layout' => array(
107
+ 'name' => __( 'Tablet Layout', 'siteorigin-panels' ),
108
+ 'priority' => 11
109
+ ),
110
  'mobile_layout' => array(
111
  'name' => __( 'Mobile Layout', 'siteorigin-panels' ),
112
+ 'priority' => 12
113
  ),
114
  'design' => array(
115
  'name' => __( 'Design', 'siteorigin-panels' ),
117
  ),
118
  );
119
 
120
+ if ( ! siteorigin_panels_setting( 'tablet-layout' ) ) {
121
+ unset( $groups['tablet_layout'] );
122
+ }
123
+
124
  // Check if we need a default group
125
  foreach ( $fields as $field_id => $field ) {
126
  if ( empty( $field['group'] ) || $field['group'] == 'theme' ) {
inc/styles.php CHANGED
@@ -27,6 +27,10 @@ class SiteOrigin_Panels_Styles {
27
  add_filter( 'siteorigin_panels_cell_style_css', array( $this, 'general_style_css' ), 10, 2 );
28
  add_filter( 'siteorigin_panels_widget_style_css', array( $this, 'general_style_css' ), 10, 2 );
29
 
 
 
 
 
30
  add_filter( 'siteorigin_panels_row_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
31
  add_filter( 'siteorigin_panels_cell_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
32
  add_filter( 'siteorigin_panels_widget_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
@@ -61,8 +65,11 @@ class SiteOrigin_Panels_Styles {
61
  array( 'jquery' ),
62
  SITEORIGIN_PANELS_VERSION
63
  );
 
 
64
  wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
65
  'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting( 'full-width-container' ) ),
 
66
  ) );
67
 
68
  if ( siteorigin_panels_setting( 'parallax-type' ) == 'modern' ) {
@@ -147,15 +154,26 @@ class SiteOrigin_Panels_Styles {
147
  'priority' => 7,
148
  'multiple' => true
149
  );
150
-
151
- // Mobile layout fields
152
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  $fields['mobile_padding'] = array(
154
  'name' => __( 'Mobile Padding', 'siteorigin-panels' ),
155
  'type' => 'measurement',
156
  'group' => 'mobile_layout',
157
  'description' => __( 'Padding when on mobile devices.', 'siteorigin-panels' ),
158
- 'priority' => 8,
159
  'multiple' => true
160
  );
161
 
@@ -292,8 +310,18 @@ class SiteOrigin_Panels_Styles {
292
  );
293
  }
294
 
295
- // Add the mobile layout fields
296
-
 
 
 
 
 
 
 
 
 
 
297
  $fields['mobile_bottom_margin'] = array(
298
  'name' => __( 'Mobile Bottom Margin', 'siteorigin-panels' ),
299
  'type' => 'measurement',
@@ -347,13 +375,21 @@ class SiteOrigin_Panels_Styles {
347
  );
348
 
349
  $fields['link_color'] = array(
350
- 'name' => __( 'Links Color', 'siteorigin-panels' ),
351
  'type' => 'color',
352
  'group' => 'design',
353
  'description' => __( 'Color of links inside this cell.', 'siteorigin-panels' ),
354
  'priority' => 16,
355
  );
356
 
 
 
 
 
 
 
 
 
357
  return $fields;
358
  }
359
 
@@ -387,13 +423,21 @@ class SiteOrigin_Panels_Styles {
387
  );
388
 
389
  $fields['link_color'] = array(
390
- 'name' => __( 'Links Color', 'siteorigin-panels' ),
391
  'type' => 'color',
392
  'group' => 'design',
393
  'description' => __( 'Color of links inside this widget.', 'siteorigin-panels' ),
394
  'priority' => 16,
395
  );
396
 
 
 
 
 
 
 
 
 
397
  return $fields;
398
  }
399
 
@@ -614,6 +658,22 @@ class SiteOrigin_Panels_Styles {
614
  return $css;
615
  }
616
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
  /**
618
  * Get the mobile styling for rows, cells and widgets
619
  *
@@ -655,6 +715,8 @@ class SiteOrigin_Panels_Styles {
655
  * @return mixed
656
  */
657
  static function filter_css_object( $css, $panels_data, $post_id, $layout ) {
 
 
658
  $mobile_width = siteorigin_panels_setting( 'mobile-width' );
659
  if( empty( $layout ) ) {
660
  return $css;
@@ -664,6 +726,7 @@ class SiteOrigin_Panels_Styles {
664
  if( empty( $row[ 'style' ] ) ) $row[ 'style' ] = array();
665
 
666
  $standard_css = apply_filters( 'siteorigin_panels_row_style_css', array(), $row['style'] );
 
667
  $mobile_css = apply_filters( 'siteorigin_panels_row_style_mobile_css', array(), $row['style'] );
668
 
669
  if ( ! empty( $standard_css ) ) {
@@ -674,6 +737,17 @@ class SiteOrigin_Panels_Styles {
674
  $standard_css
675
  );
676
  }
 
 
 
 
 
 
 
 
 
 
 
677
  if ( ! empty( $mobile_css ) ) {
678
  $css->add_row_css(
679
  $post_id,
@@ -686,10 +760,26 @@ class SiteOrigin_Panels_Styles {
686
 
687
  // Add in flexbox alignment to the main row element
688
  if ( siteorigin_panels_setting( 'legacy-layout' ) != 'always' && ! SiteOrigin_Panels::is_legacy_browser() && ! empty( $row['style']['cell_alignment'] ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
689
  $css->add_row_css(
690
  $post_id,
691
  $ri,
692
- array( '.panel-no-style', '.panel-has-style > .panel-row-style' ),
693
  array(
694
  '-webkit-align-items' => $row['style']['cell_alignment'],
695
  'align-items' => $row['style']['cell_alignment'],
@@ -704,6 +794,7 @@ class SiteOrigin_Panels_Styles {
704
  if( empty( $cell[ 'style' ] ) ) $cell[ 'style' ] = array();
705
 
706
  $standard_css = apply_filters( 'siteorigin_panels_cell_style_css', array(), $cell['style'] );
 
707
  $mobile_css = apply_filters( 'siteorigin_panels_cell_style_mobile_css', array(), $cell['style'] );
708
 
709
  if ( ! empty( $standard_css ) ) {
@@ -715,6 +806,16 @@ class SiteOrigin_Panels_Styles {
715
  $standard_css
716
  );
717
  }
 
 
 
 
 
 
 
 
 
 
718
  if ( ! empty( $mobile_css ) ) {
719
  $css->add_cell_css(
720
  $post_id,
@@ -746,6 +847,7 @@ class SiteOrigin_Panels_Styles {
746
  if ( empty( $widget['panels_info']['style'] ) ) $widget['panels_info']['style'] = array();
747
 
748
  $standard_css = apply_filters( 'siteorigin_panels_widget_style_css', array(), $widget['panels_info']['style'] );
 
749
  $mobile_css = apply_filters( 'siteorigin_panels_widget_style_mobile_css', array(), $widget['panels_info']['style'] );
750
 
751
  if( ! empty( $standard_css ) ) {
@@ -759,6 +861,17 @@ class SiteOrigin_Panels_Styles {
759
  );
760
  }
761
 
 
 
 
 
 
 
 
 
 
 
 
762
  if( ! empty( $mobile_css ) ) {
763
  $css->add_widget_css(
764
  $post_id,
@@ -776,6 +889,11 @@ class SiteOrigin_Panels_Styles {
776
  'color' => $widget['panels_info']['style']['link_color']
777
  ) );
778
  }
 
 
 
 
 
779
  }
780
  }
781
  }
27
  add_filter( 'siteorigin_panels_cell_style_css', array( $this, 'general_style_css' ), 10, 2 );
28
  add_filter( 'siteorigin_panels_widget_style_css', array( $this, 'general_style_css' ), 10, 2 );
29
 
30
+ add_filter( 'siteorigin_panels_row_style_tablet_css', array( $this, 'general_style_tablet_css' ), 10, 2 );
31
+ add_filter( 'siteorigin_panels_cell_style_tablet_css', array( $this, 'general_style_tablet_css' ), 10, 2 );
32
+ add_filter( 'siteorigin_panels_widget_style_tablet_css', array( $this, 'general_style_tablet_css' ), 10, 2 );
33
+
34
  add_filter( 'siteorigin_panels_row_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
35
  add_filter( 'siteorigin_panels_cell_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
36
  add_filter( 'siteorigin_panels_widget_style_mobile_css', array( $this, 'general_style_mobile_css' ), 10, 2 );
65
  array( 'jquery' ),
66
  SITEORIGIN_PANELS_VERSION
67
  );
68
+
69
+ $container_settings = SiteOrigin_Panels::container_settings();
70
  wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
71
  'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting( 'full-width-container' ) ),
72
+ 'stretchRows' => ! $container_settings['css_override'],
73
  ) );
74
 
75
  if ( siteorigin_panels_setting( 'parallax-type' ) == 'modern' ) {
154
  'priority' => 7,
155
  'multiple' => true
156
  );
 
 
157
 
158
+ // Tablet layout fields
159
+ if ( siteorigin_panels_setting( 'tablet-layout' ) ) {
160
+ $fields['tablet_padding'] = array(
161
+ 'name' => __( 'Tablet Padding', 'siteorigin-panels' ),
162
+ 'type' => 'measurement',
163
+ 'group' => 'tablet_layout',
164
+ 'description' => __( 'Padding when on tablet devices.', 'siteorigin-panels' ),
165
+ 'priority' => 8,
166
+ 'multiple' => true
167
+ );
168
+ }
169
+
170
+ // Mobile layout fields
171
  $fields['mobile_padding'] = array(
172
  'name' => __( 'Mobile Padding', 'siteorigin-panels' ),
173
  'type' => 'measurement',
174
  'group' => 'mobile_layout',
175
  'description' => __( 'Padding when on mobile devices.', 'siteorigin-panels' ),
176
+ 'priority' => 9,
177
  'multiple' => true
178
  );
179
 
310
  );
311
  }
312
 
313
+ if ( siteorigin_panels_setting( 'tablet-layout' ) ) {
314
+ // Add the tablet layout fields
315
+ $fields['tablet_bottom_margin'] = array(
316
+ 'name' => __( 'Tablet Bottom Margin', 'siteorigin-panels' ),
317
+ 'type' => 'measurement',
318
+ 'group' => 'tablet_layout',
319
+ 'description' => sprintf( __( 'Space below the row on tablet devices. Default is %spx.', 'siteorigin-panels' ), siteorigin_panels_setting( 'margin-bottom' ) ),
320
+ 'priority' => 5,
321
+ );
322
+ }
323
+
324
+ // Add the mobile layout fields
325
  $fields['mobile_bottom_margin'] = array(
326
  'name' => __( 'Mobile Bottom Margin', 'siteorigin-panels' ),
327
  'type' => 'measurement',
375
  );
376
 
377
  $fields['link_color'] = array(
378
+ 'name' => __( 'Link Color', 'siteorigin-panels' ),
379
  'type' => 'color',
380
  'group' => 'design',
381
  'description' => __( 'Color of links inside this cell.', 'siteorigin-panels' ),
382
  'priority' => 16,
383
  );
384
 
385
+ $fields['link_color_hover'] = array(
386
+ 'name' => __( 'Link Hover Color', 'siteorigin-panels' ),
387
+ 'type' => 'color',
388
+ 'group' => 'design',
389
+ 'description' => __( 'Color of links inside this widget when hovered.', 'siteorigin-panels' ),
390
+ 'priority' => 17,
391
+ );
392
+
393
  return $fields;
394
  }
395
 
423
  );
424
 
425
  $fields['link_color'] = array(
426
+ 'name' => __( 'Link Color', 'siteorigin-panels' ),
427
  'type' => 'color',
428
  'group' => 'design',
429
  'description' => __( 'Color of links inside this widget.', 'siteorigin-panels' ),
430
  'priority' => 16,
431
  );
432
 
433
+ $fields['link_color_hover'] = array(
434
+ 'name' => __( 'Link Hover Color', 'siteorigin-panels' ),
435
+ 'type' => 'color',
436
+ 'group' => 'design',
437
+ 'description' => __( 'Color of links inside this widget when hovered.', 'siteorigin-panels' ),
438
+ 'priority' => 17,
439
+ );
440
+
441
  return $fields;
442
  }
443
 
658
  return $css;
659
  }
660
 
661
+ /**
662
+ * Get the tablet styling for rows, cells and widgets
663
+ *
664
+ * @param $css
665
+ * @param $style
666
+ *
667
+ * @return mixed
668
+ */
669
+ static function general_style_tablet_css( $css, $style ){
670
+ if( ! empty( $style['tablet_padding'] ) ) {
671
+ $css['padding'] = $style[ 'tablet_padding' ];
672
+ }
673
+
674
+ return $css;
675
+ }
676
+
677
  /**
678
  * Get the mobile styling for rows, cells and widgets
679
  *
715
  * @return mixed
716
  */
717
  static function filter_css_object( $css, $panels_data, $post_id, $layout ) {
718
+ $tablet_width = siteorigin_panels_setting( 'tablet-width' );
719
+ $tablet_layout = siteorigin_panels_setting( 'tablet-layout' );
720
  $mobile_width = siteorigin_panels_setting( 'mobile-width' );
721
  if( empty( $layout ) ) {
722
  return $css;
726
  if( empty( $row[ 'style' ] ) ) $row[ 'style' ] = array();
727
 
728
  $standard_css = apply_filters( 'siteorigin_panels_row_style_css', array(), $row['style'] );
729
+ $tablet_css = $tablet_layout ? apply_filters( 'siteorigin_panels_row_style_tablet_css', array(), $row['style'] ) : '';
730
  $mobile_css = apply_filters( 'siteorigin_panels_row_style_mobile_css', array(), $row['style'] );
731
 
732
  if ( ! empty( $standard_css ) ) {
737
  $standard_css
738
  );
739
  }
740
+
741
+ if ( ! empty( $tablet_css ) ) {
742
+ $css->add_row_css(
743
+ $post_id,
744
+ $ri,
745
+ '> .panel-row-style',
746
+ $tablet_css,
747
+ "$tablet_width:$mobile_width"
748
+ );
749
+ }
750
+
751
  if ( ! empty( $mobile_css ) ) {
752
  $css->add_row_css(
753
  $post_id,
760
 
761
  // Add in flexbox alignment to the main row element
762
  if ( siteorigin_panels_setting( 'legacy-layout' ) != 'always' && ! SiteOrigin_Panels::is_legacy_browser() && ! empty( $row['style']['cell_alignment'] ) ) {
763
+
764
+ $selector = array();
765
+ $container_settings = SiteOrigin_Panels::container_settings();
766
+ // What selector we use is dependent on their row setup.
767
+ if ( empty( $row['style'] ) ) {
768
+ $selector[] = '.panel-no-style';
769
+ } elseif ( // Is CSS Container Breaker is enabled, and is the row full width?
770
+ $container_settings['css_override'] &&
771
+ isset( $row['style']['row_stretch'] ) &&
772
+ $row['style']['row_stretch'] == 'full'
773
+ ) {
774
+ $selector[] = '.panel-has-style > .panel-row-style > .so-panels-full-wrapper';
775
+ } else {
776
+ $selector[] = '.panel-has-style > .panel-row-style';
777
+ }
778
+
779
  $css->add_row_css(
780
  $post_id,
781
  $ri,
782
+ $selector,
783
  array(
784
  '-webkit-align-items' => $row['style']['cell_alignment'],
785
  'align-items' => $row['style']['cell_alignment'],
794
  if( empty( $cell[ 'style' ] ) ) $cell[ 'style' ] = array();
795
 
796
  $standard_css = apply_filters( 'siteorigin_panels_cell_style_css', array(), $cell['style'] );
797
+ $tablet_css = $tablet_layout ? apply_filters( 'siteorigin_panels_cell_style_tablet_css', array(), $cell['style'] ) : '';
798
  $mobile_css = apply_filters( 'siteorigin_panels_cell_style_mobile_css', array(), $cell['style'] );
799
 
800
  if ( ! empty( $standard_css ) ) {
806
  $standard_css
807
  );
808
  }
809
+ if ( ! empty( $tablet_css ) ) {
810
+ $css->add_cell_css(
811
+ $post_id,
812
+ $ri,
813
+ $ci,
814
+ '> .panel-cell-style',
815
+ $tablet_css,
816
+ "$tablet_width:$mobile_width"
817
+ );
818
+ }
819
  if ( ! empty( $mobile_css ) ) {
820
  $css->add_cell_css(
821
  $post_id,
847
  if ( empty( $widget['panels_info']['style'] ) ) $widget['panels_info']['style'] = array();
848
 
849
  $standard_css = apply_filters( 'siteorigin_panels_widget_style_css', array(), $widget['panels_info']['style'] );
850
+ $tablet_css = $tablet_layout ? apply_filters( 'siteorigin_panels_widget_style_tablet_css', array(), $widget['panels_info']['style'] ) : '';
851
  $mobile_css = apply_filters( 'siteorigin_panels_widget_style_mobile_css', array(), $widget['panels_info']['style'] );
852
 
853
  if( ! empty( $standard_css ) ) {
861
  );
862
  }
863
 
864
+ if ( ! empty( $tablet_css ) ) {
865
+ $css->add_widget_css(
866
+ $post_id,
867
+ $ri,
868
+ $ci,
869
+ $wi,
870
+ '> .panel-widget-style',
871
+ $tablet_css,
872
+ "$tablet_width:$mobile_width"
873
+ );
874
+ }
875
  if( ! empty( $mobile_css ) ) {
876
  $css->add_widget_css(
877
  $post_id,
889
  'color' => $widget['panels_info']['style']['link_color']
890
  ) );
891
  }
892
+ if ( ! empty( $widget['panels_info']['style']['link_color_hover'] ) ) {
893
+ $css->add_widget_css( $post_id, $ri, $ci, $wi, ' a:hover', array(
894
+ 'color' => $widget['panels_info']['style']['link_color_hover']
895
+ ) );
896
+ }
897
  }
898
  }
899
  }
js/siteorigin-panels.js CHANGED
@@ -197,6 +197,9 @@ module.exports = panels.view.dialog.extend( {
197
  // Render the dialog and attach it to the builder interface
198
  this.renderDialog( this.parseDialogContent( $( '#siteorigin-panels-dialog-history' ).html(), {} ) );
199
 
 
 
 
200
  this.$( 'iframe.siteorigin-panels-history-iframe' ).on( 'load', function () {
201
  var $$ = $( this );
202
  $$.show();
@@ -2688,8 +2691,9 @@ jQuery( function ( $ ) {
2688
  builderType: $panelsMetabox.data( 'builder-type' ),
2689
  builderSupports: $panelsMetabox.data( 'builder-supports' ),
2690
  loadOnAttach: panelsOptions.loadOnAttach && $( '#auto_draft' ).val() == 1,
2691
- loadLiveEditor: $panelsMetabox.data('live-editor') == 1,
2692
- liveEditorPreview: container.data('preview-url')
 
2693
  };
2694
  }
2695
  else if ( $( '.siteorigin-panels-builder-form' ).length ) {
@@ -2707,7 +2711,8 @@ jQuery( function ( $ ) {
2707
  builderType: $$.data( 'type' ),
2708
  builderSupports: $$.data( 'builder-supports' ),
2709
  loadLiveEditor: false,
2710
- liveEditorPreview: $$.data( 'preview-url' )
 
2711
  };
2712
  }
2713
 
@@ -4145,6 +4150,7 @@ module.exports = Backbone.View.extend( {
4145
 
4146
  this.config = _.extend( {
4147
  loadLiveEditor: false,
 
4148
  builderSupports: {}
4149
  }, options.config );
4150
 
@@ -4761,14 +4767,14 @@ module.exports = Backbone.View.extend( {
4761
  * @returns {panels.view.builder}
4762
  */
4763
  addLiveEditor: function () {
4764
- if ( _.isEmpty( this.config.liveEditorPreview ) ) {
4765
  return this;
4766
  }
4767
 
4768
  // Create the live editor and set the builder to this.
4769
  this.liveEditor = new panels.view.liveEditor( {
4770
  builder: this,
4771
- previewUrl: this.config.liveEditorPreview
4772
  } );
4773
 
4774
  // Display the live editor button in the toolbar
@@ -4798,7 +4804,7 @@ module.exports = Backbone.View.extend( {
4798
  * @return {panels.view.builder}
4799
  */
4800
  addHistoryBrowser: function () {
4801
- if ( _.isEmpty( this.config.liveEditorPreview ) ) {
4802
  return this;
4803
  }
4804
 
@@ -5993,6 +5999,19 @@ module.exports = Backbone.View.extend( {
5993
  }
5994
  }
5995
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5996
  // Now convert this into an array
5997
  if ( fieldValue !== null ) {
5998
  for ( var i = 0; i < parts.length; i ++ ) {
@@ -6245,11 +6264,19 @@ module.exports = Backbone.View.extend( {
6245
  /**
6246
  * Close the Live Editor
6247
  */
6248
- close: function () {
6249
  if ( ! this.$el.is( ':visible' ) ) {
6250
  return this;
6251
  }
6252
 
 
 
 
 
 
 
 
 
6253
  this.$el.hide();
6254
  panels.helpers.pageScroll.unlock();
6255
 
@@ -6263,9 +6290,13 @@ module.exports = Backbone.View.extend( {
6263
  * Close the Live Editor and save the post.
6264
  */
6265
  closeAndSave: function(){
6266
- this.close();
6267
  // Finds the submit input for saving without publishing draft posts.
6268
- $( '#submitdiv input[type="submit"][name="save"]' ).trigger( 'click' );
 
 
 
 
6269
  },
6270
 
6271
  /**
@@ -7281,6 +7312,9 @@ module.exports = Backbone.View.extend( {
7281
  text.on( 'change', setValue );
7282
  unit.on( 'change', setValue );
7283
  } );
 
 
 
7284
  }
7285
 
7286
  } );
197
  // Render the dialog and attach it to the builder interface
198
  this.renderDialog( this.parseDialogContent( $( '#siteorigin-panels-dialog-history' ).html(), {} ) );
199
 
200
+ // Set the history URL.
201
+ this.$( 'form.history-form' ).attr( 'action', this.builder.config.editorPreview );
202
+
203
  this.$( 'iframe.siteorigin-panels-history-iframe' ).on( 'load', function () {
204
  var $$ = $( this );
205
  $$.show();
2691
  builderType: $panelsMetabox.data( 'builder-type' ),
2692
  builderSupports: $panelsMetabox.data( 'builder-supports' ),
2693
  loadOnAttach: panelsOptions.loadOnAttach && $( '#auto_draft' ).val() == 1,
2694
+ loadLiveEditor: $panelsMetabox.data( 'live-editor' ) == 1,
2695
+ liveEditorCloseAfter: $panelsMetabox.data( 'live-editor-close' ) == 1,
2696
+ editorPreview: container.data( 'preview-url' )
2697
  };
2698
  }
2699
  else if ( $( '.siteorigin-panels-builder-form' ).length ) {
2711
  builderType: $$.data( 'type' ),
2712
  builderSupports: $$.data( 'builder-supports' ),
2713
  loadLiveEditor: false,
2714
+ liveEditorCloseAfter: false,
2715
+ editorPreview: $$.data( 'preview-url' )
2716
  };
2717
  }
2718
 
4150
 
4151
  this.config = _.extend( {
4152
  loadLiveEditor: false,
4153
+ liveEditorCloseAfter: false,
4154
  builderSupports: {}
4155
  }, options.config );
4156
 
4767
  * @returns {panels.view.builder}
4768
  */
4769
  addLiveEditor: function () {
4770
+ if ( _.isEmpty( this.config.editorPreview ) ) {
4771
  return this;
4772
  }
4773
 
4774
  // Create the live editor and set the builder to this.
4775
  this.liveEditor = new panels.view.liveEditor( {
4776
  builder: this,
4777
+ previewUrl: this.config.editorPreview
4778
  } );
4779
 
4780
  // Display the live editor button in the toolbar
4804
  * @return {panels.view.builder}
4805
  */
4806
  addHistoryBrowser: function () {
4807
+ if ( _.isEmpty( this.config.editorPreview ) ) {
4808
  return this;
4809
  }
4810
 
5999
  }
6000
  }
6001
 
6002
+ // Is this field an ACF Repeater?
6003
+ if ( $$.parents( '.acf-repeater' ).length ) {
6004
+ // If field is empty, skip it - this is to avoid indexes which are admin only.
6005
+ if ( fieldValue == '' ) {
6006
+ return;
6007
+ }
6008
+
6009
+ // Ensure only the standard PB fields are set up.
6010
+ // This allows for the rest of the ACF fields to be handled
6011
+ // as objects rather than an array.
6012
+ parts.slice( parts[2], parts.length );
6013
+ }
6014
+
6015
  // Now convert this into an array
6016
  if ( fieldValue !== null ) {
6017
  for ( var i = 0; i < parts.length; i ++ ) {
6264
  /**
6265
  * Close the Live Editor
6266
  */
6267
+ close: function ( closeAfter = true ) {
6268
  if ( ! this.$el.is( ':visible' ) ) {
6269
  return this;
6270
  }
6271
 
6272
+ if ( closeAfter && this.builder.config.liveEditorCloseAfter ) {
6273
+ // Live Editor is set to be closed upon saving the page.
6274
+ // This is done using a trigger rather than a redirect to confirm if
6275
+ // the user wants to save.
6276
+ $( '#wp-admin-bar-view a' )[0].click(); // JS click.
6277
+ return this;
6278
+ }
6279
+
6280
  this.$el.hide();
6281
  panels.helpers.pageScroll.unlock();
6282
 
6290
  * Close the Live Editor and save the post.
6291
  */
6292
  closeAndSave: function(){
6293
+ this.close( false );
6294
  // Finds the submit input for saving without publishing draft posts.
6295
+ if ( $( '.block-editor-page' ).length ) {
6296
+ $( '.editor-post-publish-button' )[0].click();
6297
+ } else {
6298
+ $( '#submitdiv input[type="submit"][name="save"]' )[0].click();
6299
+ }
6300
  },
6301
 
6302
  /**
7312
  text.on( 'change', setValue );
7313
  unit.on( 'change', setValue );
7314
  } );
7315
+
7316
+ // Allow other plugins to setup custom fields.
7317
+ $( document ).trigger( 'setup_style_fields', this );
7318
  }
7319
 
7320
  } );
js/siteorigin-panels.min.js CHANGED
@@ -1,8 +1,8 @@
1
- !function e(t,i,s){function l(n,r){if(!i[n]){if(!t[n]){var a="function"==typeof require&&require;if(!r&&a)return a(n,!0);if(o)return o(n,!0);var d=new Error("Cannot find module '"+n+"'");throw d.code="MODULE_NOT_FOUND",d}var c=i[n]={exports:{}};t[n][0].call(c.exports,(function(e){return l(t[n][1][e]||e)}),c,c.exports,e,t,i,s)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;n<s.length;n++)l(s[n]);return l}({1:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.cell,initialize:function(){},totalWeight:function(){var e=0;return this.each((function(t){e+=t.get("weight")})),e}})},{}],2:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.historyEntry,builder:null,maxSize:12,initialize:function(){this.on("add",this.onAddEntry,this)},addEntry:function(e,t){_.isEmpty(t)&&(t=this.builder.getPanelsData());var i=new s.model.historyEntry({text:e,data:JSON.stringify(t),time:parseInt((new Date).getTime()/1e3),collection:this});this.add(i)},onAddEntry:function(e){if(this.models.length>1){var t=this.at(this.models.length-2);(e.get("text")===t.get("text")&&e.get("time")-t.get("time")<15||e.get("data")===t.get("data"))&&(this.remove(e),t.set("count",t.get("count")+1))}for(;this.models.length>this.maxSize;)this.shift()}})},{}],3:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.row,empty:function(){for(var e;;){if(!(e=this.collection.first()))break;e.destroy()}}})},{}],4:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.widget,initialize:function(){}})},{}],5:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({dialogClass:"so-panels-dialog-add-builder",render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-builder").html(),{})),this.$(".so-content .siteorigin-panels-builder").append(this.builder.$el)},initializeDialog:function(){var e=this;this.once("open_dialog_complete",(function(){e.builder.initSortable()})),this.on("open_dialog_complete",(function(){e.builder.trigger("builder_resize")}))}})},{}],6:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({historyEntryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-history-entry").html())),entries:{},currentEntry:null,revertEntry:null,selectedEntry:null,previewScrollTop:null,dialogClass:"so-panels-dialog-history",dialogIcon:"history",events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-restore":"restoreSelectedEntry","keyup .history-entry":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this),this.on("open_dialog_complete",(function(){this.$(".history-entry").trigger("focus")}))},render:function(){var e=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("iframe.siteorigin-panels-history-iframe").on("load",(function(){var t=l(this);t.show(),t.contents().scrollTop(e.previewScrollTop)}))},setRevertEntry:function(e){this.revertEntry=new s.model.historyEntry({data:JSON.stringify(e.getPanelsData()),time:parseInt((new Date).getTime()/1e3)})},setCurrentEntry:function(){this.currentEntry=new s.model.historyEntry({data:JSON.stringify(this.builder.model.getPanelsData()),time:parseInt((new Date).getTime()/1e3)}),this.selectedEntry=this.currentEntry,this.previewEntry(this.currentEntry),this.$(".so-buttons .so-restore").addClass("disabled")},renderHistoryEntries:function(){var e=this,t=this.$(".history-entries").empty();this.currentEntry.get("data")===this.revertEntry.get("data")&&_.isEmpty(this.entries.models)||l(this.historyEntryTemplate({title:panelsOptions.loc.history.revert,count:1})).data("historyEntry",this.revertEntry).prependTo(t),this.entries.each((function(i){var s=e.historyEntryTemplate({title:panelsOptions.loc.history[i.get("text")],count:i.get("count")});l(s).data("historyEntry",i).prependTo(t)})),l(this.historyEntryTemplate({title:panelsOptions.loc.history.current,count:1})).data("historyEntry",this.currentEntry).addClass("so-selected").prependTo(t),t.find(".history-entry").on("click",(function(i){if("keyup"!=i.type||13==i.which){var s=jQuery(this);t.find(".history-entry").not(s).removeClass("so-selected"),s.addClass("so-selected");var l=s.data("historyEntry");e.selectedEntry=l,e.selectedEntry.cid!==e.currentEntry.cid?e.$(".so-buttons .so-restore").removeClass("disabled"):e.$(".so-buttons .so-restore").addClass("disabled"),e.previewEntry(l)}})),this.updateEntryTimes()},previewEntry:function(e){var t=this.$("iframe.siteorigin-panels-history-iframe");t.hide(),this.previewScrollTop=t.contents().scrollTop(),this.$('form.history-form input[name="live_editor_panels_data"]').val(e.get("data")),this.$('form.history-form input[name="live_editor_post_ID"]').val(this.builder.config.postId),this.$("form.history-form").trigger("submit")},restoreSelectedEntry:function(){return!this.$(".so-buttons .so-restore").hasClass("disabled")&&(this.currentEntry.get("data")===this.selectedEntry.get("data")?(this.closeDialog(),!1):("restore"!==this.selectedEntry.get("text")&&this.builder.addHistoryEntry("restore",this.builder.model.getPanelsData()),this.builder.model.loadPanelsData(JSON.parse(this.selectedEntry.get("data"))),this.closeDialog(),!1))},updateEntryTimes:function(){var e=this;this.$(".history-entries .history-entry").each((function(){var t=jQuery(this),i=t.find(".timesince"),s=t.data("historyEntry");i.html(e.timeSince(s.get("time")))}))},timeSince:function(e){var t,i=parseInt((new Date).getTime()/1e3)-e,s=[];return i>3600&&(1===(t=Math.floor(i/3600))?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),i>60&&(1===(t=Math.floor(i/60))?s.push(panelsOptions.loc.time.minute.replace("%d",t)):s.push(panelsOptions.loc.time.minutes.replace("%d",t)),i-=60*t),i>0&&(1===i?s.push(panelsOptions.loc.time.second.replace("%d",i)):s.push(panelsOptions.loc.time.seconds.replace("%d",i))),_.isEmpty(s)?panelsOptions.loc.time.now:panelsOptions.loc.time.ago.replace("%s",s.slice(0,2).join(", "))}})},{}],7:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({directoryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-directory-items").html())),builder:null,dialogClass:"so-panels-dialog-prebuilt-layouts",dialogIcon:"layouts",layoutCache:{},currentTab:!1,directoryPage:1,events:{"click .so-close":"closeDialog","click .so-sidebar-tabs li a":"tabClickHandler","click .so-content .layout":"layoutClickHandler","keyup .so-sidebar-search":"searchHandler","click .so-screenshot, .so-title":"directoryItemClickHandler","keyup .so-directory-item":"clickTitleOnEnter"},clickTitleOnEnter:function(e){13==e.which&&l(e.target).find(".so-title").trigger("click")},initializeDialog:function(){var e=this;this.on("open_dialog",(function(){e.$(".so-sidebar-tabs li a").first().trigger("click"),e.$(".so-status").removeClass("so-panels-loading")})),this.on("open_dialog_complete",(function(){this.$(".so-sidebar-search").val("").trigger("focus")}))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-prebuilt").html(),{})),this.on("button_click",this.toolbarButtonClick,this),this.initToolbar()},tabClickHandler:function(e){e.preventDefault(),this.selectedLayoutItem=null,this.uploadedLayout=null,this.updateButtonState(!1),this.$(".so-sidebar-tabs li").removeClass("tab-active");var t=l(e.target),i=t.attr("href").split("#")[1];t.parent().addClass("tab-active");this.$(".so-content").empty(),this.currentTab=i,"import"==i?this.displayImportExport():this.displayLayoutDirectory("",1,i),this.$(".so-sidebar-search").val("")},displayImportExport:function(){var e=this.$(".so-content").empty().removeClass("so-panels-loading");e.html(l("#siteorigin-panels-dialog-prebuilt-importexport").html());var t=this,i=t.$(".import-upload-ui"),s=new plupload.Uploader({runtimes:"html5,silverlight,flash,html4",browse_button:i.find(".file-browse-button").get(0),container:i.get(0),drop_element:i.find(".drag-upload-area").get(0),file_data_name:"panels_import_data",multiple_queues:!1,max_file_size:panelsOptions.plupload.max_file_size,url:panelsOptions.plupload.url,flash_swf_url:panelsOptions.plupload.flash_swf_url,silverlight_xap_url:panelsOptions.plupload.silverlight_xap_url,filters:[{title:panelsOptions.plupload.filter_title,extensions:"json"}],multipart_params:{action:"so_panels_import_layout"},init:{PostInit:function(e){e.features.dragdrop&&i.addClass("has-drag-drop"),i.find(".progress-precent").css("width","0%")},FilesAdded:function(e){i.find(".file-browse-button").trigger("blur"),i.find(".drag-upload-area").removeClass("file-dragover"),i.find(".progress-bar").fadeIn("fast"),t.$(".js-so-selected-file").text(panelsOptions.loc.prebuilt_loading),e.start()},UploadProgress:function(e,t){i.find(".progress-precent").css("width",t.percent+"%")},FileUploaded:function(e,s,l){var o=JSON.parse(l.response);_.isUndefined(o.widgets)?alert(panelsOptions.plupload.error_message):(t.uploadedLayout=o,i.find(".progress-bar").hide(),t.$(".js-so-selected-file").text(panelsOptions.loc.ready_to_insert.replace("%s",s.name)),t.updateButtonState(!0))},Error:function(){alert(panelsOptions.plupload.error_message)}}});s.init(),/Edge\/\d./i.test(navigator.userAgent)&&setTimeout((function(){s.refresh()}),250),i.find(".drag-upload-area").on("dragover",(function(){l(this).addClass("file-dragover")})).on("dragleave",(function(){l(this).removeClass("file-dragover")})),e.find(".so-export").on("submit",(function(e){var i=l(this),s=t.builder.model.getPanelsData(),o=l('input[name="post_title"], .editor-post-title__input').val();if(o){if(l(".block-editor-page").length){var n=t.getCurrentBlockPosition();n>=0&&(o+="-"+n)}}else o=l('input[name="post_ID"]').val();s.name=o,i.find('input[name="panels_export_data"]').val(JSON.stringify(s))}))},getCurrentBlockPosition:function(){var e=wp.data.select("core/block-editor").getSelectedBlockClientId();return wp.data.select("core/block-editor").getBlocks().findIndex((function(t){return t.clientId===e}))},displayLayoutDirectory:function(e,t,i){var s=this,o=this.$(".so-content").empty().addClass("so-panels-loading");if(void 0===e&&(e=""),void 0===t&&(t=1),void 0===i&&(i="directory-siteorigin"),i.match("^directory-")&&!panelsOptions.directory_enabled)return o.removeClass("so-panels-loading").html(l("#siteorigin-panels-directory-enable").html()),void o.find(".so-panels-enable-directory").on("click",(function(n){n.preventDefault(),l.get(panelsOptions.ajaxurl,{action:"so_panels_directory_enable"},(function(){})),panelsOptions.directory_enabled=!0,o.addClass("so-panels-loading"),s.displayLayoutDirectory(e,t,i)}));l.get(panelsOptions.ajaxurl,{action:"so_panels_layouts_query",search:e,page:t,type:i,builderType:this.builder.config.builderType},(function(n){if(s.currentTab===i){o.removeClass("so-panels-loading").html(s.directoryTemplate(n));var r=o.find(".so-previous"),a=o.find(".so-next");t<=1?r.addClass("button-disabled"):r.on("click",(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t-1,s.currentTab)})),t===n.max_num_pages||0===n.max_num_pages?a.addClass("button-disabled"):a.on("click",(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t+1,s.currentTab)})),o.find(".so-screenshot").each((function(){var e=l(this),t=e.find(".so-screenshot-wrapper");if(t.css("height",t.width()/4*3+"px").addClass("so-loading"),""!==e.data("src"))var i=l("<img/>").attr("src",e.data("src")).on("load",(function(){t.removeClass("so-loading").css("height","auto"),i.appendTo(t).hide().fadeIn("fast")}));else l("<img/>").attr("src",panelsOptions.prebuiltDefaultScreenshot).appendTo(t).hide().fadeIn("fast")})),o.find(".so-directory-browse").html(n.title)}}),"json")},directoryItemClickHandler:function(e){var t=this.$(e.target).closest(".so-directory-item");this.$(".so-directory-items").find(".selected").removeClass("selected"),t.addClass("selected"),this.selectedLayoutItem={lid:t.data("layout-id"),type:t.data("layout-type")},this.updateButtonState(!0)},toolbarButtonClick:function(e){if(!this.canAddLayout())return!1;var t=e.data("value");if(_.isUndefined(t))return!1;if(this.updateButtonState(!1),e.hasClass("so-needs-confirm")&&!e.hasClass("so-confirmed")){if(this.updateButtonState(!0),e.hasClass("so-confirming"))return;e.addClass("so-confirming");var i=e.html();return e.html('<span class="dashicons dashicons-yes"></span>'+e.data("confirm")),setTimeout((function(){e.removeClass("so-confirmed").html(i)}),2500),setTimeout((function(){e.removeClass("so-confirming"),e.addClass("so-confirmed")}),200),!1}this.addingLayout=!0,"import"===this.currentTab?this.addLayoutToBuilder(this.uploadedLayout,t):this.loadSelectedLayout().then(function(e){this.addLayoutToBuilder(e,t)}.bind(this))},canAddLayout:function(){return(this.selectedLayoutItem||this.uploadedLayout)&&!this.addingLayout},loadSelectedLayout:function(){this.setStatusMessage(panelsOptions.loc.prebuilt_loading,!0);var e=_.extend(this.selectedLayoutItem,{action:"so_panels_get_layout",builderType:this.builder.config.builderType}),t=new l.Deferred;return l.get(panelsOptions.ajaxurl,e,function(e){var i="";e.success?t.resolve(e.data):(i=e.data.message,t.reject(e.data)),this.setStatusMessage(i,!1,!e.success),this.updateButtonState(!0)}.bind(this)),t.promise()},searchHandler:function(e){13===e.keyCode&&this.displayLayoutDirectory(l(e.currentTarget).val(),1,this.currentTab)},updateButtonState:function(e){e=e&&(this.selectedLayoutItem||this.uploadedLayout);var t=this.$(".so-import-layout");t.prop("disabled",!e),e?t.removeClass("disabled"):t.addClass("disabled")},addLayoutToBuilder:function(e,t){this.builder.addHistoryEntry("prebuilt_loaded"),this.builder.model.loadPanelsData(e,t),this.addingLayout=!1,this.closeDialog()}})},{}],8:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({cellPreviewTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-row-cell-preview").html())),editableLabel:!0,events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","keyup .so-toolbar .so-delete":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-duplicate":"duplicateHandler","keyup .so-toolbar .so-duplicate":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},rowView:null,dialogIcon:"add-row",dialogClass:"so-panels-dialog-row-edit",styleType:"row",dialogType:"edit",row:{cells:null,style:{}},cellStylesCache:[],initializeDialog:function(){this.on("open_dialog",(function(){_.isUndefined(this.model)||_.isEmpty(this.model.get("cells"))?this.setRowModel(null):this.setRowModel(this.model),this.regenerateRowPreview(),this.renderStyles(),this.openSelectedCellStyles()}),this),this.on("open_dialog_complete",(function(){l(".so-panels-dialog-wrapper .so-title").trigger("focus")})),this.row={cells:new s.collection.cells(panelsOptions.default_columns),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",(function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})})),this.on("close_dialog",this.closeHandler),this.on("edit_label",function(e){if(e!==panelsOptions.loc.row.add&&e!==panelsOptions.loc.row.edit||(e=""),this.model.set("label",e),_.isEmpty(e)){var t="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.$(".so-title").text(t)}}.bind(this))},setRowDialogType:function(e){this.dialogType=e},render:function(){var e="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-row").html(),{title:e,dialogType:this.dialogType}));var t=this.$(".so-title");return this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove(),_.isUndefined(this.model)||"edit"!=this.dialogType||(this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction"))),this.$("input.so-row-field").on("keyup",(function(){l(this).trigger("change")})),this},renderStyles:function(){this.styles&&(this.styles.off("styles_loaded"),this.styles.remove()),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("row",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var e=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(e),this.styles.on("styles_loaded",(function(t){t||(this.styles.remove(),0===e.children().length&&(e.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),e.hide()))}),this)},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)?this:(this.row={cells:this.model.get("cells").clone(),style:{},ratio:this.model.get("ratio"),ratio_direction:this.model.get("ratio_direction")},"edit"==this.dialogType&&(this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction"))),this.clearCellStylesCache(),this)},regenerateRowPreview:function(){var e,t=this,i=this.$(".row-preview"),s=this.getSelectedCellIndex();i.empty(),this.row.cells.each((function(o,n){var r=l(this.cellPreviewTemplate({weight:o.get("weight")}));i.append(r),n==s&&r.find(".preview-cell-in").addClass("cell-selected");var a,d=r.prev();d.length&&((a=l('<div class="resize-handle"></div>')).appendTo(r).on("dblclick",(function(){var e=t.row.cells.at(n-1),i=o.get("weight")+e.get("weight");o.set("weight",i/2),e.set("weight",i/2),t.scaleRowWidths()})),a.draggable({axis:"x",containment:i,start:function(e,t){var i=r.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:r.outerWidth(),left:6,height:r.outerHeight()});i.find(".resize-handle").remove();var s=d.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:d.outerWidth(),right:6,height:d.outerHeight()});s.find(".resize-handle").remove(),l(this).data({newCellClone:i,prevCellClone:s}),r.find("> .preview-cell-in").css("visibility","hidden"),d.find("> .preview-cell-in").css("visibility","hidden")},drag:function(e,s){var o=t.row.cells.at(n).get("weight"),r=t.row.cells.at(n-1).get("weight"),a=o-(s.position.left+6)/i.width(),d=r+(s.position.left+6)/i.width();s.helper.offset().left,i.offset().left;l(this).data("newCellClone").css("width",i.width()*a+"px").find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",i.width()*d+"px").find(".preview-cell-weight").html(Math.round(1e3*d)/10)},stop:function(e,s){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove(),r.find(".preview-cell-in").css("visibility","visible"),d.find(".preview-cell-in").css("visibility","visible");var o=(s.position.left+6)/i.width(),a=t.row.cells.at(n),c=t.row.cells.at(n-1);a.get("weight")-o>.02&&c.get("weight")+o>.02&&(a.set("weight",a.get("weight")-o),c.set("weight",c.get("weight")+o)),t.scaleRowWidths(),s.helper.css("left",-6)}})),r.on("click",function(e){if(l(e.target).is(".preview-cell")||l(e.target).is(".preview-cell-in")){var t=l(e.target);t.closest(".row-preview").find(".preview-cell .preview-cell-in").removeClass("cell-selected"),t.addClass("cell-selected"),this.openSelectedCellStyles()}}.bind(this)),r.find(".preview-cell-weight").on("click",(function(s){t.$(".resize-handle").css("pointer-event","none").draggable("disable"),i.find(".preview-cell-weight").each((function(){var s=jQuery(this).hide();l('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(s.html())).insertAfter(s).on("focus",(function(){clearTimeout(e)})).on("keyup",(function(e){9!==e.keyCode&&l(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),l(this).trigger("blur"))})).on("keydown",(function(e){if(9===e.keyCode){e.preventDefault();var t=i.find(".preview-cell-weight-input"),s=t.index(l(this));s===t.length-1?t.eq(0).trigger("focus").trigger("select"):t.eq(s+1).trigger("focus").trigger("select")}})).on("blur",(function(){i.find(".preview-cell-weight-input").each((function(e,i){isNaN(parseFloat(l(i).val()))&&l(i).val(Math.floor(1e3*t.row.cells.at(e).get("weight"))/10)})),e=setTimeout((function(){if(0===i.find(".preview-cell-weight-input").length)return!1;var e=[],s=[],o=0,n=0;if(i.find(".preview-cell-weight-input").each((function(i,r){var a=parseFloat(l(r).val());a=isNaN(a)?1/t.row.cells.length:Math.round(10*a)/1e3;var d=!l(r).hasClass("no-user-interacted");e.push(a),s.push(d),d?o+=a:n+=a})),o>0&&n>0&&1-o>0)for(var r=0;r<e.length;r++)s[r]||(e[r]=e[r]/n*(1-o));var a=_.reduce(e,(function(e,t){return e+t}));e=e.map((function(e){return e/a})),Math.min.apply(Math,e)>.01&&t.row.cells.each((function(t,i){t.set("weight",e[i])})),i.find(".preview-cell").each((function(e,i){var s=t.row.cells.at(e).get("weight");l(i).animate({width:Math.round(1e3*s)/10+"%"},250),l(i).find(".preview-cell-weight-input").val(Math.round(1e3*s)/10)})),i.find(".preview-cell").css("overflow","visible"),setTimeout(t.regenerateRowPreview.bind(t),260)}),100)})).on("click",(function(){l(this).trigger("select")}))})),l(this).siblings(".preview-cell-weight-input").trigger("select")}))}),this),this.trigger("form_loaded",this)},getSelectedCellIndex:function(){var e=-1;return this.$(".preview-cell .preview-cell-in").each((function(t,i){l(i).is(".cell-selected")&&(e=t)})),e},openSelectedCellStyles:function(){if(!_.isUndefined(this.cellStyles)){if(this.cellStyles.stylesLoaded){var e={};try{e=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",e)}this.cellStyles.detach()}if(this.cellStyles=this.getSelectedCellStyles(),this.cellStyles){var t=this.$(".so-sidebar.so-right-sidebar");this.cellStyles.attach(t),this.cellStyles.on("styles_loaded",(function(e){e&&(t.closest(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"),t.show())}))}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(e>-1){var t=this.cellStylesCache[e];t||((t=new s.view.styles).model=this.row.cells.at(e),t.render("cell",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this,index:e}),this.cellStylesCache[e]=t)}return t},clearCellStylesCache:function(){this.cellStylesCache.forEach((function(e){e.remove(),e.off("styles_loaded")})),this.cellStylesCache=[]},scaleRowWidths:function(){var e=this;this.$(".row-preview .preview-cell").each((function(t,i){var s=e.row.cells.at(t);l(i).css("width",100*s.get("weight")+"%").find(".preview-cell-weight").html(Math.round(1e3*s.get("weight"))/10)}))},setCellsFromForm:function(){try{var e={cells:parseInt(this.$('.row-set-form input[name="cells"]').val()),ratio:parseFloat(this.$('.row-set-form select[name="ratio"]').val()),direction:this.$('.row-set-form select[name="ratio_direction"]').val()};_.isNaN(e.cells)&&(e.cells=1),isNaN(e.ratio)&&(e.ratio=1),e.cells<1?(e.cells=1,this.$('.row-set-form input[name="cells"]').val(e.cells)):e.cells>12&&(e.cells=12,this.$('.row-set-form input[name="cells"]').val(e.cells)),this.$('.row-set-form select[name="ratio"]').val(e.ratio);for(var t=[],i=this.row.cells.length!==e.cells,o=1,n=0;n<e.cells;n++)t.push(o),o*=e.ratio;var r=_.reduce(t,(function(e,t){return e+t}));if(t=_.map(t,(function(e){return e/r})),t=_.filter(t,(function(e){return e>.01})),"left"===e.direction&&(t=t.reverse()),this.row.cells=new s.collection.cells(this.row.cells.first(t.length)),_.each(t,function(e,t){var i=this.row.cells.at(t);i?i.set("weight",e):(i=new s.model.cell({weight:e,row:this.model}),this.row.cells.add(i))}.bind(this)),this.row.ratio=e.ratio,this.row.ratio_direction=e.direction,i)this.regenerateRowPreview();else{var a=this;this.$(".preview-cell").each((function(e,t){var i=a.row.cells.at(e).get("weight");l(t).animate({width:Math.round(1e3*i)/10+"%"},250),l(t).find(".preview-cell-weight").html(Math.round(1e3*i)/10)})),this.$(".preview-cell").css("overflow","visible"),setTimeout(a.regenerateRowPreview.bind(a),260)}}catch(e){console.log("Error setting cells - "+e.message)}this.$(".row-set-form .so-button-row-set").removeClass("button-primary")},tabClickHandler:function(e){"#row-layout"===e.attr("href")?this.$(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"):this.$(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar")},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),_.isEmpty(this.model)||(this.model.setCells(this.row.cells),this.model.set("ratio",this.row.ratio),this.model.set("ratio_direction",this.row.ratio_direction)),!_.isUndefined(this.styles)&&this.styles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-row-styles").style}catch(e){console.log("Error retrieving row styles - "+e.message)}this.model.set("style",t)}if(!_.isUndefined(this.cellStyles)&&this.cellStyles.stylesLoaded){t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",t)}e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},insertHandler:function(){this.builder.addHistoryEntry("row_added"),this.updateModel();var e=this.builder.getActiveCell({createCell:!1}),t={};return null!==e&&(t.at=this.builder.model.get("rows").indexOf(e.row)+1),this.model.collection=this.builder.model.get("rows"),this.builder.model.get("rows").add(this.model,t),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},saveHandler:function(){return this.builder.addHistoryEntry("row_edited"),this.updateModel(),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},deleteHandler:function(){return this.rowView.visualDestroyModel(),this.closeDialog({silent:!0}),!1},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);return this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.closeDialog({silent:!0}),!1},closeHandler:function(){this.clearCellStylesCache(),_.isUndefined(this.cellStyles)||(this.cellStyles=void 0)}})},{}],9:[function(e,t,i){var s=window.panels,l=jQuery,o=e("../view/widgets/js-widget");t.exports=s.view.dialog.extend({builder:null,sidebarWidgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widget-sidebar-widget").html())),dialogClass:"so-panels-dialog-edit-widget",dialogIcon:"add-widget",widgetView:!1,savingWidget:!1,editableLabel:!0,events:{"click .so-close":"saveHandler","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-previous":"navToPrevious","keyup .so-nav.so-previous":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-next":"navToNext","keyup .so-nav.so-next":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-delete":"deleteHandler","keyup .so-toolbar .so-delete":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-duplicate":"duplicateHandler","keyup .so-toolbar .so-duplicate":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initializeDialog:function(){var e=this;this.listenTo(this.model,"change:values",this.handleChangeValues),this.listenTo(this.model,"destroy",this.remove),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",(function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})})),this.on("edit_label",function(e){e===panelsOptions.widgets[this.model.get("class")].title&&(e=""),this.model.set("label",e),_.isEmpty(e)&&this.$(".so-title").text(this.model.getWidgetField("title"))}.bind(this)),this.on("open_dialog_complete",(function(){setTimeout((function(){var e=l(".so-content .siteorigin-widget-field-repeater-item-top, .so-content input, .so-content select").first();e.length?e.trigger("focus"):l(".so-panels-dialog-wrapper .so-title").trigger("focus")}),1250)}))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widget").html(),{})),this.loadForm();var e=this.model.getWidgetField("title");this.$(".so-title .widget-name").html(e),this.$(".so-edit-title").val(e),this.builder.supports("addWidget")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteWidget")||this.$(".so-buttons .so-delete").remove(),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("widget",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",(function(e){e||(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())}),this)},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(0===i)return!1;do{if(t=e.eq(--i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t)&&i>0);return!1},getNextDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(i===e.length-1)return!1;do{if(t=e.eq(++i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t));return!1},loadForm:function(){if(this.$("> *").length){this.$(".so-content").addClass("so-panels-loading");var e={action:"so_panels_widget_form",widget:this.model.get("class"),instance:JSON.stringify(this.model.get("values")),raw:this.model.get("raw")},t=this.$(".so-content");l.post(panelsOptions.ajaxurl,e,null,"html").done(function(e){var i=e.replace(/{\$id}/g,this.model.cid);t.removeClass("so-panels-loading").html(i),this.trigger("form_loaded",this),this.$(".panel-dialog").trigger("panelsopen"),this.on("close_dialog",this.updateModel,this),t.find("> .widget-content").length>0&&o.addWidget(t,this.model.widget_id)}.bind(this)).fail((function(e){var i;i=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,t.removeClass("so-panels-loading").html(i)}))}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();t=_.isUndefined(t.widgets)?{}:(t=t.widgets)[Object.keys(t)[0]],this.model.setValues(t),this.model.set("raw",!0)}if(this.styles.stylesLoaded){var i={};try{i=this.getFormValues(".so-sidebar .so-visual-styles").style}catch(e){}this.model.set("style",i)}this.savingWidget=!1,e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},handleChangeValues:function(){this.savingWidget||this.loadForm()},saveHandler:function(){this.builder.addHistoryEntry("widget_edited"),this.closeDialog()},deleteHandler:function(){return this.widgetView.visualDestroyModel(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.widgetView.duplicateHandler(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{"../view/widgets/js-widget":33}],10:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({builder:null,widgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widgets-widget").html())),filter:{},dialogClass:"so-panels-dialog-add-widget",dialogIcon:"add-widget",events:{"click .so-close":"closeDialog","click .widget-type":"widgetClickHandler","keyup .so-sidebar-search":"searchHandler","keyup .widget-type-wrapper":"searchHandler","keyup .widget-type-wrapper":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initializeDialog:function(){this.on("open_dialog",(function(){this.filter.search="",this.filterWidgets(this.filter)}),this),this.on("open_dialog_complete",(function(){this.$(".so-sidebar-search").val("").trigger("focus"),this.balanceWidgetHeights()})),this.on("tab_click",this.tabClickHandler,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widgets").html(),{})),_.each(panelsOptions.widgets,(function(e){var t=l(this.widgetTemplate({title:e.title,description:e.description}));_.isUndefined(e.icon)&&(e.icon="dashicons dashicons-admin-generic"),l('<span class="widget-icon"></span>').addClass(e.icon).prependTo(t.find(".widget-type-wrapper")),t.data("class",e.class).appendTo(this.$(".widget-type-list"))}),this);var e=this.$(".so-sidebar-tabs");_.each(panelsOptions.widget_dialog_tabs,(function(t,i){l(this.dialogTabTemplate({title:t.title,tab:i})).data({message:t.message,filter:t.filter}).appendTo(e)}),this),this.initTabs();var t=this;l(window).on("resize",(function(){t.balanceWidgetHeights()}))},tabClickHandler:function(e){this.filter=e.parent().data("filter"),this.filter.search=this.$(".so-sidebar-search").val();var t=e.parent().data("message");return _.isEmpty(t)&&(t=""),this.$(".so-toolbar .so-status").html(t),this.filterWidgets(this.filter),!1},searchHandler:function(e){if(13===e.which){var t=this.$(".widget-type-list .widget-type:visible");1===t.length&&t.trigger("click")}else this.filter.search=l(e.target).val().trim(),this.filterWidgets(this.filter)},filterWidgets:function(e){_.isUndefined(e)&&(e={}),_.isUndefined(e.groups)&&(e.groups=""),this.$(".widget-type-list .widget-type").each((function(){var t,i=l(this),s=i.data("class"),o=_.isUndefined(panelsOptions.widgets[s])?null:panelsOptions.widgets[s];(t=!!_.isEmpty(e.groups)||null!==o&&!_.isEmpty(_.intersection(e.groups,panelsOptions.widgets[s].groups)))&&(_.isUndefined(e.search)||""===e.search||-1===o.title.toLowerCase().indexOf(e.search.toLowerCase())&&(t=!1)),t?i.show():i.hide()})),this.balanceWidgetHeights()},widgetClickHandler:function(e){this.builder.trigger("before_user_adds_widget"),this.builder.addHistoryEntry("widget_added");var t=l(e.currentTarget),i=new s.model.widget({class:t.data("class")});i.cell=this.builder.getActiveCell(),i.cell.get("widgets").add(i),this.closeDialog(),this.builder.model.refreshPanelsData(),this.builder.trigger("after_user_adds_widget",i)},balanceWidgetHeights:function(e){var t=[[]],i=null,s=Math.round(this.$(".widget-type").parent().width()/this.$(".widget-type").width());this.$(".widget-type").css("clear","none").filter(":visible").each((function(e,t){e%s==0&&0!==e&&l(t).css("clear","both")})),this.$(".widget-type-wrapper").css("height","auto").filter(":visible").each((function(e,s){var o=l(s);null!==i&&i.position().top!==o.position().top&&(t[t.length]=[]),i=o,t[t.length-1].push(o)})),_.each(t,(function(e,t){var i=_.max(e.map((function(e){return e.height()})));_.each(e,(function(e){e.height(i)}))}))}})},{}],11:[function(e,t,i){var s=jQuery;t.exports={triggerClickOnEnter:function(e){13==e.which&&s(e.target).trigger("click")}}},{}],12:[function(e,t,i){t.exports={canCopyPaste:function(){return"undefined"!=typeof Storage&&panelsOptions.user},setModel:function(e){if(!this.canCopyPaste())return!1;var t=panels.helpers.serialize.serialize(e);return e instanceof panels.model.row?t.thingType="row-model":e instanceof panels.model.widget&&(t.thingType="widget-model"),localStorage["panels_clipboard_"+panelsOptions.user]=JSON.stringify(t),!0},isModel:function(e){if(!this.canCopyPaste())return!1;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&((t=JSON.parse(t)).thingType&&t.thingType===e)},getModel:function(e){if(!this.canCopyPaste())return null;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t)).thingType&&t.thingType===e?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],13:[function(e,t,i){t.exports={isBlockEditor:function(){return void 0!==wp.blocks},isClassicEditor:function(e){return e.attachedToEditor&&e.$el.is(":visible")}}},{}],14:[function(e,t,i){t.exports={lock:function(){if("hidden"!==jQuery("body").css("overflow")){var e=[self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];jQuery("body").data({"scroll-position":e}).css("overflow","hidden"),_.isUndefined(e)||window.scrollTo(e[0],e[1])}},unlock:function(){if("hidden"===jQuery("body").css("overflow")&&!jQuery(".so-panels-dialog-wrapper").is(":visible")&&!jQuery(".so-panels-live-editor").is(":visible")){jQuery("body").css("overflow","visible");var e=jQuery("body").data("scroll-position");_.isUndefined(e)||window.scrollTo(e[0],e[1])}}}},{}],15:[function(e,t,i){t.exports={serialize:function(e){var t;if(e instanceof Backbone.Model){var i={};for(var s in e.attributes)if(e.attributes.hasOwnProperty(s)){if("builder"===s||"collection"===s)continue;(t=e.attributes[s])instanceof Backbone.Model||t instanceof Backbone.Collection?i[s]=this.serialize(t):i[s]=t}return i}if(e instanceof Backbone.Collection){for(var l=[],o=0;o<e.models.length;o++)(t=e.models[o])instanceof Backbone.Model||t instanceof Backbone.Collection?l.push(this.serialize(t)):l.push(t);return l}},unserialize:function(e,t,i){var s;switch(t){case"row-model":(s=new panels.model.row).builder=i;var l={style:e.style};e.hasOwnProperty("label")&&(l.label=e.label),e.hasOwnProperty("color_label")&&(l.color_label=e.color_label),s.set(l),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":(s=new panels.model.cell).row=i,s.set("weight",e.weight),s.set("style",e.style),s.set("widgets",this.unserialize(e.widgets,"widget-collection",s));break;case"widget-model":for(var o in(s=new panels.model.widget).cell=i,e)e.hasOwnProperty(o)&&s.set(o,e[o]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var n=0;n<e.length;n++)s.push(this.unserialize(e[n],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(n=0;n<e.length;n++)s.push(this.unserialize(e[n],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],16:[function(e,t,i){t.exports={generateUUID:function(){var e=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}))},processTemplate:function(e){return _.isUndefined(e)||_.isNull(e)?"":e=(e=(e=e.replace(/{{%/g,"<%")).replace(/%}}/g,"%>")).trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],17:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=function(e,t){return this.each((function(){var i=jQuery(this);if(!i.data("soPanelsBuilderWidgetInitialized")||t){var o=i.closest("form").find(".widget-id").val(),n=l.extend(!0,{builderSupports:i.data("builder-supports")},e);if(_.isUndefined(o)||!(o.indexOf("__i__")>-1)){var r=new s.model.builder,a=new s.view.builder({model:r,config:n}),d=i.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(d)||(d.on("close_dialog",(function(){r.refreshPanelsData()})),d.on("open_dialog_complete",(function(){a.trigger("builder_resize")})),d.model.on("destroy",(function(){r.emptyRows().destroy()})),a.setDialogParents(panelsOptions.loc.layout_widget,d));var c=Boolean(i.closest(".widget-content").length);a.render().attach({container:i,dialog:c||"dialog"===i.data("mode"),type:i.data("type")}).setDataField(i.find("input.panels-data")),c||"dialog"===i.data("mode")?(a.setDialogParents(panelsOptions.loc.layout_widget,a.dialog),i.find(".siteorigin-panels-display-builder").on("click",(function(e){e.preventDefault(),a.dialog.openDialog()}))):i.find(".siteorigin-panels-display-builder").parent().remove(),l(document).trigger("panels_setup",a),i.data("soPanelsBuilderWidgetInitialized",!0)}}}))}},{}],18:[function(e,t,i){
2
  /**
3
  * Everything we need for SiteOrigin Page Builder.
4
  *
5
  * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
6
  * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
7
  */
8
- var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.editor=e("./helpers/editor"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.helpers.accessibility=e("./helpers/accessibility"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery((function(e){var t,i,s,l,o=e("#siteorigin-panels-metabox");if(s=e("form#post"),o.length&&s.length)t=o,i=o.find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var n=e(".siteorigin-panels-builder-form");t=n.find(".siteorigin-panels-builder-container"),i=n.find('input[name="panels_data"]'),s=n,l={editorType:"standalone",postId:n.data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:n.data("preview-url")}}if(!_.isUndefined(t)){var r=window.siteoriginPanels,a=new r.model.builder,d=new r.view.builder({model:a,config:l});e(document).trigger("before_panels_setup",d),d.render().attach({container:t}).setDataField(i).attachToEditor(),s.on("submit",(function(){a.refreshPanelsData()})),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",d,window.panels),window.soPanelsBuilderView=d}e(document).on("widget-added",(function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e("body").hasClass("wp-customizer")||e((function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e(window).on("keyup",(function(t){27===t.which&&e(".so-panels-dialog-wrapper, .so-panels-live-editor").filter(":visible").last().find(".so-title-bar .so-close, .live-editor-close").trigger("click")}))})),void 0!==window.wp.autosave&&jQuery("#siteorigin-panels-metabox").length&&jQuery(document).on("ready",(function(e){var t=void 0!==window.autosaveL10n&&window.autosaveL10n.blog_id;if(("object"==typeof window.sessionStorage||t)&&(stored_obj=window.sessionStorage.getItem("wp-autosave-"+t),stored_obj)){stored_obj=JSON.parse(stored_obj);var i=stored_obj["post_"+jQuery("#post_ID").val()];"object"==typeof i&&jQuery("#content").val(i.content)}}))},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/accessibility":11,"./helpers/clipboard":12,"./helpers/editor":13,"./helpers/page-scroll":14,"./helpers/serialize":15,"./helpers/utils":16,"./jquery/setup-builder-widget":17,"./model/builder":19,"./model/cell":20,"./model/history-entry":21,"./model/row":22,"./model/widget":23,"./utils/menu":24,"./view/builder":25,"./view/cell":26,"./view/dialog":27,"./view/live-editor":28,"./view/row":29,"./view/styles":30,"./view/widget":31}],19:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i,s=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<e.grid_cells.length;l++)i=parseInt(e.grid_cells[l].grid),_.isUndefined(s[i])&&(s[i]=[]),s[i].push(e.grid_cells[l]);var o=this;if(_.each(s,(function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].ratio)||(s.ratio=e.grids[i].ratio),_.isUndefined(e.grids[i].ratio_direction)||(s.ratio_direction=e.grids[i].ratio_direction),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})})),_.isUndefined(e.widgets))return;_.each(e.widgets,(function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),s.cell=i,i.get("widgets").add(s,{noAnimate:!0})})),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var r=t.widgets[i];r.panels_info.grid=parseInt(r.panels_info.grid)+s,r.panels_info.id=parseInt(r.panels_info.id)+l,o.widgets.push(r)}return o},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each((function(i,s){i.get("cells").each((function(i,l){i.get("widgets").each((function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var r=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(r)})),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})})),e.grids.push({cells:i.get("cells").length,style:i.get("style"),ratio:i.get("ratio"),ratio_direction:i.get("ratio_direction"),color_label:i.get("color_label"),label:i.get("label")})})),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i,s=this,l=jQuery('<div id="wrapper">'+e+"</div>");if(l.find(".panel-layout .panel-grid").length){var o={grids:[],grid_cells:[],widgets:[]},n=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),r=(i=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),i.innerHTML=e,e=i.textContent,i.textContent=""),e}),a=function(e){var t=e.find("div");if(!t.length)return e.html();for(var i=0;i<t.length-1&&t.eq(i).text().trim()==t.eq(i+1).text().trim();i++);var s=t.eq(i).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:t.eq(i).html()}},d=l.find(".panel-layout").eq(0),c=function(e,t){return jQuery(t).closest(".panel-layout").is(d)};return l.find("> .panel-layout > .panel-grid").filter(c).each((function(e,i){var l=jQuery(i),d=l.find(".panel-grid-cell").filter(c);o.grids.push({cells:d.length,style:l.data("style"),ratio:l.data("ratio"),ratio_direction:l.data("ratio-direction"),color_label:l.data("color-label"),label:l.data("label")}),d.each((function(i,l){var d=jQuery(l),h=d.find(".so-panel").filter(c);o.grid_cells.push({grid:e,weight:_.isUndefined(d.data("weight"))?1:parseFloat(d.data("weight")),style:d.data("style")}),h.each((function(l,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:i,style:c.data("style"),raw:!1,label:c.data("label")};h=h.trim();var p=n.exec(h);if(!_.isNull(p)&&""===h.replace(n,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(r(f.val())).instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,w.panels_info=u,o.widgets.push(w)}catch(e){u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}return-1!==h.indexOf("panel-layout")&&jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length?(u.class="SiteOrigin_Panels_Widgets_Layout",o.widgets.push({panels_data:s.getPanelsDataFromHtml(h,t),panels_info:u}),!0):(u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0)}))}))})),l.find(".panel-layout").remove(),l.find("style[data-panels-style-for-post]").remove(),l.html().replace(/^\s+|\s+$/gm,"").length&&(o.grids.push({cells:1,style:{}}),o.grid_cells.push({grid:o.grids.length-1,weight:1}),o.widgets.push({filter:"1",text:l.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:o.grids.length-1,cell:0}})),o}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each((function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})})),i}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],22:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each((function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),r=s.get("widgets").models.slice(),a=0;a<r.length;a++)r[a].moveToCell(n,{silent:!1});i.push(s)}})),_.each(i,(function(e){t.remove(e)})),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each((function(t){e+=t.get("weight")})),t.each((function(t){t.set("weight",t.get("weight")/e)})),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each((function(e){i.add(e.clone(t),{silent:!0})})),t.set("cells",i),t}})},{}],23:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,(function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])})),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},isValidTitle:function(e){return!_.isUndefined(e)&&_.isString(e)&&""!==e&&"on"!==e&&"true"!==e&&"false"!==e&&"_"!==e[0]&&!_.isFinite(e)},cleanTitle:function(e){var t=(e=e.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(t=t.slice(0,20)).join(" ")},getTitleFromValues:function(e,t){var i=!1;for(const s in e)if("object"==typeof e[s]){if(i=t.getTitleFromValues(e[s],t))break}else if("_"!==s.charAt(0)&&"so_sidebar_emulator_id"!==s&&"option_name"!==s&&t.isValidTitle(e[s])){i=t.cleanTitle(e[s]);break}return i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")],t=[],i=!1;if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(_.isUndefined(e.panels_title))t=["title","text"];else{if(!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;t.push(e.panels_title),i=!0}var s=this.get("values"),l=this,o=!1;return _.each(t,(function(e){if(l.isValidTitle(s[e]))return o=l.cleanTitle(s[e]),!1})),o||i||(o=this.getTitleFromValues(s,l)),o||this.getWidgetField("description")}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",(function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))}))},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").trigger("focus")},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").on("click",(function(){var e=l(this);s(e.data("key")),o.closeMenu()})),n.find(".so-item.so-confirm").on("click",(function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout((function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))}),2500)})),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var r=o.index(n);38===e.which?n=r-1<0?o.last():o.eq(r-1):40===e.which&&(n=r+1>=o.length?o.first():o.eq(r+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var a=0;a<s.defaultDisplay.length;a++)i.find('.so-item[data-key="'+s.defaultDisplay[a]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each((function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()}));i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",contentPreview:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor","keyup .so-tool-button":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",(function(){this.displayLiveEditor()})),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},$panelsMetabox=l("#siteorigin-panels-metabox"),$panelsMetabox.length&&(this.contentPreview=l.parseHTML($panelsMetabox.data("preview-markup"))),_.each(this.dialogs,(function(e,i,s){s[i].setBuilder(t)})),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),l(window).on("resize",(function(e){e.target===window&&t.trigger("builder_resize")})),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("builder_attached_to_editor",this.handleContentChange,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",(function(){this.displayAttachedBuilder({confirm:!1})}),this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),l=panelsOptions.loc.welcomeMessage,o=[];this.supports("addWidget")?o.push(l.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?o.push(l.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?o.push(l.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var n="";3===o.length?n=l.threeEnabled:2===o.length?n=l.twoEnabled:1===o.length?n=l.oneEnabled:0===o.length&&(n=l.addingDisabled);var r=_.template(s.helpers.utils.processTemplate(n))({items:o})+" "+l.docsMessage;return i.find(".so-message-wrapper").html(r),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").on("click",(function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")})).end().append(l('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find("h2.hndle").html()+"</button>").on("click",(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()}))),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").on("click keyup",(function(i){i.preventDefault(),"keyup"==i.type&&13!=i.which||confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).trigger("resize"),t.attachedVisible=!1,t.trigger("hide_builder"))})).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight()+"px");var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s=0,o=t.$el.outerHeight()-e.outerHeight()+20;i>s&&i<o?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left+"px",width:t.$el.outerWidth()+"px",position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20)+"px",left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight()+"px")};return this.on("builder_resize",s,this),l(document).on("scroll",s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),l("#editor-expand-toggle").on("change.editor-expand",(function(){l(this).prop("checked")||l("#wp-content-wrap").hide()})),this.metabox.show().find("> .inside").show(),l(window).trigger("resize"),l(document).trigger("scroll"),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this,t=e.$el.attr("id");return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+t+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(t,i){e.model.get("rows").remove(l(i.item).data("view").model,{silent:!0}),e.model.refreshPanelsData()},receive:function(t,i){e.model.get("rows").add(l(i.item).data("view").model,{silent:!0,at:l(i.item).index()}),e.model.refreshPanelsData()},stop:function(t,i){var s=l(i.item),o=s.data("view"),n=e.model.get("rows");n.get(o.model)&&(e.addHistoryEntry("row_moved"),n.remove(o.model,{silent:!0}),n.add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resizeRow(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells(panelsOptions.default_columns);t.each((function(t){t.row=e})),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.liveEditorPreview)?this:(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.liveEditorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added"),this)},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.liveEditorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&(s.helpers.editor.isBlockEditor()||s.helpers.editor.isClassicEditor(this))){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){this.contentPreview&&""!==e.post_content&&this.updateEditorContent(e.post_content),""!==e.preview&&(this.contentPreview=e.preview)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerSeoChange()},triggerSeoChange:function(){"undefined"==typeof YoastSEO||_.isNull(YoastSEO)||_.isNull(YoastSEO.app.refresh)||YoastSEO.app.refresh(),"undefined"==typeof rankMathEditor||_.isNull(rankMathEditor)||_.isNull(rankMathEditor.refresh)||rankMathEditor.refresh("content")},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).off("scroll",e.handler),l(window).on("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,(function(i,s,l){l[s].setParent(e,t)})),this.on("add_dialog",(function(i){i.setParent(e,t)}),this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){if(l.contains(this.$el.get(0),e.target)){var i=l([]).add(this.$(".so-panels-welcome-message:visible")).add(this.$(".so-rows-container > .so-row-container")).add(this.$(".so-cells > .cell")).add(this.$(".cell-wrapper > .so-widget")).filter((function(i){return t.isOverEl(l(this),e)})),s=i.last().data("view");void 0!==s&&void 0!==s.buildContextualMenu?s.buildContextualMenu(e,t):i.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each((function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))})),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder,i=t.$el.attr("id"),s=t.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+i+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},remove:function(t,i){e.model.get("widgets").remove(l(i.item).data("view").model,{silent:!0}),s.refreshPanelsData()},receive:function(t,i){var o=l(i.item).data("view");o.cell=e;var n=o.model;n.cell=e.model,e.model.get("widgets").add(n,{silent:!0,at:l(i.item).index()}),s.refreshPanelsData()},stop:function(t,i){var o=l(i.item),n=o.data("view"),r=o.closest(".cell").data("view");e.model.get("widgets").get(n.model)&&(e.row.builder.addHistoryEntry("widget_moved"),n.model.moveToCell(r.model,{},o.index()),n.cell=r,s.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth()+"px","z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth()+"px",right:5,height:e.$el.outerHeight()+"px"});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*r+"px").find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",n*a+"px").find(".preview-cell-weight").html(Math.round(1e3*a)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;r>.02&&a>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",r),e.model.set("weight",a),s.row.resizeRow()),o.helper.css("left",-t.outerWidth()/2+"px"),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resizeRow(),this.row.builder.trigger("widget_added",l)},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,(function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)}));var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-previous":"navToPrevious","keyup .so-nav.so-previous":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-next":"navToNext","keyup .so-nav.so-next":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');t.on("click",function(e){e.preventDefault(),this.closeDialog(),this.parentDialog.dialog.openDialog()}.bind(this)),this.$(".so-title-bar .so-title").before(t)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(l(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.on("click",(function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)})),this.$(".so-sidebar-tabs li a").first().trigger("click"),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").on("click keyup",function(e){e.preventDefault(),"keyup"==e.type&&13!=e.which||this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").on("click",function(e){e.preventDefault();var t=l(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),l("html").on("click",function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each((function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")}))}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.on("keypress",(function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).trigger("focus"),window.getSelection().removeAllRanges()}return!i})).on("blur",function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)).on("focus",(function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)}))},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e?(t.addClass("so-disabled"),t.attr("tabindex",-1)):t.attr("tabindex",0),null===i?s.hide():!1===i?(s.addClass("so-disabled"),s.attr("tabindex",-1)):s.attr("tabindex",0)},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),l(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each((function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("][")).unshift(i[1]),t=t.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var o=s,n=null,r=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===r)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===r){if(!e.is(":checked"))return;n=e.val()}else if("SELECT"===e.prop("tagName")){var a=e.find("option:selected");1===a.length?n=e.find("option:selected").val():a.length>1&&(n=_.map(e.find("option:selected"),(function(e,t){return l(e).val()})))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(null!==n)for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?o.push(n):o[t[d]]=n:(_.isUndefined(o[t[d]])&&(""===t[d+1]?o[t[d]]=[]:o[t[d]]={}),o=o[t[d]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}})),s},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var e=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(t){var i=this.$(".so-"+t+"-sidebar"),s=this.$(".so-show-"+t+"-sidebar");this.hasSidebar(t)?(s.hide(),e.matches?(s.show(),s.closest(".so-title-bar").addClass("so-has-"+t+"-button"),i.hide(),i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+t+"-sidebar")):(s.hide(),s.closest(".so-title-bar").removeClass("so-has-"+t+"-button"),i.show(),i.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+t+"-sidebar"))):(i.hide(),s.hide())}.bind(this))},hasSidebar:function(e){return this.$(".so-"+e+"-sidebar").children().length>0},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],28:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-save":"closeAndSave","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle","keyup .live-editor-mode":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){if(this.setElement(this.template()),this.$el.hide(),l("#submitdiv #save-post").length>0){var e=this.$el.find(".live-editor-save");e.text(e.data("save"))}var t=!1;l(document).on("mousedown",(function(){t=!0})).on("mouseup",(function(){t=!1}));var i=this;return this.$el.on("mouseenter focusin",".so-widget",(function(){var e=l(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))})),this.$el.on("mouseleave focusout",".so-widget",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",(function(){this.resetHighlights()})),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),l(".live-editor-close").trigger("focus"),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",(function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())})),wp.autosave.server.triggerSave())}},close:function(){if(!this.$el.is(":visible"))return this;this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),this.builder.trigger("builder_resize")},closeAndSave:function(){this.close(),l('#submitdiv input[type="submit"][name="save"]').trigger("click")},collapse:function(){this.$el.toggleClass("so-collapsed")},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return 0===l(this).parents(".so-panel").length})).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout((function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")}),100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,(function(e,t){return e+t}),0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="'+t+'"></iframe>').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post"></form>').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,(function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)})),o.trigger("submit").remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",(function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),l(".live-editor-mode.so-active").length&&(l(".so-panels-live-editor .so-preview iframe").css("transition","none"),t.mobileToggle()),setTimeout((function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide(),l(".so-panels-live-editor .so-preview iframe").css("transition","all .2s ease")}),100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return l(this).closest(".panel-layout").is(s)})).each((function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).on("mouseenter",(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)})).on("mouseleave",(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()})).on("click",(function(e){e.preventDefault(),o.find(".title h4").trigger("click")}))})),i.find("a").css({"pointer-events":"none"}).on("click",(function(e){e.preventDefault()}))}})).on("load",(function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")}))},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(void 0!==e?e.currentTarget:".live-editor-mode.so-active");this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode").find("iframe").css("width",t.data("width"))}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resizeRow),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each((function(e){t.listenTo(e.get("widgets"),"add",t.resize)})),e.on("add",(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),this),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each((function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))})),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),this.$(".so-row-toolbar").html().trim().length||this.$(".so-row-toolbar").remove(),this.listenTo(this.builder,"widget_sortable_move",this.resizeRow),this.listenTo(this.builder,"builder_resize",this.resizeRow),this.resizeRow(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resizeRow:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0),this.$(".so-cells").removeClass("so-action-icons");var t,i=0,s=0,o=!1;this.$(".so-cells .cell").each((function(){t=l(this),l(this).css("width",100*t.data("view").model.get("weight")+"%"),(s=t.width())<215?(t.addClass("so-show-icon"),o=!0,s<125?t.addClass("so-small-actions"):t.removeClass("so-small-actions")):t.removeClass("so-show-icon so-small-actions"),i=Math.max(i,t.height())})),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(i,63)+"px"),o&&this.$(".so-cells").addClass("so-action-icons"),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight()+"px")}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",(function(){e.model.destroy(),e.builder.model.refreshPanelsData()}))},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout((function(){t.removeClass("so-confirmed").html(i)}),2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each((function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()}))},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each((function(e){e.row=o})),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],30:[function(e,t,i){window.panels;var s=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,events:{"keyup .so-image-selector":function(e){13==e.which&&this.$el.find(".select-image").trigger("click")}},initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var l={builderType:i.builderType};return"widget"===e&&(l.widget=this.model.get("class")),"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each((function(){var e=s(this);e.find(".style-section-head").on("click keypress",(function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")}))})),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,(function(e){return e}))),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each((function(){var e=null,t=s(this);t.find(".so-image-selector").on("click",(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",(function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find(".so-image-selector > input").val(i.id),t.find(".remove-image").removeClass("hidden")})),s(this).next().focus(),e.open()})),t.find(".remove-image").on("click",(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find(".so-image-selector > input").val(""),t.find(".remove-image").addClass("hidden")}))})),this.$(".style-field-measurement").each((function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.on("focus",(function(){s(this).trigger("select")}));!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),r=[];for(var a in n){var d=o.exec(n[a]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(r.push(d[1]),i.val(d[2]))}1===t.length?t.val(r.join(" ")):(1===r.length?r=[r[0],r[0],r[0],r[0]]:2===r.length?r=[r[0],r[1],r[0],r[1]]:3===r.length&&(r=[r[0],r[1],r[2],r[1]]),t.each((function(e,t){s(t).val(r[e])})))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter((function(e){return""!==e})).map((function(e){return e+i.val()})).join(" ");l.val(o)}else{var n=s(e.target),r=[],a=[],d=[];t.each((function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;r.push(i),null===i?a.push(e):d.push(e)})),3===a.length&&d[0]===t.index(n)&&(t.val(n.val()),r=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(r)===JSON.stringify([null,null,null,null])?l.val(""):l.val(r.map((function(e){return(null===e?0:e)+i.val()})).join(" "))}};t.on("change",o),i.on("change",o)}))}})},{}],31:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","touchend .widget-edit":"editHandler","click .title h4":"editHandler","touchend .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler","keyup .actions a":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle(),widget_class:this.model.attributes.class})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),this.$(".actions").html().trim().length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.getEditDialog().openDialog(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resizeRow(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],32:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.customHtmlWidgets,o=s("<div></div>"),n=t.find(".widget-content:first");n.before(o);var r=new l.CustomHtmlWidgetControl({el:o,syncContainer:n});return r.initializeEditor(),r.editor.codemirror.refresh(),r}};t.exports=l},{}],33:[function(e,t,i){var s=e("./custom-html-widget"),l=e("./media-widget"),o=e("./text-widget"),n={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,n=e.find("> .id_base").val();switch(n){case this.CUSTOM_HTML:i=s;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=l;break;case this.TEXT:i=o}i.addWidget(n,e,t)}};t.exports=n},{"./custom-html-widget":32,"./media-widget":34,"./text-widget":35}],34:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.mediaWidgets,o=l.controlConstructors[e];if(o){var n=l.modelConstructors[e]||l.MediaWidgetModel,r=t.find("> .widget-content"),a=s('<div class="media-widget-control"></div>');r.before(a);var d={};r.find(".media-widget-instance-property").each((function(){var e=s(this);d[e.data("property")]=e.val()})),d.widget_id=i;var c=new o({el:a,syncContainer:r,model:new n(d)});return c.render(),c}}};t.exports=l},{}],35:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.textWidgets,o={},n=t.find(".visual");if(n.length>0){if(!n.val())return null;var r=s("<div></div>"),a=t.find(".widget-content:first");a.before(r),o={el:r,syncContainer:a}}else o={el:t};var d=new l.TextWidgetControl(o),c=wp.oldEditor?wp.oldEditor:wp.editor;return c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize),d.initializeEditor(),d}};t.exports=l},{}]},{},[18]);
1
+ !function e(t,i,s){function l(n,r){if(!i[n]){if(!t[n]){var a="function"==typeof require&&require;if(!r&&a)return a(n,!0);if(o)return o(n,!0);var d=new Error("Cannot find module '"+n+"'");throw d.code="MODULE_NOT_FOUND",d}var c=i[n]={exports:{}};t[n][0].call(c.exports,(function(e){return l(t[n][1][e]||e)}),c,c.exports,e,t,i,s)}return i[n].exports}for(var o="function"==typeof require&&require,n=0;n<s.length;n++)l(s[n]);return l}({1:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.cell,initialize:function(){},totalWeight:function(){var e=0;return this.each((function(t){e+=t.get("weight")})),e}})},{}],2:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.historyEntry,builder:null,maxSize:12,initialize:function(){this.on("add",this.onAddEntry,this)},addEntry:function(e,t){_.isEmpty(t)&&(t=this.builder.getPanelsData());var i=new s.model.historyEntry({text:e,data:JSON.stringify(t),time:parseInt((new Date).getTime()/1e3),collection:this});this.add(i)},onAddEntry:function(e){if(this.models.length>1){var t=this.at(this.models.length-2);(e.get("text")===t.get("text")&&e.get("time")-t.get("time")<15||e.get("data")===t.get("data"))&&(this.remove(e),t.set("count",t.get("count")+1))}for(;this.models.length>this.maxSize;)this.shift()}})},{}],3:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.row,empty:function(){for(var e;;){if(!(e=this.collection.first()))break;e.destroy()}}})},{}],4:[function(e,t,i){var s=window.panels;t.exports=Backbone.Collection.extend({model:s.model.widget,initialize:function(){}})},{}],5:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({dialogClass:"so-panels-dialog-add-builder",render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-builder").html(),{})),this.$(".so-content .siteorigin-panels-builder").append(this.builder.$el)},initializeDialog:function(){var e=this;this.once("open_dialog_complete",(function(){e.builder.initSortable()})),this.on("open_dialog_complete",(function(){e.builder.trigger("builder_resize")}))}})},{}],6:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({historyEntryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-history-entry").html())),entries:{},currentEntry:null,revertEntry:null,selectedEntry:null,previewScrollTop:null,dialogClass:"so-panels-dialog-history",dialogIcon:"history",events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-restore":"restoreSelectedEntry","keyup .history-entry":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this),this.on("open_dialog_complete",(function(){this.$(".history-entry").trigger("focus")}))},render:function(){var e=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("form.history-form").attr("action",this.builder.config.editorPreview),this.$("iframe.siteorigin-panels-history-iframe").on("load",(function(){var t=l(this);t.show(),t.contents().scrollTop(e.previewScrollTop)}))},setRevertEntry:function(e){this.revertEntry=new s.model.historyEntry({data:JSON.stringify(e.getPanelsData()),time:parseInt((new Date).getTime()/1e3)})},setCurrentEntry:function(){this.currentEntry=new s.model.historyEntry({data:JSON.stringify(this.builder.model.getPanelsData()),time:parseInt((new Date).getTime()/1e3)}),this.selectedEntry=this.currentEntry,this.previewEntry(this.currentEntry),this.$(".so-buttons .so-restore").addClass("disabled")},renderHistoryEntries:function(){var e=this,t=this.$(".history-entries").empty();this.currentEntry.get("data")===this.revertEntry.get("data")&&_.isEmpty(this.entries.models)||l(this.historyEntryTemplate({title:panelsOptions.loc.history.revert,count:1})).data("historyEntry",this.revertEntry).prependTo(t),this.entries.each((function(i){var s=e.historyEntryTemplate({title:panelsOptions.loc.history[i.get("text")],count:i.get("count")});l(s).data("historyEntry",i).prependTo(t)})),l(this.historyEntryTemplate({title:panelsOptions.loc.history.current,count:1})).data("historyEntry",this.currentEntry).addClass("so-selected").prependTo(t),t.find(".history-entry").on("click",(function(i){if("keyup"!=i.type||13==i.which){var s=jQuery(this);t.find(".history-entry").not(s).removeClass("so-selected"),s.addClass("so-selected");var l=s.data("historyEntry");e.selectedEntry=l,e.selectedEntry.cid!==e.currentEntry.cid?e.$(".so-buttons .so-restore").removeClass("disabled"):e.$(".so-buttons .so-restore").addClass("disabled"),e.previewEntry(l)}})),this.updateEntryTimes()},previewEntry:function(e){var t=this.$("iframe.siteorigin-panels-history-iframe");t.hide(),this.previewScrollTop=t.contents().scrollTop(),this.$('form.history-form input[name="live_editor_panels_data"]').val(e.get("data")),this.$('form.history-form input[name="live_editor_post_ID"]').val(this.builder.config.postId),this.$("form.history-form").trigger("submit")},restoreSelectedEntry:function(){return!this.$(".so-buttons .so-restore").hasClass("disabled")&&(this.currentEntry.get("data")===this.selectedEntry.get("data")?(this.closeDialog(),!1):("restore"!==this.selectedEntry.get("text")&&this.builder.addHistoryEntry("restore",this.builder.model.getPanelsData()),this.builder.model.loadPanelsData(JSON.parse(this.selectedEntry.get("data"))),this.closeDialog(),!1))},updateEntryTimes:function(){var e=this;this.$(".history-entries .history-entry").each((function(){var t=jQuery(this),i=t.find(".timesince"),s=t.data("historyEntry");i.html(e.timeSince(s.get("time")))}))},timeSince:function(e){var t,i=parseInt((new Date).getTime()/1e3)-e,s=[];return i>3600&&(1===(t=Math.floor(i/3600))?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),i>60&&(1===(t=Math.floor(i/60))?s.push(panelsOptions.loc.time.minute.replace("%d",t)):s.push(panelsOptions.loc.time.minutes.replace("%d",t)),i-=60*t),i>0&&(1===i?s.push(panelsOptions.loc.time.second.replace("%d",i)):s.push(panelsOptions.loc.time.seconds.replace("%d",i))),_.isEmpty(s)?panelsOptions.loc.time.now:panelsOptions.loc.time.ago.replace("%s",s.slice(0,2).join(", "))}})},{}],7:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({directoryTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-directory-items").html())),builder:null,dialogClass:"so-panels-dialog-prebuilt-layouts",dialogIcon:"layouts",layoutCache:{},currentTab:!1,directoryPage:1,events:{"click .so-close":"closeDialog","click .so-sidebar-tabs li a":"tabClickHandler","click .so-content .layout":"layoutClickHandler","keyup .so-sidebar-search":"searchHandler","click .so-screenshot, .so-title":"directoryItemClickHandler","keyup .so-directory-item":"clickTitleOnEnter"},clickTitleOnEnter:function(e){13==e.which&&l(e.target).find(".so-title").trigger("click")},initializeDialog:function(){var e=this;this.on("open_dialog",(function(){e.$(".so-sidebar-tabs li a").first().trigger("click"),e.$(".so-status").removeClass("so-panels-loading")})),this.on("open_dialog_complete",(function(){this.$(".so-sidebar-search").val("").trigger("focus")}))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-prebuilt").html(),{})),this.on("button_click",this.toolbarButtonClick,this),this.initToolbar()},tabClickHandler:function(e){e.preventDefault(),this.selectedLayoutItem=null,this.uploadedLayout=null,this.updateButtonState(!1),this.$(".so-sidebar-tabs li").removeClass("tab-active");var t=l(e.target),i=t.attr("href").split("#")[1];t.parent().addClass("tab-active");this.$(".so-content").empty(),this.currentTab=i,"import"==i?this.displayImportExport():this.displayLayoutDirectory("",1,i),this.$(".so-sidebar-search").val("")},displayImportExport:function(){var e=this.$(".so-content").empty().removeClass("so-panels-loading");e.html(l("#siteorigin-panels-dialog-prebuilt-importexport").html());var t=this,i=t.$(".import-upload-ui"),s=new plupload.Uploader({runtimes:"html5,silverlight,flash,html4",browse_button:i.find(".file-browse-button").get(0),container:i.get(0),drop_element:i.find(".drag-upload-area").get(0),file_data_name:"panels_import_data",multiple_queues:!1,max_file_size:panelsOptions.plupload.max_file_size,url:panelsOptions.plupload.url,flash_swf_url:panelsOptions.plupload.flash_swf_url,silverlight_xap_url:panelsOptions.plupload.silverlight_xap_url,filters:[{title:panelsOptions.plupload.filter_title,extensions:"json"}],multipart_params:{action:"so_panels_import_layout"},init:{PostInit:function(e){e.features.dragdrop&&i.addClass("has-drag-drop"),i.find(".progress-precent").css("width","0%")},FilesAdded:function(e){i.find(".file-browse-button").trigger("blur"),i.find(".drag-upload-area").removeClass("file-dragover"),i.find(".progress-bar").fadeIn("fast"),t.$(".js-so-selected-file").text(panelsOptions.loc.prebuilt_loading),e.start()},UploadProgress:function(e,t){i.find(".progress-precent").css("width",t.percent+"%")},FileUploaded:function(e,s,l){var o=JSON.parse(l.response);_.isUndefined(o.widgets)?alert(panelsOptions.plupload.error_message):(t.uploadedLayout=o,i.find(".progress-bar").hide(),t.$(".js-so-selected-file").text(panelsOptions.loc.ready_to_insert.replace("%s",s.name)),t.updateButtonState(!0))},Error:function(){alert(panelsOptions.plupload.error_message)}}});s.init(),/Edge\/\d./i.test(navigator.userAgent)&&setTimeout((function(){s.refresh()}),250),i.find(".drag-upload-area").on("dragover",(function(){l(this).addClass("file-dragover")})).on("dragleave",(function(){l(this).removeClass("file-dragover")})),e.find(".so-export").on("submit",(function(e){var i=l(this),s=t.builder.model.getPanelsData(),o=l('input[name="post_title"], .editor-post-title__input').val();if(o){if(l(".block-editor-page").length){var n=t.getCurrentBlockPosition();n>=0&&(o+="-"+n)}}else o=l('input[name="post_ID"]').val();s.name=o,i.find('input[name="panels_export_data"]').val(JSON.stringify(s))}))},getCurrentBlockPosition:function(){var e=wp.data.select("core/block-editor").getSelectedBlockClientId();return wp.data.select("core/block-editor").getBlocks().findIndex((function(t){return t.clientId===e}))},displayLayoutDirectory:function(e,t,i){var s=this,o=this.$(".so-content").empty().addClass("so-panels-loading");if(void 0===e&&(e=""),void 0===t&&(t=1),void 0===i&&(i="directory-siteorigin"),i.match("^directory-")&&!panelsOptions.directory_enabled)return o.removeClass("so-panels-loading").html(l("#siteorigin-panels-directory-enable").html()),void o.find(".so-panels-enable-directory").on("click",(function(n){n.preventDefault(),l.get(panelsOptions.ajaxurl,{action:"so_panels_directory_enable"},(function(){})),panelsOptions.directory_enabled=!0,o.addClass("so-panels-loading"),s.displayLayoutDirectory(e,t,i)}));l.get(panelsOptions.ajaxurl,{action:"so_panels_layouts_query",search:e,page:t,type:i,builderType:this.builder.config.builderType},(function(n){if(s.currentTab===i){o.removeClass("so-panels-loading").html(s.directoryTemplate(n));var r=o.find(".so-previous"),a=o.find(".so-next");t<=1?r.addClass("button-disabled"):r.on("click",(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t-1,s.currentTab)})),t===n.max_num_pages||0===n.max_num_pages?a.addClass("button-disabled"):a.on("click",(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t+1,s.currentTab)})),o.find(".so-screenshot").each((function(){var e=l(this),t=e.find(".so-screenshot-wrapper");if(t.css("height",t.width()/4*3+"px").addClass("so-loading"),""!==e.data("src"))var i=l("<img/>").attr("src",e.data("src")).on("load",(function(){t.removeClass("so-loading").css("height","auto"),i.appendTo(t).hide().fadeIn("fast")}));else l("<img/>").attr("src",panelsOptions.prebuiltDefaultScreenshot).appendTo(t).hide().fadeIn("fast")})),o.find(".so-directory-browse").html(n.title)}}),"json")},directoryItemClickHandler:function(e){var t=this.$(e.target).closest(".so-directory-item");this.$(".so-directory-items").find(".selected").removeClass("selected"),t.addClass("selected"),this.selectedLayoutItem={lid:t.data("layout-id"),type:t.data("layout-type")},this.updateButtonState(!0)},toolbarButtonClick:function(e){if(!this.canAddLayout())return!1;var t=e.data("value");if(_.isUndefined(t))return!1;if(this.updateButtonState(!1),e.hasClass("so-needs-confirm")&&!e.hasClass("so-confirmed")){if(this.updateButtonState(!0),e.hasClass("so-confirming"))return;e.addClass("so-confirming");var i=e.html();return e.html('<span class="dashicons dashicons-yes"></span>'+e.data("confirm")),setTimeout((function(){e.removeClass("so-confirmed").html(i)}),2500),setTimeout((function(){e.removeClass("so-confirming"),e.addClass("so-confirmed")}),200),!1}this.addingLayout=!0,"import"===this.currentTab?this.addLayoutToBuilder(this.uploadedLayout,t):this.loadSelectedLayout().then(function(e){this.addLayoutToBuilder(e,t)}.bind(this))},canAddLayout:function(){return(this.selectedLayoutItem||this.uploadedLayout)&&!this.addingLayout},loadSelectedLayout:function(){this.setStatusMessage(panelsOptions.loc.prebuilt_loading,!0);var e=_.extend(this.selectedLayoutItem,{action:"so_panels_get_layout",builderType:this.builder.config.builderType}),t=new l.Deferred;return l.get(panelsOptions.ajaxurl,e,function(e){var i="";e.success?t.resolve(e.data):(i=e.data.message,t.reject(e.data)),this.setStatusMessage(i,!1,!e.success),this.updateButtonState(!0)}.bind(this)),t.promise()},searchHandler:function(e){13===e.keyCode&&this.displayLayoutDirectory(l(e.currentTarget).val(),1,this.currentTab)},updateButtonState:function(e){e=e&&(this.selectedLayoutItem||this.uploadedLayout);var t=this.$(".so-import-layout");t.prop("disabled",!e),e?t.removeClass("disabled"):t.addClass("disabled")},addLayoutToBuilder:function(e,t){this.builder.addHistoryEntry("prebuilt_loaded"),this.builder.model.loadPanelsData(e,t),this.addingLayout=!1,this.closeDialog()}})},{}],8:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({cellPreviewTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-row-cell-preview").html())),editableLabel:!0,events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","keyup .so-toolbar .so-delete":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-duplicate":"duplicateHandler","keyup .so-toolbar .so-duplicate":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},rowView:null,dialogIcon:"add-row",dialogClass:"so-panels-dialog-row-edit",styleType:"row",dialogType:"edit",row:{cells:null,style:{}},cellStylesCache:[],initializeDialog:function(){this.on("open_dialog",(function(){_.isUndefined(this.model)||_.isEmpty(this.model.get("cells"))?this.setRowModel(null):this.setRowModel(this.model),this.regenerateRowPreview(),this.renderStyles(),this.openSelectedCellStyles()}),this),this.on("open_dialog_complete",(function(){l(".so-panels-dialog-wrapper .so-title").trigger("focus")})),this.row={cells:new s.collection.cells(panelsOptions.default_columns),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",(function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})})),this.on("close_dialog",this.closeHandler),this.on("edit_label",function(e){if(e!==panelsOptions.loc.row.add&&e!==panelsOptions.loc.row.edit||(e=""),this.model.set("label",e),_.isEmpty(e)){var t="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.$(".so-title").text(t)}}.bind(this))},setRowDialogType:function(e){this.dialogType=e},render:function(){var e="create"===this.dialogType?panelsOptions.loc.row.add:panelsOptions.loc.row.edit;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-row").html(),{title:e,dialogType:this.dialogType}));var t=this.$(".so-title");return this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove(),_.isUndefined(this.model)||"edit"!=this.dialogType||(this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction"))),this.$("input.so-row-field").on("keyup",(function(){l(this).trigger("change")})),this},renderStyles:function(){this.styles&&(this.styles.off("styles_loaded"),this.styles.remove()),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("row",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var e=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(e),this.styles.on("styles_loaded",(function(t){t||(this.styles.remove(),0===e.children().length&&(e.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),e.hide()))}),this)},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)?this:(this.row={cells:this.model.get("cells").clone(),style:{},ratio:this.model.get("ratio"),ratio_direction:this.model.get("ratio_direction")},"edit"==this.dialogType&&(this.$('input[name="cells"].so-row-field').val(this.model.get("cells").length),this.model.has("ratio")&&this.$('select[name="ratio"].so-row-field').val(this.model.get("ratio")),this.model.has("ratio_direction")&&this.$('select[name="ratio_direction"].so-row-field').val(this.model.get("ratio_direction"))),this.clearCellStylesCache(),this)},regenerateRowPreview:function(){var e,t=this,i=this.$(".row-preview"),s=this.getSelectedCellIndex();i.empty(),this.row.cells.each((function(o,n){var r=l(this.cellPreviewTemplate({weight:o.get("weight")}));i.append(r),n==s&&r.find(".preview-cell-in").addClass("cell-selected");var a,d=r.prev();d.length&&((a=l('<div class="resize-handle"></div>')).appendTo(r).on("dblclick",(function(){var e=t.row.cells.at(n-1),i=o.get("weight")+e.get("weight");o.set("weight",i/2),e.set("weight",i/2),t.scaleRowWidths()})),a.draggable({axis:"x",containment:i,start:function(e,t){var i=r.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:r.outerWidth(),left:6,height:r.outerHeight()});i.find(".resize-handle").remove();var s=d.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:d.outerWidth(),right:6,height:d.outerHeight()});s.find(".resize-handle").remove(),l(this).data({newCellClone:i,prevCellClone:s}),r.find("> .preview-cell-in").css("visibility","hidden"),d.find("> .preview-cell-in").css("visibility","hidden")},drag:function(e,s){var o=t.row.cells.at(n).get("weight"),r=t.row.cells.at(n-1).get("weight"),a=o-(s.position.left+6)/i.width(),d=r+(s.position.left+6)/i.width();s.helper.offset().left,i.offset().left;l(this).data("newCellClone").css("width",i.width()*a+"px").find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",i.width()*d+"px").find(".preview-cell-weight").html(Math.round(1e3*d)/10)},stop:function(e,s){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove(),r.find(".preview-cell-in").css("visibility","visible"),d.find(".preview-cell-in").css("visibility","visible");var o=(s.position.left+6)/i.width(),a=t.row.cells.at(n),c=t.row.cells.at(n-1);a.get("weight")-o>.02&&c.get("weight")+o>.02&&(a.set("weight",a.get("weight")-o),c.set("weight",c.get("weight")+o)),t.scaleRowWidths(),s.helper.css("left",-6)}})),r.on("click",function(e){if(l(e.target).is(".preview-cell")||l(e.target).is(".preview-cell-in")){var t=l(e.target);t.closest(".row-preview").find(".preview-cell .preview-cell-in").removeClass("cell-selected"),t.addClass("cell-selected"),this.openSelectedCellStyles()}}.bind(this)),r.find(".preview-cell-weight").on("click",(function(s){t.$(".resize-handle").css("pointer-event","none").draggable("disable"),i.find(".preview-cell-weight").each((function(){var s=jQuery(this).hide();l('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(s.html())).insertAfter(s).on("focus",(function(){clearTimeout(e)})).on("keyup",(function(e){9!==e.keyCode&&l(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),l(this).trigger("blur"))})).on("keydown",(function(e){if(9===e.keyCode){e.preventDefault();var t=i.find(".preview-cell-weight-input"),s=t.index(l(this));s===t.length-1?t.eq(0).trigger("focus").trigger("select"):t.eq(s+1).trigger("focus").trigger("select")}})).on("blur",(function(){i.find(".preview-cell-weight-input").each((function(e,i){isNaN(parseFloat(l(i).val()))&&l(i).val(Math.floor(1e3*t.row.cells.at(e).get("weight"))/10)})),e=setTimeout((function(){if(0===i.find(".preview-cell-weight-input").length)return!1;var e=[],s=[],o=0,n=0;if(i.find(".preview-cell-weight-input").each((function(i,r){var a=parseFloat(l(r).val());a=isNaN(a)?1/t.row.cells.length:Math.round(10*a)/1e3;var d=!l(r).hasClass("no-user-interacted");e.push(a),s.push(d),d?o+=a:n+=a})),o>0&&n>0&&1-o>0)for(var r=0;r<e.length;r++)s[r]||(e[r]=e[r]/n*(1-o));var a=_.reduce(e,(function(e,t){return e+t}));e=e.map((function(e){return e/a})),Math.min.apply(Math,e)>.01&&t.row.cells.each((function(t,i){t.set("weight",e[i])})),i.find(".preview-cell").each((function(e,i){var s=t.row.cells.at(e).get("weight");l(i).animate({width:Math.round(1e3*s)/10+"%"},250),l(i).find(".preview-cell-weight-input").val(Math.round(1e3*s)/10)})),i.find(".preview-cell").css("overflow","visible"),setTimeout(t.regenerateRowPreview.bind(t),260)}),100)})).on("click",(function(){l(this).trigger("select")}))})),l(this).siblings(".preview-cell-weight-input").trigger("select")}))}),this),this.trigger("form_loaded",this)},getSelectedCellIndex:function(){var e=-1;return this.$(".preview-cell .preview-cell-in").each((function(t,i){l(i).is(".cell-selected")&&(e=t)})),e},openSelectedCellStyles:function(){if(!_.isUndefined(this.cellStyles)){if(this.cellStyles.stylesLoaded){var e={};try{e=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",e)}this.cellStyles.detach()}if(this.cellStyles=this.getSelectedCellStyles(),this.cellStyles){var t=this.$(".so-sidebar.so-right-sidebar");this.cellStyles.attach(t),this.cellStyles.on("styles_loaded",(function(e){e&&(t.closest(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"),t.show())}))}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(e>-1){var t=this.cellStylesCache[e];t||((t=new s.view.styles).model=this.row.cells.at(e),t.render("cell",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this,index:e}),this.cellStylesCache[e]=t)}return t},clearCellStylesCache:function(){this.cellStylesCache.forEach((function(e){e.remove(),e.off("styles_loaded")})),this.cellStylesCache=[]},scaleRowWidths:function(){var e=this;this.$(".row-preview .preview-cell").each((function(t,i){var s=e.row.cells.at(t);l(i).css("width",100*s.get("weight")+"%").find(".preview-cell-weight").html(Math.round(1e3*s.get("weight"))/10)}))},setCellsFromForm:function(){try{var e={cells:parseInt(this.$('.row-set-form input[name="cells"]').val()),ratio:parseFloat(this.$('.row-set-form select[name="ratio"]').val()),direction:this.$('.row-set-form select[name="ratio_direction"]').val()};_.isNaN(e.cells)&&(e.cells=1),isNaN(e.ratio)&&(e.ratio=1),e.cells<1?(e.cells=1,this.$('.row-set-form input[name="cells"]').val(e.cells)):e.cells>12&&(e.cells=12,this.$('.row-set-form input[name="cells"]').val(e.cells)),this.$('.row-set-form select[name="ratio"]').val(e.ratio);for(var t=[],i=this.row.cells.length!==e.cells,o=1,n=0;n<e.cells;n++)t.push(o),o*=e.ratio;var r=_.reduce(t,(function(e,t){return e+t}));if(t=_.map(t,(function(e){return e/r})),t=_.filter(t,(function(e){return e>.01})),"left"===e.direction&&(t=t.reverse()),this.row.cells=new s.collection.cells(this.row.cells.first(t.length)),_.each(t,function(e,t){var i=this.row.cells.at(t);i?i.set("weight",e):(i=new s.model.cell({weight:e,row:this.model}),this.row.cells.add(i))}.bind(this)),this.row.ratio=e.ratio,this.row.ratio_direction=e.direction,i)this.regenerateRowPreview();else{var a=this;this.$(".preview-cell").each((function(e,t){var i=a.row.cells.at(e).get("weight");l(t).animate({width:Math.round(1e3*i)/10+"%"},250),l(t).find(".preview-cell-weight").html(Math.round(1e3*i)/10)})),this.$(".preview-cell").css("overflow","visible"),setTimeout(a.regenerateRowPreview.bind(a),260)}}catch(e){console.log("Error setting cells - "+e.message)}this.$(".row-set-form .so-button-row-set").removeClass("button-primary")},tabClickHandler:function(e){"#row-layout"===e.attr("href")?this.$(".so-panels-dialog").addClass("so-panels-dialog-has-right-sidebar"):this.$(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar")},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),_.isEmpty(this.model)||(this.model.setCells(this.row.cells),this.model.set("ratio",this.row.ratio),this.model.set("ratio_direction",this.row.ratio_direction)),!_.isUndefined(this.styles)&&this.styles.stylesLoaded){var t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-row-styles").style}catch(e){console.log("Error retrieving row styles - "+e.message)}this.model.set("style",t)}if(!_.isUndefined(this.cellStyles)&&this.cellStyles.stylesLoaded){t={};try{t=this.getFormValues(".so-sidebar .so-visual-styles.so-cell-styles").style}catch(e){console.log("Error retrieving cell styles - "+e.message)}this.cellStyles.model.set("style",t)}e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},insertHandler:function(){this.builder.addHistoryEntry("row_added"),this.updateModel();var e=this.builder.getActiveCell({createCell:!1}),t={};return null!==e&&(t.at=this.builder.model.get("rows").indexOf(e.row)+1),this.model.collection=this.builder.model.get("rows"),this.builder.model.get("rows").add(this.model,t),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},saveHandler:function(){return this.builder.addHistoryEntry("row_edited"),this.updateModel(),this.closeDialog(),this.builder.model.refreshPanelsData(),!1},deleteHandler:function(){return this.rowView.visualDestroyModel(),this.closeDialog({silent:!0}),!1},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);return this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.closeDialog({silent:!0}),!1},closeHandler:function(){this.clearCellStylesCache(),_.isUndefined(this.cellStyles)||(this.cellStyles=void 0)}})},{}],9:[function(e,t,i){var s=window.panels,l=jQuery,o=e("../view/widgets/js-widget");t.exports=s.view.dialog.extend({builder:null,sidebarWidgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widget-sidebar-widget").html())),dialogClass:"so-panels-dialog-edit-widget",dialogIcon:"add-widget",widgetView:!1,savingWidget:!1,editableLabel:!0,events:{"click .so-close":"saveHandler","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-previous":"navToPrevious","keyup .so-nav.so-previous":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-next":"navToNext","keyup .so-nav.so-next":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-delete":"deleteHandler","keyup .so-toolbar .so-delete":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-toolbar .so-duplicate":"duplicateHandler","keyup .so-toolbar .so-duplicate":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initializeDialog:function(){var e=this;this.listenTo(this.model,"change:values",this.handleChangeValues),this.listenTo(this.model,"destroy",this.remove),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",(function(){this.dialogFormsLoaded++,2===this.dialogFormsLoaded&&e.updateModel({refreshArgs:{silent:!0}})})),this.on("edit_label",function(e){e===panelsOptions.widgets[this.model.get("class")].title&&(e=""),this.model.set("label",e),_.isEmpty(e)&&this.$(".so-title").text(this.model.getWidgetField("title"))}.bind(this)),this.on("open_dialog_complete",(function(){setTimeout((function(){var e=l(".so-content .siteorigin-widget-field-repeater-item-top, .so-content input, .so-content select").first();e.length?e.trigger("focus"):l(".so-panels-dialog-wrapper .so-title").trigger("focus")}),1250)}))},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widget").html(),{})),this.loadForm();var e=this.model.getWidgetField("title");this.$(".so-title .widget-name").html(e),this.$(".so-edit-title").val(e),this.builder.supports("addWidget")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteWidget")||this.$(".so-buttons .so-delete").remove(),this.styles=new s.view.styles,this.styles.model=this.model,this.styles.render("widget",this.builder.config.postId,{builderType:this.builder.config.builderType,dialog:this});var t=this.$(".so-sidebar.so-right-sidebar");this.styles.attach(t),this.styles.on("styles_loaded",(function(e){e||(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())}),this)},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(0===i)return!1;do{if(t=e.eq(--i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t)&&i>0);return!1},getNextDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t,i=e.index(this.widgetView.$el);if(i===e.length-1)return!1;do{if(t=e.eq(++i).data("view"),!_.isUndefined(t)&&!t.model.get("read_only"))return t.getEditDialog()}while(!_.isUndefined(t));return!1},loadForm:function(){if(this.$("> *").length){this.$(".so-content").addClass("so-panels-loading");var e={action:"so_panels_widget_form",widget:this.model.get("class"),instance:JSON.stringify(this.model.get("values")),raw:this.model.get("raw")},t=this.$(".so-content");l.post(panelsOptions.ajaxurl,e,null,"html").done(function(e){var i=e.replace(/{\$id}/g,this.model.cid);t.removeClass("so-panels-loading").html(i),this.trigger("form_loaded",this),this.$(".panel-dialog").trigger("panelsopen"),this.on("close_dialog",this.updateModel,this),t.find("> .widget-content").length>0&&o.addWidget(t,this.model.widget_id)}.bind(this)).fail((function(e){var i;i=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,t.removeClass("so-panels-loading").html(i)}))}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();t=_.isUndefined(t.widgets)?{}:(t=t.widgets)[Object.keys(t)[0]],this.model.setValues(t),this.model.set("raw",!0)}if(this.styles.stylesLoaded){var i={};try{i=this.getFormValues(".so-sidebar .so-visual-styles").style}catch(e){}this.model.set("style",i)}this.savingWidget=!1,e.refresh&&this.builder.model.refreshPanelsData(e.refreshArgs)},handleChangeValues:function(){this.savingWidget||this.loadForm()},saveHandler:function(){this.builder.addHistoryEntry("widget_edited"),this.closeDialog()},deleteHandler:function(){return this.widgetView.visualDestroyModel(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.widgetView.duplicateHandler(),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{"../view/widgets/js-widget":33}],10:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=s.view.dialog.extend({builder:null,widgetTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-widgets-widget").html())),filter:{},dialogClass:"so-panels-dialog-add-widget",dialogIcon:"add-widget",events:{"click .so-close":"closeDialog","click .widget-type":"widgetClickHandler","keyup .so-sidebar-search":"searchHandler","keyup .widget-type-wrapper":"searchHandler","keyup .widget-type-wrapper":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initializeDialog:function(){this.on("open_dialog",(function(){this.filter.search="",this.filterWidgets(this.filter)}),this),this.on("open_dialog_complete",(function(){this.$(".so-sidebar-search").val("").trigger("focus"),this.balanceWidgetHeights()})),this.on("tab_click",this.tabClickHandler,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-widgets").html(),{})),_.each(panelsOptions.widgets,(function(e){var t=l(this.widgetTemplate({title:e.title,description:e.description}));_.isUndefined(e.icon)&&(e.icon="dashicons dashicons-admin-generic"),l('<span class="widget-icon"></span>').addClass(e.icon).prependTo(t.find(".widget-type-wrapper")),t.data("class",e.class).appendTo(this.$(".widget-type-list"))}),this);var e=this.$(".so-sidebar-tabs");_.each(panelsOptions.widget_dialog_tabs,(function(t,i){l(this.dialogTabTemplate({title:t.title,tab:i})).data({message:t.message,filter:t.filter}).appendTo(e)}),this),this.initTabs();var t=this;l(window).on("resize",(function(){t.balanceWidgetHeights()}))},tabClickHandler:function(e){this.filter=e.parent().data("filter"),this.filter.search=this.$(".so-sidebar-search").val();var t=e.parent().data("message");return _.isEmpty(t)&&(t=""),this.$(".so-toolbar .so-status").html(t),this.filterWidgets(this.filter),!1},searchHandler:function(e){if(13===e.which){var t=this.$(".widget-type-list .widget-type:visible");1===t.length&&t.trigger("click")}else this.filter.search=l(e.target).val().trim(),this.filterWidgets(this.filter)},filterWidgets:function(e){_.isUndefined(e)&&(e={}),_.isUndefined(e.groups)&&(e.groups=""),this.$(".widget-type-list .widget-type").each((function(){var t,i=l(this),s=i.data("class"),o=_.isUndefined(panelsOptions.widgets[s])?null:panelsOptions.widgets[s];(t=!!_.isEmpty(e.groups)||null!==o&&!_.isEmpty(_.intersection(e.groups,panelsOptions.widgets[s].groups)))&&(_.isUndefined(e.search)||""===e.search||-1===o.title.toLowerCase().indexOf(e.search.toLowerCase())&&(t=!1)),t?i.show():i.hide()})),this.balanceWidgetHeights()},widgetClickHandler:function(e){this.builder.trigger("before_user_adds_widget"),this.builder.addHistoryEntry("widget_added");var t=l(e.currentTarget),i=new s.model.widget({class:t.data("class")});i.cell=this.builder.getActiveCell(),i.cell.get("widgets").add(i),this.closeDialog(),this.builder.model.refreshPanelsData(),this.builder.trigger("after_user_adds_widget",i)},balanceWidgetHeights:function(e){var t=[[]],i=null,s=Math.round(this.$(".widget-type").parent().width()/this.$(".widget-type").width());this.$(".widget-type").css("clear","none").filter(":visible").each((function(e,t){e%s==0&&0!==e&&l(t).css("clear","both")})),this.$(".widget-type-wrapper").css("height","auto").filter(":visible").each((function(e,s){var o=l(s);null!==i&&i.position().top!==o.position().top&&(t[t.length]=[]),i=o,t[t.length-1].push(o)})),_.each(t,(function(e,t){var i=_.max(e.map((function(e){return e.height()})));_.each(e,(function(e){e.height(i)}))}))}})},{}],11:[function(e,t,i){var s=jQuery;t.exports={triggerClickOnEnter:function(e){13==e.which&&s(e.target).trigger("click")}}},{}],12:[function(e,t,i){t.exports={canCopyPaste:function(){return"undefined"!=typeof Storage&&panelsOptions.user},setModel:function(e){if(!this.canCopyPaste())return!1;var t=panels.helpers.serialize.serialize(e);return e instanceof panels.model.row?t.thingType="row-model":e instanceof panels.model.widget&&(t.thingType="widget-model"),localStorage["panels_clipboard_"+panelsOptions.user]=JSON.stringify(t),!0},isModel:function(e){if(!this.canCopyPaste())return!1;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&((t=JSON.parse(t)).thingType&&t.thingType===e)},getModel:function(e){if(!this.canCopyPaste())return null;var t=localStorage["panels_clipboard_"+panelsOptions.user];return void 0!==t&&(t=JSON.parse(t)).thingType&&t.thingType===e?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],13:[function(e,t,i){t.exports={isBlockEditor:function(){return void 0!==wp.blocks},isClassicEditor:function(e){return e.attachedToEditor&&e.$el.is(":visible")}}},{}],14:[function(e,t,i){t.exports={lock:function(){if("hidden"!==jQuery("body").css("overflow")){var e=[self.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft,self.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop];jQuery("body").data({"scroll-position":e}).css("overflow","hidden"),_.isUndefined(e)||window.scrollTo(e[0],e[1])}},unlock:function(){if("hidden"===jQuery("body").css("overflow")&&!jQuery(".so-panels-dialog-wrapper").is(":visible")&&!jQuery(".so-panels-live-editor").is(":visible")){jQuery("body").css("overflow","visible");var e=jQuery("body").data("scroll-position");_.isUndefined(e)||window.scrollTo(e[0],e[1])}}}},{}],15:[function(e,t,i){t.exports={serialize:function(e){var t;if(e instanceof Backbone.Model){var i={};for(var s in e.attributes)if(e.attributes.hasOwnProperty(s)){if("builder"===s||"collection"===s)continue;(t=e.attributes[s])instanceof Backbone.Model||t instanceof Backbone.Collection?i[s]=this.serialize(t):i[s]=t}return i}if(e instanceof Backbone.Collection){for(var l=[],o=0;o<e.models.length;o++)(t=e.models[o])instanceof Backbone.Model||t instanceof Backbone.Collection?l.push(this.serialize(t)):l.push(t);return l}},unserialize:function(e,t,i){var s;switch(t){case"row-model":(s=new panels.model.row).builder=i;var l={style:e.style};e.hasOwnProperty("label")&&(l.label=e.label),e.hasOwnProperty("color_label")&&(l.color_label=e.color_label),s.set(l),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":(s=new panels.model.cell).row=i,s.set("weight",e.weight),s.set("style",e.style),s.set("widgets",this.unserialize(e.widgets,"widget-collection",s));break;case"widget-model":for(var o in(s=new panels.model.widget).cell=i,e)e.hasOwnProperty(o)&&s.set(o,e[o]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var n=0;n<e.length;n++)s.push(this.unserialize(e[n],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(n=0;n<e.length;n++)s.push(this.unserialize(e[n],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],16:[function(e,t,i){t.exports={generateUUID:function(){var e=(new Date).getTime();return window.performance&&"function"==typeof window.performance.now&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var i=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?i:3&i|8).toString(16)}))},processTemplate:function(e){return _.isUndefined(e)||_.isNull(e)?"":e=(e=(e=e.replace(/{{%/g,"<%")).replace(/%}}/g,"%>")).trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],17:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=function(e,t){return this.each((function(){var i=jQuery(this);if(!i.data("soPanelsBuilderWidgetInitialized")||t){var o=i.closest("form").find(".widget-id").val(),n=l.extend(!0,{builderSupports:i.data("builder-supports")},e);if(_.isUndefined(o)||!(o.indexOf("__i__")>-1)){var r=new s.model.builder,a=new s.view.builder({model:r,config:n}),d=i.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(d)||(d.on("close_dialog",(function(){r.refreshPanelsData()})),d.on("open_dialog_complete",(function(){a.trigger("builder_resize")})),d.model.on("destroy",(function(){r.emptyRows().destroy()})),a.setDialogParents(panelsOptions.loc.layout_widget,d));var c=Boolean(i.closest(".widget-content").length);a.render().attach({container:i,dialog:c||"dialog"===i.data("mode"),type:i.data("type")}).setDataField(i.find("input.panels-data")),c||"dialog"===i.data("mode")?(a.setDialogParents(panelsOptions.loc.layout_widget,a.dialog),i.find(".siteorigin-panels-display-builder").on("click",(function(e){e.preventDefault(),a.dialog.openDialog()}))):i.find(".siteorigin-panels-display-builder").parent().remove(),l(document).trigger("panels_setup",a),i.data("soPanelsBuilderWidgetInitialized",!0)}}}))}},{}],18:[function(e,t,i){
2
  /**
3
  * Everything we need for SiteOrigin Page Builder.
4
  *
5
  * @copyright Greg Priday 2013 - 2016 - <https://siteorigin.com/>
6
  * @license GPL 3.0 http://www.gnu.org/licenses/gpl.html
7
  */
8
+ var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.editor=e("./helpers/editor"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),s.helpers.accessibility=e("./helpers/accessibility"),s.model={},s.model.widget=e("./model/widget"),s.model.cell=e("./model/cell"),s.model.row=e("./model/row"),s.model.builder=e("./model/builder"),s.model.historyEntry=e("./model/history-entry"),s.collection={},s.collection.widgets=e("./collection/widgets"),s.collection.cells=e("./collection/cells"),s.collection.rows=e("./collection/rows"),s.collection.historyEntries=e("./collection/history-entries"),s.view={},s.view.widget=e("./view/widget"),s.view.cell=e("./view/cell"),s.view.row=e("./view/row"),s.view.builder=e("./view/builder"),s.view.dialog=e("./view/dialog"),s.view.styles=e("./view/styles"),s.view.liveEditor=e("./view/live-editor"),s.dialog={},s.dialog.builder=e("./dialog/builder"),s.dialog.widgets=e("./dialog/widgets"),s.dialog.widget=e("./dialog/widget"),s.dialog.prebuilt=e("./dialog/prebuilt"),s.dialog.row=e("./dialog/row"),s.dialog.history=e("./dialog/history"),s.utils={},s.utils.menu=e("./utils/menu"),jQuery.fn.soPanelsSetupBuilderWidget=e("./jquery/setup-builder-widget"),jQuery((function(e){var t,i,s,l,o=e("#siteorigin-panels-metabox");if(s=e("form#post"),o.length&&s.length)t=o,i=o.find(".siteorigin-panels-data-field"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:o.data("builder-type"),builderSupports:o.data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==o.data("live-editor"),liveEditorCloseAfter:1==o.data("live-editor-close"),editorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var n=e(".siteorigin-panels-builder-form");t=n.find(".siteorigin-panels-builder-container"),i=n.find('input[name="panels_data"]'),s=n,l={editorType:"standalone",postId:n.data("post-id"),editorId:"#post_content",builderType:n.data("type"),builderSupports:n.data("builder-supports"),loadLiveEditor:!1,liveEditorCloseAfter:!1,editorPreview:n.data("preview-url")}}if(!_.isUndefined(t)){var r=window.siteoriginPanels,a=new r.model.builder,d=new r.view.builder({model:a,config:l});e(document).trigger("before_panels_setup",d),d.render().attach({container:t}).setDataField(i).attachToEditor(),s.on("submit",(function(){a.refreshPanelsData()})),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",d,window.panels),window.soPanelsBuilderView=d}e(document).on("widget-added",(function(t,i){e(i).find(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e("body").hasClass("wp-customizer")||e((function(){e(".siteorigin-page-builder-widget").soPanelsSetupBuilderWidget()})),e(window).on("keyup",(function(t){27===t.which&&e(".so-panels-dialog-wrapper, .so-panels-live-editor").filter(":visible").last().find(".so-title-bar .so-close, .live-editor-close").trigger("click")}))})),void 0!==window.wp.autosave&&jQuery("#siteorigin-panels-metabox").length&&jQuery(document).on("ready",(function(e){var t=void 0!==window.autosaveL10n&&window.autosaveL10n.blog_id;if(("object"==typeof window.sessionStorage||t)&&(stored_obj=window.sessionStorage.getItem("wp-autosave-"+t),stored_obj)){stored_obj=JSON.parse(stored_obj);var i=stored_obj["post_"+jQuery("#post_ID").val()];"object"==typeof i&&jQuery("#content").val(i.content)}}))},{"./collection/cells":1,"./collection/history-entries":2,"./collection/rows":3,"./collection/widgets":4,"./dialog/builder":5,"./dialog/history":6,"./dialog/prebuilt":7,"./dialog/row":8,"./dialog/widget":9,"./dialog/widgets":10,"./helpers/accessibility":11,"./helpers/clipboard":12,"./helpers/editor":13,"./helpers/page-scroll":14,"./helpers/serialize":15,"./helpers/utils":16,"./jquery/setup-builder-widget":17,"./model/builder":19,"./model/cell":20,"./model/history-entry":21,"./model/row":22,"./model/widget":23,"./utils/menu":24,"./view/builder":25,"./view/cell":26,"./view/dialog":27,"./view/live-editor":28,"./view/row":29,"./view/styles":30,"./view/widget":31}],19:[function(e,t,i){t.exports=Backbone.Model.extend({layoutPosition:{BEFORE:"before",AFTER:"after",REPLACE:"replace"},rows:{},defaults:{data:{widgets:[],grids:[],grid_cells:[]}},initialize:function(){this.set("rows",new panels.collection.rows)},addRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var s=new panels.collection.cells(t);e=_.extend({collection:this.get("rows"),cells:s},e);var l=new panels.model.row(e);return l.builder=this,this.get("rows").add(l,i),l},loadPanelsData:function(e,t){try{t===this.layoutPosition.BEFORE?e=this.concatPanelsData(e,this.getPanelsData()):t===this.layoutPosition.AFTER&&(e=this.concatPanelsData(this.getPanelsData(),e)),this.emptyRows(),this.set("data",JSON.parse(JSON.stringify(e)),{silent:!0});var i,s=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var l=0;l<e.grid_cells.length;l++)i=parseInt(e.grid_cells[l].grid),_.isUndefined(s[i])&&(s[i]=[]),s[i].push(e.grid_cells[l]);var o=this;if(_.each(s,(function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.isUndefined(e.grids[i].ratio)||(s.ratio=e.grids[i].ratio),_.isUndefined(e.grids[i].ratio_direction)||(s.ratio_direction=e.grids[i].ratio_direction),_.isUndefined(e.grids[i].color_label)||(s.color_label=e.grids[i].color_label),_.isUndefined(e.grids[i].label)||(s.label=e.grids[i].label),o.addRow(s,t,{noAnimate:!0})})),_.isUndefined(e.widgets))return;_.each(e.widgets,(function(e){var t=null;_.isUndefined(e.panels_info)?(t=e.info,delete e.info):(t=e.panels_info,delete e.panels_info);var i=o.get("rows").at(parseInt(t.grid)).get("cells").at(parseInt(t.cell)),s=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||s.set("style",t.style),_.isUndefined(t.read_only)||s.set("read_only",t.read_only),_.isUndefined(t.widget_id)?s.set("widget_id",panels.helpers.utils.generateUUID()):s.set("widget_id",t.widget_id),_.isUndefined(t.label)||s.set("label",t.label),s.cell=i,i.get("widgets").add(s,{noAnimate:!0})})),this.trigger("load_panels_data")}catch(e){console.log("Error loading data: "+e.message)}},concatPanelsData:function(e,t){if(_.isUndefined(t)||_.isUndefined(t.grids)||_.isEmpty(t.grids)||_.isUndefined(t.grid_cells)||_.isEmpty(t.grid_cells))return e;if(_.isUndefined(e)||_.isUndefined(e.grids)||_.isEmpty(e.grids))return t;var i,s=e.grids.length,l=_.isUndefined(e.widgets)?0:e.widgets.length,o={grids:[],grid_cells:[],widgets:[]};for(o.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(o.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(o.widgets=e.widgets.slice()),i=0;i<t.grid_cells.length;i++){var n=t.grid_cells[i];n.grid=parseInt(n.grid)+s,o.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(i=0;i<t.widgets.length;i++){var r=t.widgets[i];r.panels_info.grid=parseInt(r.panels_info.grid)+s,r.panels_info.id=parseInt(r.panels_info.id)+l,o.widgets.push(r)}return o},getPanelsData:function(){var e={widgets:[],grids:[],grid_cells:[]},t=0;return this.get("rows").each((function(i,s){i.get("cells").each((function(i,l){i.get("widgets").each((function(i,o){var n={class:i.get("class"),raw:i.get("raw"),grid:s,cell:l,id:t++,widget_id:i.get("widget_id"),style:i.get("style"),label:i.get("label")};_.isEmpty(n.widget_id)&&(n.widget_id=panels.helpers.utils.generateUUID());var r=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(r)})),e.grid_cells.push({grid:s,index:l,weight:i.get("weight"),style:i.get("style")})})),e.grids.push({cells:i.get("cells").length,style:i.get("style"),ratio:i.get("ratio"),ratio_direction:i.get("ratio_direction"),color_label:i.get("color_label"),label:i.get("label")})})),e},refreshPanelsData:function(e){e=_.extend({silent:!1},e);var t=this.get("data"),i=this.getPanelsData();this.set("data",i,{silent:!0}),e.silent||JSON.stringify(i)===JSON.stringify(t)||(this.trigger("change"),this.trigger("change:data"),this.trigger("refresh_panels_data",i,e))},emptyRows:function(){return _.invoke(this.get("rows").toArray(),"destroy"),this.get("rows").reset(),this},isValidLayoutPosition:function(e){return e===this.layoutPosition.BEFORE||e===this.layoutPosition.AFTER||e===this.layoutPosition.REPLACE},getPanelsDataFromHtml:function(e,t){var i,s=this,l=jQuery('<div id="wrapper">'+e+"</div>");if(l.find(".panel-layout .panel-grid").length){var o={grids:[],grid_cells:[],widgets:[]},n=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),r=(i=document.createElement("div"),function(e){return e&&"string"==typeof e&&(e=(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),i.innerHTML=e,e=i.textContent,i.textContent=""),e}),a=function(e){var t=e.find("div");if(!t.length)return e.html();for(var i=0;i<t.length-1&&t.eq(i).text().trim()==t.eq(i+1).text().trim();i++);var s=t.eq(i).find(".widget-title:header"),l="";return s.length&&(l=s.html(),s.remove()),{title:l,text:t.eq(i).html()}},d=l.find(".panel-layout").eq(0),c=function(e,t){return jQuery(t).closest(".panel-layout").is(d)};return l.find("> .panel-layout > .panel-grid").filter(c).each((function(e,i){var l=jQuery(i),d=l.find(".panel-grid-cell").filter(c);o.grids.push({cells:d.length,style:l.data("style"),ratio:l.data("ratio"),ratio_direction:l.data("ratio-direction"),color_label:l.data("color-label"),label:l.data("label")}),d.each((function(i,l){var d=jQuery(l),h=d.find(".so-panel").filter(c);o.grid_cells.push({grid:e,weight:_.isUndefined(d.data("weight"))?1:parseFloat(d.data("weight")),style:d.data("style")}),h.each((function(l,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:i,style:c.data("style"),raw:!1,label:c.data("label")};h=h.trim();var p=n.exec(h);if(!_.isNull(p)&&""===h.replace(n,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(r(f.val())).instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,w.panels_info=u,o.widgets.push(w)}catch(e){u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}return-1!==h.indexOf("panel-layout")&&jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length?(u.class="SiteOrigin_Panels_Widgets_Layout",o.widgets.push({panels_data:s.getPanelsDataFromHtml(h,t),panels_info:u}),!0):(u.class=t,o.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0)}))}))})),l.find(".panel-layout").remove(),l.find("style[data-panels-style-for-post]").remove(),l.html().replace(/^\s+|\s+$/gm,"").length&&(o.grids.push({cells:1,style:{}}),o.grid_cells.push({grid:o.grids.length-1,weight:1}),o.widgets.push({filter:"1",text:l.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:o.grids.length-1,cell:0}})),o}return{grid_cells:[{grid:0,weight:1}],grids:[{cells:1}],widgets:[{filter:"1",text:e,title:"",type:"visual",panels_info:{class:t,raw:!1,grid:0,cell:0}}]}}})},{}],20:[function(e,t,i){t.exports=Backbone.Model.extend({widgets:{},row:null,defaults:{weight:0,style:{}},indexes:null,initialize:function(){this.set("widgets",new panels.collection.widgets),this.on("destroy",this.onDestroy,this)},onDestroy:function(){_.invoke(this.get("widgets").toArray(),"destroy"),this.get("widgets").reset()},clone:function(e,t){_.isUndefined(e)&&(e=this.row),t=_.extend({cloneWidgets:!0},t);var i=new this.constructor(this.attributes);return i.set("collection",e.get("cells"),{silent:!0}),i.row=e,t.cloneWidgets&&this.get("widgets").each((function(e){i.get("widgets").add(e.clone(i,t),{silent:!0})})),i}})},{}],21:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],22:[function(e,t,i){t.exports=Backbone.Model.extend({builder:null,defaults:{style:{}},indexes:null,initialize:function(){_.isEmpty(this.get("cells"))?this.set("cells",new panels.collection.cells):this.get("cells").each(function(e){e.row=this}.bind(this)),this.on("destroy",this.onDestroy,this)},setCells:function(e){var t=this.get("cells")||new panels.collection.cells,i=[];t.each((function(s,l){var o=e.at(l);if(o)s.set("weight",o.get("weight"));else{for(var n=t.at(e.length-1),r=s.get("widgets").models.slice(),a=0;a<r.length;a++)r[a].moveToCell(n,{silent:!1});i.push(s)}})),_.each(i,(function(e){t.remove(e)})),e.length>t.length&&_.each(e.slice(t.length,e.length),function(e){e.set({collection:t}),e.row=this,t.add(e)}.bind(this)),this.reweightCells()},reweightCells:function(){var e=0,t=this.get("cells");t.each((function(t){e+=t.get("weight")})),t.each((function(t){t.set("weight",t.get("weight")/e)})),this.trigger("reweight_cells")},onDestroy:function(){_.invoke(this.get("cells").toArray(),"destroy"),this.get("cells").reset()},clone:function(e){_.isUndefined(e)&&(e=this.builder);var t=new this.constructor(this.attributes);t.set("collection",e.get("rows"),{silent:!0}),t.builder=e;var i=new panels.collection.cells;return this.get("cells").each((function(e){i.add(e.clone(t),{silent:!0})})),t.set("cells",i),t}})},{}],23:[function(e,t,i){t.exports=Backbone.Model.extend({cell:null,defaults:{class:null,missing:!1,values:{},raw:!1,style:{},read_only:!1,widget_id:""},indexes:null,initialize:function(){var e=this.get("class");!_.isUndefined(panelsOptions.widgets[e])&&panelsOptions.widgets[e].installed||this.set("missing",!0)},getWidgetField:function(e){return _.isUndefined(panelsOptions.widgets[this.get("class")])?"title"===e||"description"===e?panelsOptions.loc.missing_widget[e]:"":this.has("label")&&!_.isEmpty(this.get("label"))?this.get("label"):panelsOptions.widgets[this.get("class")][e]},moveToCell:function(e,t,i){return t=_.extend({silent:!0},t),this.cell=e,this.collection.remove(this,t),e.get("widgets").add(this,_.extend({at:i},t)),this.trigger("move_to_cell",e,i),this},setValues:function(e){var t=!1;JSON.stringify(e)!==JSON.stringify(this.get("values"))&&(t=!0),this.set("values",e,{silent:!0}),t&&(this.trigger("change",this),this.trigger("change:values"))},clone:function(e,t){_.isUndefined(e)&&(e=this.cell);var i=new this.constructor(this.attributes),s=JSON.parse(JSON.stringify(this.get("values"))),l=function(e){return _.each(e,(function(t,i){_.isString(i)&&"_"===i[0]?delete e[i]:_.isObject(e[i])&&l(e[i])})),e};return s=l(s),"SiteOrigin_Panels_Widgets_Layout"===this.get("class")&&(s.builder_id=Math.random().toString(36).substr(2)),i.set("widget_id",""),i.set("values",s,{silent:!0}),i.set("collection",e.get("widgets"),{silent:!0}),i.cell=e,i.isDuplicate=!0,i},isValidTitle:function(e){return!_.isUndefined(e)&&_.isString(e)&&""!==e&&"on"!==e&&"true"!==e&&"false"!==e&&"_"!==e[0]&&!_.isFinite(e)},cleanTitle:function(e){var t=(e=e.replace(/<\/?[^>]+(>|$)/g,"")).split(" ");return(t=t.slice(0,20)).join(" ")},getTitleFromValues:function(e,t){var i=!1;for(const s in e)if("object"==typeof e[s]){if(i=t.getTitleFromValues(e[s],t))break}else if("_"!==s.charAt(0)&&"so_sidebar_emulator_id"!==s&&"option_name"!==s&&t.isValidTitle(e[s])){i=t.cleanTitle(e[s]);break}return i},getTitle:function(){var e=panelsOptions.widgets[this.get("class")],t=[],i=!1;if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(_.isUndefined(e.panels_title))t=["title","text"];else{if(!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;t.push(e.panels_title),i=!0}var s=this.get("values"),l=this,o=!1;return _.each(t,(function(e){if(l.isValidTitle(s[e]))return o=l.cleanTitle(s[e]),!1})),o||i||(o=this.getTitleFromValues(s,l)),o||this.getWidgetField("description")}})},{}],24:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({wrapperTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu").html())),sectionTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-context-menu-section").html())),contexts:[],active:!1,events:{"keyup .so-search-wrapper input":"searchKeyUp"},initialize:function(){this.listenContextMenu(),this.render(),this.attach()},listenContextMenu:function(){var e=this;l(window).on("contextmenu",(function(t){return e.active&&!e.isOverEl(e.$el,t)?(e.closeMenu(),e.active=!1,t.preventDefault(),!1):!!e.active||(e.active=!1,e.trigger("activate_context",t,e),void(e.active&&(t.preventDefault(),e.openMenu({left:t.pageX,top:t.pageY}))))}))},render:function(){this.setElement(this.wrapperTemplate())},attach:function(){this.$el.appendTo("body")},openMenu:function(e){this.trigger("open_menu"),l(window).on("keyup",{menu:this},this.keyboardListen),l(window).on("click",{menu:this},this.clickOutsideListen),this.$el.css("max-height",l(window).height()-20),e.left+this.$el.outerWidth()+10>=l(window).width()&&(e.left=l(window).width()-this.$el.outerWidth()-10),e.left<=0&&(e.left=10),e.top+this.$el.outerHeight()-l(window).scrollTop()+10>=l(window).height()&&(e.top=l(window).height()+l(window).scrollTop()-this.$el.outerHeight()-10),e.left<=0&&(e.left=10),this.$el.css({left:e.left+1,top:e.top+1}).show(),this.$(".so-search-wrapper input").trigger("focus")},closeMenu:function(){this.trigger("close_menu"),l(window).off("keyup",this.keyboardListen),l(window).off("click",this.clickOutsideListen),this.active=!1,this.$el.empty().hide()},keyboardListen:function(e){var t=e.data.menu;switch(e.which){case 27:t.closeMenu()}},clickOutsideListen:function(e){var t=e.data.menu;3!==e.which&&t.$el.is(":visible")&&!t.isOverEl(t.$el,e)&&t.closeMenu()},addSection:function(e,t,i,s){var o=this;t=_.extend({display:5,defaultDisplay:!1,search:!0,sectionTitle:"",searchPlaceholder:"",titleKey:"title"},t);var n=l(this.sectionTemplate({settings:t,items:i})).attr("id","panels-menu-section-"+e);this.$el.append(n),n.find(".so-item:not(.so-confirm)").on("click",(function(){var e=l(this);s(e.data("key")),o.closeMenu()})),n.find(".so-item.so-confirm").on("click",(function(){var e=l(this);if(e.hasClass("so-confirming"))return s(e.data("key")),void o.closeMenu();e.data("original-text",e.html()).addClass("so-confirming").html('<span class="dashicons dashicons-yes"></span> '+panelsOptions.loc.dropdown_confirm),setTimeout((function(){e.removeClass("so-confirming"),e.html(e.data("original-text"))}),2500)})),n.data("settings",t).find(".so-search-wrapper input").trigger("keyup"),this.active=!0},hasSection:function(e){return this.$el.find("#panels-menu-section-"+e).length>0},searchKeyUp:function(e){var t=l(e.currentTarget),i=t.closest(".so-section"),s=i.data("settings");if(38===e.which||40===e.which){var o=i.find("ul li:visible"),n=o.filter(".so-active").eq(0);if(n.length){o.removeClass("so-active");var r=o.index(n);38===e.which?n=r-1<0?o.last():o.eq(r-1):40===e.which&&(n=r+1>=o.length?o.first():o.eq(r+1))}else 38===e.which?n=o.last():40===e.which&&(n=o.first());return n.addClass("so-active"),!1}if(13===e.which)return 1===i.find("ul li:visible").length?(i.find("ul li:visible").trigger("click"),!1):(i.find("ul li.so-active:visible").trigger("click"),!1);if(""===t.val())if(s.defaultDisplay){i.find(".so-item").hide();for(var a=0;a<s.defaultDisplay.length;a++)i.find('.so-item[data-key="'+s.defaultDisplay[a]+'"]').show()}else i.find(".so-item").show();else i.find(".so-item").hide().each((function(){var e=l(this);-1!==e.html().toLowerCase().indexOf(t.val().toLowerCase())&&e.show()}));i.find(".so-item:visible:gt("+(s.display-1)+")").hide(),0===i.find(".so-item:visible").length&&""!==t.val()?i.find(".so-no-results").show():i.find(".so-no-results").hide()},isOverEl:function(e,t){var i=[[e.offset().left,e.offset().top],[e.offset().left+e.outerWidth(),e.offset().top+e.outerHeight()]];return t.pageX>=i[0][0]&&t.pageX<=i[1][0]&&t.pageY>=i[0][1]&&t.pageY<=i[1][1]}})},{}],25:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({config:{},template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder").html())),dialogs:{},rowsSortable:null,dataField:!1,currentData:"",contentPreview:"",attachedToEditor:!1,attachedVisible:!1,liveEditor:void 0,menu:!1,activeCell:null,events:{"click .so-tool-button.so-widget-add":"displayAddWidgetDialog","click .so-tool-button.so-row-add":"displayAddRowDialog","click .so-tool-button.so-prebuilt-add":"displayAddPrebuiltDialog","click .so-tool-button.so-history":"displayHistoryDialog","click .so-tool-button.so-live-editor":"displayLiveEditor","keyup .so-tool-button":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},rows:null,initialize:function(e){var t=this;return this.config=_.extend({loadLiveEditor:!1,liveEditorCloseAfter:!1,builderSupports:{}},e.config),this.config.builderSupports=_.extend({addRow:!0,editRow:!0,deleteRow:!0,moveRow:!0,addWidget:!0,editWidget:!0,deleteWidget:!0,moveWidget:!0,prebuilt:!0,history:!0,liveEditor:!0,revertToEditor:!0},this.config.builderSupports),e.config.loadLiveEditor&&this.on("builder_live_editor_added",(function(){this.displayLiveEditor()})),this.dialogs={widgets:new s.dialog.widgets,row:new s.dialog.row,prebuilt:new s.dialog.prebuilt},$panelsMetabox=l("#siteorigin-panels-metabox"),$panelsMetabox.length&&(this.contentPreview=l.parseHTML($panelsMetabox.data("preview-markup"))),_.each(this.dialogs,(function(e,i,s){s[i].setBuilder(t)})),this.dialogs.row.setRowDialogType("create"),this.listenTo(this.model.get("rows"),"add",this.onAddRow),l(window).on("resize",(function(e){e.target===window&&t.trigger("builder_resize")})),this.listenTo(this.model,"change:data load_panels_data",this.storeModelData),this.listenTo(this.model,"change:data load_panels_data",this.toggleWelcomeDisplay),this.on("builder_attached_to_editor",this.handleContentChange,this),this.on("content_change",this.handleContentChange,this),this.on("display_builder",this.handleDisplayBuilder,this),this.on("hide_builder",this.handleHideBuilder,this),this.on("builder_rendered builder_resize",this.handleBuilderSizing,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.listenTo(this.menu,"activate_context",this.activateContextMenu),this.config.loadOnAttach&&this.on("builder_attached_to_editor",(function(){this.displayAttachedBuilder({confirm:!1})}),this),this},render:function(){return this.setElement(this.template()),this.$el.attr("id","siteorigin-panels-builder-"+this.cid).addClass("so-builder-container"),this.trigger("builder_rendered"),this},attach:function(e){(e=_.extend({container:!1,dialog:!1},e)).dialog?(this.dialog=new s.dialog.builder,this.dialog.builder=this):(this.$el.appendTo(e.container),this.metabox=e.container.closest(".postbox"),this.initSortable(),this.trigger("attached_to_container",e.container)),this.trigger("builder_attached"),this.supports("liveEditor")&&this.addLiveEditor(),this.supports("history")&&this.addHistoryBrowser();var t=this.$(".so-builder-toolbar"),i=this.$(".so-panels-welcome-message"),l=panelsOptions.loc.welcomeMessage,o=[];this.supports("addWidget")?o.push(l.addWidgetButton):t.find(".so-widget-add").hide(),this.supports("addRow")?o.push(l.addRowButton):t.find(".so-row-add").hide(),this.supports("prebuilt")?o.push(l.addPrebuiltButton):t.find(".so-prebuilt-add").hide();var n="";3===o.length?n=l.threeEnabled:2===o.length?n=l.twoEnabled:1===o.length?n=l.oneEnabled:0===o.length&&(n=l.addingDisabled);var r=_.template(s.helpers.utils.processTemplate(n))({items:o})+" "+l.docsMessage;return i.find(".so-message-wrapper").html(r),this},attachToEditor:function(){if("tinyMCE"!==this.config.editorType)return this;this.attachedToEditor=!0;var e=this.metabox,t=this;l("#wp-content-wrap .wp-editor-tabs").find(".wp-switch-editor").on("click",(function(e){e.preventDefault(),l("#wp-content-editor-container").show(),l("#wp-content-wrap").removeClass("panels-active"),l("#content-resize-handle").show(),t.trigger("hide_builder")})).end().append(l('<button type="button" id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find("h2.hndle").html()+"</button>").on("click",(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()}))),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").on("click keyup",(function(i){i.preventDefault(),"keyup"==i.type&&13!=i.which||confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).trigger("resize"),t.attachedVisible=!1,t.trigger("hide_builder"))})).show(),e.insertAfter("#wp-content-wrap").hide().addClass("attached-to-editor");var i=this.model.get("data");_.isEmpty(i.widgets)&&_.isEmpty(i.grids)&&this.supports("revertToEditor")||this.displayAttachedBuilder({confirm:!1});var s=function(){var e=t.$(".so-builder-toolbar");if(t.$el.hasClass("so-display-narrow"))return e.css({top:0,left:0,width:"100%",position:"absolute"}),void t.$el.css("padding-top",e.outerHeight()+"px");var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s=0,o=t.$el.outerHeight()-e.outerHeight()+20;i>s&&i<o?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left+"px",width:t.$el.outerWidth()+"px",position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20)+"px",left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight()+"px")};return this.on("builder_resize",s,this),l(document).on("scroll",s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if((e=_.extend({confirm:!0},e)).confirm){var t="undefined"!=typeof tinyMCE&&tinyMCE.get("content");if(""!==(t&&_.isFunction(t.getContent)?t.getContent():l("textarea#content").val())&&!confirm(panelsOptions.loc.confirm_use_builder))return!1}return l("#wp-content-wrap").hide(),l("#editor-expand-toggle").on("change.editor-expand",(function(){l(this).prop("checked")||l("#wp-content-wrap").hide()})),this.metabox.show().find("> .inside").show(),l(window).trigger("resize"),l(document).trigger("scroll"),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this,t=e.$el.attr("id");return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",connectWith:"#"+t+".so-rows-container,.block-editor .so-rows-container",axis:"y",tolerance:"pointer",scroll:!1,remove:function(t,i){e.model.get("rows").remove(l(i.item).data("view").model,{silent:!0}),e.model.refreshPanelsData()},receive:function(t,i){e.model.get("rows").add(l(i.item).data("view").model,{silent:!0,at:l(i.item).index()}),e.model.refreshPanelsData()},stop:function(t,i){var s=l(i.item),o=s.data("view"),n=e.model.get("rows");n.get(o.model)&&(e.addHistoryEntry("row_moved"),n.remove(o.model,{silent:!0}),n.add(o.model,{silent:!0,at:s.index()}),o.trigger("move",s.index()),e.model.refreshPanelsData())}}),this},refreshSortable:function(){_.isNull(this.rowsSortable)||this.rowsSortable.sortable("refresh")},setDataField:function(e,t){if(t=_.extend({load:!0},t),this.dataField=e,this.dataField.data("builder",this),t.load&&""!==e.val()){var i=this.dataField.val();try{i=JSON.parse(i)}catch(e){console.log("Failed to parse Page Builder layout data from supplied data field."),i={}}this.setData(i)}return this},setData:function(e){this.model.loadPanelsData(e),this.currentData=e,this.toggleWelcomeDisplay()},getData:function(){return this.model.get("data")},storeModelData:function(){var e=JSON.stringify(this.model.get("data"));l(this.dataField).val()!==e&&(l(this.dataField).val(e),l(this.dataField).trigger("change"),this.trigger("content_change"))},onAddRow:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.row({model:e});l.builder=this,l.render(),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".so-rows-container")):l.$el.insertAfter(this.$(".so-rows-container .so-row-container").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),l.resizeRow(),this.trigger("row_added")},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells(panelsOptions.default_columns);t.each((function(t){t.row=e})),e.set("cells",t),e.builder=this.model,this.dialogs.row.setRowModel(e),this.dialogs.row.openDialog()},displayAddPrebuiltDialog:function(){this.dialogs.prebuilt.openDialog()},displayHistoryDialog:function(){this.dialogs.history.openDialog()},pasteRowHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.addHistoryEntry("row_pasted"),e.builder=this.model,this.model.get("rows").add(e,{at:this.model.get("rows").indexOf(this.model)+1}),this.model.refreshPanelsData())},getActiveCell:function(e){if(e=_.extend({createCell:!0},e),!this.model.get("rows").length){if(!e.createCell)return null;this.model.addRow({},[{weight:1}],{noAnimate:!0})}var t=this.activeCell;return _.isEmpty(t)||-1===this.model.get("rows").indexOf(t.model.row)?this.model.get("rows").last().get("cells").first():t.model},addLiveEditor:function(){return _.isEmpty(this.config.editorPreview)?this:(this.liveEditor=new s.view.liveEditor({builder:this,previewUrl:this.config.editorPreview}),this.liveEditor.hasPreviewUrl()&&this.$(".so-builder-toolbar .so-live-editor").show(),this.trigger("builder_live_editor_added"),this)},displayLiveEditor:function(){_.isUndefined(this.liveEditor)||this.liveEditor.open()},addHistoryBrowser:function(){if(_.isEmpty(this.config.editorPreview))return this;this.dialogs.history=new s.dialog.history,this.dialogs.history.builder=this,this.dialogs.history.entries.builder=this.model,this.dialogs.history.setRevertEntry(this.model),this.$(".so-builder-toolbar .so-history").show()},addHistoryEntry:function(e,t){_.isUndefined(t)&&(t=null),_.isUndefined(this.dialogs.history)||this.dialogs.history.entries.addEntry(e,t)},supports:function(e){return"rowAction"===e?this.supports("addRow")||this.supports("editRow")||this.supports("deleteRow"):"widgetAction"===e?this.supports("addWidget")||this.supports("editWidget")||this.supports("deleteWidget"):!_.isUndefined(this.config.builderSupports[e])&&this.config.builderSupports[e]},handleContentChange:function(){if(panelsOptions.copy_content&&(s.helpers.editor.isBlockEditor()||s.helpers.editor.isClassicEditor(this))){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content_json",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){this.contentPreview&&""!==e.post_content&&this.updateEditorContent(e.post_content),""!==e.preview&&(this.contentPreview=e.preview)}.bind(this))}},updateEditorContent:function(e){if("tinyMCE"!==this.config.editorType||"undefined"==typeof tinyMCE||_.isNull(tinyMCE.get("content"))){l(this.config.editorId).val(e).trigger("change").trigger("keyup")}else{var t=tinyMCE.get("content");t.setContent(e),t.fire("change"),t.fire("keyup")}this.triggerSeoChange()},triggerSeoChange:function(){"undefined"==typeof YoastSEO||_.isNull(YoastSEO)||_.isNull(YoastSEO.app.refresh)||YoastSEO.app.refresh(),"undefined"==typeof rankMathEditor||_.isNull(rankMathEditor)||_.isNull(rankMathEditor.refresh)||rankMathEditor.refresh("content")},handleDisplayBuilder:function(){var e="undefined"!=typeof tinyMCE&&tinyMCE.get("content"),t=e&&_.isFunction(e.getContent)?e.getContent():l("textarea#content").val();if((_.isEmpty(this.model.get("data"))||_.isEmpty(this.model.get("data").widgets)&&_.isEmpty(this.model.get("data").grids))&&""!==t){var i=panelsOptions.text_widget;if(_.isEmpty(i))return;this.model.loadPanelsData(this.model.getPanelsDataFromHtml(t,i)),this.model.trigger("change"),this.model.trigger("change:data")}l("#post-status-info").addClass("for-siteorigin-panels")},handleHideBuilder:function(){l("#post-status-info").show().removeClass("for-siteorigin-panels")},wrapEditorExpandAdjust:function(){try{for(var e,t=(l.hasData(window)&&l._data(window)).events.scroll,i=0;i<t.length;i++)if("editor-expand"===t[i].namespace){e=t[i],l(window).off("scroll",e.handler),l(window).on("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<575?this.$el.addClass("so-display-narrow"):this.$el.removeClass("so-display-narrow"),this):this},setDialogParents:function(e,t){_.each(this.dialogs,(function(i,s,l){l[s].setParent(e,t)})),this.on("add_dialog",(function(i){i.setParent(e,t)}),this)},toggleWelcomeDisplay:function(){this.model.get("rows").isEmpty()?this.$(".so-panels-welcome-message").show():this.$(".so-panels-welcome-message").hide()},activateContextMenu:function(e,t){if(l.contains(this.$el.get(0),e.target)){var i=l([]).add(this.$(".so-panels-welcome-message:visible")).add(this.$(".so-rows-container > .so-row-container")).add(this.$(".so-cells > .cell")).add(this.$(".cell-wrapper > .so-widget")).filter((function(i){return t.isOverEl(l(this),e)})),s=i.last().data("view");void 0!==s&&void 0!==s.buildContextualMenu?s.buildContextualMenu(e,t):i.last().hasClass("so-panels-welcome-message")&&this.buildContextualMenu(e,t)}},buildContextualMenu:function(e,t){var i={};this.supports("addRow")&&(i.add_row={title:panelsOptions.loc.contextual.add_row}),s.helpers.clipboard.canCopyPaste()&&s.helpers.clipboard.isModel("row-model")&&this.supports("addRow")&&(i.paste_row={title:panelsOptions.loc.contextual.row_paste}),_.isEmpty(i)||t.addSection("builder-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},i,function(e){switch(e){case"add_row":this.displayAddRowDialog();break;case"paste_row":this.pasteRowHandler()}}.bind(this))}})},{}],26:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-cell").html())),events:{"click .cell-wrapper":"handleCellClick"},row:null,widgetSortable:null,initialize:function(){this.listenTo(this.model.get("widgets"),"add",this.onAddWidget)},render:function(){var e={weight:this.model.get("weight"),totalWeight:this.row.model.get("cells").totalWeight()};this.setElement(this.template(e)),this.$el.data("view",this);var t=this;return this.model.get("widgets").each((function(e){var i=new s.view.widget({model:e});i.cell=t,i.render(),i.$el.appendTo(t.$(".widgets-container"))})),this.initSortable(),this.initResizable(),this},initSortable:function(){if(!this.row.builder.supports("moveWidget"))return this;var e=this,t=e.row.builder,i=t.$el.attr("id"),s=t.model;return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+i+" .so-cells .cell .widgets-container,.block-editor .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},remove:function(t,i){e.model.get("widgets").remove(l(i.item).data("view").model,{silent:!0}),s.refreshPanelsData()},receive:function(t,i){var o=l(i.item).data("view");o.cell=e;var n=o.model;n.cell=e.model,e.model.get("widgets").add(n,{silent:!0,at:l(i.item).index()}),s.refreshPanelsData()},stop:function(t,i){var o=l(i.item),n=o.data("view"),r=o.closest(".cell").data("view");e.model.get("widgets").get(n.model)&&(e.row.builder.addHistoryEntry("widget_moved"),n.model.moveToCell(r.model,{},o.index()),n.cell=r,s.refreshPanelsData())},helper:function(e,t){var i=t.clone().css({width:t.outerWidth()+"px","z-index":1e4,position:"fixed"}).addClass("widget-being-dragged").appendTo("body");return t.outerWidth()>720&&i.animate({"margin-left":e.pageX-t.offset().left-240,width:480},"fast"),i}}),this},refreshSortable:function(){_.isNull(this.widgetSortable)||this.widgetSortable.sortable("refresh")},initResizable:function(){if(!this.row.builder.supports("editRow"))return this;var e,t=this.$(".resize-handle").css("position","absolute"),i=this.row.$el,s=this;return t.draggable({axis:"x",containment:i,start:function(t,i){if(e=s.$el.prev().data("view"),!_.isUndefined(e)){var o=s.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:s.$el.outerWidth(),left:5,height:s.$el.outerHeight()});o.find(".resize-handle").remove();var n=e.$el.clone().appendTo(i.helper).css({position:"absolute",top:"0",width:e.$el.outerWidth()+"px",right:5,height:e.$el.outerHeight()+"px"});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*r+"px").find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",n*a+"px").find(".preview-cell-weight").html(Math.round(1e3*a)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,r=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,a=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;r>.02&&a>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",r),e.model.set("weight",a),s.row.resizeRow()),o.helper.css("left",-t.outerWidth()/2+"px"),s.row.builder.model.refreshPanelsData()}}),this},onAddWidget:function(e,t,i){i=_.extend({noAnimate:!1},i);var l=new s.view.widget({model:e});l.cell=this,_.isUndefined(e.isDuplicate)&&(e.isDuplicate=!1),l.render({loadForm:e.isDuplicate}),_.isUndefined(i.at)||t.length<=1?l.$el.appendTo(this.$(".widgets-container")):l.$el.insertAfter(this.$(".widgets-container .so-widget").eq(i.at-1)),!1===i.noAnimate&&l.visualCreate(),this.refreshSortable(),this.row.resizeRow(),this.row.builder.trigger("widget_added",l)},handleCellClick:function(e){this.row.builder.$el.find(".so-cells .cell").removeClass("cell-selected"),this.row.builder.activeCell!==this||this.model.get("widgets").length?(this.$el.addClass("cell-selected"),this.row.builder.activeCell=this):this.row.builder.activeCell=null},pasteHandler:function(){var e=s.helpers.clipboard.getModel("widget-model");!_.isEmpty(e)&&e instanceof s.model.widget&&(this.row.builder.addHistoryEntry("widget_pasted"),e.cell=this.model,this.model.get("widgets").add(e),this.row.builder.model.refreshPanelsData())},buildContextualMenu:function(e,t){var i=this;t.hasSection("add-widget-below")||t.addSection("add-widget-cell",{sectionTitle:panelsOptions.loc.contextual.add_widget_cell,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,(function(e){i.row.builder.trigger("before_user_adds_widget"),i.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=i.model,t.cell.get("widgets").add(t),i.row.builder.model.refreshPanelsData(),i.row.builder.trigger("after_user_adds_widget",t)}));var l={};this.row.builder.supports("addWidget")&&s.helpers.clipboard.isModel("widget-model")&&(l.paste={title:panelsOptions.loc.contextual.cell_paste_widget}),_.isEmpty(l)||t.addSection("cell-actions",{sectionTitle:panelsOptions.loc.contextual.cell_actions,search:!1},l,function(e){switch(e){case"paste":this.pasteHandler()}this.row.builder.model.refreshPanelsData()}.bind(this)),this.row.buildContextualMenu(e,t)}})},{}],27:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({dialogTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog").html())),dialogTabTemplate:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-dialog-tab").html())),tabbed:!1,rendered:!1,builder:!1,className:"so-panels-dialog-wrapper",dialogClass:"",dialogIcon:"",parentDialog:!1,dialogOpen:!1,editableLabel:!1,events:{"click .so-close":"closeDialog","keyup .so-close":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-previous":"navToPrevious","keyup .so-nav.so-previous":function(e){s.helpers.accessibility.triggerClickOnEnter(e)},"click .so-nav.so-next":"navToNext","keyup .so-nav.so-next":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.once("open_dialog",this.render),this.once("open_dialog",this.attach),this.once("open_dialog",this.setDialogClass),this.trigger("initialize_dialog",this),_.isUndefined(this.initializeDialog)||this.initializeDialog(),_.bindAll(this,"initSidebars","hasSidebar","onResize","toggleLeftSideBar","toggleRightSideBar")},getNextDialog:function(){return null},getPrevDialog:function(){return null},setDialogClass:function(){""!==this.dialogClass&&this.$(".so-panels-dialog").addClass(this.dialogClass)},setBuilder:function(e){return this.builder=e,e.trigger("add_dialog",this,this.builder),this},attach:function(){return this.$el.appendTo("body"),this},parseDialogContent:function(e,t){t=_.extend({cid:this.cid},t);var i=l(_.template(s.helpers.utils.processTemplate(e))(t)),o={title:i.find(".title").html(),buttons:i.find(".buttons").html(),content:i.find(".content").html()};return i.has(".left-sidebar")&&(o.left_sidebar=i.find(".left-sidebar").html()),i.has(".right-sidebar")&&(o.right_sidebar=i.find(".right-sidebar").html()),o},renderDialog:function(e){if(e=_.extend({editableLabel:this.editableLabel,dialogIcon:this.dialogIcon},e),this.$el.html(this.dialogTemplate(e)).hide(),this.$el.data("view",this),this.$el.addClass("so-panels-dialog-wrapper"),!1!==this.parentDialog){var t=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');t.on("click",function(e){e.preventDefault(),this.closeDialog(),this.parentDialog.dialog.openDialog()}.bind(this)),this.$(".so-title-bar .so-title").before(t)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),setTimeout(this.initSidebars,1),this},initSidebars:function(){var e=this.$(".so-show-left-sidebar").hide(),t=this.$(".so-show-right-sidebar").hide(),i=this.hasSidebar("left"),s=this.hasSidebar("right");(i||s)&&(l(window).on("resize",this.onResize),i&&(e.show(),e.on("click",this.toggleLeftSideBar)),s&&(t.show(),t.on("click",this.toggleRightSideBar))),this.onResize()},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.on("click",(function(e){e.preventDefault();var i=l(this);t.$(".so-sidebar-tabs li").removeClass("tab-active"),t.$(".so-content .so-content-tabs > *").hide(),i.parent().addClass("tab-active");var s=i.attr("href");if(!_.isUndefined(s)&&"#"===s.charAt(0)){var o=s.split("#")[1];t.$(".so-content .so-content-tabs .tab-"+o).show()}t.trigger("tab_click",i)})),this.$(".so-sidebar-tabs li a").first().trigger("click"),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").on("click keyup",function(e){e.preventDefault(),"keyup"==e.type&&13!=e.which||this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").on("click",function(e){e.preventDefault();var t=l(e.currentTarget).siblings(".so-dropdown-links-wrapper");t.is(".hidden")?t.removeClass("hidden"):t.addClass("hidden")}.bind(this)),l("html").on("click",function(e){this.$(".so-dropdown-links-wrapper").not(".hidden").each((function(t,i){var s=l(i),o=l(e.target);0!==o.length&&(o.is(".so-needs-confirm")&&!o.is(".so-confirmed")||o.is(".so-dropdown-button"))||s.addClass("hidden")}))}.bind(this))},initEditableLabel:function(){var e=this.$(".so-title-bar .so-title-editable");e.on("keypress",(function(t){var i="keypress"===t.type&&13===t.keyCode;if(i){var s=l(":tabbable"),o=s.index(e);s.eq(o+1).trigger("focus"),window.getSelection().removeAllRanges()}return!i})).on("blur",function(){var t=e.text().replace(/^\s+|\s+$/gm,"");t!==e.data("original-value").replace(/^\s+|\s+$/gm,"")&&(e.text(t),this.trigger("edit_label",t))}.bind(this)).on("focus",(function(){e.data("original-value",e.text()),s.helpers.utils.selectElementContents(this)}))},setupDialog:function(){this.openDialog(),this.closeDialog()},refreshDialogNav:function(){this.$(".so-title-bar .so-nav").show().removeClass("so-disabled");var e=this.getNextDialog(),t=this.$(".so-title-bar .so-next"),i=this.getPrevDialog(),s=this.$(".so-title-bar .so-previous");null===e?t.hide():!1===e?(t.addClass("so-disabled"),t.attr("tabindex",-1)):t.attr("tabindex",0),null===i?s.hide():!1===i?(s.addClass("so-disabled"),s.attr("tabindex",-1)):s.attr("tabindex",0)},openDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),this.onResize(),this.$el.show(),e.silent||(this.trigger("open_dialog_complete"),this.builder.trigger("open_dialog",this),l(document).trigger("open_dialog",this))},closeDialog:function(e){(e=_.extend({silent:!1},e)).silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},navToPrevious:function(){this.closeDialog();var e=this.getPrevDialog();null!==e&&!1!==e&&e.openDialog()},navToNext:function(){this.closeDialog();var e=this.getNextDialog();null!==e&&!1!==e&&e.openDialog()},getFormValues:function(e){_.isUndefined(e)&&(e=".so-content");var t,i=this.$(e),s={};return i.find("[name]").each((function(){var e=l(this);try{var i=/([A-Za-z_]+)\[(.*)\]/.exec(e.attr("name"));if(_.isEmpty(i))return!0;_.isUndefined(i[2])?t=e.attr("name"):(t=i[2].split("][")).unshift(i[1]),t=t.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var o=s,n=null,r=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===r)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===r){if(!e.is(":checked"))return;n=e.val()}else if("SELECT"===e.prop("tagName")){var a=e.find("option:selected");1===a.length?n=e.find("option:selected").val():a.length>1&&(n=_.map(e.find("option:selected"),(function(e,t){return l(e).val()})))}else n=e.val();if(!_.isUndefined(e.data("panels-filter")))switch(e.data("panels-filter")){case"json_parse":try{n=JSON.parse(n)}catch(e){n=""}}if(e.parents(".acf-repeater").length){if(""==n)return;t.slice(t[2],t.length)}if(null!==n)for(var d=0;d<t.length;d++)d===t.length-1?""===t[d]?o.push(n):o[t[d]]=n:(_.isUndefined(o[t[d]])&&(""===t[d+1]?o[t[d]]=[]:o[t[d]]={}),o=o[t[d]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}})),s},setStatusMessage:function(e,t,i){var s=i?'<span class="dashicons dashicons-warning"></span>'+e:e;this.$(".so-toolbar .so-status").html(s),!_.isUndefined(t)&&t?this.$(".so-toolbar .so-status").addClass("so-panels-loading"):this.$(".so-toolbar .so-status").removeClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}},onResize:function(){var e=window.matchMedia("(max-width: 980px)");["left","right"].forEach(function(t){var i=this.$(".so-"+t+"-sidebar"),s=this.$(".so-show-"+t+"-sidebar");this.hasSidebar(t)?(s.hide(),e.matches?(s.show(),s.closest(".so-title-bar").addClass("so-has-"+t+"-button"),i.hide(),i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-"+t+"-sidebar")):(s.hide(),s.closest(".so-title-bar").removeClass("so-has-"+t+"-button"),i.show(),i.closest(".so-panels-dialog").addClass("so-panels-dialog-has-"+t+"-sidebar"))):(i.hide(),s.hide())}.bind(this))},hasSidebar:function(e){return this.$(".so-"+e+"-sidebar").children().length>0},toggleLeftSideBar:function(){this.toggleSidebar("left")},toggleRightSideBar:function(){this.toggleSidebar("right")},toggleSidebar:function(e){var t=this.$(".so-"+e+"-sidebar");t.is(":visible")?t.hide():t.show()}})},{}],28:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-save":"closeAndSave","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle","keyup .live-editor-mode":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(e){e=_.extend({builder:!1,previewUrl:!1},e),_.isEmpty(e.previewUrl)&&(e.previewUrl=panelsOptions.ajaxurl+"&action=so_panels_live_editor_preview"),this.builder=e.builder,this.previewUrl=e.previewUrl,this.listenTo(this.builder.model,"refresh_panels_data",this.handleRefreshData),this.listenTo(this.builder.model,"load_panels_data",this.handleLoadData)},render:function(){if(this.setElement(this.template()),this.$el.hide(),l("#submitdiv #save-post").length>0){var e=this.$el.find(".live-editor-save");e.text(e.data("save"))}var t=!1;l(document).on("mousedown",(function(){t=!0})).on("mouseup",(function(){t=!1}));var i=this;return this.$el.on("mouseenter focusin",".so-widget",(function(){var e=l(this).data("live-editor-preview-widget");t||void 0===e||!e.length||i.$(".so-preview-overlay").is(":visible")||(i.highlightElement(e),i.scrollToElement(e))})),this.$el.on("mouseleave focusout",".so-widget",function(){this.resetHighlights()}.bind(this)),this.listenTo(this.builder,"open_dialog",(function(){this.resetHighlights()})),this},attach:function(){this.$el.appendTo("body")},open:function(){if(""===this.$el.html()&&this.render(),0===this.$el.closest("body").length&&this.attach(),s.helpers.pageScroll.lock(),this.$el.is(":visible"))return this;if(this.$el.show(),this.refreshPreview(this.builder.model.getPanelsData()),l(".live-editor-close").trigger("focus"),this.originalContainer=this.builder.$el.parent(),this.builder.$el.appendTo(this.$(".so-live-editor-builder")),this.builder.$(".so-tool-button.so-live-editor").hide(),this.builder.trigger("builder_resize"),"auto-draft"===l("#original_post_status").val()&&!this.autoSaved){var e=this;wp.autosave&&(""===l('#title[name="post_title"]').val()&&l('#title[name="post_title"]').val(panelsOptions.loc.draft).trigger("keydown"),l(document).one("heartbeat-tick.autosave",(function(){e.autoSaved=!0,e.refreshPreview(e.builder.model.getPanelsData())})),wp.autosave.server.triggerSave())}},close:function(e=!0){return this.$el.is(":visible")?e&&this.builder.config.liveEditorCloseAfter?(l("#wp-admin-bar-view a")[0].click(),this):(this.$el.hide(),s.helpers.pageScroll.unlock(),this.builder.$el.appendTo(this.originalContainer),this.builder.$(".so-tool-button.so-live-editor").show(),void this.builder.trigger("builder_resize")):this},closeAndSave:function(){this.close(!1),l(".block-editor-page").length?l(".editor-post-publish-button")[0].click():l('#submitdiv input[type="submit"][name="save"]')[0].click()},collapse:function(){this.$el.toggleClass("so-collapsed")},highlightElement:function(e){_.isUndefined(this.resetHighlightTimeout)||clearTimeout(this.resetHighlightTimeout),this.previewIframe.contents().find("body").find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return 0===l(this).parents(".so-panel").length})).not(e).addClass("so-panels-faded"),e.removeClass("so-panels-faded").addClass("so-panels-highlighted")},resetHighlights:function(){var e=this.previewIframe.contents().find("body");this.resetHighlightTimeout=setTimeout((function(){e.find(".panel-grid .panel-grid-cell .so-panel").removeClass("so-panels-faded so-panels-highlighted")}),100)},scrollToElement:function(e){this.$(".so-preview iframe")[0].contentWindow.liveEditorScrollTo(e)},handleRefreshData:function(e){if(!this.$el.is(":visible"))return this;this.refreshPreview(e)},handleLoadData:function(){if(!this.$el.is(":visible"))return this;this.refreshPreview(this.builder.model.getPanelsData())},refreshPreview:function(e){var t=this.loadTimes.length?_.reduce(this.loadTimes,(function(e,t){return e+t}),0)/this.loadTimes.length:1e3;_.isNull(this.previewIframe)||this.$(".so-preview-overlay").is(":visible")||(this.previewScrollTop=this.previewIframe.contents().scrollTop()),this.$(".so-preview-overlay").show(),this.$(".so-preview-overlay .so-loading-bar").clearQueue().css("width","0%").animate({width:"100%"},parseInt(t)+100),this.postToIframe({live_editor_panels_data:JSON.stringify(e),live_editor_post_ID:this.builder.config.postId},this.previewUrl,this.$(".so-preview")),this.previewIframe.data("load-start",(new Date).getTime())},postToIframe:function(e,t,i){_.isNull(this.previewIframe)||this.previewIframe.remove();var s="siteorigin-panels-live-preview-"+this.previewFrameId;this.previewIframe=l('<iframe src="'+t+'"></iframe>').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post"></form>').attr({id:s,target:this.previewIframe.attr("id"),action:t}).appendTo("body");return l.each(e,(function(e,t){l('<input type="hidden" />').attr({name:e,value:t}).appendTo(o)})),o.trigger("submit").remove(),this.previewFrameId++,this.previewIframe},setupPreviewFrame:function(e){var t=this;e.data("iframeready",!1).on("iframeready",(function(){var e=l(this),i=e.contents();if(!e.data("iframeready")){e.data("iframeready",!0),void 0!==e.data("load-start")&&(t.loadTimes.unshift((new Date).getTime()-e.data("load-start")),_.isEmpty(t.loadTimes)||(t.loadTimes=t.loadTimes.slice(0,4))),l(".live-editor-mode.so-active").length&&(l(".so-panels-live-editor .so-preview iframe").css("transition","none"),t.mobileToggle()),setTimeout((function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide(),l(".so-panels-live-editor .so-preview iframe").css("transition","all .2s ease")}),100);var s=i.find("#pl-"+t.builder.config.postId);s.find(".panel-grid .panel-grid-cell .so-panel").filter((function(){return l(this).closest(".panel-layout").is(s)})).each((function(e,i){var s=l(i),o=t.$(".so-live-editor-builder .so-widget").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).on("mouseenter",(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)})).on("mouseleave",(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()})).on("click",(function(e){e.preventDefault(),o.find(".title h4").trigger("click")}))})),i.find("a").css({"pointer-events":"none"}).on("click",(function(e){e.preventDefault()}))}})).on("load",(function(){var e=l(this);e.data("iframeready")||e.trigger("iframeready")}))},hasPreviewUrl:function(){return""!==this.$("form.live-editor-form").attr("action")},mobileToggle:function(e){var t=l(void 0!==e?e.currentTarget:".live-editor-mode.so-active");this.$(".live-editor-mode").not(t).removeClass("so-active"),t.addClass("so-active"),this.$el.removeClass("live-editor-desktop-mode live-editor-tablet-mode live-editor-mobile-mode").addClass("live-editor-"+t.data("mode")+"-mode").find("iframe").css("width",t.data("width"))}})},{}],29:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-row").html())),events:{"click .so-row-settings":"editSettingsHandler","click .so-row-duplicate":"duplicateHandler","click .so-row-delete":"confirmedDeleteHandler","click .so-row-color":"rowColorChangeHandler"},builder:null,dialog:null,initialize:function(){var e=this.model.get("cells");this.listenTo(e,"add",this.handleCellAdd),this.listenTo(e,"remove",this.handleCellRemove),this.listenTo(this.model,"reweight_cells",this.resizeRow),this.listenTo(this.model,"destroy",this.onModelDestroy);var t=this;e.each((function(e){t.listenTo(e.get("widgets"),"add",t.resize)})),e.on("add",(function(e){t.listenTo(e.get("widgets"),"add",t.resize)}),this),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(){var e=this.model.has("color_label")?this.model.get("color_label"):1,t=this.model.has("label")?this.model.get("label"):"";this.setElement(this.template({rowColorLabel:e,rowLabel:t})),this.$el.data("view",this);var i=this;return this.model.get("cells").each((function(e){var t=new s.view.cell({model:e});t.row=i,t.render(),t.$el.appendTo(i.$(".so-cells"))})),this.builder.supports("rowAction")?(this.builder.supports("editRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteRow")||(this.$(".so-row-toolbar .so-dropdown-links-wrapper .so-row-delete").parent().remove(),this.$el.addClass("so-row-no-delete"))):(this.$(".so-row-toolbar .so-dropdown-wrapper").remove(),this.$el.addClass("so-row-no-actions")),this.builder.supports("moveRow")||(this.$(".so-row-toolbar .so-row-move").remove(),this.$el.addClass("so-row-no-move")),this.$(".so-row-toolbar").html().trim().length||this.$(".so-row-toolbar").remove(),this.listenTo(this.builder,"widget_sortable_move",this.resizeRow),this.listenTo(this.builder,"builder_resize",this.resizeRow),this.resizeRow(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resizeRow:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0),this.$(".so-cells").removeClass("so-action-icons");var t,i=0,s=0,o=!1;this.$(".so-cells .cell").each((function(){t=l(this),l(this).css("width",100*t.data("view").model.get("weight")+"%"),(s=t.width())<215?(t.addClass("so-show-icon"),o=!0,s<125?t.addClass("so-small-actions"):t.removeClass("so-small-actions")):t.removeClass("so-show-icon so-small-actions"),i=Math.max(i,t.height())})),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(i,63)+"px"),o&&this.$(".so-cells").addClass("so-action-icons"),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight()+"px")}},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){this.builder.addHistoryEntry("row_deleted");var e=this;this.$el.fadeOut("normal",(function(){e.model.destroy(),e.builder.model.refreshPanelsData()}))},onLabelChange:function(e,t){0==this.$(".so-row-label").length?this.$(".so-row-toolbar").prepend('<h3 class="so-row-label">'+t+"</h3>"):this.$(".so-row-label").text(t)},duplicateHandler:function(){this.builder.addHistoryEntry("row_duplicated");var e=this.model.clone(this.builder.model);this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},pasteHandler:function(){var e=s.helpers.clipboard.getModel("row-model");!_.isEmpty(e)&&e instanceof s.model.row&&(this.builder.addHistoryEntry("row_pasted"),e.builder=this.builder.model,this.builder.model.get("rows").add(e,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData())},confirmedDeleteHandler:function(e){var t=l(e.target);if(t.hasClass("dashicons")&&(t=t.parent()),t.hasClass("so-confirmed"))this.visualDestroyModel();else{var i=t.html();t.addClass("so-confirmed").html('<span class="dashicons dashicons-yes"></span>'+panelsOptions.loc.dropdown_confirm),setTimeout((function(){t.removeClass("so-confirmed").html(i)}),2500)}},editSettingsHandler:function(){if(this.builder.supports("editRow"))return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model),this.dialog.rowView=this),this.dialog.openDialog(),this},deleteHandler:function(){return this.model.destroy(),this},rowColorChangeHandler:function(e){this.$(".so-row-color").removeClass("so-row-color-selected");var t=l(e.target),i=t.data("color-label"),s=this.model.has("color_label")?this.model.get("color_label"):1;t.addClass("so-row-color-selected"),this.$el.removeClass("so-row-color-"+s),this.$el.addClass("so-row-color-"+i),this.model.set("color_label",i)},handleCellAdd:function(e){var t=new s.view.cell({model:e});t.row=this,t.render(),t.$el.appendTo(this.$(".so-cells"))},handleCellRemove:function(e){this.$(".so-cells > .cell").each((function(){var t=l(this).data("view");_.isUndefined(t)||t.model.cid===e.cid&&t.remove()}))},buildContextualMenu:function(e,t){for(var i=[],l=1;l<5;l++)i.push({title:l+" "+panelsOptions.loc.contextual.column});this.builder.supports("addRow")&&t.addSection("add-row",{sectionTitle:panelsOptions.loc.contextual.add_row,search:!1},i,function(e){this.builder.addHistoryEntry("row_added");for(var t=Number(e)+1,i=[],l=0;l<t;l++)i.push({weight:100/t});var o=new s.model.row({collection:this.collection}),n=new s.collection.cells(i);n.each((function(e){e.row=o})),o.setCells(n),o.builder=this.builder.model,this.builder.model.get("rows").add(o,{at:this.builder.model.get("rows").indexOf(this.model)+1}),this.builder.model.refreshPanelsData()}.bind(this));var o={};this.builder.supports("editRow")&&(o.edit={title:panelsOptions.loc.contextual.row_edit}),s.helpers.clipboard.canCopyPaste()&&(o.copy={title:panelsOptions.loc.contextual.row_copy},this.builder.supports("addRow")&&s.helpers.clipboard.isModel("row-model")&&(o.paste={title:panelsOptions.loc.contextual.row_paste})),this.builder.supports("addRow")&&(o.duplicate={title:panelsOptions.loc.contextual.row_duplicate}),this.builder.supports("deleteRow")&&(o.delete={title:panelsOptions.loc.contextual.row_delete,confirm:!0}),_.isEmpty(o)||t.addSection("row-actions",{sectionTitle:panelsOptions.loc.contextual.row_actions,search:!1},o,function(e){switch(e){case"edit":this.editSettingsHandler();break;case"copy":this.copyHandler();break;case"paste":this.pasteHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this))}})},{}],30:[function(e,t,i){window.panels;var s=jQuery;t.exports=Backbone.View.extend({stylesLoaded:!1,events:{"keyup .so-image-selector":function(e){13==e.which&&this.$el.find(".select-image").trigger("click")}},initialize:function(){},render:function(e,t,i){if(!_.isUndefined(e)){i=_.extend({builderType:"",dialog:null},i),this.$el.addClass("so-visual-styles so-"+e+"-styles so-panels-loading");var l={builderType:i.builderType};return"widget"===e&&(l.widget=this.model.get("class")),"cell"===e&&(l.index=i.index),s.post(panelsOptions.ajaxurl,{action:"so_panels_style_form",type:e,style:this.model.get("style"),args:JSON.stringify(l),postId:t},null,"html").done(function(e){this.$el.html(e),this.setupFields(),this.stylesLoaded=!0,this.trigger("styles_loaded",!_.isEmpty(e)),_.isNull(i.dialog)||i.dialog.trigger("styles_loaded",!_.isEmpty(e))}.bind(this)).fail(function(e){var t;t=e&&e.responseText?e.responseText:panelsOptions.forms.loadingFailed,this.$el.html(t)}.bind(this)).always(function(){this.$el.removeClass("so-panels-loading")}.bind(this)),this}},attach:function(e){e.append(this.$el)},detach:function(){this.$el.detach()},setupFields:function(){this.$(".style-section-wrapper").each((function(){var e=s(this);e.find(".style-section-head").on("click keypress",(function(t){t.preventDefault(),e.find(".style-section-fields").slideToggle("fast")}))})),_.isUndefined(s.fn.wpColorPicker)||(_.isObject(panelsOptions.wpColorPickerOptions.palettes)&&!s.isArray(panelsOptions.wpColorPickerOptions.palettes)&&(panelsOptions.wpColorPickerOptions.palettes=s.map(panelsOptions.wpColorPickerOptions.palettes,(function(e){return e}))),this.$(".so-wp-color-field").wpColorPicker(panelsOptions.wpColorPickerOptions)),this.$(".style-field-image").each((function(){var e=null,t=s(this);t.find(".so-image-selector").on("click",(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}})).on("select",(function(){var i=e.state().get("selection").first().attributes,s=i.url;if(!_.isUndefined(i.sizes))try{s=i.sizes.thumbnail.url}catch(e){s=i.sizes.full.url}t.find(".current-image").css("background-image","url("+s+")"),t.find(".so-image-selector > input").val(i.id),t.find(".remove-image").removeClass("hidden")})),s(this).next().focus(),e.open()})),t.find(".remove-image").on("click",(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find(".so-image-selector > input").val(""),t.find(".remove-image").addClass("hidden")}))})),this.$(".style-field-measurement").each((function(){var e=s(this),t=e.find('input[type="text"]'),i=e.find("select"),l=e.find('input[type="hidden"]');t.on("focus",(function(){s(this).trigger("select")}));!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),r=[];for(var a in n){var d=o.exec(n[a]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(r.push(d[1]),i.val(d[2]))}1===t.length?t.val(r.join(" ")):(1===r.length?r=[r[0],r[0],r[0],r[0]]:2===r.length?r=[r[0],r[1],r[0],r[1]]:3===r.length&&(r=[r[0],r[1],r[2],r[1]]),t.each((function(e,t){s(t).val(r[e])})))}}(l.val());var o=function(e){if(1===t.length){var o=t.val().split(" ").filter((function(e){return""!==e})).map((function(e){return e+i.val()})).join(" ");l.val(o)}else{var n=s(e.target),r=[],a=[],d=[];t.each((function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;r.push(i),null===i?a.push(e):d.push(e)})),3===a.length&&d[0]===t.index(n)&&(t.val(n.val()),r=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(r)===JSON.stringify([null,null,null,null])?l.val(""):l.val(r.map((function(e){return(null===e?0:e)+i.val()})).join(" "))}};t.on("change",o),i.on("change",o)})),s(document).trigger("setup_style_fields",this)}})},{}],31:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=Backbone.View.extend({template:_.template(s.helpers.utils.processTemplate(l("#siteorigin-panels-builder-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","touchend .widget-edit":"editHandler","click .title h4":"editHandler","touchend .title h4":"editHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler","keyup .actions a":function(e){s.helpers.accessibility.triggerClickOnEnter(e)}},initialize:function(){this.listenTo(this.model,"destroy",this.onModelDestroy),this.listenTo(this.model,"change:values",this.onModelChange),this.listenTo(this.model,"change:label",this.onLabelChange)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle(),widget_class:this.model.attributes.class})),this.$el.data("view",this),this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")||(this.$(".actions .widget-edit").remove(),this.$el.addClass("so-widget-no-edit")),this.cell.row.builder.supports("addWidget")||(this.$(".actions .widget-duplicate").remove(),this.$el.addClass("so-widget-no-duplicate")),this.cell.row.builder.supports("deleteWidget")||(this.$(".actions .widget-delete").remove(),this.$el.addClass("so-widget-no-delete")),this.cell.row.builder.supports("moveWidget")||this.$el.addClass("so-widget-no-move"),this.$(".actions").html().trim().length||this.$(".actions").remove(),this.model.get("read_only")&&this.$el.addClass("so-widget-read-only"),0===_.size(this.model.get("values"))||e.loadForm){var t=this.getEditDialog();t.once("form_loaded",t.saveWidget,t),t.setupDialog()}return this.listenTo(this.cell.row.builder,"after_user_adds_widget",this.afterUserAddsWidgetHandler),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},getEditDialog:function(){return null===this.dialog&&(this.dialog=new s.dialog.widget({model:this.model}),this.dialog.setBuilder(this.cell.row.builder),this.dialog.widgetView=this),this.dialog},editHandler:function(){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.getEditDialog().openDialog(),this)},duplicateHandler:function(){this.cell.row.builder.addHistoryEntry("widget_duplicated");var e=this.model.clone(this.model.cell);return this.cell.model.get("widgets").add(e,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this},copyHandler:function(){s.helpers.clipboard.setModel(this.model)},deleteHandler:function(){return this.visualDestroyModel(),this},onModelChange:function(){this.$(".description").html(this.model.getTitle())},onLabelChange:function(e){this.$(".title > h4").text(e.getWidgetField("title"))},onModelDestroy:function(){this.remove()},visualDestroyModel:function(){return this.cell.row.builder.addHistoryEntry("widget_deleted"),this.$el.fadeOut("fast",function(){this.cell.row.resizeRow(),this.model.destroy(),this.cell.row.builder.model.refreshPanelsData(),this.remove()}.bind(this)),this},buildContextualMenu:function(e,t){this.cell.row.builder.supports("addWidget")&&t.addSection("add-widget-below",{sectionTitle:panelsOptions.loc.contextual.add_widget_below,searchPlaceholder:panelsOptions.loc.contextual.search_widgets,defaultDisplay:panelsOptions.contextual.default_widgets},panelsOptions.widgets,function(e){this.cell.row.builder.trigger("before_user_adds_widget"),this.cell.row.builder.addHistoryEntry("widget_added");var t=new s.model.widget({class:e});t.cell=this.cell.model,this.cell.model.get("widgets").add(t,{at:this.model.collection.indexOf(this.model)+1}),this.cell.row.builder.model.refreshPanelsData(),this.cell.row.builder.trigger("after_user_adds_widget",t)}.bind(this));var i={};this.cell.row.builder.supports("editWidget")&&!this.model.get("read_only")&&(i.edit={title:panelsOptions.loc.contextual.widget_edit}),s.helpers.clipboard.canCopyPaste()&&(i.copy={title:panelsOptions.loc.contextual.widget_copy}),this.cell.row.builder.supports("addWidget")&&(i.duplicate={title:panelsOptions.loc.contextual.widget_duplicate}),this.cell.row.builder.supports("deleteWidget")&&(i.delete={title:panelsOptions.loc.contextual.widget_delete,confirm:!0}),_.isEmpty(i)||t.addSection("widget-actions",{sectionTitle:panelsOptions.loc.contextual.widget_actions,search:!1},i,function(e){switch(e){case"edit":this.editHandler();break;case"copy":this.copyHandler();break;case"duplicate":this.duplicateHandler();break;case"delete":this.visualDestroyModel()}}.bind(this)),this.cell.buildContextualMenu(e,t)},afterUserAddsWidgetHandler:function(e){this.model===e&&panelsOptions.instant_open&&setTimeout(this.editHandler.bind(this),350)}})},{}],32:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.customHtmlWidgets,o=s("<div></div>"),n=t.find(".widget-content:first");n.before(o);var r=new l.CustomHtmlWidgetControl({el:o,syncContainer:n});return r.initializeEditor(),r.editor.codemirror.refresh(),r}};t.exports=l},{}],33:[function(e,t,i){var s=e("./custom-html-widget"),l=e("./media-widget"),o=e("./text-widget"),n={CUSTOM_HTML:"custom_html",MEDIA_AUDIO:"media_audio",MEDIA_GALLERY:"media_gallery",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,n=e.find("> .id_base").val();switch(n){case this.CUSTOM_HTML:i=s;break;case this.MEDIA_AUDIO:case this.MEDIA_GALLERY:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=l;break;case this.TEXT:i=o}i.addWidget(n,e,t)}};t.exports=n},{"./custom-html-widget":32,"./media-widget":34,"./text-widget":35}],34:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.mediaWidgets,o=l.controlConstructors[e];if(o){var n=l.modelConstructors[e]||l.MediaWidgetModel,r=t.find("> .widget-content"),a=s('<div class="media-widget-control"></div>');r.before(a);var d={};r.find(".media-widget-instance-property").each((function(){var e=s(this);d[e.data("property")]=e.val()})),d.widget_id=i;var c=new o({el:a,syncContainer:r,model:new n(d)});return c.render(),c}}};t.exports=l},{}],35:[function(e,t,i){var s=jQuery,l={addWidget:function(e,t,i){var l=wp.textWidgets,o={},n=t.find(".visual");if(n.length>0){if(!n.val())return null;var r=s("<div></div>"),a=t.find(".widget-content:first");a.before(r),o={el:r,syncContainer:a}}else o={el:t};var d=new l.TextWidgetControl(o),c=wp.oldEditor?wp.oldEditor:wp.editor;return c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize),d.initializeEditor(),d}};t.exports=l},{}]},{},[18]);
js/styling.js CHANGED
@@ -1,9 +1,11 @@
1
  /* global _, jQuery */
2
 
3
  jQuery( function ( $ ) {
4
-
5
  // Stretch all the full width rows
6
  var stretchFullWidthRows = function () {
 
 
 
7
  var fullContainer = $( panelsStyles.fullContainer );
8
  if ( fullContainer.length === 0 ) {
9
  fullContainer = $( 'body' );
1
  /* global _, jQuery */
2
 
3
  jQuery( function ( $ ) {
 
4
  // Stretch all the full width rows
5
  var stretchFullWidthRows = function () {
6
+ if ( ! panelsStyles.stretchRows ) {
7
+ return;
8
+ }
9
  var fullContainer = $( panelsStyles.fullContainer );
10
  if ( fullContainer.length === 0 ) {
11
  fullContainer = $( 'body' );
js/styling.min.js CHANGED
@@ -1 +1 @@
1
- jQuery((function(e){var a=function(){var a=e(panelsStyles.fullContainer);0===a.length&&(a=e("body"));var l=e(".siteorigin-panels-stretch.panel-row-style");l.each((function(){var l=e(this),t=l.data("stretch-type"),r="full-stretched-padded"===t?"":0;l.css({"margin-left":0,"margin-right":0,"padding-left":r,"padding-right":r});var i=l.offset().left-a.offset().left,n=a.outerWidth()-i-l.parent().outerWidth();l.css({"margin-left":-i+"px","margin-right":-n+"px","padding-left":"full"===t?i+"px":r,"padding-right":"full"===t?n+"px":r});var s=l.find("> .panel-grid-cell");"full-stretched"===t&&1===s.length&&s.css({"padding-left":0,"padding-right":0}),l.css({"border-left":r,"border-right":r})})),l.length&&e(window).trigger("panelsStretchRows")};a();var l=function(){"undefined"==typeof parallaxStyles||"undefined"==typeof simpleParallax||parallaxStyles["disable-parallax-mobile"]&&window.matchMedia("(max-width: "+parallaxStyles["mobile-breakpoint"]+")").matches||new simpleParallax(document.querySelectorAll("[data-siteorigin-parallax], .sow-slider-image-parallax .sow-slider-background-image"),{delay:parallaxStyles.delay,scale:parallaxStyles.scale<1.1?1.1:parallaxStyles.scale})};l(),e(window).on("resize load",(function(){a(),l()})),e("body").removeClass("siteorigin-panels-before-js")}));
1
+ jQuery((function(e){var a=function(){if(panelsStyles.stretchRows){var a=e(panelsStyles.fullContainer);0===a.length&&(a=e("body"));var l=e(".siteorigin-panels-stretch.panel-row-style");l.each((function(){var l=e(this),t=l.data("stretch-type"),r="full-stretched-padded"===t?"":0;l.css({"margin-left":0,"margin-right":0,"padding-left":r,"padding-right":r});var i=l.offset().left-a.offset().left,s=a.outerWidth()-i-l.parent().outerWidth();l.css({"margin-left":-i+"px","margin-right":-s+"px","padding-left":"full"===t?i+"px":r,"padding-right":"full"===t?s+"px":r});var n=l.find("> .panel-grid-cell");"full-stretched"===t&&1===n.length&&n.css({"padding-left":0,"padding-right":0}),l.css({"border-left":r,"border-right":r})})),l.length&&e(window).trigger("panelsStretchRows")}};a();var l=function(){"undefined"==typeof parallaxStyles||"undefined"==typeof simpleParallax||parallaxStyles["disable-parallax-mobile"]&&window.matchMedia("(max-width: "+parallaxStyles["mobile-breakpoint"]+")").matches||new simpleParallax(document.querySelectorAll("[data-siteorigin-parallax], .sow-slider-image-parallax .sow-slider-background-image"),{delay:parallaxStyles.delay,scale:parallaxStyles.scale<1.1?1.1:parallaxStyles.scale})};l(),e(window).on("resize load",(function(){a(),l()})),e("body").removeClass("siteorigin-panels-before-js")}));
lang/siteorigin-panels.pot CHANGED
@@ -36,15 +36,15 @@ msgstr ""
36
  msgid "https://siteorigin.com"
37
  msgstr ""
38
 
39
- #: siteorigin-panels.php:377
40
  msgid "Read More"
41
  msgstr ""
42
 
43
- #: siteorigin-panels.php:547
44
  msgid "Edit Home Page"
45
  msgstr ""
46
 
47
- #: siteorigin-panels.php:567, tpl/js-templates.php:34, tpl/js-templates.php:36
48
  msgid "Live Editor"
49
  msgstr ""
50
 
@@ -141,7 +141,7 @@ msgstr ""
141
  msgid "WordPress Widgets"
142
  msgstr ""
143
 
144
- #: inc/admin-widget-dialog.php:185, inc/settings.php:405
145
  msgid "Recommended Widgets"
146
  msgstr ""
147
 
@@ -165,367 +165,367 @@ msgstr ""
165
  msgid "Addons"
166
  msgstr ""
167
 
168
- #: inc/admin.php:187, inc/admin.php:613, inc/admin.php:1283, inc/admin.php:1288, inc/settings.php:224, tpl/js-templates.php:212
169
  msgid "Page Builder"
170
  msgstr ""
171
 
172
- #: inc/admin.php:345
173
  msgid "All Widgets"
174
  msgstr ""
175
 
176
- #: inc/admin.php:380
177
  msgid "Missing Widget"
178
  msgstr ""
179
 
180
- #: inc/admin.php:381
181
  msgid "Page Builder doesn't know about this widget."
182
  msgstr ""
183
 
184
  #. translators: Number of seconds since
185
- #: inc/admin.php:385
186
  msgid "%d seconds"
187
  msgstr ""
188
 
189
  #. translators: Number of minutes since
190
- #: inc/admin.php:387
191
  msgid "%d minutes"
192
  msgstr ""
193
 
194
  #. translators: Number of hours since
195
- #: inc/admin.php:389
196
  msgid "%d hours"
197
  msgstr ""
198
 
199
  #. translators: A single second since
200
- #: inc/admin.php:392
201
  msgid "%d second"
202
  msgstr ""
203
 
204
  #. translators: A single minute since
205
- #: inc/admin.php:394
206
  msgid "%d minute"
207
  msgstr ""
208
 
209
  #. translators: A single hour since
210
- #: inc/admin.php:396
211
  msgid "%d hour"
212
  msgstr ""
213
 
214
  #. translators: Time ago - eg. "1 minute before".
215
- #: inc/admin.php:399
216
  msgid "%s before"
217
  msgstr ""
218
 
219
- #: inc/admin.php:400
220
  msgid "Now"
221
  msgstr ""
222
 
223
- #: inc/admin.php:404
224
  msgid "Current"
225
  msgstr ""
226
 
227
- #: inc/admin.php:405
228
  msgid "Original"
229
  msgstr ""
230
 
231
- #: inc/admin.php:406
232
  msgid "Version restored"
233
  msgstr ""
234
 
235
- #: inc/admin.php:407
236
  msgid "Converted to editor"
237
  msgstr ""
238
 
239
  #. translators: Message displayed in the history when a widget is deleted
240
- #: inc/admin.php:411
241
  msgid "Widget deleted"
242
  msgstr ""
243
 
244
  #. translators: Message displayed in the history when a widget is added
245
- #: inc/admin.php:413
246
  msgid "Widget added"
247
  msgstr ""
248
 
249
  #. translators: Message displayed in the history when a widget is edited
250
- #: inc/admin.php:415
251
  msgid "Widget edited"
252
  msgstr ""
253
 
254
  #. translators: Message displayed in the history when a widget is duplicated
255
- #: inc/admin.php:417
256
  msgid "Widget duplicated"
257
  msgstr ""
258
 
259
  #. translators: Message displayed in the history when a widget position is changed
260
- #: inc/admin.php:419
261
  msgid "Widget moved"
262
  msgstr ""
263
 
264
  #. translators: Message displayed in the history when a row is deleted
265
- #: inc/admin.php:423
266
  msgid "Row deleted"
267
  msgstr ""
268
 
269
  #. translators: Message displayed in the history when a row is added
270
- #: inc/admin.php:425
271
  msgid "Row added"
272
  msgstr ""
273
 
274
  #. translators: Message displayed in the history when a row is edited
275
- #: inc/admin.php:427
276
  msgid "Row edited"
277
  msgstr ""
278
 
279
  #. translators: Message displayed in the history when a row position is changed
280
- #: inc/admin.php:429
281
  msgid "Row moved"
282
  msgstr ""
283
 
284
  #. translators: Message displayed in the history when a row is duplicated
285
- #: inc/admin.php:431
286
  msgid "Row duplicated"
287
  msgstr ""
288
 
289
  #. translators: Message displayed in the history when a row is pasted
290
- #: inc/admin.php:433
291
  msgid "Row pasted"
292
  msgstr ""
293
 
294
- #: inc/admin.php:436
295
  msgid "Cell resized"
296
  msgstr ""
297
 
298
- #: inc/admin.php:439
299
  msgid "Prebuilt layout loaded"
300
  msgstr ""
301
 
302
- #: inc/admin.php:443
303
  msgid "Loading prebuilt layout"
304
  msgstr ""
305
 
306
- #: inc/admin.php:444
307
  msgid "Would you like to copy this editor's existing content to Page Builder?"
308
  msgstr ""
309
 
310
- #: inc/admin.php:445
311
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
312
  msgstr ""
313
 
314
  #. translators: This is the title for a widget called "Layout Builder"
315
- #: inc/admin.php:447
316
  msgid "Layout Builder Widget"
317
  msgstr ""
318
 
319
  #. translators: A standard confirmation message
320
- #: inc/admin.php:449, tpl/js-templates.php:97, tpl/js-templates.php:437
321
  msgid "Are you sure?"
322
  msgstr ""
323
 
324
  #. translators: When a layout file is ready to be inserted. %s is the filename.
325
- #: inc/admin.php:451
326
  msgid "%s is ready to insert."
327
  msgstr ""
328
 
329
- #: inc/admin.php:455
330
  msgid "Add Widget Below"
331
  msgstr ""
332
 
333
- #: inc/admin.php:456
334
  msgid "Add Widget to Cell"
335
  msgstr ""
336
 
337
- #: inc/admin.php:457, tpl/js-templates.php:239
338
  msgid "Search Widgets"
339
  msgstr ""
340
 
341
- #: inc/admin.php:459, tpl/js-templates.php:17, tpl/js-templates.php:19
342
  msgid "Add Row"
343
  msgstr ""
344
 
345
- #: inc/admin.php:460
346
  msgid "Column"
347
  msgstr ""
348
 
349
- #: inc/admin.php:462
350
  msgid "Cell Actions"
351
  msgstr ""
352
 
353
- #: inc/admin.php:463
354
  msgid "Paste Widget"
355
  msgstr ""
356
 
357
- #: inc/admin.php:465
358
  msgid "Widget Actions"
359
  msgstr ""
360
 
361
- #: inc/admin.php:466
362
  msgid "Edit Widget"
363
  msgstr ""
364
 
365
- #: inc/admin.php:467
366
  msgid "Duplicate Widget"
367
  msgstr ""
368
 
369
- #: inc/admin.php:468
370
  msgid "Delete Widget"
371
  msgstr ""
372
 
373
- #: inc/admin.php:469
374
  msgid "Copy Widget"
375
  msgstr ""
376
 
377
- #: inc/admin.php:470
378
  msgid "Paste Widget Below"
379
  msgstr ""
380
 
381
- #: inc/admin.php:472
382
  msgid "Row Actions"
383
  msgstr ""
384
 
385
- #: inc/admin.php:473, tpl/js-templates.php:95
386
  msgid "Edit Row"
387
  msgstr ""
388
 
389
- #: inc/admin.php:474, tpl/js-templates.php:96
390
  msgid "Duplicate Row"
391
  msgstr ""
392
 
393
- #: inc/admin.php:475, tpl/js-templates.php:97
394
  msgid "Delete Row"
395
  msgstr ""
396
 
397
- #: inc/admin.php:476
398
  msgid "Copy Row"
399
  msgstr ""
400
 
401
- #: inc/admin.php:477
402
  msgid "Paste Row"
403
  msgstr ""
404
 
405
- #: inc/admin.php:479
406
  msgid "Draft"
407
  msgstr ""
408
 
409
- #: inc/admin.php:480
410
  msgid "Untitled"
411
  msgstr ""
412
 
413
- #: inc/admin.php:482
414
  msgid "New Row"
415
  msgstr ""
416
 
417
- #: inc/admin.php:483, inc/admin.php:491, inc/styles.php:216, tpl/js-templates.php:62
418
  msgid "Row"
419
  msgstr ""
420
 
421
- #: inc/admin.php:486
422
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
423
  msgstr ""
424
 
425
- #: inc/admin.php:487
426
  msgid "Add a {{%= items[0] %}} to get started."
427
  msgstr ""
428
 
429
- #: inc/admin.php:488
430
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
431
  msgstr ""
432
 
433
- #: inc/admin.php:489
434
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
435
  msgstr ""
436
 
437
- #: inc/admin.php:490, inc/styles.php:368, tpl/js-templates.php:61
438
  msgid "Widget"
439
  msgstr ""
440
 
441
- #: inc/admin.php:492, tpl/js-templates.php:63
442
  msgid "Prebuilt Layout"
443
  msgstr ""
444
 
445
- #: inc/admin.php:494
446
  msgid "Read our %s if you need help."
447
  msgstr ""
448
 
449
- #: inc/admin.php:495, tpl/js-templates.php:64
450
  msgid "documentation"
451
  msgstr ""
452
 
453
- #: inc/admin.php:504
454
  msgid "Page Builder layouts"
455
  msgstr ""
456
 
457
- #: inc/admin.php:505
458
  msgid "Error uploading or importing file."
459
  msgstr ""
460
 
461
- #: inc/admin.php:512
462
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
463
  msgstr ""
464
 
465
  #. translators: This is the default name given to a user's home page
466
- #: inc/admin.php:696, inc/home.php:26
467
  msgid "Home Page"
468
  msgstr ""
469
 
470
- #: inc/admin.php:797
471
  msgid "Untitled Widget"
472
  msgstr ""
473
 
474
- #: inc/admin.php:977
475
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
476
  msgstr ""
477
 
478
- #: inc/admin.php:983
479
  msgid "Save and reload this page to start using the widget after you've installed it."
480
  msgstr ""
481
 
482
- #: inc/admin.php:999
483
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
484
  msgstr ""
485
 
486
- #: inc/admin.php:1186, inc/styles-admin.php:25
487
  msgid "The supplied nonce is invalid."
488
  msgstr ""
489
 
490
- #: inc/admin.php:1187, inc/styles-admin.php:26
491
  msgid "Invalid nonce."
492
  msgstr ""
493
 
494
- #: inc/admin.php:1193
495
  msgid "Please specify the type of widget form to be rendered."
496
  msgstr ""
497
 
498
- #: inc/admin.php:1194
499
  msgid "Missing widget type."
500
  msgstr ""
501
 
502
- #: inc/admin.php:1301
503
  msgid "%s Widget"
504
  msgid_plural "%s Widgets"
505
  msgstr[0] ""
506
  msgstr[1] ""
507
 
508
- #: inc/admin.php:1344
509
  msgid "Get a lightbox addon for SiteOrigin widgets"
510
  msgstr ""
511
 
512
- #: inc/admin.php:1348
513
  msgid "Get the row, cell and widget animations addon"
514
  msgstr ""
515
 
516
- #: inc/admin.php:1352
517
  msgid "Get premium email support for SiteOrigin Page Builder"
518
  msgstr ""
519
 
520
- #: inc/admin.php:1537
521
  msgid "Toggle editor selection menu"
522
  msgstr ""
523
 
524
- #: inc/admin.php:1538, inc/admin.php:1585, inc/settings.php:224, settings/tpl/settings.php:9
525
  msgid "SiteOrigin Page Builder"
526
  msgstr ""
527
 
528
- #: inc/admin.php:1539
529
  msgid "Block Editor"
530
  msgstr ""
531
 
@@ -533,7 +533,7 @@ msgstr ""
533
  msgid "Custom Home Page Builder"
534
  msgstr ""
535
 
536
- #: inc/renderer.php:321
537
  msgid "Prevented SiteOrigin layout from repeated rendering."
538
  msgstr ""
539
 
@@ -541,319 +541,327 @@ msgstr ""
541
  msgid "Page Builder Content"
542
  msgstr ""
543
 
544
- #: inc/settings.php:251
545
  msgid "Page Builder Settings"
546
  msgstr ""
547
 
548
- #: inc/settings.php:267
549
  msgid "General"
550
  msgstr ""
551
 
552
- #: inc/settings.php:273
553
  msgid "Post Types"
554
  msgstr ""
555
 
556
- #: inc/settings.php:275
557
  msgid "The post types on which to use Page Builder."
558
  msgstr ""
559
 
560
- #: inc/settings.php:280
561
  msgid "Use Classic Editor for New Posts"
562
  msgstr ""
563
 
564
- #: inc/settings.php:281
565
  msgid "New posts of the above Post Types will be created using the Classic Editor."
566
  msgstr ""
567
 
568
- #: inc/settings.php:286
569
- msgid "Live Editor Quick Link"
570
  msgstr ""
571
 
572
- #: inc/settings.php:287
573
- msgid "Display a Live Editor button in the WordPress admin bar."
574
  msgstr ""
575
 
576
- #: inc/settings.php:292
 
 
 
 
 
 
 
 
577
  msgid "Display Post State"
578
  msgstr ""
579
 
580
- #: inc/settings.php:294
581
  msgid "Display a %sSiteOrigin Page Builder%s post state in the admin lists of posts/pages to indicate Page Builder is active."
582
  msgstr ""
583
 
584
- #: inc/settings.php:302
585
  msgid "Display Widget Count"
586
  msgstr ""
587
 
588
- #: inc/settings.php:303
589
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
590
  msgstr ""
591
 
592
- #: inc/settings.php:308
593
  msgid "Parallax Type"
594
  msgstr ""
595
 
596
- #: inc/settings.php:310
597
  msgid "Modern"
598
  msgstr ""
599
 
600
- #: inc/settings.php:311
601
  msgid "Legacy"
602
  msgstr ""
603
 
604
- #: inc/settings.php:313
605
  msgid "Modern is recommended as it can use smaller images and offers better performance."
606
  msgstr ""
607
 
608
- #: inc/settings.php:318
609
  msgid "Disable Parallax On Mobile"
610
  msgstr ""
611
 
612
- #: inc/settings.php:319
613
  msgid "Disable row/widget background parallax when the browser is smaller than the mobile width."
614
  msgstr ""
615
 
616
- #: inc/settings.php:325
617
  msgid "Limit Parallax Motion"
618
  msgstr ""
619
 
620
- #: inc/settings.php:326
621
  msgid "How many pixels of scrolling results in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
622
  msgstr ""
623
 
624
- #: inc/settings.php:332
625
  msgid "Parallax Delay"
626
  msgstr ""
627
 
628
- #: inc/settings.php:333
629
  msgid "The delay before the parallax effect finishes after the user stops scrolling."
630
  msgstr ""
631
 
632
- #: inc/settings.php:338
633
  msgid "Parallax Scale"
634
  msgstr ""
635
 
636
- #: inc/settings.php:339
637
  msgid "How much the image is scaled. The higher the scale is set, the more visible the parallax effect will be. Increasing the scale will result in a loss of image quality."
638
  msgstr ""
639
 
640
- #: inc/settings.php:344
641
  msgid "Sidebars Emulator"
642
  msgstr ""
643
 
644
- #: inc/settings.php:345
645
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
646
  msgstr ""
647
 
648
- #: inc/settings.php:350
649
  msgid "Upgrade Teaser"
650
  msgstr ""
651
 
652
- #: inc/settings.php:352
653
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
654
  msgstr ""
655
 
656
- #: inc/settings.php:360
657
  msgid "Default to Page Builder Interface"
658
  msgstr ""
659
 
660
- #: inc/settings.php:362
661
  msgid "New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s\"Use Classic Editor for New Posts\"%s setting must be enabled."
662
  msgstr ""
663
 
664
- #: inc/settings.php:369
665
  msgid "Layout Block Default Mode"
666
  msgstr ""
667
 
668
- #: inc/settings.php:372, tpl/js-templates.php:144
669
  msgid "Edit"
670
  msgstr ""
671
 
672
- #: inc/settings.php:373
673
  msgid "Preview"
674
  msgstr ""
675
 
676
- #: inc/settings.php:375
677
  msgid "Whether to display SiteOrigin Layout Blocks in edit mode or preview mode in the Block Editor."
678
  msgstr ""
679
 
680
- #: inc/settings.php:381
681
  msgid "Widgets"
682
  msgstr ""
683
 
684
- #: inc/settings.php:387
685
  msgid "Widget Title HTML"
686
  msgstr ""
687
 
688
- #: inc/settings.php:388
689
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
690
  msgstr ""
691
 
692
- #: inc/settings.php:393
693
  msgid "Add Widget Class"
694
  msgstr ""
695
 
696
- #: inc/settings.php:394
697
  msgid "Add the widget class to Page Builder widgets. Disable if theme widget styles are negatively impacting widgets in Page Builder."
698
  msgstr ""
699
 
700
- #: inc/settings.php:399
701
  msgid "Legacy Bundled Widgets"
702
  msgstr ""
703
 
704
- #: inc/settings.php:400
705
  msgid "Load legacy widgets from Page Builder 1."
706
  msgstr ""
707
 
708
- #: inc/settings.php:406
709
  msgid "Display recommend widgets in the Page Builder Add Widget dialog."
710
  msgstr ""
711
 
712
- #: inc/settings.php:411
713
  msgid "Instant Open Widgets"
714
  msgstr ""
715
 
716
- #: inc/settings.php:412
717
  msgid "Open a widget form as soon as it's added to a page."
718
  msgstr ""
719
 
720
- #: inc/settings.php:418, inc/styles-admin.php:103
721
  msgid "Layout"
722
  msgstr ""
723
 
724
- #: inc/settings.php:426
725
  msgid "Responsive Layout"
726
  msgstr ""
727
 
728
- #: inc/settings.php:427
729
  msgid "Collapse widgets, rows, and columns on mobile devices."
730
  msgstr ""
731
 
732
- #: inc/settings.php:432
733
  msgid "Use Tablet Layout"
734
  msgstr ""
735
 
736
- #: inc/settings.php:433
737
  msgid "Collapses columns differently on tablet devices."
738
  msgstr ""
739
 
740
- #: inc/settings.php:439
741
  msgid "Detect older browsers"
742
  msgstr ""
743
 
744
- #: inc/settings.php:440
745
  msgid "Never"
746
  msgstr ""
747
 
748
- #: inc/settings.php:441
749
  msgid "Always"
750
  msgstr ""
751
 
752
- #: inc/settings.php:443
753
  msgid "Use Legacy Layout Engine"
754
  msgstr ""
755
 
756
- #: inc/settings.php:444
757
  msgid "For compatibility, the Legacy Layout Engine switches from Flexbox to float when older browsers are detected."
758
  msgstr ""
759
 
760
- #: inc/settings.php:450
761
  msgid "Tablet Width"
762
  msgstr ""
763
 
764
- #: inc/settings.php:451
765
  msgid "Device width, in pixels, to collapse into a tablet view."
766
  msgstr ""
767
 
768
- #: inc/settings.php:457
769
  msgid "Mobile Width"
770
  msgstr ""
771
 
772
- #: inc/settings.php:458
773
  msgid "Device width, in pixels, to collapse into a mobile view."
774
  msgstr ""
775
 
776
- #: inc/settings.php:464
777
  msgid "Row/Widget Bottom Margin"
778
  msgstr ""
779
 
780
- #: inc/settings.php:465
781
  msgid "Default margin below rows and widgets."
782
  msgstr ""
783
 
784
- #: inc/settings.php:471
785
  msgid "Row Mobile Bottom Margin"
786
  msgstr ""
787
 
788
- #: inc/settings.php:472
789
  msgid "The default margin below rows on mobile."
790
  msgstr ""
791
 
792
- #: inc/settings.php:477
793
  msgid "Last Row With Margin"
794
  msgstr ""
795
 
796
- #: inc/settings.php:478
797
  msgid "Allow margin below the last row."
798
  msgstr ""
799
 
800
- #: inc/settings.php:484
801
  msgid "Row Gutter"
802
  msgstr ""
803
 
804
- #: inc/settings.php:485
805
  msgid "Default spacing between columns in each row."
806
  msgstr ""
807
 
808
- #: inc/settings.php:491
809
  msgid "Full Width Container"
810
  msgstr ""
811
 
812
- #: inc/settings.php:492
813
  msgid "The container used for the full width layout."
814
  msgstr ""
815
 
816
- #: inc/settings.php:499
817
  msgid "Automatic"
818
  msgstr ""
819
 
820
- #: inc/settings.php:500
821
  msgid "Header"
822
  msgstr ""
823
 
824
- #: inc/settings.php:501
825
  msgid "Footer"
826
  msgstr ""
827
 
828
- #: inc/settings.php:503
829
  msgid "Page Builder Layout CSS Output Location"
830
  msgstr ""
831
 
832
- #: inc/settings.php:504
833
  msgid "This setting is only applicable in the Classic Editor."
834
  msgstr ""
835
 
836
- #: inc/settings.php:510
837
  msgid "Content"
838
  msgstr ""
839
 
840
- #: inc/settings.php:516
841
  msgid "Copy Content"
842
  msgstr ""
843
 
844
- #: inc/settings.php:517
845
  msgid "Copy content from Page Builder to post content."
846
  msgstr ""
847
 
848
- #: inc/settings.php:522
849
  msgid "Copy Styles"
850
  msgstr ""
851
 
852
- #: inc/settings.php:523
853
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
854
  msgstr ""
855
 
856
- #: inc/settings.php:576, inc/styles-admin.php:293
857
  msgid "Enabled"
858
  msgstr ""
859
 
@@ -882,286 +890,314 @@ msgid "Attributes"
882
  msgstr ""
883
 
884
  #: inc/styles-admin.php:107
885
- msgid "Mobile Layout"
886
  msgstr ""
887
 
888
  #: inc/styles-admin.php:111
 
 
 
 
889
  msgid "Design"
890
  msgstr ""
891
 
892
- #: inc/styles-admin.php:121
893
  msgid "Theme"
894
  msgstr ""
895
 
896
- #: inc/styles-admin.php:206, inc/styles.php:286, inc/styles.php:333
897
  msgid "Top"
898
  msgstr ""
899
 
900
- #: inc/styles-admin.php:210, widgets/widgets/button/button.php:30
901
  msgid "Right"
902
  msgstr ""
903
 
904
- #: inc/styles-admin.php:214, inc/styles.php:288, inc/styles.php:335
905
  msgid "Bottom"
906
  msgstr ""
907
 
908
- #: inc/styles-admin.php:218, widgets/widgets/button/button.php:29
909
  msgid "Left"
910
  msgstr ""
911
 
912
- #: inc/styles-admin.php:263
913
  msgid "Select Image"
914
  msgstr ""
915
 
916
- #: inc/styles-admin.php:268
917
  msgid "Remove"
918
  msgstr ""
919
 
920
- #: inc/styles-admin.php:271
921
  msgid "External URL"
922
  msgstr ""
923
 
924
- #: inc/styles.php:109
925
  msgid "%s ID"
926
  msgstr ""
927
 
928
- #: inc/styles.php:112
929
  msgid "A custom ID used for this %s."
930
  msgstr ""
931
 
932
- #: inc/styles.php:117
933
  msgid "%s Class"
934
  msgstr ""
935
 
936
- #: inc/styles.php:120
937
  msgid "A CSS class name."
938
  msgstr ""
939
 
940
- #: inc/styles.php:125
941
  msgid "CSS Declarations"
942
  msgstr ""
943
 
944
- #: inc/styles.php:128
945
  msgid "One declaration per line."
946
  msgstr ""
947
 
948
- #: inc/styles.php:133
949
  msgid "Mobile CSS Declarations"
950
  msgstr ""
951
 
952
- #: inc/styles.php:136
953
  msgid "CSS declarations applied when in mobile view."
954
  msgstr ""
955
 
956
- #: inc/styles.php:143
957
  msgid "Padding"
958
  msgstr ""
959
 
960
- #: inc/styles.php:146
961
  msgid "Padding around the entire %s."
962
  msgstr ""
963
 
964
- #: inc/styles.php:154
 
 
 
 
 
 
 
 
965
  msgid "Mobile Padding"
966
  msgstr ""
967
 
968
- #: inc/styles.php:157
969
  msgid "Padding when on mobile devices."
970
  msgstr ""
971
 
972
- #: inc/styles.php:165
973
  msgid "Background Color"
974
  msgstr ""
975
 
976
- #: inc/styles.php:168
977
  msgid "Background color of the %s."
978
  msgstr ""
979
 
980
- #: inc/styles.php:173
981
  msgid "Background Image"
982
  msgstr ""
983
 
984
- #: inc/styles.php:176
985
  msgid "Background image of the %s."
986
  msgstr ""
987
 
988
- #: inc/styles.php:181
989
  msgid "Background Image Display"
990
  msgstr ""
991
 
992
- #: inc/styles.php:185
993
  msgid "Tiled Image"
994
  msgstr ""
995
 
996
- #: inc/styles.php:186
997
  msgid "Cover"
998
  msgstr ""
999
 
1000
- #: inc/styles.php:187
1001
  msgid "Centered, with original size"
1002
  msgstr ""
1003
 
1004
- #: inc/styles.php:188
1005
  msgid "Contain"
1006
  msgstr ""
1007
 
1008
- #: inc/styles.php:189
1009
  msgid "Fixed"
1010
  msgstr ""
1011
 
1012
- #: inc/styles.php:190
1013
  msgid "Parallax"
1014
  msgstr ""
1015
 
1016
- #: inc/styles.php:192
1017
  msgid "How the background image is displayed."
1018
  msgstr ""
1019
 
1020
- #: inc/styles.php:197
1021
  msgid "Border Color"
1022
  msgstr ""
1023
 
1024
- #: inc/styles.php:200
1025
  msgid "Border color of the %s."
1026
  msgstr ""
1027
 
1028
- #: inc/styles.php:219
1029
  msgid "Cell Class"
1030
  msgstr ""
1031
 
1032
- #: inc/styles.php:222
1033
  msgid "Class added to all cells in this row."
1034
  msgstr ""
1035
 
1036
- #: inc/styles.php:229
1037
  msgid "Bottom Margin"
1038
  msgstr ""
1039
 
1040
- #: inc/styles.php:232
1041
  msgid "Space below the row. Default is %spx."
1042
  msgstr ""
1043
 
1044
- #: inc/styles.php:237
1045
  msgid "Gutter"
1046
  msgstr ""
1047
 
1048
- #: inc/styles.php:240
1049
  msgid "Amount of space between cells. Default is %spx."
1050
  msgstr ""
1051
 
1052
- #: inc/styles.php:245
1053
  msgid "Row Layout"
1054
  msgstr ""
1055
 
1056
- #: inc/styles.php:249, inc/styles.php:262
1057
  msgid "Standard"
1058
  msgstr ""
1059
 
1060
- #: inc/styles.php:250
1061
  msgid "Full Width"
1062
  msgstr ""
1063
 
1064
- #: inc/styles.php:251
1065
  msgid "Full Width Stretched"
1066
  msgstr ""
1067
 
1068
- #: inc/styles.php:252
1069
  msgid "Full Width Stretched Padded"
1070
  msgstr ""
1071
 
1072
- #: inc/styles.php:258
1073
  msgid "Collapse Behaviour"
1074
  msgstr ""
1075
 
1076
- #: inc/styles.php:263
1077
  msgid "No Collapse"
1078
  msgstr ""
1079
 
1080
- #: inc/styles.php:269
1081
  msgid "Collapse Order"
1082
  msgstr ""
1083
 
1084
- #: inc/styles.php:273, widgets/widgets.php:635, widgets/widgets.php:757, inc/widgets/post-loop.php:374
1085
  msgid "Default"
1086
  msgstr ""
1087
 
1088
- #: inc/styles.php:274
1089
  msgid "Left on Top"
1090
  msgstr ""
1091
 
1092
- #: inc/styles.php:275
1093
  msgid "Right on Top"
1094
  msgstr ""
1095
 
1096
- #: inc/styles.php:282
1097
  msgid "Cell Vertical Alignment"
1098
  msgstr ""
1099
 
1100
- #: inc/styles.php:287, inc/styles.php:334, widgets/widgets/button/button.php:31
1101
  msgid "Center"
1102
  msgstr ""
1103
 
1104
- #: inc/styles.php:289, inc/styles.php:336
1105
  msgid "Stretch"
1106
  msgstr ""
1107
 
1108
- #: inc/styles.php:298
 
 
 
 
 
 
 
 
1109
  msgid "Mobile Bottom Margin"
1110
  msgstr ""
1111
 
1112
- #: inc/styles.php:301
1113
  msgid "Space below the row on mobile devices. Default is %spx."
1114
  msgstr ""
1115
 
1116
- #: inc/styles.php:306
1117
  msgid "Mobile Cell Margins"
1118
  msgstr ""
1119
 
1120
- #: inc/styles.php:309
1121
  msgid "Vertical space between cells in a collapsed mobile row. Default is %spx."
1122
  msgstr ""
1123
 
1124
- #: inc/styles.php:325
1125
  msgid "Cell"
1126
  msgstr ""
1127
 
1128
- #: inc/styles.php:328
1129
  msgid "Vertical Alignment"
1130
  msgstr ""
1131
 
1132
- #: inc/styles.php:332
1133
  msgid "Use row setting"
1134
  msgstr ""
1135
 
1136
- #: inc/styles.php:342, inc/styles.php:382
1137
  msgid "Font Color"
1138
  msgstr ""
1139
 
1140
- #: inc/styles.php:345
1141
  msgid "Color of text inside this cell."
1142
  msgstr ""
1143
 
1144
- #: inc/styles.php:350, inc/styles.php:390
1145
- msgid "Links Color"
1146
  msgstr ""
1147
 
1148
- #: inc/styles.php:353
1149
  msgid "Color of links inside this cell."
1150
  msgstr ""
1151
 
1152
- #: inc/styles.php:371
 
 
 
 
 
 
 
 
1153
  msgid "Margin"
1154
  msgstr ""
1155
 
1156
- #: inc/styles.php:374
1157
  msgid "Margins around the widget."
1158
  msgstr ""
1159
 
1160
- #: inc/styles.php:385
1161
  msgid "Color of text inside this widget."
1162
  msgstr ""
1163
 
1164
- #: inc/styles.php:393
1165
  msgid "Color of links inside this widget."
1166
  msgstr ""
1167
 
36
  msgid "https://siteorigin.com"
37
  msgstr ""
38
 
39
+ #: siteorigin-panels.php:391
40
  msgid "Read More"
41
  msgstr ""
42
 
43
+ #: siteorigin-panels.php:566
44
  msgid "Edit Home Page"
45
  msgstr ""
46
 
47
+ #: siteorigin-panels.php:586, tpl/js-templates.php:34, tpl/js-templates.php:36
48
  msgid "Live Editor"
49
  msgstr ""
50
 
141
  msgid "WordPress Widgets"
142
  msgstr ""
143
 
144
+ #: inc/admin-widget-dialog.php:185, inc/settings.php:421
145
  msgid "Recommended Widgets"
146
  msgstr ""
147
 
165
  msgid "Addons"
166
  msgstr ""
167
 
168
+ #: inc/admin.php:187, inc/admin.php:628, inc/admin.php:1298, inc/admin.php:1303, inc/settings.php:235, tpl/js-templates.php:212
169
  msgid "Page Builder"
170
  msgstr ""
171
 
172
+ #: inc/admin.php:360
173
  msgid "All Widgets"
174
  msgstr ""
175
 
176
+ #: inc/admin.php:395
177
  msgid "Missing Widget"
178
  msgstr ""
179
 
180
+ #: inc/admin.php:396
181
  msgid "Page Builder doesn't know about this widget."
182
  msgstr ""
183
 
184
  #. translators: Number of seconds since
185
+ #: inc/admin.php:400
186
  msgid "%d seconds"
187
  msgstr ""
188
 
189
  #. translators: Number of minutes since
190
+ #: inc/admin.php:402
191
  msgid "%d minutes"
192
  msgstr ""
193
 
194
  #. translators: Number of hours since
195
+ #: inc/admin.php:404
196
  msgid "%d hours"
197
  msgstr ""
198
 
199
  #. translators: A single second since
200
+ #: inc/admin.php:407
201
  msgid "%d second"
202
  msgstr ""
203
 
204
  #. translators: A single minute since
205
+ #: inc/admin.php:409
206
  msgid "%d minute"
207
  msgstr ""
208
 
209
  #. translators: A single hour since
210
+ #: inc/admin.php:411
211
  msgid "%d hour"
212
  msgstr ""
213
 
214
  #. translators: Time ago - eg. "1 minute before".
215
+ #: inc/admin.php:414
216
  msgid "%s before"
217
  msgstr ""
218
 
219
+ #: inc/admin.php:415
220
  msgid "Now"
221
  msgstr ""
222
 
223
+ #: inc/admin.php:419
224
  msgid "Current"
225
  msgstr ""
226
 
227
+ #: inc/admin.php:420
228
  msgid "Original"
229
  msgstr ""
230
 
231
+ #: inc/admin.php:421
232
  msgid "Version restored"
233
  msgstr ""
234
 
235
+ #: inc/admin.php:422
236
  msgid "Converted to editor"
237
  msgstr ""
238
 
239
  #. translators: Message displayed in the history when a widget is deleted
240
+ #: inc/admin.php:426
241
  msgid "Widget deleted"
242
  msgstr ""
243
 
244
  #. translators: Message displayed in the history when a widget is added
245
+ #: inc/admin.php:428
246
  msgid "Widget added"
247
  msgstr ""
248
 
249
  #. translators: Message displayed in the history when a widget is edited
250
+ #: inc/admin.php:430
251
  msgid "Widget edited"
252
  msgstr ""
253
 
254
  #. translators: Message displayed in the history when a widget is duplicated
255
+ #: inc/admin.php:432
256
  msgid "Widget duplicated"
257
  msgstr ""
258
 
259
  #. translators: Message displayed in the history when a widget position is changed
260
+ #: inc/admin.php:434
261
  msgid "Widget moved"
262
  msgstr ""
263
 
264
  #. translators: Message displayed in the history when a row is deleted
265
+ #: inc/admin.php:438
266
  msgid "Row deleted"
267
  msgstr ""
268
 
269
  #. translators: Message displayed in the history when a row is added
270
+ #: inc/admin.php:440
271
  msgid "Row added"
272
  msgstr ""
273
 
274
  #. translators: Message displayed in the history when a row is edited
275
+ #: inc/admin.php:442
276
  msgid "Row edited"
277
  msgstr ""
278
 
279
  #. translators: Message displayed in the history when a row position is changed
280
+ #: inc/admin.php:444
281
  msgid "Row moved"
282
  msgstr ""
283
 
284
  #. translators: Message displayed in the history when a row is duplicated
285
+ #: inc/admin.php:446
286
  msgid "Row duplicated"
287
  msgstr ""
288
 
289
  #. translators: Message displayed in the history when a row is pasted
290
+ #: inc/admin.php:448
291
  msgid "Row pasted"
292
  msgstr ""
293
 
294
+ #: inc/admin.php:451
295
  msgid "Cell resized"
296
  msgstr ""
297
 
298
+ #: inc/admin.php:454
299
  msgid "Prebuilt layout loaded"
300
  msgstr ""
301
 
302
+ #: inc/admin.php:458
303
  msgid "Loading prebuilt layout"
304
  msgstr ""
305
 
306
+ #: inc/admin.php:459
307
  msgid "Would you like to copy this editor's existing content to Page Builder?"
308
  msgstr ""
309
 
310
+ #: inc/admin.php:460
311
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
312
  msgstr ""
313
 
314
  #. translators: This is the title for a widget called "Layout Builder"
315
+ #: inc/admin.php:462
316
  msgid "Layout Builder Widget"
317
  msgstr ""
318
 
319
  #. translators: A standard confirmation message
320
+ #: inc/admin.php:464, tpl/js-templates.php:97, tpl/js-templates.php:437
321
  msgid "Are you sure?"
322
  msgstr ""
323
 
324
  #. translators: When a layout file is ready to be inserted. %s is the filename.
325
+ #: inc/admin.php:466
326
  msgid "%s is ready to insert."
327
  msgstr ""
328
 
329
+ #: inc/admin.php:470
330
  msgid "Add Widget Below"
331
  msgstr ""
332
 
333
+ #: inc/admin.php:471
334
  msgid "Add Widget to Cell"
335
  msgstr ""
336
 
337
+ #: inc/admin.php:472, tpl/js-templates.php:239
338
  msgid "Search Widgets"
339
  msgstr ""
340
 
341
+ #: inc/admin.php:474, tpl/js-templates.php:17, tpl/js-templates.php:19
342
  msgid "Add Row"
343
  msgstr ""
344
 
345
+ #: inc/admin.php:475
346
  msgid "Column"
347
  msgstr ""
348
 
349
+ #: inc/admin.php:477
350
  msgid "Cell Actions"
351
  msgstr ""
352
 
353
+ #: inc/admin.php:478
354
  msgid "Paste Widget"
355
  msgstr ""
356
 
357
+ #: inc/admin.php:480
358
  msgid "Widget Actions"
359
  msgstr ""
360
 
361
+ #: inc/admin.php:481
362
  msgid "Edit Widget"
363
  msgstr ""
364
 
365
+ #: inc/admin.php:482
366
  msgid "Duplicate Widget"
367
  msgstr ""
368
 
369
+ #: inc/admin.php:483
370
  msgid "Delete Widget"
371
  msgstr ""
372
 
373
+ #: inc/admin.php:484
374
  msgid "Copy Widget"
375
  msgstr ""
376
 
377
+ #: inc/admin.php:485
378
  msgid "Paste Widget Below"
379
  msgstr ""
380
 
381
+ #: inc/admin.php:487
382
  msgid "Row Actions"
383
  msgstr ""
384
 
385
+ #: inc/admin.php:488, tpl/js-templates.php:95
386
  msgid "Edit Row"
387
  msgstr ""
388
 
389
+ #: inc/admin.php:489, tpl/js-templates.php:96
390
  msgid "Duplicate Row"
391
  msgstr ""
392
 
393
+ #: inc/admin.php:490, tpl/js-templates.php:97
394
  msgid "Delete Row"
395
  msgstr ""
396
 
397
+ #: inc/admin.php:491
398
  msgid "Copy Row"
399
  msgstr ""
400
 
401
+ #: inc/admin.php:492
402
  msgid "Paste Row"
403
  msgstr ""
404
 
405
+ #: inc/admin.php:494
406
  msgid "Draft"
407
  msgstr ""
408
 
409
+ #: inc/admin.php:495
410
  msgid "Untitled"
411
  msgstr ""
412
 
413
+ #: inc/admin.php:497
414
  msgid "New Row"
415
  msgstr ""
416
 
417
+ #: inc/admin.php:498, inc/admin.php:506, inc/styles.php:234, tpl/js-templates.php:62
418
  msgid "Row"
419
  msgstr ""
420
 
421
+ #: inc/admin.php:501
422
  msgid "Hmmm... Adding layout elements is not enabled. Please check if Page Builder has been configured to allow adding elements."
423
  msgstr ""
424
 
425
+ #: inc/admin.php:502
426
  msgid "Add a {{%= items[0] %}} to get started."
427
  msgstr ""
428
 
429
+ #: inc/admin.php:503
430
  msgid "Add a {{%= items[0] %}} or {{%= items[1] %}} to get started."
431
  msgstr ""
432
 
433
+ #: inc/admin.php:504
434
  msgid "Add a {{%= items[0] %}}, {{%= items[1] %}} or {{%= items[2] %}} to get started."
435
  msgstr ""
436
 
437
+ #: inc/admin.php:505, inc/styles.php:404, tpl/js-templates.php:61
438
  msgid "Widget"
439
  msgstr ""
440
 
441
+ #: inc/admin.php:507, tpl/js-templates.php:63
442
  msgid "Prebuilt Layout"
443
  msgstr ""
444
 
445
+ #: inc/admin.php:509
446
  msgid "Read our %s if you need help."
447
  msgstr ""
448
 
449
+ #: inc/admin.php:510, tpl/js-templates.php:64
450
  msgid "documentation"
451
  msgstr ""
452
 
453
+ #: inc/admin.php:519
454
  msgid "Page Builder layouts"
455
  msgstr ""
456
 
457
+ #: inc/admin.php:520
458
  msgid "Error uploading or importing file."
459
  msgstr ""
460
 
461
+ #: inc/admin.php:527
462
  msgid "Unknown error. Failed to load the form. Please check your internet connection, contact your web site administrator, or try again later."
463
  msgstr ""
464
 
465
  #. translators: This is the default name given to a user's home page
466
+ #: inc/admin.php:711, inc/home.php:26
467
  msgid "Home Page"
468
  msgstr ""
469
 
470
+ #: inc/admin.php:812
471
  msgid "Untitled Widget"
472
  msgstr ""
473
 
474
+ #: inc/admin.php:992
475
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
476
  msgstr ""
477
 
478
+ #: inc/admin.php:998
479
  msgid "Save and reload this page to start using the widget after you've installed it."
480
  msgstr ""
481
 
482
+ #: inc/admin.php:1014
483
  msgid "The widget 1{%1$s} is not available. Please try locate and install the missing plugin. Post on the 2{support forums} if you need help."
484
  msgstr ""
485
 
486
+ #: inc/admin.php:1201, inc/styles-admin.php:25
487
  msgid "The supplied nonce is invalid."
488
  msgstr ""
489
 
490
+ #: inc/admin.php:1202, inc/styles-admin.php:26
491
  msgid "Invalid nonce."
492
  msgstr ""
493
 
494
+ #: inc/admin.php:1208
495
  msgid "Please specify the type of widget form to be rendered."
496
  msgstr ""
497
 
498
+ #: inc/admin.php:1209
499
  msgid "Missing widget type."
500
  msgstr ""
501
 
502
+ #: inc/admin.php:1316
503
  msgid "%s Widget"
504
  msgid_plural "%s Widgets"
505
  msgstr[0] ""
506
  msgstr[1] ""
507
 
508
+ #: inc/admin.php:1359
509
  msgid "Get a lightbox addon for SiteOrigin widgets"
510
  msgstr ""
511
 
512
+ #: inc/admin.php:1363
513
  msgid "Get the row, cell and widget animations addon"
514
  msgstr ""
515
 
516
+ #: inc/admin.php:1367
517
  msgid "Get premium email support for SiteOrigin Page Builder"
518
  msgstr ""
519
 
520
+ #: inc/admin.php:1552
521
  msgid "Toggle editor selection menu"
522
  msgstr ""
523
 
524
+ #: inc/admin.php:1553, inc/admin.php:1600, inc/settings.php:235, settings/tpl/settings.php:9
525
  msgid "SiteOrigin Page Builder"
526
  msgstr ""
527
 
528
+ #: inc/admin.php:1554
529
  msgid "Block Editor"
530
  msgstr ""
531
 
533
  msgid "Custom Home Page Builder"
534
  msgstr ""
535
 
536
+ #: inc/renderer.php:387
537
  msgid "Prevented SiteOrigin layout from repeated rendering."
538
  msgstr ""
539
 
541
  msgid "Page Builder Content"
542
  msgstr ""
543
 
544
+ #: inc/settings.php:262
545
  msgid "Page Builder Settings"
546
  msgstr ""
547
 
548
+ #: inc/settings.php:278
549
  msgid "General"
550
  msgstr ""
551
 
552
+ #: inc/settings.php:284
553
  msgid "Post Types"
554
  msgstr ""
555
 
556
+ #: inc/settings.php:286
557
  msgid "The post types on which to use Page Builder."
558
  msgstr ""
559
 
560
+ #: inc/settings.php:291
561
  msgid "Use Classic Editor for New Posts"
562
  msgstr ""
563
 
564
+ #: inc/settings.php:292
565
  msgid "New posts of the above Post Types will be created using the Classic Editor."
566
  msgstr ""
567
 
568
+ #: inc/settings.php:297
569
+ msgid "Live Editor Toolbar Link"
570
  msgstr ""
571
 
572
+ #: inc/settings.php:298
573
+ msgid "Display a Live Editor link in the toolbar when viewing site."
574
  msgstr ""
575
 
576
+ #: inc/settings.php:302
577
+ msgid "Live Editor Toolbar Link: Close After Editing"
578
+ msgstr ""
579
+
580
+ #: inc/settings.php:303
581
+ msgid "When accessing the Live Editor via the toolbar link, return to the site after saving."
582
+ msgstr ""
583
+
584
+ #: inc/settings.php:308
585
  msgid "Display Post State"
586
  msgstr ""
587
 
588
+ #: inc/settings.php:310
589
  msgid "Display a %sSiteOrigin Page Builder%s post state in the admin lists of posts/pages to indicate Page Builder is active."
590
  msgstr ""
591
 
592
+ #: inc/settings.php:318
593
  msgid "Display Widget Count"
594
  msgstr ""
595
 
596
+ #: inc/settings.php:319
597
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
598
  msgstr ""
599
 
600
+ #: inc/settings.php:324
601
  msgid "Parallax Type"
602
  msgstr ""
603
 
604
+ #: inc/settings.php:326
605
  msgid "Modern"
606
  msgstr ""
607
 
608
+ #: inc/settings.php:327
609
  msgid "Legacy"
610
  msgstr ""
611
 
612
+ #: inc/settings.php:329
613
  msgid "Modern is recommended as it can use smaller images and offers better performance."
614
  msgstr ""
615
 
616
+ #: inc/settings.php:334
617
  msgid "Disable Parallax On Mobile"
618
  msgstr ""
619
 
620
+ #: inc/settings.php:335
621
  msgid "Disable row/widget background parallax when the browser is smaller than the mobile width."
622
  msgstr ""
623
 
624
+ #: inc/settings.php:341
625
  msgid "Limit Parallax Motion"
626
  msgstr ""
627
 
628
+ #: inc/settings.php:342
629
  msgid "How many pixels of scrolling results in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
630
  msgstr ""
631
 
632
+ #: inc/settings.php:348
633
  msgid "Parallax Delay"
634
  msgstr ""
635
 
636
+ #: inc/settings.php:349
637
  msgid "The delay before the parallax effect finishes after the user stops scrolling."
638
  msgstr ""
639
 
640
+ #: inc/settings.php:354
641
  msgid "Parallax Scale"
642
  msgstr ""
643
 
644
+ #: inc/settings.php:355
645
  msgid "How much the image is scaled. The higher the scale is set, the more visible the parallax effect will be. Increasing the scale will result in a loss of image quality."
646
  msgstr ""
647
 
648
+ #: inc/settings.php:360
649
  msgid "Sidebars Emulator"
650
  msgstr ""
651
 
652
+ #: inc/settings.php:361
653
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
654
  msgstr ""
655
 
656
+ #: inc/settings.php:366
657
  msgid "Upgrade Teaser"
658
  msgstr ""
659
 
660
+ #: inc/settings.php:368
661
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
662
  msgstr ""
663
 
664
+ #: inc/settings.php:376
665
  msgid "Default to Page Builder Interface"
666
  msgstr ""
667
 
668
+ #: inc/settings.php:378
669
  msgid "New Classic Editor posts/pages that you create will start with the Page Builder loaded. The %s\"Use Classic Editor for New Posts\"%s setting must be enabled."
670
  msgstr ""
671
 
672
+ #: inc/settings.php:385
673
  msgid "Layout Block Default Mode"
674
  msgstr ""
675
 
676
+ #: inc/settings.php:388, tpl/js-templates.php:144
677
  msgid "Edit"
678
  msgstr ""
679
 
680
+ #: inc/settings.php:389
681
  msgid "Preview"
682
  msgstr ""
683
 
684
+ #: inc/settings.php:391
685
  msgid "Whether to display SiteOrigin Layout Blocks in edit mode or preview mode in the Block Editor."
686
  msgstr ""
687
 
688
+ #: inc/settings.php:397
689
  msgid "Widgets"
690
  msgstr ""
691
 
692
+ #: inc/settings.php:403
693
  msgid "Widget Title HTML"
694
  msgstr ""
695
 
696
+ #: inc/settings.php:404
697
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
698
  msgstr ""
699
 
700
+ #: inc/settings.php:409
701
  msgid "Add Widget Class"
702
  msgstr ""
703
 
704
+ #: inc/settings.php:410
705
  msgid "Add the widget class to Page Builder widgets. Disable if theme widget styles are negatively impacting widgets in Page Builder."
706
  msgstr ""
707
 
708
+ #: inc/settings.php:415
709
  msgid "Legacy Bundled Widgets"
710
  msgstr ""
711
 
712
+ #: inc/settings.php:416
713
  msgid "Load legacy widgets from Page Builder 1."
714
  msgstr ""
715
 
716
+ #: inc/settings.php:422
717
  msgid "Display recommend widgets in the Page Builder Add Widget dialog."
718
  msgstr ""
719
 
720
+ #: inc/settings.php:427
721
  msgid "Instant Open Widgets"
722
  msgstr ""
723
 
724
+ #: inc/settings.php:428
725
  msgid "Open a widget form as soon as it's added to a page."
726
  msgstr ""
727
 
728
+ #: inc/settings.php:434, inc/styles-admin.php:103
729
  msgid "Layout"
730
  msgstr ""
731
 
732
+ #: inc/settings.php:442
733
  msgid "Responsive Layout"
734
  msgstr ""
735
 
736
+ #: inc/settings.php:443
737
  msgid "Collapse widgets, rows, and columns on mobile devices."
738
  msgstr ""
739
 
740
+ #: inc/settings.php:448
741
  msgid "Use Tablet Layout"
742
  msgstr ""
743
 
744
+ #: inc/settings.php:449
745
  msgid "Collapses columns differently on tablet devices."
746
  msgstr ""
747
 
748
+ #: inc/settings.php:455
749
  msgid "Detect older browsers"
750
  msgstr ""
751
 
752
+ #: inc/settings.php:456
753
  msgid "Never"
754
  msgstr ""
755
 
756
+ #: inc/settings.php:457
757
  msgid "Always"
758
  msgstr ""
759
 
760
+ #: inc/settings.php:459
761
  msgid "Use Legacy Layout Engine"
762
  msgstr ""
763
 
764
+ #: inc/settings.php:460
765
  msgid "For compatibility, the Legacy Layout Engine switches from Flexbox to float when older browsers are detected."
766
  msgstr ""
767
 
768
+ #: inc/settings.php:466
769
  msgid "Tablet Width"
770
  msgstr ""
771
 
772
+ #: inc/settings.php:467
773
  msgid "Device width, in pixels, to collapse into a tablet view."
774
  msgstr ""
775
 
776
+ #: inc/settings.php:473
777
  msgid "Mobile Width"
778
  msgstr ""
779
 
780
+ #: inc/settings.php:474
781
  msgid "Device width, in pixels, to collapse into a mobile view."
782
  msgstr ""
783
 
784
+ #: inc/settings.php:480
785
  msgid "Row/Widget Bottom Margin"
786
  msgstr ""
787
 
788
+ #: inc/settings.php:481
789
  msgid "Default margin below rows and widgets."
790
  msgstr ""
791
 
792
+ #: inc/settings.php:487
793
  msgid "Row Mobile Bottom Margin"
794
  msgstr ""
795
 
796
+ #: inc/settings.php:488
797
  msgid "The default margin below rows on mobile."
798
  msgstr ""
799
 
800
+ #: inc/settings.php:493
801
  msgid "Last Row With Margin"
802
  msgstr ""
803
 
804
+ #: inc/settings.php:494
805
  msgid "Allow margin below the last row."
806
  msgstr ""
807
 
808
+ #: inc/settings.php:500
809
  msgid "Row Gutter"
810
  msgstr ""
811
 
812
+ #: inc/settings.php:501
813
  msgid "Default spacing between columns in each row."
814
  msgstr ""
815
 
816
+ #: inc/settings.php:507
817
  msgid "Full Width Container"
818
  msgstr ""
819
 
820
+ #: inc/settings.php:508
821
  msgid "The container used for the full width layout."
822
  msgstr ""
823
 
824
+ #: inc/settings.php:515
825
  msgid "Automatic"
826
  msgstr ""
827
 
828
+ #: inc/settings.php:516
829
  msgid "Header"
830
  msgstr ""
831
 
832
+ #: inc/settings.php:517
833
  msgid "Footer"
834
  msgstr ""
835
 
836
+ #: inc/settings.php:519
837
  msgid "Page Builder Layout CSS Output Location"
838
  msgstr ""
839
 
840
+ #: inc/settings.php:520
841
  msgid "This setting is only applicable in the Classic Editor."
842
  msgstr ""
843
 
844
+ #: inc/settings.php:526
845
  msgid "Content"
846
  msgstr ""
847
 
848
+ #: inc/settings.php:532
849
  msgid "Copy Content"
850
  msgstr ""
851
 
852
+ #: inc/settings.php:533
853
  msgid "Copy content from Page Builder to post content."
854
  msgstr ""
855
 
856
+ #: inc/settings.php:538
857
  msgid "Copy Styles"
858
  msgstr ""
859
 
860
+ #: inc/settings.php:539
861
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
862
  msgstr ""
863
 
864
+ #: inc/settings.php:592, inc/styles-admin.php:301
865
  msgid "Enabled"
866
  msgstr ""
867
 
890
  msgstr ""
891
 
892
  #: inc/styles-admin.php:107
893
+ msgid "Tablet Layout"
894
  msgstr ""
895
 
896
  #: inc/styles-admin.php:111
897
+ msgid "Mobile Layout"
898
+ msgstr ""
899
+
900
+ #: inc/styles-admin.php:115
901
  msgid "Design"
902
  msgstr ""
903
 
904
+ #: inc/styles-admin.php:129
905
  msgid "Theme"
906
  msgstr ""
907
 
908
+ #: inc/styles-admin.php:214, inc/styles.php:304, inc/styles.php:361
909
  msgid "Top"
910
  msgstr ""
911
 
912
+ #: inc/styles-admin.php:218, widgets/widgets/button/button.php:30
913
  msgid "Right"
914
  msgstr ""
915
 
916
+ #: inc/styles-admin.php:222, inc/styles.php:306, inc/styles.php:363
917
  msgid "Bottom"
918
  msgstr ""
919
 
920
+ #: inc/styles-admin.php:226, widgets/widgets/button/button.php:29
921
  msgid "Left"
922
  msgstr ""
923
 
924
+ #: inc/styles-admin.php:271
925
  msgid "Select Image"
926
  msgstr ""
927
 
928
+ #: inc/styles-admin.php:276
929
  msgid "Remove"
930
  msgstr ""
931
 
932
+ #: inc/styles-admin.php:279
933
  msgid "External URL"
934
  msgstr ""
935
 
936
+ #: inc/styles.php:116
937
  msgid "%s ID"
938
  msgstr ""
939
 
940
+ #: inc/styles.php:119
941
  msgid "A custom ID used for this %s."
942
  msgstr ""
943
 
944
+ #: inc/styles.php:124
945
  msgid "%s Class"
946
  msgstr ""
947
 
948
+ #: inc/styles.php:127
949
  msgid "A CSS class name."
950
  msgstr ""
951
 
952
+ #: inc/styles.php:132
953
  msgid "CSS Declarations"
954
  msgstr ""
955
 
956
+ #: inc/styles.php:135
957
  msgid "One declaration per line."
958
  msgstr ""
959
 
960
+ #: inc/styles.php:140
961
  msgid "Mobile CSS Declarations"
962
  msgstr ""
963
 
964
+ #: inc/styles.php:143
965
  msgid "CSS declarations applied when in mobile view."
966
  msgstr ""
967
 
968
+ #: inc/styles.php:150
969
  msgid "Padding"
970
  msgstr ""
971
 
972
+ #: inc/styles.php:153
973
  msgid "Padding around the entire %s."
974
  msgstr ""
975
 
976
+ #: inc/styles.php:161
977
+ msgid "Tablet Padding"
978
+ msgstr ""
979
+
980
+ #: inc/styles.php:164
981
+ msgid "Padding when on tablet devices."
982
+ msgstr ""
983
+
984
+ #: inc/styles.php:172
985
  msgid "Mobile Padding"
986
  msgstr ""
987
 
988
+ #: inc/styles.php:175
989
  msgid "Padding when on mobile devices."
990
  msgstr ""
991
 
992
+ #: inc/styles.php:183
993
  msgid "Background Color"
994
  msgstr ""
995
 
996
+ #: inc/styles.php:186
997
  msgid "Background color of the %s."
998
  msgstr ""
999
 
1000
+ #: inc/styles.php:191
1001
  msgid "Background Image"
1002
  msgstr ""
1003
 
1004
+ #: inc/styles.php:194
1005
  msgid "Background image of the %s."
1006
  msgstr ""
1007
 
1008
+ #: inc/styles.php:199
1009
  msgid "Background Image Display"
1010
  msgstr ""
1011
 
1012
+ #: inc/styles.php:203
1013
  msgid "Tiled Image"
1014
  msgstr ""
1015
 
1016
+ #: inc/styles.php:204
1017
  msgid "Cover"
1018
  msgstr ""
1019
 
1020
+ #: inc/styles.php:205
1021
  msgid "Centered, with original size"
1022
  msgstr ""
1023
 
1024
+ #: inc/styles.php:206
1025
  msgid "Contain"
1026
  msgstr ""
1027
 
1028
+ #: inc/styles.php:207
1029
  msgid "Fixed"
1030
  msgstr ""
1031
 
1032
+ #: inc/styles.php:208
1033
  msgid "Parallax"
1034
  msgstr ""
1035
 
1036
+ #: inc/styles.php:210
1037
  msgid "How the background image is displayed."
1038
  msgstr ""
1039
 
1040
+ #: inc/styles.php:215
1041
  msgid "Border Color"
1042
  msgstr ""
1043
 
1044
+ #: inc/styles.php:218
1045
  msgid "Border color of the %s."
1046
  msgstr ""
1047
 
1048
+ #: inc/styles.php:237
1049
  msgid "Cell Class"
1050
  msgstr ""
1051
 
1052
+ #: inc/styles.php:240
1053
  msgid "Class added to all cells in this row."
1054
  msgstr ""
1055
 
1056
+ #: inc/styles.php:247
1057
  msgid "Bottom Margin"
1058
  msgstr ""
1059
 
1060
+ #: inc/styles.php:250
1061
  msgid "Space below the row. Default is %spx."
1062
  msgstr ""
1063
 
1064
+ #: inc/styles.php:255
1065
  msgid "Gutter"
1066
  msgstr ""
1067
 
1068
+ #: inc/styles.php:258
1069
  msgid "Amount of space between cells. Default is %spx."
1070
  msgstr ""
1071
 
1072
+ #: inc/styles.php:263
1073
  msgid "Row Layout"
1074
  msgstr ""
1075
 
1076
+ #: inc/styles.php:267, inc/styles.php:280
1077
  msgid "Standard"
1078
  msgstr ""
1079
 
1080
+ #: inc/styles.php:268
1081
  msgid "Full Width"
1082
  msgstr ""
1083
 
1084
+ #: inc/styles.php:269
1085
  msgid "Full Width Stretched"
1086
  msgstr ""
1087
 
1088
+ #: inc/styles.php:270
1089
  msgid "Full Width Stretched Padded"
1090
  msgstr ""
1091
 
1092
+ #: inc/styles.php:276
1093
  msgid "Collapse Behaviour"
1094
  msgstr ""
1095
 
1096
+ #: inc/styles.php:281
1097
  msgid "No Collapse"
1098
  msgstr ""
1099
 
1100
+ #: inc/styles.php:287
1101
  msgid "Collapse Order"
1102
  msgstr ""
1103
 
1104
+ #: inc/styles.php:291, widgets/widgets.php:635, widgets/widgets.php:757, inc/widgets/post-loop.php:374
1105
  msgid "Default"
1106
  msgstr ""
1107
 
1108
+ #: inc/styles.php:292
1109
  msgid "Left on Top"
1110
  msgstr ""
1111
 
1112
+ #: inc/styles.php:293
1113
  msgid "Right on Top"
1114
  msgstr ""
1115
 
1116
+ #: inc/styles.php:300
1117
  msgid "Cell Vertical Alignment"
1118
  msgstr ""
1119
 
1120
+ #: inc/styles.php:305, inc/styles.php:362, widgets/widgets/button/button.php:31
1121
  msgid "Center"
1122
  msgstr ""
1123
 
1124
+ #: inc/styles.php:307, inc/styles.php:364
1125
  msgid "Stretch"
1126
  msgstr ""
1127
 
1128
+ #: inc/styles.php:316
1129
+ msgid "Tablet Bottom Margin"
1130
+ msgstr ""
1131
+
1132
+ #: inc/styles.php:319
1133
+ msgid "Space below the row on tablet devices. Default is %spx."
1134
+ msgstr ""
1135
+
1136
+ #: inc/styles.php:326
1137
  msgid "Mobile Bottom Margin"
1138
  msgstr ""
1139
 
1140
+ #: inc/styles.php:329
1141
  msgid "Space below the row on mobile devices. Default is %spx."
1142
  msgstr ""
1143
 
1144
+ #: inc/styles.php:334
1145
  msgid "Mobile Cell Margins"
1146
  msgstr ""
1147
 
1148
+ #: inc/styles.php:337
1149
  msgid "Vertical space between cells in a collapsed mobile row. Default is %spx."
1150
  msgstr ""
1151
 
1152
+ #: inc/styles.php:353
1153
  msgid "Cell"
1154
  msgstr ""
1155
 
1156
+ #: inc/styles.php:356
1157
  msgid "Vertical Alignment"
1158
  msgstr ""
1159
 
1160
+ #: inc/styles.php:360
1161
  msgid "Use row setting"
1162
  msgstr ""
1163
 
1164
+ #: inc/styles.php:370, inc/styles.php:418
1165
  msgid "Font Color"
1166
  msgstr ""
1167
 
1168
+ #: inc/styles.php:373
1169
  msgid "Color of text inside this cell."
1170
  msgstr ""
1171
 
1172
+ #: inc/styles.php:378, inc/styles.php:426
1173
+ msgid "Link Color"
1174
  msgstr ""
1175
 
1176
+ #: inc/styles.php:381
1177
  msgid "Color of links inside this cell."
1178
  msgstr ""
1179
 
1180
+ #: inc/styles.php:386, inc/styles.php:434
1181
+ msgid "Link Hover Color"
1182
+ msgstr ""
1183
+
1184
+ #: inc/styles.php:389, inc/styles.php:437
1185
+ msgid "Color of links inside this widget when hovered."
1186
+ msgstr ""
1187
+
1188
+ #: inc/styles.php:407
1189
  msgid "Margin"
1190
  msgstr ""
1191
 
1192
+ #: inc/styles.php:410
1193
  msgid "Margins around the widget."
1194
  msgstr ""
1195
 
1196
+ #: inc/styles.php:421
1197
  msgid "Color of text inside this widget."
1198
  msgstr ""
1199
 
1200
+ #: inc/styles.php:429
1201
  msgid "Color of links inside this widget."
1202
  msgstr ""
1203
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: page builder, responsive, parallax, widgets, blocks, gallery, layout, grid
3
  Requires at least: 4.7
4
  Tested up to: 5.8
5
  Requires PHP: 5.6.20
6
- Stable tag: 2.13.2
7
- Build time: 2021-08-14T12:58:11+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -107,6 +107,18 @@ SiteOrigin Premium includes access to our professional email support service, pe
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  = 2.13.2 - 14 August 2021 =
111
  * Modern Parallax: Resolved potential Jetpack Image Accelerator notice.
112
  * Customizer: Resolved new widget area notice.
3
  Requires at least: 4.7
4
  Tested up to: 5.8
5
  Requires PHP: 5.6.20
6
+ Stable tag: 2.14.0
7
+ Build time: 2021-09-29T12:15:23+02:00
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl.html
10
  Donate link: https://siteorigin.com/downloads/premium/
107
 
108
  == Changelog ==
109
 
110
+ = 2.14.0 - 29 September 2021 =
111
+ * Tablet Styles: Added a new Tablet Styles section to row, cell, and widget styles.
112
+ * Widget Design Settings: Added a Link Hover Color setting.
113
+ * History Browser: Resolved incorrect preview URL.
114
+ * Live Editor: When accessing the Live Editor via the toolbar link, return to the site after saving. Setting available at Settings > Page Builder > General.
115
+ * Polylang: Ensured Page Builder data is copied during page duplication in the Classic Editor.
116
+ * Yoast SEO: Added additional Open Graph compatibility check.
117
+ * Developer: Advanced Custom Fields: Improved repeater support.
118
+ * Developer: Changed CSS Builder `$css` to public to allow more extensive filtering.
119
+ * Developer: Added `setup_style_fields` JavaScript event to allow the setup of custom style fields.
120
+ * Developer: Added an optional CSS method for full width containers using `siteorigin_panels_theme_container_width` and `siteorigin_panels_theme_container_selector`.
121
+
122
  = 2.13.2 - 14 August 2021 =
123
  * Modern Parallax: Resolved potential Jetpack Image Accelerator notice.
124
  * Customizer: Resolved new widget area notice.
settings/admin-settings.js CHANGED
@@ -151,7 +151,7 @@ jQuery( function($){
151
  $('#panels-settings-search .results').fadeOut('fast');
152
  } );
153
 
154
- var handleParallaxVisibility = function() {
155
  if ( $( 'select[name="panels_setting[parallax-type]"]' ).val() == 'modern' ) {
156
  $( 'input[name="panels_setting[parallax-motion]"]' ).parent().parent().hide();
157
  $( 'input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]' ).parent().parent().show();
@@ -159,9 +159,15 @@ jQuery( function($){
159
  $( 'input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]' ).parent().parent().hide();
160
  $( 'input[name="panels_setting[parallax-motion]"]' ).parent().parent().show();
161
  }
 
 
 
 
 
 
162
  }
163
- handleParallaxVisibility();
164
- $( 'select[name="panels_setting[parallax-type]"]' ).on( 'change', handleParallaxVisibility );
165
  } );
166
 
167
  // Fitvids
151
  $('#panels-settings-search .results').fadeOut('fast');
152
  } );
153
 
154
+ var handleSettingVisibility = function() {
155
  if ( $( 'select[name="panels_setting[parallax-type]"]' ).val() == 'modern' ) {
156
  $( 'input[name="panels_setting[parallax-motion]"]' ).parent().parent().hide();
157
  $( 'input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]' ).parent().parent().show();
159
  $( 'input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]' ).parent().parent().hide();
160
  $( 'input[name="panels_setting[parallax-motion]"]' ).parent().parent().show();
161
  }
162
+
163
+ if ( $( 'input[name="panels_setting[live-editor-quick-link]' ).prop( 'checked' ) ) {
164
+ $( 'input[name="panels_setting[live-editor-quick-link-close-after]"]' ).parents( '.panels-setting' ).show();
165
+ } else {
166
+ $( 'input[name="panels_setting[live-editor-quick-link-close-after]"]' ).parents( '.panels-setting' ).hide();
167
+ }
168
  }
169
+ handleSettingVisibility();
170
+ $( '.panels-setting select, .panels-setting input' ).on( 'change', handleSettingVisibility );
171
  } );
172
 
173
  // Fitvids
settings/admin-settings.min.js CHANGED
@@ -1 +1 @@
1
- jQuery((function(t){t(".settings-banner img").hide().eq(0).one("load",(function(){t.each([1,2,3],(function(e,i){var a=t(".settings-banner img.layer-"+i),n=a.css("opacity");setTimeout((function(){a.show().css({"margin-top":"-5px",opacity:0}).animate({"margin-top":0,opacity:n},280+40*(4-i))}),150+225*(4-i))}))})).each((function(){this.complete&&t(this).trigger("load")})),t(".settings-nav li a").on("click",(function(e){e.preventDefault();var i=t(this);t(".settings-nav li a").not(i).closest("li").removeClass("active"),i.closest("li").addClass("active");var a=i.attr("href").split("#")[1],n=t("#panels-settings-section-"+a);t("#panels-settings-sections .panels-settings-section").not(n).hide(),n.show(),t('#panels-settings-page input[type="submit"]').css({visibility:"welcome"===a?"hidden":"visible"}),setUserSetting("siteorigin_panels_setting_tab",a)})),window.location.hash&&t('.settings-nav li a[href="'+window.location.hash+'"]').trigger("click"),t("#panels-settings-section-welcome").fitVids();var e=getUserSetting("siteorigin_panels_setting_tab");""===e?t(".settings-nav li a").first().trigger("click"):t('.settings-nav li a[href="#'+e+'"]').first().trigger("click");t("#panels-settings-search input").on("keyup click",(function(){var e=t(this),i=t("#panels-settings-search .results"),a=e.val();if(""===a)return i.empty().hide(),!1;var n=[];t("#panels-settings-sections .panels-setting").each((function(){var e=t(this),i=0,s=e.find("label").html().toLowerCase().indexOf(a),r=e.find(".description").data("keywords").toLowerCase().indexOf(a),o=e.find(".description").html().toLowerCase().indexOf(a);0===s?i+=10:-1!==s&&(i+=7),0===r?i+=4:-1!==r&&(i+=3),0===o?i+=2:-1!==o&&(i+=1),i>0&&(n.push(e),e.data("isMatch",i))})),i.empty(),n.length>0?(i.show(),n.sort((function(t,e){return e.data("isMatch")-t.data("isMatch")})),n=n.slice(0,8),t.each(n,(function(e,a){t("#panels-settings-search .results").append(t("<li></li>").html(a.find("label").html()).click((function(){var e;t('.settings-nav li a[href="#'+(e=a).closest(".panels-settings-section").data("section")+'"]').first().click(),e.addClass("highlighted"),e.find("label").css("border-left-width",0).animate({"border-left-width":5},"normal").delay(4e3).animate({"border-left-width":0},"normal",(function(){e.removeClass("highlighted")})),e.find("input, textarea").trigger("focus"),i.fadeOut("fast"),t("#panels-settings-search input").trigger("blur")})))}))):i.hide()})).on("blur",(function(){t("#panels-settings-search .results").fadeOut("fast")}));var i=function(){"modern"==t('select[name="panels_setting[parallax-type]"]').val()?(t('input[name="panels_setting[parallax-motion]"]').parent().parent().hide(),t('input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]').parent().parent().show()):(t('input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]').parent().parent().hide(),t('input[name="panels_setting[parallax-motion]"]').parent().parent().show())};i(),t('select[name="panels_setting[parallax-type]"]').on("change",i)})),function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var a=document.head||document.getElementsByTagName("head")[0],n=document.createElement("div");n.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',a.appendChild(n.childNodes[1])}return e&&t.extend(i,e),this.each((function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var a=".fitvidsignore";i.ignore&&(a=a+", "+i.ignore);var n=t(this).find(e.join(","));(n=(n=n.not("object object")).not(a)).each((function(){var e=t(this);if(!(e.parents(a).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var i=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var n="fitvid"+t.fn.fitVids._count;e.attr("name",n),t.fn.fitVids._count++}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*i+"%"),e.removeAttr("height").removeAttr("width")}}))}))},t.fn.fitVids._count=0}(window.jQuery||window.Zepto);
1
+ jQuery((function(t){t(".settings-banner img").hide().eq(0).one("load",(function(){t.each([1,2,3],(function(e,i){var n=t(".settings-banner img.layer-"+i),a=n.css("opacity");setTimeout((function(){n.show().css({"margin-top":"-5px",opacity:0}).animate({"margin-top":0,opacity:a},280+40*(4-i))}),150+225*(4-i))}))})).each((function(){this.complete&&t(this).trigger("load")})),t(".settings-nav li a").on("click",(function(e){e.preventDefault();var i=t(this);t(".settings-nav li a").not(i).closest("li").removeClass("active"),i.closest("li").addClass("active");var n=i.attr("href").split("#")[1],a=t("#panels-settings-section-"+n);t("#panels-settings-sections .panels-settings-section").not(a).hide(),a.show(),t('#panels-settings-page input[type="submit"]').css({visibility:"welcome"===n?"hidden":"visible"}),setUserSetting("siteorigin_panels_setting_tab",n)})),window.location.hash&&t('.settings-nav li a[href="'+window.location.hash+'"]').trigger("click"),t("#panels-settings-section-welcome").fitVids();var e=getUserSetting("siteorigin_panels_setting_tab");""===e?t(".settings-nav li a").first().trigger("click"):t('.settings-nav li a[href="#'+e+'"]').first().trigger("click");t("#panels-settings-search input").on("keyup click",(function(){var e=t(this),i=t("#panels-settings-search .results"),n=e.val();if(""===n)return i.empty().hide(),!1;var a=[];t("#panels-settings-sections .panels-setting").each((function(){var e=t(this),i=0,s=e.find("label").html().toLowerCase().indexOf(n),r=e.find(".description").data("keywords").toLowerCase().indexOf(n),l=e.find(".description").html().toLowerCase().indexOf(n);0===s?i+=10:-1!==s&&(i+=7),0===r?i+=4:-1!==r&&(i+=3),0===l?i+=2:-1!==l&&(i+=1),i>0&&(a.push(e),e.data("isMatch",i))})),i.empty(),a.length>0?(i.show(),a.sort((function(t,e){return e.data("isMatch")-t.data("isMatch")})),a=a.slice(0,8),t.each(a,(function(e,n){t("#panels-settings-search .results").append(t("<li></li>").html(n.find("label").html()).click((function(){var e;t('.settings-nav li a[href="#'+(e=n).closest(".panels-settings-section").data("section")+'"]').first().click(),e.addClass("highlighted"),e.find("label").css("border-left-width",0).animate({"border-left-width":5},"normal").delay(4e3).animate({"border-left-width":0},"normal",(function(){e.removeClass("highlighted")})),e.find("input, textarea").trigger("focus"),i.fadeOut("fast"),t("#panels-settings-search input").trigger("blur")})))}))):i.hide()})).on("blur",(function(){t("#panels-settings-search .results").fadeOut("fast")}));var i=function(){"modern"==t('select[name="panels_setting[parallax-type]"]').val()?(t('input[name="panels_setting[parallax-motion]"]').parent().parent().hide(),t('input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]').parent().parent().show()):(t('input[name="panels_setting[parallax-delay]"], input[name="panels_setting[parallax-scale]"]').parent().parent().hide(),t('input[name="panels_setting[parallax-motion]"]').parent().parent().show()),t('input[name="panels_setting[live-editor-quick-link]').prop("checked")?t('input[name="panels_setting[live-editor-quick-link-close-after]"]').parents(".panels-setting").show():t('input[name="panels_setting[live-editor-quick-link-close-after]"]').parents(".panels-setting").hide()};i(),t(".panels-setting select, .panels-setting input").on("change",i)})),function(t){"use strict";t.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("div");a.innerHTML='<p>x</p><style id="fit-vids-style">.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}</style>',n.appendChild(a.childNodes[1])}return e&&t.extend(i,e),this.each((function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var n=".fitvidsignore";i.ignore&&(n=n+", "+i.ignore);var a=t(this).find(e.join(","));(a=(a=a.not("object object")).not(n)).each((function(){var e=t(this);if(!(e.parents(n).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var i=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var a="fitvid"+t.fn.fitVids._count;e.attr("name",a),t.fn.fitVids._count++}e.wrap('<div class="fluid-width-video-wrapper"></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*i+"%"),e.removeAttr("height").removeAttr("width")}}))}))},t.fn.fitVids._count=0}(window.jQuery||window.Zepto);
siteorigin-panels.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
- Version: 2.13.2
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
@@ -11,7 +11,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
- define( 'SITEORIGIN_PANELS_VERSION', '2.13.2' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
@@ -235,6 +235,10 @@ class SiteOrigin_Panels {
235
  if ( siteorigin_panels_setting( 'parallax-type' ) == 'modern' && class_exists( 'Jetpack_Photon' ) && Jetpack::is_module_active( 'photon' ) ) {
236
  require_once plugin_dir_path( __FILE__ ) . 'compat/jetpack.php';
237
  }
 
 
 
 
238
  }
239
 
240
  /**
@@ -291,6 +295,16 @@ class SiteOrigin_Panels {
291
  return $preview_url;
292
  }
293
 
 
 
 
 
 
 
 
 
 
 
294
  /**
295
  * Get the Page Builder data for the home page.
296
  *
@@ -524,6 +538,11 @@ class SiteOrigin_Panels {
524
  if( self::is_home() ) $classes[] = 'siteorigin-panels-home';
525
  if( self::is_live_editor() ) $classes[] = 'siteorigin-panels-live-editor';
526
 
 
 
 
 
 
527
  return $classes;
528
  }
529
 
3
  Plugin Name: Page Builder by SiteOrigin
4
  Plugin URI: https://siteorigin.com/page-builder/
5
  Description: A drag and drop, responsive page builder that simplifies building your website.
6
+ Version: 2.14.0
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
11
  Donate link: http://siteorigin.com/page-builder/#donate
12
  */
13
 
14
+ define( 'SITEORIGIN_PANELS_VERSION', '2.14.0' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
235
  if ( siteorigin_panels_setting( 'parallax-type' ) == 'modern' && class_exists( 'Jetpack_Photon' ) && Jetpack::is_module_active( 'photon' ) ) {
236
  require_once plugin_dir_path( __FILE__ ) . 'compat/jetpack.php';
237
  }
238
+
239
+ if ( class_exists( 'Polylang' ) ) {
240
+ require_once plugin_dir_path( __FILE__ ) . 'compat/polylang.php';
241
+ }
242
  }
243
 
244
  /**
295
  return $preview_url;
296
  }
297
 
298
+ public static function container_settings() {
299
+ $container = array(
300
+ 'selector' => apply_filters( 'siteorigin_panels_theme_container_selector', '' ),
301
+ 'width' => apply_filters( 'siteorigin_panels_theme_container_width', '' ),
302
+ );
303
+ $container['css_override'] = ! empty( $container['selector'] ) && ! empty( $container['width'] );
304
+
305
+ return $container;
306
+ }
307
+
308
  /**
309
  * Get the Page Builder data for the home page.
310
  *
538
  if( self::is_home() ) $classes[] = 'siteorigin-panels-home';
539
  if( self::is_live_editor() ) $classes[] = 'siteorigin-panels-live-editor';
540
 
541
+ $this->container = SiteOrigin_Panels::container_settings();
542
+ if ( ! empty( $this->container ) && $this->container['css_override'] ) {
543
+ $classes[] = 'siteorigin-panels-css-container';
544
+ }
545
+
546
  return $classes;
547
  }
548
 
tpl/js-templates.php CHANGED
@@ -534,7 +534,7 @@ $layouts = apply_filters( 'siteorigin_panels_prebuilt_layouts', array() );
534
  </div>
535
 
536
  <div class="content">
537
- <form method="post" action="<?php echo SiteOrigin_Panels::preview_url() ?>" target="siteorigin-panels-history-iframe-{{%= cid %}}" class="history-form">
538
  <input type="hidden" name="live_editor_panels_data" value="">
539
  <input type="hidden" name="live_editor_post_ID" value="">
540
  </form>
534
  </div>
535
 
536
  <div class="content">
537
+ <form method="post" action="" target="siteorigin-panels-history-iframe-{{%= cid %}}" class="history-form">
538
  <input type="hidden" name="live_editor_panels_data" value="">
539
  <input type="hidden" name="live_editor_post_ID" value="">
540
  </form>
tpl/metabox-panels.php CHANGED
@@ -3,7 +3,10 @@
3
  data-preview-url="<?php echo $preview_url; ?>"
4
  data-preview-markup="<?php echo esc_attr( json_encode( $preview_content ) ); ?>"
5
  data-builder-supports="<?php echo esc_attr( json_encode( $builder_supports ) ) ?>"
6
- <?php if( !empty( $_GET['so_live_editor'] ) ) echo 'data-live-editor="1"' ?>
 
 
 
7
  >
8
  <?php do_action('siteorigin_panels_before_interface') ?>
9
  <?php wp_nonce_field('save', '_sopanels_nonce') ?>
3
  data-preview-url="<?php echo $preview_url; ?>"
4
  data-preview-markup="<?php echo esc_attr( json_encode( $preview_content ) ); ?>"
5
  data-builder-supports="<?php echo esc_attr( json_encode( $builder_supports ) ) ?>"
6
+ <?php if ( ! empty( $_GET['so_live_editor'] ) ) : ?>
7
+ data-live-editor="1"
8
+ data-live-editor-close="<?php echo siteorigin_panels_setting( 'live-editor-quick-link' ); ?>"
9
+ <?php endif; ?>
10
  >
11
  <?php do_action('siteorigin_panels_before_interface') ?>
12
  <?php wp_nonce_field('save', '_sopanels_nonce') ?>
wpml-config.xml ADDED
@@ -0,0 +1,454 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <wpml-config>
2
+ <built-with-page-builder>/\[siteorigin_widget.*\]/</built-with-page-builder>
3
+ <admin-texts>
4
+ <key name="so_widget_settings[SiteOrigin_Widget_GoogleMap_Widget]">
5
+ <key name="map_consent_btn_text" />
6
+ <key name="map_consent_notice" />
7
+ </key>
8
+ </admin-texts>
9
+ <gutenberg-blocks>
10
+ <gutenberg-block type="siteorigin-panels/layout-block" translate="1">
11
+ <key name="panelsData">
12
+ <key name="widgets">
13
+ <key name="*">
14
+ <key name="title" />
15
+ <key name="text" />
16
+ <key name="alt" />
17
+ <key name="url" />
18
+ <key name="content" />
19
+ <key name="caption" />
20
+ <key name="attributes">
21
+ <key name="title" />
22
+ </key>
23
+ <key name="settings">
24
+ <key name="default_subject" />
25
+ <key name="subject_prefix" />
26
+ <key name="success_message" />
27
+ <key name="submit_text" />
28
+ </key>
29
+ <key name="fields">
30
+ <key name="*">
31
+ <key name="label" />
32
+ <key name="description" />
33
+ <key name="required">
34
+ <key name="missing_message" />
35
+ </key>
36
+ </key>
37
+ </key>
38
+ <key name="panels">
39
+ <key name="*">
40
+ <key name="title" />
41
+ <key name="content_text" />
42
+ <key name="content_layout" />
43
+ </key>
44
+ </key>
45
+ <key name="items">
46
+ <key name="*">
47
+ <key name="title" />
48
+ <key name="content_text" />
49
+ <key name="content_layout" />
50
+ <key name="url" />
51
+ </key>
52
+ </key>
53
+ <key name="tabs">
54
+ <key name="*">
55
+ <key name="title" />
56
+ <key name="content_text" />
57
+ <key name="content_layout" />
58
+ <key name="url" />
59
+ </key>
60
+ </key>
61
+ <key name="features">
62
+ <key name="*">
63
+ <key name="title" />
64
+ <key name="text" />
65
+ <key name="icon_title" />
66
+ <key name="more_text" />
67
+ <key name="more_url" />
68
+ </key>
69
+ </key>
70
+ <key name="frames">
71
+ <key name="*">
72
+ <key name="content" />
73
+ <key name="url" />
74
+ </key>
75
+ </key>
76
+ <key name="images">
77
+ <key name="*">
78
+ <key name="title" />
79
+ <key name="alt" />
80
+ <key name="url" />
81
+ </key>
82
+ </key>
83
+ <key name="columns">
84
+ <key name="*">
85
+ <key name="title" />
86
+ <key name="subtitle" />
87
+ <key name="image_title" />
88
+ <key name="image_alt" />
89
+ <key name="per" />
90
+ <key name="button_text" />
91
+ <key name="url" />
92
+ </key>
93
+ </key>
94
+ <key name="networks">
95
+ <key name="*">
96
+ <key name="url" />
97
+ <key name="icon_title" />
98
+ </key>
99
+ </key>
100
+ <key name="testimonials">
101
+ <key name="*">
102
+ <key name="title" />
103
+ <key name="url" />
104
+ </key>
105
+ </key>
106
+ <key name="headline">
107
+ <key name="text" />
108
+ <key name="destination_url" />
109
+ </key>
110
+ <key name="sub_headline">
111
+ <key name="text" />
112
+ <key name="destination_url" />
113
+ </key>
114
+ <key name="testimonials">
115
+ <key name="*">
116
+ <key name="text" />
117
+ <key name="url" />
118
+ </key>
119
+ </key>
120
+ <key name="frames">
121
+ <key name="*">
122
+ <key name="content" />
123
+ </key>
124
+ </key>
125
+ <key name="features">
126
+ <key name="*">
127
+ <key name="title" />
128
+ <key name="text" />
129
+ <key name="icon_title" />
130
+ <key name="more_text" />
131
+ <key name="more_url" />
132
+ </key>
133
+ </key>
134
+ <key name="cta">
135
+ <key name="*">
136
+ <key name="title" />
137
+ <key name="sub_title" />
138
+ <key name="button>text" />
139
+ <key name="button>destination_url" />
140
+ <key name="attributes>title" />
141
+ </key>
142
+ </key>
143
+ <key name="taxonomy">
144
+ <key name="*">
145
+ <key name="label" />
146
+ </key>
147
+ </key>
148
+ </key>
149
+ </key>
150
+ </key>
151
+ </gutenberg-block>
152
+ </gutenberg-blocks>
153
+ <siteorigin-widgets>
154
+ <widget name="WP_Widget_Archives">
155
+ <fields>
156
+ <field type="Archive title">title</field>
157
+ </fields>
158
+ </widget>
159
+ <widget name="WP_Widget_Media_Audio">
160
+ <fields>
161
+ <field type="Audio title">title</field>
162
+ <field type="Audio URL" editor_type="LINK">url</field>
163
+ </fields>
164
+ </widget>
165
+ <widget name="WP_Widget_Calendar">
166
+ <fields>
167
+ <field type="Calendar title">title</field>
168
+ </fields>
169
+ </widget>
170
+ <widget name="WP_Widget_Categories">
171
+ <fields>
172
+ <field type="Categories title">title</field>
173
+ </fields>
174
+ </widget>
175
+ <widget name="WP_Widget_Custom_HTML">
176
+ <fields>
177
+ <field type="Custom HTML title">title</field>
178
+ <field type="Custom HTML content" editor_type="AREA">content</field>
179
+ </fields>
180
+ </widget>
181
+ <widget name="WP_Widget_Media_Gallery">
182
+ <fields>
183
+ <field type="Gallery title">title</field>
184
+ </fields>
185
+ </widget>
186
+ <widget name="WP_Widget_Media_Image">
187
+ <fields>
188
+ <field type="Image title">title</field>
189
+ <field type="Image caption">caption</field>
190
+ <field type="Image URL" editor_type="LINK">url</field>
191
+ </fields>
192
+ </widget>
193
+ <widget name="WP_Widget_Meta">
194
+ <fields>
195
+ <field type="Meta title">title</field>
196
+ </fields>
197
+ </widget>
198
+ <widget name="WP_Widget_Text_Icl">
199
+ <fields>
200
+ <field type="Title">title</field>
201
+ <field type="Text" editor_type="AREA">text</field>
202
+ </fields>
203
+ </widget>
204
+ <widget name="WP_Nav_Menu_Widget">
205
+ <fields>
206
+ <field type="Menu title">title</field>
207
+ </fields>
208
+ </widget>
209
+ <widget name="WP_Widget_Pages">
210
+ <fields>
211
+ <field type="Pages title">title</field>
212
+ </fields>
213
+ </widget>
214
+ <widget name="WP_Widget_RSS">
215
+ <fields>
216
+ <field type="RSS title">title</field>
217
+ <field type="RSS URL" editor_type="LINK">url</field>
218
+ </fields>
219
+ </widget>
220
+ <widget name="WP_Widget_Recent_Comments">
221
+ <fields>
222
+ <field type="Comments title">title</field>
223
+ </fields>
224
+ </widget>
225
+ <widget name="WP_Widget_Recent_Posts">
226
+ <fields>
227
+ <field type="Posts title">title</field>
228
+ </fields>
229
+ </widget>
230
+ <widget name="WP_Widget_Search">
231
+ <fields>
232
+ <field type="Search title">title</field>
233
+ </fields>
234
+ </widget>
235
+ <widget name="WP_Widget_Tag_Cloud">
236
+ <fields>
237
+ <field type="Tag cloud title">title</field>
238
+ </fields>
239
+ </widget>
240
+ <widget name="WP_Widget_Text">
241
+ <fields>
242
+ <field type="Title">title</field>
243
+ <field type="Text" editor_type="AREA">text</field>
244
+ </fields>
245
+ </widget>
246
+ <widget name="SiteOrigin_Widget_Accordion_Widget">
247
+ <fields>
248
+ <field type="Accordion title">title</field>
249
+ </fields>
250
+ <fields-in-item items_of="panels">
251
+ <field type="Accordion panel title">title</field>
252
+ <field type="Accordion panel content_text" editor_type="VISUAL">content_text</field>
253
+ <field type="Accordion panel content_layout">content_layout</field>
254
+ </fields-in-item>
255
+ </widget>
256
+ <widget name="SiteOrigin_Widget_Anything_Carousel_Widget">
257
+ <fields>
258
+ <field type="Anything carousel title">title</field>
259
+ </fields>
260
+ <fields-in-item items_of="items">
261
+ <field type="Anything carousel panel title">title</field>
262
+ <field type="Anything carousel panel content_text" editor_type="VISUAL">content_text</field>
263
+ <field type="Anything carousel panel content_layout">content_layout</field>
264
+ </fields-in-item>
265
+ </widget>
266
+ <widget name="SiteOrigin_Widget_Button_Widget">
267
+ <fields>
268
+ <field type="Button text">text</field>
269
+ <field type="Button URL" editor_type="LINK">url</field>
270
+ <field type="Button title">attributes>title</field>
271
+ </fields>
272
+ </widget>
273
+ <widget name="SiteOrigin_Widgets_ContactForm_Widget">
274
+ <fields>
275
+ <field type="Contact form title">title</field>
276
+ <field type="Contact form default subject">settings>default_subject</field>
277
+ <field type="Contact form subject prefix">settings>subject_prefix</field>
278
+ <field type="Contact form success message">settings>success_message</field>
279
+ <field type="Contact form submit text">settings>submit_text</field>
280
+ </fields>
281
+ <fields-in-item items_of="fields">
282
+ <field type="Contact form field label">label</field>
283
+ <field type="Contact form field description">description</field>
284
+ <field type="Contact form field missing">required>missing_message</field>
285
+ </fields-in-item>
286
+ </widget>
287
+ <widget name="SiteOrigin_Widget_Cta_Widget">
288
+ <fields>
289
+ <field type="CTA title">title</field>
290
+ <field type="CTA sub title">sub_title</field>
291
+ <field type="CTA button text">button>text</field>
292
+ <field type="CTA button URL" editor_type="LINK">button>destination_url</field>
293
+ <field type="CTA button title">attributes>title</field>
294
+ </fields>
295
+ </widget>
296
+ <widget name="SiteOrigin_Widget_Editor_Widget">
297
+ <fields>
298
+ <field type="Editor title">title</field>
299
+ <field type="Editor content" editor_type="VISUAL">text</field>
300
+ </fields>
301
+ </widget>
302
+ <widget name="SiteOrigin_Widget_Features_Widget">
303
+ <fields-in-item items_of="features">
304
+ <field type="Feature title">title</field>
305
+ <field type="Feature text" editor_type="VISUAL">text</field>
306
+ <field type="Feature icon title">icon_title</field>
307
+ <field type="Feature more text">more_text</field>
308
+ <field type="Feature more URL" editor_type="LINK">more_url</field>
309
+ </fields-in-item>
310
+ </widget>
311
+ <widget name="SiteOrigin_Widget_GoogleMap_Widget">
312
+ <fields-in-item items_of="markers>marker_positions">
313
+ <field type="Map marker info" editor_type="VISUAL">info</field>
314
+ </fields-in-item>
315
+ </widget>
316
+ <widget name="SiteOrigin_Widget_Headline_Widget">
317
+ <fields>
318
+ <field type="Headline text">headline>text</field>
319
+ <field type="Headline URL" editor_type="LINK">headline>destination_url</field>
320
+ <field type="Sub headline text">sub_headline>text</field>
321
+ <field type="Sub headline URL" editor_type="LINK">sub_headline>destination_url</field>
322
+ </fields>
323
+ </widget>
324
+ <widget name="SiteOrigin_Widget_Hero_Widget">
325
+ <fields-in-item items_of="frames">
326
+ <field type="Hero content" editor_type="VISUAL">content</field>
327
+ </fields-in-item>
328
+ <fields-in-item items_of="frames>buttons">
329
+ <field type="Hero button text">button>text</field>
330
+ <field type="Hero button link" editor_type="LINK">button>url</field>
331
+ <field type="Hero button link title">button>attributes>title</field>
332
+ </fields-in-item>
333
+ </widget>
334
+ <widget name="SiteOrigin_Widget_Icon_Widget">
335
+ <fields>
336
+ <field type="Icon title">title</field>
337
+ <field type="Icon URL" editor_type="LINK">url</field>
338
+ </fields>
339
+ </widget>
340
+ <widget name="SiteOrigin_Widget_Image_Widget">
341
+ <fields>
342
+ <field type="Image title">title</field>
343
+ <field type="Image alt">alt</field>
344
+ <field type="Image URL" editor_type="LINK">url</field>
345
+ </fields>
346
+ </widget>
347
+ <widget name="SiteOrigin_Widgets_ImageGrid_Widget">
348
+ <fields-in-item items_of="images">
349
+ <field type="Image title">title</field>
350
+ <field type="Image alt">alt</field>
351
+ <field type="Image URL" editor_type="LINK">url</field>
352
+ </fields-in-item>
353
+ </widget>
354
+ <widget name="SiteOrigin_Widget_PostCarousel_Widget">
355
+ <fields>
356
+ <field type="Post carousel title">title</field>
357
+ </fields>
358
+ </widget>
359
+ <widget name="SiteOrigin_Widget_PriceTable_Widget">
360
+ <fields>
361
+ <field type="Price table title">title</field>
362
+ </fields>
363
+ <fields-in-item items_of="columns">
364
+ <field type="Price title">title</field>
365
+ <field type="Price subtitle">subtitle</field>
366
+ <field type="Price image title">image_title</field>
367
+ <field type="Price image alt">image_alt</field>
368
+ <field type="Price per">per</field>
369
+ <field type="Price button text">button_text</field>
370
+ <field type="Price button URL" editor_type="LINK">url</field>
371
+ </fields-in-item>
372
+ <fields-in-item items_of="columns>features">
373
+ <field type="Feature text">features>text</field>
374
+ <field type="Feature hover text">features>hover_text</field>
375
+ </fields-in-item>
376
+ </widget>
377
+ <widget name="SiteOrigin_Widget_Simple_Masonry_Widget">
378
+ <fields>
379
+ <field type="Simple masonry title">title</field>
380
+ </fields>
381
+ <fields-in-item items_of="items">
382
+ <field type="Simple masonry item title">title</field>
383
+ <field type="Simple masonry item URL" editor_type="LINK">url</field>
384
+ </fields-in-item>
385
+ </widget>
386
+ <widget name="SiteOrigin_Widget_Slider_Widget">
387
+ <fields-in-item items_of="frames">
388
+ <field type="Slide URL" editor_type="LINK">url</field>
389
+ </fields-in-item>
390
+ </widget>
391
+ <widget name="SiteOrigin_Widget_SocialMediaButtons_Widget">
392
+ <fields>
393
+ <field type="Social media buttons title">title</field>
394
+ </fields>
395
+ <fields-in-item items_of="networks">
396
+ <field type="Social Network URL" editor_type="LINK">url</field>
397
+ <field type="Social Network icon title">icon_title</field>
398
+ </fields-in-item>
399
+ </widget>
400
+ <widget name="SiteOrigin_Widget_Tabs_Widget">
401
+ <fields>
402
+ <field type="Tab title">title</field>
403
+ </fields>
404
+ <fields-in-item items_of="tabs">
405
+ <field type="Tabs title">title</field>
406
+ <field type="Tab content_text" editor_type="VISUAL">content_text</field>
407
+ <field type="Tab content_layout">content_layout</field>
408
+ </fields-in-item>
409
+ </widget>
410
+ <widget name="SiteOrigin_Widget_Taxonomy_Widget">
411
+ <fields>
412
+ <field type="Taxonomy title">title</field>
413
+ <field type="Taxonomy label">label</field>
414
+ </fields>
415
+ </widget>
416
+ <widget name="SiteOrigin_Widgets_Testimonials_Widget">
417
+ <fields>
418
+ <field type="Testimonials title">title</field>
419
+ </fields>
420
+ <fields-in-item items_of="testimonials">
421
+ <field type="Testimonial text" editor_type="VISUAL">text</field>
422
+ <field type="Testimonial URL" editor_type="LINK">url</field>
423
+ </fields-in-item>
424
+ </widget>
425
+ <widget name="SiteOrigin_Widget_Video_Widget">
426
+ <fields>
427
+ <field type="Video title">title</field>
428
+ </fields>
429
+ </widget>
430
+ <widget name="SiteOrigin_Widget_PriceTable_Widget">
431
+ <fields>
432
+ <field type="Price table title">title</field>
433
+ </fields>
434
+ <fields-in-item items_of="columns">
435
+ <field type="Price title">title</field>
436
+ <field type="Price subtitle">subtitle</field>
437
+ <field type="Price image title">image_title</field>
438
+ <field type="Price image alt">image_alt</field>
439
+ <field type="Price per">per</field>
440
+ <field type="Price button text">button</field>
441
+ <field type="Price button URL" editor_type="LINK">url</field>
442
+ </fields-in-item>
443
+ <fields-in-item items_of="columns>features">
444
+ <field type="Feature text">text</field>
445
+ <field type="Feature hover text">hover</field>
446
+ </fields-in-item>
447
+ </widget>
448
+ <widget name="SiteOrigin_Widget_GoogleMap_Widget">
449
+ <fields-in-item items_of="markers>marker_positions">
450
+ <field type="Map marker info" editor_type="VISUAL">info</field>
451
+ </fields-in-item>
452
+ </widget>
453
+ </siteorigin-widgets>
454
+ </wpml-config>