SiteOrigin Widgets Bundle - Version 1.44.2

Version Description

  • 03 December 2022 =
  • Added WP Rocket compatibility.
  • Button: Expanded Font Size, Padding, and Rounding to be more customizable.
  • Headline: Prevented a potential notice when adding mobile_align defaults to pre-existing instances.
  • Image Size Field: Update to display the setting description if available.
  • Simple Masonry: Resolved a potential Undefined array key warning.
  • Developer: Introduced widget validation via sowbForms.validateFields and sow_validate_widget_data.
  • Developer: Update to allow custom color palettes or for palettes to be completely removed on a field by field basis.
  • Developer: Pass state emitter field to custom callbacks. Allows developers to detect the field that triggered the emitter.
Download this release

Release Info

Developer SiteOrigin
Plugin Icon 128x128 SiteOrigin Widgets Bundle
Version 1.44.2
Comparing to
See all releases

Code changes from version 1.44.1 to 1.44.2

admin/admin.js CHANGED
@@ -188,11 +188,17 @@ jQuery( function( $ ){
188
 
189
  dialog.find( '.so-save' ).on( 'click', function( e ) {
190
  e.preventDefault();
 
 
 
 
 
 
191
 
192
  var $$ = $( this );
193
  $$.prop( 'disabled', true );
194
 
195
- dialog.find( 'form' ).on( 'submit', function() {
196
  $$.prop( 'disabled', false );
197
  dialog.hide();
198
  } ).trigger( 'submit' );
188
 
189
  dialog.find( '.so-save' ).on( 'click', function( e ) {
190
  e.preventDefault();
191
+ var $form = dialog.find( 'form' );
192
+
193
+ validSave = sowbForms.validateFields( $form )
194
+ if ( typeof validSave == 'boolean' && ! validSave ) {
195
+ return false;
196
+ }
197
 
198
  var $$ = $( this );
199
  $$.prop( 'disabled', true );
200
 
201
+ $form.on( 'submit', function() {
202
  $$.prop( 'disabled', false );
203
  dialog.hide();
204
  } ).trigger( 'submit' );
admin/admin.min.js CHANGED
@@ -1 +1 @@
1
- jQuery((function(i){i(".so-widget-toggle-active button").on("click",(function(){var t=i(this),e=t.data("status"),s=t.closest(".so-widget");e?s.addClass("so-widget-is-active").removeClass("so-widget-is-inactive"):s.removeClass("so-widget-is-active").addClass("so-widget-is-inactive"),i.post(soWidgetsAdmin.toggleUrl,{widget:s.data("id"),active:e},(function(i){}))})),i(".so-widget-banner").each((function(){var t=i(this),e=t.find("img");if(e.length)e.width()>128&&e.css("margin-left",-(e.width()-128)/2+"px");else{var s=Trianglify({width:128,height:128,variance:1,cell_size:32,seed:t.data("seed")});t.append(s.svg())}}));var t=function(){var t=i(this).val().toLowerCase();""===t?i(".so-widget-wrap").show():i(".so-widget").each((function(){var e=i(this);e.find("h3").html().toLowerCase().indexOf(t)>-1?e.parent().show():e.parent().hide()})),i(window).trigger("resize")};i("#sow-widget-search input").on({keyup:t,search:t}),i(window).on("resize",(function(){var t=i(".so-widget-text:visible"),e=0,s=(e=[],0);t.css("height","auto"),window.matchMedia("(max-width: 960px)").matches||(window.matchMedia("(min-width: 1800px)").matches?columnCount=4:window.matchMedia("(max-width: 1280px)").matches?columnCount=2:columnCount=3,t.each((function(t){s=(s=t/columnCount)<0?Math.ceil(s):Math.floor(s),i(this).data("column",s),e[s]=Math.max(void 0===e[s]?0:e[s],i(this).height())})),t.each((function(){i(this).css("height",e[i(this).data("column")]+"px")})))})).trigger("resize"),i("#sow-widgets-page .page-nav a").on("click",(function(t){t.preventDefault();var e=i(this),s=e.attr("href"),o=e.closest("li");switch(i("#sow-widgets-page .page-nav li").not(o).removeClass("active"),o.addClass("active"),s){case"#all":i(".so-widget-wrap").show();break;case"#enabled":i(".so-widget-wrap").hide(),i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").show()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").hide()}));break;case"#disabled":i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").hide()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").show()}))}i(window).trigger("resize")})),i("#widgets-list").addClass("so-animated");var e=i("#sow-settings-dialog");if(i("#widgets-list .so-widget-settings").on("click",(function(t){var s=i(this);t.preventDefault(),$content=e.find(".so-content"),$content.empty().addClass("so-loading"),i.get(s.data("form-url"),(function(i){$content.html(i).removeClass("so-loading")})),e.show(),i("#sow-settings-dialog .so-close").trigger("focus"),i(window).one("keyup",(function(i){27===i.which&&e.hide()}))})),e.find(".so-close").on("click keyup",(function(i){("keyup"!=i.type||window.sowbForms.isEnter(i))&&(i.preventDefault(),e.hide())})),e.find(".so-save").on("click",(function(t){t.preventDefault();var s=i(this);s.prop("disabled",!0),e.find("form").on("submit",(function(){s.prop("disabled",!1),e.hide()})).trigger("submit")})),i("#so-widget-settings-save").on("load",(function(){i("#widgets-list .so-widget-settings").prop("disabled",!1)})),window.location.hash&&"#settings-"===window.location.hash.substring(0,10)){var s=window.location.hash.substring(10);i('div[data-id="'+s+'"] button.so-widget-settings').trigger("click")}}));
1
+ jQuery((function(i){i(".so-widget-toggle-active button").on("click",(function(){var t=i(this),e=t.data("status"),s=t.closest(".so-widget");e?s.addClass("so-widget-is-active").removeClass("so-widget-is-inactive"):s.removeClass("so-widget-is-active").addClass("so-widget-is-inactive"),i.post(soWidgetsAdmin.toggleUrl,{widget:s.data("id"),active:e},(function(i){}))})),i(".so-widget-banner").each((function(){var t=i(this),e=t.find("img");if(e.length)e.width()>128&&e.css("margin-left",-(e.width()-128)/2+"px");else{var s=Trianglify({width:128,height:128,variance:1,cell_size:32,seed:t.data("seed")});t.append(s.svg())}}));var t=function(){var t=i(this).val().toLowerCase();""===t?i(".so-widget-wrap").show():i(".so-widget").each((function(){var e=i(this);e.find("h3").html().toLowerCase().indexOf(t)>-1?e.parent().show():e.parent().hide()})),i(window).trigger("resize")};i("#sow-widget-search input").on({keyup:t,search:t}),i(window).on("resize",(function(){var t=i(".so-widget-text:visible"),e=0,s=(e=[],0);t.css("height","auto"),window.matchMedia("(max-width: 960px)").matches||(window.matchMedia("(min-width: 1800px)").matches?columnCount=4:window.matchMedia("(max-width: 1280px)").matches?columnCount=2:columnCount=3,t.each((function(t){s=(s=t/columnCount)<0?Math.ceil(s):Math.floor(s),i(this).data("column",s),e[s]=Math.max(void 0===e[s]?0:e[s],i(this).height())})),t.each((function(){i(this).css("height",e[i(this).data("column")]+"px")})))})).trigger("resize"),i("#sow-widgets-page .page-nav a").on("click",(function(t){t.preventDefault();var e=i(this),s=e.attr("href"),o=e.closest("li");switch(i("#sow-widgets-page .page-nav li").not(o).removeClass("active"),o.addClass("active"),s){case"#all":i(".so-widget-wrap").show();break;case"#enabled":i(".so-widget-wrap").hide(),i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").show()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").hide()}));break;case"#disabled":i(".so-widget-wrap .so-widget-is-active").each((function(){i(this).closest(".so-widget-wrap").hide()})),i(".so-widget-wrap .so-widget-is-inactive").each((function(){i(this).closest(".so-widget-wrap").show()}))}i(window).trigger("resize")})),i("#widgets-list").addClass("so-animated");var e=i("#sow-settings-dialog");if(i("#widgets-list .so-widget-settings").on("click",(function(t){var s=i(this);t.preventDefault(),$content=e.find(".so-content"),$content.empty().addClass("so-loading"),i.get(s.data("form-url"),(function(i){$content.html(i).removeClass("so-loading")})),e.show(),i("#sow-settings-dialog .so-close").trigger("focus"),i(window).one("keyup",(function(i){27===i.which&&e.hide()}))})),e.find(".so-close").on("click keyup",(function(i){("keyup"!=i.type||window.sowbForms.isEnter(i))&&(i.preventDefault(),e.hide())})),e.find(".so-save").on("click",(function(t){t.preventDefault();var s=e.find("form");if(validSave=sowbForms.validateFields(s),"boolean"==typeof validSave&&!validSave)return!1;var o=i(this);o.prop("disabled",!0),s.on("submit",(function(){o.prop("disabled",!1),e.hide()})).trigger("submit")})),i("#so-widget-settings-save").on("load",(function(){i("#widgets-list .so-widget-settings").prop("disabled",!1)})),window.location.hash&&"#settings-"===window.location.hash.substring(0,10)){var s=window.location.hash.substring(10);i('div[data-id="'+s+'"] button.so-widget-settings').trigger("click")}}));
base/css/admin.css CHANGED
@@ -1 +1 @@
1
- .siteorigin-widget-form-no-styles{display:none !important}.siteorigin-widget-teaser{padding:10px 12px;border:1px solid #5fc133;background:#edfbe7;color:#394a3a;margin-bottom:20px}.siteorigin-widget-teaser .dashicons{float:right;margin:1px 2px 6px 10px;cursor:pointer;font-size:18px;width:18px;height:18px}.siteorigin-widget-form-notification{padding:8px 12px;border:1px solid #a4cadd;background-color:#CDE2EC;margin-bottom:20px}.siteorigin-widget-form-notification>span{line-height:22px}.siteorigin-widget-form-notification>a.button.button-small{margin-left:10px;height:22px}div.siteorigin-widget-form{display:block !important;margin:15px 0}div.siteorigin-widget-form>div:first-child{margin-top:0}div.siteorigin-widget-form a{box-shadow:none}div.siteorigin-widget-form div.siteorigin-widget-field{margin:1em 0}div.siteorigin-widget-form div.siteorigin-widget-field>label,div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label{display:block;font-size:13px;font-weight:400;margin-bottom:3px}div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label,div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label.siteorigin-widget-field-label{font-weight:bold}div.siteorigin-widget-form div.siteorigin-widget-field>label.so-checkbox-label,div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label.so-checkbox-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-description{font-size:11.7px;margin-top:2.34px;color:#999;font-style:italic}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-separator{margin:1.75em 0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-optional .field-optional{font-weight:normal;font-size:.8em;vertical-align:super;padding-left:.5em;color:#54a242;font-style:italic}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-required .field-required{font-weight:normal;font-size:.8em;vertical-align:super;padding-left:.5em;color:#F02311;font-style:italic}div.siteorigin-widget-form div.siteorigin-widget-field input[type="text"]{width:100%}div.siteorigin-widget-form div.siteorigin-widget-field input.siteorigin-widget-input-color{width:auto}div.siteorigin-widget-form div.siteorigin-widget-field .wp-picker-clear{margin-left:6px;min-height:30px}div.siteorigin-widget-form div.siteorigin-widget-field textarea.siteorigin-widget-code-input{font-family:"Courier New",Courier,monospace}div.siteorigin-widget-form div.siteorigin-widget-field select{min-width:150px}@media (max-width:680px){div.siteorigin-widget-form div.siteorigin-widget-field select{max-width:none;width:100%}}div.siteorigin-widget-form div.siteorigin-widget-field select[multiple]{max-height:83px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .siteorigin-widget-slider-wrapper{margin:10px 0;border:1px solid #E0E0E0;padding:12px 15px;background:#F4F4F4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;max-width:500px;display:block;margin-left:55px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .siteorigin-widget-slider-value{display:block;float:left;margin-top:0;border:1px solid #E0E0E0;padding:11px 0;background:#F4F4F4;font-weight:bold;color:#666;width:45px;text-align:center}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .siteorigin-widget-value-slider{position:relative;height:5px;background:#A0A0A0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .ui-slider-handle{cursor:move;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #a4a3a8;z-index:10;position:absolute;width:18px;height:18px;margin-top:-7px;margin-left:-9px;background:#F9F9F9;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;top:0;left:0;-webkit-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1)}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider input[type="number"]{display:none}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-top{background:#F0F0F0;border:1px solid #D0D0D0;padding:10px;position:relative}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-top h3{font-size:13px;margin:0;padding:0 !important}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove{width:14px;height:14px;position:absolute;top:50%;margin-top:-7px;cursor:pointer;font-size:14px;line-height:14px;text-align:center}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:before{font-family:dashicons;color:#999999}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand{right:48px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:before{content:"\f140"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:focus:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:hover:before{color:#50575D}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy{right:28px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:before{content:"\f105"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:focus:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:hover:before{color:#50575D}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove{right:12px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:before{content:'\f158'}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:hover{background:#ff0000}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:focus:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:hover:before{color:#FFFFFF}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items{background:#FCFCFC;border:1px solid #EEEEEE;border-top:0;border-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#FCFCFC;border-bottom:1px solid #EEEEEE}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{padding:10px;cursor:move;position:relative;background:#F6F6F6}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus-within{background:#FAFAFA}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top h4{font-size:12px;margin:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item h4{font-size:15px;margin:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item:last-child{border-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top:1px solid #EEEEEE;display:none;padding:1px 10px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-add{padding:7px 10px;background:#F0F0F0;border:1px dashed #D0D0D0;font-size:12px;line-height:1em;text-align:center;cursor:pointer}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-add:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-add:hover{background:#F4F4F4}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top{background:#eaf2f6;border-color:#c9d0d4}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus-within{background:#eaf2f6}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top h3{color:#42484b}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items{background:#f6fdff;border-color:#e8eff3}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#f8fdff;border-bottom-color:#e8eff3}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{background:#f0f8fc}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top-color:#e8eff3}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add{background:#eaf2f6;border-color:#c9d0d4;color:#42484b}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:hover{background:#edf5f9}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper{background:#F0F0F0;border:1px solid #D0D0D0;padding:10px;display:block;margin-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper>label{display:inline;font-weight:bold}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper:before{float:left;margin:3px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper.siteorigin-widget-section-visible:before{content:"\f460"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper span.sow-current-count{display:inline-block;border-radius:9px;background:#f92700;border:1px solid #da0900;line-height:14px;font-size:7px;width:17px;height:17px;text-align:center;vertical-align:middle;font-weight:bold;color:#FFFFFF;box-sizing:border-box;margin:1px 5px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label{background:#F0F0F0;border:1px solid #D0D0D0;line-height:1.4;padding:10px;display:block;margin-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label:focus{background:#F5F5F5}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label:before{float:left;margin:3px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label.siteorigin-widget-section-visible:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label.siteorigin-widget-section-visible:before{content:"\f460"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .siteorigin-widget-section,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget .siteorigin-widget-section,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section .siteorigin-widget-section{padding:1px 10px;background:#FCFCFC;border:1px solid #EEEEEE;border-top:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .siteorigin-widget-section.siteorigin-widget-section-hide,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget .siteorigin-widget-section.siteorigin-widget-section-hide,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section .siteorigin-widget-section.siteorigin-widget-section-hide{display:none}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link{position:relative}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector{padding:20px;display:none;position:absolute;top:110%;width:360px;z-index:10;border:1px solid #c0c0c0;background:#F6F6F6;-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,0.2);box-shadow:0 2px 4px rgba(0,0,0,0.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .content-text-search,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .content-text-search{width:100%;margin-bottom:15px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts{margin:0;padding:0;background:#fff;max-height:300px;overflow-y:scroll;border:1px solid #e4e4e4}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li{cursor:pointer;padding:5px 10px;color:#32373c;border-bottom:1px solid #f1f1f1;margin:0;font-size:.95em}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li.selected,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li.selected,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li.selected,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li.selected{background:#e1edfa}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:hover,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li:hover,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:hover,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li:hover{background:#eaf2fa}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:last-child,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li:last-child,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:last-child,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li:last-child{border-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li span,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li span,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li span,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li span{font-size:.9em;display:inline-block;float:right;color:#999;margin-left:10px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts.loading{min-height:40px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts.loading{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items.loading li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts.loading li{display:none}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .buttons{margin-top:15px;text-align:right}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons a,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .buttons a{display:inline-block}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .url-input-wrapper,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .url-input-wrapper{display:block;margin-right:130px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .url-input-wrapper .siteorigin-widget-input,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .url-input-wrapper .siteorigin-widget-input{display:inline-block}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{float:right;line-height:28px;min-height:30px;width:120px;text-align:center}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector{right:0}div.siteorigin-widget-form .siteorigin-widget-description{clear:both}.siteorigin-widget-preview{display:block !important}.siteorigin-widget-help-link{display:block;margin:1em 0}.so-widgets-dialog .so-widgets-dialog-overlay{position:fixed;z-index:500000;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.7)}.so-widgets-dialog .so-widgets-toolbar,.so-widgets-dialog .so-widgets-dialog-frame{position:fixed;z-index:500001;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.so-widgets-dialog .so-widgets-toolbar{left:30px;right:30px;top:30px;height:50px;background:#fafafa;border-bottom:1px solid #D8D8D8}.so-widgets-dialog .so-widgets-toolbar h3{margin:15px 0 15px 20px}.so-widgets-dialog .so-widgets-toolbar .close{position:absolute;box-sizing:border-box;width:50px;height:50px;display:block;cursor:pointer;top:0;right:0;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.so-widgets-dialog .so-widgets-toolbar .close:focus,.so-widgets-dialog .so-widgets-toolbar .close:hover{background:#e9e9e9}.so-widgets-dialog .so-widgets-toolbar .close:focus .so-dialog-icon,.so-widgets-dialog .so-widgets-toolbar .close:hover .so-dialog-icon{color:#333333}.so-widgets-dialog .so-widgets-toolbar .close .dashicons{position:absolute;top:50%;left:50%;text-decoration:none;width:21px;height:21px;margin-left:-11px;margin-top:-10px;font-size:21px;color:#666666;text-align:center}.so-widgets-dialog .so-widgets-dialog-frame{top:80px;left:30px;right:30px;bottom:30px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.so-widgets-dialog .so-widgets-dialog-frame{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}.so-widgets-dialog .so-widgets-dialog-frame iframe{width:100%;height:100%}.widget-icon.so-widget-icon{background-size:cover;background-image:url("img/bundle-icon.png")}.widget-icon.so-widget-icon.so-block-editor-icon{width:20px;height:20px;display:inline-block}.block-editor .so-widget-placeholder,.block-editor-page .so-widget-placeholder{text-align:left}.block-editor .so-widget-placeholder>.components-placeholder__label,.block-editor-page .so-widget-placeholder>.components-placeholder__label{background:url("img/bundle-icon.png") no-repeat left;background-size:20px;padding-left:25px}.block-editor .so-widget-placeholder>.components-placeholder__fieldset,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container{width:100%}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .components-base-control__field select,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .components-base-control__field select{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .siteorigin-widget-form.siteorigin-widget-form-main,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .siteorigin-widget-form.siteorigin-widget-form-main{min-width:unset}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select,.block-editor div.siteorigin-widget-form div.siteorigin-widget-field select.siteorigin-widget-input,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field select.siteorigin-widget-input{-webkit-appearance:none;background:#fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55%;background-size:auto;background-size:16px 16px;border:1px solid #8c8f94;border-radius:3px;box-shadow:none;color:#2c3338;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;line-height:2;min-height:30px;padding:0 24px 0 8px;vertical-align:middle;width:auto}@media (max-width:399px){.block-editor div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select{width:100%}}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field{text-align:left}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field input,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field input{padding:0 8px;line-height:2}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field input[type=checkbox],.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field input[type=checkbox]{background-color:#ffffff}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{color:#2271b1;box-shadow:unset;font-size:13px;height:28px}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current{height:37px}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-tinymce .wp-switch-editor,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-tinymce .wp-switch-editor{box-sizing:content-box}.block-editor .so-widget-preview-container .so-widgets-spinner-container,.block-editor-page .so-widget-preview-container .so-widgets-spinner-container{text-align:center}.block-editor .so-widget-preview-container .so-widgets-spinner-container>span,.block-editor-page .so-widget-preview-container .so-widgets-spinner-container>span{display:inline-block}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form small{font-size:11.7px}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-input{margin-top:0}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form label,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-input,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form select.siteorigin-widget-input,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .button,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form input{color:#3c434a;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form select.siteorigin-widget-input{line-height:2}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{line-height:28px}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-preview-button.button-secondary,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-help-link,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-form-notification a,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form a{color:#2271b1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-preview-button.button-secondary:hover,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-help-link:hover,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-form-notification a:hover,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form a:hover{color:#0a4b78}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-preview-button.button-secondary{line-height:2.15384615}
1
+ .siteorigin-widget-form-no-styles{display:none !important}.siteorigin-widget-teaser{padding:10px 12px;border:1px solid #5fc133;background:#edfbe7;color:#394a3a;margin-bottom:20px}.siteorigin-widget-teaser .dashicons{float:right;margin:1px 2px 6px 10px;cursor:pointer;font-size:18px;width:18px;height:18px}.siteorigin-widget-form-notification{padding:8px 12px;border:1px solid #a4cadd;background-color:#CDE2EC;margin-bottom:20px}.siteorigin-widget-form-notification>span{line-height:22px}.siteorigin-widget-form-notification>a.button.button-small{margin-left:10px;height:22px}div.siteorigin-widget-form{display:block !important;margin:15px 0}div.siteorigin-widget-form>div:first-child{margin-top:0}div.siteorigin-widget-form a{box-shadow:none}div.siteorigin-widget-form div.siteorigin-widget-field{margin:1em 0}div.siteorigin-widget-form div.siteorigin-widget-field>label,div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label{display:block;font-size:13px;font-weight:400;margin-bottom:3px}div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label,div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label.siteorigin-widget-field-label{font-weight:bold}div.siteorigin-widget-form div.siteorigin-widget-field>label.so-checkbox-label,div.siteorigin-widget-form div.siteorigin-widget-field>label.siteorigin-widget-field-label.so-checkbox-label{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-description{font-size:11.7px;margin-top:2.34px;color:#999;font-style:italic}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-separator{margin:1.75em 0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-optional .field-optional{font-weight:normal;font-size:.8em;vertical-align:super;padding-left:.5em;color:#54a242;font-style:italic}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-required .field-required{color:#F02311;font-size:1.2em;font-style:italic;font-weight:normal}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-required .siteorigin-widget-input,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-required .field-required-message{transition:300ms ease-in-out border-color}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-required .field-required-message{background:#fce4e5;border-radius:2px;border:1px solid #ec666a;color:#ec666a;display:none;font-size:.8em;list-style:none;margin-top:1px;margin-bottom:10px;padding:5px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-required.sow-required-error .field-required-message{display:block}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-is-required.sow-required-error .siteorigin-widget-input{border-color:#F02311}div.siteorigin-widget-form div.siteorigin-widget-field input[type="text"]{width:100%}div.siteorigin-widget-form div.siteorigin-widget-field input.siteorigin-widget-input-color{width:auto}div.siteorigin-widget-form div.siteorigin-widget-field .wp-picker-clear{margin-left:6px;min-height:30px}div.siteorigin-widget-form div.siteorigin-widget-field textarea.siteorigin-widget-code-input{font-family:"Courier New",Courier,monospace}div.siteorigin-widget-form div.siteorigin-widget-field select{min-width:150px}@media (max-width:680px){div.siteorigin-widget-form div.siteorigin-widget-field select{max-width:none;width:100%}}div.siteorigin-widget-form div.siteorigin-widget-field select[multiple]{max-height:83px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .siteorigin-widget-slider-wrapper{margin:10px 0;border:1px solid #E0E0E0;padding:12px 15px;background:#F4F4F4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;max-width:500px;display:block;margin-left:55px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .siteorigin-widget-slider-value{display:block;float:left;margin-top:0;border:1px solid #E0E0E0;padding:11px 0;background:#F4F4F4;font-weight:bold;color:#666;width:45px;text-align:center}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .siteorigin-widget-value-slider{position:relative;height:5px;background:#A0A0A0;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);box-shadow:inset 0 1px 2px rgba(0,0,0,0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider .ui-slider-handle{cursor:move;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #a4a3a8;z-index:10;position:absolute;width:18px;height:18px;margin-top:-7px;margin-left:-9px;background:#F9F9F9;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;top:0;left:0;-webkit-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1);box-shadow:inset 0 1px 0 #FFFFFF, 0 1px 1px rgba(0,0,0,0.1)}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-slider input[type="number"]{display:none}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-top{background:#F0F0F0;border:1px solid #D0D0D0;padding:10px;position:relative}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-top h3{font-size:13px;margin:0;padding:0 !important}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove{width:14px;height:14px;position:absolute;top:50%;margin-top:-7px;cursor:pointer;font-size:14px;line-height:14px;text-align:center}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:before{font-family:dashicons;color:#999999}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand{right:48px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:before{content:"\f140"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:focus:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-expand:hover:before{color:#50575D}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy{right:28px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:before{content:"\f105"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:focus:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-copy:hover:before{color:#50575D}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove{right:12px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:before{content:'\f158'}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:hover{background:#ff0000}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:focus:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-remove:hover:before{color:#FFFFFF}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items{background:#FCFCFC;border:1px solid #EEEEEE;border-top:0;border-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#FCFCFC;border-bottom:1px solid #EEEEEE}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{padding:10px;cursor:move;position:relative;background:#F6F6F6}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top:focus-within{background:#FAFAFA}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top h4{font-size:12px;margin:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item h4{font-size:15px;margin:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item:last-child{border-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top:1px solid #EEEEEE;display:none;padding:1px 10px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-add{padding:7px 10px;background:#F0F0F0;border:1px dashed #D0D0D0;font-size:12px;line-height:1em;text-align:center;cursor:pointer}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-add:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater-add:hover{background:#F4F4F4}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top{background:#eaf2f6;border-color:#c9d0d4}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top:focus-within{background:#eaf2f6}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-top h3{color:#42484b}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items{background:#f6fdff;border-color:#e8eff3}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item{background:#f8fdff;border-bottom-color:#e8eff3}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-top{background:#f0f8fc}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-items .siteorigin-widget-field-repeater-item .siteorigin-widget-field-repeater-item-form{border-top-color:#e8eff3}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add{background:#eaf2f6;border-color:#c9d0d4;color:#42484b}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-repeater .siteorigin-widget-field-repeater .siteorigin-widget-field-repeater-add:hover{background:#edf5f9}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper{background:#F0F0F0;border:1px solid #D0D0D0;padding:10px;display:block;margin-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper>label{display:inline;font-weight:bold}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper:before{float:left;margin:3px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper.siteorigin-widget-section-visible:before{content:"\f460"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .posts-container-label-wrapper span.sow-current-count{display:inline-block;border-radius:9px;background:#f92700;border:1px solid #da0900;line-height:14px;font-size:7px;width:17px;height:17px;text-align:center;vertical-align:middle;font-weight:bold;color:#FFFFFF;box-sizing:border-box;margin:1px 5px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label{background:#F0F0F0;border:1px solid #D0D0D0;line-height:1.4;padding:10px;display:block;margin-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label:focus{background:#F5F5F5}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label:before{float:left;margin:3px 6px 0 0;display:block;width:14px;height:14px;font-size:14px;line-height:1;font-family:"dashicons";content:"\f132"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget>label.siteorigin-widget-section-visible:before,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section>label.siteorigin-widget-section-visible:before{content:"\f460"}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .siteorigin-widget-section,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget .siteorigin-widget-section,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section .siteorigin-widget-section{padding:1px 10px;background:#FCFCFC;border:1px solid #EEEEEE;border-top:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-posts .siteorigin-widget-section.siteorigin-widget-section-hide,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-widget .siteorigin-widget-section.siteorigin-widget-section-hide,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-section .siteorigin-widget-section.siteorigin-widget-section-hide{display:none}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link{position:relative}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector{padding:20px;display:none;position:absolute;top:110%;width:360px;z-index:10;border:1px solid #c0c0c0;background:#F6F6F6;-webkit-box-shadow:0 2px 4px rgba(0,0,0,0.2);-moz-box-shadow:0 2px 4px rgba(0,0,0,0.2);box-shadow:0 2px 4px rgba(0,0,0,0.2);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .content-text-search,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .content-text-search{width:100%;margin-bottom:15px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts{margin:0;padding:0;background:#fff;max-height:300px;overflow-y:scroll;border:1px solid #e4e4e4}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li{cursor:pointer;padding:5px 10px;color:#32373c;border-bottom:1px solid #f1f1f1;margin:0;font-size:.95em}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li.selected,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li.selected,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li.selected,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li.selected{background:#e1edfa}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li:focus,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:hover,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li:hover,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:hover,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li:hover{background:#eaf2fa}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li:last-child,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li:last-child,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li:last-child,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li:last-child{border-bottom:0}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items li span,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items li span,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts li span,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts li span{font-size:.9em;display:inline-block;float:right;color:#999;margin-left:10px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts.loading{min-height:40px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts.loading{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .items.loading li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .items.loading li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .posts.loading li,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .posts.loading li{display:none}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .buttons{margin-top:15px;text-align:right}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .existing-content-selector .buttons a,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector .buttons a{display:inline-block}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .url-input-wrapper,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .url-input-wrapper{display:block;margin-right:130px}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .url-input-wrapper .siteorigin-widget-input,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .url-input-wrapper .siteorigin-widget-input{display:inline-block}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{float:right;line-height:28px;min-height:30px;width:120px;text-align:center}div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .existing-content-selector{right:0}div.siteorigin-widget-form .siteorigin-widget-description{clear:both}.siteorigin-widget-preview{display:block !important}.siteorigin-widget-help-link{display:block;margin:1em 0}.so-widgets-dialog .so-widgets-dialog-overlay{position:fixed;z-index:500000;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.7)}.so-widgets-dialog .so-widgets-toolbar,.so-widgets-dialog .so-widgets-dialog-frame{position:fixed;z-index:500001;-ms-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.so-widgets-dialog .so-widgets-toolbar{left:30px;right:30px;top:30px;height:50px;background:#fafafa;border-bottom:1px solid #D8D8D8}.so-widgets-dialog .so-widgets-toolbar h3{margin:15px 0 15px 20px}.so-widgets-dialog .so-widgets-toolbar .close{position:absolute;box-sizing:border-box;width:50px;height:50px;display:block;cursor:pointer;top:0;right:0;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;-o-transition:all .2s ease;transition:all .2s ease;background:#fafafa;border-left:1px solid #d8d8d8;border-bottom:1px solid #d8d8d8}.so-widgets-dialog .so-widgets-toolbar .close:focus,.so-widgets-dialog .so-widgets-toolbar .close:hover{background:#e9e9e9}.so-widgets-dialog .so-widgets-toolbar .close:focus .so-dialog-icon,.so-widgets-dialog .so-widgets-toolbar .close:hover .so-dialog-icon{color:#333333}.so-widgets-dialog .so-widgets-toolbar .close .dashicons{position:absolute;top:50%;left:50%;text-decoration:none;width:21px;height:21px;margin-left:-11px;margin-top:-10px;font-size:21px;color:#666666;text-align:center}.so-widgets-dialog .so-widgets-dialog-frame{top:80px;left:30px;right:30px;bottom:30px;background:#FFFFFF url("img/wpspin_light.gif") center center no-repeat}@media (-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.so-widgets-dialog .so-widgets-dialog-frame{background-image:url("img/wpspin_light-2x.gif");background-size:16px 16px}}.so-widgets-dialog .so-widgets-dialog-frame iframe{width:100%;height:100%}.widget-icon.so-widget-icon{background-size:cover;background-image:url("img/bundle-icon.png")}.widget-icon.so-widget-icon.so-block-editor-icon{width:20px;height:20px;display:inline-block}.block-editor .so-widget-placeholder,.block-editor-page .so-widget-placeholder{text-align:left}.block-editor .so-widget-placeholder>.components-placeholder__label,.block-editor-page .so-widget-placeholder>.components-placeholder__label{background:url("img/bundle-icon.png") no-repeat left;background-size:20px;padding-left:25px}.block-editor .so-widget-placeholder>.components-placeholder__fieldset,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container{width:100%}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .components-base-control__field select,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .components-base-control__field select{max-width:unset}.block-editor .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .siteorigin-widget-form.siteorigin-widget-form-main,.block-editor-page .so-widget-placeholder>.components-placeholder__fieldset .so-widget-block-container .siteorigin-widget-form.siteorigin-widget-form-main{min-width:unset}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select,.block-editor div.siteorigin-widget-form div.siteorigin-widget-field select.siteorigin-widget-input,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field select.siteorigin-widget-input{-webkit-appearance:none;background:#fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55%;background-size:auto;background-size:16px 16px;border:1px solid #8c8f94;border-radius:3px;box-shadow:none;color:#2c3338;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:14px;line-height:2;min-height:30px;padding:0 24px 0 8px;vertical-align:middle;width:auto}@media (max-width:399px){.block-editor div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field .siteorigin-widget-icon-selector>select{width:100%}}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field{text-align:left}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field input,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field input{padding:0 8px;line-height:2}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field input[type=checkbox],.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field input[type=checkbox]{background-color:#ffffff}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-autocomplete .select-content-button,.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{color:#2271b1;box-shadow:unset;font-size:13px;height:28px}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-icon .siteorigin-widget-icon-selector-current{height:37px}.block-editor div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-tinymce .wp-switch-editor,.block-editor-page div.siteorigin-widget-form div.siteorigin-widget-field.siteorigin-widget-field-type-tinymce .wp-switch-editor{box-sizing:content-box}.block-editor .so-widget-preview-container .so-widgets-spinner-container,.block-editor-page .so-widget-preview-container .so-widgets-spinner-container{text-align:center}.block-editor .so-widget-preview-container .so-widgets-spinner-container>span,.block-editor-page .so-widget-preview-container .so-widgets-spinner-container>span{display:inline-block}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form small{font-size:11.7px}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-input{margin-top:0}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form label,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-input,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form select.siteorigin-widget-input,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .button,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form input{color:#3c434a;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form select.siteorigin-widget-input{line-height:2}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-field.siteorigin-widget-field-type-link .select-content-button{line-height:28px}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-preview-button.button-secondary,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-help-link,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-form-notification a,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form a{color:#2271b1;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;font-size:13px;line-height:1.4}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-preview-button.button-secondary:hover,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-help-link:hover,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form .siteorigin-widget-form-notification a:hover,.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form div.siteorigin-widget-form a:hover{color:#0a4b78}.widgets-php.block-editor-page .wp-block-legacy-widget__edit-form a.siteorigin-widget-preview-button.button-secondary{line-height:2.15384615}
base/inc/fields/base.class.php CHANGED
@@ -93,7 +93,7 @@ abstract class SiteOrigin_Widget_Field_Base {
93
  */
94
  protected $optional;
95
  /**
96
- * @var bool Is this field required.
97
  */
98
  protected $required;
99
  /**
@@ -327,8 +327,9 @@ abstract class SiteOrigin_Widget_Field_Base {
327
  if( !empty( $this->optional ) ) {
328
  echo '<span class="field-optional">(' . __('Optional', 'so-widgets-bundle') . ')</span>';
329
  }
330
- if( !empty( $this->required ) ) {
331
- echo '<span class="field-required">(' . __('Required', 'so-widgets-bundle') . ')</span>';
 
332
  }
333
  ?>
334
  </label>
@@ -402,6 +403,10 @@ abstract class SiteOrigin_Widget_Field_Base {
402
  */
403
  protected function render_after_field( $value, $instance ) {
404
  $this->render_field_description();
 
 
 
 
405
  }
406
 
407
  /**
93
  */
94
  protected $optional;
95
  /**
96
+ * @var bool|string Is this field required.
97
  */
98
  protected $required;
99
  /**
327
  if( !empty( $this->optional ) ) {
328
  echo '<span class="field-optional">(' . __('Optional', 'so-widgets-bundle') . ')</span>';
329
  }
330
+ if ( ! empty( $this->required ) ) {
331
+ /* translators: Used to indicate field as required. */
332
+ echo '<span class="field-required">' . __( '*', 'so-widgets-bundle' ) . '</span>';
333
  }
334
  ?>
335
  </label>
403
  */
404
  protected function render_after_field( $value, $instance ) {
405
  $this->render_field_description();
406
+ if ( ! empty( $this->required ) && is_string( $this->required ) ) {
407
+ /* translators: Used to indicate field as required. */
408
+ echo '<span class="field-required-message">' . esc_html( $this->required ) . '</span>';
409
+ }
410
  }
411
 
412
  /**
base/inc/fields/color.class.php CHANGED
@@ -5,6 +5,15 @@
5
  */
6
  class SiteOrigin_Widget_Field_Color extends SiteOrigin_Widget_Field_Text_Input_Base {
7
 
 
 
 
 
 
 
 
 
 
8
  protected function get_input_classes() {
9
  $input_classes = parent::get_input_classes();
10
  $input_classes[] = 'siteorigin-widget-input-color';
@@ -16,6 +25,19 @@ class SiteOrigin_Widget_Field_Color extends SiteOrigin_Widget_Field_Text_Input_B
16
  if ( ! empty( $this->default ) ) {
17
  $data_attributes['default-color'] = $this->default;
18
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  return $data_attributes;
20
  }
21
 
@@ -30,4 +52,4 @@ class SiteOrigin_Widget_Field_Color extends SiteOrigin_Widget_Field_Text_Input_B
30
  }
31
  return $sanitized_value;
32
  }
33
- }
5
  */
6
  class SiteOrigin_Widget_Field_Color extends SiteOrigin_Widget_Field_Text_Input_Base {
7
 
8
+ /**
9
+ * An optional array containing the color hexes to be used as the palette.
10
+ * If set to false, no color palettes will be output.
11
+ *
12
+ * @access protected
13
+ * @var array|bool
14
+ */
15
+ protected $palettes;
16
+
17
  protected function get_input_classes() {
18
  $input_classes = parent::get_input_classes();
19
  $input_classes[] = 'siteorigin-widget-input-color';
25
  if ( ! empty( $this->default ) ) {
26
  $data_attributes['default-color'] = $this->default;
27
  }
28
+
29
+ if ( isset( $this->palettes ) ) {
30
+ if ( ! empty( $this->palettes ) && is_array( $this->palettes ) ) {
31
+ $valid_palette = array();
32
+ $valid_palette = array_filter( $this->palettes, 'sanitize_hex_color' );
33
+ if ( ! empty( $valid_palette ) ) {
34
+ $data_attributes['palettes'] = wp_json_encode( $valid_palette );
35
+ }
36
+ } else {
37
+ $data_attributes['palettes'] = $this->palettes;
38
+ }
39
+ }
40
+
41
  return $data_attributes;
42
  }
43
 
52
  }
53
  return $sanitized_value;
54
  }
