Page Builder by SiteOrigin - Version 2.5.11

Version Description

  • 24 August 2017 =
  • Prevent creating multiple new entries in post meta every time a post is previewed.
  • Avoid using relative asset URLs which may break caching plugins.
  • Import custom widget class from HTML.
Download this release

Release Info

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

Code changes from version 2.5.10 to 2.5.11

inc/admin.php CHANGED
@@ -234,16 +234,22 @@ class SiteOrigin_Panels_Admin {
234
  if ( $force || self::is_admin() ) {
235
  // Media is required for row styles
236
  wp_enqueue_media();
237
- wp_enqueue_script( 'so-panels-admin', plugin_dir_url( __FILE__ ) . '../js/siteorigin-panels' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array(
238
- 'jquery',
239
- 'jquery-ui-resizable',
240
- 'jquery-ui-sortable',
241
- 'jquery-ui-draggable',
242
- 'underscore',
243
- 'backbone',
244
- 'plupload',
245
- 'plupload-all'
246
- ), SITEORIGIN_PANELS_VERSION, true );
 
 
 
 
 
 
247
  add_action( 'admin_footer', array( $this, 'js_templates' ) );
248
 
249
  $widgets = $this->get_widgets();
@@ -404,7 +410,7 @@ class SiteOrigin_Panels_Admin {
404
  'error_message' => __( 'Error uploading or importing file.', 'siteorigin-panels' ),
405
  ),
406
  'wpColorPickerOptions' => apply_filters( 'siteorigin_panels_wpcolorpicker_options', array() ),
407
- 'prebuiltDefaultScreenshot' => plugin_dir_url( __FILE__ ) . '../css/images/prebuilt-default.png',
408
  'loadOnAttach' => siteorigin_panels_setting( 'load-on-attach' ),
409
  'siteoriginWidgetRegex' => str_replace( '*+', '*', get_shortcode_regex( array( 'siteorigin_widget' ) ) ),
410
  ) );