55
+ }
base/inc/fields/image-size.class.php CHANGED
@@ -81,6 +81,8 @@ class SiteOrigin_Widget_Field_Image_Size extends SiteOrigin_Widget_Field_Select
81
  </div>
82
  <?php
83
  }
 
 
84
  }
85
 
86
  public function get_custom_size_setting_prefix( $base_name ) {
81
  </div>
82
  <?php
83
  }
84
+
85
+ parent::render_after_field( $value, $instance );
86
  }
87
 
88
  public function get_custom_size_setting_prefix( $base_name ) {
base/js/admin.js CHANGED
@@ -277,6 +277,11 @@ var sowbForms = window.sowbForms || {};
277
  if (colorField.data('defaultColor')) {
278
  colorFieldOptions.defaultColor = colorField.data('defaultColor');
279
  }
 
 
 
 
 
280
  colorField.wpColorPicker(colorFieldOptions);
281
  });
282
 
@@ -491,7 +496,14 @@ var sowbForms = window.sowbForms || {};
491
  }
492
 
493
  // Return an array that has the new states added to the array
494
- return $.extend(currentStates, sowEmitters[emitter.callback](val, emitter.args));
 
 
 
 
 
 
 
495
  };
496
 
497
  // Run the states through the state emitters
@@ -1516,6 +1528,92 @@ var sowbForms = window.sowbForms || {};
1516
  }
1517
  };
1518
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1519
  // When we click on a widget top
1520
  $('.widgets-holder-wrap').on('click', '.widget:has(.siteorigin-widget-form-main) .widget-top', function () {
1521
  var $$ = $(this).closest('.widget').find('.siteorigin-widget-form-main');
@@ -1546,6 +1644,7 @@ var sowbForms = window.sowbForms || {};
1546
  }
1547
  });
1548
 
 
1549
  $(function () {
1550
  $(document).trigger('sowadminloaded');
1551
  });
277
  if (colorField.data('defaultColor')) {
278
  colorFieldOptions.defaultColor = colorField.data('defaultColor');
279
  }
280
+
281
+ if ( colorField.data( 'palettes' ) ) {
282
+ colorFieldOptions.palettes = colorField.data( 'palettes' );
283
+ }
284
+
285
  colorField.wpColorPicker(colorFieldOptions);
286
  });
287
 
496
  }
497
 
498
  // Return an array that has the new states added to the array
499
+ return $.extend(
500
+ currentStates,
501
+ sowEmitters[ emitter.callback ] (
502
+ val,
503
+ emitter.args,
504
+ $$
505
+ )
506
+ );
507
  };
508
 
509
  // Run the states through the state emitters
1528
  }
1529
  };
1530
 
1531
+ /**
1532
+ * Look for and valid any fields that are required.
1533
+ */
1534
+ sowbForms.validateFields = function( form, showPrompt = true ) {
1535
+ var valid = true;
1536
+ var devValidation = $( document ).triggerHandler(
1537
+ 'sow_validate_widget_data',
1538
+ [
1539
+ valid,
1540
+ form,
1541
+ // Widget ID.
1542
+ form.find( '.siteorigin-widget-form' ).data( 'id-base' )
1543
+ ]
1544
+ );
1545
+
1546
+ if ( typeof devValidation == 'boolean' && ! devValidation ) {
1547
+ valid = false;
1548
+ }
1549
+
1550
+ if ( valid ) {
1551
+ var missingRequired = false;
1552
+ form.find( '.siteorigin-widget-field-is-required' ).each( function() {
1553
+ var $$ = $( this );
1554
+ var $field = $$.find( '.siteorigin-widget-input' );
1555
+
1556
+ // Check if this field is inside of a Repeater's HTML clone field.
1557
+ if ( $field.parents( '.siteorigin-widget-field-repeater-item-html' ).length ) {
1558
+ return;
1559
+ }
1560
+
1561
+ if (
1562
+ ! $field.val() ||
1563
+ (
1564
+ $$.hasClass( 'siteorigin-widget-field-type-checkboxes' ) &&
1565
+ ! $field.prop( 'checked' )
1566
+ )
1567
+ ) {
1568
+ missingRequired = true;
1569
+ $$.addClass( 'sow-required-error' );
1570
+ }
1571
+ $field.on( 'change', function( e ) {
1572
+ $$.removeClass( 'sow-required-error' );
1573
+ } )
1574
+ } );
1575
+
1576
+ if (
1577
+ missingRequired &&
1578
+ (
1579
+ ! showPrompt ||
1580
+ ! confirm( soWidgets.missing_required )
1581
+ )
1582
+ ) {
1583
+ valid = false;
1584
+ }
1585
+ }
1586
+
1587
+ return valid;
1588
+ }
1589
+
1590
+ // Validate widget added using Page Builder.
1591
+ if ( typeof panelsOptions == 'object' ) {
1592
+ $( document ).on( 'close_dialog_validation', function( e, values, widget, id, instance ) {
1593
+ return sowbForms.validateFields( $( instance.el ) );
1594
+ } );
1595
+ }
1596
+
1597
+ // Validate widget added using Classic Widgets & Customizer
1598
+ $( 'body' ).on( 'click', '.widget-control-save', function( e ) {
1599
+ var $form = $( this ).parents( '.widget.open' ).find( '.widget-content' );
1600
+ if ( $form.length ) {
1601
+ if ( ! sowbForms.validateFields( $form ) ) {
1602
+ e.preventDefault();
1603
+ e.stopPropagation();
1604
+ }
1605
+ }
1606
+ } );
1607
+
1608
+ // Further widget validation code for Customizer.
1609
+ if ( typeof wp.customize != 'undefined' ) {
1610
+ jQuery( document ).on( 'widget-added widget-updated widget-synced', function( e, widget, form = false ) {
1611
+ if ( form.length ) {
1612
+ sowbForms.validateFields( form )
1613
+ }
1614
+ } );
1615
+ }
1616
+
1617
  // When we click on a widget top
1618
  $('.widgets-holder-wrap').on('click', '.widget:has(.siteorigin-widget-form-main) .widget-top', function () {
1619
  var $$ = $(this).closest('.widget').find('.siteorigin-widget-form-main');
1644
  }
1645
  });
1646
 
1647
+
1648
  $(function () {
1649
  $(document).trigger('sowadminloaded');
1650
  });