@@ -455,7 +461,12 @@ class SiteOrigin_Panels_Admin {
455
  */
456
  function enqueue_admin_styles( $prefix = '', $force = false ) {
457
  if ( $force || self::is_admin() ) {
458
- wp_enqueue_style( 'so-panels-admin', plugin_dir_url( __FILE__ ) . '../css/admin.css', array( 'wp-color-picker' ), SITEORIGIN_PANELS_VERSION );
 
 
 
 
 
459
  do_action( 'siteorigin_panel_enqueue_admin_styles' );
460
  }
461
  }
@@ -1047,7 +1058,7 @@ class SiteOrigin_Panels_Admin {
1047
  $lessons['page-builder-tips'] = array(
1048
  'title' => __( '12 Page Builder Tips', 'siteorigin-panels' ),
1049
  'video' => '212380146',
1050
- 'poster' => plugin_dir_url( __FILE__ ) . '../posters/page-builder-tips.svg',
1051
  'description' => __( "Sign up to our newsletter and we'll send you this free Page Builder video course.", 'siteorigin-panels' ) . ' ' .
1052
  __( "12 tips that'll help you get the most out of Page Builder.", 'siteorigin-panels' ) . ' ' .
1053
  __( "Watch the video to find out more, then sign up below to get started.", 'siteorigin-panels' ),
@@ -1057,7 +1068,7 @@ class SiteOrigin_Panels_Admin {
1057
  $lessons['page-builder-animations'] = array(
1058
  'title' => __( 'Free Page Builder Addons', 'siteorigin-panels' ),
1059
  'video' => '212380210',
1060
- 'poster' => plugin_dir_url( __FILE__ ) . '../posters/addons.svg',
1061
  'description' => __( "The free animations addon allows you to add beautiful animations to Page Builder elements.", 'siteorigin-panels' ) . ' ' .
1062
  __( "Sign up to our newsletter and we'll send you the addon as a free gift.", 'siteorigin-panels' ) . ' ' .
1063
  __( "Plus, we'll send you even more powerful addons, for as long as you're subscribed.", 'siteorigin-panels' ),
234
  if ( $force || self::is_admin() ) {
235
  // Media is required for row styles
236
  wp_enqueue_media();
237
+ wp_enqueue_script(
238
+ 'so-panels-admin',
239
+ siteorigin_panels_url( 'js/siteorigin-panels' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
240
+ array(
241
+ 'jquery',
242
+ 'jquery-ui-resizable',
243
+ 'jquery-ui-sortable',
244
+ 'jquery-ui-draggable',
245
+ 'underscore',
246
+ 'backbone',
247
+ 'plupload',
248
+ 'plupload-all'
249
+ ),
250
+ SITEORIGIN_PANELS_VERSION,
251
+ true
252
+ );
253
  add_action( 'admin_footer', array( $this, 'js_templates' ) );
254
 
255
  $widgets = $this->get_widgets();
410
  'error_message' => __( 'Error uploading or importing file.', 'siteorigin-panels' ),
411
  ),
412
  'wpColorPickerOptions' => apply_filters( 'siteorigin_panels_wpcolorpicker_options', array() ),
413
+ 'prebuiltDefaultScreenshot' => siteorigin_panels_url( 'css/images/prebuilt-default.png' ),
414
  'loadOnAttach' => siteorigin_panels_setting( 'load-on-attach' ),
415
  'siteoriginWidgetRegex' => str_replace( '*+', '*', get_shortcode_regex( array( 'siteorigin_widget' ) ) ),
416
  ) );
461
  */
462
  function enqueue_admin_styles( $prefix = '', $force = false ) {
463
  if ( $force || self::is_admin() ) {
464
+ wp_enqueue_style(
465
+ 'so-panels-admin',
466
+ siteorigin_panels_url( 'css/admin.css' ),
467
+ array( 'wp-color-picker' ),
468
+ SITEORIGIN_PANELS_VERSION
469
+ );
470
  do_action( 'siteorigin_panel_enqueue_admin_styles' );
471
  }
472
  }
1058
  $lessons['page-builder-tips'] = array(
1059
  'title' => __( '12 Page Builder Tips', 'siteorigin-panels' ),
1060
  'video' => '212380146',
1061
+ 'poster' => siteorigin_panels_url( 'posters/page-builder-tips.svg' ),
1062
  'description' => __( "Sign up to our newsletter and we'll send you this free Page Builder video course.", 'siteorigin-panels' ) . ' ' .
1063
  __( "12 tips that'll help you get the most out of Page Builder.", 'siteorigin-panels' ) . ' ' .
1064
  __( "Watch the video to find out more, then sign up below to get started.", 'siteorigin-panels' ),
1068
  $lessons['page-builder-animations'] = array(
1069
  'title' => __( 'Free Page Builder Addons', 'siteorigin-panels' ),
1070
  'video' => '212380210',
1071
+ 'poster' => siteorigin_panels_url( 'posters/addons.svg' ),
1072
  'description' => __( "The free animations addon allows you to add beautiful animations to Page Builder elements.", 'siteorigin-panels' ) . ' ' .
1073
  __( "Sign up to our newsletter and we'll send you the addon as a free gift.", 'siteorigin-panels' ) . ' ' .
1074
  __( "Plus, we'll send you even more powerful addons, for as long as you're subscribed.", 'siteorigin-panels' ),
inc/functions.php CHANGED
@@ -91,4 +91,16 @@ function siteorigin_panels_plugin_activation_install_url( $plugin, $plugin_name,
91
  */
92
  function siteorigin_panels_activate(){
93
  return false;
94
- }
 
 
 
 
 
 
 
 
 
 
 
 
91
  */
92
  function siteorigin_panels_activate(){
93
  return false;
94
+ }
95
+
96
+
97
+ /**
98
+ * Returns the base URL of our widget with `$path` appended.
99
+ *
100
+ * @param string $path Extra path to append to the end of the URL.
101
+ *
102
+ * @return string Base URL of the widget, with $path appended.
103
+ */
104
+ function siteorigin_panels_url( $path = '' ) {
105
+ return plugins_url( 'siteorigin-panels/' . $path );
106
+ }
inc/live-editor.php CHANGED
@@ -76,21 +76,21 @@ class SiteOrigin_Panels_Live_Editor {
76
  function frontend_scripts() {
77
  wp_enqueue_script(
78
  'live-editor-front',
79
- plugin_dir_url( __FILE__ ) . '../js/live-editor/live-editor-front' . SITEORIGIN_PANELS_JS_SUFFIX . '.js',
80
  array( 'jquery' ),
81
  SITEORIGIN_PANELS_VERSION
82
  );
83
 
84
  wp_enqueue_script(
85
  'live-editor-scrollto',
86
- plugin_dir_url( __FILE__ ) . '../js/live-editor/jquery.scrollTo' . SITEORIGIN_PANELS_JS_SUFFIX . '.js',
87
  array( 'jquery' ),
88
  SITEORIGIN_PANELS_VERSION
89
  );
90
 
91
  wp_enqueue_style(
92
  'live-editor-front',
93
- plugin_dir_url( __FILE__ ) . '../css/live-editor-front.css',
94
  array(),
95
  SITEORIGIN_PANELS_VERSION
96
  );
76
  function frontend_scripts() {
77
  wp_enqueue_script(
78
  'live-editor-front',
79
+ siteorigin_panels_url( 'js/live-editor/live-editor-front' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
80
  array( 'jquery' ),
81
  SITEORIGIN_PANELS_VERSION
82
  );
83
 
84
  wp_enqueue_script(
85
  'live-editor-scrollto',
86
+ siteorigin_panels_url( 'js/live-editor/jquery.scrollTo' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
87
  array( 'jquery' ),
88
  SITEORIGIN_PANELS_VERSION
89
  );
90
 
91
  wp_enqueue_style(
92
  'live-editor-front',
93
+ siteorigin_panels_url( 'css/live-editor-front.css' ),
94
  array(),
95
  SITEORIGIN_PANELS_VERSION
96
  );
inc/renderer-legacy.php CHANGED
@@ -144,6 +144,6 @@ class SiteOrigin_Panels_Renderer_Legacy extends SiteOrigin_Panels_Renderer {
144
  }
145
 
146
  public function front_css_url(){
147
- return plugin_dir_url( __FILE__ ) . '../css/front' . ( siteorigin_panels_setting( 'legacy-layout' ) ? '-legacy' : '' ) . '.css';
148
  }
149
  }
144
  }
145
 
146
  public function front_css_url(){
147
+ return siteorigin_panels_url( 'css/front' . ( siteorigin_panels_setting( 'legacy-layout' ) ? '-legacy' : '' ) . '.css' );
148
  }
149
  }
inc/renderer.php CHANGED
@@ -766,6 +766,6 @@ class SiteOrigin_Panels_Renderer {
766
  }
767
 
768
  public function front_css_url(){
769
- return plugin_dir_url( __FILE__ ) . '../css/front-flex.css';
770
  }
771
  }
766
  }
767
 
768
  public function front_css_url(){
769
+ return siteorigin_panels_url( 'css/front-flex.css' );
770
  }
771
  }
inc/revisions.php CHANGED
@@ -8,7 +8,6 @@
8
  class SiteOrigin_Panels_Revisions {
9
 
10
  function __construct() {
11
- add_action( 'save_post', array( $this, 'save_post' ), 11, 2 );
12
  add_action( 'wp_restore_post_revision', array( $this, 'revisions_restore' ), 10, 2 );
13
 
14
  add_filter( '_wp_post_revision_fields', array( $this, 'revisions_fields' ) );
@@ -23,24 +22,6 @@ class SiteOrigin_Panels_Revisions {
23
  return empty( $single ) ? $single = new self() : $single;
24
  }
25
 
26
- /**
27
- * Store the Page Builder meta in the revision.
28
- *
29
- * @param $post_id
30
- * @param $post
31
- */
32
- function save_post( $post_id, $post ) {
33
- $parent_id = wp_is_post_revision( $post_id );
34
-
35
- if ( $parent_id ) {
36
- // If the panels data meta exists, copy it into the revision.
37
- $panels_data = get_post_meta( $parent_id, 'panels_data', true );
38
- if ( ! empty( $panels_data ) ) {
39
- add_metadata( 'post', $post_id, 'panels_data', $panels_data );
40
- }
41
- }
42
- }
43
-
44
  /**
45
  * Restore a revision.
46
  *
8
  class SiteOrigin_Panels_Revisions {
9
 
10
  function __construct() {
 
11
  add_action( 'wp_restore_post_revision', array( $this, 'revisions_restore' ), 10, 2 );
12
 
13
  add_filter( '_wp_post_revision_fields', array( $this, 'revisions_fields' ) );
22
  return empty( $single ) ? $single = new self() : $single;
23
  }
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  /**
26
  * Restore a revision.
27
  *
inc/settings.php CHANGED
@@ -175,8 +175,18 @@ class SiteOrigin_Panels_Settings {
175
  if ( $prefix != 'settings_page_siteorigin_panels' ) {
176
  return;
177
  }
178
- wp_enqueue_style( 'siteorigin-panels-settings', plugin_dir_url( __FILE__ ) . '../settings/admin-settings.css', array(), SITEORIGIN_PANELS_VERSION );
179
- wp_enqueue_script( 'siteorigin-panels-settings', plugin_dir_url( __FILE__ ) . '../settings/admin-settings' . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array(), SITEORIGIN_PANELS_VERSION );
 
 
 
 
 
 
 
 
 
 
180
  }
181
 
182
  /**
175
  if ( $prefix != 'settings_page_siteorigin_panels' ) {
176
  return;
177
  }
178
+ wp_enqueue_style(
179
+ 'siteorigin-panels-settings',
180
+ siteorigin_panels_url( 'settings/admin-settings.css' ),
181
+ array(),
182
+ SITEORIGIN_PANELS_VERSION
183
+ );
184
+ wp_enqueue_script(
185
+ 'siteorigin-panels-settings',
186
+ siteorigin_panels_url( 'settings/admin-settings' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
187
+ array(),
188
+ SITEORIGIN_PANELS_VERSION
189
+ );
190
  }
191
 
192
  /**
inc/styles.php CHANGED
@@ -45,8 +45,18 @@ class SiteOrigin_Panels_Styles {
45
  }
46
 
47
  static function register_scripts() {
48
- wp_register_script( 'siteorigin-panels-front-styles', plugin_dir_url( __FILE__ ) . '../js/styling' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array( 'jquery' ), SITEORIGIN_PANELS_VERSION );
49
- wp_register_script( 'siteorigin-parallax', plugin_dir_url( __FILE__ ) . '../js/siteorigin-parallax' . SITEORIGIN_PANELS_JS_SUFFIX . '.js', array( 'jquery' ), SITEORIGIN_PANELS_VERSION );
 
 
 
 
 
 
 
 
 
 
50
  wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
51
  'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting( 'full-width-container' ) )
52
  ) );
45
  }
46
 
47
  static function register_scripts() {
48
+ wp_register_script(
49
+ 'siteorigin-panels-front-styles',
50
+ siteorigin_panels_url( 'js/styling' . SITEORIGIN_PANELS_VERSION_SUFFIX . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
51
+ array( 'jquery' ),
52
+ SITEORIGIN_PANELS_VERSION
53
+ );
54
+ wp_register_script(
55
+ 'siteorigin-parallax',
56
+ siteorigin_panels_url( 'js/siteorigin-parallax' . SITEORIGIN_PANELS_JS_SUFFIX . '.js' ),
57
+ array( 'jquery' ),
58
+ SITEORIGIN_PANELS_VERSION
59
+ );
60
  wp_localize_script( 'siteorigin-panels-front-styles', 'panelsStyles', array(
61
  'fullContainer' => apply_filters( 'siteorigin_panels_full_width_container', siteorigin_panels_setting( 'full-width-container' ) )
62
  ) );
js/siteorigin-panels-2510.min.js DELETED
@@ -1,4 +0,0 @@
1
- !function e(t,i,s){function l(n,a){if(!i[n]){if(!t[n]){var r="function"==typeof require&&require;if(!a&&r)return r(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){var i=t[n][1][e];return l(i||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","click .so-restore":"restoreSelectedEntry"},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this)},render:function(){var e=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("iframe.siteorigin-panels-history-iframe").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").click(function(){var i=jQuery(this);t.find(".history-entry").not(i).removeClass("so-selected"),i.addClass("so-selected");var s=i.data("historyEntry");e.selectedEntry=s,e.selectedEntry.cid!==e.currentEntry.cid?e.$(".so-buttons .so-restore").removeClass("disabled"):e.$(".so-buttons .so-restore").addClass("disabled"),e.previewEntry(s)}),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").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&&(t=Math.floor(i/3600),1===t?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),i>60&&(t=Math.floor(i/60),1===t?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"},initializeDialog:function(){var e=this;this.on("open_dialog",function(){e.$(".so-sidebar-tabs li a").first().click(),e.$(".so-status").removeClass("so-panels-loading")}),this.on("button_click",this.toolbarButtonClick,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-prebuilt").html(),{})),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");var s=this;this.$(".so-content").empty(),s.currentTab=i,"import"==i?this.displayImportExport():this.displayLayoutDirectory("",1,i),s.$(".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").hide();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.show().find(".progress-precent").css("width","0%")},FilesAdded:function(e){i.find(".file-browse-button").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)}}}).init(),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").submit(function(e){l(this).find('input[name="panels_export_data"]').val(JSON.stringify(t.builder.model.getPanelsData()))})},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").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},function(n){if(s.currentTab===i){o.removeClass("so-panels-loading").html(s.directoryTemplate(n));var a=o.find(".so-previous"),r=o.find(".so-next");t<=1?a.addClass("button-disabled"):a.click(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t-1,s.currentTab)}),t===n.max_num_pages||0===n.max_num_pages?r.addClass("button-disabled"):r.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")).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"}),t=new l.Deferred;return l.get(panelsOptions.ajaxurl,e,function(e){void 0!==e.error?(alert(e.error),t.reject(e)):(this.setStatusMessage("",!1),t.resolve(e))}.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","click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler","change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},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),this.row={cells:new s.collection.cells([{weight:.5},{weight:.5}]),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",function(){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");this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),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}),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove();var i=this.$(".so-sidebar.so-right-sidebar");return this.styles.attach(i),this.styles.on("styles_loaded",function(e){e?i.removeClass("so-panels-loading"):(i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),i.remove())},this),i.addClass("so-panels-loading"),_.isUndefined(this.model)||this.$("input.so-row-field").val(this.model.get("cells").length),this.$("input.so-row-field").keyup(function(){l(this).trigger("change")}),this},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)?this:(this.row={cells:this.model.get("cells").clone(),style:{}},this.$("input.so-row-field").val(this.model.get("cells").length),this.clearCellStylesCache(),this)},regenerateRowPreview:function(){var e=this,t=this.$(".row-preview"),i=this.getSelectedCellIndex();t.empty();var s;this.row.cells.each(function(o,n){var a=l(this.cellPreviewTemplate({weight:o.get("weight")}));t.append(a),n==i&&a.find(".preview-cell-in").addClass("cell-selected");var r,d=a.prev();d.length&&(r=l('<div class="resize-handle"></div>'),r.appendTo(a).dblclick(function(){var t=e.row.cells.at(n-1),i=o.get("weight")+t.get("weight");o.set("weight",i/2),t.set("weight",i/2),e.scaleRowWidths()}),r.draggable({axis:"x",containment:t,start:function(e,t){var i=a.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.outerWidth(),left:6,height:a.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}),a.find("> .preview-cell-in").css("visibility","hidden"),d.find("> .preview-cell-in").css("visibility","hidden")},drag:function(i,s){var o=e.row.cells.at(n).get("weight"),a=e.row.cells.at(n-1).get("weight"),r=o-(s.position.left+6)/t.width(),d=a+(s.position.left+6)/t.width();s.helper.offset().left,t.offset().left;l(this).data("newCellClone").css("width",t.width()*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",t.width()*d).find(".preview-cell-weight").html(Math.round(1e3*d)/10)},stop:function(i,s){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove(),a.find(".preview-cell-in").css("visibility","visible"),d.find(".preview-cell-in").css("visibility","visible");var o=s.position.left+6,r=o/t.width(),c=e.row.cells.at(n),h=e.row.cells.at(n-1);c.get("weight")-r>.02&&h.get("weight")+r>.02&&(c.set("weight",c.get("weight")-r),h.set("weight",h.get("weight")+r)),e.scaleRowWidths(),s.helper.css("left",-6)}})),a.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)),a.find(".preview-cell-weight").click(function(i){e.$(".resize-handle").css("pointer-event","none").draggable("disable"),t.find(".preview-cell-weight").each(function(){var i=jQuery(this).hide();l('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(i.html())).insertAfter(i).focus(function(){clearTimeout(s)}).keyup(function(e){9!==e.keyCode&&l(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),l(this).blur())}).keydown(function(e){if(9===e.keyCode){e.preventDefault();var i=t.find(".preview-cell-weight-input"),s=i.index(l(this));s===i.length-1?i.eq(0).focus().select():i.eq(s+1).focus().select()}}).blur(function(){t.find(".preview-cell-weight-input").each(function(t,i){isNaN(parseFloat(l(i).val()))&&l(i).val(Math.floor(1e3*e.row.cells.at(t).get("weight"))/10)}),s=setTimeout(function(){if(0===t.find(".preview-cell-weight-input").length)return!1;var i=[],s=[],o=0,n=0;if(t.find(".preview-cell-weight-input").each(function(t,a){var r=parseFloat(l(a).val());r=isNaN(r)?1/e.row.cells.length:Math.round(10*r)/1e3;var d=!l(a).hasClass("no-user-interacted");i.push(r),s.push(d),d?o+=r:n+=r}),o>0&&n>0&&1-o>0)for(var a=0;a<i.length;a++)s[a]||(i[a]=i[a]/n*(1-o));var r=_.reduce(i,function(e,t){return e+t});i=i.map(function(e){return e/r}),Math.min.apply(Math,i)>.01&&e.row.cells.each(function(e,t){e.set("weight",i[t])}),t.find(".preview-cell").each(function(t,i){var s=e.row.cells.at(t).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)}),t.find(".preview-cell").css("overflow","visible"),setTimeout(function(){e.regenerateRowPreview()},260)},100)}).click(function(){l(this).select()})}),l(this).siblings(".preview-cell-weight-input").select()})},this),this.openSelectedCellStyles(),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.stylesLoaded||(this.cellStyles.on("styles_loaded",function(){t.removeClass("so-panels-loading")},this),t.addClass("so-panels-loading"))}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(e>-1){var t=this.cellStylesCache[e];t||(t=new s.view.styles,t.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()}),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 input[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 a=_.reduce(t,function(e,t){return e+t});if(t=_.map(t,function(e){return e/a}),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)),i)this.regenerateRowPreview();else{var r=this;this.$(".preview-cell").each(function(e,t){var i=r.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(function(){r.regenerateRowPreview()},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),!_.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){var 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.model.trigger("visual_destroy"),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","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler"},initializeDialog:function(){var e=this;this.model.on("change:values",this.handleChangeValues,this),this.model.on("destroy",this.remove,this),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",function(){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))},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.removeClass("so-panels-loading"):(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())},this),t.addClass("so-panels-loading")},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t=e.index(this.widgetView.$el);if(0===t)return!1;do{if(widgetView=e.eq(--t).data("view"),!_.isUndefined(widgetView)&&!widgetView.model.get("read_only"))return widgetView.getEditDialog()}while(!_.isUndefined(widgetView)&&t>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")};l.post(panelsOptions.ajaxurl,e,function(e){var t=e.replace(/{\$id}/g,this.model.cid),i=this.$(".so-content");i.removeClass("so-panels-loading").html(t),this.trigger("form_loaded",this),this.$(".panel-dialog").trigger("panelsopen"),this.on("close_dialog",this.updateModel,this),i.find("> .widget-content").length>0&&o.addWidget(i,this.model.widget_id)}.bind(this),"html")}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();_.isUndefined(t.widgets)?t={}:(t=t.widgets,t=t[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.model.trigger("visual_destroy"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.model.trigger("user_duplicate"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{"../view/widgets/js-widget":30}],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"},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("").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" />').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){l(this.dialogTabTemplate({title:t.title})).data({message:t.message,filter:t.filter}).appendTo(e)},this),this.initTabs();var t=this;l(window).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.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)),t&&(_.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.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()},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){t.exports={
2
- 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),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),t.thingType&&t.thingType===e)?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],12:[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])}}}},{}],13:[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],t 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],t 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,s.builder=i,s.set("style",e.style),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":s=new panels.model.cell,s.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":s=new panels.model.widget,s.cell=i;for(var l in e)e.hasOwnProperty(l)&&s.set(l,e[l]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],14:[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 e=e.replace(/{{%/g,"<%"),e=e.replace(/%}}/g,"%>"),e=e.trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],15:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=function(e){return this.each(function(){var t=jQuery(this),i=t.closest("form").find(".widget-id").val(),o=l.extend(!0,{},e);if(_.isUndefined(i)||!(i.indexOf("__i__")>-1)){var n=new s.model.builder,a=new s.view.builder({model:n,config:o}),r=t.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(r)||(r.on("close_dialog",function(){n.refreshPanelsData()}),r.on("open_dialog_complete",function(){a.trigger("builder_resize")}),r.model.on("destroy",function(){n.emptyRows().destroy()}),a.setDialogParents(panelsOptions.loc.layout_widget,r));var d=Boolean(t.closest(".widget-content").length);a.render().attach({container:t,dialog:d||"dialog"===t.data("mode"),type:t.data("type")}).setDataField(t.find("input.panels-data")),d||"dialog"===t.data("mode")?(a.setDialogParents(panelsOptions.loc.layout_widget,a.dialog),t.find(".siteorigin-panels-display-builder").click(function(e){e.preventDefault(),a.dialog.openDialog()})):t.find(".siteorigin-panels-display-builder").parent().remove(),l(document).trigger("panels_setup",a)}})}},{}],16:[function(e,t,i){var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),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;if(e("#siteorigin-panels-metabox").length&&e("form#post").length)t=e("#siteorigin-panels-metabox"),i=e("#siteorigin-panels-metabox .siteorigin-panels-data-field"),s=e("form#post"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:e("#siteorigin-panels-metabox").data("builder-type"),builderSupports:e("#siteorigin-panels-metabox").data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==e("#siteorigin-panels-metabox").data("live-editor"),liveEditorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var o=e(".siteorigin-panels-builder-form");t=o.find(".siteorigin-panels-builder-container"),i=o.find('input[name="panels_data"]'),s=o,l={editorType:"standalone",postId:o.data("post-id"),editorId:"#post_content",builderType:o.data("type"),builderSupports:o.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:o.data("preview-url")}}if(!_.isUndefined(t)){var n=window.siteoriginPanels,a=new n.model.builder,r=new n.view.builder({model:a,config:l});r.render().attach({container:t}).setDataField(i).attachToEditor(),s.submit(function(){a.refreshPanelsData()}),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",r,window.panels)}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()})})},{"./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/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[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=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var s,l=0;l<e.grid_cells.length;l++)s=parseInt(e.grid_cells[l].grid),_.isUndefined(i[s])&&(i[s]=[]),i[s].push(e.grid_cells[l]);var o=this;if(_.each(i,function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.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)),s=i.get("cells").at(parseInt(t.cell)),l=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||l.set("style",t.style),_.isUndefined(t.read_only)||l.set("read_only",t.read_only),_.isUndefined(t.widget_id)?l.set("widget_id",panels.helpers.utils.generateUUID()):l.set("widget_id",t.widget_id),_.isUndefined(t.label)||l.set("label",t.label),l.cell=s,s.get("widgets").add(l,{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=e.grids.length,s=_.isUndefined(e.widgets)?0:e.widgets.length,l={grids:[],grid_cells:[],widgets:[]};l.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(l.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(l.widgets=e.widgets.slice());var o;for(o=0;o<t.grid_cells.length;o++){var n=t.grid_cells[o];n.grid=parseInt(n.grid)+i,l.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(o=0;o<t.widgets.length;o++){var a=t.widgets[o];a.panels_info.grid=parseInt(a.panels_info.grid)+i,a.panels_info.id=parseInt(a.panels_info.id)+s,l.widgets.push(a)}return l},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 a=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(a)}),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"),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=this,s=jQuery('<div id="wrapper">'+e+"</div>");if(s.find(".panel-layout .panel-grid").length){var l={grids:[],grid_cells:[],widgets:[]},o=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),n=function(){function e(e){return e&&"string"==typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),t.innerHTML=e,e=t.textContent,t.textContent=""),e}var t=document.createElement("div");return e}(),a=function(e){var t=e.find("div");if(!t.length)return e.html();var i;for(i=0;i<t.length-1&&jQuery.trim(t.eq(i).text())==jQuery.trim(t.eq(i+1).text());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()}},r=s.find(".panel-layout").eq(0),d=function(e,t){return jQuery(t).closest(".panel-layout").is(r)};return s.find("> .panel-layout > .panel-grid").filter(d).each(function(e,s){var r=jQuery(s),c=r.find(".panel-grid-cell").filter(d);l.grids.push({cells:c.length,style:r.data("style"),color_label:r.data("color-label"),label:r.data("label")}),c.each(function(s,r){var c=jQuery(r),h=c.find(".so-panel").filter(d);l.grid_cells.push({grid:e,weight:_.isUndefined(c.data("weight"))?1:parseFloat(c.data("weight")),style:c.data("style")}),h.each(function(r,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:s,raw:!1,label:c.data("label")};h=h.trim();var p=o.exec(h);if(!_.isNull(p)&&""===h.replace(o,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(n(f.val())),m=w.instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,m.panels_info=u,l.widgets.push(m)}catch(e){u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}if(-1!==h.indexOf("panel-layout")){if(jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length)return u.class="SiteOrigin_Panels_Widgets_Layout",l.widgets.push({panels_data:i.getPanelsDataFromHtml(h,t),panels_info:u}),!0}return u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0})})}),s.find(".panel-layout").remove(),s.find("style[data-panels-style-for-post]").remove(),s.html().replace(/^\s+|\s+$/gm,"").length&&(l.grids.push({cells:1,style:{}}),l.grid_cells.push({grid:l.grids.length-1,weight:1}),l.widgets.push({filter:"1",text:s.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:l.grids.length-1,cell:0}})),l}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}}]}}})},{}],18:[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}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],20:[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),a=s.get("widgets").models.slice(),r=0;r<a.length;r++)a[r].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}})},{}],21:[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},triggerEdit:function(){this.trigger("user_edit",this)},triggerDuplicate:function(){this.trigger("user_duplicate",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},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)t.hasOwnProperty(s)&&i.push(s);i=_.uniq(i);for(var l in i)if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]];o=o.replace(/<\/?[^>]+(>|$)/g,"");var n=o.split(" ");return n=n.slice(0,20),n.join(" ")}return this.getWidgetField("description")}})},{}],22:[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").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)").click(function(){var e=l(this);s(e.data("key")),o.closeMenu()}),n.find(".so-item.so-confirm").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 a=o.index(n);38===e.which?n=a-1<0?o.last():o.eq(a-1):40===e.which&&(n=a+1>=o.length?o.first():o.eq(a+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 r=0;r<s.defaultDisplay.length;r++)i.find('.so-item[data-key="'+s.defaultDisplay[r]+'"]').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]}})},{}],23:[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:"",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"},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},_.each(this.dialogs,function(e,i,s){s[i].setBuilder(t)}),this.dialogs.row.setRowDialogType("create"),this.model.get("rows").on("add",this.onAddRow,this),l(window).resize(function(e){e.target===window&&t.trigger("builder_resize")}),this.model.on("change:data load_panels_data",this.storeModelData,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.model.on("change:data load_panels_data",this.toggleWelcomeDisplay,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.menu.on("activate_context",this.activateContextMenu,this),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),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");return this.supports("addWidget")||t.find(".so-widget-add").hide(),this.supports("addRow")||t.find(".so-row-add").hide(),this.supports("prebuilt")||t.find(".so-prebuilt-add").hide(),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").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('<a id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find(".hndle span").html()+"</a>").click(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()})),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").click(function(i){i.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).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.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());var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s={top:0,bottom:t.$el.outerHeight()-e.outerHeight()+20};i>s.top&&i<s.bottom?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left,width:t.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",s,this),l(document).scroll(s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if(e=_.extend({confirm:!0},e),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(),this.metabox.show().find("> .inside").show(),l(window).resize(),l(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this;return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",axis:"y",tolerance:"pointer",scroll:!1,stop:function(t,i){e.addHistoryEntry("row_moved");var s=l(i.item),o=s.data("view");e.model.get("rows").remove(o.model,{silent:!0}),e.model.get("rows").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){i={}}this.model.loadPanelsData(i),this.currentData=i,this.toggleWelcomeDisplay()}return this},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.resize()},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells([{weight:.5},{weight:.5}]);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&&this.attachedToEditor&&this.$el.is(":visible")){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{action:"so_panels_builder_content",
3
- panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){""!==e&&this.updateEditorContent(e)}.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.triggerYoastSeoChange()},triggerYoastSeoChange:function(){if(l("#yoast_wpseo_focuskw_text_input").length){var e,t=document.getElementById("yoast_wpseo_focuskw_text_input");document.createEvent?(e=document.createEvent("HTMLEvents"),e.initEvent("keyup",!0,!0)):(e=document.createEventObject(),e.eventType="keyup"),e.eventName="keyup",document.createEvent?t.dispatchEvent(e):t.fireEvent("on"+e.eventType,e)}},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).unbind("scroll",e.handler),l(window).bind("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<480?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){var i=this,s=l(".siteorigin-panels-builder:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),o=l(".so-panels-dialog-wrapper:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),n=i.$el.closest(".so-panels-dialog-wrapper");if(i.$el.is(s)&&(0===o.length||o.is(n))){var a=l([]).add(i.$(".so-panels-welcome-message:visible")).add(i.$(".so-rows-container > .so-row-container")).add(i.$(".so-cells > .cell")).add(i.$(".cell-wrapper > .so-widget")).filter(function(i){return t.isOverEl(l(this),e)}),r=a.last().data("view");void 0!==r&&void 0!==r.buildContextualMenu?r.buildContextualMenu(e,t):a.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))}})},{}],24:[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.model.get("widgets").on("add",this.onAddWidget,this)},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.$el.attr("id");return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+t+" .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},stop:function(t,i){e.row.builder.addHistoryEntry("widget_moved");var s=l(i.item),o=s.data("view"),n=s.closest(".cell").data("view");o.model.moveToCell(n.model,{},s.index()),o.cell=n,o.cell.row.builder.model.refreshPanelsData()},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"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(),right:5,height:e.$el.outerHeight()});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*a).find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",n*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;a>.02&&r>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",a),e.model.set("weight",r),s.row.resize()),o.helper.css("left",-t.outerWidth()/2),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.resize()},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.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()});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)}})},{}],25:[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","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},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()},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=this,i=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');i.click(function(e){e.preventDefault(),t.closeDialog(),t.parentDialog.openDialog()}),this.$(".so-title-bar").prepend(i)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),this},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.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().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=l(e.currentTarget),i=t.siblings(".so-dropdown-links-wrapper");i.is(".hidden")?i.removeClass("hidden"):i.addClass("hidden")}.bind(this)),l("html").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.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).focus(),window.getSelection().removeAllRanges()}return!i}).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)),e.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"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){e=_.extend({silent:!1},e),e.silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),l(window).on("keyup",this.keyboardListen),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),e.silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),l(window).off("keyup",this.keyboardListen),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},keyboardListen:function(e){27===e.which&&l(".so-panels-dialog-wrapper .so-close").trigger("click")},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("]["),t.unshift(i[1])),t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var o=s,n=null,a=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===a)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===a){if(!e.is(":checked"))return;n=e.val()}else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var r=null;"undefined"!=typeof tinyMCE&&(r=tinyMCE.get(e.attr("id"))),n=null!==r&&_.isFunction(r.getContent)&&!r.isHidden()?r.getContent():e.val()}else if("SELECT"===e.prop("tagName")){var d=e.find("option:selected");1===d.length?n=e.find("option:selected").val():d.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 c=0;c<t.length;c++)c===t.length-1?""===t[c]?o.push(n):o[t[c]]=n:(_.isUndefined(o[t[c]])&&(""===t[c+1]?o[t[c]]=[]:o[t[c]]={}),o=o[t[c]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}}),s},setStatusMessage:function(e,t){this.$(".so-toolbar .so-status").html(e),!_.isUndefined(t)&&t&&this.$(".so-toolbar .so-status").addClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}}})},{}],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-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},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.builder.model.on("refresh_panels_data",this.handleRefreshData,this),this.builder.model.on("load_panels_data",this.handleLoadData,this)},render:function(){this.setElement(this.template()),this.$el.hide();var e=this,t=!1;return l(document).mousedown(function(){t=!0}).mouseup(function(){t=!1}),this.$el.on("mouseenter",".so-widget-wrapper",function(){var i=l(this),s=i.data("live-editor-preview-widget");t||void 0===s||!s.length||e.$(".so-preview-overlay").is(":visible")||(e.highlightElement(s),e.scrollToElement(s))}),e.$el.on("mouseleave",".so-widget-wrapper",function(){e.resetHighlights()}),e.builder.on("open_dialog",function(){e.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()),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")},collapse:function(){this.$el.toggleClass("so-collapsed");var e=this.$(".live-editor-collapse span");e.html(e.data(this.$el.hasClass("so-collapsed")?"expand":"collapse"))},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,t){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="javascript:false;" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post" />').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.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))),setTimeout(function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide()},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-wrapper").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).mouseenter(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)}).mouseleave(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()}).click(function(e){e.preventDefault(),o.find(".title h4").click()})}),i.find("a").css({"pointer-events":"none"}).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(e.currentTarget);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")}})},{}],27:[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");e.on("add",this.handleCellAdd,this),e.on("remove",this.handleCellRemove,this),this.model.on("reweight_cells",this.resize,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this);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.model.on("change:label",this.onLabelChange,this)},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("editWidget")||(this.$(".so-row-toolbar .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addWidget")||(this.$(".so-row-toolbar .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteWidget")||(this.$(".so-row-toolbar .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")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.builder.on("widget_sortable_move",this.resize,this),this.builder.on("builder_resize",this.resize,this),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each(function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")}),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},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=l.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(){return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model)),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))}})},{}],28:[function(e,t,i){var s=(window.panels,jQuery);t.exports=Backbone.View.extend({stylesLoaded:!1,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");var l={builderType:i.builderType};return"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},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)),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").click(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").click(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}}),e.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("input").val(i.id)})),e.open()}),t.find(".remove-image").click(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find("input").val("")})}),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.focus(function(){s(this).select()});!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),a=[];for(var r in n){var d=o.exec(n[r]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(a.push(d[1]),i.val(d[2]))}1===t.length?t.val(a.join(" ")):(1===a.length?a=[a[0],a[0],a[0],a[0]]:2===a.length?a=[a[0],a[1],a[0],a[1]]:3===a.length&&(a=[a[0],a[1],a[2],a[1]]),t.each(function(e,t){s(t).val(a[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),a=[],r=[],d=[];t.each(function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;a.push(i),null===i?r.push(e):d.push(e)}),3===r.length&&d[0]===t.index(n)&&(t.val(n.val()),a=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(a)===JSON.stringify([null,null,null,null])?l.val(""):l.val(a.map(function(e){return(null===e?0:e)+i.val()}).join(" "))}};t.change(o),i.change(o)})}})},{}],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-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","click .title h4":"titleClickHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.model.on("user_edit",this.editHandler,this),this.model.on("user_duplicate",this.duplicateHandler,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this),this.model.on("change:values",this.onModelChange,this),this.model.on("change:label",this.onLabelChange,this)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle()})),this.$el.data("view",this),
4
- 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"),l.trim(this.$(".actions").html()).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},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(){this.getEditDialog().openDialog()},titleClickHandler:function(e){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.editHandler(),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.model.trigger("visual_destroy"),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(){this.cell.row.builder.addHistoryEntry("widget_deleted");var e=this;return this.$el.fadeOut("fast",function(){e.cell.row.resize(),e.model.destroy(),e.cell.row.builder.model.refreshPanelsData(),e.remove()}),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.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()}.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)}})},{}],30:[function(e,t,i){var s=e("./media-widget"),l=e("./text-widget"),o={MEDIA_AUDIO:"media_audio",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,o=e.find("> .id_base").val();switch(o){case this.MEDIA_AUDIO:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=s;break;case this.TEXT:i=l}i.addWidget(o,e,t)}};t.exports=o},{"./media-widget":31,"./text-widget":32}],31:[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,a=t.find("> .widget-content"),r=s('<div class="media-widget-control"></div>');a.before(r);var d={};a.find(".media-widget-instance-property").each(function(){var e=s(this);d[e.data("property")]=e.val()}),d.widget_id=i;var c=new n(d),h=new o({el:r,syncContainer:a,model:c});return h.render(),h}}};t.exports=l},{}],32:[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 a=s("<div></div>"),r=t.find(".widget-content:first");r.before(a),o={el:a,syncContainer:r}}else o={el:t};var d=new l.TextWidgetControl(o);return d.initializeEditor(),d}};t.exports=l},{}]},{},[16]);
 
 
 
 
js/{siteorigin-panels-2510.js → siteorigin-panels-2511.js} RENAMED
@@ -2976,6 +2976,7 @@ module.exports = Backbone.Model.extend({
2976
  panels_info = {
2977
  grid: ri,
2978
  cell: ci,
 
2979
  raw: false,
2980
  label: $widget.data( 'label' )
2981
  };
2976
  panels_info = {
2977
  grid: ri,
2978
  cell: ci,
2979
+ style: $widget.data( 'style' ),
2980
  raw: false,
2981
  label: $widget.data( 'label' )
2982
  };
js/siteorigin-panels-2511.min.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ !function e(t,i,s){function l(n,a){if(!i[n]){if(!t[n]){var r="function"==typeof require&&require;if(!a&&r)return r(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){var i=t[n][1][e];return l(i||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","click .so-restore":"restoreSelectedEntry"},initializeDialog:function(){this.entries=new s.collection.historyEntries,this.on("open_dialog",this.setCurrentEntry,this),this.on("open_dialog",this.renderHistoryEntries,this)},render:function(){var e=this;this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-history").html(),{})),this.$("iframe.siteorigin-panels-history-iframe").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").click(function(){var i=jQuery(this);t.find(".history-entry").not(i).removeClass("so-selected"),i.addClass("so-selected");var s=i.data("historyEntry");e.selectedEntry=s,e.selectedEntry.cid!==e.currentEntry.cid?e.$(".so-buttons .so-restore").removeClass("disabled"):e.$(".so-buttons .so-restore").addClass("disabled"),e.previewEntry(s)}),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").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&&(t=Math.floor(i/3600),1===t?s.push(panelsOptions.loc.time.hour.replace("%d",t)):s.push(panelsOptions.loc.time.hours.replace("%d",t)),i-=3600*t),i>60&&(t=Math.floor(i/60),1===t?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"},initializeDialog:function(){var e=this;this.on("open_dialog",function(){e.$(".so-sidebar-tabs li a").first().click(),e.$(".so-status").removeClass("so-panels-loading")}),this.on("button_click",this.toolbarButtonClick,this)},render:function(){this.renderDialog(this.parseDialogContent(l("#siteorigin-panels-dialog-prebuilt").html(),{})),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");var s=this;this.$(".so-content").empty(),s.currentTab=i,"import"==i?this.displayImportExport():this.displayLayoutDirectory("",1,i),s.$(".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").hide();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.show().find(".progress-precent").css("width","0%")},FilesAdded:function(e){i.find(".file-browse-button").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)}}}).init(),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").submit(function(e){l(this).find('input[name="panels_export_data"]').val(JSON.stringify(t.builder.model.getPanelsData()))})},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").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},function(n){if(s.currentTab===i){o.removeClass("so-panels-loading").html(s.directoryTemplate(n));var a=o.find(".so-previous"),r=o.find(".so-next");t<=1?a.addClass("button-disabled"):a.click(function(i){i.preventDefault(),s.displayLayoutDirectory(e,t-1,s.currentTab)}),t===n.max_num_pages||0===n.max_num_pages?r.addClass("button-disabled"):r.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")).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"}),t=new l.Deferred;return l.get(panelsOptions.ajaxurl,e,function(e){void 0!==e.error?(alert(e.error),t.reject(e)):(this.setStatusMessage("",!1),t.resolve(e))}.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","click .so-toolbar .so-save":"saveHandler","click .so-toolbar .so-insert":"insertHandler","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler","change .row-set-form > *":"setCellsFromForm","click .row-set-form button.set-row":"setCellsFromForm"},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),this.row={cells:new s.collection.cells([{weight:.5},{weight:.5}]),style:{}},this.dialogFormsLoaded=0;var e=this;this.on("form_loaded styles_loaded",function(){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");this.model.has("label")&&!_.isEmpty(this.model.get("label"))&&t.text(this.model.get("label")),this.$(".so-edit-title").val(t.text()),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}),this.builder.supports("addRow")||this.$(".so-buttons .so-duplicate").remove(),this.builder.supports("deleteRow")||this.$(".so-buttons .so-delete").remove();var i=this.$(".so-sidebar.so-right-sidebar");return this.styles.attach(i),this.styles.on("styles_loaded",function(e){e?i.removeClass("so-panels-loading"):(i.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),i.remove())},this),i.addClass("so-panels-loading"),_.isUndefined(this.model)||this.$("input.so-row-field").val(this.model.get("cells").length),this.$("input.so-row-field").keyup(function(){l(this).trigger("change")}),this},setRowModel:function(e){return this.model=e,_.isEmpty(this.model)?this:(this.row={cells:this.model.get("cells").clone(),style:{}},this.$("input.so-row-field").val(this.model.get("cells").length),this.clearCellStylesCache(),this)},regenerateRowPreview:function(){var e=this,t=this.$(".row-preview"),i=this.getSelectedCellIndex();t.empty();var s;this.row.cells.each(function(o,n){var a=l(this.cellPreviewTemplate({weight:o.get("weight")}));t.append(a),n==i&&a.find(".preview-cell-in").addClass("cell-selected");var r,d=a.prev();d.length&&(r=l('<div class="resize-handle"></div>'),r.appendTo(a).dblclick(function(){var t=e.row.cells.at(n-1),i=o.get("weight")+t.get("weight");o.set("weight",i/2),t.set("weight",i/2),e.scaleRowWidths()}),r.draggable({axis:"x",containment:t,start:function(e,t){var i=a.clone().appendTo(t.helper).css({position:"absolute",top:"0",width:a.outerWidth(),left:6,height:a.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}),a.find("> .preview-cell-in").css("visibility","hidden"),d.find("> .preview-cell-in").css("visibility","hidden")},drag:function(i,s){var o=e.row.cells.at(n).get("weight"),a=e.row.cells.at(n-1).get("weight"),r=o-(s.position.left+6)/t.width(),d=a+(s.position.left+6)/t.width();s.helper.offset().left,t.offset().left;l(this).data("newCellClone").css("width",t.width()*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10),l(this).data("prevCellClone").css("width",t.width()*d).find(".preview-cell-weight").html(Math.round(1e3*d)/10)},stop:function(i,s){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove(),a.find(".preview-cell-in").css("visibility","visible"),d.find(".preview-cell-in").css("visibility","visible");var o=s.position.left+6,r=o/t.width(),c=e.row.cells.at(n),h=e.row.cells.at(n-1);c.get("weight")-r>.02&&h.get("weight")+r>.02&&(c.set("weight",c.get("weight")-r),h.set("weight",h.get("weight")+r)),e.scaleRowWidths(),s.helper.css("left",-6)}})),a.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)),a.find(".preview-cell-weight").click(function(i){e.$(".resize-handle").css("pointer-event","none").draggable("disable"),t.find(".preview-cell-weight").each(function(){var i=jQuery(this).hide();l('<input type="text" class="preview-cell-weight-input no-user-interacted" />').val(parseFloat(i.html())).insertAfter(i).focus(function(){clearTimeout(s)}).keyup(function(e){9!==e.keyCode&&l(this).removeClass("no-user-interacted"),13===e.keyCode&&(e.preventDefault(),l(this).blur())}).keydown(function(e){if(9===e.keyCode){e.preventDefault();var i=t.find(".preview-cell-weight-input"),s=i.index(l(this));s===i.length-1?i.eq(0).focus().select():i.eq(s+1).focus().select()}}).blur(function(){t.find(".preview-cell-weight-input").each(function(t,i){isNaN(parseFloat(l(i).val()))&&l(i).val(Math.floor(1e3*e.row.cells.at(t).get("weight"))/10)}),s=setTimeout(function(){if(0===t.find(".preview-cell-weight-input").length)return!1;var i=[],s=[],o=0,n=0;if(t.find(".preview-cell-weight-input").each(function(t,a){var r=parseFloat(l(a).val());r=isNaN(r)?1/e.row.cells.length:Math.round(10*r)/1e3;var d=!l(a).hasClass("no-user-interacted");i.push(r),s.push(d),d?o+=r:n+=r}),o>0&&n>0&&1-o>0)for(var a=0;a<i.length;a++)s[a]||(i[a]=i[a]/n*(1-o));var r=_.reduce(i,function(e,t){return e+t});i=i.map(function(e){return e/r}),Math.min.apply(Math,i)>.01&&e.row.cells.each(function(e,t){e.set("weight",i[t])}),t.find(".preview-cell").each(function(t,i){var s=e.row.cells.at(t).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)}),t.find(".preview-cell").css("overflow","visible"),setTimeout(function(){e.regenerateRowPreview()},260)},100)}).click(function(){l(this).select()})}),l(this).siblings(".preview-cell-weight-input").select()})},this),this.openSelectedCellStyles(),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.stylesLoaded||(this.cellStyles.on("styles_loaded",function(){t.removeClass("so-panels-loading")},this),t.addClass("so-panels-loading"))}},getSelectedCellStyles:function(){var e=this.getSelectedCellIndex();if(e>-1){var t=this.cellStylesCache[e];t||(t=new s.view.styles,t.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()}),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 input[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 a=_.reduce(t,function(e,t){return e+t});if(t=_.map(t,function(e){return e/a}),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)),i)this.regenerateRowPreview();else{var r=this;this.$(".preview-cell").each(function(e,t){var i=r.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(function(){r.regenerateRowPreview()},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),!_.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){var 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.model.trigger("visual_destroy"),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","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext","click .so-toolbar .so-delete":"deleteHandler","click .so-toolbar .so-duplicate":"duplicateHandler"},initializeDialog:function(){var e=this;this.model.on("change:values",this.handleChangeValues,this),this.model.on("destroy",this.remove,this),this.dialogFormsLoaded=0,this.on("form_loaded styles_loaded",function(){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))},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.removeClass("so-panels-loading"):(t.closest(".so-panels-dialog").removeClass("so-panels-dialog-has-right-sidebar"),t.remove())},this),t.addClass("so-panels-loading")},getPrevDialog:function(){var e=this.builder.$(".so-cells .cell .so-widget");if(e.length<=1)return!1;var t=e.index(this.widgetView.$el);if(0===t)return!1;do{if(widgetView=e.eq(--t).data("view"),!_.isUndefined(widgetView)&&!widgetView.model.get("read_only"))return widgetView.getEditDialog()}while(!_.isUndefined(widgetView)&&t>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")};l.post(panelsOptions.ajaxurl,e,function(e){var t=e.replace(/{\$id}/g,this.model.cid),i=this.$(".so-content");i.removeClass("so-panels-loading").html(t),this.trigger("form_loaded",this),this.$(".panel-dialog").trigger("panelsopen"),this.on("close_dialog",this.updateModel,this),i.find("> .widget-content").length>0&&o.addWidget(i,this.model.widget_id)}.bind(this),"html")}},updateModel:function(e){if(e=_.extend({refresh:!0,refreshArgs:null},e),this.savingWidget=!0,!this.model.get("missing")){var t=this.getFormValues();_.isUndefined(t.widgets)?t={}:(t=t.widgets,t=t[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.model.trigger("visual_destroy"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1},duplicateHandler:function(){return this.model.trigger("user_duplicate"),this.closeDialog({silent:!0}),this.builder.model.refreshPanelsData(),!1}})},{"../view/widgets/js-widget":30}],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"},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("").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" />').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){l(this.dialogTabTemplate({title:t.title})).data({message:t.message,filter:t.filter}).appendTo(e)},this),this.initTabs();var t=this;l(window).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.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)),t&&(_.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.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()},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){t.exports={
2
+ 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),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),t.thingType&&t.thingType===e)?panels.helpers.serialize.unserialize(t,t.thingType,null):null}}},{}],12:[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])}}}},{}],13:[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],t 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],t 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,s.builder=i,s.set("style",e.style),s.setCells(this.unserialize(e.cells,"cell-collection",s));break;case"cell-model":s=new panels.model.cell,s.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":s=new panels.model.widget,s.cell=i;for(var l in e)e.hasOwnProperty(l)&&s.set(l,e[l]);s.set("widget_id",panels.helpers.utils.generateUUID());break;case"cell-collection":s=new panels.collection.cells;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"cell-model",i));break;case"widget-collection":s=new panels.collection.widgets;for(var o=0;o<e.length;o++)s.push(this.unserialize(e[o],"widget-model",i));break;default:console.log("Unknown Thing - "+t)}return s}}},{}],14:[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 e=e.replace(/{{%/g,"<%"),e=e.replace(/%}}/g,"%>"),e=e.trim()},selectElementContents:function(e){var t=document.createRange();t.selectNodeContents(e);var i=window.getSelection();i.removeAllRanges(),i.addRange(t)}}},{}],15:[function(e,t,i){var s=window.panels,l=jQuery;t.exports=function(e){return this.each(function(){var t=jQuery(this),i=t.closest("form").find(".widget-id").val(),o=l.extend(!0,{},e);if(_.isUndefined(i)||!(i.indexOf("__i__")>-1)){var n=new s.model.builder,a=new s.view.builder({model:n,config:o}),r=t.closest(".so-panels-dialog-wrapper").data("view");_.isUndefined(r)||(r.on("close_dialog",function(){n.refreshPanelsData()}),r.on("open_dialog_complete",function(){a.trigger("builder_resize")}),r.model.on("destroy",function(){n.emptyRows().destroy()}),a.setDialogParents(panelsOptions.loc.layout_widget,r));var d=Boolean(t.closest(".widget-content").length);a.render().attach({container:t,dialog:d||"dialog"===t.data("mode"),type:t.data("type")}).setDataField(t.find("input.panels-data")),d||"dialog"===t.data("mode")?(a.setDialogParents(panelsOptions.loc.layout_widget,a.dialog),t.find(".siteorigin-panels-display-builder").click(function(e){e.preventDefault(),a.dialog.openDialog()})):t.find(".siteorigin-panels-display-builder").parent().remove(),l(document).trigger("panels_setup",a)}})}},{}],16:[function(e,t,i){var s={};window.panels=s,window.siteoriginPanels=s,s.helpers={},s.helpers.clipboard=e("./helpers/clipboard"),s.helpers.utils=e("./helpers/utils"),s.helpers.serialize=e("./helpers/serialize"),s.helpers.pageScroll=e("./helpers/page-scroll"),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;if(e("#siteorigin-panels-metabox").length&&e("form#post").length)t=e("#siteorigin-panels-metabox"),i=e("#siteorigin-panels-metabox .siteorigin-panels-data-field"),s=e("form#post"),l={editorType:"tinyMCE",postId:e("#post_ID").val(),editorId:"#content",builderType:e("#siteorigin-panels-metabox").data("builder-type"),builderSupports:e("#siteorigin-panels-metabox").data("builder-supports"),loadOnAttach:panelsOptions.loadOnAttach&&1==e("#auto_draft").val(),loadLiveEditor:1==e("#siteorigin-panels-metabox").data("live-editor"),liveEditorPreview:t.data("preview-url")};else if(e(".siteorigin-panels-builder-form").length){var o=e(".siteorigin-panels-builder-form");t=o.find(".siteorigin-panels-builder-container"),i=o.find('input[name="panels_data"]'),s=o,l={editorType:"standalone",postId:o.data("post-id"),editorId:"#post_content",builderType:o.data("type"),builderSupports:o.data("builder-supports"),loadLiveEditor:!1,liveEditorPreview:o.data("preview-url")}}if(!_.isUndefined(t)){var n=window.siteoriginPanels,a=new n.model.builder,r=new n.view.builder({model:a,config:l});r.render().attach({container:t}).setDataField(i).attachToEditor(),s.submit(function(){a.refreshPanelsData()}),t.removeClass("so-panels-loading"),e(document).trigger("panels_setup",r,window.panels)}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()})})},{"./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/clipboard":11,"./helpers/page-scroll":12,"./helpers/serialize":13,"./helpers/utils":14,"./jquery/setup-builder-widget":15,"./model/builder":17,"./model/cell":18,"./model/history-entry":19,"./model/row":20,"./model/widget":21,"./utils/menu":22,"./view/builder":23,"./view/cell":24,"./view/dialog":25,"./view/live-editor":26,"./view/row":27,"./view/styles":28,"./view/widget":29}],17:[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=[];if(_.isUndefined(e.grid_cells))return void this.trigger("load_panels_data");for(var s,l=0;l<e.grid_cells.length;l++)s=parseInt(e.grid_cells[l].grid),_.isUndefined(i[s])&&(i[s]=[]),i[s].push(e.grid_cells[l]);var o=this;if(_.each(i,function(t,i){var s={};_.isUndefined(e.grids[i].style)||(s.style=e.grids[i].style),_.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)),s=i.get("cells").at(parseInt(t.cell)),l=new panels.model.widget({class:t.class,values:e});_.isUndefined(t.style)||l.set("style",t.style),_.isUndefined(t.read_only)||l.set("read_only",t.read_only),_.isUndefined(t.widget_id)?l.set("widget_id",panels.helpers.utils.generateUUID()):l.set("widget_id",t.widget_id),_.isUndefined(t.label)||l.set("label",t.label),l.cell=s,s.get("widgets").add(l,{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=e.grids.length,s=_.isUndefined(e.widgets)?0:e.widgets.length,l={grids:[],grid_cells:[],widgets:[]};l.grids=e.grids.concat(t.grids),_.isUndefined(e.grid_cells)||(l.grid_cells=e.grid_cells.slice()),_.isUndefined(e.widgets)||(l.widgets=e.widgets.slice());var o;for(o=0;o<t.grid_cells.length;o++){var n=t.grid_cells[o];n.grid=parseInt(n.grid)+i,l.grid_cells.push(n)}if(!_.isUndefined(t.widgets))for(o=0;o<t.widgets.length;o++){var a=t.widgets[o];a.panels_info.grid=parseInt(a.panels_info.grid)+i,a.panels_info.id=parseInt(a.panels_info.id)+s,l.widgets.push(a)}return l},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 a=_.extend(_.clone(i.get("values")),{panels_info:n});e.widgets.push(a)}),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"),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=this,s=jQuery('<div id="wrapper">'+e+"</div>");if(s.find(".panel-layout .panel-grid").length){var l={grids:[],grid_cells:[],widgets:[]},o=new RegExp(panelsOptions.siteoriginWidgetRegex,"i"),n=function(){function e(e){return e&&"string"==typeof e&&(e=e.replace(/<script[^>]*>([\S\s]*?)<\/script>/gim,""),e=e.replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),t.innerHTML=e,e=t.textContent,t.textContent=""),e}var t=document.createElement("div");return e}(),a=function(e){var t=e.find("div");if(!t.length)return e.html();var i;for(i=0;i<t.length-1&&jQuery.trim(t.eq(i).text())==jQuery.trim(t.eq(i+1).text());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()}},r=s.find(".panel-layout").eq(0),d=function(e,t){return jQuery(t).closest(".panel-layout").is(r)};return s.find("> .panel-layout > .panel-grid").filter(d).each(function(e,s){var r=jQuery(s),c=r.find(".panel-grid-cell").filter(d);l.grids.push({cells:c.length,style:r.data("style"),color_label:r.data("color-label"),label:r.data("label")}),c.each(function(s,r){var c=jQuery(r),h=c.find(".so-panel").filter(d);l.grid_cells.push({grid:e,weight:_.isUndefined(c.data("weight"))?1:parseFloat(c.data("weight")),style:c.data("style")}),h.each(function(r,d){var c=jQuery(d),h=c.find(".panel-widget-style").length?c.find(".panel-widget-style").html():c.html(),u={grid:e,cell:s,style:c.data("style"),raw:!1,label:c.data("label")};h=h.trim();var p=o.exec(h);if(!_.isNull(p)&&""===h.replace(o,"").trim()){try{var g=/class="(.*?)"/.exec(p[3]),f=jQuery(p[5]),w=JSON.parse(n(f.val())),m=w.instance;u.class=g[1].replace(/\\\\+/g,"\\"),u.raw=!1,m.panels_info=u,l.widgets.push(m)}catch(e){u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u}))}return!0}if(-1!==h.indexOf("panel-layout")){if(jQuery("<div>"+h+"</div>").find(".panel-layout .panel-grid").length)return u.class="SiteOrigin_Panels_Widgets_Layout",l.widgets.push({panels_data:i.getPanelsDataFromHtml(h,t),panels_info:u}),!0}return u.class=t,l.widgets.push(_.extend(a(c),{filter:"1",type:"visual",panels_info:u})),!0})})}),s.find(".panel-layout").remove(),s.find("style[data-panels-style-for-post]").remove(),s.html().replace(/^\s+|\s+$/gm,"").length&&(l.grids.push({cells:1,style:{}}),l.grid_cells.push({grid:l.grids.length-1,weight:1}),l.widgets.push({filter:"1",text:s.html().replace(/^\s+|\s+$/gm,""),title:"",type:"visual",panels_info:{class:t,raw:!1,grid:l.grids.length-1,cell:0}})),l}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}}]}}})},{}],18:[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}})},{}],19:[function(e,t,i){t.exports=Backbone.Model.extend({defaults:{text:"",data:"",time:null,count:1}})},{}],20:[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),a=s.get("widgets").models.slice(),r=0;r<a.length;r++)a[r].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}})},{}],21:[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},triggerEdit:function(){this.trigger("user_edit",this)},triggerDuplicate:function(){this.trigger("user_duplicate",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},getTitle:function(){var e=panelsOptions.widgets[this.get("class")];if(_.isUndefined(e))return this.get("class").replace(/_/g," ");if(!_.isUndefined(e.panels_title)&&!1===e.panels_title)return panelsOptions.widgets[this.get("class")].description;var t=this.get("values"),i=["title","text"];for(var s in t)t.hasOwnProperty(s)&&i.push(s);i=_.uniq(i);for(var l in i)if(!_.isUndefined(t[i[l]])&&_.isString(t[i[l]])&&""!==t[i[l]]&&"on"!==t[i[l]]&&"_"!==i[l][0]&&!jQuery.isNumeric(t[i[l]])){var o=t[i[l]];o=o.replace(/<\/?[^>]+(>|$)/g,"");var n=o.split(" ");return n=n.slice(0,20),n.join(" ")}return this.getWidgetField("description")}})},{}],22:[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").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)").click(function(){var e=l(this);s(e.data("key")),o.closeMenu()}),n.find(".so-item.so-confirm").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 a=o.index(n);38===e.which?n=a-1<0?o.last():o.eq(a-1):40===e.which&&(n=a+1>=o.length?o.first():o.eq(a+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 r=0;r<s.defaultDisplay.length;r++)i.find('.so-item[data-key="'+s.defaultDisplay[r]+'"]').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]}})},{}],23:[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:"",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"},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},_.each(this.dialogs,function(e,i,s){s[i].setBuilder(t)}),this.dialogs.row.setRowDialogType("create"),this.model.get("rows").on("add",this.onAddRow,this),l(window).resize(function(e){e.target===window&&t.trigger("builder_resize")}),this.model.on("change:data load_panels_data",this.storeModelData,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.model.on("change:data load_panels_data",this.toggleWelcomeDisplay,this),this.on("display_builder",this.wrapEditorExpandAdjust,this),this.menu=new s.utils.menu({}),this.menu.on("activate_context",this.activateContextMenu,this),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),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");return this.supports("addWidget")||t.find(".so-widget-add").hide(),this.supports("addRow")||t.find(".so-row-add").hide(),this.supports("prebuilt")||t.find(".so-prebuilt-add").hide(),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").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('<a id="content-panels" class="hide-if-no-js wp-switch-editor switch-panels">'+e.find(".hndle span").html()+"</a>").click(function(e){t.displayAttachedBuilder({confirm:!0})&&e.preventDefault()})),this.supports("revertToEditor")&&e.find(".so-switch-to-standard").click(function(i){i.preventDefault(),confirm(panelsOptions.loc.confirm_stop_builder)&&(t.addHistoryEntry("back_to_editor"),t.model.loadPanelsData(!1),l("#wp-content-wrap").show(),e.hide(),l(window).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.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());var i=l(window).scrollTop()-t.$el.offset().top;"fixed"===l("#wpadminbar").css("position")&&(i+=l("#wpadminbar").outerHeight());var s={top:0,bottom:t.$el.outerHeight()-e.outerHeight()+20};i>s.top&&i<s.bottom?"fixed"!==e.css("position")&&e.css({top:l("#wpadminbar").outerHeight(),left:t.$el.offset().left,width:t.$el.outerWidth(),position:"fixed"}):e.css({top:Math.min(Math.max(i,0),t.$el.outerHeight()-e.outerHeight()+20),left:0,width:"100%",position:"absolute"}),t.$el.css("padding-top",e.outerHeight())};return this.on("builder_resize",s,this),l(document).scroll(s),s(),this.trigger("builder_attached_to_editor"),this},displayAttachedBuilder:function(e){if(e=_.extend({confirm:!0},e),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(),this.metabox.show().find("> .inside").show(),l(window).resize(),l(document).scroll(),this.attachedVisible=!0,this.trigger("display_builder"),!0},initSortable:function(){if(!this.supports("moveRow"))return this;var e=this;return this.rowsSortable=this.$(".so-rows-container").sortable({appendTo:"#wpwrap",items:".so-row-container",handle:".so-row-move",axis:"y",tolerance:"pointer",scroll:!1,stop:function(t,i){e.addHistoryEntry("row_moved");var s=l(i.item),o=s.data("view");e.model.get("rows").remove(o.model,{silent:!0}),e.model.get("rows").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){i={}}this.model.loadPanelsData(i),this.currentData=i,this.toggleWelcomeDisplay()}return this},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.resize()},displayAddWidgetDialog:function(){this.dialogs.widgets.openDialog()},displayAddRowDialog:function(){var e=new s.model.row,t=new s.collection.cells([{weight:.5},{weight:.5}]);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&&this.attachedToEditor&&this.$el.is(":visible")){var e=this.model.getPanelsData();_.isEmpty(e.widgets)||l.post(panelsOptions.ajaxurl,{
3
+ action:"so_panels_builder_content",panels_data:JSON.stringify(e),post_id:this.config.postId},function(e){""!==e&&this.updateEditorContent(e)}.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.triggerYoastSeoChange()},triggerYoastSeoChange:function(){if(l("#yoast_wpseo_focuskw_text_input").length){var e,t=document.getElementById("yoast_wpseo_focuskw_text_input");document.createEvent?(e=document.createEvent("HTMLEvents"),e.initEvent("keyup",!0,!0)):(e=document.createEventObject(),e.eventType="keyup"),e.eventName="keyup",document.createEvent?t.dispatchEvent(e):t.fireEvent("on"+e.eventType,e)}},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).unbind("scroll",e.handler),l(window).bind("scroll",function(t){this.attachedVisible||e.handler(t)}.bind(this));break}}catch(e){return}},handleBuilderSizing:function(){var e=this.$el.width();return e?(e<480?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){var i=this,s=l(".siteorigin-panels-builder:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),o=l(".so-panels-dialog-wrapper:visible").sort(function(e,t){return l(e).zIndex()>l(t).zIndex()?1:-1}).last(),n=i.$el.closest(".so-panels-dialog-wrapper");if(i.$el.is(s)&&(0===o.length||o.is(n))){var a=l([]).add(i.$(".so-panels-welcome-message:visible")).add(i.$(".so-rows-container > .so-row-container")).add(i.$(".so-cells > .cell")).add(i.$(".cell-wrapper > .so-widget")).filter(function(i){return t.isOverEl(l(this),e)}),r=a.last().data("view");void 0!==r&&void 0!==r.buildContextualMenu?r.buildContextualMenu(e,t):a.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))}})},{}],24:[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.model.get("widgets").on("add",this.onAddWidget,this)},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.$el.attr("id");return this.widgetSortable=this.$(".widgets-container").sortable({placeholder:"so-widget-sortable-highlight",connectWith:"#"+t+" .so-cells .cell .widgets-container",tolerance:"pointer",scroll:!1,over:function(t,i){e.row.builder.trigger("widget_sortable_move")},stop:function(t,i){e.row.builder.addHistoryEntry("widget_moved");var s=l(i.item),o=s.data("view"),n=s.closest(".cell").data("view");o.model.moveToCell(n.model,{},s.index()),o.cell=n,o.cell.row.builder.model.refreshPanelsData()},helper:function(e,t){var i=t.clone().css({width:t.outerWidth(),"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(),right:5,height:e.$el.outerHeight()});n.find(".resize-handle").remove(),l(this).data({newCellClone:o,prevCellClone:n})}},drag:function(i,o){var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;l(this).data("newCellClone").css("width",n*a).find(".preview-cell-weight").html(Math.round(1e3*a)/10),l(this).data("prevCellClone").css("width",n*r).find(".preview-cell-weight").html(Math.round(1e3*r)/10)},stop:function(i,o){l(this).data("newCellClone").remove(),l(this).data("prevCellClone").remove();var n=s.row.$el.width()+10,a=s.model.get("weight")-(o.position.left+t.outerWidth()/2)/n,r=e.model.get("weight")+(o.position.left+t.outerWidth()/2)/n;a>.02&&r>.02&&(s.row.builder.addHistoryEntry("cell_resized"),s.model.set("weight",a),e.model.set("weight",r),s.row.resize()),o.helper.css("left",-t.outerWidth()/2),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.resize()},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.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()});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)}})},{}],25:[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","click .so-nav.so-previous":"navToPrevious","click .so-nav.so-next":"navToNext"},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()},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=this,i=l('<h3 class="so-parent-link"></h3>').html(this.parentDialog.text+'<div class="so-separator"></div>');i.click(function(e){e.preventDefault(),t.closeDialog(),t.parentDialog.openDialog()}),this.$(".so-title-bar").prepend(i)}return this.$(".so-title-bar .so-title-editable").length&&this.initEditableLabel(),this},initTabs:function(){var e=this.$(".so-sidebar-tabs li a");if(0===e.length)return this;var t=this;return e.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().click(),this},initToolbar:function(){this.$(".so-toolbar .so-buttons .so-toolbar-button").click(function(e){e.preventDefault(),this.trigger("button_click",l(e.currentTarget))}.bind(this)),this.$(".so-toolbar .so-buttons .so-dropdown-button").click(function(e){e.preventDefault();var t=l(e.currentTarget),i=t.siblings(".so-dropdown-links-wrapper");i.is(".hidden")?i.removeClass("hidden"):i.addClass("hidden")}.bind(this)),l("html").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.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).focus(),window.getSelection().removeAllRanges()}return!i}).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)),e.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"),null===i?s.hide():!1===i&&s.addClass("so-disabled")},openDialog:function(e){e=_.extend({silent:!1},e),e.silent||this.trigger("open_dialog"),this.dialogOpen=!0,this.refreshDialogNav(),s.helpers.pageScroll.lock(),l(window).on("keyup",this.keyboardListen),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),e.silent||this.trigger("close_dialog"),this.dialogOpen=!1,this.$el.hide(),s.helpers.pageScroll.unlock(),l(window).off("keyup",this.keyboardListen),e.silent||(this.trigger("close_dialog_complete"),this.builder.trigger("close_dialog",this))},keyboardListen:function(e){27===e.which&&l(".so-panels-dialog-wrapper .so-close").trigger("click")},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("]["),t.unshift(i[1])),t=t.map(function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e});var o=s,n=null,a=!!_.isString(e.attr("type"))&&e.attr("type").toLowerCase();if("checkbox"===a)n=e.is(":checked")?""===e.val()||e.val():null;else if("radio"===a){if(!e.is(":checked"))return;n=e.val()}else if("TEXTAREA"===e.prop("tagName")&&e.hasClass("wp-editor-area")){var r=null;"undefined"!=typeof tinyMCE&&(r=tinyMCE.get(e.attr("id"))),n=null!==r&&_.isFunction(r.getContent)&&!r.isHidden()?r.getContent():e.val()}else if("SELECT"===e.prop("tagName")){var d=e.find("option:selected");1===d.length?n=e.find("option:selected").val():d.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 c=0;c<t.length;c++)c===t.length-1?""===t[c]?o.push(n):o[t[c]]=n:(_.isUndefined(o[t[c]])&&(""===t[c+1]?o[t[c]]=[]:o[t[c]]={}),o=o[t[c]])}catch(t){console.log("Field ["+e.attr("name")+"] could not be processed and was skipped - "+t.message)}}),s},setStatusMessage:function(e,t){this.$(".so-toolbar .so-status").html(e),!_.isUndefined(t)&&t&&this.$(".so-toolbar .so-status").addClass("so-panels-loading")},setParent:function(e,t){this.parentDialog={text:e,dialog:t}}})},{}],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-live-editor").html())),previewScrollTop:0,loadTimes:[],previewFrameId:1,previewUrl:null,previewIframe:null,events:{"click .live-editor-close":"close","click .live-editor-collapse":"collapse","click .live-editor-mode":"mobileToggle"},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.builder.model.on("refresh_panels_data",this.handleRefreshData,this),this.builder.model.on("load_panels_data",this.handleLoadData,this)},render:function(){this.setElement(this.template()),this.$el.hide();var e=this,t=!1;return l(document).mousedown(function(){t=!0}).mouseup(function(){t=!1}),this.$el.on("mouseenter",".so-widget-wrapper",function(){var i=l(this),s=i.data("live-editor-preview-widget");t||void 0===s||!s.length||e.$(".so-preview-overlay").is(":visible")||(e.highlightElement(s),e.scrollToElement(s))}),e.$el.on("mouseleave",".so-widget-wrapper",function(){e.resetHighlights()}),e.builder.on("open_dialog",function(){e.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()),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")},collapse:function(){this.$el.toggleClass("so-collapsed");var e=this.$(".live-editor-collapse span");e.html(e.data(this.$el.hasClass("so-collapsed")?"expand":"collapse"))},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,t){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="javascript:false;" />').attr({id:s,name:s}).appendTo(i),this.setupPreviewFrame(this.previewIframe);var o=l('<form id="soPostToPreviewFrame" method="post" />').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.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))),setTimeout(function(){i.scrollTop(t.previewScrollTop),t.$(".so-preview-overlay").hide()},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-wrapper").eq(s.data("index"));o.data("live-editor-preview-widget",s),s.css({cursor:"pointer"}).mouseenter(function(){o.parent().addClass("so-hovered"),t.highlightElement(s)}).mouseleave(function(){o.parent().removeClass("so-hovered"),t.resetHighlights()}).click(function(e){e.preventDefault(),o.find(".title h4").click()})}),i.find("a").css({"pointer-events":"none"}).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(e.currentTarget);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")}})},{}],27:[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");e.on("add",this.handleCellAdd,this),e.on("remove",this.handleCellRemove,this),this.model.on("reweight_cells",this.resize,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this);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.model.on("change:label",this.onLabelChange,this)},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("editWidget")||(this.$(".so-row-toolbar .so-row-settings").parent().remove(),this.$el.addClass("so-row-no-edit")),this.builder.supports("addWidget")||(this.$(".so-row-toolbar .so-row-duplicate").parent().remove(),this.$el.addClass("so-row-no-duplicate")),this.builder.supports("deleteWidget")||(this.$(".so-row-toolbar .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")),l.trim(this.$(".so-row-toolbar").html()).length||this.$(".so-row-toolbar").remove(),this.builder.on("widget_sortable_move",this.resize,this),this.builder.on("builder_resize",this.resize,this),this.resize(),this},visualCreate:function(){this.$el.hide().fadeIn("fast")},resize:function(e){if(this.$el.is(":visible")){this.$(".so-cells .cell-wrapper").css("min-height",0),this.$(".so-cells .resize-handle").css("height",0);var t=0;this.$(".so-cells .cell").each(function(){t=Math.max(t,l(this).height()),l(this).css("width",100*l(this).data("view").model.get("weight")+"%")}),this.$(".so-cells .cell-wrapper").css("min-height",Math.max(t,63)),this.$(".so-cells .resize-handle").css("height",this.$(".so-cells .cell-wrapper").outerHeight())}},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=l.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(){return null===this.dialog&&(this.dialog=new s.dialog.row,this.dialog.setBuilder(this.builder).setRowModel(this.model)),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))}})},{}],28:[function(e,t,i){var s=(window.panels,jQuery);t.exports=Backbone.View.extend({stylesLoaded:!1,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");var l={builderType:i.builderType};return"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},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)),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").click(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").click(function(i){i.preventDefault(),null===e&&(e=wp.media({title:"choose",library:{type:"image"},button:{text:"Done",close:!0}}),e.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("input").val(i.id)})),e.open()}),t.find(".remove-image").click(function(e){e.preventDefault(),t.find(".current-image").css("background-image","none"),t.find("input").val("")})}),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.focus(function(){s(this).select()});!function(e){if(""!==e){var o=/(?:([0-9\.,\-]+)(.*))+/,n=l.val().split(" "),a=[];for(var r in n){var d=o.exec(n[r]);_.isNull(d)||_.isUndefined(d[1])||_.isUndefined(d[2])||(a.push(d[1]),i.val(d[2]))}1===t.length?t.val(a.join(" ")):(1===a.length?a=[a[0],a[0],a[0],a[0]]:2===a.length?a=[a[0],a[1],a[0],a[1]]:3===a.length&&(a=[a[0],a[1],a[2],a[1]]),t.each(function(e,t){s(t).val(a[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),a=[],r=[],d=[];t.each(function(e,t){var i=""!==s(t).val()?parseFloat(s(t).val()):null;a.push(i),null===i?r.push(e):d.push(e)}),3===r.length&&d[0]===t.index(n)&&(t.val(n.val()),a=[n.val(),n.val(),n.val(),n.val()]),JSON.stringify(a)===JSON.stringify([null,null,null,null])?l.val(""):l.val(a.map(function(e){return(null===e?0:e)+i.val()}).join(" "))}};t.change(o),i.change(o)})}})},{}],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-widget").html())),cell:null,dialog:null,events:{"click .widget-edit":"editHandler","click .title h4":"titleClickHandler","click .actions .widget-duplicate":"duplicateHandler","click .actions .widget-delete":"deleteHandler"},initialize:function(){this.model.on("user_edit",this.editHandler,this),this.model.on("user_duplicate",this.duplicateHandler,this),this.model.on("destroy",this.onModelDestroy,this),this.model.on("visual_destroy",this.visualDestroyModel,this),this.model.on("change:values",this.onModelChange,this),this.model.on("change:label",this.onLabelChange,this)},render:function(e){if(e=_.extend({loadForm:!1},e),this.setElement(this.template({title:this.model.getWidgetField("title"),description:this.model.getTitle()})),this.$el.data("view",this),
4
+ 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"),l.trim(this.$(".actions").html()).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},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(){this.getEditDialog().openDialog()},titleClickHandler:function(e){return!this.cell.row.builder.supports("editWidget")||this.model.get("read_only")?this:(this.editHandler(),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.model.trigger("visual_destroy"),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(){this.cell.row.builder.addHistoryEntry("widget_deleted");var e=this;return this.$el.fadeOut("fast",function(){e.cell.row.resize(),e.model.destroy(),e.cell.row.builder.model.refreshPanelsData(),e.remove()}),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.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()}.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)}})},{}],30:[function(e,t,i){var s=e("./media-widget"),l=e("./text-widget"),o={MEDIA_AUDIO:"media_audio",MEDIA_IMAGE:"media_image",MEDIA_VIDEO:"media_video",TEXT:"text",addWidget:function(e,t){var i,o=e.find("> .id_base").val();switch(o){case this.MEDIA_AUDIO:case this.MEDIA_IMAGE:case this.MEDIA_VIDEO:i=s;break;case this.TEXT:i=l}i.addWidget(o,e,t)}};t.exports=o},{"./media-widget":31,"./text-widget":32}],31:[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,a=t.find("> .widget-content"),r=s('<div class="media-widget-control"></div>');a.before(r);var d={};a.find(".media-widget-instance-property").each(function(){var e=s(this);d[e.data("property")]=e.val()}),d.widget_id=i;var c=new n(d),h=new o({el:r,syncContainer:a,model:c});return h.render(),h}}};t.exports=l},{}],32:[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 a=s("<div></div>"),r=t.find(".widget-content:first");r.before(a),o={el:a,syncContainer:r}}else o={el:t};var d=new l.TextWidgetControl(o);return d.initializeEditor(),d}};t.exports=l},{}]},{},[16]);
js/{styling-2510.js → styling-2511.js} RENAMED
File without changes
js/{styling-2510.min.js → styling-2511.min.js} RENAMED
File without changes
lang/siteorigin-panels.pot CHANGED
@@ -61,7 +61,7 @@ msgstr ""
61
  msgid "WordPress Widgets"
62
  msgstr ""
63
 
64
- #: tmp/inc/admin-widget-dialog.php:183, tmp/inc/settings.php:313
65
  msgid "Recommended Widgets"
66
  msgstr ""
67
 
@@ -85,331 +85,331 @@ msgstr ""
85
  msgid "Addons"
86
  msgstr ""
87
 
88
- #: tmp/inc/admin.php:136, tmp/inc/admin.php:476, tmp/inc/admin.php:985, tmp/inc/admin.php:990, tmp/inc/settings.php:186, tmp/tpl/js-templates.php:203
89
  msgid "Page Builder"
90
  msgstr ""
91
 
92
- #: tmp/inc/admin.php:266
93
  msgid "All Widgets"
94
  msgstr ""
95
 
96
- #: tmp/inc/admin.php:292
97
  msgid "Missing Widget"
98
  msgstr ""
99
 
100
- #: tmp/inc/admin.php:293
101
  msgid "Page Builder doesn't know about this widget."
102
  msgstr ""
103
 
104
- #: tmp/inc/admin.php:297
105
  msgid "%d seconds"
106
  msgstr ""
107
 
108
- #: tmp/inc/admin.php:299
109
  msgid "%d minutes"
110
  msgstr ""
111
 
112
- #: tmp/inc/admin.php:301
113
  msgid "%d hours"
114
  msgstr ""
115
 
116
- #: tmp/inc/admin.php:304
117
  msgid "%d second"
118
  msgstr ""
119
 
120
- #: tmp/inc/admin.php:306
121
  msgid "%d minute"
122
  msgstr ""
123
 
124
- #: tmp/inc/admin.php:308
125
  msgid "%d hour"
126
  msgstr ""
127
 
128
- #: tmp/inc/admin.php:311
129
  msgid "%s before"
130
  msgstr ""
131
 
132
- #: tmp/inc/admin.php:312
133
  msgid "Now"
134
  msgstr ""
135
 
136
- #: tmp/inc/admin.php:316
137
  msgid "Current"
138
  msgstr ""
139
 
140
- #: tmp/inc/admin.php:317
141
  msgid "Original"
142
  msgstr ""
143
 
144
- #: tmp/inc/admin.php:318
145
  msgid "Version restored"
146
  msgstr ""
147
 
148
- #: tmp/inc/admin.php:319
149
  msgid "Converted to editor"
150
  msgstr ""
151
 
152
- #: tmp/inc/admin.php:323
153
  msgid "Widget deleted"
154
  msgstr ""
155
 
156
- #: tmp/inc/admin.php:325
157
  msgid "Widget added"
158
  msgstr ""
159
 
160
- #: tmp/inc/admin.php:327
161
  msgid "Widget edited"
162
  msgstr ""
163
 
164
- #: tmp/inc/admin.php:329
165
  msgid "Widget duplicated"
166
  msgstr ""
167
 
168
- #: tmp/inc/admin.php:331
169
  msgid "Widget moved"
170
  msgstr ""
171
 
172
- #: tmp/inc/admin.php:335
173
  msgid "Row deleted"
174
  msgstr ""
175
 
176
- #: tmp/inc/admin.php:337
177
  msgid "Row added"
178
  msgstr ""
179
 
180
- #: tmp/inc/admin.php:339
181
  msgid "Row edited"
182
  msgstr ""
183
 
184
- #: tmp/inc/admin.php:341
185
  msgid "Row moved"
186
  msgstr ""
187
 
188
- #: tmp/inc/admin.php:343
189
  msgid "Row duplicated"
190
  msgstr ""
191
 
192
- #: tmp/inc/admin.php:345
193
  msgid "Row pasted"
194
  msgstr ""
195
 
196
- #: tmp/inc/admin.php:348
197
  msgid "Cell resized"
198
  msgstr ""
199
 
200
- #: tmp/inc/admin.php:351
201
  msgid "Prebuilt layout loaded"
202
  msgstr ""
203
 
204
- #: tmp/inc/admin.php:355
205
  msgid "Loading prebuilt layout"
206
  msgstr ""
207
 
208
- #: tmp/inc/admin.php:356
209
  msgid "Would you like to copy this editor's existing content to Page Builder?"
210
  msgstr ""
211
 
212
- #: tmp/inc/admin.php:357
213
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
214
  msgstr ""
215
 
216
- #: tmp/inc/admin.php:359
217
  msgid "Layout Builder Widget"
218
  msgstr ""
219
 
220
- #: tmp/inc/admin.php:361, tmp/tpl/js-templates.php:107, tmp/tpl/js-templates.php:426
221
  msgid "Are you sure?"
222
  msgstr ""
223
 
224
- #: tmp/inc/admin.php:363
225
  msgid "%s is ready to insert."
226
  msgstr ""
227
 
228
- #: tmp/inc/admin.php:367
229
  msgid "Add Widget Below"
230
  msgstr ""
231
 
232
- #: tmp/inc/admin.php:368
233
  msgid "Add Widget to Cell"
234
  msgstr ""
235
 
236
- #: tmp/inc/admin.php:369, tmp/tpl/js-templates.php:230
237
  msgid "Search Widgets"
238
  msgstr ""
239
 
240
- #: tmp/inc/admin.php:371, tmp/tpl/js-templates.php:17, tmp/tpl/js-templates.php:19
241
  msgid "Add Row"
242
  msgstr ""
243
 
244
- #: tmp/inc/admin.php:372
245
  msgid "Column"
246
  msgstr ""
247
 
248
- #: tmp/inc/admin.php:374
249
  msgid "Cell Actions"
250
  msgstr ""
251
 
252
- #: tmp/inc/admin.php:375
253
  msgid "Paste Widget"
254
  msgstr ""
255
 
256
- #: tmp/inc/admin.php:377
257
  msgid "Widget Actions"
258
  msgstr ""
259
 
260
- #: tmp/inc/admin.php:378
261
  msgid "Edit Widget"
262
  msgstr ""
263
 
264
- #: tmp/inc/admin.php:379
265
  msgid "Duplicate Widget"
266
  msgstr ""
267
 
268
- #: tmp/inc/admin.php:380
269
  msgid "Delete Widget"
270
  msgstr ""
271
 
272
- #: tmp/inc/admin.php:381
273
  msgid "Copy Widget"
274
  msgstr ""
275
 
276
- #: tmp/inc/admin.php:382
277
  msgid "Paste Widget Below"
278
  msgstr ""
279
 
280
- #: tmp/inc/admin.php:384
281
  msgid "Row Actions"
282
  msgstr ""
283
 
284
- #: tmp/inc/admin.php:385, tmp/tpl/js-templates.php:105
285
  msgid "Edit Row"
286
  msgstr ""
287
 
288
- #: tmp/inc/admin.php:386, tmp/tpl/js-templates.php:106
289
  msgid "Duplicate Row"
290
  msgstr ""
291
 
292
- #: tmp/inc/admin.php:387, tmp/tpl/js-templates.php:107
293
  msgid "Delete Row"
294
  msgstr ""
295
 
296
- #: tmp/inc/admin.php:388
297
  msgid "Copy Row"
298
  msgstr ""
299
 
300
- #: tmp/inc/admin.php:389
301
  msgid "Paste Row"
302
  msgstr ""
303
 
304
- #: tmp/inc/admin.php:391
305
  msgid "Draft"
306
  msgstr ""
307
 
308
- #: tmp/inc/admin.php:392
309
  msgid "Untitled"
310
  msgstr ""
311
 
312
- #: tmp/inc/admin.php:394
313
  msgid "New Row"
314
  msgstr ""
315
 
316
- #: tmp/inc/admin.php:395, tmp/inc/styles.php:173, tmp/tpl/js-templates.php:70
317
  msgid "Row"
318
  msgstr ""
319
 
320
- #: tmp/inc/admin.php:403
321
  msgid "Page Builder layouts"
322
  msgstr ""
323
 
324
- #: tmp/inc/admin.php:404
325
  msgid "Error uploading or importing file."
326
  msgstr ""
327
 
328
- #: tmp/inc/admin.php:557, tmp/inc/home.php:26
329
  msgid "Home Page"
330
  msgstr ""
331
 
332
- #: tmp/inc/admin.php:651
333
  msgid "Untitled Widget"
334
  msgstr ""
335
 
336
- #: tmp/inc/admin.php:816
337
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
338
  msgstr ""
339
 
340
- #: tmp/inc/admin.php:822
341
  msgid "Save and reload this page to start using the widget after you've installed it."
342
  msgstr ""
343
 
344
- #: tmp/inc/admin.php:838
345
  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."
346
  msgstr ""
347
 
348
- #: tmp/inc/admin.php:1002
349
  msgid "%s Widgets"
350
  msgstr ""
351
 
352
- #: tmp/inc/admin.php:1048
353
  msgid "12 Page Builder Tips"
354
  msgstr ""
355
 
356
- #: tmp/inc/admin.php:1051
357
  msgid "Sign up to our newsletter and we'll send you this free Page Builder video course."
358
  msgstr ""
359
 
360
- #: tmp/inc/admin.php:1052
361
  msgid "12 tips that'll help you get the most out of Page Builder."
362
  msgstr ""
363
 
364
- #: tmp/inc/admin.php:1053
365
  msgid "Watch the video to find out more, then sign up below to get started."
366
  msgstr ""
367
 
368
- #: tmp/inc/admin.php:1054, tmp/inc/admin.php:1064
369
  msgid "We'll email you a confirmation. You can unsubscribe at any time."
370
  msgstr ""
371
 
372
- #: tmp/inc/admin.php:1058
373
  msgid "Free Page Builder Addons"
374
  msgstr ""
375
 
376
- #: tmp/inc/admin.php:1061
377
  msgid "The free animations addon allows you to add beautiful animations to Page Builder elements."
378
  msgstr ""
379
 
380
- #: tmp/inc/admin.php:1062
381
  msgid "Sign up to our newsletter and we'll send you the addon as a free gift."
382
  msgstr ""
383
 
384
- #: tmp/inc/admin.php:1063
385
  msgid "Plus, we'll send you even more powerful addons, for as long as you're subscribed."
386
  msgstr ""
387
 
388
- #: tmp/inc/admin.php:1079
389
  msgid "Watch Intro Video"
390
  msgstr ""
391
 
392
- #: tmp/inc/admin.php:1080
393
  msgid "Loaded from Vimeo Servers"
394
  msgstr ""
395
 
396
- #: tmp/inc/admin.php:1081
397
  msgid "Please enter a valid email address."
398
  msgstr ""
399
 
400
- #: tmp/inc/admin.php:1083, tmp/learn/tpl/dialog.php:22
401
  msgid "Your Name"
402
  msgstr ""
403
 
404
- #: tmp/inc/admin.php:1084, tmp/learn/tpl/dialog.php:27
405
  msgid "Your Email"
406
  msgstr ""
407
 
408
- #: tmp/inc/admin.php:1085, tmp/learn/tpl/dialog.php:31
409
  msgid "Sign Up"
410
  msgstr ""
411
 
412
- #: tmp/inc/admin.php:1086, tmp/learn/tpl/dialog.php:37, tmp/tpl/js-templates.php:242
413
  msgid "Close"
414
  msgstr ""
415
 
@@ -465,235 +465,235 @@ msgstr ""
465
  msgid "Custom Home Page Builder"
466
  msgstr ""
467
 
468
- #: tmp/inc/revisions.php:78
469
  msgid "Page Builder Content"
470
  msgstr ""
471
 
472
- #: tmp/inc/settings.php:186, tmp/settings/tpl/settings.php:9
473
  msgid "SiteOrigin Page Builder"
474
  msgstr ""
475
 
476
- #: tmp/inc/settings.php:213
477
  msgid "Page Builder Settings"
478
  msgstr ""
479
 
480
- #: tmp/inc/settings.php:229
481
  msgid "General"
482
  msgstr ""
483
 
484
- #: tmp/inc/settings.php:235
485
  msgid "Post Types"
486
  msgstr ""
487
 
488
- #: tmp/inc/settings.php:237
489
  msgid "The post types to use Page Builder on."
490
  msgstr ""
491
 
492
- #: tmp/inc/settings.php:242
493
  msgid "Live Editor Quick Link"
494
  msgstr ""
495
 
496
- #: tmp/inc/settings.php:243
497
  msgid "Display a Live Editor button in the admin bar."
498
  msgstr ""
499
 
500
- #: tmp/inc/settings.php:248
501
  msgid "Display Widget Count"
502
  msgstr ""
503
 
504
- #: tmp/inc/settings.php:249
505
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
506
  msgstr ""
507
 
508
- #: tmp/inc/settings.php:254
509
  msgid "Limit Parallax Motion"
510
  msgstr ""
511
 
512
- #: tmp/inc/settings.php:255
513
  msgid "How many pixels of scrolling result in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
514
  msgstr ""
515
 
516
- #: tmp/inc/settings.php:260
517
  msgid "Sidebars Emulator"
518
  msgstr ""
519
 
520
- #: tmp/inc/settings.php:261
521
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
522
  msgstr ""
523
 
524
- #: tmp/inc/settings.php:266
525
  msgid "Upgrade Teaser"
526
  msgstr ""
527
 
528
- #: tmp/inc/settings.php:268
529
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
530
  msgstr ""
531
 
532
- #: tmp/inc/settings.php:276
533
  msgid "Page Builder Learning"
534
  msgstr ""
535
 
536
- #: tmp/inc/settings.php:277
537
  msgid "Display buttons for Page Builder learning."
538
  msgstr ""
539
 
540
- #: tmp/inc/settings.php:282
541
  msgid "Default To Page Builder Interface"
542
  msgstr ""
543
 
544
- #: tmp/inc/settings.php:283
545
  msgid "New posts/pages that you create will start with the Page Builder loaded."
546
  msgstr ""
547
 
548
- #: tmp/inc/settings.php:289
549
  msgid "Widgets"
550
  msgstr ""
551
 
552
- #: tmp/inc/settings.php:295
553
  msgid "Widget Title HTML"
554
  msgstr ""
555
 
556
- #: tmp/inc/settings.php:296
557
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
558
  msgstr ""
559
 
560
- #: tmp/inc/settings.php:301
561
  msgid "Add Widget Class"
562
  msgstr ""
563
 
564
- #: tmp/inc/settings.php:302
565
  msgid "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts."
566
  msgstr ""
567
 
568
- #: tmp/inc/settings.php:307
569
  msgid "Legacy Bundled Widgets"
570
  msgstr ""
571
 
572
- #: tmp/inc/settings.php:308
573
  msgid "Load legacy widgets from Page Builder 1."
574
  msgstr ""
575
 
576
- #: tmp/inc/settings.php:314
577
  msgid "Display recommend widgets in Page Builder add widget dialog."
578
  msgstr ""
579
 
580
- #: tmp/inc/settings.php:320, tmp/inc/styles-admin.php:78
581
  msgid "Layout"
582
  msgstr ""
583
 
584
- #: tmp/inc/settings.php:328
585
  msgid "Responsive Layout"
586
  msgstr ""
587
 
588
- #: tmp/inc/settings.php:329
589
  msgid "Collapse widgets, rows and columns on mobile devices."
590
  msgstr ""
591
 
592
- #: tmp/inc/settings.php:334
593
  msgid "Use Tablet Layout"
594
  msgstr ""
595
 
596
- #: tmp/inc/settings.php:335
597
  msgid "Collapses columns differently on tablet devices."
598
  msgstr ""
599
 
600
- #: tmp/inc/settings.php:341
601
  msgid "Detect older browsers"
602
  msgstr ""
603
 
604
- #: tmp/inc/settings.php:342
605
  msgid "Never"
606
  msgstr ""
607
 
608
- #: tmp/inc/settings.php:343
609
  msgid "Always"
610
  msgstr ""
611
 
612
- #: tmp/inc/settings.php:345
613
  msgid "Use Legacy Layout Engine"
614
  msgstr ""
615
 
616
- #: tmp/inc/settings.php:346
617
  msgid "The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers."
618
  msgstr ""
619
 
620
- #: tmp/inc/settings.php:352
621
  msgid "Tablet Width"
622
  msgstr ""
623
 
624
- #: tmp/inc/settings.php:353
625
  msgid "Device width, in pixels, to collapse into a tablet view ."
626
  msgstr ""
627
 
628
- #: tmp/inc/settings.php:359
629
  msgid "Mobile Width"
630
  msgstr ""
631
 
632
- #: tmp/inc/settings.php:360
633
  msgid "Device width, in pixels, to collapse into a mobile view ."
634
  msgstr ""
635
 
636
- #: tmp/inc/settings.php:366
637
  msgid "Row/Widget Bottom Margin"
638
  msgstr ""
639
 
640
- #: tmp/inc/settings.php:367
641
  msgid "Default margin below rows and widgets."
642
  msgstr ""
643
 
644
- #: tmp/inc/settings.php:372
645
  msgid "Last Row With Margin"
646
  msgstr ""
647
 
648
- #: tmp/inc/settings.php:373
649
  msgid "Allow margin in last row."
650
  msgstr ""
651
 
652
- #: tmp/inc/settings.php:379
653
  msgid "Row Gutter"
654
  msgstr ""
655
 
656
- #: tmp/inc/settings.php:380
657
  msgid "Default spacing between columns in each row."
658
  msgstr ""
659
 
660
- #: tmp/inc/settings.php:386
661
  msgid "Full Width Container"
662
  msgstr ""
663
 
664
- #: tmp/inc/settings.php:387
665
  msgid "The container used for the full width layout."
666
  msgstr ""
667
 
668
- #: tmp/inc/settings.php:394
669
  msgid "Content"
670
  msgstr ""
671
 
672
- #: tmp/inc/settings.php:400
673
  msgid "Copy Content"
674
  msgstr ""
675
 
676
- #: tmp/inc/settings.php:401
677
  msgid "Copy content from Page Builder to post content."
678
  msgstr ""
679
 
680
- #: tmp/inc/settings.php:406
681
  msgid "Copy Styles"
682
  msgstr ""
683
 
684
- #: tmp/inc/settings.php:407
685
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
686
  msgstr ""
687
 
688
- #: tmp/inc/settings.php:412
689
  msgid "Content Cache"
690
  msgstr ""
691
 
692
- #: tmp/inc/settings.php:413
693
  msgid "Cache CSS and HTML generated by Page Builder."
694
  msgstr ""
695
 
696
- #: tmp/inc/settings.php:460, tmp/inc/styles-admin.php:248
697
  msgid "Enabled"
698
  msgstr ""
699
 
@@ -721,7 +721,7 @@ msgstr ""
721
  msgid "Theme"
722
  msgstr ""
723
 
724
- #: tmp/inc/styles-admin.php:174, tmp/inc/styles.php:241, tmp/inc/styles.php:269
725
  msgid "Top"
726
  msgstr ""
727
 
@@ -729,7 +729,7 @@ msgstr ""
729
  msgid "Right"
730
  msgstr ""
731
 
732
- #: tmp/inc/styles-admin.php:182, tmp/inc/styles.php:243, tmp/inc/styles.php:271
733
  msgid "Bottom"
734
  msgstr ""
735
 
@@ -745,223 +745,223 @@ msgstr ""
745
  msgid "Remove"
746
  msgstr ""
747
 
748
- #: tmp/inc/styles.php:68
749
  msgid "%s ID"
750
  msgstr ""
751
 
752
- #: tmp/inc/styles.php:71
753
  msgid "A custom ID used for this %s."
754
  msgstr ""
755
 
756
- #: tmp/inc/styles.php:76
757
  msgid "%s Class"
758
  msgstr ""
759
 
760
- #: tmp/inc/styles.php:79
761
  msgid "A CSS class"
762
  msgstr ""
763
 
764
- #: tmp/inc/styles.php:84
765
  msgid "CSS Styles"
766
  msgstr ""
767
 
768
- #: tmp/inc/styles.php:87
769
  msgid "One style attribute per line."
770
  msgstr ""
771
 
772
- #: tmp/inc/styles.php:92
773
  msgid "Mobile CSS Styles"
774
  msgstr ""
775
 
776
- #: tmp/inc/styles.php:95
777
  msgid "CSS applied when in mobile view."
778
  msgstr ""
779
 
780
- #: tmp/inc/styles.php:102
781
  msgid "Padding"
782
  msgstr ""
783
 
784
- #: tmp/inc/styles.php:105
785
  msgid "Padding around the entire %s."
786
  msgstr ""
787
 
788
- #: tmp/inc/styles.php:111
789
  msgid "Mobile Padding"
790
  msgstr ""
791
 
792
- #: tmp/inc/styles.php:114
793
  msgid "Padding when on mobile devices."
794
  msgstr ""
795
 
796
- #: tmp/inc/styles.php:122
797
  msgid "Background Color"
798
  msgstr ""
799
 
800
- #: tmp/inc/styles.php:125
801
  msgid "Background color of the %s."
802
  msgstr ""
803
 
804
- #: tmp/inc/styles.php:130
805
  msgid "Background Image"
806
  msgstr ""
807
 
808
- #: tmp/inc/styles.php:133
809
  msgid "Background image of the %s."
810
  msgstr ""
811
 
812
- #: tmp/inc/styles.php:138
813
  msgid "Background Image Display"
814
  msgstr ""
815
 
816
- #: tmp/inc/styles.php:142
817
  msgid "Tiled Image"
818
  msgstr ""
819
 
820
- #: tmp/inc/styles.php:143
821
  msgid "Cover"
822
  msgstr ""
823
 
824
- #: tmp/inc/styles.php:144
825
  msgid "Centered, with original size"
826
  msgstr ""
827
 
828
- #: tmp/inc/styles.php:145
829
  msgid "Fixed"
830
  msgstr ""
831
 
832
- #: tmp/inc/styles.php:146
833
  msgid "Parallax"
834
  msgstr ""
835
 
836
- #: tmp/inc/styles.php:147
837
  msgid "Parallax (Original Size)"
838
  msgstr ""
839
 
840
- #: tmp/inc/styles.php:149
841
  msgid "How the background image is displayed."
842
  msgstr ""
843
 
844
- #: tmp/inc/styles.php:154
845
  msgid "Border Color"
846
  msgstr ""
847
 
848
- #: tmp/inc/styles.php:157
849
  msgid "Border color of the %s."
850
  msgstr ""
851
 
852
- #: tmp/inc/styles.php:176
853
  msgid "Cell Class"
854
  msgstr ""
855
 
856
- #: tmp/inc/styles.php:179
857
  msgid "Class added to all cells in this row."
858
  msgstr ""
859
 
860
- #: tmp/inc/styles.php:186
861
  msgid "Bottom Margin"
862
  msgstr ""
863
 
864
- #: tmp/inc/styles.php:189
865
  msgid "Space below the row. Default is %spx."
866
  msgstr ""
867
 
868
- #: tmp/inc/styles.php:194
869
  msgid "Gutter"
870
  msgstr ""
871
 
872
- #: tmp/inc/styles.php:197
873
  msgid "Amount of space between cells. Default is %spx."
874
  msgstr ""
875
 
876
- #: tmp/inc/styles.php:202
877
  msgid "Row Layout"
878
  msgstr ""
879
 
880
- #: tmp/inc/styles.php:206, tmp/inc/styles.php:218
881
  msgid "Standard"
882
  msgstr ""
883
 
884
- #: tmp/inc/styles.php:207
885
  msgid "Full Width"
886
  msgstr ""
887
 
888
- #: tmp/inc/styles.php:208
889
  msgid "Full Width Stretched"
890
  msgstr ""
891
 
892
- #: tmp/inc/styles.php:214
893
  msgid "Collapse Behaviour"
894
  msgstr ""
895
 
896
- #: tmp/inc/styles.php:219
897
  msgid "No Collapse"
898
  msgstr ""
899
 
900
- #: tmp/inc/styles.php:225
901
  msgid "Collapse Order"
902
  msgstr ""
903
 
904
- #: tmp/inc/styles.php:229, tmp/inc/widgets/post-loop.php:295, tmp/widgets/widgets.php:635, tmp/widgets/widgets.php:757
905
  msgid "Default"
906
  msgstr ""
907
 
908
- #: tmp/inc/styles.php:230
909
  msgid "Left on Top"
910
  msgstr ""
911
 
912
- #: tmp/inc/styles.php:231
913
  msgid "Right on Top"
914
  msgstr ""
915
 
916
- #: tmp/inc/styles.php:237
917
  msgid "Cell Vertical Alignment"
918
  msgstr ""
919
 
920
- #: tmp/inc/styles.php:242, tmp/inc/styles.php:270, tmp/widgets/widgets/button/button.php:31
921
  msgid "Center"
922
  msgstr ""
923
 
924
- #: tmp/inc/styles.php:244, tmp/inc/styles.php:272
925
  msgid "Stretch"
926
  msgstr ""
927
 
928
- #: tmp/inc/styles.php:261
929
  msgid "Cell"
930
  msgstr ""
931
 
932
- #: tmp/inc/styles.php:264
933
  msgid "Vertical Alignment"
934
  msgstr ""
935
 
936
- #: tmp/inc/styles.php:268
937
  msgid "Use row setting"
938
  msgstr ""
939
 
940
- #: tmp/inc/styles.php:278, tmp/inc/styles.php:309
941
  msgid "Font Color"
942
  msgstr ""
943
 
944
- #: tmp/inc/styles.php:281
945
  msgid "Color of text inside this cell."
946
  msgstr ""
947
 
948
- #: tmp/inc/styles.php:286, tmp/inc/styles.php:317
949
  msgid "Links Color"
950
  msgstr ""
951
 
952
- #: tmp/inc/styles.php:289
953
  msgid "Color of links inside this cell."
954
  msgstr ""
955
 
956
- #: tmp/inc/styles.php:304, tmp/tpl/js-templates.php:69
957
  msgid "Widget"
958
  msgstr ""
959
 
960
- #: tmp/inc/styles.php:312
961
  msgid "Color of text inside this widget."
962
  msgstr ""
963
 
964
- #: tmp/inc/styles.php:320
965
  msgid "Color of links inside this widget."
966
  msgstr ""
967
 
@@ -1113,10 +1113,6 @@ msgstr ""
1113
  msgid "Additional query arguments. See 1{query_posts}."
1114
  msgstr ""
1115
 
1116
- #: tmp/learn/tpl/dialog.php:19
1117
- msgid "Please enter a valid email"
1118
- msgstr ""
1119
-
1120
  #: tmp/settings/tpl/help.php:6
1121
  msgid "Please read the 1{settings guide} of the Page Builder documentation for help."
1122
  msgstr ""
61
  msgid "WordPress Widgets"
62
  msgstr ""
63
 
64
+ #: tmp/inc/admin-widget-dialog.php:183, tmp/inc/settings.php:323
65
  msgid "Recommended Widgets"
66
  msgstr ""
67
 
85
  msgid "Addons"
86
  msgstr ""
87
 
88
+ #: tmp/inc/admin.php:136, tmp/inc/admin.php:487, tmp/inc/admin.php:996, tmp/inc/admin.php:1001, tmp/inc/settings.php:196, tmp/tpl/js-templates.php:203
89
  msgid "Page Builder"
90
  msgstr ""
91
 
92
+ #: tmp/inc/admin.php:272
93
  msgid "All Widgets"
94
  msgstr ""
95
 
96
+ #: tmp/inc/admin.php:298
97
  msgid "Missing Widget"
98
  msgstr ""
99
 
100
+ #: tmp/inc/admin.php:299
101
  msgid "Page Builder doesn't know about this widget."
102
  msgstr ""
103
 
104
+ #: tmp/inc/admin.php:303
105
  msgid "%d seconds"
106
  msgstr ""
107
 
108
+ #: tmp/inc/admin.php:305
109
  msgid "%d minutes"
110
  msgstr ""
111
 
112
+ #: tmp/inc/admin.php:307
113
  msgid "%d hours"
114
  msgstr ""
115
 
116
+ #: tmp/inc/admin.php:310
117
  msgid "%d second"
118
  msgstr ""
119
 
120
+ #: tmp/inc/admin.php:312
121
  msgid "%d minute"
122
  msgstr ""
123
 
124
+ #: tmp/inc/admin.php:314
125
  msgid "%d hour"
126
  msgstr ""
127
 
128
+ #: tmp/inc/admin.php:317
129
  msgid "%s before"
130
  msgstr ""
131
 
132
+ #: tmp/inc/admin.php:318
133
  msgid "Now"
134
  msgstr ""
135
 
136
+ #: tmp/inc/admin.php:322
137
  msgid "Current"
138
  msgstr ""
139
 
140
+ #: tmp/inc/admin.php:323
141
  msgid "Original"
142
  msgstr ""
143
 
144
+ #: tmp/inc/admin.php:324
145
  msgid "Version restored"
146
  msgstr ""
147
 
148
+ #: tmp/inc/admin.php:325
149
  msgid "Converted to editor"
150
  msgstr ""
151
 
152
+ #: tmp/inc/admin.php:329
153
  msgid "Widget deleted"
154
  msgstr ""
155
 
156
+ #: tmp/inc/admin.php:331
157
  msgid "Widget added"
158
  msgstr ""
159
 
160
+ #: tmp/inc/admin.php:333
161
  msgid "Widget edited"
162
  msgstr ""
163
 
164
+ #: tmp/inc/admin.php:335
165
  msgid "Widget duplicated"
166
  msgstr ""
167
 
168
+ #: tmp/inc/admin.php:337
169
  msgid "Widget moved"
170
  msgstr ""
171
 
172
+ #: tmp/inc/admin.php:341
173
  msgid "Row deleted"
174
  msgstr ""
175
 
176
+ #: tmp/inc/admin.php:343
177
  msgid "Row added"
178
  msgstr ""
179
 
180
+ #: tmp/inc/admin.php:345
181
  msgid "Row edited"
182
  msgstr ""
183
 
184
+ #: tmp/inc/admin.php:347
185
  msgid "Row moved"
186
  msgstr ""
187
 
188
+ #: tmp/inc/admin.php:349
189
  msgid "Row duplicated"
190
  msgstr ""
191
 
192
+ #: tmp/inc/admin.php:351
193
  msgid "Row pasted"
194
  msgstr ""
195
 
196
+ #: tmp/inc/admin.php:354
197
  msgid "Cell resized"
198
  msgstr ""
199
 
200
+ #: tmp/inc/admin.php:357
201
  msgid "Prebuilt layout loaded"
202
  msgstr ""
203
 
204
+ #: tmp/inc/admin.php:361
205
  msgid "Loading prebuilt layout"
206
  msgstr ""
207
 
208
+ #: tmp/inc/admin.php:362
209
  msgid "Would you like to copy this editor's existing content to Page Builder?"
210
  msgstr ""
211
 
212
+ #: tmp/inc/admin.php:363
213
  msgid "Would you like to clear your Page Builder content and revert to using the standard visual editor?"
214
  msgstr ""
215
 
216
+ #: tmp/inc/admin.php:365
217
  msgid "Layout Builder Widget"
218
  msgstr ""
219
 
220
+ #: tmp/inc/admin.php:367, tmp/tpl/js-templates.php:107, tmp/tpl/js-templates.php:426
221
  msgid "Are you sure?"
222
  msgstr ""
223
 
224
+ #: tmp/inc/admin.php:369
225
  msgid "%s is ready to insert."
226
  msgstr ""
227
 
228
+ #: tmp/inc/admin.php:373
229
  msgid "Add Widget Below"
230
  msgstr ""
231
 
232
+ #: tmp/inc/admin.php:374
233
  msgid "Add Widget to Cell"
234
  msgstr ""
235
 
236
+ #: tmp/inc/admin.php:375, tmp/tpl/js-templates.php:230
237
  msgid "Search Widgets"
238
  msgstr ""
239
 
240
+ #: tmp/inc/admin.php:377, tmp/tpl/js-templates.php:17, tmp/tpl/js-templates.php:19
241
  msgid "Add Row"
242
  msgstr ""
243
 
244
+ #: tmp/inc/admin.php:378
245
  msgid "Column"
246
  msgstr ""
247
 
248
+ #: tmp/inc/admin.php:380
249
  msgid "Cell Actions"
250
  msgstr ""
251
 
252
+ #: tmp/inc/admin.php:381
253
  msgid "Paste Widget"
254
  msgstr ""
255
 
256
+ #: tmp/inc/admin.php:383
257
  msgid "Widget Actions"
258
  msgstr ""
259
 
260
+ #: tmp/inc/admin.php:384
261
  msgid "Edit Widget"
262
  msgstr ""
263
 
264
+ #: tmp/inc/admin.php:385
265
  msgid "Duplicate Widget"
266
  msgstr ""
267
 
268
+ #: tmp/inc/admin.php:386
269
  msgid "Delete Widget"
270
  msgstr ""
271
 
272
+ #: tmp/inc/admin.php:387
273
  msgid "Copy Widget"
274
  msgstr ""
275
 
276
+ #: tmp/inc/admin.php:388
277
  msgid "Paste Widget Below"
278
  msgstr ""
279
 
280
+ #: tmp/inc/admin.php:390
281
  msgid "Row Actions"
282
  msgstr ""
283
 
284
+ #: tmp/inc/admin.php:391, tmp/tpl/js-templates.php:105
285
  msgid "Edit Row"
286
  msgstr ""
287
 
288
+ #: tmp/inc/admin.php:392, tmp/tpl/js-templates.php:106
289
  msgid "Duplicate Row"
290
  msgstr ""
291
 
292
+ #: tmp/inc/admin.php:393, tmp/tpl/js-templates.php:107
293
  msgid "Delete Row"
294
  msgstr ""
295
 
296
+ #: tmp/inc/admin.php:394
297
  msgid "Copy Row"
298
  msgstr ""
299
 
300
+ #: tmp/inc/admin.php:395
301
  msgid "Paste Row"
302
  msgstr ""
303
 
304
+ #: tmp/inc/admin.php:397
305
  msgid "Draft"
306
  msgstr ""
307
 
308
+ #: tmp/inc/admin.php:398
309
  msgid "Untitled"
310
  msgstr ""
311
 
312
+ #: tmp/inc/admin.php:400
313
  msgid "New Row"
314
  msgstr ""
315
 
316
+ #: tmp/inc/admin.php:401, tmp/inc/styles.php:183, tmp/tpl/js-templates.php:70
317
  msgid "Row"
318
  msgstr ""
319
 
320
+ #: tmp/inc/admin.php:409
321
  msgid "Page Builder layouts"
322
  msgstr ""
323
 
324
+ #: tmp/inc/admin.php:410
325
  msgid "Error uploading or importing file."
326
  msgstr ""
327
 
328
+ #: tmp/inc/admin.php:568, tmp/inc/home.php:26
329
  msgid "Home Page"
330
  msgstr ""
331
 
332
+ #: tmp/inc/admin.php:662
333
  msgid "Untitled Widget"
334
  msgstr ""
335
 
336
+ #: tmp/inc/admin.php:827
337
  msgid "You need to install 1{%1$s} to use the widget 2{%2$s}."
338
  msgstr ""
339
 
340
+ #: tmp/inc/admin.php:833
341
  msgid "Save and reload this page to start using the widget after you've installed it."
342
  msgstr ""
343
 
344
+ #: tmp/inc/admin.php:849
345
  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."
346
  msgstr ""
347
 
348
+ #: tmp/inc/admin.php:1013
349
  msgid "%s Widgets"
350
  msgstr ""
351
 
352
+ #: tmp/inc/admin.php:1059
353
  msgid "12 Page Builder Tips"
354
  msgstr ""
355
 
356
+ #: tmp/inc/admin.php:1062
357
  msgid "Sign up to our newsletter and we'll send you this free Page Builder video course."
358
  msgstr ""
359
 
360
+ #: tmp/inc/admin.php:1063
361
  msgid "12 tips that'll help you get the most out of Page Builder."
362
  msgstr ""
363
 
364
+ #: tmp/inc/admin.php:1064
365
  msgid "Watch the video to find out more, then sign up below to get started."
366
  msgstr ""
367
 
368
+ #: tmp/inc/admin.php:1065, tmp/inc/admin.php:1075
369
  msgid "We'll email you a confirmation. You can unsubscribe at any time."
370
  msgstr ""
371
 
372
+ #: tmp/inc/admin.php:1069
373
  msgid "Free Page Builder Addons"
374
  msgstr ""
375
 
376
+ #: tmp/inc/admin.php:1072
377
  msgid "The free animations addon allows you to add beautiful animations to Page Builder elements."
378
  msgstr ""
379
 
380
+ #: tmp/inc/admin.php:1073
381
  msgid "Sign up to our newsletter and we'll send you the addon as a free gift."
382
  msgstr ""
383
 
384
+ #: tmp/inc/admin.php:1074
385
  msgid "Plus, we'll send you even more powerful addons, for as long as you're subscribed."
386
  msgstr ""
387
 
388
+ #: tmp/inc/admin.php:1090
389
  msgid "Watch Intro Video"
390
  msgstr ""
391
 
392
+ #: tmp/inc/admin.php:1091
393
  msgid "Loaded from Vimeo Servers"
394
  msgstr ""
395
 
396
+ #: tmp/inc/admin.php:1092
397
  msgid "Please enter a valid email address."
398
  msgstr ""
399
 
400
+ #: tmp/inc/admin.php:1094
401
  msgid "Your Name"
402
  msgstr ""
403
 
404
+ #: tmp/inc/admin.php:1095
405
  msgid "Your Email"
406
  msgstr ""
407
 
408
+ #: tmp/inc/admin.php:1096
409
  msgid "Sign Up"
410
  msgstr ""
411
 
412
+ #: tmp/inc/admin.php:1097, tmp/tpl/js-templates.php:242
413
  msgid "Close"
414
  msgstr ""
415
 
465
  msgid "Custom Home Page Builder"
466
  msgstr ""
467
 
468
+ #: tmp/inc/revisions.php:59
469
  msgid "Page Builder Content"
470
  msgstr ""
471
 
472
+ #: tmp/inc/settings.php:196, tmp/settings/tpl/settings.php:9
473
  msgid "SiteOrigin Page Builder"
474
  msgstr ""
475
 
476
+ #: tmp/inc/settings.php:223
477
  msgid "Page Builder Settings"
478
  msgstr ""
479
 
480
+ #: tmp/inc/settings.php:239
481
  msgid "General"
482
  msgstr ""
483
 
484
+ #: tmp/inc/settings.php:245
485
  msgid "Post Types"
486
  msgstr ""
487
 
488
+ #: tmp/inc/settings.php:247
489
  msgid "The post types to use Page Builder on."
490
  msgstr ""
491
 
492
+ #: tmp/inc/settings.php:252
493
  msgid "Live Editor Quick Link"
494
  msgstr ""
495
 
496
+ #: tmp/inc/settings.php:253
497
  msgid "Display a Live Editor button in the admin bar."
498
  msgstr ""
499
 
500
+ #: tmp/inc/settings.php:258
501
  msgid "Display Widget Count"
502
  msgstr ""
503
 
504
+ #: tmp/inc/settings.php:259
505
  msgid "Display a widget count in the admin lists of posts/pages where you're using Page Builder."
506
  msgstr ""
507
 
508
+ #: tmp/inc/settings.php:264
509
  msgid "Limit Parallax Motion"
510
  msgstr ""
511
 
512
+ #: tmp/inc/settings.php:265
513
  msgid "How many pixels of scrolling result in a single pixel of parallax motion. 0 means automatic. Lower values give more noticeable effect."
514
  msgstr ""
515
 
516
+ #: tmp/inc/settings.php:270
517
  msgid "Sidebars Emulator"
518
  msgstr ""
519
 
520
+ #: tmp/inc/settings.php:271
521
  msgid "Page Builder will create an emulated sidebar, that contains all widgets in the page."
522
  msgstr ""
523
 
524
+ #: tmp/inc/settings.php:276
525
  msgid "Upgrade Teaser"
526
  msgstr ""
527
 
528
+ #: tmp/inc/settings.php:278
529
  msgid "Display the %sSiteOrigin Premium%s upgrade teaser in the Page Builder toolbar."
530
  msgstr ""
531
 
532
+ #: tmp/inc/settings.php:286
533
  msgid "Page Builder Learning"
534
  msgstr ""
535
 
536
+ #: tmp/inc/settings.php:287
537
  msgid "Display buttons for Page Builder learning."
538
  msgstr ""
539
 
540
+ #: tmp/inc/settings.php:292
541
  msgid "Default To Page Builder Interface"
542
  msgstr ""
543
 
544
+ #: tmp/inc/settings.php:293
545
  msgid "New posts/pages that you create will start with the Page Builder loaded."
546
  msgstr ""
547
 
548
+ #: tmp/inc/settings.php:299
549
  msgid "Widgets"
550
  msgstr ""
551
 
552
+ #: tmp/inc/settings.php:305
553
  msgid "Widget Title HTML"
554
  msgstr ""
555
 
556
+ #: tmp/inc/settings.php:306
557
  msgid "The HTML used for widget titles. {{title}} is replaced with the widget title."
558
  msgstr ""
559
 
560
+ #: tmp/inc/settings.php:311
561
  msgid "Add Widget Class"
562
  msgstr ""
563
 
564
+ #: tmp/inc/settings.php:312
565
  msgid "Add the widget class to Page Builder widgets. Disable this if you're experiencing conflicts."
566
  msgstr ""
567
 
568
+ #: tmp/inc/settings.php:317
569
  msgid "Legacy Bundled Widgets"
570
  msgstr ""
571
 
572
+ #: tmp/inc/settings.php:318
573
  msgid "Load legacy widgets from Page Builder 1."
574
  msgstr ""
575
 
576
+ #: tmp/inc/settings.php:324
577
  msgid "Display recommend widgets in Page Builder add widget dialog."
578
  msgstr ""
579
 
580
+ #: tmp/inc/settings.php:330, tmp/inc/styles-admin.php:78
581
  msgid "Layout"
582
  msgstr ""
583
 
584
+ #: tmp/inc/settings.php:338
585
  msgid "Responsive Layout"
586
  msgstr ""
587
 
588
+ #: tmp/inc/settings.php:339
589
  msgid "Collapse widgets, rows and columns on mobile devices."
590
  msgstr ""
591
 
592
+ #: tmp/inc/settings.php:344
593
  msgid "Use Tablet Layout"
594
  msgstr ""
595
 
596
+ #: tmp/inc/settings.php:345
597
  msgid "Collapses columns differently on tablet devices."
598
  msgstr ""
599
 
600
+ #: tmp/inc/settings.php:351
601
  msgid "Detect older browsers"
602
  msgstr ""
603
 
604
+ #: tmp/inc/settings.php:352
605
  msgid "Never"
606
  msgstr ""
607
 
608
+ #: tmp/inc/settings.php:353
609
  msgid "Always"
610
  msgstr ""
611
 
612
+ #: tmp/inc/settings.php:355
613
  msgid "Use Legacy Layout Engine"
614
  msgstr ""
615
 
616
+ #: tmp/inc/settings.php:356
617
  msgid "The CSS and HTML uses floats instead of flexbox for compatibility with very old browsers."
618
  msgstr ""
619
 
620
+ #: tmp/inc/settings.php:362
621
  msgid "Tablet Width"
622
  msgstr ""
623
 
624
+ #: tmp/inc/settings.php:363
625
  msgid "Device width, in pixels, to collapse into a tablet view ."
626
  msgstr ""
627
 
628
+ #: tmp/inc/settings.php:369
629
  msgid "Mobile Width"
630
  msgstr ""
631
 
632
+ #: tmp/inc/settings.php:370
633
  msgid "Device width, in pixels, to collapse into a mobile view ."
634
  msgstr ""
635
 
636
+ #: tmp/inc/settings.php:376
637
  msgid "Row/Widget Bottom Margin"
638
  msgstr ""
639
 
640
+ #: tmp/inc/settings.php:377
641
  msgid "Default margin below rows and widgets."
642
  msgstr ""
643
 
644
+ #: tmp/inc/settings.php:382
645
  msgid "Last Row With Margin"
646
  msgstr ""
647
 
648
+ #: tmp/inc/settings.php:383
649
  msgid "Allow margin in last row."
650
  msgstr ""
651
 
652
+ #: tmp/inc/settings.php:389
653
  msgid "Row Gutter"
654
  msgstr ""
655
 
656
+ #: tmp/inc/settings.php:390
657
  msgid "Default spacing between columns in each row."
658
  msgstr ""
659
 
660
+ #: tmp/inc/settings.php:396
661
  msgid "Full Width Container"
662
  msgstr ""
663
 
664
+ #: tmp/inc/settings.php:397
665
  msgid "The container used for the full width layout."
666
  msgstr ""
667
 
668
+ #: tmp/inc/settings.php:404
669
  msgid "Content"
670
  msgstr ""
671
 
672
+ #: tmp/inc/settings.php:410
673
  msgid "Copy Content"
674
  msgstr ""
675
 
676
+ #: tmp/inc/settings.php:411
677
  msgid "Copy content from Page Builder to post content."
678
  msgstr ""
679
 
680
+ #: tmp/inc/settings.php:416
681
  msgid "Copy Styles"
682
  msgstr ""
683
 
684
+ #: tmp/inc/settings.php:417
685
  msgid "Include styles into your Post Content. This keeps page layouts, even when Page Builder is deactivated."
686
  msgstr ""
687
 
688
+ #: tmp/inc/settings.php:422
689
  msgid "Content Cache"
690
  msgstr ""
691
 
692
+ #: tmp/inc/settings.php:423
693
  msgid "Cache CSS and HTML generated by Page Builder."
694
  msgstr ""
695
 
696
+ #: tmp/inc/settings.php:470, tmp/inc/styles-admin.php:248
697
  msgid "Enabled"
698
  msgstr ""
699
 
721
  msgid "Theme"
722
  msgstr ""
723
 
724
+ #: tmp/inc/styles-admin.php:174, tmp/inc/styles.php:251, tmp/inc/styles.php:279
725
  msgid "Top"
726
  msgstr ""
727
 
729
  msgid "Right"
730
  msgstr ""
731
 
732
+ #: tmp/inc/styles-admin.php:182, tmp/inc/styles.php:253, tmp/inc/styles.php:281
733
  msgid "Bottom"
734
  msgstr ""
735
 
745
  msgid "Remove"
746
  msgstr ""
747
 
748
+ #: tmp/inc/styles.php:78
749
  msgid "%s ID"
750
  msgstr ""
751
 
752
+ #: tmp/inc/styles.php:81
753
  msgid "A custom ID used for this %s."
754
  msgstr ""
755
 
756
+ #: tmp/inc/styles.php:86
757
  msgid "%s Class"
758
  msgstr ""
759
 
760
+ #: tmp/inc/styles.php:89
761
  msgid "A CSS class"
762
  msgstr ""
763
 
764
+ #: tmp/inc/styles.php:94
765
  msgid "CSS Styles"
766
  msgstr ""
767
 
768
+ #: tmp/inc/styles.php:97
769
  msgid "One style attribute per line."
770
  msgstr ""
771
 
772
+ #: tmp/inc/styles.php:102
773
  msgid "Mobile CSS Styles"
774
  msgstr ""
775
 
776
+ #: tmp/inc/styles.php:105
777
  msgid "CSS applied when in mobile view."
778
  msgstr ""
779
 
780
+ #: tmp/inc/styles.php:112
781
  msgid "Padding"
782
  msgstr ""
783
 
784
+ #: tmp/inc/styles.php:115
785
  msgid "Padding around the entire %s."
786
  msgstr ""
787
 
788
+ #: tmp/inc/styles.php:121
789
  msgid "Mobile Padding"
790
  msgstr ""
791
 
792
+ #: tmp/inc/styles.php:124
793
  msgid "Padding when on mobile devices."
794
  msgstr ""
795
 
796
+ #: tmp/inc/styles.php:132
797
  msgid "Background Color"
798
  msgstr ""
799
 
800
+ #: tmp/inc/styles.php:135
801
  msgid "Background color of the %s."
802
  msgstr ""
803
 
804
+ #: tmp/inc/styles.php:140
805
  msgid "Background Image"
806
  msgstr ""
807
 
808
+ #: tmp/inc/styles.php:143
809
  msgid "Background image of the %s."
810
  msgstr ""
811
 
812
+ #: tmp/inc/styles.php:148
813
  msgid "Background Image Display"
814
  msgstr ""
815
 
816
+ #: tmp/inc/styles.php:152
817
  msgid "Tiled Image"
818
  msgstr ""
819
 
820
+ #: tmp/inc/styles.php:153
821
  msgid "Cover"
822
  msgstr ""
823
 
824
+ #: tmp/inc/styles.php:154
825
  msgid "Centered, with original size"
826
  msgstr ""
827
 
828
+ #: tmp/inc/styles.php:155
829
  msgid "Fixed"
830
  msgstr ""
831
 
832
+ #: tmp/inc/styles.php:156
833
  msgid "Parallax"
834
  msgstr ""
835
 
836
+ #: tmp/inc/styles.php:157
837
  msgid "Parallax (Original Size)"
838
  msgstr ""
839
 
840
+ #: tmp/inc/styles.php:159
841
  msgid "How the background image is displayed."
842
  msgstr ""
843
 
844
+ #: tmp/inc/styles.php:164
845
  msgid "Border Color"
846
  msgstr ""
847
 
848
+ #: tmp/inc/styles.php:167
849
  msgid "Border color of the %s."
850
  msgstr ""
851
 
852
+ #: tmp/inc/styles.php:186
853
  msgid "Cell Class"
854
  msgstr ""
855
 
856
+ #: tmp/inc/styles.php:189
857
  msgid "Class added to all cells in this row."
858
  msgstr ""
859
 
860
+ #: tmp/inc/styles.php:196
861
  msgid "Bottom Margin"
862
  msgstr ""
863
 
864
+ #: tmp/inc/styles.php:199
865
  msgid "Space below the row. Default is %spx."
866
  msgstr ""
867
 
868
+ #: tmp/inc/styles.php:204
869
  msgid "Gutter"
870
  msgstr ""
871
 
872
+ #: tmp/inc/styles.php:207
873
  msgid "Amount of space between cells. Default is %spx."
874
  msgstr ""
875
 
876
+ #: tmp/inc/styles.php:212
877
  msgid "Row Layout"
878
  msgstr ""
879
 
880
+ #: tmp/inc/styles.php:216, tmp/inc/styles.php:228
881
  msgid "Standard"
882
  msgstr ""
883
 
884
+ #: tmp/inc/styles.php:217
885
  msgid "Full Width"
886
  msgstr ""
887
 
888
+ #: tmp/inc/styles.php:218
889
  msgid "Full Width Stretched"
890
  msgstr ""
891
 
892
+ #: tmp/inc/styles.php:224
893
  msgid "Collapse Behaviour"
894
  msgstr ""
895
 
896
+ #: tmp/inc/styles.php:229
897
  msgid "No Collapse"
898
  msgstr ""
899
 
900
+ #: tmp/inc/styles.php:235
901
  msgid "Collapse Order"
902
  msgstr ""
903
 
904
+ #: tmp/inc/styles.php:239, tmp/inc/widgets/post-loop.php:295, tmp/widgets/widgets.php:635, tmp/widgets/widgets.php:757
905
  msgid "Default"
906
  msgstr ""
907
 
908
+ #: tmp/inc/styles.php:240
909
  msgid "Left on Top"
910
  msgstr ""
911
 
912
+ #: tmp/inc/styles.php:241
913
  msgid "Right on Top"
914
  msgstr ""
915
 
916
+ #: tmp/inc/styles.php:247
917
  msgid "Cell Vertical Alignment"
918
  msgstr ""
919
 
920
+ #: tmp/inc/styles.php:252, tmp/inc/styles.php:280, tmp/widgets/widgets/button/button.php:31
921
  msgid "Center"
922
  msgstr ""
923
 
924
+ #: tmp/inc/styles.php:254, tmp/inc/styles.php:282
925
  msgid "Stretch"
926
  msgstr ""
927
 
928
+ #: tmp/inc/styles.php:271
929
  msgid "Cell"
930
  msgstr ""
931
 
932
+ #: tmp/inc/styles.php:274
933
  msgid "Vertical Alignment"
934
  msgstr ""
935
 
936
+ #: tmp/inc/styles.php:278
937
  msgid "Use row setting"
938
  msgstr ""
939
 
940
+ #: tmp/inc/styles.php:288, tmp/inc/styles.php:319
941
  msgid "Font Color"
942
  msgstr ""
943
 
944
+ #: tmp/inc/styles.php:291
945
  msgid "Color of text inside this cell."
946
  msgstr ""
947
 
948
+ #: tmp/inc/styles.php:296, tmp/inc/styles.php:327
949
  msgid "Links Color"
950
  msgstr ""
951
 
952
+ #: tmp/inc/styles.php:299
953
  msgid "Color of links inside this cell."
954
  msgstr ""
955
 
956
+ #: tmp/inc/styles.php:314, tmp/tpl/js-templates.php:69
957
  msgid "Widget"
958
  msgstr ""
959
 
960
+ #: tmp/inc/styles.php:322
961
  msgid "Color of text inside this widget."
962
  msgstr ""
963
 
964
+ #: tmp/inc/styles.php:330
965
  msgid "Color of links inside this widget."
966
  msgstr ""
967
 
1113
  msgid "Additional query arguments. See 1{query_posts}."
1114
  msgstr ""
1115
 
 
 
 
 
1116
  #: tmp/settings/tpl/help.php:6
1117
  msgid "Please read the 1{settings guide} of the Page Builder documentation for help."
1118
  msgstr ""
learn/css/learn.css CHANGED
@@ -29,53 +29,57 @@
29
  display: block; }
30
  #siteorigin-learn #siteorigin-learn-dialog .poster-wrapper .play-button {
31
  position: absolute;
32
- bottom: 0;
33
- left: 0;
34
- width: 640px;
35
- height: 38px;
 
 
36
  transition: opacity 0.35s;
37
- opacity: 0.90; }
38
  #siteorigin-learn #siteorigin-learn-dialog .poster-wrapper:hover .play-button {
39
  opacity: 1; }
40
  #siteorigin-learn #siteorigin-learn-dialog .video-iframe, #siteorigin-learn #siteorigin-learn-dialog .video-iframe iframe {
41
  width: 640px;
42
  height: 360px;
43
  display: block; }
 
 
 
 
 
 
44
  #siteorigin-learn #siteorigin-learn-dialog .learn-description {
45
  color: #666;
46
  font-weight: 300;
47
- margin: 25px auto;
 
48
  text-align: center; }
49
  #siteorigin-learn #siteorigin-learn-dialog .signup-form {
50
  display: flex;
51
  align-items: flex-end;
52
- padding: 15px 20px;
53
  background-color: #f8f8f8;
54
  border: 1px solid #e0e0e0;
55
  margin-top: 25px; }
56
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-field {
57
- flex: 2.5;
58
  margin-right: 20px; }
59
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-field label {
60
- color: #777;
61
  display: block;
62
  margin-bottom: 8px;
63
  text-align: center;
64
- font-size: 0.85em;
65
  font-weight: 500; }
66
- @media (max-height: 900px) {
67
- #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-field label {
68
- display: none; } }
69
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-field input {
70
  padding: 6px 8px;
71
  font-weight: 500;
72
  color: #555; }
73
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-submit {
74
- flex: 1.5; }
75
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-submit input {
76
- margin-bottom: 1px;
77
- padding: 3px 8px;
78
- height: auto; }
79
  #siteorigin-learn #siteorigin-learn-dialog .signup-form input {
80
  width: 100%;
81
  display: block; }
29
  display: block; }
30
  #siteorigin-learn #siteorigin-learn-dialog .poster-wrapper .play-button {
31
  position: absolute;
32
+ top: 50%;
33
+ left: 50%;
34
+ width: 80px;
35
+ height: 80px;
36
+ margin-top: -40px;
37
+ margin-left: -40px;
38
  transition: opacity 0.35s;
39
+ opacity: 0; }
40
  #siteorigin-learn #siteorigin-learn-dialog .poster-wrapper:hover .play-button {
41
  opacity: 1; }
42
  #siteorigin-learn #siteorigin-learn-dialog .video-iframe, #siteorigin-learn #siteorigin-learn-dialog .video-iframe iframe {
43
  width: 640px;
44
  height: 360px;
45
  display: block; }
46
+ #siteorigin-learn #siteorigin-learn-dialog .learn-title {
47
+ text-align: center;
48
+ font-size: 1.5em;
49
+ color: #474747;
50
+ font-weight: normal;
51
+ margin: 25px 0 20px 0; }
52
  #siteorigin-learn #siteorigin-learn-dialog .learn-description {
53
  color: #666;
54
  font-weight: 300;
55
+ margin: 20px auto;
56
+ width: 80%;
57
  text-align: center; }
58
  #siteorigin-learn #siteorigin-learn-dialog .signup-form {
59
  display: flex;
60
  align-items: flex-end;
61
+ padding: 20px;
62
  background-color: #f8f8f8;
63
  border: 1px solid #e0e0e0;
64
  margin-top: 25px; }
65
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-field {
66
+ flex: 2;
67
  margin-right: 20px; }
68
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-field label {
69
+ color: #666;
70
  display: block;
71
  margin-bottom: 8px;
72
  text-align: center;
73
+ font-size: 0.9em;
74
  font-weight: 500; }
 
 
 
75
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-field input {
76
  padding: 6px 8px;
77
  font-weight: 500;
78
  color: #555; }
79
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-submit {
80
+ flex: 1; }
81
  #siteorigin-learn #siteorigin-learn-dialog .signup-form .form-submit input {
82
+ margin-bottom: 3px; }
 
 
83
  #siteorigin-learn #siteorigin-learn-dialog .signup-form input {
84
  width: 100%;
85
  display: block; }
learn/css/learn.scss CHANGED
@@ -17,7 +17,7 @@
17
  top: 50%;
18
  left: 50%;
19
 
20
- padding: 30px;
21
  max-width: 640px + 60px;
22
  margin-left: -( 640px + 60px ) / 2;
23
 
@@ -26,6 +26,15 @@
26
 
27
  background-color: #fff;
28
 
 
 
 
 
 
 
 
 
 
29
  .poster-wrapper {
30
  cursor: pointer;
31
  display: block;
@@ -42,15 +51,42 @@
42
  bottom: 0;
43
  left: 0;
44
  width: 640px;
45
- height: 38px;
 
 
 
 
 
 
 
 
 
46
 
47
- transition: opacity 0.35s;
 
 
 
 
48
 
49
- opacity: 0.90;
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
 
52
- &:hover .play-button {
53
- opacity: 1;
 
 
54
  }
55
  }
56
 
@@ -88,12 +124,12 @@
88
  text-align: center;
89
  font-size: 0.85em;
90
  font-weight: 500;
91
-
92
  @media (max-height: 900px) {
93
  display: none;
94
  }
95
  }
96
-
97
  input {
98
  padding: 6px 8px;
99
  font-weight: 500;
@@ -128,13 +164,15 @@
128
  }
129
 
130
  .learn-close {
131
- margin: 20px auto 0 auto;
132
- text-align: center;
133
- display: block;
134
  cursor: pointer;
135
  font-weight: bold;
136
  font-size: 0.9em;
 
137
  color: #666;
 
 
 
138
  }
139
  }
140
 
17
  top: 50%;
18
  left: 50%;
19
 
20
+ padding: 20px 30px;
21
  max-width: 640px + 60px;
22
  margin-left: -( 640px + 60px ) / 2;
23
 
26
 
27
  background-color: #fff;
28
 
29
+ .video-title {
30
+ font-weight: 300;
31
+ text-align: center;
32
+ line-height: 1.2em;
33
+ font-size: 22px;
34
+ color: #555;
35
+ margin: 0 0 20px 0;
36
+ }
37
+
38
  .poster-wrapper {
39
  cursor: pointer;
40
  display: block;
51
  bottom: 0;
52
  left: 0;
53
  width: 640px;
54
+ height: 58px;
55
+ }
56
+
57
+ .video-play-info {
58
+ position: absolute;
59
+ top: 0;
60
+ bottom: 0;
61
+ left: 0;
62
+ right: 0;
63
+ background: rgba( 0,0,0,0.75 );
64
 
65
+ display: flex;
66
+ justify-content: center;
67
+ align-items: center;
68
+ opacity: 0;
69
+ transition: 0.25s;
70
 
71
+ .video-play-info-text {
72
+ text-align: center;
73
+ font-size: 1.8em;
74
+ color: rgba( 255,255,255,0.95 );
75
+
76
+ small {
77
+ display: block;
78
+ margin-top: 0.8em;
79
+ font-size: 0.65em;
80
+ font-weight: 200;
81
+ }
82
+
83
+ }
84
  }
85
 
86
+ &:hover {
87
+ .video-play-info {
88
+ opacity: 1;
89
+ }
90
  }
91
  }
92
 
124
  text-align: center;
125
  font-size: 0.85em;
126
  font-weight: 500;
127
+
128
  @media (max-height: 900px) {
129
  display: none;
130
  }
131
  }
132
+
133
  input {
134
  padding: 6px 8px;
135
  font-weight: 500;
164
  }
165
 
166
  .learn-close {
167
+ display: inline-block;
 
 
168
  cursor: pointer;
169
  font-weight: bold;
170
  font-size: 0.9em;
171
+ padding: 4px;
172
  color: #666;
173
+ position: absolute;
174
+ top: 4px;
175
+ right: 8px;
176
  }
177
  }
178
 
learn/img/play.svg CHANGED
@@ -1,9 +1,27 @@
1
- <svg width="640px" height="38px" viewBox="0 682 640 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 
 
2
  <desc>Created with Sketch.</desc>
3
- <defs></defs>
4
- <g id="Player" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(0.000000, 682.000000)">
5
- <rect id="progress" fill-opacity="0.658599411" fill="#6E6E6E" x="0" y="0" width="640" height="37.9424018"></rect>
6
- <rect id="button-wrapper" fill="#3B3B3B" x="0" y="0" width="50" height="38"></rect>
7
- <path d="M19.7849533,11.1423787 C19.3514356,10.8439879 19,11.0303603 19,11.5542487 L19,26.4636798 C19,26.9895403 19.3523673,27.1732993 19.7849533,26.87555 L30.2707614,19.658156 C30.7916651,19.2996173 30.7917378,18.7183613 30.2707614,18.3597726 L19.7849533,11.1423787 Z" id="button" fill="#FFFFFF"></path>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  </g>
9
- </svg>
1
+
2
+ <svg width="640px" height="58px" viewBox="-190 -3 640 58" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
4
  <desc>Created with Sketch.</desc>
5
+ <defs>
6
+ <rect id="path-1" x="10.880651" y="11" width="419.399638" height="10"></rect>
7
+ <mask id="mask-2" maskContentUnits="userSpaceOnUse" maskUnits="objectBoundingBox" x="-1" y="-1" width="421.399638" height="12">
8
+ <rect x="9.88065099" y="10" width="421.399638" height="12" fill="white"></rect>
9
+ <use xlink:href="#path-1" fill="black"></use>
10
+ </mask>
11
+ </defs>
12
+ <g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-190.000000, -3.000000)">
13
+ <g id="player" transform="translate(83.000000, 17.000000)">
14
+ <rect id="Rectangle-1" fill-opacity="0.75" fill="#172322" x="0" y="0" width="547" height="32" rx="3"></rect>
15
+ <use id="play-bar" stroke="#898F8F" mask="url(#mask-2)" stroke-width="2" stroke-linejoin="round" xlink:href="#path-1"></use>
16
+ </g>
17
+ <g id="play" transform="translate(10.000000, 9.000000)">
18
+ <rect id="Rectangle-1-copy" fill-opacity="0.75" fill="#172322" x="0" y="0" width="65" height="40" rx="4"></rect>
19
+ <polygon id="Triangle-1" fill="#FFFFFF" points="23 30 23 10 42 20"></polygon>
20
+ </g>
21
+ <g id="Group" transform="translate(532.000000, 27.000000)">
22
+ <path d="M44.618,0 L48.392,0 L47.474,4.301 L51.537,4.301 L52.489,0 L56.263,0 L53.645,12.172 L49.871,12.172 L50.925,7.225 L46.845,7.225 L45.808,12.172 L42,12.172 L44.618,0 Z M56.161,12.172 L58.711,0 L63.709,0 C63.913,0 65.63,0 66.718,0.68 C68.129,1.564 68.809,3.179 68.809,5.1 C68.809,7.752 67.5,10.387 65.545,11.458 C64.712,11.917 63.335,12.172 62.57,12.172 L56.161,12.172 Z M61.924,2.686 L60.513,9.486 L62.06,9.486 C62.808,9.486 63.216,9.231 63.471,9.044 C64.253,8.466 65.12,6.681 65.12,4.709 C65.12,2.686 63.709,2.686 63.114,2.686 L61.924,2.686 Z" id="HD" fill="#00ADEF"></path>
23
+ <path d="M84.0537308,8.5301333 C83.9859522,8.46235468 83.9857058,8.34528252 84.0537308,8.27725743 L85.2804006,7.05058766 C85.3479328,6.98305551 85.4647585,6.98305551 85.5327835,7.0510806 L87.6245549,9.14285201 L88.9015041,7.86590283 C88.9692827,7.79812421 89.0368149,7.82277098 89.0488918,7.91766105 L89.0384711,11.9001417 C89.0414295,11.9229806 89.0397432,11.9442143 89.0341554,11.963127 C89.0164672,12.022996 88.9596841,12.0596055 88.8873864,12.0502405 L84.9210507,12.0459951 C84.8256677,12.0344111 84.8010209,11.966386 84.8685531,11.8988539 L86.1455023,10.6219047 L84.0537308,8.5301333 Z M85.5301333,4.99796538 C85.4623547,5.065744 85.3452825,5.06599047 85.2772574,4.99796538 L84.0505877,3.77129562 C83.9830555,3.70376347 83.9830555,3.58693777 84.0510806,3.51891269 L86.142852,1.42714128 L84.8659028,0.150192101 C84.7981242,0.0824134821 84.822771,0.014881331 84.917661,0.00280441347 L88.9001417,0.0132251352 C88.9229806,0.0102667359 88.9442143,0.0119530754 88.963127,0.017540798 C89.022996,0.0352290575 89.0596055,0.0920121467 89.0502405,0.164309838 L89.0459951,4.13064553 C89.0344111,4.22602853 88.966386,4.2506753 88.8988539,4.18314315 L87.6219047,2.90619397 L85.5301333,4.99796538 Z M80.5215629,7.05373084 C80.5893416,6.98595223 80.7064137,6.98570576 80.7744388,7.05373084 L82.0011086,8.28040061 C82.0686407,8.34793276 82.0686407,8.46475845 82.0006156,8.53278354 L79.9088442,10.6245549 L81.1857934,11.9015041 C81.253572,11.9692827 81.2289252,12.0368149 81.1340352,12.0488918 L77.1515545,12.0384711 C77.1287157,12.0414295 77.1074819,12.0397432 77.0885693,12.0341554 C77.0287002,12.0164672 76.9920907,11.9596841 77.0014557,11.8873864 L77.0057011,7.9210507 C77.0172851,7.8256677 77.0853102,7.80102093 77.1528423,7.86855308 L78.4297915,9.14550225 L80.5215629,7.05373084 Z M81.9979654,3.52156293 C82.065744,3.58934155 82.0659905,3.70641371 81.9979654,3.7744388 L80.7712956,5.00110856 C80.7037635,5.06864071 80.5869378,5.06864071 80.5189127,5.00061563 L78.4271413,2.90884422 L77.1501921,4.1857934 C77.0824135,4.25357202 77.0148813,4.22892524 77.0028044,4.13403518 L77.0132251,0.151554519 C77.0102667,0.128715676 77.0119531,0.107481896 77.0175408,0.088569256 C77.0352291,0.0287001858 77.0920121,-0.00790929921 77.1643098,0.00145568673 L81.1306455,0.00570112622 C81.2260285,0.0172851083 81.2506753,0.0853101948 81.1831432,0.152842346 L79.906194,1.42979152 L81.9979654,3.52156293 Z" id="fullscreen" fill="#FFFFFF"></path>
24
+ <path d="M0,0 L3,0 L3,12 L0,12 L0,0 Z M5,0 L8,0 L8,12 L5,12 L5,0 Z M10,0 L13,0 L13,12 L10,12 L10,0 Z M15,0 L18,0 L18,12 L15,12 L15,0 Z M20,0 L23,0 L23,12 L20,12 L20,0 Z M25,0 L28,0 L28,12 L25,12 L25,0 Z M30,0 L33,0 L33,12 L30,12 L30,0 Z" id="volume" fill="#00ADEF"></path>
25
+ </g>
26
  </g>
27
+ </svg>
learn/js/learn.js CHANGED
@@ -1,9 +1,9 @@
1
  jQuery( function( $ ){
2
 
3
- var getWistiaEmbed = function( videoId ) {
4
- return '<iframe src="//fast.wistia.net/embed/iframe/' +
5
  encodeURI( videoId ) +
6
- '?autoplay=1" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="640" height="360"></iframe>';
7
  };
8
 
9
  $('body').on( 'click', 'a[href^="#siteorigin-learn-"]', function( e ) {
@@ -20,15 +20,15 @@ jQuery( function( $ ){
20
  dialog
21
  .find( '.video-iframe' ).hide().end()
22
  .find( '.poster-wrapper' ).data( 'video', lesson.video ).end()
23
- .find( '.main-poster' ).hide().attr( 'src', lesson.poster ).fadeIn( ).end()
 
24
  .find( '.learn-description' ).html( lesson.description ).end()
25
  .find( '.form-description' ).html( lesson.form_description ).end()
26
- .find( 'input[name="lesson_id"]' ).val( lessonId ).end();
27
-
28
- dialog.css({
29
- 'margin-top': - dialog.outerHeight() / 2,
30
- 'margin-left': - dialog.outerWidth() / 2,
31
- });
32
  }
33
  } );
34
 
@@ -70,9 +70,17 @@ jQuery( function( $ ){
70
  $( '#siteorigin-learn .learn-close' ).click();
71
  } );
72
 
73
- $( '#siteorigin-learn' ).find( '.main-poster, .play-button' ).click( function(){
74
  $( '#siteorigin-learn' )
75
  .find( '.poster-wrapper' ).hide().end()
76
- .find( '.video-iframe' ).show().html( getWistiaEmbed( $( '#siteorigin-learn .poster-wrapper' ).data( 'video' ) ) );
77
  } );
 
 
 
 
 
 
 
 
78
  } );
1
  jQuery( function( $ ){
2
 
3
+ var getVideoEmbed = function( videoId ) {
4
+ return '<iframe src="https://player.vimeo.com/video/' +
5
  encodeURI( videoId ) +
6
+ '?autoplay=1&title=0&byline=0&portrait=0" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
7
  };
8
 
9
  $('body').on( 'click', 'a[href^="#siteorigin-learn-"]', function( e ) {
20
  dialog
21
  .find( '.video-iframe' ).hide().end()
22
  .find( '.poster-wrapper' ).data( 'video', lesson.video ).end()
23
+ .find( '.video-title' ).html( lesson.title ).end()
24
+ .find( '.main-poster' ).hide().attr( 'src', lesson.poster ).show( ).end()
25
  .find( '.learn-description' ).html( lesson.description ).end()
26
  .find( '.form-description' ).html( lesson.form_description ).end()
27
+ .find( 'input[name="lesson_id"]' ).val( lessonId ).end()
28
+ .css({
29
+ 'margin-top': - dialog.outerHeight() / 2,
30
+ 'margin-left': - dialog.outerWidth() / 2,
31
+ });
 
32
  }
33
  } );
34
 
70
  $( '#siteorigin-learn .learn-close' ).click();
71
  } );
72
 
73
+ $( '#siteorigin-learn' ).find( '.main-poster, .play-button, .video-play-info, .video-play-info-text' ).click( function(){
74
  $( '#siteorigin-learn' )
75
  .find( '.poster-wrapper' ).hide().end()
76
+ .find( '.video-iframe' ).show().html( getVideoEmbed( $( '#siteorigin-learn .poster-wrapper' ).data( 'video' ) ) );
77
  } );
78
+
79
+ $(document).keyup(function(e) {
80
+ // when escape is pressed
81
+ if ( e.keyCode === 27 && $( '#siteorigin-learn-overlay' ).is( ':visible' ) ) {
82
+ e.preventDefault();
83
+ $( '#siteorigin-learn .learn-close' ).click();
84
+ }
85
+ });
86
  } );
learn/js/learn.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(e){var i=function(e){return'<iframe src="//fast.wistia.net/embed/iframe/'+encodeURI(e)+'?autoplay=1" allowtransparency="true" frameborder="0" scrolling="no" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width="640" height="360"></iframe>'};e("body").on("click",'a[href^="#siteorigin-learn-"]',function(i){var r=e(this),n=r.attr("href").replace("#siteorigin-learn-","");if(n&&soLearn.lessons.hasOwnProperty(n)){i.preventDefault();var a=soLearn.lessons[n];e("#siteorigin-learn").show();var o=e("#siteorigin-learn-dialog");o.find(".video-iframe").hide().end().find(".poster-wrapper").data("video",a.video).end().find(".main-poster").hide().attr("src",a.poster).fadeIn().end().find(".learn-description").html(a.description).end().find(".form-description").html(a.form_description).end().find('input[name="lesson_id"]').val(n).end(),o.css({"margin-top":-o.outerHeight()/2,"margin-left":-o.outerWidth()/2})}}),e("body").on("mouseover",'a[href^="#siteorigin-learn-"]',function(i){if(!e("#siteorigin-learn").is(":visible")){var r=e(this),n=r.attr("href").replace("#siteorigin-learn-","");n&&soLearn.lessons.hasOwnProperty(n)&&e("#siteorigin-learn-dialog .main-poster").attr("src",soLearn.lessons[n].poster)}}),e("#siteorigin-learn-overlay").add("#siteorigin-learn .learn-close").click(function(){e("#siteorigin-learn").hide().find(".video-iframe").empty().hide().end().find(".poster-wrapper").show()}),e("#siteorigin-learn form").submit(function(i){var r=e(this),n=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,a=r.find('input[name="email"]');if(""===a.val()||!n.test(a.val()))return i.preventDefault(),void alert(r.data("email-error"));e("#siteorigin-learn .learn-close").click()}),e("#siteorigin-learn").find(".main-poster, .play-button").click(function(){e("#siteorigin-learn").find(".poster-wrapper").hide().end().find(".video-iframe").show().html(i(e("#siteorigin-learn .poster-wrapper").data("video")))})});
1
+ jQuery(function(e){var i=function(e){return'<iframe src="https://player.vimeo.com/video/'+encodeURI(e)+'?autoplay=1&title=0&byline=0&portrait=0" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>'};e("body").on("click",'a[href^="#siteorigin-learn-"]',function(i){var r=e(this),n=r.attr("href").replace("#siteorigin-learn-","");if(n&&soLearn.lessons.hasOwnProperty(n)){i.preventDefault();var o=soLearn.lessons[n];e("#siteorigin-learn").show();var t=e("#siteorigin-learn-dialog");t.find(".video-iframe").hide().end().find(".poster-wrapper").data("video",o.video).end().find(".video-title").html(o.title).end().find(".main-poster").hide().attr("src",o.poster).show().end().find(".learn-description").html(o.description).end().find(".form-description").html(o.form_description).end().find('input[name="lesson_id"]').val(n).end().css({"margin-top":-t.outerHeight()/2,"margin-left":-t.outerWidth()/2})}}),e("body").on("mouseover",'a[href^="#siteorigin-learn-"]',function(i){if(!e("#siteorigin-learn").is(":visible")){var r=e(this),n=r.attr("href").replace("#siteorigin-learn-","");n&&soLearn.lessons.hasOwnProperty(n)&&e("#siteorigin-learn-dialog .main-poster").attr("src",soLearn.lessons[n].poster)}}),e("#siteorigin-learn-overlay").add("#siteorigin-learn .learn-close").click(function(){e("#siteorigin-learn").hide().find(".video-iframe").empty().hide().end().find(".poster-wrapper").show()}),e("#siteorigin-learn form").submit(function(i){var r=e(this),n=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,o=r.find('input[name="email"]');if(""===o.val()||!n.test(o.val()))return i.preventDefault(),void alert(r.data("email-error"));e("#siteorigin-learn .learn-close").click()}),e("#siteorigin-learn").find(".main-poster, .play-button, .video-play-info, .video-play-info-text").click(function(){e("#siteorigin-learn").find(".poster-wrapper").hide().end().find(".video-iframe").show().html(i(e("#siteorigin-learn .poster-wrapper").data("video")))}),e(document).keyup(function(i){27===i.keyCode&&e("#siteorigin-learn-overlay").is(":visible")&&(i.preventDefault(),e("#siteorigin-learn .learn-close").click())})});
learn/learn.php CHANGED
@@ -1,53 +1,70 @@
1
  <?php
2
 
3
- class SiteOrigin_Learn_Dialog {
4
-
5
- private $lessons;
6
- const SUBMIT_URL = 'https://siteorigin.com/wp-admin/admin-ajax.php?action=lesson_signup_submit';
7
-
8
- function __construct(){
9
- $this->lessons = array();
10
- add_action( 'admin_footer', array( $this, 'admin_footer' ) );
11
- add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 15 );
12
- }
13
-
14
- public static function single() {
15
- static $single;
16
- return empty( $single ) ? $single = new self() : $single;
17
- }
18
-
19
- /**
20
- * Add a course that we might display
21
- *
22
- * @param $id
23
- * @param $data
24
- */
25
- public function add_lessons( $id, $data ) {
26
- $this->lessons[$id] = $data;
27
- }
28
-
29
- /**
30
- * Get all the available courses
31
- *
32
- * @return mixed|void
33
- */
34
- public function get_lessons(){
35
- return apply_filters( 'siteorigin_learn_lessons', $this->lessons );
36
- }
37
-
38
- /**
39
- * Add the dialog to the footer when this is setup
40
- */
41
- public function admin_footer(){
42
- include plugin_dir_path( __FILE__ ) . 'tpl/dialog.php';
43
- }
44
-
45
- public function enqueue_scripts(){
46
- wp_enqueue_script( 'siteorigin-learn', plugin_dir_url( __FILE__ ) . 'js/learn' . ( WP_DEBUG ? '' : '.min' ) . '.js', array( 'jquery' ), false, true );
47
- wp_enqueue_style( 'siteorigin-learn', plugin_dir_url( __FILE__ ) . 'css/learn.css', array( ) );
48
-
49
- wp_localize_script( 'siteorigin-learn', 'soLearn', array(
50
- 'lessons' => $this->get_lessons(),
51
- ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
 
53
  }
1
  <?php
2
 
3
+ if( ! class_exists( 'SiteOrigin_Learn_Dialog' ) ) {
4
+
5
+ class SiteOrigin_Learn_Dialog {
6
+
7
+ private $lessons;
8
+ const SUBMIT_URL = 'https://siteorigin.com/wp-admin/admin-ajax.php?action=lesson_signup_submit';
9
+
10
+ function __construct() {
11
+ $this->lessons = array();
12
+ add_action( 'admin_footer', array( $this, 'admin_footer' ) );
13
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 100 );
14
+ }
15
+
16
+ public static function single() {
17
+ static $single;
18
+
19
+ return empty( $single ) ? $single = new self() : $single;
20
+ }
21
+
22
+ /**
23
+ * Add a course that we might display
24
+ *
25
+ * @param $id
26
+ * @param $data
27
+ */
28
+ public function add_lessons( $id, $data ) {
29
+ $this->lessons[ $id ] = $data;
30
+ }
31
+
32
+ /**
33
+ * Get all the available courses
34
+ *
35
+ * @return mixed|void
36
+ */
37
+ public function get_lessons() {
38
+ return apply_filters( 'siteorigin_learn_lessons', $this->lessons );
39
+ }
40
+
41
+ /**
42
+ * Add the dialog to the footer when this is setup
43
+ */
44
+ public function admin_footer() {
45
+ wp_localize_script( 'siteorigin-learn', 'soLearn', array(
46
+ 'lessons' => $this->get_lessons(),
47
+ ) );
48
+
49
+ // These strings should be filtered and translated by the calling plugin.
50
+ $dialog_strings = apply_filters( 'siteorigin_learn_strings', array(
51
+ 'watch_video' => 'Watch Intro Video',
52
+ 'loaded_from_vimeo' => 'Loaded from Vimeo Servers',
53
+ 'valid_email' => 'Please enter a valid email address.',
54
+
55
+ 'your_name' => 'Your Name',
56
+ 'your_email' => 'Your Email',
57
+ 'sign_up' => 'Sign Up',
58
+ 'close' => 'Close',
59
+ ) );
60
+
61
+ include plugin_dir_path( __FILE__ ) . 'tpl/dialog.php';
62
+ }
63
+
64
+ public function enqueue_scripts() {
65
+ wp_enqueue_script( 'siteorigin-learn', plugin_dir_url( __FILE__ ) . 'js/learn' . ( WP_DEBUG ? '' : '.min' ) . '.js', array( 'jquery' ), false, true );
66
+ wp_enqueue_style( 'siteorigin-learn', plugin_dir_url( __FILE__ ) . 'css/learn.css', array() );
67
+ }
68
  }
69
+
70
  }
learn/tpl/dialog.php CHANGED
@@ -1,40 +1,50 @@
1
  <?php
2
  $user = wp_get_current_user();
 
3
  ?>
4
 
5
  <div id="siteorigin-learn" style="display: none;">
6
-
7
  <div id="siteorigin-learn-overlay"></div>
8
  <div id="siteorigin-learn-dialog">
 
 
9
 
10
  <div class="poster-wrapper">
11
  <img src="" width="640px" height="360px" class="main-poster" />
12
- <img src="<?php echo plugin_dir_url( __FILE__ ) . '../img/play.svg' ?>" width="48px" height="48px" class="play-button" />
 
 
 
 
 
 
 
 
13
  </div>
14
  <div class="video-iframe">
15
  </div>
16
 
17
  <p class="learn-description"></p>
18
 
19
- <form class="signup-form" method="post" action="<?php echo esc_url( SiteOrigin_Learn_Dialog::SUBMIT_URL ) ?>" target="_blank" data-email-error="<?php esc_attr_e( 'Please enter a valid email', 'siteorigin-panels' ) ?>" >
20
  <?php if( ! empty( $user->data->display_name ) && $user->data->display_name !== $user->data->user_login ) : ?>
21
  <div class="form-field">
22
- <label for="siteorigin-learn-name-input"><?php esc_attr_e( 'Your Name', 'siteorigin-panels' ) ?></label>
23
  <input type="text" name="name" value="<?php echo ! empty( $user->data->display_name ) ? esc_attr( $user->data->display_name ) : '' ?>" id="siteorigin-learn-name-input" />
24
  </div>
25
  <?php endif ?>
26
  <div class="form-field">
27
- <label for="siteorigin-learn-email-input"><?php esc_attr_e( 'Your Email', 'siteorigin-panels' ) ?></label>
28
  <input type="text" name="email" value="<?php echo ! empty( $user->data->user_email ) ? esc_attr( $user->data->user_email ) : '' ?>" id="siteorigin-learn-email-input" />
29
  </div>
30
  <div class="form-submit">
31
- <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Sign Up', 'siteorigin-panels' ) ?>" />
32
  </div>
33
  <input type="hidden" name="lesson_id" value="" />
34
  </form>
35
  <div class="form-description"></div>
36
 
37
- <div class="learn-close"><?php _e( 'Close', 'siteorigin-panels' ) ?></div>
38
 
39
  </div>
40
 
1
  <?php
2
  $user = wp_get_current_user();
3
+ /* @var $dialog_strings */
4
  ?>
5
 
6
  <div id="siteorigin-learn" style="display: none;">
 
7
  <div id="siteorigin-learn-overlay"></div>
8
  <div id="siteorigin-learn-dialog">
9
+
10
+ <h4 class="video-title"></h4>
11
 
12
  <div class="poster-wrapper">
13
  <img src="" width="640px" height="360px" class="main-poster" />
14
+
15
+ <div class="video-play-info">
16
+ <div class="video-play-info-text">
17
+ <?php esc_html_e( $dialog_strings[ 'watch_video' ] ) ?>
18
+ <small><?php esc_html_e( $dialog_strings[ 'loaded_from_vimeo' ] ) ?></small>
19
+ </div>
20
+ </div>
21
+
22
+ <img src="<?php echo siteorigin_panels_url( 'img/play.svg' ) ?>" width="640px" height="58px" class="play-button" />
23
  </div>
24
  <div class="video-iframe">
25
  </div>
26
 
27
  <p class="learn-description"></p>
28
 
29
+ <form class="signup-form" method="post" action="<?php echo esc_url( SiteOrigin_Learn_Dialog::SUBMIT_URL ) ?>" target="_blank" data-email-error="<?php esc_attr( $dialog_strings['valid_email'] ) ?>" >
30
  <?php if( ! empty( $user->data->display_name ) && $user->data->display_name !== $user->data->user_login ) : ?>
31
  <div class="form-field">
32
+ <label for="siteorigin-learn-name-input"><?php esc_html( $dialog_strings[ 'your_name' ] ) ?></label>
33
  <input type="text" name="name" value="<?php echo ! empty( $user->data->display_name ) ? esc_attr( $user->data->display_name ) : '' ?>" id="siteorigin-learn-name-input" />
34
  </div>
35
  <?php endif ?>
36
  <div class="form-field">
37
+ <label for="siteorigin-learn-email-input"><?php esc_html( $dialog_strings[ 'your_email' ] ) ?></label>
38
  <input type="text" name="email" value="<?php echo ! empty( $user->data->user_email ) ? esc_attr( $user->data->user_email ) : '' ?>" id="siteorigin-learn-email-input" />
39
  </div>
40
  <div class="form-submit">
41
+ <input type="submit" class="button-primary" value="<?php echo esc_attr( $dialog_strings[ 'sign_up' ] ) ?>" />
42
  </div>
43
  <input type="hidden" name="lesson_id" value="" />
44
  </form>
45
  <div class="form-description"></div>
46
 
47
+ <div class="learn-close"><?php esc_html( $dialog_strings[ 'close' ] ) ?></div>
48
 
49
  </div>
50
 
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Page Builder by SiteOrigin ===
2
  Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
3
  Requires at least: 4.4
4
- Tested up to: 4.8
5
- Stable tag: 2.5.10
6
- Build time: 2017-08-04T10:38:11+02:00
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
  Donate link: https://siteorigin.com/downloads/contribution/
@@ -96,7 +96,12 @@ We've tried to ensure that Page Builder is compatible with most plugin widgets.
96
 
97
  == Changelog ==
98
 
99
- = 2.5.9 - 4 August 2017 =
 
 
 
 
 
100
  * Fixed WP widget wrappers broken by WP4.8.1 changes.
101
 
102
  = 2.5.9 - 27 July 2017 =
1
  === Page Builder by SiteOrigin ===
2
  Tags: page builder, responsive, widget, widgets, builder, page, admin, gallery, content, cms, pages, post, css, layout, grid
3
  Requires at least: 4.4
4
+ Tested up to: 4.8.1
5
+ Stable tag: 2.5.11
6
+ Build time: 2017-08-24T10:14:15+02:00
7
  License: GPLv3
8
  License URI: http://www.gnu.org/licenses/gpl.html
9
  Donate link: https://siteorigin.com/downloads/contribution/
96
 
97
  == Changelog ==
98
 
99
+ = 2.5.11 - 24 August 2017 =
100
+ * Prevent creating multiple new entries in post meta every time a post is previewed.
101
+ * Avoid using relative asset URLs which may break caching plugins.
102
+ * Import custom widget class from HTML.
103
+
104
+ = 2.5.10 - 4 August 2017 =
105
  * Fixed WP widget wrappers broken by WP4.8.1 changes.
106
 
107
  = 2.5.9 - 27 July 2017 =
settings/tpl/settings.php CHANGED
@@ -2,9 +2,9 @@
2
  <div class="settings-banner">
3
 
4
  <span class="icon">
5
- <img src="<?php echo plugin_dir_url(__FILE__) ?>../images/icon-layer.png" class="layer-3" />
6
- <img src="<?php echo plugin_dir_url(__FILE__) ?>../images/icon-layer.png" class="layer-2" />
7
- <img src="<?php echo plugin_dir_url(__FILE__) ?>../images/icon-layer.png" class="layer-1" />
8
  </span>
9
  <h1><?php _e('SiteOrigin Page Builder', 'siteorigin-panels') ?></h1>
10
 
@@ -79,4 +79,4 @@
79
  </div>
80
  </form>
81
 
82
- </div>
2
  <div class="settings-banner">
3
 
4
  <span class="icon">
5
+ <img src="<?php echo siteorigin_panels_url( 'settings/images/icon-layer.png' ) ?>" class="layer-3" />
6
+ <img src="<?php echo siteorigin_panels_url( 'settings/images/icon-layer.png' ) ?>" class="layer-2" />
7
+ <img src="<?php echo siteorigin_panels_url( 'settings/images/icon-layer.png' ) ?>" class="layer-1" />
8
  </span>
9
  <h1><?php _e('SiteOrigin Page Builder', 'siteorigin-panels') ?></h1>
10
 
79
  </div>
80
  </form>
81
 
82
+ </div>
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.5.10
7
  Author: SiteOrigin
8
  Author URI: https://siteorigin.com
9
  License: GPL3
@@ -11,11 +11,11 @@ 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.5.10' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
18
- define( 'SITEORIGIN_PANELS_VERSION_SUFFIX', '-2510' );
19
 
20
  require_once plugin_dir_path( __FILE__ ) . 'inc/functions.php';
21
 
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.5.11
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.5.11' );
15
  if ( ! defined( 'SITEORIGIN_PANELS_JS_SUFFIX' ) ) {
16
  define( 'SITEORIGIN_PANELS_JS_SUFFIX', '.min' );
17
  }
18
+ define( 'SITEORIGIN_PANELS_VERSION_SUFFIX', '-2511' );
19
 
20
  require_once plugin_dir_path( __FILE__ ) . 'inc/functions.php';
21
 
tpl/live-editor-preview.php CHANGED
@@ -2,7 +2,7 @@
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit; // Exit if accessed directly.
4
  }
5
- wp_enqueue_style( 'siteorigin-preview-style', plugin_dir_url( __FILE__ ) . '../css/live-editor-preview.css', array(), SITEORIGIN_PANELS_VERSION );
6
  ?>
7
  <!DOCTYPE html>
8
  <html <?php language_attributes(); ?>>
2
  if ( ! defined( 'ABSPATH' ) ) {
3
  exit; // Exit if accessed directly.
4
  }
5
+ wp_enqueue_style( 'siteorigin-preview-style', siteorigin_panels_url( 'css/live-editor-preview.css' ), array(), SITEORIGIN_PANELS_VERSION );
6
  ?>
7
  <!DOCTYPE html>
8
  <html <?php language_attributes(); ?>>