base/js/admin.min.js CHANGED
@@ -1 +1 @@
1
- var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each((function(i,t){var r,n=e(t),a=!0,s=e("body"),o=n.find("input[name]");if(o.length&&-1!==o.attr("name").indexOf("__i__"))return this;if(n.is(".siteorigin-widget-form-main")){if(!0===n.data("sow-form-setup"))return!0;if(s.hasClass("widgets-php")&&!s.hasClass("block-editor-page")&&!n.is(":visible")&&0===n.closest(".panel-dialog").length)return!0;n.on("sowstatechange",(function(i,t,r){n.find("[data-state-handler]").each((function(){var i,n,s,o,d,l,g=e(this),f=e.extend({},g.data("state-handler"),a?g.data("state-handler-initial"):{});if(0===Object.keys(f).length)return!0;var p={},c=sowbForms.getContainerFieldId(g,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==c){var u={};for(var w in f)u[w.replace("{$repeater}",c)]=f[w];f=u}var m=sowbForms.getContainerFieldId(g,"widget",".siteorigin-widget-widget");if(!1!==m){var v={};for(var h in f){var b=h.match(/_else\[(.*)\]|(.*)\[(.*)\]/);v[b&&b.length&&void 0===b[1]?b[2]+"_"+m+"["+b[3]+"]":"_else["+b[1]+"_"+m+"]"]=f[h]}f=v}for(var y in f)if(d=!1,null!==(i=y.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(n={group:"default",name:"",multi:!1},void 0!==i[2]?(n.group=i[1],n.name=i[3]):n.name=i[0],n.multi=void 0!==i[4],"_else"===n.group)n.group=n.name,n.name="",d=n.group===t&&void 0===p[n.group];else{l=n.name.split(",").map((function(e){return e.trim()}));for(var k=0;k<l.length&&!(d=n.group===t&&l[k]===r);k++);}if(d){s=f[y],n.multi||(s=[s]);for(k=0;k<s.length;k++){var F=!1;if((o=void 0!==s[k][1]&&Boolean(s[k][1])?g.find(s[k][1]):g).prop("style").length&&("show"==s[k][0]?(o.fadeIn("fast"),F=!0):"hide"==s[k][0]&&(o.fadeOut("fast"),F=!0)),F||o[s[k][0]].apply(o,void 0!==s[k][2]?s[k][2]:[]),o.is(".siteorigin-widget-field:visible"))if(o.is(".siteorigin-widget-field-type-section"))o.find("> .siteorigin-widget-section > .siteorigin-widget-field").trigger("sowsetupformfield");else o.trigger("sowsetupformfield")}p[n.group]=!0}}}))})),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");if(d.find(".dashicons-dismiss").on("click",(function(){var i=e(this);e.get(i.data("dismiss-url")),d.slideUp("normal",(function(){d.remove()}))})),!n.data("backupDisabled")){var l=n.find("> .siteorigin-widgets-form-id").val(),g=n.find("> .siteorigin-widgets-form-timestamp"),f=parseInt(g.val()||0),p=JSON.parse(sessionStorage.getItem(l));p&&(p._sow_form_timestamp>f?sowbForms.displayNotice(n,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(r,p),e.slideUp("fast",(function(){e.remove()}))}},{label:soWidgets.backup.dismiss,callback:function(e){e.slideUp("fast",(function(){sessionStorage.removeItem(l),e.remove()}))}}]):sessionStorage.removeItem(l)),n.on("change",(function(){g.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(n);sessionStorage.setItem(l,JSON.stringify(e))}))}}else r=n.closest(".siteorigin-widget-form-main");r.find("> .siteorigin-widgets-form-id").val();var c=n.find("> .siteorigin-widget-field");c.find("> .siteorigin-widget-section").sowSetupForm();var u=c.find("> .siteorigin-widget-widget");u.find("> .siteorigin-widget-section").sowSetupForm(),u.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),c.find(".siteorigin-widget-input").each((function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))})),c.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),c.find("> .siteorigin-widget-input-color").each((function(){var i=e(this),t={change:function(i,t){setTimeout((function(){e(i.target).trigger("change")}),100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.wpColorPicker(t)}));var w=function(i){("keyup"!=i.type||sowbForms.isEnter(i))&&(e(this).toggleClass("siteorigin-widget-section-visible"),e(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",(function(){(e(window).trigger("resize"),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible"))&&e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})))};c.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").on("click keyup",w).attr("tabinex",0),c.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").on("click keyup",w),c.filter(".siteorigin-widget-field-type-slider").each((function(){var i=e(this),t=i.find('input[type="number"]'),r=i.find(".siteorigin-widget-value-slider");r.slider({max:parseFloat(t.attr("max")),min:parseFloat(t.attr("min")),step:parseFloat(t.attr("step")),value:parseFloat(t.val()),slide:function(e,r){t.val(parseFloat(r.value)),t.trigger("change"),i.find(".siteorigin-widget-slider-value").html(r.value)}}),t.on("change",(function(e,n){n&&n.silent||(r.slider("value",parseFloat(t.val())),i.find(".siteorigin-widget-slider-value").html(t.val()))}))})),c.filter(".siteorigin-widget-field-type-link").each((function(){var i=e(this),t=function(){var t=i.find(".content-text-search"),r={action:"so_widgets_search_posts",query:t.val(),postTypes:t.data("postTypes")};"string"==typeof icl_this_lang&&(r.language=icl_this_lang);var n=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,r,(function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),n.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]).attr("tabindex",0));n.removeClass("loading")}))};i.find(".select-content-button, .button-close").on("click",(function(r){r.preventDefault(),e(this).trigger("blur");var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&t()})),i.on("click keyup",".posts li",(function(t){if(t.preventDefault(),"keyup"!=t.type||sowbForms.isEnter(t)){var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.trigger("change"),i.find(".existing-content-selector").toggle()}}));var r=null;i.find(".content-text-search").on("keyup",(function(){null!==r&&clearTimeout(r),r=setTimeout((function(){t()}),500)}))})),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&c.filter(".siteorigin-widget-field-type-builder").each((function(){e(this).find("> .siteorigin-page-builder-field").each((function(){var i=e(this);i.soPanelsSetupBuilderWidget({builderType:i.data("type")})}))}));var m=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var n=function(t,r){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return r;if(i.is('[type="radio"]')&&!i.is(":checked"))return r;var n=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");!1!==n&&(t.args=t.args.map((function(e){return e.replace("{$repeater}",n)})));var a=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");!1===a||t.hasOwnProperty("widgetFieldId")||(t.widgetFieldId=a,t.args=t.args.map((function(e){return e="conditional"===t.callback?e.replace(/(.*)(\[.*)/,"$1_"+a+"$2"):e+"_"+a})));var s=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return i.parent().hasClass("siteorigin-widget-field-type-media")&&"conditional"==t.callback&&(s||(s=i.hasClass("media-fallback-external")?i.prev().val():fallbackField=i.next().val()),0==s&&(s="")),e.extend(r,sowEmitters[t.callback](s,t.args))},a={default:""};void 0===t.length&&(t=[t]);for(var s=0;s<t.length;s++)a=n(t[s],a);var o=r.data("states");for(var d in void 0===o&&(o={default:""}),a)void 0!==o[d]&&a[d]===o[d]||(o[d]=a[d],r.trigger("sowstatechange",[d,a[d]]));r.data("states",o)}};c.filter("[data-state-emitter]").each((function(){var i=e(this).find(".siteorigin-widget-input");i.on("keyup change",m),i.each((function(){var i=e(this);i.is(":radio")?i.is(":checked")&&m.call(i[0]):m.call(i[0])}))})),n.trigger("sowsetupform",c).data("sow-form-setup",!0),c.trigger("sowsetupformfield"),n.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(s.hasClass("wp-customizer")||s.hasClass("widgets-php"))&&n.closest(".ui-sortable").on("sortstop",(function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),a=!1}))},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").on("click",(function(t){t.preventDefault();var r=sowbForms.getWidgetFormValues(i),n=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");n.find('input[name="data"]').val(JSON.stringify(r)),n.find('input[name="class"]').val(i.data("class")),n.find("iframe").on("load",(function(){e(this).css("visibility","visible")})),n.find("form").trigger("submit"),n.find(".close").on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&n.remove()}))}))},e.fn.sowSetupRepeater=function(){return e(this).each((function(i,t){var r=e(t),n=r.find(".siteorigin-widget-field-repeater-items"),a=r.data("repeater-name");n.on("updateFieldPositions",(function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each((function(i,t){e(t).find(".siteorigin-widget-input").each((function(t,r){var n=e(r).data("repeater-positions");void 0===n&&(n={}),n[a]=i,e(r).data("repeater-positions",n)}))})),i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t),n=r.data("repeater-positions");if(void 0!==n){var a=r.attr("data-original-name");if(a||(r.attr("data-original-name",r.attr("name")),a=r.attr("name")),!a)return;if(n)for(var s in n)a=a.replace("#"+s+"#",n[s]);r.attr("name",a)}})),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t);r.prop("checked",r.prop("defaultChecked"))})),i.data("initialSetup",!0));var n=r.data("scroll-count")?parseInt(r.data("scroll-count")):0;if(n>0&&t.length>n){var s=t.first().outerHeight();i.css("max-height",s*n+"px"),i.css("overflow","auto")}else i.css("max-height","").css("overflow","")})),n.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){n.find('input[type="radio"].siteorigin-widget-input').attr("name",""),n.trigger("updateFieldPositions"),r.trigger("change")},sortstop:function(i,t){t.item.is(".siteorigin-widget-field-repeater-item")?t.item.find("> .siteorigin-widget-field-repeater-item-form").each((function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})):t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");r.trigger("change")}}),n.trigger("updateFieldPositions"),r.find("> .siteorigin-widget-field-repeater-add").disableSelection().on("click keyup",(function(i){i.preventDefault(),("keyup"!=i.type||sowbForms.isEnter(i))&&r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",(function(){e(window).trigger("resize")}))})),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").on("click",(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",(function(){e(window).trigger("resize")}))}))}))},e.fn.sowAddRepeaterItem=function(){return e(this).each((function(i,t){var r=e(t),n=r.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+r.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each((function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))}));var s="";a.find("> .siteorigin-widget-field").each((function(i,t){var r=t.outerHTML;e(t).is(".siteorigin-widget-field-type-repeater")||(r=r.replace(/_id_/g,n)),s+=r}));var o=void 0!==r.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable"></div>').append(e('<div class="siteorigin-widget-field-repeater-item-top" tabindex="0" />').append(e('<div class="siteorigin-widget-field-expand" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" tabindex="0" />')).append(e("<h4></h4>").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form"></div>').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).trigger("resize")})),r.trigger("change")}))},e.fn.sowRemoveRepeaterItem=function(){return e(this).each((function(i,t){var r=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),r.sortable("refresh").trigger("updateFieldPositions"),e(t).trigger("change")}))},e.fn.sowSetupRepeaterItems=function(){return e(this).each((function(i,t){var r=e(t);if(void 0===r.data("sowrepeater-actions-setup")){var n=r.closest(".siteorigin-widget-field-repeater"),a=r.find("> .siteorigin-widget-field-repeater-item-top"),s=n.data("item-label"),o=r.parents(".siteorigin-widget-field-repeater").data("item-name");if(s&&(s.hasOwnProperty("selector")||s.hasOwnProperty("selectorArray"))){var d=function(){var e,i,t;if(s.hasOwnProperty("selectorArray"))for(var n=0;n<s.selectorArray.length&&(e=(t=s.selectorArray[n]).hasOwnProperty("valueMethod")&&t.valueMethod?t.valueMethod:"val",!(i=r.find(t.selector)[e]()));n++);else e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=r.find(s.selector)[e]();if(i)i.length>80&&(i=i.substr(0,79)+"...");else if(i=o,s.increment){var d=r.index();d++,isNaN(d)||("before"==s.increment?i=d+" "+i:i+=" "+d)}a.find("h4").text(i)};d();var l=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";r.on(l,d)}a.on("click keyup",(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&("keyup"!=i.type||sowbForms.isEnter(i))&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",(function(){e(window).trigger("resize"),e(this).is(":visible")?(e(this).trigger("slideToggleOpenComplete"),e(this).find(".siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field,> .siteorigin-widget-field").each((function(i,t){var r=e(t);r.is(":visible")&&r.trigger("sowsetupformfield")}))):e(this).trigger("slideToggleCloseComplete")})))})),a.find(".siteorigin-widget-field-remove").on("click keyup",(function(i,t){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var a=e(this).closest(".siteorigin-widget-field-repeater-items"),s=e(this).closest(".siteorigin-widget-field-repeater-item"),o=function(){s.remove(),a.sortable("refresh").trigger("updateFieldPositions"),e(window).trigger("resize"),n.trigger("change")};t&&t.silent?o():confirm(soWidgets.sure)&&s.slideUp("fast",o),"string"==typeof r.closest(".siteorigin-widget-field-repeater").data("item-label").increment&&r.parent().find(".siteorigin-widget-field-repeater-item").trigger("change")}})),a.find(".siteorigin-widget-field-copy").on("click keyup",(function(i){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var t=e(this).closest(".siteorigin-widget-form-main"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=n.clone(),s=n.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each((function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var g=tinymce.get(s);if(g){var f=g.getContent();_.isEmpty(f)?-1!==f.search("<")&&-1===f.search(">")&&$textarea.val(f.replace(/</g,"")):i.val(f)}}else if(i.is(".wp-color-picker")){var p=i.closest(".wp-picker-container"),c=i.closest(".siteorigin-widget-field");p.remove(),c.append(i.remove())}else{var u=s?n.find("#"+s):n.find('[name="'+l+'"]');u.length&&null!=u.val()&&i.val(u.val())}if(s){var w,m;if(i.is('[type="radio"]')){w=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[w]){var h={};d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").filter((function(i,t){var r=e(t).attr("name");return!h[r]&&(h[r]=!0,!0)})).length+1}var b=w+"-"+d[w];m=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else F=new RegExp("-\\d+$"),w=s.replace(F,""),d[w]||(d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").length+1),m=w+"-"+d[w]++;if(i.is(".wp-editor-area")&&(m+=Math.floor(1e3*Math.random()),i.data("tinymce-id",m)),i.attr("id",m),i.is(".wp-editor-area")){var y=i.closest(".siteorigin-widget-tinymce-container"),k=y.data("media-buttons");if(k&&k.html){var F=new RegExp(s,"g");k.html=k.html.replace(F,m),y.data("media-buttons",k)}}a.find("label[for="+s+"]").attr("for",m),a.find("[id*="+s+"]").each((function(){var i=e(this).attr("id").replace(s,m);e(this).attr("id",i)})),"undefined"!=typeof tinymce&&tinymce.get(m)&&tinymce.get(m).remove()}var C=n.parents(".siteorigin-widget-field-repeater").length,x=e("body");(x.hasClass("wp-customizer")||x.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(C+=1);var E=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(C-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",E),i.data("original-name",E)})),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",(function(){e(window).trigger("resize")})),"string"==typeof r.closest(".siteorigin-widget-field-repeater").data("item-label").increment?r.parent().find(".siteorigin-widget-field-repeater-item").trigger("change"):r.trigger("change")}})),r.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),r.data("sowrepeater-actions-setup",!0)}}))},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1].split("]["),a=n.length?r:null;n.length;)a=a[n.shift()];return a[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},(function(e){window.sowVars[t]=e,r(window.sowVars[t][i])})):r(window.sowVars[t][i])},sowbForms.getWidgetIdBase=function(e){return e.data("id-base")},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each((function(){var i=e(this);try{var r=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(r))return!0;var n=(r=r[1]).split("][");n=n.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),(function(i,t){return e(i).val()})))}else s=i.val();for(var g=0;g<n.length;g++)g===n.length-1?""===n[g]?a.push(s):a[n[g]]=s:(_.isUndefined(a[n[g]])&&(_.isNumber(n[g+1])||""===n[g+1]?a[n[g]]=[]:a[n[g]]={}),a=a[n[g]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}})),t},sowbForms.isEnter=function(i,t=!1){if(13==i.which){if(!t)return!0;e(i.target).trigger("click")}},sowbForms.setWidgetFormValues=function(i,t,r,n){r=r||!1,n=void 0!==n&&n||void 0===n;var a=0,s=function(i,t){10!=++a?(i.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each((function(i,n){var a=e(this),o=a.find("> .siteorigin-widget-field-repeater"),d=o.data("repeaterName"),l=t.hasOwnProperty(d)?t[d]:null;if(a.parent().is(".siteorigin-widget-section")){var g=o.data("element-name");g=g.replace(/\[#.*?#\]/g,"");for(var f=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(g)[1].split("]["),p=f.length?t:null;f.length;){var c=f.shift();p=p.hasOwnProperty(c)?p[c]:p}l=p}if(l&&Array.isArray(l)){var u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),w=l.length,m=u.length;if(w>m)for(var v=0;v<w-m;v++)o.find("> .siteorigin-widget-field-repeater-add").trigger("click");else if(!r&&w<m)for(var h=w;h<m;h++){e(u.eq(h)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var b=0;b<u.length;b++)u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),s(u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),l[b])}})),--a):--a};s(i,t),$fields=i.find("*[name]");var o=function(e){return e.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e})),e},d=function(e,i){for(var t,n=e,a=0;a<i.length;a++){if(!n.hasOwnProperty(i[a])){if(r)continue;break}a===i.length-1?t=n[i[a]]:n=n[i[a]]}return{sub:n,value:t}},l=function(e,i){if(i){if(e!==i)return!0}else if(e)return!0;return!1},g=function(i,a){for(;i<a.length;i++){if(0!=i&&i+1<a.length&&i%20==0)return void setTimeout(g,150,i+1,a);var s=e(a[i]),f=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(s.attr("name"));if(null==f)return!0;if(!(s.hasClass("sow-measurement-select-unit")||s.attr("data-presets")||s.parent().hasClass("siteorigin-widget-field-type-posts")||"hidden"==s.attr("type"))){var p=(f=f[1]).split("][");p=o(p);var c=d(t,p);if((!r||""!=c.value)&&void 0!==c.value){var u=!1;if("checkbox"===s.attr("type")&&s.is(":checked")!=c.value)s.prop("checked",c.value),u=!0;else if("radio"===s.attr("type"))s.prop("checked",c.value===s.val()),u=!0;else if("TEXTAREA"===s.prop("tagName")&&s.hasClass("wp-editor-area")){var w=null;"undefined"!=typeof tinyMCE&&(w=tinyMCE.get(s.attr("id"))),null!==w&&"function"==typeof w.setContent&&!w.isHidden()&&s.parent().is(":visible")?l(w.getContent(),c.value)&&(w.initialized?(w.setContent(c.value),u=!0):(w.on("init",(function(){w.setContent(c.value)})),u=!0)):l(s.val(),c.value)&&(s.val(c.value),u=!0)}else if(s.is(".panels-data")){if(l(s.val(),c.value)){s.val(c.value);var m=s.data("builder");m&&(m.setDataField(s),u=!0)}}else l(s.val(),c.value)&&(s.val(c.value),u=!0);if(n&&u){if("preset"==n&&!s.hasClass("siteorigin-widget-input-color")&&!s.hasClass("siteorigin-widget-input-slider")&&!s.is("siteorigin-widget-input-select")&&"checkbox"==!s.attr("type"))continue;s.trigger("change"),this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}}}}};g(0,$fields)},sowbForms.displayNotice=function(i,t,r,n,a){var s=e('<div class="siteorigin-widget-form-notification"></div>');t&&s.append("<span>"+t+"</span>"),n&&n.length&&n.forEach((function(i){var t="";i.classes&&i.classes.length&&(t=" "+i.classes.join(" "));var r=e('<a class="button button-small'+t+'" tabindex="0">'+i.label+"</a>");i.url&&r.attr("href",i.url),i.callback&&r.on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&i.callback(s)})),s.append(r)})),r&&s.append("<div><small>"+r+"</small></div>"),a?a.before(s):i.prepend(s)},e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",(function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout((function(){i.sowSetupForm()}),200)}));var i=e("body");e(document).on("widget-added",(function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()})),i.hasClass("block-editor-page")&&e(document).on("panels_setup_preview",(function(){window.hasOwnProperty("sowb")&&e(sowb).trigger("setup_widgets",{preview:!0})})),e(document).on("open_dialog",(function(e,i){i.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")&&i.$el.find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),e((function(){e(document).trigger("sowadminloaded")}))}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$").exec(e);if(null===t)return!1;var r="",n="default";return void 0!==t[3]?(n=t[1],r=t[3]):r=t[1],{match:t[4].trim(),group:n,state:r}},_checker:function(e,i,t,r){var n,a={};void 0===i.length&&(i=[i]);for(var s=0;s<i.length;s++)!1!==(n=sowEmitters._match(i[s],t))&&("_true"===n.match||r(e,i,n.match))&&(a[n.group]=n.state);return a},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},r=0;r<i.length;r++)""===i[r]&&(i[r]="default"),t[i[r]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",(function(val,args,match){return eval(match)}))},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",(function(e,i,t){return-1!==t.split(",").map((function(e){return e.trim()})).indexOf(e)}))}};window.sowbForms=sowbForms;
1
+ var sowbForms=window.sowbForms||{};!function(e){e.fn.sowSetupForm=function(){return e(this).each((function(i,t){var r,n=e(t),a=!0,s=e("body"),o=n.find("input[name]");if(o.length&&-1!==o.attr("name").indexOf("__i__"))return this;if(n.is(".siteorigin-widget-form-main")){if(!0===n.data("sow-form-setup"))return!0;if(s.hasClass("widgets-php")&&!s.hasClass("block-editor-page")&&!n.is(":visible")&&0===n.closest(".panel-dialog").length)return!0;n.on("sowstatechange",(function(i,t,r){n.find("[data-state-handler]").each((function(){var i,n,s,o,d,l,g=e(this),f=e.extend({},g.data("state-handler"),a?g.data("state-handler-initial"):{});if(0===Object.keys(f).length)return!0;var c={},p=sowbForms.getContainerFieldId(g,"repeater",".siteorigin-widget-field-repeater-item");if(!1!==p){var u={};for(var w in f)u[w.replace("{$repeater}",p)]=f[w];f=u}var m=sowbForms.getContainerFieldId(g,"widget",".siteorigin-widget-widget");if(!1!==m){var v={};for(var h in f){var b=h.match(/_else\[(.*)\]|(.*)\[(.*)\]/);v[b&&b.length&&void 0===b[1]?b[2]+"_"+m+"["+b[3]+"]":"_else["+b[1]+"_"+m+"]"]=f[h]}f=v}for(var y in f)if(d=!1,null!==(i=y.match(/^([a-zA-Z0-9_-]+)(\[([a-zA-Z0-9_\-,]+)\])?(\[\])?$/))){if(n={group:"default",name:"",multi:!1},void 0!==i[2]?(n.group=i[1],n.name=i[3]):n.name=i[0],n.multi=void 0!==i[4],"_else"===n.group)n.group=n.name,n.name="",d=n.group===t&&void 0===c[n.group];else{l=n.name.split(",").map((function(e){return e.trim()}));for(var k=0;k<l.length&&!(d=n.group===t&&l[k]===r);k++);}if(d){s=f[y],n.multi||(s=[s]);for(k=0;k<s.length;k++){var F=!1;if((o=void 0!==s[k][1]&&Boolean(s[k][1])?g.find(s[k][1]):g).prop("style").length&&("show"==s[k][0]?(o.fadeIn("fast"),F=!0):"hide"==s[k][0]&&(o.fadeOut("fast"),F=!0)),F||o[s[k][0]].apply(o,void 0!==s[k][2]?s[k][2]:[]),o.is(".siteorigin-widget-field:visible"))if(o.is(".siteorigin-widget-field-type-section"))o.find("> .siteorigin-widget-section > .siteorigin-widget-field").trigger("sowsetupformfield");else o.trigger("sowsetupformfield")}c[n.group]=!0}}}))})),n.sowSetupPreview(),r=n;var d=n.find(".siteorigin-widget-teaser");if(d.find(".dashicons-dismiss").on("click",(function(){var i=e(this);e.get(i.data("dismiss-url")),d.slideUp("normal",(function(){d.remove()}))})),!n.data("backupDisabled")){var l=n.find("> .siteorigin-widgets-form-id").val(),g=n.find("> .siteorigin-widgets-form-timestamp"),f=parseInt(g.val()||0),c=JSON.parse(sessionStorage.getItem(l));c&&(c._sow_form_timestamp>f?sowbForms.displayNotice(n,soWidgets.backup.newerVersion,soWidgets.backup.replaceWarning,[{label:soWidgets.backup.restore,callback:function(e){sowbForms.setWidgetFormValues(r,c),e.slideUp("fast",(function(){e.remove()}))}},{label:soWidgets.backup.dismiss,callback:function(e){e.slideUp("fast",(function(){sessionStorage.removeItem(l),e.remove()}))}}]):sessionStorage.removeItem(l)),n.on("change",(function(){g.val((new Date).getTime());var e=sowbForms.getWidgetFormValues(n);sessionStorage.setItem(l,JSON.stringify(e))}))}}else r=n.closest(".siteorigin-widget-form-main");r.find("> .siteorigin-widgets-form-id").val();var p=n.find("> .siteorigin-widget-field");p.find("> .siteorigin-widget-section").sowSetupForm();var u=p.find("> .siteorigin-widget-widget");u.find("> .siteorigin-widget-section").sowSetupForm(),u.filter(":not(:has(> .siteorigin-widget-section))").sowSetupForm(),p.find(".siteorigin-widget-input").each((function(i,t){null===e(t).data("original-name")&&e(t).data("original-name",e(t).attr("name"))})),p.find("> .siteorigin-widget-field-repeater").sowSetupRepeater(),n.find(".siteorigin-widget-field-repeater-item").sowSetupRepeaterItems(),p.find("> .siteorigin-widget-input-color").each((function(){var i=e(this),t={change:function(i,t){setTimeout((function(){e(i.target).trigger("change")}),100)}};i.data("defaultColor")&&(t.defaultColor=i.data("defaultColor")),i.data("palettes")&&(t.palettes=i.data("palettes")),i.wpColorPicker(t)}));var w=function(i){("keyup"!=i.type||sowbForms.isEnter(i))&&(e(this).toggleClass("siteorigin-widget-section-visible"),e(this).parent().find("> .siteorigin-widget-section, > .siteorigin-widget-widget > .siteorigin-widget-section").slideToggle("fast",(function(){(e(window).trigger("resize"),e(this).find("> .siteorigin-widget-field-container-state").val(e(this).is(":visible")?"open":"closed"),e(this).is(":visible"))&&e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})))};p.filter(".siteorigin-widget-field-type-widget, .siteorigin-widget-field-type-section").find("> label").on("click keyup",w).attr("tabinex",0),p.filter(".siteorigin-widget-field-type-posts").find(".posts-container-label-wrapper").on("click keyup",w),p.filter(".siteorigin-widget-field-type-slider").each((function(){var i=e(this),t=i.find('input[type="number"]'),r=i.find(".siteorigin-widget-value-slider");r.slider({max:parseFloat(t.attr("max")),min:parseFloat(t.attr("min")),step:parseFloat(t.attr("step")),value:parseFloat(t.val()),slide:function(e,r){t.val(parseFloat(r.value)),t.trigger("change"),i.find(".siteorigin-widget-slider-value").html(r.value)}}),t.on("change",(function(e,n){n&&n.silent||(r.slider("value",parseFloat(t.val())),i.find(".siteorigin-widget-slider-value").html(t.val()))}))})),p.filter(".siteorigin-widget-field-type-link").each((function(){var i=e(this),t=function(){var t=i.find(".content-text-search"),r={action:"so_widgets_search_posts",query:t.val(),postTypes:t.data("postTypes")};"string"==typeof icl_this_lang&&(r.language=icl_this_lang);var n=i.find("ul.posts").empty().addClass("loading");e.get(soWidgets.ajaxurl,r,(function(i){for(var t=0;t<i.length;t++)""===i[t].label&&(i[t].label="&nbsp;"),n.append(e("<li>").addClass("post").html(i[t].label+"<span>("+i[t].type+")</span>").data(i[t]).attr("tabindex",0));n.removeClass("loading")}))};i.find(".select-content-button, .button-close").on("click",(function(r){r.preventDefault(),e(this).trigger("blur");var n=i.find(".existing-content-selector");n.toggle(),n.is(":visible")&&0===n.find("ul.posts li").length&&t()})),i.on("click keyup",".posts li",(function(t){if(t.preventDefault(),"keyup"!=t.type||sowbForms.isEnter(t)){var r=e(this);i.find("input.siteorigin-widget-input").val("post: "+r.data("value")),i.trigger("change"),i.find(".existing-content-selector").toggle()}}));var r=null;i.find(".content-text-search").on("keyup",(function(){null!==r&&clearTimeout(r),r=setTimeout((function(){t()}),500)}))})),void 0!==jQuery.fn.soPanelsSetupBuilderWidget&&p.filter(".siteorigin-widget-field-type-builder").each((function(){e(this).find("> .siteorigin-page-builder-field").each((function(){var i=e(this);i.soPanelsSetupBuilderWidget({builderType:i.data("type")})}))}));var m=function(){var i=e(this),t=i.closest("[data-state-emitter]").data("state-emitter");if(void 0!==t){var n=function(t,r){if(void 0===sowEmitters[t.callback]||"_"===t.callback.substr(0,1))return r;if(i.is('[type="radio"]')&&!i.is(":checked"))return r;var n=sowbForms.getContainerFieldId(i,"repeater",".siteorigin-widget-field-repeater-item");!1!==n&&(t.args=t.args.map((function(e){return e.replace("{$repeater}",n)})));var a=sowbForms.getContainerFieldId(i,"widget",".siteorigin-widget-widget");!1===a||t.hasOwnProperty("widgetFieldId")||(t.widgetFieldId=a,t.args=t.args.map((function(e){return e="conditional"===t.callback?e.replace(/(.*)(\[.*)/,"$1_"+a+"$2"):e+"_"+a})));var s=i.is('[type="checkbox"]')?i.is(":checked"):i.val();return i.parent().hasClass("siteorigin-widget-field-type-media")&&"conditional"==t.callback&&(s||(s=i.hasClass("media-fallback-external")?i.prev().val():fallbackField=i.next().val()),0==s&&(s="")),e.extend(r,sowEmitters[t.callback](s,t.args,i))},a={default:""};void 0===t.length&&(t=[t]);for(var s=0;s<t.length;s++)a=n(t[s],a);var o=r.data("states");for(var d in void 0===o&&(o={default:""}),a)void 0!==o[d]&&a[d]===o[d]||(o[d]=a[d],r.trigger("sowstatechange",[d,a[d]]));r.data("states",o)}};p.filter("[data-state-emitter]").each((function(){var i=e(this).find(".siteorigin-widget-input");i.on("keyup change",m),i.each((function(){var i=e(this);i.is(":radio")?i.is(":checked")&&m.call(i[0]):m.call(i[0])}))})),n.trigger("sowsetupform",p).data("sow-form-setup",!0),p.trigger("sowsetupformfield"),n.find(".siteorigin-widget-field-repeater-item").trigger("updateFieldPositions"),(s.hasClass("wp-customizer")||s.hasClass("widgets-php"))&&n.closest(".ui-sortable").on("sortstop",(function(e,i){i.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),a=!1}))},e.fn.sowSetupPreview=function(){var i=e(this);i.siblings(".siteorigin-widget-preview").find("> a").on("click",(function(t){t.preventDefault();var r=sowbForms.getWidgetFormValues(i),n=e(e("#so-widgets-bundle-tpl-preview-dialog").html().trim()).appendTo("body");n.find('input[name="data"]').val(JSON.stringify(r)),n.find('input[name="class"]').val(i.data("class")),n.find("iframe").on("load",(function(){e(this).css("visibility","visible")})),n.find("form").trigger("submit"),n.find(".close").on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&n.remove()}))}))},e.fn.sowSetupRepeater=function(){return e(this).each((function(i,t){var r=e(t),n=r.find(".siteorigin-widget-field-repeater-items"),a=r.data("repeater-name");n.on("updateFieldPositions",(function(){var i=e(this),t=i.find("> .siteorigin-widget-field-repeater-item");t.each((function(i,t){e(t).find(".siteorigin-widget-input").each((function(t,r){var n=e(r).data("repeater-positions");void 0===n&&(n={}),n[a]=i,e(r).data("repeater-positions",n)}))})),i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t),n=r.data("repeater-positions");if(void 0!==n){var a=r.attr("data-original-name");if(a||(r.attr("data-original-name",r.attr("name")),a=r.attr("name")),!a)return;if(n)for(var s in n)a=a.replace("#"+s+"#",n[s]);r.attr("name",a)}})),i.data("initialSetup")||(i.find(".siteorigin-widget-input").each((function(i,t){var r=e(t);r.prop("checked",r.prop("defaultChecked"))})),i.data("initialSetup",!0));var n=r.data("scroll-count")?parseInt(r.data("scroll-count")):0;if(n>0&&t.length>n){var s=t.first().outerHeight();i.css("max-height",s*n+"px"),i.css("overflow","auto")}else i.css("max-height","").css("overflow","")})),n.sortable({handle:".siteorigin-widget-field-repeater-item-top",items:"> .siteorigin-widget-field-repeater-item",update:function(){n.find('input[type="radio"].siteorigin-widget-input').attr("name",""),n.trigger("updateFieldPositions"),r.trigger("change")},sortstop:function(i,t){t.item.is(".siteorigin-widget-field-repeater-item")?t.item.find("> .siteorigin-widget-field-repeater-item-form").each((function(){e(this).find("> .siteorigin-widget-field").trigger("sowsetupformfield")})):t.item.find(".siteorigin-widget-form").find("> .siteorigin-widget-field").trigger("sowsetupformfield");r.trigger("change")}}),n.trigger("updateFieldPositions"),r.find("> .siteorigin-widget-field-repeater-add").disableSelection().on("click keyup",(function(i){i.preventDefault(),("keyup"!=i.type||sowbForms.isEnter(i))&&r.closest(".siteorigin-widget-field-repeater").sowAddRepeaterItem().find("> .siteorigin-widget-field-repeater-items").slideDown("fast",(function(){e(window).trigger("resize")}))})),r.find("> .siteorigin-widget-field-repeater-top > .siteorigin-widget-field-repeater-expand").on("click",(function(i){i.preventDefault(),r.closest(".siteorigin-widget-field-repeater").find("> .siteorigin-widget-field-repeateritems-").slideToggle("fast",(function(){e(window).trigger("resize")}))}))}))},e.fn.sowAddRepeaterItem=function(){return e(this).each((function(i,t){var r=e(t),n=r.find("> .siteorigin-widget-field-repeater-items").children().length+1,a=e("<div>"+r.find("> .siteorigin-widget-field-repeater-item-html").html()+"</div>");a.find(".siteorigin-widget-input[data-name]").each((function(){var i=e(this);0===i.closest(".siteorigin-widget-field-repeater-item-html").length&&i.attr("name",e(this).data("name"))}));var s="";a.find("> .siteorigin-widget-field").each((function(i,t){var r=t.outerHTML;e(t).is(".siteorigin-widget-field-type-repeater")||(r=r.replace(/_id_/g,n)),s+=r}));var o=void 0!==r.attr("readonly"),d=e('<div class="siteorigin-widget-field-repeater-item ui-draggable"></div>').append(e('<div class="siteorigin-widget-field-repeater-item-top" tabindex="0" />').append(e('<div class="siteorigin-widget-field-expand" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-copy" tabindex="0" />')).append(o?"":e('<div class="siteorigin-widget-field-remove" tabindex="0" />')).append(e("<h4></h4>").html(r.data("item-name")))).append(e('<div class="siteorigin-widget-field-repeater-item-form"></div>').html(s));r.find("> .siteorigin-widget-field-repeater-items").append(d).sortable("refresh").trigger("updateFieldPositions"),d.sowSetupRepeaterItems(),d.hide().slideDown("fast",(function(){e(window).trigger("resize")})),r.trigger("change")}))},e.fn.sowRemoveRepeaterItem=function(){return e(this).each((function(i,t){var r=e(this).closest(".siteorigin-widget-field-repeater-items");e(this).remove(),r.sortable("refresh").trigger("updateFieldPositions"),e(t).trigger("change")}))},e.fn.sowSetupRepeaterItems=function(){return e(this).each((function(i,t){var r=e(t);if(void 0===r.data("sowrepeater-actions-setup")){var n=r.closest(".siteorigin-widget-field-repeater"),a=r.find("> .siteorigin-widget-field-repeater-item-top"),s=n.data("item-label"),o=r.parents(".siteorigin-widget-field-repeater").data("item-name");if(s&&(s.hasOwnProperty("selector")||s.hasOwnProperty("selectorArray"))){var d=function(){var e,i,t;if(s.hasOwnProperty("selectorArray"))for(var n=0;n<s.selectorArray.length&&(e=(t=s.selectorArray[n]).hasOwnProperty("valueMethod")&&t.valueMethod?t.valueMethod:"val",!(i=r.find(t.selector)[e]()));n++);else e=s.hasOwnProperty("valueMethod")&&s.valueMethod?s.valueMethod:"val",i=r.find(s.selector)[e]();if(i)i.length>80&&(i=i.substr(0,79)+"...");else if(i=o,s.increment){var d=r.index();d++,isNaN(d)||("before"==s.increment?i=d+" "+i:i+=" "+d)}a.find("h4").text(i)};d();var l=s.hasOwnProperty("updateEvent")&&s.updateEvent?s.updateEvent:"change";r.on(l,d)}a.on("click keyup",(function(i){"siteorigin-widget-field-remove"!==i.target.className&&"siteorigin-widget-field-copy"!==i.target.className&&("keyup"!=i.type||sowbForms.isEnter(i))&&(i.preventDefault(),e(this).closest(".siteorigin-widget-field-repeater-item").find(".siteorigin-widget-field-repeater-item-form").eq(0).slideToggle("fast",(function(){e(window).trigger("resize"),e(this).is(":visible")?(e(this).trigger("slideToggleOpenComplete"),e(this).find(".siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field,> .siteorigin-widget-field").each((function(i,t){var r=e(t);r.is(":visible")&&r.trigger("sowsetupformfield")}))):e(this).trigger("slideToggleCloseComplete")})))})),a.find(".siteorigin-widget-field-remove").on("click keyup",(function(i,t){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var a=e(this).closest(".siteorigin-widget-field-repeater-items"),s=e(this).closest(".siteorigin-widget-field-repeater-item"),o=function(){s.remove(),a.sortable("refresh").trigger("updateFieldPositions"),e(window).trigger("resize"),n.trigger("change")};t&&t.silent?o():confirm(soWidgets.sure)&&s.slideUp("fast",o),"string"==typeof r.closest(".siteorigin-widget-field-repeater").data("item-label").increment&&r.parent().find(".siteorigin-widget-field-repeater-item").trigger("change")}})),a.find(".siteorigin-widget-field-copy").on("click keyup",(function(i){if(i.preventDefault(),"keyup"!=i.type||sowbForms.isEnter(i)){var t=e(this).closest(".siteorigin-widget-form-main"),n=e(this).closest(".siteorigin-widget-field-repeater-item"),a=n.clone(),s=n.closest(".siteorigin-widget-field-repeater-items"),o=s.children().length,d={};a.find("*[name]").each((function(){var i=e(this),s=i.attr("id"),l=i.attr("name");if(i.is("textarea")&&i.parent().is(".wp-editor-container")&&"undefined"!=typeof tinymce){i.parent().empty().append(i),i.css("display","");var g=tinymce.get(s);if(g){var f=g.getContent();_.isEmpty(f)?-1!==f.search("<")&&-1===f.search(">")&&$textarea.val(f.replace(/</g,"")):i.val(f)}}else if(i.is(".wp-color-picker")){var c=i.closest(".wp-picker-container"),p=i.closest(".siteorigin-widget-field");c.remove(),p.append(i.remove())}else{var u=s?n.find("#"+s):n.find('[name="'+l+'"]');u.length&&null!=u.val()&&i.val(u.val())}if(s){var w,m;if(i.is('[type="radio"]')){w=s.replace(/-\d+-\d+$/,"");var v=s.replace(/-\d+$/,"");if(!d[w]){var h={};d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").filter((function(i,t){var r=e(t).attr("name");return!h[r]&&(h[r]=!0,!0)})).length+1}var b=w+"-"+d[w];m=b+s.match(/-\d+$/)[0],a.find("label[for="+v+"]").attr("for",b)}else F=new RegExp("-\\d+$"),w=s.replace(F,""),d[w]||(d[w]=t.find(".siteorigin-widget-input[id^="+w+"]").not("[id*=_id_]").length+1),m=w+"-"+d[w]++;if(i.is(".wp-editor-area")&&(m+=Math.floor(1e3*Math.random()),i.data("tinymce-id",m)),i.attr("id",m),i.is(".wp-editor-area")){var y=i.closest(".siteorigin-widget-tinymce-container"),k=y.data("media-buttons");if(k&&k.html){var F=new RegExp(s,"g");k.html=k.html.replace(F,m),y.data("media-buttons",k)}}a.find("label[for="+s+"]").attr("for",m),a.find("[id*="+s+"]").each((function(){var i=e(this).attr("id").replace(s,m);e(this).attr("id",i)})),"undefined"!=typeof tinymce&&tinymce.get(m)&&tinymce.get(m).remove()}var C=n.parents(".siteorigin-widget-field-repeater").length,x=e("body");(x.hasClass("wp-customizer")||x.hasClass("widgets-php"))&&0===r.closest(".panel-dialog").length&&(C+=1);var E=l.replace(new RegExp("((?:.*?\\[\\d+\\]){"+(C-1).toString()+"})?(.*?\\[)\\d+(\\])"),"$1$2"+o.toString()+"$3");i.attr("name",E),i.data("original-name",E)})),s.append(a).sortable("refresh").trigger("updateFieldPositions"),a.sowSetupRepeaterItems(),a.hide().slideDown("fast",(function(){e(window).trigger("resize")})),"string"==typeof r.closest(".siteorigin-widget-field-repeater").data("item-label").increment?r.parent().find(".siteorigin-widget-field-repeater-item").trigger("change"):r.trigger("change")}})),r.find("> .siteorigin-widget-field-repeater-item-form").sowSetupForm(),r.data("sowrepeater-actions-setup",!0)}}))},sowbForms.getContainerFieldId=function(e,i,t){var r=i+"FieldId";this.hasOwnProperty(r)||(this[r]=1);var n=e.closest(t);if(n.length){var a=n.data("field-id");return void 0===a&&(a=this[r]++),n.data("field-id",a),a}return!1},sowbForms.getWidgetFieldVariable=function(e,i,t){var r=window.sow_field_javascript_variables[e];i=i.replace(/\[#.*?#\]/g,"");for(var n=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(i)[1].split("]["),a=n.length?r:null;n.length;)a=a[n.shift()];return a[t]},sowbForms.fetchWidgetVariable=function(i,t,r){window.sowVars=window.sowVars||{},void 0===window.sowVars[t]?e.post(soWidgets.ajaxurl,{action:"sow_get_javascript_variables",widget:t,key:i},(function(e){window.sowVars[t]=e,r(window.sowVars[t][i])})):r(window.sowVars[t][i])},sowbForms.getWidgetIdBase=function(e){return e.data("id-base")},sowbForms.getWidgetFormValues=function(i){if(_.isUndefined(i))return null;var t={};return i.find("*[name]").each((function(){var i=e(this);try{var r=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(i.attr("name"));if(_.isEmpty(r))return!0;var n=(r=r[1]).split("][");n=n.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e}));var a=t,s=null,o=_.isString(i.attr("type"))?i.attr("type").toLowerCase():null;if("checkbox"===o)s=!!i.is(":checked")&&(""===i.val()||i.val());else if("radio"===o){if(!i.is(":checked"))return;s=i.val()}else if("TEXTAREA"===i.prop("tagName")&&i.hasClass("wp-editor-area")){var d=null;"undefined"!=typeof tinyMCE&&(d=tinyMCE.get(i.attr("id"))),s=null===d||"function"!=typeof d.getContent||d.isHidden()?i.val():d.getContent()}else if("SELECT"===i.prop("tagName")){var l=i.find("option:selected");1===l.length?s=i.find("option:selected").val():l.length>1&&(s=_.map(i.find("option:selected"),(function(i,t){return e(i).val()})))}else s=i.val();for(var g=0;g<n.length;g++)g===n.length-1?""===n[g]?a.push(s):a[n[g]]=s:(_.isUndefined(a[n[g]])&&(_.isNumber(n[g+1])||""===n[g+1]?a[n[g]]=[]:a[n[g]]={}),a=a[n[g]])}catch(e){console.error("Field ["+i.attr("name")+"] could not be processed and was skipped - "+e.message)}})),t},sowbForms.isEnter=function(i,t=!1){if(13==i.which){if(!t)return!0;e(i.target).trigger("click")}},sowbForms.setWidgetFormValues=function(i,t,r,n){r=r||!1,n=void 0!==n&&n||void 0===n;var a=0,s=function(i,t){10!=++a?(i.find("> .siteorigin-widget-field-type-repeater,> .siteorigin-widget-field-type-section > .siteorigin-widget-section > .siteorigin-widget-field-type-repeater").each((function(i,n){var a=e(this),o=a.find("> .siteorigin-widget-field-repeater"),d=o.data("repeaterName"),l=t.hasOwnProperty(d)?t[d]:null;if(a.parent().is(".siteorigin-widget-section")){var g=o.data("element-name");g=g.replace(/\[#.*?#\]/g,"");for(var f=/[a-zA-Z0-9\-]+(?:\[c?[0-9]+\])?\[(.*)\]/.exec(g)[1].split("]["),c=f.length?t:null;f.length;){var p=f.shift();c=c.hasOwnProperty(p)?c[p]:c}l=c}if(l&&Array.isArray(l)){var u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item"),w=l.length,m=u.length;if(w>m)for(var v=0;v<w-m;v++)o.find("> .siteorigin-widget-field-repeater-add").trigger("click");else if(!r&&w<m)for(var h=w;h<m;h++){e(u.eq(h)).find("> .siteorigin-widget-field-repeater-item-top").find(".siteorigin-widget-field-remove").trigger("click",{silent:!0})}u=o.find("> .siteorigin-widget-field-repeater-items > .siteorigin-widget-field-repeater-item");for(var b=0;b<u.length;b++)u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),s(u.eq(b).find("> .siteorigin-widget-field-repeater-item-form"),l[b])}})),--a):--a};s(i,t),$fields=i.find("*[name]");var o=function(e){return e.map((function(e){return!isNaN(parseFloat(e))&&isFinite(e)?parseInt(e):e})),e},d=function(e,i){for(var t,n=e,a=0;a<i.length;a++){if(!n.hasOwnProperty(i[a])){if(r)continue;break}a===i.length-1?t=n[i[a]]:n=n[i[a]]}return{sub:n,value:t}},l=function(e,i){if(i){if(e!==i)return!0}else if(e)return!0;return!1},g=function(i,a){for(;i<a.length;i++){if(0!=i&&i+1<a.length&&i%20==0)return void setTimeout(g,150,i+1,a);var s=e(a[i]),f=/[a-zA-Z0-9\-]+\[[a-zA-Z0-9]+\]\[(.*)\]/.exec(s.attr("name"));if(null==f)return!0;if(!(s.hasClass("sow-measurement-select-unit")||s.attr("data-presets")||s.parent().hasClass("siteorigin-widget-field-type-posts")||"hidden"==s.attr("type"))){var c=(f=f[1]).split("][");c=o(c);var p=d(t,c);if((!r||""!=p.value)&&void 0!==p.value){var u=!1;if("checkbox"===s.attr("type")&&s.is(":checked")!=p.value)s.prop("checked",p.value),u=!0;else if("radio"===s.attr("type"))s.prop("checked",p.value===s.val()),u=!0;else if("TEXTAREA"===s.prop("tagName")&&s.hasClass("wp-editor-area")){var w=null;"undefined"!=typeof tinyMCE&&(w=tinyMCE.get(s.attr("id"))),null!==w&&"function"==typeof w.setContent&&!w.isHidden()&&s.parent().is(":visible")?l(w.getContent(),p.value)&&(w.initialized?(w.setContent(p.value),u=!0):(w.on("init",(function(){w.setContent(p.value)})),u=!0)):l(s.val(),p.value)&&(s.val(p.value),u=!0)}else if(s.is(".panels-data")){if(l(s.val(),p.value)){s.val(p.value);var m=s.data("builder");m&&(m.setDataField(s),u=!0)}}else l(s.val(),p.value)&&(s.val(p.value),u=!0);if(n&&u){if("preset"==n&&!s.hasClass("siteorigin-widget-input-color")&&!s.hasClass("siteorigin-widget-input-slider")&&!s.is("siteorigin-widget-input-select")&&"checkbox"==!s.attr("type"))continue;s.trigger("change"),this.dispatchEvent(new Event("change",{bubbles:!0,cancelable:!0}))}}}}};g(0,$fields)},sowbForms.displayNotice=function(i,t,r,n,a){var s=e('<div class="siteorigin-widget-form-notification"></div>');t&&s.append("<span>"+t+"</span>"),n&&n.length&&n.forEach((function(i){var t="";i.classes&&i.classes.length&&(t=" "+i.classes.join(" "));var r=e('<a class="button button-small'+t+'" tabindex="0">'+i.label+"</a>");i.url&&r.attr("href",i.url),i.callback&&r.on("click keyup",(function(e){("keyup"!=e.type||sowbForms.isEnter(e))&&i.callback(s)})),s.append(r)})),r&&s.append("<div><small>"+r+"</small></div>"),a?a.before(s):i.prepend(s)},sowbForms.validateFields=function(i,t=!0){var r=!0,n=e(document).triggerHandler("sow_validate_widget_data",[r,i,i.find(".siteorigin-widget-form").data("id-base")]);if("boolean"!=typeof n||n||(r=!1),r){var a=!1;i.find(".siteorigin-widget-field-is-required").each((function(){var i=e(this),t=i.find(".siteorigin-widget-input");t.parents(".siteorigin-widget-field-repeater-item-html").length||((!t.val()||i.hasClass("siteorigin-widget-field-type-checkboxes")&&!t.prop("checked"))&&(a=!0,i.addClass("sow-required-error")),t.on("change",(function(e){i.removeClass("sow-required-error")})))})),!a||t&&confirm(soWidgets.missing_required)||(r=!1)}return r},"object"==typeof panelsOptions&&e(document).on("close_dialog_validation",(function(i,t,r,n,a){return sowbForms.validateFields(e(a.el))})),e("body").on("click",".widget-control-save",(function(i){var t=e(this).parents(".widget.open").find(".widget-content");t.length&&(sowbForms.validateFields(t)||(i.preventDefault(),i.stopPropagation()))})),void 0!==wp.customize&&jQuery(document).on("widget-added widget-updated widget-synced",(function(e,i,t=!1){t.length&&sowbForms.validateFields(t)})),e(".widgets-holder-wrap").on("click",".widget:has(.siteorigin-widget-form-main) .widget-top",(function(){var i=e(this).closest(".widget").find(".siteorigin-widget-form-main");setTimeout((function(){i.sowSetupForm()}),200)}));var i=e("body");e(document).on("widget-added",(function(e,i){i.find(".siteorigin-widget-form").sowSetupForm()})),i.hasClass("block-editor-page")&&e(document).on("panels_setup_preview",(function(){window.hasOwnProperty("sowb")&&e(sowb).trigger("setup_widgets",{preview:!0})})),e(document).on("open_dialog",(function(e,i){i.$el.find(".so-panels-dialog").is(".so-panels-dialog-edit-widget")&&i.$el.find(".siteorigin-widget-form-main").find("> .siteorigin-widget-field").trigger("sowsetupformfield")})),e((function(){e(document).trigger("sowadminloaded")}))}(jQuery);var sowEmitters={_match:function(e,i){void 0===i&&(i=".*");var t=new RegExp("^([a-zA-Z0-9_-]+)(\\[([a-zA-Z0-9_-]+)\\])? *: *("+i+") *$").exec(e);if(null===t)return!1;var r="",n="default";return void 0!==t[3]?(n=t[1],r=t[3]):r=t[1],{match:t[4].trim(),group:n,state:r}},_checker:function(e,i,t,r){var n,a={};void 0===i.length&&(i=[i]);for(var s=0;s<i.length;s++)!1!==(n=sowEmitters._match(i[s],t))&&("_true"===n.match||r(e,i,n.match))&&(a[n.group]=n.state);return a},select:function(e,i){void 0===i.length&&(i=[i]);for(var t={},r=0;r<i.length;r++)""===i[r]&&(i[r]="default"),t[i[r]]=e;return t},conditional:function(val,args){return sowEmitters._checker(val,args,"[^;{}]*",(function(val,args,match){return eval(match)}))},in:function(e,i){return sowEmitters._checker(e,i,"[^;{}]*",(function(e,i,t){return-1!==t.split(",").map((function(e){return e.trim()})).indexOf(e)}))}};window.sowbForms=sowbForms;
base/siteorigin-widget.class.php CHANGED
@@ -622,6 +622,7 @@ abstract class SiteOrigin_Widget extends WP_Widget {
622
  wp_localize_script( 'siteorigin-widget-admin', 'soWidgets', array(
623
  'ajaxurl' => wp_nonce_url( admin_url('admin-ajax.php'), 'widgets_action', '_widgets_nonce' ),
624
  'sure' => __('Are you sure?', 'so-widgets-bundle'),
 
625
  'backup' => array(
626
  'newerVersion' => __( "There is a newer version of this widget's content available.", 'so-widgets-bundle' ),
627
  'restore' => __( 'Restore', 'so-widgets-bundle' ),
622
  wp_localize_script( 'siteorigin-widget-admin', 'soWidgets', array(
623
  'ajaxurl' => wp_nonce_url( admin_url('admin-ajax.php'), 'widgets_action', '_widgets_nonce' ),
624
  'sure' => __('Are you sure?', 'so-widgets-bundle'),
625
+ 'missing_required' => __( 'You have empty required widgets. Are you sure you wish to continue?', 'so-widgets-bundle' ),
626
  'backup' => array(
627
  'newerVersion' => __( "There is a newer version of this widget's content available.", 'so-widgets-bundle' ),
628
  'restore' => __( 'Restore', 'so-widgets-bundle' ),
compat/block-editor/widget-block.js CHANGED
@@ -94,7 +94,10 @@
94
  }
95
 
96
  function generateWidgetPreview( widgetData = false) {
97
- wp.data.dispatch( 'core/editor' ).lockPostSaving();
 
 
 
98
  jQuery.post( {
99
  url: sowbBlockEditorAdmin.restUrl + 'sowb/v1/widgets/previews',
100
  beforeSend: function( xhr ) {
@@ -116,7 +119,9 @@
116
  widgetHtml: widgetPreview.html,
117
  widgetIcons: widgetPreview.icons
118
  } );
119
- wp.data.dispatch( 'core/editor' ).unlockPostSaving();
 
 
120
  } )
121
  .fail( function( response ) {
122
  props.setState( { widgetFormHtml: '<div>' + getAjaxErrorMsg( response ) + '</div>', } );
@@ -133,6 +138,7 @@
133
 
134
  function setupWidgetForm( formContainer ) {
135
  var $mainForm = jQuery( formContainer ).find( '.siteorigin-widget-form-main' );
 
136
  if ( $mainForm.length > 0 && ! props.formInitialized ) {
137
  var $previewContainer = $mainForm.siblings('.siteorigin-widget-preview');
138
  $previewContainer.find( '> a' ).on( 'click', function ( event ) {
@@ -323,3 +329,75 @@
323
  }
324
  } );
325
  } )( window.wp.editor, window.wp.blocks, window.wp.i18n, window.wp.element, window.wp.components, window.wp.compose, window.wp.blockEditor );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
  function generateWidgetPreview( widgetData = false) {
97
+ if ( typeof wp.data.dispatch( 'core/editor' ) == 'object' ) {
98
+ wp.data.dispatch( 'core/editor' ).lockPostSaving();
99
+ }
100
+
101
  jQuery.post( {
102
  url: sowbBlockEditorAdmin.restUrl + 'sowb/v1/widgets/previews',
103
  beforeSend: function( xhr ) {
119
  widgetHtml: widgetPreview.html,
120
  widgetIcons: widgetPreview.icons
121
  } );
122
+ if ( typeof wp.data.dispatch( 'core/editor' ) == 'object' ) {
123
+ wp.data.dispatch( 'core/editor' ).unlockPostSaving();
124
+ }
125
  } )
126
  .fail( function( response ) {
127
  props.setState( { widgetFormHtml: '<div>' + getAjaxErrorMsg( response ) + '</div>', } );
138
 
139
  function setupWidgetForm( formContainer ) {
140
  var $mainForm = jQuery( formContainer ).find( '.siteorigin-widget-form-main' );
141
+
142
  if ( $mainForm.length > 0 && ! props.formInitialized ) {
143
  var $previewContainer = $mainForm.siblings('.siteorigin-widget-preview');
144
  $previewContainer.find( '> a' ).on( 'click', function ( event ) {
329
  }
330
  } );
331
  } )( window.wp.editor, window.wp.blocks, window.wp.i18n, window.wp.element, window.wp.components, window.wp.compose, window.wp.blockEditor );
332
+
333
+ // Setup SiteOrigin Widgets Block Validation.
334
+ var sowbTimeoutSetup = false;
335
+ if ( typeof wp.data.select == 'function' ) {
336
+ wp.data.subscribe( function () {
337
+ if ( ! sowbTimeoutSetup ) {
338
+ var setupTimer = false;
339
+
340
+ if ( typeof wp.data.select( 'core/edit-widgets' ) == 'object' ) {
341
+ // New Widget Area.
342
+ if ( wp.data.select( 'core/edit-widgets' ).isSavingWidgetAreas() ) {
343
+ setupTimer = true;
344
+ }
345
+ } else if (
346
+ typeof wp.data.select( 'core/editor' ) == 'object' &&
347
+ wp.data.select( 'core/editor' ).isSavingPost()
348
+ ) {
349
+ // Block Editor.
350
+ setupTimer = true;
351
+ }
352
+
353
+ if ( setupTimer ) {
354
+ sowbTimeoutSetup = true;
355
+ var saveCheck = setInterval( function() {
356
+ var checkPass = false;
357
+ if ( typeof wp.data.select( 'core/edit-widgets' ) == 'object' ) {
358
+ if ( ! wp.data.select( 'core/edit-widgets' ).isSavingWidgetAreas() ) {
359
+ checkPass = true;
360
+ }
361
+ } else if (
362
+ typeof wp.data.select( 'core/editor' ) == 'object' &&
363
+ ! wp.data.select( 'core/editor' ).isSavingPost() &&
364
+ ! wp.data.select( 'core/editor' ).isAutosavingPost() &&
365
+ wp.data.select( 'core/editor' ).didPostSaveRequestSucceed()
366
+ ) {
367
+ checkPass = true;
368
+ }
369
+
370
+ if ( checkPass ) {
371
+ clearInterval( saveCheck );
372
+
373
+ var showPrompt = true;
374
+ if ( typeof wp.data.select( 'core/edit-widgets' ) == 'object' ) {
375
+ // New Widget Area.
376
+ var $widgets = jQuery( '.wp-block-widget-area .components-panel__body.is-opened .siteorigin-widget-form-main-siteorigin-widget-button-widget' );
377
+ jQuery.each( $widgets , function() {
378
+ if ( ! sowbForms.validateFields( jQuery( this ).parent(), showPrompt) ) {
379
+ showPrompt = false;
380
+ }
381
+ } );
382
+ } else if ( typeof wp.data.select( 'core/editor' ) == 'object' ) {
383
+ // Block Editor.
384
+ var sowbCurrentBlocks = wp.data.select( 'core/block-editor' ).getBlocks();
385
+ for ( var i = 0; i < sowbCurrentBlocks.length; i++ ) {
386
+ if ( sowbCurrentBlocks[ i ].name == 'sowb/widget-block' && sowbCurrentBlocks[ i ].isValid ) {
387
+ $form = jQuery( '#block-' + sowbCurrentBlocks[ i ].clientId ).find( '.so-widget-placeholder ');
388
+ if ( ! sowbForms.validateFields( $form, showPrompt) ) {
389
+ showPrompt = false;
390
+ }
391
+ $form.find( '.siteorigin-widget-field-is-required input' ).on( 'change', function() {
392
+ sowbForms.validateFields( $form );
393
+ } );
394
+ }
395
+ }
396
+ }
397
+ sowbTimeoutSetup = false;
398
+ }
399
+ }, 250 );
400
+ }
401
+ }
402
+ } );
403
+ }
compat/block-editor/widget-block.min.js CHANGED
@@ -1 +1 @@
1
- !function(t,e,i,o,n,s,d){var r=o.createElement,a=e.registerBlockType,l=d.BlockControls,w=n.ComboboxControl,g=s.withState,c=n.Toolbar,u=n.ToolbarButton,m=n.Placeholder,b=n.Spinner,p=i.__,v=function(t){var e="";return t.hasOwnProperty("responseJSON")?e=t.responseJSON.message:t.hasOwnProperty("responseText")&&(e=t.responseText),e};a("sowb/widget-block",{title:p("SiteOrigin Widget","so-widgets-bundle"),description:p("Select a SiteOrigin widget from the dropdown.","so-widgets-bundle"),icon:function(){return r("span",{className:"widget-icon so-widget-icon so-block-editor-icon"})},category:"widgets",keywords:[sowbBlockEditorAdmin.widgets.reduce((function(t,e){return t.length>0&&(t+=","),t+e.name}),"")],supports:{html:!1,anchor:!0},attributes:{widgetClass:{type:"string"},anchor:{type:"string"},widgetData:{type:"object"},widgetHtml:{type:"string"},widgetIcons:{type:"array"}},edit:g({editing:!1,formInitialized:!1,previewInitialized:!1,widgetFormHtml:"",widgetSettingsChanged:!1,widgetPreviewHtml:""})((function(t){function e(e=!1){wp.data.dispatch("core/editor").lockPostSaving(),jQuery.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/previews",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{anchor:t.attributes.anchor,widgetClass:t.attributes.widgetClass,widgetData:e||(t.attributes.widgetData||{})}}).done((function(e){t.setState({widgetPreviewHtml:e.html,previewInitialized:!1}),t.setAttributes({widgetHtml:e.html,widgetIcons:e.icons}),wp.data.dispatch("core/editor").unlockPostSaving()})).fail((function(e){t.setState({widgetFormHtml:"<div>"+v(e)+"</div>"})}))}function i(){t.setState({editing:!1,previewInitialized:!1})}if(!t.editing&&t.attributes.widgetClass&&t.attributes.widgetData){var o=!t.loadingWidgets&&!t.editing&&!t.widgetPreviewHtml&&t.attributes.widgetClass&&t.attributes.widgetData;o&&(t.setAttributes({widgetHtml:null,widgetIcons:null}),e());var n=t.widgetPreviewHtml?t.widgetPreviewHtml:"";return[r(l,{key:"controls"},r(c,{label:p("Preview widget.","so-widgets-bundle")},r(u,{className:"components-icon-button components-toolbar__control",label:p("Edit widget.","so-widgets-bundle"),onClick:function(){t.setState({editing:!0,formInitialized:!1})},icon:"edit"}))),r("div",{key:"preview",className:"so-widget-preview-container"},o?r("div",{className:"so-widgets-spinner-container"},r("span",null,r(b))):r("div",{dangerouslySetInnerHTML:{__html:n},ref:function(){t.previewInitialized||(jQuery(window.sowb).trigger("setup_widgets",{preview:!0}),t.setState({previewInitialized:!0}))}}))]}var s=[];sowbBlockEditorAdmin.widgets&&(s=sowbBlockEditorAdmin.widgets.map((function(t){return{value:t.class,label:t.name}})));var d=t.attributes.widgetClass&&!t.widgetFormHtml;d&&jQuery.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/forms",beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:t.attributes.widgetClass,widgetData:t.attributes.widgetData}}).done((function(e){t.setState({widgetFormHtml:e})})).fail((function(e){t.setState({widgetFormHtml:"<div>"+v(e)+"</div>"})}));var a=t.widgetFormHtml?t.widgetFormHtml:"";return[!!a&&r(l,{key:"controls"},r(c,{label:p("Preview widget.","so-widgets-bundle")},r(u,{className:"components-icon-button components-toolbar__control",label:p("Preview widget.","so-widgets-bundle"),onClick:i,icon:"visibility"}))),r(m,{key:"placeholder",className:"so-widget-placeholder",label:p("SiteOrigin Widget","so-widgets-bundle"),instructions:p("Select the type of widget you want to use:","so-widgets-bundle")},t.loadingWidgets||d?r(b):r("div",{className:"so-widget-block-container"},r(w,{className:"so-widget-autocomplete-field",label:p("Widget type","so-widgets-bundle"),value:t.attributes.widgetClass,onFilterValueChange:function(t){},onChange:function(e){if(""!==e){if(t.widgetSettingsChanged&&!confirm(sowbBlockEditorAdmin.confirmChangeWidget))return!1;t.setAttributes({widgetClass:e,widgetData:null}),t.setState({editing:!0,widgetFormHtml:null,formInitialized:!1,widgetSettingsChanged:!1,widgetPreviewHtml:null,previewInitialized:!1})}},options:s}),r("div",{className:"so-widget-block-form-container",dangerouslySetInnerHTML:{__html:a},ref:function(o){var n=jQuery(o).find(".siteorigin-widget-form-main");n.length>0&&!t.formInitialized&&(n.siblings(".siteorigin-widget-preview").find("> a").on("click",(function(t){t.stopImmediatePropagation(),i()})),n.data("backupDisabled",!0),n.sowSetupForm(),t.attributes.widgetData?sowbForms.setWidgetFormValues(n,t.attributes.widgetData):t.setAttributes({widgetData:sowbForms.getWidgetFormValues(n)}),n.on("change",(function(){t.setState({widgetSettingsChanged:!0,widgetPreviewHtml:null,previewInitialized:!1});var i=sowbForms.getWidgetFormValues(n);t.setAttributes({widgetData:i}),e(i)})),t.setState({formInitialized:!0}))}})))]})),save:function(t){return null}})}(window.wp.editor,window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.compose,window.wp.blockEditor);
1
+ !function(e,t,i,o,s,n,d){var a=o.createElement,r=t.registerBlockType,l=d.BlockControls,w=s.ComboboxControl,c=n.withState,g=s.Toolbar,u=s.ToolbarButton,p=s.Placeholder,m=s.Spinner,b=i.__,f=function(e){var t="";return e.hasOwnProperty("responseJSON")?t=e.responseJSON.message:e.hasOwnProperty("responseText")&&(t=e.responseText),t};r("sowb/widget-block",{title:b("SiteOrigin Widget","so-widgets-bundle"),description:b("Select a SiteOrigin widget from the dropdown.","so-widgets-bundle"),icon:function(){return a("span",{className:"widget-icon so-widget-icon so-block-editor-icon"})},category:"widgets",keywords:[sowbBlockEditorAdmin.widgets.reduce((function(e,t){return e.length>0&&(e+=","),e+t.name}),"")],supports:{html:!1,anchor:!0},attributes:{widgetClass:{type:"string"},anchor:{type:"string"},widgetData:{type:"object"},widgetHtml:{type:"string"},widgetIcons:{type:"array"}},edit:c({editing:!1,formInitialized:!1,previewInitialized:!1,widgetFormHtml:"",widgetSettingsChanged:!1,widgetPreviewHtml:""})((function(e){function t(t=!1){"object"==typeof wp.data.dispatch("core/editor")&&wp.data.dispatch("core/editor").lockPostSaving(),jQuery.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/previews",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{anchor:e.attributes.anchor,widgetClass:e.attributes.widgetClass,widgetData:t||(e.attributes.widgetData||{})}}).done((function(t){e.setState({widgetPreviewHtml:t.html,previewInitialized:!1}),e.setAttributes({widgetHtml:t.html,widgetIcons:t.icons}),"object"==typeof wp.data.dispatch("core/editor")&&wp.data.dispatch("core/editor").unlockPostSaving()})).fail((function(t){e.setState({widgetFormHtml:"<div>"+f(t)+"</div>"})}))}function i(){e.setState({editing:!1,previewInitialized:!1})}if(!e.editing&&e.attributes.widgetClass&&e.attributes.widgetData){var o=!e.loadingWidgets&&!e.editing&&!e.widgetPreviewHtml&&e.attributes.widgetClass&&e.attributes.widgetData;o&&(e.setAttributes({widgetHtml:null,widgetIcons:null}),t());var s=e.widgetPreviewHtml?e.widgetPreviewHtml:"";return[a(l,{key:"controls"},a(g,{label:b("Preview widget.","so-widgets-bundle")},a(u,{className:"components-icon-button components-toolbar__control",label:b("Edit widget.","so-widgets-bundle"),onClick:function(){e.setState({editing:!0,formInitialized:!1})},icon:"edit"}))),a("div",{key:"preview",className:"so-widget-preview-container"},o?a("div",{className:"so-widgets-spinner-container"},a("span",null,a(m))):a("div",{dangerouslySetInnerHTML:{__html:s},ref:function(){e.previewInitialized||(jQuery(window.sowb).trigger("setup_widgets",{preview:!0}),e.setState({previewInitialized:!0}))}}))]}var n=[];sowbBlockEditorAdmin.widgets&&(n=sowbBlockEditorAdmin.widgets.map((function(e){return{value:e.class,label:e.name}})));var d=e.attributes.widgetClass&&!e.widgetFormHtml;d&&jQuery.post({url:sowbBlockEditorAdmin.restUrl+"sowb/v1/widgets/forms",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",sowbBlockEditorAdmin.nonce)},data:{widgetClass:e.attributes.widgetClass,widgetData:e.attributes.widgetData}}).done((function(t){e.setState({widgetFormHtml:t})})).fail((function(t){e.setState({widgetFormHtml:"<div>"+f(t)+"</div>"})}));var r=e.widgetFormHtml?e.widgetFormHtml:"";return[!!r&&a(l,{key:"controls"},a(g,{label:b("Preview widget.","so-widgets-bundle")},a(u,{className:"components-icon-button components-toolbar__control",label:b("Preview widget.","so-widgets-bundle"),onClick:i,icon:"visibility"}))),a(p,{key:"placeholder",className:"so-widget-placeholder",label:b("SiteOrigin Widget","so-widgets-bundle"),instructions:b("Select the type of widget you want to use:","so-widgets-bundle")},e.loadingWidgets||d?a(m):a("div",{className:"so-widget-block-container"},a(w,{className:"so-widget-autocomplete-field",label:b("Widget type","so-widgets-bundle"),value:e.attributes.widgetClass,onFilterValueChange:function(e){},onChange:function(t){if(""!==t){if(e.widgetSettingsChanged&&!confirm(sowbBlockEditorAdmin.confirmChangeWidget))return!1;e.setAttributes({widgetClass:t,widgetData:null}),e.setState({editing:!0,widgetFormHtml:null,formInitialized:!1,widgetSettingsChanged:!1,widgetPreviewHtml:null,previewInitialized:!1})}},options:n}),a("div",{className:"so-widget-block-form-container",dangerouslySetInnerHTML:{__html:r},ref:function(o){var s=jQuery(o).find(".siteorigin-widget-form-main");s.length>0&&!e.formInitialized&&(s.siblings(".siteorigin-widget-preview").find("> a").on("click",(function(e){e.stopImmediatePropagation(),i()})),s.data("backupDisabled",!0),s.sowSetupForm(),e.attributes.widgetData?sowbForms.setWidgetFormValues(s,e.attributes.widgetData):e.setAttributes({widgetData:sowbForms.getWidgetFormValues(s)}),s.on("change",(function(){e.setState({widgetSettingsChanged:!0,widgetPreviewHtml:null,previewInitialized:!1});var i=sowbForms.getWidgetFormValues(s);e.setAttributes({widgetData:i}),t(i)})),e.setState({formInitialized:!0}))}})))]})),save:function(e){return null}})}(window.wp.editor,window.wp.blocks,window.wp.i18n,window.wp.element,window.wp.components,window.wp.compose,window.wp.blockEditor);var sowbTimeoutSetup=!1;"function"==typeof wp.data.select&&wp.data.subscribe((function(){if(!sowbTimeoutSetup){var e=!1;if("object"==typeof wp.data.select("core/edit-widgets")?wp.data.select("core/edit-widgets").isSavingWidgetAreas()&&(e=!0):"object"==typeof wp.data.select("core/editor")&&wp.data.select("core/editor").isSavingPost()&&(e=!0),e){sowbTimeoutSetup=!0;var t=setInterval((function(){var e=!1;if("object"==typeof wp.data.select("core/edit-widgets")?wp.data.select("core/edit-widgets").isSavingWidgetAreas()||(e=!0):"object"!=typeof wp.data.select("core/editor")||wp.data.select("core/editor").isSavingPost()||wp.data.select("core/editor").isAutosavingPost()||!wp.data.select("core/editor").didPostSaveRequestSucceed()||(e=!0),e){clearInterval(t);var i=!0;if("object"==typeof wp.data.select("core/edit-widgets")){var o=jQuery(".wp-block-widget-area .components-panel__body.is-opened .siteorigin-widget-form-main-siteorigin-widget-button-widget");jQuery.each(o,(function(){sowbForms.validateFields(jQuery(this).parent(),i)||(i=!1)}))}else if("object"==typeof wp.data.select("core/editor"))for(var s=wp.data.select("core/block-editor").getBlocks(),n=0;n<s.length;n++)"sowb/widget-block"==s[n].name&&s[n].isValid&&($form=jQuery("#block-"+s[n].clientId).find(".so-widget-placeholder "),sowbForms.validateFields($form,i)||(i=!1),$form.find(".siteorigin-widget-field-is-required input").on("change",(function(){sowbForms.validateFields($form)})));sowbTimeoutSetup=!1}}),250)}}}));
compat/block-editor/widget-block.php CHANGED
@@ -36,7 +36,8 @@ class SiteOrigin_Widgets_Bundle_Widget_Block {
36
  'wp-i18n',
37
  'wp-element',
38
  'wp-components',
39
- 'wp-compose'
 
40
  ),
41
  SOW_BUNDLE_VERSION
42
  );
36
  'wp-i18n',
37
  'wp-element',
38
  'wp-components',
39
+ 'wp-compose',
40
+ 'wp-data',
41
  ),
42
  SOW_BUNDLE_VERSION
43
  );
compat/compat.php CHANGED
@@ -21,7 +21,7 @@ class SiteOrigin_Widgets_Bundle_Compatibility {
21
  if ( ! empty( $builder ) ) {
22
  require_once $builder['file_path'];
23
  }
24
-
25
  if ( function_exists( 'register_block_type' ) ) {
26
  require_once plugin_dir_path( __FILE__ ) . 'block-editor/widget-block.php';
27
  }
@@ -108,6 +108,10 @@ class SiteOrigin_Widgets_Bundle_Compatibility {
108
  header( 'x-litespeed-purge: ' . $url['path'] );
109
  }
110
  }
 
 
 
 
111
  }
112
  }
113
 
@@ -134,6 +138,11 @@ class SiteOrigin_Widgets_Bundle_Compatibility {
134
  if ( function_exists( 'run_litespeed_cache' ) && ! headers_sent() ) {
135
  header( 'x-litespeed-purge: *' );
136
  }
 
 
 
 
 
137
  }
138
 
139
  }
21
  if ( ! empty( $builder ) ) {
22
  require_once $builder['file_path'];
23
  }
24
+
25
  if ( function_exists( 'register_block_type' ) ) {
26
  require_once plugin_dir_path( __FILE__ ) . 'block-editor/widget-block.php';
27
  }
108
  header( 'x-litespeed-purge: ' . $url['path'] );
109
  }
110
  }
111
+
112
+ if ( function_exists( 'rocket_clean_post' ) ) {
113
+ rocket_clean_post( $id );
114
+ }
115
  }
116
  }
117
 
138
  if ( function_exists( 'run_litespeed_cache' ) && ! headers_sent() ) {
139
  header( 'x-litespeed-purge: *' );
140
  }
141
+
142
+ if ( function_exists( 'rocket_clean_domain' ) && function_exists( 'rocket_clean_minify' ) ) {
143
+ rocket_clean_domain();
144
+ rocket_clean_minify( 'css' );
145
+ }
146
  }
147
 
148
  }
lang/so-widgets-bundle.pot CHANGED
@@ -96,23 +96,27 @@ msgstr ""
96
  msgid "Are you sure?"
97
  msgstr ""
98
 
99
- #: base/siteorigin-widget.class.php:626
 
 
 
 
100
  msgid "There is a newer version of this widget's content available."
101
  msgstr ""
102
 
103
- #: base/siteorigin-widget.class.php:627, base/siteorigin-widget.class.php:631
104
  msgid "Restore"
105
  msgstr ""
106
 
107
- #: base/siteorigin-widget.class.php:628
108
  msgid "Dismiss"
109
  msgstr ""
110
 
111
- #: base/siteorigin-widget.class.php:630
112
  msgid "Clicking %s will replace the current widget contents. You can revert by refreshing the page before updating."
113
  msgstr ""
114
 
115
- #: base/siteorigin-widget.class.php:681, base/inc/actions.php:53
116
  msgid "Widget Preview"
117
  msgstr ""
118
 
@@ -244,19 +248,19 @@ msgstr ""
244
  msgid "Current Color"
245
  msgstr ""
246
 
247
- #: compat/block-editor/widget-block.php:63, compat/block-editor/widget-block.php:98
248
  msgid "%s by %s"
249
  msgstr ""
250
 
251
- #: compat/block-editor/widget-block.php:118, compat/visual-composer/visual-composer.php:77
252
  msgid "Selecting a different widget will revert any changes. Continue?"
253
  msgstr ""
254
 
255
- #: compat/block-editor/widget-block.php:138
256
  msgid "You need to select a widget type before you'll see anything here. :)"
257
  msgstr ""
258
 
259
- #: compat/block-editor/widget-block.php:239
260
  msgid "Invalid widget class %s. Please make sure the widget has been activated in %sSiteOrigin Widgets%s."
261
  msgstr ""
262
 
@@ -416,19 +420,19 @@ msgstr ""
416
  msgid "Margin"
417
  msgstr ""
418
 
419
- #: widgets/anything-carousel/anything-carousel.php:125, widgets/button/button.php:104, widgets/features/features.php:72, widgets/image-grid/image-grid.php:134, widgets/image-grid/image-grid.php:154, widgets/image-grid/image-grid.php:247, widgets/simple-masonry/simple-masonry.php:205
420
  msgid "Top"
421
  msgstr ""
422
 
423
- #: widgets/anything-carousel/anything-carousel.php:129, widgets/button/button.php:105, widgets/button/button.php:131, widgets/button/button.php:142, widgets/contact/contact.php:504, widgets/contact/contact.php:519, widgets/contact/contact.php:748, widgets/cta/cta.php:100, widgets/features/features.php:73, widgets/headline/headline.php:102, widgets/headline/headline.php:112, widgets/headline/headline.php:183, widgets/headline/headline.php:193, widgets/headline/headline.php:248, widgets/headline/headline.php:257, widgets/icon/icon.php:50, widgets/image/image.php:70, widgets/image/image.php:82, widgets/image-grid/image-grid.php:137, widgets/image-grid/image-grid.php:167, widgets/image-grid/image-grid.php:204, widgets/image-grid/image-grid.php:250, widgets/simple-masonry/simple-masonry.php:161, widgets/simple-masonry/simple-masonry.php:208, widgets/simple-masonry/simple-masonry.php:236, widgets/social-media-buttons/social-media-buttons.php:175, widgets/social-media-buttons/social-media-buttons.php:186, widgets/testimonial/testimonial.php:256
424
  msgid "Right"
425
  msgstr ""
426
 
427
- #: widgets/anything-carousel/anything-carousel.php:133, widgets/button/button.php:106, widgets/features/features.php:74, widgets/image-grid/image-grid.php:140, widgets/image-grid/image-grid.php:156, widgets/image-grid/image-grid.php:253, widgets/simple-masonry/simple-masonry.php:211
428
  msgid "Bottom"
429
  msgstr ""
430
 
431
- #: widgets/anything-carousel/anything-carousel.php:137, widgets/button/button.php:107, widgets/button/button.php:130, widgets/button/button.php:141, widgets/contact/contact.php:503, widgets/contact/contact.php:518, widgets/contact/contact.php:747, widgets/cta/cta.php:99, widgets/features/features.php:75, widgets/headline/headline.php:101, widgets/headline/headline.php:111, widgets/headline/headline.php:182, widgets/headline/headline.php:192, widgets/headline/headline.php:247, widgets/headline/headline.php:256, widgets/icon/icon.php:49, widgets/image/image.php:69, widgets/image/image.php:81, widgets/image-grid/image-grid.php:143, widgets/image-grid/image-grid.php:165, widgets/image-grid/image-grid.php:202, widgets/image-grid/image-grid.php:256, widgets/simple-masonry/simple-masonry.php:159, widgets/simple-masonry/simple-masonry.php:214, widgets/simple-masonry/simple-masonry.php:235, widgets/social-media-buttons/social-media-buttons.php:174, widgets/social-media-buttons/social-media-buttons.php:185, widgets/testimonial/testimonial.php:255
432
  msgid "Left"
433
  msgstr ""
434
 
@@ -861,103 +865,59 @@ msgstr ""
861
  msgid "Hover Text Color"
862
  msgstr ""
863
 
864
- #: widgets/button/button.php:209, widgets/contact/contact.php:350, widgets/contact/contact.php:626, widgets/contact/contact.php:728, widgets/social-media-buttons/social-media-buttons.php:141
865
- msgid "Normal"
866
- msgstr ""
867
-
868
- #: widgets/button/button.php:210, widgets/button/button.php:234, widgets/social-media-buttons/social-media-buttons.php:142, widgets/social-media-buttons/social-media-buttons.php:164, widgets/social-media-buttons/social-media-buttons.php:197, base/inc/widgets/base-slider.class.php:113
869
- msgid "Medium"
870
- msgstr ""
871
-
872
- #: widgets/button/button.php:211, widgets/social-media-buttons/social-media-buttons.php:143
873
- msgid "Large"
874
- msgstr ""
875
-
876
- #: widgets/button/button.php:212, widgets/social-media-buttons/social-media-buttons.php:144
877
- msgid "Extra large"
878
- msgstr ""
879
-
880
- #: widgets/button/button.php:218, widgets/social-media-buttons/social-media-buttons.php:149
881
- msgid "Rounding"
882
- msgstr ""
883
-
884
- #: widgets/button/button.php:221, widgets/contact/contact.php:462, widgets/contact/contact.php:584, widgets/contact/contact.php:695, widgets/contact/contact.php:780, widgets/google-map/google-map.php:158, widgets/headline/headline.php:218, widgets/social-media-buttons/social-media-buttons.php:152
885
- msgid "None"
886
- msgstr ""
887
-
888
- #: widgets/button/button.php:222
889
- msgid "Slightly Rounded"
890
- msgstr ""
891
-
892
- #: widgets/button/button.php:223
893
- msgid "Very Rounded"
894
- msgstr ""
895
-
896
- #: widgets/button/button.php:224
897
- msgid "Completely Rounded"
898
- msgstr ""
899
-
900
- #: widgets/button/button.php:230, widgets/contact/contact.php:444, widgets/contact/contact.php:550, widgets/contact/contact.php:735, widgets/social-media-buttons/social-media-buttons.php:160, widgets/testimonial/testimonial.php:235
901
  msgid "Padding"
902
  msgstr ""
903
 
904
- #: widgets/button/button.php:233, widgets/social-media-buttons/social-media-buttons.php:163, widgets/social-media-buttons/social-media-buttons.php:196
905
- msgid "Low"
906
- msgstr ""
907
-
908
- #: widgets/button/button.php:235, widgets/social-media-buttons/social-media-buttons.php:165, widgets/social-media-buttons/social-media-buttons.php:198
909
- msgid "High"
910
- msgstr ""
911
-
912
- #: widgets/button/button.php:236
913
- msgid "Very High"
914
  msgstr ""
915
 
916
- #: widgets/button/button.php:245
917
  msgid "Other Attributes and SEO"
918
  msgstr ""
919
 
920
- #: widgets/button/button.php:250, widgets/contact/contact.php:110
921
  msgid "Button ID"
922
  msgstr ""
923
 
924
- #: widgets/button/button.php:251, widgets/contact/contact.php:111
925
  msgid "An ID attribute allows you to target this button in JavaScript."
926
  msgstr ""
927
 
928
- #: widgets/button/button.php:256
929
  msgid "Button Classes"
930
  msgstr ""
931
 
932
- #: widgets/button/button.php:257
933
  msgid "Additional CSS classes added to the button link."
934
  msgstr ""
935
 
936
- #: widgets/button/button.php:262
937
  msgid "Title Attribute"
938
  msgstr ""
939
 
940
- #: widgets/button/button.php:263
941
  msgid "Adds a title attribute to the button link."
942
  msgstr ""
943
 
944
- #: widgets/button/button.php:268, widgets/contact/contact.php:115
945
  msgid "Onclick"
946
  msgstr ""
947
 
948
- #: widgets/button/button.php:269, widgets/contact/contact.php:116
949
  msgid "Run this JavaScript when the button is clicked. Ideal for tracking."
950
  msgstr ""
951
 
952
- #: widgets/button/button.php:274
953
  msgid "Rel Attribute"
954
  msgstr ""
955
 
956
- #: widgets/button/button.php:275
957
  msgid "Adds a rel attribute to the button link."
958
  msgstr ""
959
 
960
- #: widgets/button/button.php:469
961
  msgid "Add a beautiful tooltip to the Button Widget with %sSiteOrigin Premium%s"
962
  msgstr ""
963
 
@@ -1221,6 +1181,10 @@ msgstr ""
1221
  msgid "Size"
1222
  msgstr ""
1223
 
 
 
 
 
1224
  #: widgets/contact/contact.php:351
1225
  msgid "Compact"
1226
  msgstr ""
@@ -1273,6 +1237,10 @@ msgstr ""
1273
  msgid "Border style"
1274
  msgstr ""
1275
 
 
 
 
 
1276
  #: widgets/contact/contact.php:463, widgets/contact/contact.php:585, widgets/contact/contact.php:781, widgets/image/image.php:97
1277
  msgid "Hidden"
1278
  msgstr ""
@@ -2993,6 +2961,18 @@ msgstr ""
2993
  msgid "Button theme"
2994
  msgstr ""
2995
 
 
 
 
 
 
 
 
 
 
 
 
 
2996
  #: widgets/social-media-buttons/social-media-buttons.php:153
2997
  msgid "Slightly rounded"
2998
  msgstr ""
@@ -3005,6 +2985,14 @@ msgstr ""
3005
  msgid "Completely rounded"
3006
  msgstr ""
3007
 
 
 
 
 
 
 
 
 
3008
  #: widgets/social-media-buttons/social-media-buttons.php:166, widgets/social-media-buttons/social-media-buttons.php:199
3009
  msgid "Very high"
3010
  msgstr ""
@@ -3273,8 +3261,9 @@ msgstr ""
3273
  msgid "Optional"
3274
  msgstr ""
3275
 
3276
- #: base/inc/fields/base.class.php:331
3277
- msgid "Required"
 
3278
  msgstr ""
3279
 
3280
  #: base/inc/fields/builder.class.php:42
96
  msgid "Are you sure?"
97
  msgstr ""
98
 
99
+ #: base/siteorigin-widget.class.php:625
100
+ msgid "You have empty required widgets. Are you sure you wish to continue?"
101
+ msgstr ""
102
+
103
+ #: base/siteorigin-widget.class.php:627
104
  msgid "There is a newer version of this widget's content available."
105
  msgstr ""
106
 
107
+ #: base/siteorigin-widget.class.php:628, base/siteorigin-widget.class.php:632
108
  msgid "Restore"
109
  msgstr ""
110
 
111
+ #: base/siteorigin-widget.class.php:629
112
  msgid "Dismiss"
113
  msgstr ""
114
 
115
+ #: base/siteorigin-widget.class.php:631
116
  msgid "Clicking %s will replace the current widget contents. You can revert by refreshing the page before updating."
117
  msgstr ""
118
 
119
+ #: base/siteorigin-widget.class.php:682, base/inc/actions.php:53
120
  msgid "Widget Preview"
121
  msgstr ""
122
 
248
  msgid "Current Color"
249
  msgstr ""
250
 
251
+ #: compat/block-editor/widget-block.php:64, compat/block-editor/widget-block.php:99
252
  msgid "%s by %s"
253
  msgstr ""
254
 
255
+ #: compat/block-editor/widget-block.php:119, compat/visual-composer/visual-composer.php:77
256
  msgid "Selecting a different widget will revert any changes. Continue?"
257
  msgstr ""
258
 
259
+ #: compat/block-editor/widget-block.php:139
260
  msgid "You need to select a widget type before you'll see anything here. :)"
261
  msgstr ""
262
 
263
+ #: compat/block-editor/widget-block.php:240
264
  msgid "Invalid widget class %s. Please make sure the widget has been activated in %sSiteOrigin Widgets%s."
265
  msgstr ""
266
 
420
  msgid "Margin"
421
  msgstr ""
422
 
423
+ #: widgets/anything-carousel/anything-carousel.php:125, widgets/button/button.php:104, widgets/button/button.php:223, widgets/features/features.php:72, widgets/image-grid/image-grid.php:134, widgets/image-grid/image-grid.php:154, widgets/image-grid/image-grid.php:247, widgets/simple-masonry/simple-masonry.php:205
424
  msgid "Top"
425
  msgstr ""
426
 
427
+ #: widgets/anything-carousel/anything-carousel.php:129, widgets/button/button.php:105, widgets/button/button.php:131, widgets/button/button.php:142, widgets/button/button.php:226, widgets/contact/contact.php:504, widgets/contact/contact.php:519, widgets/contact/contact.php:748, widgets/cta/cta.php:100, widgets/features/features.php:73, widgets/headline/headline.php:102, widgets/headline/headline.php:112, widgets/headline/headline.php:183, widgets/headline/headline.php:193, widgets/headline/headline.php:248, widgets/headline/headline.php:257, widgets/icon/icon.php:50, widgets/image/image.php:70, widgets/image/image.php:82, widgets/image-grid/image-grid.php:137, widgets/image-grid/image-grid.php:167, widgets/image-grid/image-grid.php:204, widgets/image-grid/image-grid.php:250, widgets/simple-masonry/simple-masonry.php:161, widgets/simple-masonry/simple-masonry.php:208, widgets/simple-masonry/simple-masonry.php:236, widgets/social-media-buttons/social-media-buttons.php:175, widgets/social-media-buttons/social-media-buttons.php:186, widgets/testimonial/testimonial.php:256
428
  msgid "Right"
429
  msgstr ""
430
 
431
+ #: widgets/anything-carousel/anything-carousel.php:133, widgets/button/button.php:106, widgets/button/button.php:229, widgets/features/features.php:74, widgets/image-grid/image-grid.php:140, widgets/image-grid/image-grid.php:156, widgets/image-grid/image-grid.php:253, widgets/simple-masonry/simple-masonry.php:211
432
  msgid "Bottom"
433
  msgstr ""
434
 
435
+ #: widgets/anything-carousel/anything-carousel.php:137, widgets/button/button.php:107, widgets/button/button.php:130, widgets/button/button.php:141, widgets/button/button.php:232, widgets/contact/contact.php:503, widgets/contact/contact.php:518, widgets/contact/contact.php:747, widgets/cta/cta.php:99, widgets/features/features.php:75, widgets/headline/headline.php:101, widgets/headline/headline.php:111, widgets/headline/headline.php:182, widgets/headline/headline.php:192, widgets/headline/headline.php:247, widgets/headline/headline.php:256, widgets/icon/icon.php:49, widgets/image/image.php:69, widgets/image/image.php:81, widgets/image-grid/image-grid.php:143, widgets/image-grid/image-grid.php:165, widgets/image-grid/image-grid.php:202, widgets/image-grid/image-grid.php:256, widgets/simple-masonry/simple-masonry.php:159, widgets/simple-masonry/simple-masonry.php:214, widgets/simple-masonry/simple-masonry.php:235, widgets/social-media-buttons/social-media-buttons.php:174, widgets/social-media-buttons/social-media-buttons.php:185, widgets/testimonial/testimonial.php:255
436
  msgid "Left"
437
  msgstr ""
438
 
865
  msgid "Hover Text Color"
866
  msgstr ""
867
 
868
+ #: widgets/button/button.php:213, widgets/contact/contact.php:444, widgets/contact/contact.php:550, widgets/contact/contact.php:735, widgets/social-media-buttons/social-media-buttons.php:160, widgets/testimonial/testimonial.php:235
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
869
  msgid "Padding"
870
  msgstr ""
871
 
872
+ #: widgets/button/button.php:219, widgets/social-media-buttons/social-media-buttons.php:149
873
+ msgid "Rounding"
 
 
 
 
 
 
 
 
874
  msgstr ""
875
 
876
+ #: widgets/button/button.php:242
877
  msgid "Other Attributes and SEO"
878
  msgstr ""
879
 
880
+ #: widgets/button/button.php:247, widgets/contact/contact.php:110
881
  msgid "Button ID"
882
  msgstr ""
883
 
884
+ #: widgets/button/button.php:248, widgets/contact/contact.php:111
885
  msgid "An ID attribute allows you to target this button in JavaScript."
886
  msgstr ""
887
 
888
+ #: widgets/button/button.php:253
889
  msgid "Button Classes"
890
  msgstr ""
891
 
892
+ #: widgets/button/button.php:254
893
  msgid "Additional CSS classes added to the button link."
894
  msgstr ""
895
 
896
+ #: widgets/button/button.php:259
897
  msgid "Title Attribute"
898
  msgstr ""
899
 
900
+ #: widgets/button/button.php:260
901
  msgid "Adds a title attribute to the button link."
902
  msgstr ""
903
 
904
+ #: widgets/button/button.php:265, widgets/contact/contact.php:115
905
  msgid "Onclick"
906
  msgstr ""
907
 
908
+ #: widgets/button/button.php:266, widgets/contact/contact.php:116
909
  msgid "Run this JavaScript when the button is clicked. Ideal for tracking."
910
  msgstr ""
911
 
912
+ #: widgets/button/button.php:271
913
  msgid "Rel Attribute"
914
  msgstr ""
915
 
916
+ #: widgets/button/button.php:272
917
  msgid "Adds a rel attribute to the button link."
918
  msgstr ""
919
 
920
+ #: widgets/button/button.php:479
921
  msgid "Add a beautiful tooltip to the Button Widget with %sSiteOrigin Premium%s"
922
  msgstr ""
923
 
1181
  msgid "Size"
1182
  msgstr ""
1183
 
1184
+ #: widgets/contact/contact.php:350, widgets/contact/contact.php:626, widgets/contact/contact.php:728, widgets/social-media-buttons/social-media-buttons.php:141
1185
+ msgid "Normal"
1186
+ msgstr ""
1187
+
1188
  #: widgets/contact/contact.php:351
1189
  msgid "Compact"
1190
  msgstr ""
1237
  msgid "Border style"
1238
  msgstr ""
1239
 
1240
+ #: widgets/contact/contact.php:462, widgets/contact/contact.php:584, widgets/contact/contact.php:695, widgets/contact/contact.php:780, widgets/google-map/google-map.php:158, widgets/headline/headline.php:218, widgets/social-media-buttons/social-media-buttons.php:152
1241
+ msgid "None"
1242
+ msgstr ""
1243
+
1244
  #: widgets/contact/contact.php:463, widgets/contact/contact.php:585, widgets/contact/contact.php:781, widgets/image/image.php:97
1245
  msgid "Hidden"
1246
  msgstr ""
2961
  msgid "Button theme"
2962
  msgstr ""
2963
 
2964
+ #: widgets/social-media-buttons/social-media-buttons.php:142, widgets/social-media-buttons/social-media-buttons.php:164, widgets/social-media-buttons/social-media-buttons.php:197, base/inc/widgets/base-slider.class.php:113
2965
+ msgid "Medium"
2966
+ msgstr ""
2967
+
2968
+ #: widgets/social-media-buttons/social-media-buttons.php:143
2969
+ msgid "Large"
2970
+ msgstr ""
2971
+
2972
+ #: widgets/social-media-buttons/social-media-buttons.php:144
2973
+ msgid "Extra large"
2974
+ msgstr ""
2975
+
2976
  #: widgets/social-media-buttons/social-media-buttons.php:153
2977
  msgid "Slightly rounded"
2978
  msgstr ""
2985
  msgid "Completely rounded"
2986
  msgstr ""
2987
 
2988
+ #: widgets/social-media-buttons/social-media-buttons.php:163, widgets/social-media-buttons/social-media-buttons.php:196
2989
+ msgid "Low"
2990
+ msgstr ""
2991
+
2992
+ #: widgets/social-media-buttons/social-media-buttons.php:165, widgets/social-media-buttons/social-media-buttons.php:198
2993
+ msgid "High"
2994
+ msgstr ""
2995
+
2996
  #: widgets/social-media-buttons/social-media-buttons.php:166, widgets/social-media-buttons/social-media-buttons.php:199
2997
  msgid "Very high"
2998
  msgstr ""
3261
  msgid "Optional"
3262
  msgstr ""
3263
 
3264
+ #. translators: Used to indicate field as required.
3265
+ #: base/inc/fields/base.class.php:332
3266
+ msgid "*"
3267
  msgstr ""
3268
 
3269
  #: base/inc/fields/builder.class.php:42
readme.txt CHANGED
@@ -3,8 +3,8 @@ Tags: widget, button, slider, hero, google maps, image, carousel, lottie, featur
3
  Requires at least: 4.2
4
  Tested up to: 6.1
5
  Requires PHP: 5.6.20
6
- Stable tag: 1.44.1
7
- Build time: 2022-11-25T20:07:41+00:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis, alexgso
10
  Donate link: https://siteorigin.com/downloads/premium/
@@ -106,6 +106,16 @@ The Widgets Bundle global interface is available at Plugins > SiteOrigin Widgets
106
 
107
  == Changelog ==
108
 
 
 
 
 
 
 
 
 
 
 
109
  = 1.44.1 - 25 November 2022 =
110
  * Icon Field: Resolved jQuery Migrate flag.
111
  * Contact Form: Resolved notice when Message field not used.
3
  Requires at least: 4.2
4
  Tested up to: 6.1
5
  Requires PHP: 5.6.20
6
+ Stable tag: 1.44.2
7
+ Build time: 2022-12-03T19:30:06+00:00
8
  License: GPLv3 or later
9
  Contributors: gpriday, braam-genis, alexgso
10
  Donate link: https://siteorigin.com/downloads/premium/
106
 
107
  == Changelog ==
108
 
109
+ = 1.44.2 - 03 December 2022 =
110
+ * Added WP Rocket compatibility.
111
+ * Button: Expanded Font Size, Padding, and Rounding to be more customizable.
112
+ * Headline: Prevented a potential notice when adding `mobile_align` defaults to pre-existing instances.
113
+ * Image Size Field: Update to display the setting description if available.
114
+ * Simple Masonry: Resolved a potential `Undefined array key` warning.
115
+ * Developer: Introduced widget validation via `sowbForms.validateFields` and `sow_validate_widget_data`.
116
+ * Developer: Update to allow custom color palettes or for palettes to be completely removed on a field by field basis.
117
+ * Developer: Pass state emitter field to custom callbacks. Allows developers to detect the field that triggered the emitter.
118
+
119
  = 1.44.1 - 25 November 2022 =
120
  * Icon Field: Resolved jQuery Migrate flag.
121
  * Contact Form: Resolved notice when Message field not used.
so-widgets-bundle.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A highly customizable collection of widgets, ready to be used anywhere, neatly bundled into a single plugin.
5
- Version: 1.44.1
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
@@ -12,7 +12,7 @@ License: GPL3
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
- define( 'SOW_BUNDLE_VERSION', '1.44.1' );
16
  define( 'SOW_BUNDLE_BASE_FILE', __FILE__ );
17
 
18
  // Allow JS suffix to be pre-set.
2
  /*
3
  Plugin Name: SiteOrigin Widgets Bundle
4
  Description: A highly customizable collection of widgets, ready to be used anywhere, neatly bundled into a single plugin.
5
+ Version: 1.44.2
6
  Text Domain: so-widgets-bundle
7
  Domain Path: /lang
8
  Author: SiteOrigin
12
  License URI: https://www.gnu.org/licenses/gpl-3.0.txt
13
  */
14
 
15
+ define( 'SOW_BUNDLE_VERSION', '1.44.2' );
16
  define( 'SOW_BUNDLE_BASE_FILE', __FILE__ );
17
 
18
  // Allow JS suffix to be pre-set.
widgets/button/button.php CHANGED
@@ -203,37 +203,34 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
203
  ),
204
 
205
  'font_size' => array(
206
- 'type' => 'select',
207
  'label' => __( 'Font Size', 'so-widgets-bundle' ),
208
- 'options' => array(
209
- '1' => __( 'Normal', 'so-widgets-bundle' ),
210
- '1.15' => __( 'Medium', 'so-widgets-bundle' ),
211
- '1.3' => __( 'Large', 'so-widgets-bundle' ),
212
- '1.45' => __( 'Extra large', 'so-widgets-bundle' ),
213
- ),
214
- ),
215
-
216
- 'rounding' => array(
217
- 'type' => 'select',
218
- 'label' => __( 'Rounding', 'so-widgets-bundle' ),
219
- 'default' => '0.25',
220
- 'options' => array(
221
- '0' => __( 'None', 'so-widgets-bundle' ),
222
- '0.25' => __( 'Slightly Rounded', 'so-widgets-bundle' ),
223
- '0.5' => __( 'Very Rounded', 'so-widgets-bundle' ),
224
- '1.5' => __( 'Completely Rounded', 'so-widgets-bundle' ),
225
- ),
226
  ),
227
 
228
  'padding' => array(
229
- 'type' => 'select',
230
  'label' => __( 'Padding', 'so-widgets-bundle' ),
231
- 'default' => '1',
232
- 'options' => array(
233
- '0.5' => __( 'Low', 'so-widgets-bundle' ),
234
- '1' => __( 'Medium', 'so-widgets-bundle' ),
235
- '1.4' => __( 'High', 'so-widgets-bundle' ),
236
- '1.8' => __( 'Very High', 'so-widgets-bundle' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
237
  ),
238
  ),
239
 
@@ -375,9 +372,9 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
375
  'text_color' => $text_color,
376
  'hover_text_color' => ! empty( $instance['design']['hover_text_color'] ) ? $instance['design']['hover_text_color'] : $text_color,
377
  'hover_background_color' => ! empty( $instance['design']['hover_background_color'] ) ? $instance['design']['hover_background_color'] : $button_color,
378
- 'font_size' => isset($instance['design']['font_size']) ? $instance['design']['font_size'] . 'em' : '',
379
- 'rounding' => isset($instance['design']['rounding']) ? $instance['design']['rounding'] . 'em' : '',
380
- 'padding' => isset($instance['design']['padding']) ? $instance['design']['padding'] . 'em' : '',
381
  'has_text' => empty( $instance['text'] ) ? 'false' : 'true',
382
  'responsive_breakpoint' => $this->get_global_settings( 'responsive_breakpoint' ),
383
  'align' => $instance['design']['align'],
@@ -459,6 +456,19 @@ class SiteOrigin_Widget_Button_Widget extends SiteOrigin_Widget {
459
  $instance['design']['mobile_align'] = $instance['design']['align'];
460
  }
461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
462
  return $instance;
463
  }
464
 
203
  ),
204
 
205
  'font_size' => array(
206
+ 'type' => 'measurement',
207
  'label' => __( 'Font Size', 'so-widgets-bundle' ),
208
+ 'default' => '1em',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  ),
210
 
211
  'padding' => array(
212
+ 'type' => 'measurement',
213
  'label' => __( 'Padding', 'so-widgets-bundle' ),
214
+ 'default' => '1em',
215
+ ),
216
+
217
+ 'rounding' => array(
218
+ 'type' => 'multi-measurement',
219
+ 'label' => __( 'Rounding', 'so-widgets-bundle' ),
220
+ 'default' => '0.25em 0.25em 0.25em 0.25em',
221
+ 'measurements' => array(
222
+ 'top' => array(
223
+ 'label' => __( 'Top', 'so-widgets-bundle' ),
224
+ ),
225
+ 'right' => array(
226
+ 'label' => __( 'Right', 'so-widgets-bundle' ),
227
+ ),
228
+ 'bottom' => array(
229
+ 'label' => __( 'Bottom', 'so-widgets-bundle' ),
230
+ ),
231
+ 'left' => array(
232
+ 'label' => __( 'Left', 'so-widgets-bundle' ),
233
+ ),
234
  ),
235
  ),
236
 
372
  'text_color' => $text_color,
373
  'hover_text_color' => ! empty( $instance['design']['hover_text_color'] ) ? $instance['design']['hover_text_color'] : $text_color,
374
  'hover_background_color' => ! empty( $instance['design']['hover_background_color'] ) ? $instance['design']['hover_background_color'] : $button_color,
375
+ 'font_size' => isset( $instance['design']['font_size'] ) ? $instance['design']['font_size'] : '',
376
+ 'rounding' => isset( $instance['design']['rounding'] ) ? $instance['design']['rounding'] : '',
377
+ 'padding' => isset( $instance['design']['padding'] ) ? $instance['design']['padding'] : '',
378
  'has_text' => empty( $instance['text'] ) ? 'false' : 'true',
379
  'responsive_breakpoint' => $this->get_global_settings( 'responsive_breakpoint' ),
380
  'align' => $instance['design']['align'],
456
  $instance['design']['mobile_align'] = $instance['design']['align'];
457
  }
458
 
459
+ // Migrate predefined settings to more customizable settings.
460
+ if ( ! empty( $instance['design']['font_size'] ) && is_numeric( $instance['design']['font_size'] ) ) {
461
+ $instance['design']['font_size'] .= 'em';
462
+ }
463
+
464
+ if ( ! empty( $instance['design']['padding'] ) && is_numeric( $instance['design']['padding'] ) ) {
465
+ $instance['design']['padding'] .= 'em';
466
+ }
467
+
468
+ if ( ! empty( $instance['design']['rounding'] ) && is_numeric( $instance['design']['rounding'] ) ) {
469
+ $instance['design']['rounding'] = $instance['design']['rounding'] . 'em ' . $instance['design']['rounding'] . 'em ' . $instance['design']['rounding'] . 'em ' . $instance['design']['rounding'] . 'em';
470
+ }
471
+
472
  return $instance;
473
  }
474
 
widgets/headline/headline.php CHANGED
@@ -459,11 +459,12 @@ class SiteOrigin_Widget_Headline_Widget extends SiteOrigin_Widget {
459
  $instance['divider']['bottom_margin'] = $instance['divider']['top_margin'];
460
  $instance['divider']['bottom_margin_unit'] = $instance['divider']['top_margin_unit'];
461
  }
 
462
  // Set Mobile alignment settings to same value as the Alignment for existing widgets.
463
  if ( ! empty( $instance['headline']['align'] ) && empty( $instance['headline']['mobile_align'] ) ) {
464
- $instance['headline']['mobile_align'] = $instance['headline']['align'];
465
- $instance['sub_headline']['mobile_align'] = $instance['sub_headline']['align'];
466
- $instance['divider']['mobile_align'] = $instance['divider']['align'];
467
  }
468
 
469
  return $instance;
459
  $instance['divider']['bottom_margin'] = $instance['divider']['top_margin'];
460
  $instance['divider']['bottom_margin_unit'] = $instance['divider']['top_margin_unit'];
461
  }
462
+
463
  // Set Mobile alignment settings to same value as the Alignment for existing widgets.
464
  if ( ! empty( $instance['headline']['align'] ) && empty( $instance['headline']['mobile_align'] ) ) {
465
+ $instance['headline']['mobile_align'] = ! empty( $instance['headline']['align'] ) ? $instance['headline']['align'] : 'center';
466
+ $instance['sub_headline']['mobile_align'] = ! empty( $instance['sub_headline']['align'] ) ? $instance['sub_headline']['align'] : 'center';
467
+ $instance['divider']['mobile_align'] = ! empty( $instance['divider']['align'] ) ? $instance['divider']['align'] : 'center';
468
  }
469
 
470
  return $instance;
widgets/simple-masonry/simple-masonry.php CHANGED
@@ -440,7 +440,7 @@ class SiteOrigin_Widget_Simple_Masonry_Widget extends SiteOrigin_Widget {
440
  $instance['layout']['desktop'] = array();
441
  $instance['layout']['tablet'] = array();
442
  $instance['layout']['mobile'] = array();
443
- $instance['layout']['origin_left'] = $instance['layout_origin_left'];
444
 
445
  $migrate_layout_sections = array(
446
  'desktop' => array(
@@ -470,7 +470,7 @@ class SiteOrigin_Widget_Simple_Masonry_Widget extends SiteOrigin_Widget {
470
  }
471
  unset( $instance[ $setting . '_layout' ] );
472
  }
473
- }
474
 
475
  return $instance;
476
  }
@@ -502,4 +502,4 @@ class SiteOrigin_Widget_Simple_Masonry_Widget extends SiteOrigin_Widget {
502
  }
503
  }
504
 
505
- siteorigin_widget_register('sow-simple-masonry', __FILE__, 'SiteOrigin_Widget_Simple_Masonry_Widget');
440
  $instance['layout']['desktop'] = array();
441
  $instance['layout']['tablet'] = array();
442
  $instance['layout']['mobile'] = array();
443
+ $instance['layout']['origin_left'] = ! empty( $instance['layout_origin_left'] ) ? $instance['layout_origin_left'] : 'true';
444
 
445
  $migrate_layout_sections = array(
446
  'desktop' => array(
470
  }
471
  unset( $instance[ $setting . '_layout' ] );
472
  }
473
+ }
474
 
475
  return $instance;
476
  }
502
  }
503
  }
504
 
505
+ siteorigin_widget_register( 'sow-simple-masonry', __FILE__, 'SiteOrigin_Widget_Simple_Masonry_Widget' );