diff --git a/controls/js/dist/script-legacy.js b/controls/js/dist/script-legacy.js
index 2931ad47c..a6ac6ea10 100644
--- a/controls/js/dist/script-legacy.js
+++ b/controls/js/dist/script-legacy.js
@@ -1023,6 +1023,11 @@ var kirki = {
}
}
+ if ( 'undefined' !== typeof wp.customize.control( setting ) ) {
+ wp.customize.control( setting ).setting.set( value );
+ return;
+ }
+
parts = setting.split( '[' ),
// Find the setting we're using in the control using the customizer API.
diff --git a/controls/js/dist/script-legacy.min.js b/controls/js/dist/script-legacy.min.js
index 6e84b6797..bca740f1d 100644
--- a/controls/js/dist/script-legacy.min.js
+++ b/controls/js/dist/script-legacy.min.js
@@ -1 +1 @@
-if(_.isUndefined(window.kirkiSetSettingValue))var kirkiSetSettingValue={set:function(e,t){var i,n=this,a=wp.customize.settings.controls[e];if(_.isUndefined(a))return!0;switch(n.setValue(e,t),a.type){case"kirki-background":_.isUndefined(t["background-color"])||n.setColorPicker(n.findElement(e,".kirki-color-control"),t["background-color"]),n.findElement(e,".placeholder, .thumbnail").removeClass().addClass("placeholder").html("No file selected"),_.each(["background-repeat","background-position"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["background-size","background-attachment"],function(i){jQuery(n.findElement(e,"."+i+' input[value="'+t+'"]')).prop("checked",!0)}),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".background-hidden-value").attr("value",i)).trigger("change");break;case"kirki-code":jQuery(n.findElement(e,".CodeMirror"))[0].CodeMirror.setValue(t);break;case"checkbox":case"kirki-switch":case"kirki-toggle":t=1===t||"1"===t||!0===t,jQuery(n.findElement(e,"input")).prop("checked",t),wp.customize.instance(e).set(t);break;case"kirki-select":case"kirki-preset":case"kirki-fontawesome":n.setSelectWoo(n.findElement(e,"select"),t);break;case"kirki-slider":jQuery(n.findElement(e,"input")).prop("value",t),jQuery(n.findElement(e,".kirki_range_value .value")).html(t);break;case"kirki-generic":(_.isUndefined(a.choices)||_.isUndefined(a.choices.element))&&(a.choices.element="input"),jQuery(n.findElement(e,a.choices.element)).prop("value",t);break;case"kirki-color":n.setColorPicker(n.findElement(e,".kirki-color-control"),t);break;case"kirki-multicheck":n.findElement(e,"input").each(function(){jQuery(this).prop("checked",!1)}),_.each(t,function(i,a){jQuery(n.findElement(e,'input[value="'+t[a]+'"]')).prop("checked",!0)});break;case"kirki-multicolor":_.each(t,function(t,i){n.setColorPicker(n.findElement(e,".multicolor-index-"+i),t)});break;case"kirki-radio-buttonset":case"kirki-radio-image":case"kirki-radio":case"kirki-dashicons":case"kirki-color-palette":case"kirki-palette":jQuery(n.findElement(e,'input[value="'+t+'"]')).prop("checked",!0);break;case"kirki-typography":_.each(["font-family","variant","subsets"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["font-size","line-height","letter-spacing","word-spacing"],function(i){_.isUndefined(t[i])||jQuery(n.findElement(e,"."+i+" input")).prop("value",t[i])}),_.isUndefined(t.color)||n.setColorPicker(n.findElement(e,".kirki-color-control"),t.color),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".typography-hidden-value").attr("value",i)).trigger("change");break;case"kirki-dimensions":_.each(t,function(t,i){jQuery(n.findElement(e,"."+i+" input")).prop("value",t)});break;case"kirki-repeater":case"kirki-custom":break;default:jQuery(n.findElement(e,"input")).prop("value",t)}},setColorPicker:function(e,t){e.attr("data-default-color",t).data("default-color",t).wpColorPicker("color",t)},setSelectWoo:function(e,t){jQuery(e).selectWoo().val(t).trigger("change")},setTextarea:function(e,t){jQuery(e).prop("value",t)},findElement:function(e,t){return wp.customize.control(e).container.find(t)},setValue:function(e,t,i){i=_.isUndefined(i)?100:parseInt(i,10),wp.customize.instance(e).set({}),setTimeout(function(){wp.customize.instance(e).set(t)},i)}};var kirki={initialized:!1,initialize:function(){var e=this;e.initialized||(e.util.webfonts.google.initialize(),e.initialized=!0)},control:{"kirki-radio":{init:function(e){this.template(e),kirki.input.radio.init(e)},template:function(e){e.container.html(kirki.input.radio.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,default:e.params.default,value:kirki.setting.get(e.id),choices:e.params.choices}))}},"kirki-color":{init:function(e){this.template(e),kirki.input.color.init(e)},template:function(e){e.container.html(kirki.input.color.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,mode:e.params.mode,inputAttrs:e.params.inputAttrs,"data-palette":e.params.palette,"data-default-color":e.params.default,"data-alpha":e.params.choices.alpha,value:kirki.setting.get(e.id)}))}},"kirki-generic":{init:function(e){this.template(e),_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?kirki.input.genericInput.init(e):kirki.input.textarea.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?e.container.html(kirki.input.genericInput.getTemplate(t)):e.container.html(kirki.input.textarea.getTemplate(t))}},"kirki-select":{init:function(e){this.template(e),kirki.input.select.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};e.container.html(kirki.input.select.getTemplate(t))}}},input:{radio:{getTemplate:function(e){var t="";if((e=_.defaults(e,{choices:{},label:"",description:"",inputAttrs:"",value:"","data-id":"",default:""})).choices)return e.label&&(t+=''+e.label+""),e.description&&(t+=''+e.description+""),_.each(e.choices,function(i,n){t+=""}),'
'+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},color:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",mode:"full",inputAttrs:"","data-palette":!e["data-palette"]||e["data-palette"],"data-default-color":e["data-default-color"]?e["data-default-color"]:"","data-alpha":!!e["data-alpha"]&&e["data-alpha"],value:"","data-id":""}),t+="",t+='',''+t+"
"},init:function(e){var t,i=jQuery('.kirki-color-control[data-id="'+e.id+'"]');e.choices=e.choices||{},_.isEmpty(e.choices)&&e.params.choices&&(e.choices=e.params.choices),_.isEmpty(e.choices)||i.wpColorPicker(e.choices),setTimeout(function(){(t=jQuery('.kirki-input-container[data-id="'+e.id+'"] .wp-picker-clear')).length&&t.click(function(){e.setting.set("")})},200),i.wpColorPicker({change:function(){setTimeout(function(){kirki.setting.set(e.id,i.val())},20)}})}},genericInput:{getTemplate:function(e){var t="",i=e.choices.element?e.choices.element:"input";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},textarea:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('textarea[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},select:{getTemplate:function(e){var t,i="";if((e=_.defaults(e,{label:"",description:"",inputAttrs:"","data-id":"",choices:{},multiple:1,value:1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+='",''+i+"
"},init:function(e){var t,i=jQuery('select[data-id="'+e.id+'"'),n=parseInt(i.data("multiple"),10),a={escapeMarkup:function(e){return e}};1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+="",i+='",''+i+"
"},init:function(e){}}},setting:{get:function(e){var t=e.split("["),i="",n=0,a="";return _.each(t,function(e,t){e=e.replace("]",""),0===t?i=e:i+="["+e+"]",_.isUndefined(wp.customize.instance(i))||(a=wp.customize.instance(i).get(),n=t),n"),n.params.content.attr("id","customize-control-"+e.replace(/]/g,"").replace(/\[/g,"-")),n.params.content.attr("class","customize-control customize-control-"+n.params.type)),i.propertyElements=[],wp.customize.Control.prototype.initialize.call(i,e,n)},_setUpSettingRootLinks:function(){var e=this;e.container.find("[data-customize-setting-link]").each(function(){var t=jQuery(this);wp.customize(t.data("customizeSettingLink"),function(i){var n=new wp.customize.Element(t);e.elements.push(n),n.sync(i),n.set(i())})})},_setUpSettingPropertyLinks:function(){var e=this;e.setting&&e.container.find("[data-customize-setting-property-link]").each(function(){var t,i=jQuery(this),n=i.data("customizeSettingPropertyLink");t=new wp.customize.Element(i),e.propertyElements.push(t),t.set(e.setting()[n]),t.bind(function(t){var i=e.setting();t!==i[n]&&((i=_.clone(i))[n]=t,e.setting.set(i))}),e.setting.bind(function(e){e[n]!==t.get()&&t.set(e[n])})})},ready:function(){var e=this;e._setUpSettingRootLinks(),e._setUpSettingPropertyLinks(),wp.customize.Control.prototype.ready.call(e),e.deferred.embedded.done(function(){e.initKirkiControl(e)})},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,function(t){"kirki-expanded"===t.params.type||t.expanded()||wp.customize.settings.autofocus.control===e.id?e.actuallyEmbed():t.expanded.bind(function(t){t&&e.actuallyEmbed()})})},actuallyEmbed:function(){var e=this;"resolved"!==e.deferred.embedded.state()&&(e.renderContent(),e.deferred.embedded.resolve())},focus:function(e){var t=this;t.actuallyEmbed(),wp.customize.Control.prototype.focus.call(t,e)},initKirkiControl:function(e){void 0===kirki.control[e.params.type]?this.container.on("change keyup paste click","input",function(){e.setting.set(jQuery(this).val())}):kirki.control[e.params.type].init(e)},kirkiValidateCSSValue:function(e){var t,i,n=["rem","em","ex","%","px","cm","mm","in","pt","pc","ch","vh","vw","vmin","vmax"];return"0"===e||0<=e.indexOf("calc(")&&0<=e.indexOf(")")||(t=parseFloat(e),i=e.replace(t,""),!isNaN(t)&&-1!==jQuery.inArray(i,n))}})}(),_.each(kirki.control,function(e,t){wp.customize.controlConstructor[t]=wp.customize.kirkiDynamicControl.extend({})}),wp.customize.controlConstructor["kirki-background"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=e.container.find(".kirki-color-control");(_.isUndefined(t["background-image"])||""===t["background-image"])&&(e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide()),i.wpColorPicker({change:function(){setTimeout(function(){e.saveValue("background-color",i.val())},100)}}),e.container.on("change",".background-repeat select",function(){e.saveValue("background-repeat",jQuery(this).val())}),e.container.on("change click",".background-size input",function(){e.saveValue("background-size",jQuery(this).val())}),e.container.on("change",".background-position select",function(){e.saveValue("background-position",jQuery(this).val())}),e.container.on("change click",".background-attachment input",function(){e.saveValue("background-attachment",jQuery(this).val())}),e.container.on("click",".background-image-upload-button",function(t){var i=wp.media({multiple:!1}).open().on("select",function(){var t,n,a,r=i.state().get("selection").first(),o=r.toJSON().sizes.full.url;_.isUndefined(r.toJSON().sizes.medium)?_.isUndefined(r.toJSON().sizes.thumbnail)||(o=r.toJSON().sizes.thumbnail.url):o=r.toJSON().sizes.medium.url,t=r.toJSON().sizes.full.url,r.toJSON().id,r.toJSON().width,r.toJSON().height,""!==t&&e.container.find(".background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment").show(),e.saveValue("background-image",t),n=e.container.find(".placeholder, .thumbnail"),a=e.container.find(".background-image-upload-remove-button"),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),a.length&&a.show()});t.preventDefault()}),e.container.on("click",".background-image-upload-remove-button",function(t){var i,n;t.preventDefault(),e.saveValue("background-image",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".background-image-upload-remove-button"),e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide(),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&n.hide()})},getValue:function(){var e=this,t={};return _.each(e.params.default,function(i,n){!1!==i&&(t[n]=i,_.isUndefined(e.setting._value[n])||(t[n]=e.setting._value[n]))}),_.each(e.setting._value,function(e,i){_.isUndefined(t[i])&&(t[i]=e)}),t},saveValue:function(e,t){"use strict";var i=this,n=jQuery("#customize-control-"+i.id.replace("[","-").replace("]","")+" .background-hidden-value"),a=jQuery(n).val(),r=JSON.parse(a);r[e]=t,i.setting.set(r),jQuery(n).attr("value",JSON.stringify(r)).trigger("change")}}),wp.customize.controlConstructor["kirki-code"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.CodeEditorControl)||(jQuery(e.container.find("textarea.kirki-codemirror-editor")).hide(),wp.customize.control.add(new wp.customize.CodeEditorControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,editor_settings:{codemirror:{mode:e.params.choices.language}},settings:{default:e.id}})))}}),wp.customize.controlConstructor["kirki-color-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-dashicons"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-date"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.DateTimeControl)||wp.customize.control.add(new wp.customize.DateTimeControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,description:e.params.description,settings:{default:e.id},default:e.params.default}))}}),wp.customize.controlConstructor["kirki-dimension"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;t.kirkiNotifications(),this.container.on("change keyup paste","input",function(){e=jQuery(this).val(),t.setting.set(e)})},kirkiNotifications:function(){var e=this;wp.customize(e.id,function(t){t.bind(function(i){var n="long_title";!1===e.kirkiValidateCSSValue(i)?t.notifications.add(n,new wp.customize.Notification(n,{type:"warning",message:dimensionkirkiL10n["invalid-value"]})):t.notifications.remove(n)})})}}),wp.customize.controlConstructor["kirki-dimensions"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this,i=t.params.choices.controls,n={},a=[];for(_.each(i,function(e,t){!0===e&&a.push(t)}),e=0;e '+e.text},templateSelection:function(e){return' '+e.text}};_.each(a.icons,function(e){r.data.push({id:e.id,text:e.name})}),(t=jQuery(n).selectWoo(r)).on("change",function(){e=jQuery(this).val(),i.setting.set(e)}),t.val(i.setting._value).trigger("change")}}),wp.customize.controlConstructor["kirki-image"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as,n=e.container.find(".placeholder, .thumbnail"),a="array"===i?t.url:t,r=e.container.find(".image-upload-remove-button"),o=e.container.find(".image-default-button");e.container.find(".kirki-controls-loading-spinner").hide(),"id"!==i&&"ID"!==i||""===t||wp.media.attachment(t).fetch().then(function(e){setTimeout(function(){var e=wp.media.attachment(t).get("url");n.removeClass().addClass("thumbnail thumbnail-image").html('')},700)}),("url"===i&&""!==t||"array"===i&&!_.isUndefined(t.url)&&""!==t.url)&&e.container.find("image-default-button").hide(),("url"===i&&""===t||"array"===i&&(_.isUndefined(t.url)||""===t.url))&&r.hide(),t===e.params.default&&e.container.find("image-default-button").hide(),""!==a&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),e.container.on("click",".image-upload-button",function(t){var a=wp.media({multiple:!1}).open().on("select",function(){var t=a.state().get("selection").first(),s=t.toJSON().sizes.full.url;_.isUndefined(t.toJSON().sizes.medium)?_.isUndefined(t.toJSON().sizes.thumbnail)||(s=t.toJSON().sizes.thumbnail.url):s=t.toJSON().sizes.medium.url,"array"===i?(e.saveValue("id",t.toJSON().id),e.saveValue("url",t.toJSON().sizes.full.url),e.saveValue("width",t.toJSON().width),e.saveValue("height",t.toJSON().height)):"id"===i?e.saveValue("id",t.toJSON().id):e.saveValue("url",t.toJSON().sizes.full.url),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),r.length&&(r.show(),o.hide())});t.preventDefault()}),e.container.on("click",".image-upload-remove-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("id",""),e.saveValue("url",""),e.saveValue("width",""),e.saveValue("height",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&(n.hide(),jQuery(a).hasClass("button")&&a.show())}),e.container.on("click",".image-default-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("url",e.params.default),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("thumbnail thumbnail-image").html(''),n.length&&(n.show(),a.hide())})},getValue:function(){var e=this,t=e.setting._value;return"array"===(_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as)&&_.isString(t)&&(t={url:t}),t},saveValue:function(e,t){var i=this,n=i.setting._value;if("array"===(_.isUndefined(i.params.choices)||_.isUndefined(i.params.choices.save_as)?"url":i.params.choices.save_as))return _.isString(n)&&(n={}),n[e]=t,i.setting.set(n),void i.container.find("button").trigger("change");i.setting.set(t),i.container.find("button").trigger("change")}}),wp.customize.controlConstructor["kirki-multicheck"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;e.container.on("change","input",function(){var t=[],i=0;jQuery.each(e.params.choices,function(n){e.container.find('input[value="'+n+'"]').is(":checked")&&(t[i]=n,i++)}),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-multicolor"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";for(var e,t,i=this,n=i.params.choices,a=Object.keys(n),r=(this.params.value,i.container.find(".iris-target")),o=0;on.params.choices.min&&0",n.params.label&&(r+=''+n.params.label+""),n.params.description&&(r+=''+n.params.description+""),r+='',r+="
',r+='
-
',r+='
+
',r+="
",r+="",n.container.html(r),e=n.container.find("input"),t=n.container.find(".plus"),i=n.container.find(".minus"),t.click(function(){var t,i=parseFloat(e.val());t=i>=n.params.choices.max?i:i+n.params.choices.step,e.val(t),e.trigger("change")}),i.click(function(){var t,i=parseFloat(e.val());t=i<=n.params.choices.min?i:i-n.params.choices.step,e.val(t),e.trigger("change")}),this.container.on("change keyup paste click","input",function(){n.setting.set(jQuery(this).val())})}}),wp.customize.controlConstructor["kirki-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-preset"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;this.container.on("change","select",function(){e=jQuery(this).val(),t.setting.set(e),jQuery.each(t.params.choices,function(t,i){e===t&&jQuery.each(i.settings,function(e,t){kirkiSetSettingValue.set(e,t)})}),wp.customize.previewer.refresh()})}}),wp.customize.controlConstructor["kirki-radio-buttonset"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-radio-image"]=wp.customize.kirkiDynamicControl.extend({});var RepeaterRow=function(e,t,i,n){"use strict";var a=this;this.rowIndex=e,this.container=t,this.label=i,this.header=this.container.find(".repeater-row-header"),this.header.on("click",function(){a.toggleMinimize()}),this.container.on("click",".repeater-row-remove",function(){a.remove()}),this.header.on("mousedown",function(){a.container.trigger("row:start-dragging")}),this.container.on("keyup change","input, select, textarea",function(e){a.container.trigger("row:update",[a.rowIndex,jQuery(e.target).data("field"),e.target])}),this.setRowIndex=function(e){this.rowIndex=e,this.container.attr("data-row",e),this.container.data("row",e),this.updateLabel()},this.toggleMinimize=function(){this.container.toggleClass("minimized"),this.header.find(".dashicons").toggleClass("dashicons-arrow-up").toggleClass("dashicons-arrow-down")},this.remove=function(){this.container.slideUp(300,function(){jQuery(this).detach()}),this.container.trigger("row:remove",[this.rowIndex])},this.updateLabel=function(){var e,t,i;if("field"===this.label.type&&(e=this.container.find('.repeater-field [data-field="'+this.label.field+'"]'),_.isFunction(e.val)&&""!==(t=e.val())))return _.isUndefined(n.params.fields[this.label.field])||_.isUndefined(n.params.fields[this.label.field].type)||("select"===n.params.fields[this.label.field].type?_.isUndefined(n.params.fields[this.label.field].choices)||_.isUndefined(n.params.fields[this.label.field].choices[e.val()])||(t=n.params.fields[this.label.field].choices[e.val()]):"radio"!==n.params.fields[this.label.field].type&&"radio-image"!==n.params.fields[this.label.field].type||(i=n.selector+' [data-row="'+this.rowIndex+'"] .repeater-field [data-field="'+this.label.field+'"]:checked',t=jQuery(i).val())),void this.header.find(".repeater-row-label").text(t);this.header.find(".repeater-row-label").text(this.label.value+" "+(this.rowIndex+1))},this.updateLabel()};wp.customize.controlConstructor.repeater=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t,i=this,n=this.params.value;i.container.find(".kirki-controls-loading-spinner").hide(),this.settingField=this.container.find("[data-customize-setting-link]").first(),this.setValue([],!1),this.repeaterFieldsContainer=this.container.find(".repeater-fields").first(),this.currentIndex=0,this.rows=[],e=!1,_.isUndefined(this.params.choices.limit)||(e=!(0>=this.params.choices.limit)&&parseInt(this.params.choices.limit,10)),this.container.on("click","button.repeater-add",function(n){n.preventDefault(),!e||i.currentIndex/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(n){return(e=_.template(i.container.find(".customize-control-repeater-content").first().html(),null,t))(n)}}),n.length&&_.each(n,function(e){t=i.addRow(e),i.initColorPicker(),i.initSelect(t,e)}),this.setValue(n,!0,!0),this.repeaterFieldsContainer.sortable({handle:".repeater-row-header",update:function(){i.sort()}})},openFrame:function(e){"use strict";wp.customize.utils.isKeydownButNotEnterEvent(e)||(this.$thisButton.closest(".repeater-field").hasClass("repeater-field-cropped_image")?this.initCropperFrame():this.initFrame(),this.frame.open())},initFrame:function(){"use strict";var e=this.getMimeType();this.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query({type:e}),multiple:!1,date:!1})]}),this.frame.on("select",this.onSelect,this)},initCropperFrame:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field"),t=["width","height","flex_width","flex_height"],i=this.getMimeType();_.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"cropped_image"===this.params.fields[e].type&&t.forEach(function(t){_.isUndefined(this.params.fields[e][t])||(this.params[t]=this.params.fields[e][t])}.bind(this)),this.frame=wp.media({button:{text:"Select and Crop",close:!1},states:[new wp.media.controller.Library({library:wp.media.query({type:i}),multiple:!1,date:!1,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelectForCrop,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.$thisButton.closest(".repeater-field").hasClass("repeater-field-upload")?this.setFileInRepeaterField(e):this.setImageInRepeaterField(e)},onSelectForCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.params.width!==e.width||this.params.height!==e.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):this.setImageInRepeaterField(e)},onCropped:function(e){"use strict";this.setImageInRepeaterField(e)},calculateImageSelectOptions:function(e,t){"use strict";var i,n,a,r=t.get("control"),o=!!parseInt(r.params.flex_width,10),s=!!parseInt(r.params.flex_height,10),c=e.get("width"),l=e.get("height"),u=parseInt(r.params.width,10),d=parseInt(r.params.height,10),p=u/d,h=c,f=l;return t.set("canSkipCrop",!r.mustBeCropped(o,s,u,d,c,l)),h/f>p?u=(d=f)*p:d=(u=h)/p,i=(h-u)/2,n=(f-d)/2,a={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:c,imageHeight:l,x1:i,y1:n,x2:u+i,y2:d+n},!1===s&&!1===o&&(a.aspectRatio=u+":"+d),!1===s&&(a.maxHeight=d),!1===o&&(a.maxWidth=u),a},mustBeCropped:function(e,t,i,n,a,r){"use strict";return!(!0===e&&!0===t||!0===e&&n===r||!0===t&&i===a||i===a&&n===r||a<=i)},onSkippedCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.setImageInRepeaterField(e)},setImageInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image");t.find(".kirki-image-attachment").html('').hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},setFileInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-upload");t.find(".kirki-file-attachment").html(' '+e.filename+"").hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".upload-button").show(),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},getMimeType:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field");return _.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"upload"===this.params.fields[e].type&&!_.isUndefined(this.params.fields[e].mime_type)?this.params.fields[e].mime_type:"image"},removeImage:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload")).find(".upload-button"),t.find(".kirki-image-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},removeFile:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-upload")).find(".upload-button"),t.find(".kirki-file-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},getValue:function(){"use strict";return JSON.parse(decodeURI(this.setting.get()))},setValue:function(e,t,i){"use strict";var n=e,a=[];i&&(jQuery.each(this.params.fields,function(e,t){"image"!==t.type&&"cropped_image"!==t.type&&"upload"!==t.type||a.push(e)}),jQuery.each(e,function(e,t){jQuery.each(a,function(i,a){_.isUndefined(t[a])||_.isUndefined(t[a].id)||(n[e][a]=t[a].id)})})),this.setting.set(encodeURI(JSON.stringify(n))),t&&this.settingField.trigger("change")},addRow:function(e){"use strict";var t,i,n,a=this,r=a.repeaterTemplate(),o=this.getValue(),s={};if(r){if(t=jQuery.extend(!0,{},a.params.fields),e)for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)&&(t[n].default=e[n]);t.index=this.currentIndex,r=r(t),(i=new RepeaterRow(a.currentIndex,jQuery(r).appendTo(a.repeaterFieldsContainer),a.params.row_label,a)).container.on("row:remove",function(e,t){a.deleteRow(t)}),i.container.on("row:update",function(e,t,n,r){a.updateField.call(a,e,t,n,r),i.updateLabel()}),this.rows[this.currentIndex]=i;for(n in t)t.hasOwnProperty(n)&&(s[n]=t[n].default);return o[this.currentIndex]=s,this.setValue(o,!0),this.currentIndex++,i}},sort:function(){"use strict";var e=this,t=this.repeaterFieldsContainer.find(".repeater-row"),i=[],n=e.getValue(),a=[],r=[];t.each(function(e,t){i.push(jQuery(t).data("row"))}),jQuery.each(i,function(t,i){a[t]=e.rows[i],a[t].setRowIndex(t),r[t]=n[i]}),e.rows=a,e.setValue(r)},deleteRow:function(e){"use strict";var t,i=this.getValue();i[e]&&this.rows[e]&&(delete i[e],delete this.rows[e],this.setValue(i,!0));for(t in this.rows)this.rows.hasOwnProperty(t)&&this.rows[t]&&(this.rows[t].updateLabel(),0)},updateField:function(e,t,i,n){"use strict";var a,r,o;this.rows[t]&&this.params.fields[i]&&(a=this.params.fields[i].type,r=this.rows[t],o=this.getValue(),n=jQuery(n),_.isUndefined(o[r.rowIndex][i])||(o[r.rowIndex][i]="checkbox"===a?n.is(":checked"):n.val(),this.setValue(o,!0)))},initColorPicker:function(){"use strict";var e=this,t=e.container.find(".color-picker-hex"),i={},n=t.data("field");_.isUndefined(n)||_.isUndefined(e.params.fields[n])||_.isUndefined(e.params.fields[n].palettes)||!_.isObject(e.params.fields[n].palettes)||(i.palettes=e.params.fields[n].palettes),i.change=function(t,i){var n=jQuery(t.target),a=n.closest(".repeater-row").data("row"),r=e.getValue();r[a][n.data("field")]=i.color.toString(),e.setValue(r,!0)},0!==t.length&&t.wpColorPicker(i)},initSelect:function(e,t){"use strict";var i,n,a=this,r=e.container.find(".repeater-field select"),o={};0!==r.length&&(i=r.data("field"),"undefed"!==(n=jQuery(r).data("multiple"))&&jQuery.isNumeric(n)&&1<(n=parseInt(n,10))&&(o.maximumSelectionLength=n),jQuery(r).selectWoo(o).val(t[i]),this.container.on("change",".repeater-field select",function(e){var t=jQuery(e.target),i=t.closest(".repeater-row").data("row"),n=a.getValue();n[i][t.data("field")]=jQuery(this).val(),a.setValue(n)}))}}),wp.customize.controlConstructor["kirki-slider"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t="postMessage"===e.setting.transport?"mousemove change":"change",i=e.container.find('input[type="range"]'),n=e.container.find('input[type="text"]'),a=e.setting._value;n.attr("value",a),i.on("mousemove change",function(){n.attr("value",i.val())}),i.on(t,function(){e.setting.set(i.val())}),n.on("input paste change",function(){i.attr("value",n.val()),e.setting.set(n.val())}),e.container.find(".slider-reset").on("click",function(){n.attr("value",e.params.default),i.attr("value",e.params.default),e.setting.set(n.val())})}}),wp.customize.controlConstructor["kirki-sortable"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e=this;e.container.find(".kirki-controls-loading-spinner").hide(),e.sortableContainer=e.container.find("ul.sortable").first(),e.sortableContainer.sortable({stop:function(){e.updateValue()}}).disableSelection().find("li").each(function(){jQuery(this).find("i.visibility").click(function(){jQuery(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){e.updateValue()})},updateValue:function(){"use strict";var e=this,t=[];this.sortableContainer.find("li").each(function(){jQuery(this).is(".invisible")||t.push(jQuery(this).data("value"))}),e.setting.set(t)}}),wp.customize.controlConstructor["kirki-switch"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e=this,t=e.setting._value,i=jQuery(e.container.find(".switch-on")),n=jQuery(e.container.find(".switch-off"));jQuery(e.container.find(".switch label ")).css("width",i.width()+n.width()+40+"px"),jQuery("#customize-control-"+e.id.replace("[","-").replace("]","")).append(""),this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-toggle"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-typography"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t=this,i=t.getValue();t.renderFontSelector(),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector(),t.params.default["font-size"]&&this.container.on("change keyup paste",".font-size input",function(){t.saveValue("font-size",jQuery(this).val())}),t.params.default["line-height"]&&this.container.on("change keyup paste",".line-height input",function(){t.saveValue("line-height",jQuery(this).val())}),t.params.default["margin-top"]&&this.container.on("change keyup paste",".margin-top input",function(){t.saveValue("margin-top",jQuery(this).val())}),t.params.default["margin-bottom"]&&this.container.on("change keyup paste",".margin-bottom input",function(){t.saveValue("margin-bottom",jQuery(this).val())}),t.params.default["letter-spacing"]&&(i["letter-spacing"]=jQuery.isNumeric(i["letter-spacing"])?i["letter-spacing"]+"px":i["letter-spacing"],this.container.on("change keyup paste",".letter-spacing input",function(){i["letter-spacing"]=jQuery.isNumeric(jQuery(this).val())?jQuery(this).val()+"px":jQuery(this).val(),t.saveValue("letter-spacing",i["letter-spacing"])})),t.params.default["word-spacing"]&&this.container.on("change keyup paste",".word-spacing input",function(){t.saveValue("word-spacing",jQuery(this).val())}),t.params.default["text-align"]&&this.container.on("change",".text-align input",function(){t.saveValue("text-align",jQuery(this).val())}),t.params.default["text-transform"]&&jQuery(t.selector+" .text-transform select").selectWoo().on("change",function(){t.saveValue("text-transform",jQuery(this).val())}),t.params.default.color&&(e=this.container.find(".kirki-color-control")).wpColorPicker({change:function(){setTimeout(function(){t.saveValue("color",e.val())},100)}})},renderFontSelector:function(){var e,t=this,i=t.selector+" .font-family select",n=[],a=[],r=[],o=t.getValue(),s=t.getFonts();_.isUndefined(s.standard)||_.each(s.standard,function(e){a.push({id:e.family.replace(/"/g,"'"),text:e.label})}),_.isUndefined(s.standard)||_.each(s.google,function(e){r.push({id:e.family,text:e.label})}),n=[{text:"Standard Fonts",children:a},{text:"Google Fonts",children:r}],e=jQuery(i).selectWoo({data:n}),o["font-family"]&&e.val(o["font-family"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-family",jQuery(this).val()),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector()})},renderBackupFontSelector:function(){var e,t=this,i=t.selector+" .font-backup select",n=[],a=t.getValue(),r=a["font-family"],o=t.getVariants(r),s=t.getFonts();(_.isUndefined(a["font-backup"])||null===a["font-backup"])&&(a["font-backup"]=""),!1!==o?jQuery(t.selector+" .font-backup").show():jQuery(t.selector+" .font-backup").hide(),_.isUndefined(s.standard)||_.each(s.standard,function(e){n.push({id:e.family.replace(/"/g,"'"),text:e.label})}),e=jQuery(i).selectWoo({data:n}),void 0!==a["font-backup"]&&e.val(a["font-backup"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-backup",jQuery(this).val())})},renderVariantSelector:function(){var e,t,i,n=this,a=n.getValue(),r=a["font-family"],o=n.getVariants(r),s=n.selector+" .variant select",c=[],l=!1;!1!==o?(jQuery(n.selector+" .variant").show(),_.each(o,function(e){a.variant===e.id&&(l=!0),c.push({id:e.id,text:e.label})}),l||(a.variant="regular"),jQuery(s).hasClass("select2-hidden-accessible")&&(jQuery(s).selectWoo("destroy"),jQuery(s).empty()),(t=jQuery(s).selectWoo({data:c})).val(a.variant).trigger("change"),t.on("change",function(){n.saveValue("variant",jQuery(this).val()),e=_.isString(a.variant)?a.variant.match(/\d/g):"400",e=_.isObject(e)?e.join(""):"400",i=-1!==a.variant.indexOf("italic")?"italic":"normal",n.saveValue("font-weight",e),n.saveValue("font-style",i)})):jQuery(n.selector+" .variant").hide()},renderSubsetSelector:function(){var e,t=this,i=t.getValue(),n=i["font-family"],a=t.getSubsets(n),r=t.selector+" .subsets select",o=[],s=i.subsets;!1!==a?(jQuery(t.selector+" .subsets").show(),_.each(a,function(e){_.isObject(s)&&-1===s.indexOf(e.id)&&(s=_.reject(s,function(t){return t===e.id})),o.push({id:e.id,text:e.label})})):jQuery(t.selector+" .subsets").hide(),jQuery(r).hasClass("select2-hidden-accessible")&&(jQuery(r).selectWoo("destroy"),jQuery(r).empty()),(e=jQuery(r).selectWoo({data:o})).val(s).trigger("change"),e.on("change",function(){t.saveValue("subsets",jQuery(this).val())})},getFonts:function(){var e=this;return _.isUndefined(window["kirkiFonts"+e.id])?"undefined"!=typeof kirkiAllFonts?kirkiAllFonts:{google:[],standard:[]}:window["kirkiFonts"+e.id]},getVariants:function(e){var t=this.getFonts(),i=!1;return _.each(t.standard,function(t){if(e&&t.family===e.replace(/'/g,'"'))return i=t.variants,t.variants}),_.each(t.google,function(t){if(t.family===e)return i=t.variants,t.variants}),i},getSubsets:function(e){var t=!1,i=this.getFonts();return _.each(i.google,function(i){i.family===e&&(t=i.subsets)}),t},getValue:function(){"use strict";var e=this.container.find(".typography-hidden-value"),t=jQuery(e).val();return JSON.parse(t)},saveValue:function(e,t){"use strict";var i=this,n=i.container.find(".typography-hidden-value"),a=jQuery(n).val(),r=JSON.parse(a);r[e]=t,wp.customize.control(i.id).setting.set(r),jQuery(n).attr("value",JSON.stringify(r)).trigger("change")}});
\ No newline at end of file
+if(_.isUndefined(window.kirkiSetSettingValue))var kirkiSetSettingValue={set:function(e,t){var i,n=this,a=wp.customize.settings.controls[e];if(_.isUndefined(a))return!0;switch(n.setValue(e,t),a.type){case"kirki-background":_.isUndefined(t["background-color"])||n.setColorPicker(n.findElement(e,".kirki-color-control"),t["background-color"]),n.findElement(e,".placeholder, .thumbnail").removeClass().addClass("placeholder").html("No file selected"),_.each(["background-repeat","background-position"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["background-size","background-attachment"],function(i){jQuery(n.findElement(e,"."+i+' input[value="'+t+'"]')).prop("checked",!0)}),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".background-hidden-value").attr("value",i)).trigger("change");break;case"kirki-code":jQuery(n.findElement(e,".CodeMirror"))[0].CodeMirror.setValue(t);break;case"checkbox":case"kirki-switch":case"kirki-toggle":t=1===t||"1"===t||!0===t,jQuery(n.findElement(e,"input")).prop("checked",t),wp.customize.instance(e).set(t);break;case"kirki-select":case"kirki-preset":case"kirki-fontawesome":n.setSelectWoo(n.findElement(e,"select"),t);break;case"kirki-slider":jQuery(n.findElement(e,"input")).prop("value",t),jQuery(n.findElement(e,".kirki_range_value .value")).html(t);break;case"kirki-generic":(_.isUndefined(a.choices)||_.isUndefined(a.choices.element))&&(a.choices.element="input"),jQuery(n.findElement(e,a.choices.element)).prop("value",t);break;case"kirki-color":n.setColorPicker(n.findElement(e,".kirki-color-control"),t);break;case"kirki-multicheck":n.findElement(e,"input").each(function(){jQuery(this).prop("checked",!1)}),_.each(t,function(i,a){jQuery(n.findElement(e,'input[value="'+t[a]+'"]')).prop("checked",!0)});break;case"kirki-multicolor":_.each(t,function(t,i){n.setColorPicker(n.findElement(e,".multicolor-index-"+i),t)});break;case"kirki-radio-buttonset":case"kirki-radio-image":case"kirki-radio":case"kirki-dashicons":case"kirki-color-palette":case"kirki-palette":jQuery(n.findElement(e,'input[value="'+t+'"]')).prop("checked",!0);break;case"kirki-typography":_.each(["font-family","variant","subsets"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["font-size","line-height","letter-spacing","word-spacing"],function(i){_.isUndefined(t[i])||jQuery(n.findElement(e,"."+i+" input")).prop("value",t[i])}),_.isUndefined(t.color)||n.setColorPicker(n.findElement(e,".kirki-color-control"),t.color),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".typography-hidden-value").attr("value",i)).trigger("change");break;case"kirki-dimensions":_.each(t,function(t,i){jQuery(n.findElement(e,"."+i+" input")).prop("value",t)});break;case"kirki-repeater":case"kirki-custom":break;default:jQuery(n.findElement(e,"input")).prop("value",t)}},setColorPicker:function(e,t){e.attr("data-default-color",t).data("default-color",t).wpColorPicker("color",t)},setSelectWoo:function(e,t){jQuery(e).selectWoo().val(t).trigger("change")},setTextarea:function(e,t){jQuery(e).prop("value",t)},findElement:function(e,t){return wp.customize.control(e).container.find(t)},setValue:function(e,t,i){i=_.isUndefined(i)?100:parseInt(i,10),wp.customize.instance(e).set({}),setTimeout(function(){wp.customize.instance(e).set(t)},i)}};var kirki={initialized:!1,initialize:function(){var e=this;e.initialized||(e.util.webfonts.google.initialize(),e.initialized=!0)},control:{"kirki-radio":{init:function(e){this.template(e),kirki.input.radio.init(e)},template:function(e){e.container.html(kirki.input.radio.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,default:e.params.default,value:kirki.setting.get(e.id),choices:e.params.choices}))}},"kirki-color":{init:function(e){this.template(e),kirki.input.color.init(e)},template:function(e){e.container.html(kirki.input.color.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,mode:e.params.mode,inputAttrs:e.params.inputAttrs,"data-palette":e.params.palette,"data-default-color":e.params.default,"data-alpha":e.params.choices.alpha,value:kirki.setting.get(e.id)}))}},"kirki-generic":{init:function(e){this.template(e),_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?kirki.input.genericInput.init(e):kirki.input.textarea.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?e.container.html(kirki.input.genericInput.getTemplate(t)):e.container.html(kirki.input.textarea.getTemplate(t))}},"kirki-select":{init:function(e){this.template(e),kirki.input.select.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};e.container.html(kirki.input.select.getTemplate(t))}}},input:{radio:{getTemplate:function(e){var t="";if((e=_.defaults(e,{choices:{},label:"",description:"",inputAttrs:"",value:"","data-id":"",default:""})).choices)return e.label&&(t+=''+e.label+""),e.description&&(t+=''+e.description+""),_.each(e.choices,function(i,n){t+=""}),''+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},color:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",mode:"full",inputAttrs:"","data-palette":!e["data-palette"]||e["data-palette"],"data-default-color":e["data-default-color"]?e["data-default-color"]:"","data-alpha":!!e["data-alpha"]&&e["data-alpha"],value:"","data-id":""}),t+="",t+='',''+t+"
"},init:function(e){var t,i=jQuery('.kirki-color-control[data-id="'+e.id+'"]');e.choices=e.choices||{},_.isEmpty(e.choices)&&e.params.choices&&(e.choices=e.params.choices),_.isEmpty(e.choices)||i.wpColorPicker(e.choices),setTimeout(function(){(t=jQuery('.kirki-input-container[data-id="'+e.id+'"] .wp-picker-clear')).length&&t.click(function(){e.setting.set("")})},200),i.wpColorPicker({change:function(){setTimeout(function(){kirki.setting.set(e.id,i.val())},20)}})}},genericInput:{getTemplate:function(e){var t="",i=e.choices.element?e.choices.element:"input";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},textarea:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('textarea[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},select:{getTemplate:function(e){var t,i="";if((e=_.defaults(e,{label:"",description:"",inputAttrs:"","data-id":"",choices:{},multiple:1,value:1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+='",''+i+"
"},init:function(e){var t,i=jQuery('select[data-id="'+e.id+'"'),n=parseInt(i.data("multiple"),10),a={escapeMarkup:function(e){return e}};1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+="",i+='",''+i+"
"},init:function(e){}}},setting:{get:function(e){var t=e.split("["),i="",n=0,a="";return _.each(t,function(e,t){e=e.replace("]",""),0===t?i=e:i+="["+e+"]",_.isUndefined(wp.customize.instance(i))||(a=wp.customize.instance(i).get(),n=t),n"),n.params.content.attr("id","customize-control-"+e.replace(/]/g,"").replace(/\[/g,"-")),n.params.content.attr("class","customize-control customize-control-"+n.params.type)),i.propertyElements=[],wp.customize.Control.prototype.initialize.call(i,e,n)},_setUpSettingRootLinks:function(){var e=this;e.container.find("[data-customize-setting-link]").each(function(){var t=jQuery(this);wp.customize(t.data("customizeSettingLink"),function(i){var n=new wp.customize.Element(t);e.elements.push(n),n.sync(i),n.set(i())})})},_setUpSettingPropertyLinks:function(){var e=this;e.setting&&e.container.find("[data-customize-setting-property-link]").each(function(){var t,i=jQuery(this),n=i.data("customizeSettingPropertyLink");t=new wp.customize.Element(i),e.propertyElements.push(t),t.set(e.setting()[n]),t.bind(function(t){var i=e.setting();t!==i[n]&&((i=_.clone(i))[n]=t,e.setting.set(i))}),e.setting.bind(function(e){e[n]!==t.get()&&t.set(e[n])})})},ready:function(){var e=this;e._setUpSettingRootLinks(),e._setUpSettingPropertyLinks(),wp.customize.Control.prototype.ready.call(e),e.deferred.embedded.done(function(){e.initKirkiControl(e)})},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,function(t){"kirki-expanded"===t.params.type||t.expanded()||wp.customize.settings.autofocus.control===e.id?e.actuallyEmbed():t.expanded.bind(function(t){t&&e.actuallyEmbed()})})},actuallyEmbed:function(){var e=this;"resolved"!==e.deferred.embedded.state()&&(e.renderContent(),e.deferred.embedded.resolve())},focus:function(e){var t=this;t.actuallyEmbed(),wp.customize.Control.prototype.focus.call(t,e)},initKirkiControl:function(e){void 0===kirki.control[e.params.type]?this.container.on("change keyup paste click","input",function(){e.setting.set(jQuery(this).val())}):kirki.control[e.params.type].init(e)},kirkiValidateCSSValue:function(e){var t,i,n=["rem","em","ex","%","px","cm","mm","in","pt","pc","ch","vh","vw","vmin","vmax"];return"0"===e||0<=e.indexOf("calc(")&&0<=e.indexOf(")")||(t=parseFloat(e),i=e.replace(t,""),!isNaN(t)&&-1!==jQuery.inArray(i,n))}})}(),_.each(kirki.control,function(e,t){wp.customize.controlConstructor[t]=wp.customize.kirkiDynamicControl.extend({})}),wp.customize.controlConstructor["kirki-background"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=e.container.find(".kirki-color-control");(_.isUndefined(t["background-image"])||""===t["background-image"])&&(e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide()),i.wpColorPicker({change:function(){setTimeout(function(){e.saveValue("background-color",i.val())},100)}}),e.container.on("change",".background-repeat select",function(){e.saveValue("background-repeat",jQuery(this).val())}),e.container.on("change click",".background-size input",function(){e.saveValue("background-size",jQuery(this).val())}),e.container.on("change",".background-position select",function(){e.saveValue("background-position",jQuery(this).val())}),e.container.on("change click",".background-attachment input",function(){e.saveValue("background-attachment",jQuery(this).val())}),e.container.on("click",".background-image-upload-button",function(t){var i=wp.media({multiple:!1}).open().on("select",function(){var t,n,a,r=i.state().get("selection").first(),o=r.toJSON().sizes.full.url;_.isUndefined(r.toJSON().sizes.medium)?_.isUndefined(r.toJSON().sizes.thumbnail)||(o=r.toJSON().sizes.thumbnail.url):o=r.toJSON().sizes.medium.url,t=r.toJSON().sizes.full.url,r.toJSON().id,r.toJSON().width,r.toJSON().height,""!==t&&e.container.find(".background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment").show(),e.saveValue("background-image",t),n=e.container.find(".placeholder, .thumbnail"),a=e.container.find(".background-image-upload-remove-button"),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),a.length&&a.show()});t.preventDefault()}),e.container.on("click",".background-image-upload-remove-button",function(t){var i,n;t.preventDefault(),e.saveValue("background-image",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".background-image-upload-remove-button"),e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide(),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&n.hide()})},getValue:function(){var e=this,t={};return _.each(e.params.default,function(i,n){!1!==i&&(t[n]=i,_.isUndefined(e.setting._value[n])||(t[n]=e.setting._value[n]))}),_.each(e.setting._value,function(e,i){_.isUndefined(t[i])&&(t[i]=e)}),t},saveValue:function(e,t){"use strict";var i=this,n=jQuery("#customize-control-"+i.id.replace("[","-").replace("]","")+" .background-hidden-value"),a=jQuery(n).val(),r=JSON.parse(a);r[e]=t,i.setting.set(r),jQuery(n).attr("value",JSON.stringify(r)).trigger("change")}}),wp.customize.controlConstructor["kirki-code"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.CodeEditorControl)||(jQuery(e.container.find("textarea.kirki-codemirror-editor")).hide(),wp.customize.control.add(new wp.customize.CodeEditorControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,editor_settings:{codemirror:{mode:e.params.choices.language}},settings:{default:e.id}})))}}),wp.customize.controlConstructor["kirki-color-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-dashicons"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-date"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.DateTimeControl)||wp.customize.control.add(new wp.customize.DateTimeControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,description:e.params.description,settings:{default:e.id},default:e.params.default}))}}),wp.customize.controlConstructor["kirki-dimension"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;t.kirkiNotifications(),this.container.on("change keyup paste","input",function(){e=jQuery(this).val(),t.setting.set(e)})},kirkiNotifications:function(){var e=this;wp.customize(e.id,function(t){t.bind(function(i){var n="long_title";!1===e.kirkiValidateCSSValue(i)?t.notifications.add(n,new wp.customize.Notification(n,{type:"warning",message:dimensionkirkiL10n["invalid-value"]})):t.notifications.remove(n)})})}}),wp.customize.controlConstructor["kirki-dimensions"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this,i=t.params.choices.controls,n={},a=[];for(_.each(i,function(e,t){!0===e&&a.push(t)}),e=0;e '+e.text},templateSelection:function(e){return' '+e.text}};_.each(a.icons,function(e){r.data.push({id:e.id,text:e.name})}),(t=jQuery(n).selectWoo(r)).on("change",function(){e=jQuery(this).val(),i.setting.set(e)}),t.val(i.setting._value).trigger("change")}}),wp.customize.controlConstructor["kirki-image"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as,n=e.container.find(".placeholder, .thumbnail"),a="array"===i?t.url:t,r=e.container.find(".image-upload-remove-button"),o=e.container.find(".image-default-button");e.container.find(".kirki-controls-loading-spinner").hide(),"id"!==i&&"ID"!==i||""===t||wp.media.attachment(t).fetch().then(function(e){setTimeout(function(){var e=wp.media.attachment(t).get("url");n.removeClass().addClass("thumbnail thumbnail-image").html('')},700)}),("url"===i&&""!==t||"array"===i&&!_.isUndefined(t.url)&&""!==t.url)&&e.container.find("image-default-button").hide(),("url"===i&&""===t||"array"===i&&(_.isUndefined(t.url)||""===t.url))&&r.hide(),t===e.params.default&&e.container.find("image-default-button").hide(),""!==a&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),e.container.on("click",".image-upload-button",function(t){var a=wp.media({multiple:!1}).open().on("select",function(){var t=a.state().get("selection").first(),s=t.toJSON().sizes.full.url;_.isUndefined(t.toJSON().sizes.medium)?_.isUndefined(t.toJSON().sizes.thumbnail)||(s=t.toJSON().sizes.thumbnail.url):s=t.toJSON().sizes.medium.url,"array"===i?(e.saveValue("id",t.toJSON().id),e.saveValue("url",t.toJSON().sizes.full.url),e.saveValue("width",t.toJSON().width),e.saveValue("height",t.toJSON().height)):"id"===i?e.saveValue("id",t.toJSON().id):e.saveValue("url",t.toJSON().sizes.full.url),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),r.length&&(r.show(),o.hide())});t.preventDefault()}),e.container.on("click",".image-upload-remove-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("id",""),e.saveValue("url",""),e.saveValue("width",""),e.saveValue("height",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&(n.hide(),jQuery(a).hasClass("button")&&a.show())}),e.container.on("click",".image-default-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("url",e.params.default),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("thumbnail thumbnail-image").html(''),n.length&&(n.show(),a.hide())})},getValue:function(){var e=this,t=e.setting._value;return"array"===(_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as)&&_.isString(t)&&(t={url:t}),t},saveValue:function(e,t){var i=this,n=i.setting._value;if("array"===(_.isUndefined(i.params.choices)||_.isUndefined(i.params.choices.save_as)?"url":i.params.choices.save_as))return _.isString(n)&&(n={}),n[e]=t,i.setting.set(n),void i.container.find("button").trigger("change");i.setting.set(t),i.container.find("button").trigger("change")}}),wp.customize.controlConstructor["kirki-multicheck"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;e.container.on("change","input",function(){var t=[],i=0;jQuery.each(e.params.choices,function(n){e.container.find('input[value="'+n+'"]').is(":checked")&&(t[i]=n,i++)}),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-multicolor"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";for(var e,t,i=this,n=i.params.choices,a=Object.keys(n),r=(this.params.value,i.container.find(".iris-target")),o=0;on.params.choices.min&&0",n.params.label&&(r+=''+n.params.label+""),n.params.description&&(r+=''+n.params.description+""),r+='',r+="
',r+='
-
',r+='
+
',r+="
",r+="",n.container.html(r),e=n.container.find("input"),t=n.container.find(".plus"),i=n.container.find(".minus"),t.click(function(){var t,i=parseFloat(e.val());t=i>=n.params.choices.max?i:i+n.params.choices.step,e.val(t),e.trigger("change")}),i.click(function(){var t,i=parseFloat(e.val());t=i<=n.params.choices.min?i:i-n.params.choices.step,e.val(t),e.trigger("change")}),this.container.on("change keyup paste click","input",function(){n.setting.set(jQuery(this).val())})}}),wp.customize.controlConstructor["kirki-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-preset"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;this.container.on("change","select",function(){e=jQuery(this).val(),t.setting.set(e),jQuery.each(t.params.choices,function(t,i){e===t&&jQuery.each(i.settings,function(e,t){kirkiSetSettingValue.set(e,t)})}),wp.customize.previewer.refresh()})}}),wp.customize.controlConstructor["kirki-radio-buttonset"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-radio-image"]=wp.customize.kirkiDynamicControl.extend({});var RepeaterRow=function(e,t,i,n){"use strict";var a=this;this.rowIndex=e,this.container=t,this.label=i,this.header=this.container.find(".repeater-row-header"),this.header.on("click",function(){a.toggleMinimize()}),this.container.on("click",".repeater-row-remove",function(){a.remove()}),this.header.on("mousedown",function(){a.container.trigger("row:start-dragging")}),this.container.on("keyup change","input, select, textarea",function(e){a.container.trigger("row:update",[a.rowIndex,jQuery(e.target).data("field"),e.target])}),this.setRowIndex=function(e){this.rowIndex=e,this.container.attr("data-row",e),this.container.data("row",e),this.updateLabel()},this.toggleMinimize=function(){this.container.toggleClass("minimized"),this.header.find(".dashicons").toggleClass("dashicons-arrow-up").toggleClass("dashicons-arrow-down")},this.remove=function(){this.container.slideUp(300,function(){jQuery(this).detach()}),this.container.trigger("row:remove",[this.rowIndex])},this.updateLabel=function(){var e,t,i;if("field"===this.label.type&&(e=this.container.find('.repeater-field [data-field="'+this.label.field+'"]'),_.isFunction(e.val)&&""!==(t=e.val())))return _.isUndefined(n.params.fields[this.label.field])||_.isUndefined(n.params.fields[this.label.field].type)||("select"===n.params.fields[this.label.field].type?_.isUndefined(n.params.fields[this.label.field].choices)||_.isUndefined(n.params.fields[this.label.field].choices[e.val()])||(t=n.params.fields[this.label.field].choices[e.val()]):"radio"!==n.params.fields[this.label.field].type&&"radio-image"!==n.params.fields[this.label.field].type||(i=n.selector+' [data-row="'+this.rowIndex+'"] .repeater-field [data-field="'+this.label.field+'"]:checked',t=jQuery(i).val())),void this.header.find(".repeater-row-label").text(t);this.header.find(".repeater-row-label").text(this.label.value+" "+(this.rowIndex+1))},this.updateLabel()};wp.customize.controlConstructor.repeater=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t,i=this,n=this.params.value;i.container.find(".kirki-controls-loading-spinner").hide(),this.settingField=this.container.find("[data-customize-setting-link]").first(),this.setValue([],!1),this.repeaterFieldsContainer=this.container.find(".repeater-fields").first(),this.currentIndex=0,this.rows=[],e=!1,_.isUndefined(this.params.choices.limit)||(e=!(0>=this.params.choices.limit)&&parseInt(this.params.choices.limit,10)),this.container.on("click","button.repeater-add",function(n){n.preventDefault(),!e||i.currentIndex/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(n){return(e=_.template(i.container.find(".customize-control-repeater-content").first().html(),null,t))(n)}}),n.length&&_.each(n,function(e){t=i.addRow(e),i.initColorPicker(),i.initSelect(t,e)}),this.setValue(n,!0,!0),this.repeaterFieldsContainer.sortable({handle:".repeater-row-header",update:function(){i.sort()}})},openFrame:function(e){"use strict";wp.customize.utils.isKeydownButNotEnterEvent(e)||(this.$thisButton.closest(".repeater-field").hasClass("repeater-field-cropped_image")?this.initCropperFrame():this.initFrame(),this.frame.open())},initFrame:function(){"use strict";var e=this.getMimeType();this.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query({type:e}),multiple:!1,date:!1})]}),this.frame.on("select",this.onSelect,this)},initCropperFrame:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field"),t=["width","height","flex_width","flex_height"],i=this.getMimeType();_.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"cropped_image"===this.params.fields[e].type&&t.forEach(function(t){_.isUndefined(this.params.fields[e][t])||(this.params[t]=this.params.fields[e][t])}.bind(this)),this.frame=wp.media({button:{text:"Select and Crop",close:!1},states:[new wp.media.controller.Library({library:wp.media.query({type:i}),multiple:!1,date:!1,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelectForCrop,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.$thisButton.closest(".repeater-field").hasClass("repeater-field-upload")?this.setFileInRepeaterField(e):this.setImageInRepeaterField(e)},onSelectForCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.params.width!==e.width||this.params.height!==e.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):this.setImageInRepeaterField(e)},onCropped:function(e){"use strict";this.setImageInRepeaterField(e)},calculateImageSelectOptions:function(e,t){"use strict";var i,n,a,r=t.get("control"),o=!!parseInt(r.params.flex_width,10),s=!!parseInt(r.params.flex_height,10),c=e.get("width"),l=e.get("height"),u=parseInt(r.params.width,10),d=parseInt(r.params.height,10),p=u/d,h=c,f=l;return t.set("canSkipCrop",!r.mustBeCropped(o,s,u,d,c,l)),h/f>p?u=(d=f)*p:d=(u=h)/p,i=(h-u)/2,n=(f-d)/2,a={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:c,imageHeight:l,x1:i,y1:n,x2:u+i,y2:d+n},!1===s&&!1===o&&(a.aspectRatio=u+":"+d),!1===s&&(a.maxHeight=d),!1===o&&(a.maxWidth=u),a},mustBeCropped:function(e,t,i,n,a,r){"use strict";return!(!0===e&&!0===t||!0===e&&n===r||!0===t&&i===a||i===a&&n===r||a<=i)},onSkippedCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.setImageInRepeaterField(e)},setImageInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image");t.find(".kirki-image-attachment").html('').hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},setFileInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-upload");t.find(".kirki-file-attachment").html(' '+e.filename+"").hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".upload-button").show(),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},getMimeType:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field");return _.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"upload"===this.params.fields[e].type&&!_.isUndefined(this.params.fields[e].mime_type)?this.params.fields[e].mime_type:"image"},removeImage:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload")).find(".upload-button"),t.find(".kirki-image-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},removeFile:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-upload")).find(".upload-button"),t.find(".kirki-file-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},getValue:function(){"use strict";return JSON.parse(decodeURI(this.setting.get()))},setValue:function(e,t,i){"use strict";var n=e,a=[];i&&(jQuery.each(this.params.fields,function(e,t){"image"!==t.type&&"cropped_image"!==t.type&&"upload"!==t.type||a.push(e)}),jQuery.each(e,function(e,t){jQuery.each(a,function(i,a){_.isUndefined(t[a])||_.isUndefined(t[a].id)||(n[e][a]=t[a].id)})})),this.setting.set(encodeURI(JSON.stringify(n))),t&&this.settingField.trigger("change")},addRow:function(e){"use strict";var t,i,n,a=this,r=a.repeaterTemplate(),o=this.getValue(),s={};if(r){if(t=jQuery.extend(!0,{},a.params.fields),e)for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)&&(t[n].default=e[n]);t.index=this.currentIndex,r=r(t),(i=new RepeaterRow(a.currentIndex,jQuery(r).appendTo(a.repeaterFieldsContainer),a.params.row_label,a)).container.on("row:remove",function(e,t){a.deleteRow(t)}),i.container.on("row:update",function(e,t,n,r){a.updateField.call(a,e,t,n,r),i.updateLabel()}),this.rows[this.currentIndex]=i;for(n in t)t.hasOwnProperty(n)&&(s[n]=t[n].default);return o[this.currentIndex]=s,this.setValue(o,!0),this.currentIndex++,i}},sort:function(){"use strict";var e=this,t=this.repeaterFieldsContainer.find(".repeater-row"),i=[],n=e.getValue(),a=[],r=[];t.each(function(e,t){i.push(jQuery(t).data("row"))}),jQuery.each(i,function(t,i){a[t]=e.rows[i],a[t].setRowIndex(t),r[t]=n[i]}),e.rows=a,e.setValue(r)},deleteRow:function(e){"use strict";var t,i=this.getValue();i[e]&&this.rows[e]&&(delete i[e],delete this.rows[e],this.setValue(i,!0));for(t in this.rows)this.rows.hasOwnProperty(t)&&this.rows[t]&&(this.rows[t].updateLabel(),0)},updateField:function(e,t,i,n){"use strict";var a,r,o;this.rows[t]&&this.params.fields[i]&&(a=this.params.fields[i].type,r=this.rows[t],o=this.getValue(),n=jQuery(n),_.isUndefined(o[r.rowIndex][i])||(o[r.rowIndex][i]="checkbox"===a?n.is(":checked"):n.val(),this.setValue(o,!0)))},initColorPicker:function(){"use strict";var e=this,t=e.container.find(".color-picker-hex"),i={},n=t.data("field");_.isUndefined(n)||_.isUndefined(e.params.fields[n])||_.isUndefined(e.params.fields[n].palettes)||!_.isObject(e.params.fields[n].palettes)||(i.palettes=e.params.fields[n].palettes),i.change=function(t,i){var n=jQuery(t.target),a=n.closest(".repeater-row").data("row"),r=e.getValue();r[a][n.data("field")]=i.color.toString(),e.setValue(r,!0)},0!==t.length&&t.wpColorPicker(i)},initSelect:function(e,t){"use strict";var i,n,a=this,r=e.container.find(".repeater-field select"),o={};0!==r.length&&(i=r.data("field"),"undefed"!==(n=jQuery(r).data("multiple"))&&jQuery.isNumeric(n)&&1<(n=parseInt(n,10))&&(o.maximumSelectionLength=n),jQuery(r).selectWoo(o).val(t[i]),this.container.on("change",".repeater-field select",function(e){var t=jQuery(e.target),i=t.closest(".repeater-row").data("row"),n=a.getValue();n[i][t.data("field")]=jQuery(this).val(),a.setValue(n)}))}}),wp.customize.controlConstructor["kirki-slider"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t="postMessage"===e.setting.transport?"mousemove change":"change",i=e.container.find('input[type="range"]'),n=e.container.find('input[type="text"]'),a=e.setting._value;n.attr("value",a),i.on("mousemove change",function(){n.attr("value",i.val())}),i.on(t,function(){e.setting.set(i.val())}),n.on("input paste change",function(){i.attr("value",n.val()),e.setting.set(n.val())}),e.container.find(".slider-reset").on("click",function(){n.attr("value",e.params.default),i.attr("value",e.params.default),e.setting.set(n.val())})}}),wp.customize.controlConstructor["kirki-sortable"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e=this;e.container.find(".kirki-controls-loading-spinner").hide(),e.sortableContainer=e.container.find("ul.sortable").first(),e.sortableContainer.sortable({stop:function(){e.updateValue()}}).disableSelection().find("li").each(function(){jQuery(this).find("i.visibility").click(function(){jQuery(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){e.updateValue()})},updateValue:function(){"use strict";var e=this,t=[];this.sortableContainer.find("li").each(function(){jQuery(this).is(".invisible")||t.push(jQuery(this).data("value"))}),e.setting.set(t)}}),wp.customize.controlConstructor["kirki-switch"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e=this,t=e.setting._value,i=jQuery(e.container.find(".switch-on")),n=jQuery(e.container.find(".switch-off"));jQuery(e.container.find(".switch label ")).css("width",i.width()+n.width()+40+"px"),jQuery("#customize-control-"+e.id.replace("[","-").replace("]","")).append(""),this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-toggle"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-typography"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t=this,i=t.getValue();t.renderFontSelector(),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector(),t.params.default["font-size"]&&this.container.on("change keyup paste",".font-size input",function(){t.saveValue("font-size",jQuery(this).val())}),t.params.default["line-height"]&&this.container.on("change keyup paste",".line-height input",function(){t.saveValue("line-height",jQuery(this).val())}),t.params.default["margin-top"]&&this.container.on("change keyup paste",".margin-top input",function(){t.saveValue("margin-top",jQuery(this).val())}),t.params.default["margin-bottom"]&&this.container.on("change keyup paste",".margin-bottom input",function(){t.saveValue("margin-bottom",jQuery(this).val())}),t.params.default["letter-spacing"]&&(i["letter-spacing"]=jQuery.isNumeric(i["letter-spacing"])?i["letter-spacing"]+"px":i["letter-spacing"],this.container.on("change keyup paste",".letter-spacing input",function(){i["letter-spacing"]=jQuery.isNumeric(jQuery(this).val())?jQuery(this).val()+"px":jQuery(this).val(),t.saveValue("letter-spacing",i["letter-spacing"])})),t.params.default["word-spacing"]&&this.container.on("change keyup paste",".word-spacing input",function(){t.saveValue("word-spacing",jQuery(this).val())}),t.params.default["text-align"]&&this.container.on("change",".text-align input",function(){t.saveValue("text-align",jQuery(this).val())}),t.params.default["text-transform"]&&jQuery(t.selector+" .text-transform select").selectWoo().on("change",function(){t.saveValue("text-transform",jQuery(this).val())}),t.params.default.color&&(e=this.container.find(".kirki-color-control")).wpColorPicker({change:function(){setTimeout(function(){t.saveValue("color",e.val())},100)}})},renderFontSelector:function(){var e,t=this,i=t.selector+" .font-family select",n=[],a=[],r=[],o=t.getValue(),s=t.getFonts();_.isUndefined(s.standard)||_.each(s.standard,function(e){a.push({id:e.family.replace(/"/g,"'"),text:e.label})}),_.isUndefined(s.standard)||_.each(s.google,function(e){r.push({id:e.family,text:e.label})}),n=[{text:"Standard Fonts",children:a},{text:"Google Fonts",children:r}],e=jQuery(i).selectWoo({data:n}),o["font-family"]&&e.val(o["font-family"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-family",jQuery(this).val()),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector()})},renderBackupFontSelector:function(){var e,t=this,i=t.selector+" .font-backup select",n=[],a=t.getValue(),r=a["font-family"],o=t.getVariants(r),s=t.getFonts();(_.isUndefined(a["font-backup"])||null===a["font-backup"])&&(a["font-backup"]=""),!1!==o?jQuery(t.selector+" .font-backup").show():jQuery(t.selector+" .font-backup").hide(),_.isUndefined(s.standard)||_.each(s.standard,function(e){n.push({id:e.family.replace(/"/g,"'"),text:e.label})}),e=jQuery(i).selectWoo({data:n}),void 0!==a["font-backup"]&&e.val(a["font-backup"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-backup",jQuery(this).val())})},renderVariantSelector:function(){var e,t,i,n=this,a=n.getValue(),r=a["font-family"],o=n.getVariants(r),s=n.selector+" .variant select",c=[],l=!1;!1!==o?(jQuery(n.selector+" .variant").show(),_.each(o,function(e){a.variant===e.id&&(l=!0),c.push({id:e.id,text:e.label})}),l||(a.variant="regular"),jQuery(s).hasClass("select2-hidden-accessible")&&(jQuery(s).selectWoo("destroy"),jQuery(s).empty()),(t=jQuery(s).selectWoo({data:c})).val(a.variant).trigger("change"),t.on("change",function(){n.saveValue("variant",jQuery(this).val()),e=_.isString(a.variant)?a.variant.match(/\d/g):"400",e=_.isObject(e)?e.join(""):"400",i=-1!==a.variant.indexOf("italic")?"italic":"normal",n.saveValue("font-weight",e),n.saveValue("font-style",i)})):jQuery(n.selector+" .variant").hide()},renderSubsetSelector:function(){var e,t=this,i=t.getValue(),n=i["font-family"],a=t.getSubsets(n),r=t.selector+" .subsets select",o=[],s=i.subsets;!1!==a?(jQuery(t.selector+" .subsets").show(),_.each(a,function(e){_.isObject(s)&&-1===s.indexOf(e.id)&&(s=_.reject(s,function(t){return t===e.id})),o.push({id:e.id,text:e.label})})):jQuery(t.selector+" .subsets").hide(),jQuery(r).hasClass("select2-hidden-accessible")&&(jQuery(r).selectWoo("destroy"),jQuery(r).empty()),(e=jQuery(r).selectWoo({data:o})).val(s).trigger("change"),e.on("change",function(){t.saveValue("subsets",jQuery(this).val())})},getFonts:function(){var e=this;return _.isUndefined(window["kirkiFonts"+e.id])?"undefined"!=typeof kirkiAllFonts?kirkiAllFonts:{google:[],standard:[]}:window["kirkiFonts"+e.id]},getVariants:function(e){var t=this.getFonts(),i=!1;return _.each(t.standard,function(t){if(e&&t.family===e.replace(/'/g,'"'))return i=t.variants,t.variants}),_.each(t.google,function(t){if(t.family===e)return i=t.variants,t.variants}),i},getSubsets:function(e){var t=!1,i=this.getFonts();return _.each(i.google,function(i){i.family===e&&(t=i.subsets)}),t},getValue:function(){"use strict";var e=this.container.find(".typography-hidden-value"),t=jQuery(e).val();return JSON.parse(t)},saveValue:function(e,t){"use strict";var i=this,n=i.container.find(".typography-hidden-value"),a=jQuery(n).val(),r=JSON.parse(a);r[e]=t,wp.customize.control(i.id).setting.set(r),jQuery(n).attr("value",JSON.stringify(r)).trigger("change")}});
\ No newline at end of file
diff --git a/controls/js/dist/script.js b/controls/js/dist/script.js
index 49baedfd6..3441413b6 100644
--- a/controls/js/dist/script.js
+++ b/controls/js/dist/script.js
@@ -1023,6 +1023,11 @@ var kirki = {
}
}
+ if ( 'undefined' !== typeof wp.customize.control( setting ) ) {
+ wp.customize.control( setting ).setting.set( value );
+ return;
+ }
+
parts = setting.split( '[' ),
// Find the setting we're using in the control using the customizer API.
diff --git a/controls/js/dist/script.min.js b/controls/js/dist/script.min.js
index d2db7680a..c35cbc6d1 100644
--- a/controls/js/dist/script.min.js
+++ b/controls/js/dist/script.min.js
@@ -1 +1 @@
-if(_.isUndefined(window.kirkiSetSettingValue))var kirkiSetSettingValue={set:function(e,t){var i,n=this,a=wp.customize.settings.controls[e];if(_.isUndefined(a))return!0;switch(n.setValue(e,t),a.type){case"kirki-background":_.isUndefined(t["background-color"])||n.setColorPicker(n.findElement(e,".kirki-color-control"),t["background-color"]),n.findElement(e,".placeholder, .thumbnail").removeClass().addClass("placeholder").html("No file selected"),_.each(["background-repeat","background-position"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["background-size","background-attachment"],function(i){jQuery(n.findElement(e,"."+i+' input[value="'+t+'"]')).prop("checked",!0)}),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".background-hidden-value").attr("value",i)).trigger("change");break;case"kirki-code":jQuery(n.findElement(e,".CodeMirror"))[0].CodeMirror.setValue(t);break;case"checkbox":case"kirki-switch":case"kirki-toggle":t=1===t||"1"===t||!0===t,jQuery(n.findElement(e,"input")).prop("checked",t),wp.customize.instance(e).set(t);break;case"kirki-select":case"kirki-preset":case"kirki-fontawesome":n.setSelectWoo(n.findElement(e,"select"),t);break;case"kirki-slider":jQuery(n.findElement(e,"input")).prop("value",t),jQuery(n.findElement(e,".kirki_range_value .value")).html(t);break;case"kirki-generic":(_.isUndefined(a.choices)||_.isUndefined(a.choices.element))&&(a.choices.element="input"),jQuery(n.findElement(e,a.choices.element)).prop("value",t);break;case"kirki-color":n.setColorPicker(n.findElement(e,".kirki-color-control"),t);break;case"kirki-multicheck":n.findElement(e,"input").each(function(){jQuery(this).prop("checked",!1)}),_.each(t,function(i,a){jQuery(n.findElement(e,'input[value="'+t[a]+'"]')).prop("checked",!0)});break;case"kirki-multicolor":_.each(t,function(t,i){n.setColorPicker(n.findElement(e,".multicolor-index-"+i),t)});break;case"kirki-radio-buttonset":case"kirki-radio-image":case"kirki-radio":case"kirki-dashicons":case"kirki-color-palette":case"kirki-palette":jQuery(n.findElement(e,'input[value="'+t+'"]')).prop("checked",!0);break;case"kirki-typography":_.each(["font-family","variant","subsets"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["font-size","line-height","letter-spacing","word-spacing"],function(i){_.isUndefined(t[i])||jQuery(n.findElement(e,"."+i+" input")).prop("value",t[i])}),_.isUndefined(t.color)||n.setColorPicker(n.findElement(e,".kirki-color-control"),t.color),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".typography-hidden-value").attr("value",i)).trigger("change");break;case"kirki-dimensions":_.each(t,function(t,i){jQuery(n.findElement(e,"."+i+" input")).prop("value",t)});break;case"kirki-repeater":case"kirki-custom":break;default:jQuery(n.findElement(e,"input")).prop("value",t)}},setColorPicker:function(e,t){e.attr("data-default-color",t).data("default-color",t).wpColorPicker("color",t)},setSelectWoo:function(e,t){jQuery(e).selectWoo().val(t).trigger("change")},setTextarea:function(e,t){jQuery(e).prop("value",t)},findElement:function(e,t){return wp.customize.control(e).container.find(t)},setValue:function(e,t,i){i=_.isUndefined(i)?100:parseInt(i,10),wp.customize.instance(e).set({}),setTimeout(function(){wp.customize.instance(e).set(t)},i)}};var kirki={initialized:!1,initialize:function(){var e=this;e.initialized||(e.util.webfonts.google.initialize(),e.initialized=!0)},control:{"kirki-radio":{init:function(e){this.template(e),kirki.input.radio.init(e)},template:function(e){e.container.html(kirki.input.radio.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,default:e.params.default,value:kirki.setting.get(e.id),choices:e.params.choices}))}},"kirki-color":{init:function(e){this.template(e),kirki.input.color.init(e)},template:function(e){e.container.html(kirki.input.color.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,mode:e.params.mode,inputAttrs:e.params.inputAttrs,"data-palette":e.params.palette,"data-default-color":e.params.default,"data-alpha":e.params.choices.alpha,value:kirki.setting.get(e.id)}))}},"kirki-generic":{init:function(e){this.template(e),_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?kirki.input.genericInput.init(e):kirki.input.textarea.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?e.container.html(kirki.input.genericInput.getTemplate(t)):e.container.html(kirki.input.textarea.getTemplate(t))}},"kirki-select":{init:function(e){this.template(e),kirki.input.select.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};e.container.html(kirki.input.select.getTemplate(t))}}},input:{radio:{getTemplate:function(e){var t="";if((e=_.defaults(e,{choices:{},label:"",description:"",inputAttrs:"",value:"","data-id":"",default:""})).choices)return e.label&&(t+=''+e.label+""),e.description&&(t+=''+e.description+""),_.each(e.choices,function(i,n){t+=""}),''+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},color:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",mode:"full",inputAttrs:"","data-palette":!e["data-palette"]||e["data-palette"],"data-default-color":e["data-default-color"]?e["data-default-color"]:"","data-alpha":!!e["data-alpha"]&&e["data-alpha"],value:"","data-id":""}),t+="",t+='',''+t+"
"},init:function(e){var t,i=jQuery('.kirki-color-control[data-id="'+e.id+'"]');e.choices=e.choices||{},_.isEmpty(e.choices)&&e.params.choices&&(e.choices=e.params.choices),_.isEmpty(e.choices)||i.wpColorPicker(e.choices),setTimeout(function(){(t=jQuery('.kirki-input-container[data-id="'+e.id+'"] .wp-picker-clear')).length&&t.click(function(){e.setting.set("")})},200),i.wpColorPicker({change:function(){setTimeout(function(){kirki.setting.set(e.id,i.val())},20)}})}},genericInput:{getTemplate:function(e){var t="",i=e.choices.element?e.choices.element:"input";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},textarea:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('textarea[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},select:{getTemplate:function(e){var t,i="";if((e=_.defaults(e,{label:"",description:"",inputAttrs:"","data-id":"",choices:{},multiple:1,value:1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+='",''+i+"
"},init:function(e){var t,i=jQuery('select[data-id="'+e.id+'"'),n=parseInt(i.data("multiple"),10),a={escapeMarkup:function(e){return e}};1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+="",i+='",''+i+"
"},init:function(e){}}},setting:{get:function(e){var t=e.split("["),i="",n=0,a="";return _.each(t,function(e,t){e=e.replace("]",""),0===t?i=e:i+="["+e+"]",_.isUndefined(wp.customize.instance(i))||(a=wp.customize.instance(i).get(),n=t),n"),n.params.content.attr("id","customize-control-"+e.replace(/]/g,"").replace(/\[/g,"-")),n.params.content.attr("class","customize-control customize-control-"+n.params.type)),i.propertyElements=[],wp.customize.Control.prototype.initialize.call(i,e,n)},_setUpSettingRootLinks:function(){var e=this;e.container.find("[data-customize-setting-link]").each(function(){var t=jQuery(this);wp.customize(t.data("customizeSettingLink"),function(i){var n=new wp.customize.Element(t);e.elements.push(n),n.sync(i),n.set(i())})})},_setUpSettingPropertyLinks:function(){var e=this;e.setting&&e.container.find("[data-customize-setting-property-link]").each(function(){var t,i=jQuery(this),n=i.data("customizeSettingPropertyLink");t=new wp.customize.Element(i),e.propertyElements.push(t),t.set(e.setting()[n]),t.bind(function(t){var i=e.setting();t!==i[n]&&((i=_.clone(i))[n]=t,e.setting.set(i))}),e.setting.bind(function(e){e[n]!==t.get()&&t.set(e[n])})})},ready:function(){var e=this;e._setUpSettingRootLinks(),e._setUpSettingPropertyLinks(),wp.customize.Control.prototype.ready.call(e),e.deferred.embedded.done(function(){e.initKirkiControl(e)})},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,function(t){"kirki-expanded"===t.params.type||t.expanded()||wp.customize.settings.autofocus.control===e.id?e.actuallyEmbed():t.expanded.bind(function(t){t&&e.actuallyEmbed()})})},actuallyEmbed:function(){var e=this;"resolved"!==e.deferred.embedded.state()&&(e.renderContent(),e.deferred.embedded.resolve())},focus:function(e){var t=this;t.actuallyEmbed(),wp.customize.Control.prototype.focus.call(t,e)},initKirkiControl:function(e){void 0===kirki.control[e.params.type]?this.container.on("change keyup paste click","input",function(){e.setting.set(jQuery(this).val())}):kirki.control[e.params.type].init(e)},kirkiValidateCSSValue:function(e){var t,i,n=["rem","em","ex","%","px","cm","mm","in","pt","pc","ch","vh","vw","vmin","vmax"];return"0"===e||0<=e.indexOf("calc(")&&0<=e.indexOf(")")||(t=parseFloat(e),i=e.replace(t,""),!isNaN(t)&&-1!==jQuery.inArray(i,n))}})}(),_.each(kirki.control,function(e,t){wp.customize.controlConstructor[t]=wp.customize.kirkiDynamicControl.extend({})}),wp.customize.controlConstructor["kirki-background"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.setting._value,i=e.container.find(".kirki-color-control");(_.isUndefined(t["background-image"])||""===t["background-image"])&&(e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide()),i.wpColorPicker({change:function(){setTimeout(function(){e.saveValue("background-color",i.val())},100)}}),e.container.on("change",".background-repeat select",function(){e.saveValue("background-repeat",jQuery(this).val())}),e.container.on("change click",".background-size input",function(){e.saveValue("background-size",jQuery(this).val())}),e.container.on("change",".background-position select",function(){e.saveValue("background-position",jQuery(this).val())}),e.container.on("change click",".background-attachment input",function(){e.saveValue("background-attachment",jQuery(this).val())}),e.container.on("click",".background-image-upload-button",function(t){var i=wp.media({multiple:!1}).open().on("select",function(){var t,n,a,r=i.state().get("selection").first(),o=r.toJSON().sizes.full.url;_.isUndefined(r.toJSON().sizes.medium)?_.isUndefined(r.toJSON().sizes.thumbnail)||(o=r.toJSON().sizes.thumbnail.url):o=r.toJSON().sizes.medium.url,t=r.toJSON().sizes.full.url,r.toJSON().id,r.toJSON().width,r.toJSON().height,""!==t&&e.container.find(".background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment").show(),e.saveValue("background-image",t),n=e.container.find(".placeholder, .thumbnail"),a=e.container.find(".background-image-upload-remove-button"),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),a.length&&a.show()});t.preventDefault()}),e.container.on("click",".background-image-upload-remove-button",function(t){var i,n;t.preventDefault(),e.saveValue("background-image",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".background-image-upload-remove-button"),e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide(),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&n.hide()})},saveValue:function(e,t){var i=this,n=jQuery("#customize-control-"+i.id.replace("[","-").replace("]","")+" .background-hidden-value"),a=i.setting._value;a[e]=t,jQuery(n).attr("value",JSON.stringify(a)).trigger("change"),i.setting.set(a)}}),wp.customize.controlConstructor["kirki-code"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.CodeEditorControl)||(jQuery(e.container.find("textarea.kirki-codemirror-editor")).hide(),wp.customize.control.add(new wp.customize.CodeEditorControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,editor_settings:{codemirror:{mode:e.params.choices.language}},settings:{default:e.id}})))}}),wp.customize.controlConstructor["kirki-color-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-dashicons"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-date"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.DateTimeControl)||wp.customize.control.add(new wp.customize.DateTimeControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,description:e.params.description,settings:{default:e.id},default:e.params.default}))}}),wp.customize.controlConstructor["kirki-dimension"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;t.kirkiNotifications(),this.container.on("change keyup paste","input",function(){e=jQuery(this).val(),t.setting.set(e)})},kirkiNotifications:function(){var e=this;wp.customize(e.id,function(t){t.bind(function(i){var n="long_title";!1===e.kirkiValidateCSSValue(i)?t.notifications.add(n,new wp.customize.Notification(n,{type:"warning",message:dimensionkirkiL10n["invalid-value"]})):t.notifications.remove(n)})})}}),wp.customize.controlConstructor["kirki-dimensions"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this,i=t.params.choices.controls,n={},a=[];for(_.each(i,function(e,t){!0===e&&a.push(t)}),e=0;e '+e.text},templateSelection:function(e){return' '+e.text}};_.each(a.icons,function(e){r.data.push({id:e.id,text:e.name})}),(t=jQuery(n).selectWoo(r)).on("change",function(){e=jQuery(this).val(),i.setting.set(e)}),t.val(i.setting._value).trigger("change")}}),wp.customize.controlConstructor["kirki-image"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as,n=e.container.find(".placeholder, .thumbnail"),a="array"===i?t.url:t,r=e.container.find(".image-upload-remove-button"),o=e.container.find(".image-default-button");e.container.find(".kirki-controls-loading-spinner").hide(),"id"!==i&&"ID"!==i||""===t||wp.media.attachment(t).fetch().then(function(e){setTimeout(function(){var e=wp.media.attachment(t).get("url");n.removeClass().addClass("thumbnail thumbnail-image").html('')},700)}),("url"===i&&""!==t||"array"===i&&!_.isUndefined(t.url)&&""!==t.url)&&e.container.find("image-default-button").hide(),("url"===i&&""===t||"array"===i&&(_.isUndefined(t.url)||""===t.url))&&r.hide(),t===e.params.default&&e.container.find("image-default-button").hide(),""!==a&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),e.container.on("click",".image-upload-button",function(t){var a=wp.media({multiple:!1}).open().on("select",function(){var t=a.state().get("selection").first(),s=t.toJSON().sizes.full.url;_.isUndefined(t.toJSON().sizes.medium)?_.isUndefined(t.toJSON().sizes.thumbnail)||(s=t.toJSON().sizes.thumbnail.url):s=t.toJSON().sizes.medium.url,"array"===i?(e.saveValue("id",t.toJSON().id),e.saveValue("url",t.toJSON().sizes.full.url),e.saveValue("width",t.toJSON().width),e.saveValue("height",t.toJSON().height)):"id"===i?e.saveValue("id",t.toJSON().id):e.saveValue("url",t.toJSON().sizes.full.url),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),r.length&&(r.show(),o.hide())});t.preventDefault()}),e.container.on("click",".image-upload-remove-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("id",""),e.saveValue("url",""),e.saveValue("width",""),e.saveValue("height",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&(n.hide(),jQuery(a).hasClass("button")&&a.show())}),e.container.on("click",".image-default-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("url",e.params.default),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("thumbnail thumbnail-image").html(''),n.length&&(n.show(),a.hide())})},getValue:function(){var e=this,t=e.setting._value;return"array"===(_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as)&&_.isString(t)&&(t={url:t}),t},saveValue:function(e,t){var i=this,n=i.setting._value;if("array"===(_.isUndefined(i.params.choices)||_.isUndefined(i.params.choices.save_as)?"url":i.params.choices.save_as))return _.isString(n)&&(n={}),n[e]=t,i.setting.set(n),void i.container.find("button").trigger("change");i.setting.set(t),i.container.find("button").trigger("change")}}),wp.customize.controlConstructor["kirki-multicheck"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;e.container.on("change","input",function(){var t=[],i=0;jQuery.each(e.params.choices,function(n){e.container.find('input[value="'+n+'"]').is(":checked")&&(t[i]=n,i++)}),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-multicolor"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";for(var e,t,i=this,n=i.params.choices,a=Object.keys(n),r=(this.params.value,i.container.find(".iris-target")),o=0;on.params.choices.min&&0",n.params.label&&(r+=''+n.params.label+""),n.params.description&&(r+=''+n.params.description+""),r+='',r+="
',r+='
-
',r+='
+
',r+="
",r+="",n.container.html(r),e=n.container.find("input"),t=n.container.find(".plus"),i=n.container.find(".minus"),t.click(function(){var t,i=parseFloat(e.val());t=i>=n.params.choices.max?i:i+n.params.choices.step,e.val(t),e.trigger("change")}),i.click(function(){var t,i=parseFloat(e.val());t=i<=n.params.choices.min?i:i-n.params.choices.step,e.val(t),e.trigger("change")}),this.container.on("change keyup paste click","input",function(){n.setting.set(jQuery(this).val())})}}),wp.customize.controlConstructor["kirki-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-preset"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;this.container.on("change","select",function(){e=jQuery(this).val(),t.setting.set(e),jQuery.each(t.params.choices,function(t,i){e===t&&jQuery.each(i.settings,function(e,t){kirkiSetSettingValue.set(e,t)})}),wp.customize.previewer.refresh()})}}),wp.customize.controlConstructor["kirki-radio-buttonset"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-radio-image"]=wp.customize.kirkiDynamicControl.extend({});var RepeaterRow=function(e,t,i,n){"use strict";var a=this;this.rowIndex=e,this.container=t,this.label=i,this.header=this.container.find(".repeater-row-header"),this.header.on("click",function(){a.toggleMinimize()}),this.container.on("click",".repeater-row-remove",function(){a.remove()}),this.header.on("mousedown",function(){a.container.trigger("row:start-dragging")}),this.container.on("keyup change","input, select, textarea",function(e){a.container.trigger("row:update",[a.rowIndex,jQuery(e.target).data("field"),e.target])}),this.setRowIndex=function(e){this.rowIndex=e,this.container.attr("data-row",e),this.container.data("row",e),this.updateLabel()},this.toggleMinimize=function(){this.container.toggleClass("minimized"),this.header.find(".dashicons").toggleClass("dashicons-arrow-up").toggleClass("dashicons-arrow-down")},this.remove=function(){this.container.slideUp(300,function(){jQuery(this).detach()}),this.container.trigger("row:remove",[this.rowIndex])},this.updateLabel=function(){var e,t,i;if("field"===this.label.type&&(e=this.container.find('.repeater-field [data-field="'+this.label.field+'"]'),_.isFunction(e.val)&&""!==(t=e.val())))return _.isUndefined(n.params.fields[this.label.field])||_.isUndefined(n.params.fields[this.label.field].type)||("select"===n.params.fields[this.label.field].type?_.isUndefined(n.params.fields[this.label.field].choices)||_.isUndefined(n.params.fields[this.label.field].choices[e.val()])||(t=n.params.fields[this.label.field].choices[e.val()]):"radio"!==n.params.fields[this.label.field].type&&"radio-image"!==n.params.fields[this.label.field].type||(i=n.selector+' [data-row="'+this.rowIndex+'"] .repeater-field [data-field="'+this.label.field+'"]:checked',t=jQuery(i).val())),void this.header.find(".repeater-row-label").text(t);this.header.find(".repeater-row-label").text(this.label.value+" "+(this.rowIndex+1))},this.updateLabel()};wp.customize.controlConstructor.repeater=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t,i=this,n=this.params.value;i.container.find(".kirki-controls-loading-spinner").hide(),this.settingField=this.container.find("[data-customize-setting-link]").first(),this.setValue([],!1),this.repeaterFieldsContainer=this.container.find(".repeater-fields").first(),this.currentIndex=0,this.rows=[],e=!1,_.isUndefined(this.params.choices.limit)||(e=!(0>=this.params.choices.limit)&&parseInt(this.params.choices.limit,10)),this.container.on("click","button.repeater-add",function(n){n.preventDefault(),!e||i.currentIndex/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(n){return(e=_.template(i.container.find(".customize-control-repeater-content").first().html(),null,t))(n)}}),n.length&&_.each(n,function(e){t=i.addRow(e),i.initColorPicker(),i.initSelect(t,e)}),this.setValue(n,!0,!0),this.repeaterFieldsContainer.sortable({handle:".repeater-row-header",update:function(){i.sort()}})},openFrame:function(e){"use strict";wp.customize.utils.isKeydownButNotEnterEvent(e)||(this.$thisButton.closest(".repeater-field").hasClass("repeater-field-cropped_image")?this.initCropperFrame():this.initFrame(),this.frame.open())},initFrame:function(){"use strict";var e=this.getMimeType();this.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query({type:e}),multiple:!1,date:!1})]}),this.frame.on("select",this.onSelect,this)},initCropperFrame:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field"),t=["width","height","flex_width","flex_height"],i=this.getMimeType();_.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"cropped_image"===this.params.fields[e].type&&t.forEach(function(t){_.isUndefined(this.params.fields[e][t])||(this.params[t]=this.params.fields[e][t])}.bind(this)),this.frame=wp.media({button:{text:"Select and Crop",close:!1},states:[new wp.media.controller.Library({library:wp.media.query({type:i}),multiple:!1,date:!1,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelectForCrop,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.$thisButton.closest(".repeater-field").hasClass("repeater-field-upload")?this.setFileInRepeaterField(e):this.setImageInRepeaterField(e)},onSelectForCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.params.width!==e.width||this.params.height!==e.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):this.setImageInRepeaterField(e)},onCropped:function(e){"use strict";this.setImageInRepeaterField(e)},calculateImageSelectOptions:function(e,t){"use strict";var i,n,a,r=t.get("control"),o=!!parseInt(r.params.flex_width,10),s=!!parseInt(r.params.flex_height,10),c=e.get("width"),l=e.get("height"),u=parseInt(r.params.width,10),d=parseInt(r.params.height,10),p=u/d,h=c,f=l;return t.set("canSkipCrop",!r.mustBeCropped(o,s,u,d,c,l)),h/f>p?u=(d=f)*p:d=(u=h)/p,i=(h-u)/2,n=(f-d)/2,a={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:c,imageHeight:l,x1:i,y1:n,x2:u+i,y2:d+n},!1===s&&!1===o&&(a.aspectRatio=u+":"+d),!1===s&&(a.maxHeight=d),!1===o&&(a.maxWidth=u),a},mustBeCropped:function(e,t,i,n,a,r){"use strict";return!(!0===e&&!0===t||!0===e&&n===r||!0===t&&i===a||i===a&&n===r||a<=i)},onSkippedCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.setImageInRepeaterField(e)},setImageInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image");t.find(".kirki-image-attachment").html('').hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},setFileInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-upload");t.find(".kirki-file-attachment").html(' '+e.filename+"").hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".upload-button").show(),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},getMimeType:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field");return _.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"upload"===this.params.fields[e].type&&!_.isUndefined(this.params.fields[e].mime_type)?this.params.fields[e].mime_type:"image"},removeImage:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload")).find(".upload-button"),t.find(".kirki-image-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},removeFile:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-upload")).find(".upload-button"),t.find(".kirki-file-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},getValue:function(){"use strict";return JSON.parse(decodeURI(this.setting.get()))},setValue:function(e,t,i){"use strict";var n=e,a=[];i&&(jQuery.each(this.params.fields,function(e,t){"image"!==t.type&&"cropped_image"!==t.type&&"upload"!==t.type||a.push(e)}),jQuery.each(e,function(e,t){jQuery.each(a,function(i,a){_.isUndefined(t[a])||_.isUndefined(t[a].id)||(n[e][a]=t[a].id)})})),this.setting.set(encodeURI(JSON.stringify(n))),t&&this.settingField.trigger("change")},addRow:function(e){"use strict";var t,i,n,a=this,r=a.repeaterTemplate(),o=this.getValue(),s={};if(r){if(t=jQuery.extend(!0,{},a.params.fields),e)for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)&&(t[n].default=e[n]);t.index=this.currentIndex,r=r(t),(i=new RepeaterRow(a.currentIndex,jQuery(r).appendTo(a.repeaterFieldsContainer),a.params.row_label,a)).container.on("row:remove",function(e,t){a.deleteRow(t)}),i.container.on("row:update",function(e,t,n,r){a.updateField.call(a,e,t,n,r),i.updateLabel()}),this.rows[this.currentIndex]=i;for(n in t)t.hasOwnProperty(n)&&(s[n]=t[n].default);return o[this.currentIndex]=s,this.setValue(o,!0),this.currentIndex++,i}},sort:function(){"use strict";var e=this,t=this.repeaterFieldsContainer.find(".repeater-row"),i=[],n=e.getValue(),a=[],r=[];t.each(function(e,t){i.push(jQuery(t).data("row"))}),jQuery.each(i,function(t,i){a[t]=e.rows[i],a[t].setRowIndex(t),r[t]=n[i]}),e.rows=a,e.setValue(r)},deleteRow:function(e){"use strict";var t,i=this.getValue();i[e]&&this.rows[e]&&(delete i[e],delete this.rows[e],this.setValue(i,!0));for(t in this.rows)this.rows.hasOwnProperty(t)&&this.rows[t]&&(this.rows[t].updateLabel(),0)},updateField:function(e,t,i,n){"use strict";var a,r,o;this.rows[t]&&this.params.fields[i]&&(a=this.params.fields[i].type,r=this.rows[t],o=this.getValue(),n=jQuery(n),_.isUndefined(o[r.rowIndex][i])||(o[r.rowIndex][i]="checkbox"===a?n.is(":checked"):n.val(),this.setValue(o,!0)))},initColorPicker:function(){"use strict";var e=this,t=e.container.find(".color-picker-hex"),i={},n=t.data("field");_.isUndefined(n)||_.isUndefined(e.params.fields[n])||_.isUndefined(e.params.fields[n].palettes)||!_.isObject(e.params.fields[n].palettes)||(i.palettes=e.params.fields[n].palettes),i.change=function(t,i){var n=jQuery(t.target),a=n.closest(".repeater-row").data("row"),r=e.getValue();r[a][n.data("field")]=i.color.toString(),e.setValue(r,!0)},0!==t.length&&t.wpColorPicker(i)},initSelect:function(e,t){"use strict";var i,n,a=this,r=e.container.find(".repeater-field select"),o={};0!==r.length&&(i=r.data("field"),"undefed"!==(n=jQuery(r).data("multiple"))&&jQuery.isNumeric(n)&&1<(n=parseInt(n,10))&&(o.maximumSelectionLength=n),jQuery(r).selectWoo(o).val(t[i]),this.container.on("change",".repeater-field select",function(e){var t=jQuery(e.target),i=t.closest(".repeater-row").data("row"),n=a.getValue();n[i][t.data("field")]=jQuery(this).val(),a.setValue(n)}))}}),wp.customize.controlConstructor["kirki-slider"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t="postMessage"===e.setting.transport?"mousemove change":"change",i=e.container.find('input[type="range"]'),n=e.container.find('input[type="text"]'),a=e.setting._value;n.attr("value",a),i.on("mousemove change",function(){n.attr("value",i.val())}),i.on(t,function(){e.setting.set(i.val())}),n.on("input paste change",function(){i.attr("value",n.val()),e.setting.set(n.val())}),e.container.find(".slider-reset").on("click",function(){n.attr("value",e.params.default),i.attr("value",e.params.default),e.setting.set(n.val())})}}),wp.customize.controlConstructor["kirki-sortable"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e=this;e.container.find(".kirki-controls-loading-spinner").hide(),e.sortableContainer=e.container.find("ul.sortable").first(),e.sortableContainer.sortable({stop:function(){e.updateValue()}}).disableSelection().find("li").each(function(){jQuery(this).find("i.visibility").click(function(){jQuery(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){e.updateValue()})},updateValue:function(){"use strict";var e=this,t=[];this.sortableContainer.find("li").each(function(){jQuery(this).is(".invisible")||t.push(jQuery(this).data("value"))}),e.setting.set(t)}}),wp.customize.controlConstructor["kirki-switch"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e=this,t=e.setting._value,i=jQuery(e.container.find(".switch-on")),n=jQuery(e.container.find(".switch-off"));jQuery(e.container.find(".switch label ")).css("width",i.width()+n.width()+40+"px"),jQuery("#customize-control-"+e.id.replace("[","-").replace("]","")).append(""),this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-toggle"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-typography"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e,t=this,i=t.setting._value;t.renderFontSelector(),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector(),t.params.default["font-size"]&&this.container.on("change keyup paste",".font-size input",function(){t.saveValue("font-size",jQuery(this).val())}),t.params.default["line-height"]&&this.container.on("change keyup paste",".line-height input",function(){t.saveValue("line-height",jQuery(this).val())}),t.params.default["margin-top"]&&this.container.on("change keyup paste",".margin-top input",function(){t.saveValue("margin-top",jQuery(this).val())}),t.params.default["margin-bottom"]&&this.container.on("change keyup paste",".margin-bottom input",function(){t.saveValue("margin-bottom",jQuery(this).val())}),t.params.default["letter-spacing"]&&(i["letter-spacing"]=jQuery.isNumeric(i["letter-spacing"])?i["letter-spacing"]+"px":i["letter-spacing"],this.container.on("change keyup paste",".letter-spacing input",function(){i["letter-spacing"]=jQuery.isNumeric(jQuery(this).val())?jQuery(this).val()+"px":jQuery(this).val(),t.saveValue("letter-spacing",i["letter-spacing"])})),t.params.default["word-spacing"]&&this.container.on("change keyup paste",".word-spacing input",function(){t.saveValue("word-spacing",jQuery(this).val())}),t.params.default["text-align"]&&this.container.on("change",".text-align input",function(){t.saveValue("text-align",jQuery(this).val())}),t.params.default["text-transform"]&&jQuery(t.selector+" .text-transform select").selectWoo().on("change",function(){t.saveValue("text-transform",jQuery(this).val())}),t.params.default.color&&(e=this.container.find(".kirki-color-control")).wpColorPicker({change:function(){setTimeout(function(){t.saveValue("color",e.val())},100)}})},renderFontSelector:function(){var e,t=this,i=t.selector+" .font-family select",n=[],a=[],r=[],o=t.setting._value,s=t.getFonts();_.isUndefined(s.standard)||_.each(s.standard,function(e){a.push({id:e.family.replace(/"/g,"'"),text:e.label})}),_.isUndefined(s.google)||_.each(s.google,function(e){r.push({id:e.family,text:e.family})}),n=[{text:"Standard Fonts",children:a},{text:"Google Fonts",children:r}],e=jQuery(i).selectWoo({data:n}),o["font-family"]&&e.val(o["font-family"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-family",jQuery(this).val()),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector()})},renderBackupFontSelector:function(){var e,t=this,i=t.selector+" .font-backup select",n=[],a=t.setting._value,r=a["font-family"],o=kirki.util.webfonts.google.getVariants(r),s=t.getFonts();(_.isUndefined(a["font-backup"])||null===a["font-backup"])&&(a["font-backup"]=""),!1!==o?jQuery(t.selector+" .font-backup").show():jQuery(t.selector+" .font-backup").hide(),_.isUndefined(s.standard)||_.each(s.standard,function(e){n.push({id:e.family.replace(/"/g,"'"),text:e.label})}),e=jQuery(i).selectWoo({data:n}),void 0!==a["font-backup"]&&e.val(a["font-backup"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-backup",jQuery(this).val())})},renderVariantSelector:function(){var e,t,i,n=this,a=n.setting._value,r=a["font-family"],o=kirki.util.webfonts.google.getVariants(r),s=n.selector+" .variant select",c=[],l=!1;o?(jQuery(n.selector+" .variant").show(),_.each(o,function(e){a.variant===e&&(l=!0),c.push({id:e,text:e})}),l||(a.variant="regular"),jQuery(s).hasClass("select2-hidden-accessible")&&(jQuery(s).selectWoo("destroy"),jQuery(s).empty()),(t=jQuery(s).selectWoo({data:c})).val(a.variant).trigger("change"),t.on("change",function(){n.saveValue("variant",jQuery(this).val()),e=_.isString(a.variant)?a.variant.match(/\d/g):"400",e=_.isObject(e)?e.join(""):"400",i=-1!==a.variant.indexOf("italic")?"italic":"normal",n.saveValue("font-weight",e),n.saveValue("font-style",i)})):jQuery(n.selector+" .variant").hide()},renderSubsetSelector:function(){var e,t=this,i=t.setting._value,n=i["font-family"],a=kirki.util.webfonts.google.getSubsets(n),r=t.selector+" .subsets select",o=[],s=i.subsets;!1!==a?(jQuery(t.selector+" .subsets").show(),_.each(a,function(e){_.isObject(s)&&-1===s.indexOf(e)&&(s=_.reject(s,function(t){return t===e})),o.push({id:e,text:e})})):jQuery(t.selector+" .subsets").hide(),jQuery(r).hasClass("select2-hidden-accessible")&&(jQuery(r).selectWoo("destroy"),jQuery(r).empty()),(e=jQuery(r).selectWoo({data:o})).val(s).trigger("change"),e.on("change",function(){t.saveValue("subsets",jQuery(this).val())})},getFonts:function(){var e=this;return void 0!==window["kirkiFonts"+e.id]?window["kirkiFonts"+e.id]:_.isEmpty(kirki.util.webfonts.google.fonts)?{google:[],standard:[]}:{google:kirki.util.webfonts.google.fonts,standard:kirkiAllFonts.standard}},saveValue:function(e,t){var i=this,n=i.container.find(".typography-hidden-value"),a=i.setting._value;a[e]=t,jQuery(n).attr("value",JSON.stringify(a)).trigger("change"),i.setting.set(a)}});
\ No newline at end of file
+if(_.isUndefined(window.kirkiSetSettingValue))var kirkiSetSettingValue={set:function(e,t){var i,n=this,a=wp.customize.settings.controls[e];if(_.isUndefined(a))return!0;switch(n.setValue(e,t),a.type){case"kirki-background":_.isUndefined(t["background-color"])||n.setColorPicker(n.findElement(e,".kirki-color-control"),t["background-color"]),n.findElement(e,".placeholder, .thumbnail").removeClass().addClass("placeholder").html("No file selected"),_.each(["background-repeat","background-position"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["background-size","background-attachment"],function(i){jQuery(n.findElement(e,"."+i+' input[value="'+t+'"]')).prop("checked",!0)}),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".background-hidden-value").attr("value",i)).trigger("change");break;case"kirki-code":jQuery(n.findElement(e,".CodeMirror"))[0].CodeMirror.setValue(t);break;case"checkbox":case"kirki-switch":case"kirki-toggle":t=1===t||"1"===t||!0===t,jQuery(n.findElement(e,"input")).prop("checked",t),wp.customize.instance(e).set(t);break;case"kirki-select":case"kirki-preset":case"kirki-fontawesome":n.setSelectWoo(n.findElement(e,"select"),t);break;case"kirki-slider":jQuery(n.findElement(e,"input")).prop("value",t),jQuery(n.findElement(e,".kirki_range_value .value")).html(t);break;case"kirki-generic":(_.isUndefined(a.choices)||_.isUndefined(a.choices.element))&&(a.choices.element="input"),jQuery(n.findElement(e,a.choices.element)).prop("value",t);break;case"kirki-color":n.setColorPicker(n.findElement(e,".kirki-color-control"),t);break;case"kirki-multicheck":n.findElement(e,"input").each(function(){jQuery(this).prop("checked",!1)}),_.each(t,function(i,a){jQuery(n.findElement(e,'input[value="'+t[a]+'"]')).prop("checked",!0)});break;case"kirki-multicolor":_.each(t,function(t,i){n.setColorPicker(n.findElement(e,".multicolor-index-"+i),t)});break;case"kirki-radio-buttonset":case"kirki-radio-image":case"kirki-radio":case"kirki-dashicons":case"kirki-color-palette":case"kirki-palette":jQuery(n.findElement(e,'input[value="'+t+'"]')).prop("checked",!0);break;case"kirki-typography":_.each(["font-family","variant","subsets"],function(i){_.isUndefined(t[i])||n.setSelectWoo(n.findElement(e,"."+i+" select"),t[i])}),_.each(["font-size","line-height","letter-spacing","word-spacing"],function(i){_.isUndefined(t[i])||jQuery(n.findElement(e,"."+i+" input")).prop("value",t[i])}),_.isUndefined(t.color)||n.setColorPicker(n.findElement(e,".kirki-color-control"),t.color),i=JSON.stringify(t).replace(/'/g,"'"),jQuery(n.findElement(e,".typography-hidden-value").attr("value",i)).trigger("change");break;case"kirki-dimensions":_.each(t,function(t,i){jQuery(n.findElement(e,"."+i+" input")).prop("value",t)});break;case"kirki-repeater":case"kirki-custom":break;default:jQuery(n.findElement(e,"input")).prop("value",t)}},setColorPicker:function(e,t){e.attr("data-default-color",t).data("default-color",t).wpColorPicker("color",t)},setSelectWoo:function(e,t){jQuery(e).selectWoo().val(t).trigger("change")},setTextarea:function(e,t){jQuery(e).prop("value",t)},findElement:function(e,t){return wp.customize.control(e).container.find(t)},setValue:function(e,t,i){i=_.isUndefined(i)?100:parseInt(i,10),wp.customize.instance(e).set({}),setTimeout(function(){wp.customize.instance(e).set(t)},i)}};var kirki={initialized:!1,initialize:function(){var e=this;e.initialized||(e.util.webfonts.google.initialize(),e.initialized=!0)},control:{"kirki-radio":{init:function(e){this.template(e),kirki.input.radio.init(e)},template:function(e){e.container.html(kirki.input.radio.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,default:e.params.default,value:kirki.setting.get(e.id),choices:e.params.choices}))}},"kirki-color":{init:function(e){this.template(e),kirki.input.color.init(e)},template:function(e){e.container.html(kirki.input.color.getTemplate({label:e.params.label,description:e.params.description,"data-id":e.id,mode:e.params.mode,inputAttrs:e.params.inputAttrs,"data-palette":e.params.palette,"data-default-color":e.params.default,"data-alpha":e.params.choices.alpha,value:kirki.setting.get(e.id)}))}},"kirki-generic":{init:function(e){this.template(e),_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?kirki.input.genericInput.init(e):kirki.input.textarea.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};_.isUndefined(e.params)||_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.element)||"textarea"!==e.params.choices.element?e.container.html(kirki.input.genericInput.getTemplate(t)):e.container.html(kirki.input.textarea.getTemplate(t))}},"kirki-select":{init:function(e){this.template(e),kirki.input.select.init(e)},template:function(e){var t={label:e.params.label,description:e.params.description,"data-id":e.id,inputAttrs:e.params.inputAttrs,choices:e.params.choices,value:kirki.setting.get(e.id)};e.container.html(kirki.input.select.getTemplate(t))}}},input:{radio:{getTemplate:function(e){var t="";if((e=_.defaults(e,{choices:{},label:"",description:"",inputAttrs:"",value:"","data-id":"",default:""})).choices)return e.label&&(t+=''+e.label+""),e.description&&(t+=''+e.description+""),_.each(e.choices,function(i,n){t+=""}),''+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},color:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",mode:"full",inputAttrs:"","data-palette":!e["data-palette"]||e["data-palette"],"data-default-color":e["data-default-color"]?e["data-default-color"]:"","data-alpha":!!e["data-alpha"]&&e["data-alpha"],value:"","data-id":""}),t+="",t+='',''+t+"
"},init:function(e){var t,i=jQuery('.kirki-color-control[data-id="'+e.id+'"]');e.choices=e.choices||{},_.isEmpty(e.choices)&&e.params.choices&&(e.choices=e.params.choices),_.isEmpty(e.choices)||i.wpColorPicker(e.choices),setTimeout(function(){(t=jQuery('.kirki-input-container[data-id="'+e.id+'"] .wp-picker-clear')).length&&t.click(function(){e.setting.set("")})},200),i.wpColorPicker({change:function(){setTimeout(function(){kirki.setting.set(e.id,i.val())},20)}})}},genericInput:{getTemplate:function(e){var t="",i=e.choices.element?e.choices.element:"input";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('input[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},textarea:{getTemplate:function(e){var t="";return e=_.defaults(e,{label:"",description:"",inputAttrs:"",value:"","data-id":"",choices:{}}),t+="",''+t+"
"},init:function(e){jQuery('textarea[data-id="'+e.id+'"]').on("change keyup paste click",function(){kirki.setting.set(e.id,jQuery(this).val())})}},select:{getTemplate:function(e){var t,i="";if((e=_.defaults(e,{label:"",description:"",inputAttrs:"","data-id":"",choices:{},multiple:1,value:1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+='",''+i+"
"},init:function(e){var t,i=jQuery('select[data-id="'+e.id+'"'),n=parseInt(i.data("multiple"),10),a={escapeMarkup:function(e){return e}};1",e.label&&(i+=''+e.label+""),e.description&&(i+=''+e.description+""),i+="",i+='",''+i+"
"},init:function(e){}}},setting:{get:function(e){var t=e.split("["),i="",n=0,a="";return _.each(t,function(e,t){e=e.replace("]",""),0===t?i=e:i+="["+e+"]",_.isUndefined(wp.customize.instance(i))||(a=wp.customize.instance(i).get(),n=t),n"),n.params.content.attr("id","customize-control-"+e.replace(/]/g,"").replace(/\[/g,"-")),n.params.content.attr("class","customize-control customize-control-"+n.params.type)),i.propertyElements=[],wp.customize.Control.prototype.initialize.call(i,e,n)},_setUpSettingRootLinks:function(){var e=this;e.container.find("[data-customize-setting-link]").each(function(){var t=jQuery(this);wp.customize(t.data("customizeSettingLink"),function(i){var n=new wp.customize.Element(t);e.elements.push(n),n.sync(i),n.set(i())})})},_setUpSettingPropertyLinks:function(){var e=this;e.setting&&e.container.find("[data-customize-setting-property-link]").each(function(){var t,i=jQuery(this),n=i.data("customizeSettingPropertyLink");t=new wp.customize.Element(i),e.propertyElements.push(t),t.set(e.setting()[n]),t.bind(function(t){var i=e.setting();t!==i[n]&&((i=_.clone(i))[n]=t,e.setting.set(i))}),e.setting.bind(function(e){e[n]!==t.get()&&t.set(e[n])})})},ready:function(){var e=this;e._setUpSettingRootLinks(),e._setUpSettingPropertyLinks(),wp.customize.Control.prototype.ready.call(e),e.deferred.embedded.done(function(){e.initKirkiControl(e)})},embed:function(){var e=this,t=e.section();t&&wp.customize.section(t,function(t){"kirki-expanded"===t.params.type||t.expanded()||wp.customize.settings.autofocus.control===e.id?e.actuallyEmbed():t.expanded.bind(function(t){t&&e.actuallyEmbed()})})},actuallyEmbed:function(){var e=this;"resolved"!==e.deferred.embedded.state()&&(e.renderContent(),e.deferred.embedded.resolve())},focus:function(e){var t=this;t.actuallyEmbed(),wp.customize.Control.prototype.focus.call(t,e)},initKirkiControl:function(e){void 0===kirki.control[e.params.type]?this.container.on("change keyup paste click","input",function(){e.setting.set(jQuery(this).val())}):kirki.control[e.params.type].init(e)},kirkiValidateCSSValue:function(e){var t,i,n=["rem","em","ex","%","px","cm","mm","in","pt","pc","ch","vh","vw","vmin","vmax"];return"0"===e||0<=e.indexOf("calc(")&&0<=e.indexOf(")")||(t=parseFloat(e),i=e.replace(t,""),!isNaN(t)&&-1!==jQuery.inArray(i,n))}})}(),_.each(kirki.control,function(e,t){wp.customize.controlConstructor[t]=wp.customize.kirkiDynamicControl.extend({})}),wp.customize.controlConstructor["kirki-background"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.setting._value,i=e.container.find(".kirki-color-control");(_.isUndefined(t["background-image"])||""===t["background-image"])&&(e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide()),i.wpColorPicker({change:function(){setTimeout(function(){e.saveValue("background-color",i.val())},100)}}),e.container.on("change",".background-repeat select",function(){e.saveValue("background-repeat",jQuery(this).val())}),e.container.on("change click",".background-size input",function(){e.saveValue("background-size",jQuery(this).val())}),e.container.on("change",".background-position select",function(){e.saveValue("background-position",jQuery(this).val())}),e.container.on("change click",".background-attachment input",function(){e.saveValue("background-attachment",jQuery(this).val())}),e.container.on("click",".background-image-upload-button",function(t){var i=wp.media({multiple:!1}).open().on("select",function(){var t,n,a,r=i.state().get("selection").first(),o=r.toJSON().sizes.full.url;_.isUndefined(r.toJSON().sizes.medium)?_.isUndefined(r.toJSON().sizes.thumbnail)||(o=r.toJSON().sizes.thumbnail.url):o=r.toJSON().sizes.medium.url,t=r.toJSON().sizes.full.url,r.toJSON().id,r.toJSON().width,r.toJSON().height,""!==t&&e.container.find(".background-wrapper > .background-repeat, .background-wrapper > .background-position, .background-wrapper > .background-size, .background-wrapper > .background-attachment").show(),e.saveValue("background-image",t),n=e.container.find(".placeholder, .thumbnail"),a=e.container.find(".background-image-upload-remove-button"),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),a.length&&a.show()});t.preventDefault()}),e.container.on("click",".background-image-upload-remove-button",function(t){var i,n;t.preventDefault(),e.saveValue("background-image",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".background-image-upload-remove-button"),e.container.find(".background-wrapper > .background-repeat").hide(),e.container.find(".background-wrapper > .background-position").hide(),e.container.find(".background-wrapper > .background-size").hide(),e.container.find(".background-wrapper > .background-attachment").hide(),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&n.hide()})},saveValue:function(e,t){var i=this,n=jQuery("#customize-control-"+i.id.replace("[","-").replace("]","")+" .background-hidden-value"),a=i.setting._value;a[e]=t,jQuery(n).attr("value",JSON.stringify(a)).trigger("change"),i.setting.set(a)}}),wp.customize.controlConstructor["kirki-code"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.CodeEditorControl)||(jQuery(e.container.find("textarea.kirki-codemirror-editor")).hide(),wp.customize.control.add(new wp.customize.CodeEditorControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,editor_settings:{codemirror:{mode:e.params.choices.language}},settings:{default:e.id}})))}}),wp.customize.controlConstructor["kirki-color-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-dashicons"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-date"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;_.isUndefined(wp.customize.DateTimeControl)||wp.customize.control.add(new wp.customize.DateTimeControl(e.id,{section:e.params.section,priority:e.params.priority,label:e.params.label,description:e.params.description,settings:{default:e.id},default:e.params.default}))}}),wp.customize.controlConstructor["kirki-dimension"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;t.kirkiNotifications(),this.container.on("change keyup paste","input",function(){e=jQuery(this).val(),t.setting.set(e)})},kirkiNotifications:function(){var e=this;wp.customize(e.id,function(t){t.bind(function(i){var n="long_title";!1===e.kirkiValidateCSSValue(i)?t.notifications.add(n,new wp.customize.Notification(n,{type:"warning",message:dimensionkirkiL10n["invalid-value"]})):t.notifications.remove(n)})})}}),wp.customize.controlConstructor["kirki-dimensions"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this,i=t.params.choices.controls,n={},a=[];for(_.each(i,function(e,t){!0===e&&a.push(t)}),e=0;e '+e.text},templateSelection:function(e){return' '+e.text}};_.each(a.icons,function(e){r.data.push({id:e.id,text:e.name})}),(t=jQuery(n).selectWoo(r)).on("change",function(){e=jQuery(this).val(),i.setting.set(e)}),t.val(i.setting._value).trigger("change")}}),wp.customize.controlConstructor["kirki-image"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){var e=this,t=e.getValue(),i=_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as,n=e.container.find(".placeholder, .thumbnail"),a="array"===i?t.url:t,r=e.container.find(".image-upload-remove-button"),o=e.container.find(".image-default-button");e.container.find(".kirki-controls-loading-spinner").hide(),"id"!==i&&"ID"!==i||""===t||wp.media.attachment(t).fetch().then(function(e){setTimeout(function(){var e=wp.media.attachment(t).get("url");n.removeClass().addClass("thumbnail thumbnail-image").html('')},700)}),("url"===i&&""!==t||"array"===i&&!_.isUndefined(t.url)&&""!==t.url)&&e.container.find("image-default-button").hide(),("url"===i&&""===t||"array"===i&&(_.isUndefined(t.url)||""===t.url))&&r.hide(),t===e.params.default&&e.container.find("image-default-button").hide(),""!==a&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),e.container.on("click",".image-upload-button",function(t){var a=wp.media({multiple:!1}).open().on("select",function(){var t=a.state().get("selection").first(),s=t.toJSON().sizes.full.url;_.isUndefined(t.toJSON().sizes.medium)?_.isUndefined(t.toJSON().sizes.thumbnail)||(s=t.toJSON().sizes.thumbnail.url):s=t.toJSON().sizes.medium.url,"array"===i?(e.saveValue("id",t.toJSON().id),e.saveValue("url",t.toJSON().sizes.full.url),e.saveValue("width",t.toJSON().width),e.saveValue("height",t.toJSON().height)):"id"===i?e.saveValue("id",t.toJSON().id):e.saveValue("url",t.toJSON().sizes.full.url),n.length&&n.removeClass().addClass("thumbnail thumbnail-image").html(''),r.length&&(r.show(),o.hide())});t.preventDefault()}),e.container.on("click",".image-upload-remove-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("id",""),e.saveValue("url",""),e.saveValue("width",""),e.saveValue("height",""),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("placeholder").html("No file selected"),n.length&&(n.hide(),jQuery(a).hasClass("button")&&a.show())}),e.container.on("click",".image-default-button",function(t){var i,n,a;t.preventDefault(),e.saveValue("url",e.params.default),i=e.container.find(".placeholder, .thumbnail"),n=e.container.find(".image-upload-remove-button"),a=e.container.find(".image-default-button"),i.length&&i.removeClass().addClass("thumbnail thumbnail-image").html(''),n.length&&(n.show(),a.hide())})},getValue:function(){var e=this,t=e.setting._value;return"array"===(_.isUndefined(e.params.choices)||_.isUndefined(e.params.choices.save_as)?"url":e.params.choices.save_as)&&_.isString(t)&&(t={url:t}),t},saveValue:function(e,t){var i=this,n=i.setting._value;if("array"===(_.isUndefined(i.params.choices)||_.isUndefined(i.params.choices.save_as)?"url":i.params.choices.save_as))return _.isString(n)&&(n={}),n[e]=t,i.setting.set(n),void i.container.find("button").trigger("change");i.setting.set(t),i.container.find("button").trigger("change")}}),wp.customize.controlConstructor["kirki-multicheck"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this;e.container.on("change","input",function(){var t=[],i=0;jQuery.each(e.params.choices,function(n){e.container.find('input[value="'+n+'"]').is(":checked")&&(t[i]=n,i++)}),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-multicolor"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";for(var e,t,i=this,n=i.params.choices,a=Object.keys(n),r=(this.params.value,i.container.find(".iris-target")),o=0;on.params.choices.min&&0",n.params.label&&(r+=''+n.params.label+""),n.params.description&&(r+=''+n.params.description+""),r+='',r+="
',r+='
-
',r+='
+
',r+="
",r+="",n.container.html(r),e=n.container.find("input"),t=n.container.find(".plus"),i=n.container.find(".minus"),t.click(function(){var t,i=parseFloat(e.val());t=i>=n.params.choices.max?i:i+n.params.choices.step,e.val(t),e.trigger("change")}),i.click(function(){var t,i=parseFloat(e.val());t=i<=n.params.choices.min?i:i-n.params.choices.step,e.val(t),e.trigger("change")}),this.container.on("change keyup paste click","input",function(){n.setting.set(jQuery(this).val())})}}),wp.customize.controlConstructor["kirki-palette"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-preset"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e,t=this;this.container.on("change","select",function(){e=jQuery(this).val(),t.setting.set(e),jQuery.each(t.params.choices,function(t,i){e===t&&jQuery.each(i.settings,function(e,t){kirkiSetSettingValue.set(e,t)})}),wp.customize.previewer.refresh()})}}),wp.customize.controlConstructor["kirki-radio-buttonset"]=wp.customize.kirkiDynamicControl.extend({}),wp.customize.controlConstructor["kirki-radio-image"]=wp.customize.kirkiDynamicControl.extend({});var RepeaterRow=function(e,t,i,n){"use strict";var a=this;this.rowIndex=e,this.container=t,this.label=i,this.header=this.container.find(".repeater-row-header"),this.header.on("click",function(){a.toggleMinimize()}),this.container.on("click",".repeater-row-remove",function(){a.remove()}),this.header.on("mousedown",function(){a.container.trigger("row:start-dragging")}),this.container.on("keyup change","input, select, textarea",function(e){a.container.trigger("row:update",[a.rowIndex,jQuery(e.target).data("field"),e.target])}),this.setRowIndex=function(e){this.rowIndex=e,this.container.attr("data-row",e),this.container.data("row",e),this.updateLabel()},this.toggleMinimize=function(){this.container.toggleClass("minimized"),this.header.find(".dashicons").toggleClass("dashicons-arrow-up").toggleClass("dashicons-arrow-down")},this.remove=function(){this.container.slideUp(300,function(){jQuery(this).detach()}),this.container.trigger("row:remove",[this.rowIndex])},this.updateLabel=function(){var e,t,i;if("field"===this.label.type&&(e=this.container.find('.repeater-field [data-field="'+this.label.field+'"]'),_.isFunction(e.val)&&""!==(t=e.val())))return _.isUndefined(n.params.fields[this.label.field])||_.isUndefined(n.params.fields[this.label.field].type)||("select"===n.params.fields[this.label.field].type?_.isUndefined(n.params.fields[this.label.field].choices)||_.isUndefined(n.params.fields[this.label.field].choices[e.val()])||(t=n.params.fields[this.label.field].choices[e.val()]):"radio"!==n.params.fields[this.label.field].type&&"radio-image"!==n.params.fields[this.label.field].type||(i=n.selector+' [data-row="'+this.rowIndex+'"] .repeater-field [data-field="'+this.label.field+'"]:checked',t=jQuery(i).val())),void this.header.find(".repeater-row-label").text(t);this.header.find(".repeater-row-label").text(this.label.value+" "+(this.rowIndex+1))},this.updateLabel()};wp.customize.controlConstructor.repeater=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e,t,i=this,n=this.params.value;i.container.find(".kirki-controls-loading-spinner").hide(),this.settingField=this.container.find("[data-customize-setting-link]").first(),this.setValue([],!1),this.repeaterFieldsContainer=this.container.find(".repeater-fields").first(),this.currentIndex=0,this.rows=[],e=!1,_.isUndefined(this.params.choices.limit)||(e=!(0>=this.params.choices.limit)&&parseInt(this.params.choices.limit,10)),this.container.on("click","button.repeater-add",function(n){n.preventDefault(),!e||i.currentIndex/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(n){return(e=_.template(i.container.find(".customize-control-repeater-content").first().html(),null,t))(n)}}),n.length&&_.each(n,function(e){t=i.addRow(e),i.initColorPicker(),i.initSelect(t,e)}),this.setValue(n,!0,!0),this.repeaterFieldsContainer.sortable({handle:".repeater-row-header",update:function(){i.sort()}})},openFrame:function(e){"use strict";wp.customize.utils.isKeydownButNotEnterEvent(e)||(this.$thisButton.closest(".repeater-field").hasClass("repeater-field-cropped_image")?this.initCropperFrame():this.initFrame(),this.frame.open())},initFrame:function(){"use strict";var e=this.getMimeType();this.frame=wp.media({states:[new wp.media.controller.Library({library:wp.media.query({type:e}),multiple:!1,date:!1})]}),this.frame.on("select",this.onSelect,this)},initCropperFrame:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field"),t=["width","height","flex_width","flex_height"],i=this.getMimeType();_.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"cropped_image"===this.params.fields[e].type&&t.forEach(function(t){_.isUndefined(this.params.fields[e][t])||(this.params[t]=this.params.fields[e][t])}.bind(this)),this.frame=wp.media({button:{text:"Select and Crop",close:!1},states:[new wp.media.controller.Library({library:wp.media.query({type:i}),multiple:!1,date:!1,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelectForCrop,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.$thisButton.closest(".repeater-field").hasClass("repeater-field-upload")?this.setFileInRepeaterField(e):this.setImageInRepeaterField(e)},onSelectForCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.params.width!==e.width||this.params.height!==e.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):this.setImageInRepeaterField(e)},onCropped:function(e){"use strict";this.setImageInRepeaterField(e)},calculateImageSelectOptions:function(e,t){"use strict";var i,n,a,r=t.get("control"),o=!!parseInt(r.params.flex_width,10),s=!!parseInt(r.params.flex_height,10),c=e.get("width"),l=e.get("height"),u=parseInt(r.params.width,10),d=parseInt(r.params.height,10),p=u/d,h=c,f=l;return t.set("canSkipCrop",!r.mustBeCropped(o,s,u,d,c,l)),h/f>p?u=(d=f)*p:d=(u=h)/p,i=(h-u)/2,n=(f-d)/2,a={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:c,imageHeight:l,x1:i,y1:n,x2:u+i,y2:d+n},!1===s&&!1===o&&(a.aspectRatio=u+":"+d),!1===s&&(a.maxHeight=d),!1===o&&(a.maxWidth=u),a},mustBeCropped:function(e,t,i,n,a,r){"use strict";return!(!0===e&&!0===t||!0===e&&n===r||!0===t&&i===a||i===a&&n===r||a<=i)},onSkippedCrop:function(){"use strict";var e=this.frame.state().get("selection").first().toJSON();this.setImageInRepeaterField(e)},setImageInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image");t.find(".kirki-image-attachment").html('').hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},setFileInRepeaterField:function(e){"use strict";var t=this.$thisButton.closest(".repeater-field-upload");t.find(".kirki-file-attachment").html(' '+e.filename+"").hide().slideDown("slow"),t.find(".hidden-field").val(e.id),this.$thisButton.text(this.$thisButton.data("alt-label")),t.find(".upload-button").show(),t.find(".remove-button").show(),t.find("input, textarea, select").trigger("change"),this.frame.close()},getMimeType:function(){"use strict";var e=this.$thisButton.siblings("input.hidden-field").attr("data-field");return _.isString(e)&&""!==e&&_.isObject(this.params.fields[e])&&"upload"===this.params.fields[e].type&&!_.isUndefined(this.params.fields[e].mime_type)?this.params.fields[e].mime_type:"image"},removeImage:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-image,.repeater-field-cropped_image,.repeater-field-upload")).find(".upload-button"),t.find(".kirki-image-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},removeFile:function(e){"use strict";var t,i;wp.customize.utils.isKeydownButNotEnterEvent(e)||(i=(t=this.$thisButton.closest(".repeater-field-upload")).find(".upload-button"),t.find(".kirki-file-attachment").slideUp("fast",function(){jQuery(this).show().html(jQuery(this).data("placeholder"))}),t.find(".hidden-field").val(""),i.text(i.data("label")),this.$thisButton.hide(),t.find("input, textarea, select").trigger("change"))},getValue:function(){"use strict";return JSON.parse(decodeURI(this.setting.get()))},setValue:function(e,t,i){"use strict";var n=e,a=[];i&&(jQuery.each(this.params.fields,function(e,t){"image"!==t.type&&"cropped_image"!==t.type&&"upload"!==t.type||a.push(e)}),jQuery.each(e,function(e,t){jQuery.each(a,function(i,a){_.isUndefined(t[a])||_.isUndefined(t[a].id)||(n[e][a]=t[a].id)})})),this.setting.set(encodeURI(JSON.stringify(n))),t&&this.settingField.trigger("change")},addRow:function(e){"use strict";var t,i,n,a=this,r=a.repeaterTemplate(),o=this.getValue(),s={};if(r){if(t=jQuery.extend(!0,{},a.params.fields),e)for(n in e)e.hasOwnProperty(n)&&t.hasOwnProperty(n)&&(t[n].default=e[n]);t.index=this.currentIndex,r=r(t),(i=new RepeaterRow(a.currentIndex,jQuery(r).appendTo(a.repeaterFieldsContainer),a.params.row_label,a)).container.on("row:remove",function(e,t){a.deleteRow(t)}),i.container.on("row:update",function(e,t,n,r){a.updateField.call(a,e,t,n,r),i.updateLabel()}),this.rows[this.currentIndex]=i;for(n in t)t.hasOwnProperty(n)&&(s[n]=t[n].default);return o[this.currentIndex]=s,this.setValue(o,!0),this.currentIndex++,i}},sort:function(){"use strict";var e=this,t=this.repeaterFieldsContainer.find(".repeater-row"),i=[],n=e.getValue(),a=[],r=[];t.each(function(e,t){i.push(jQuery(t).data("row"))}),jQuery.each(i,function(t,i){a[t]=e.rows[i],a[t].setRowIndex(t),r[t]=n[i]}),e.rows=a,e.setValue(r)},deleteRow:function(e){"use strict";var t,i=this.getValue();i[e]&&this.rows[e]&&(delete i[e],delete this.rows[e],this.setValue(i,!0));for(t in this.rows)this.rows.hasOwnProperty(t)&&this.rows[t]&&(this.rows[t].updateLabel(),0)},updateField:function(e,t,i,n){"use strict";var a,r,o;this.rows[t]&&this.params.fields[i]&&(a=this.params.fields[i].type,r=this.rows[t],o=this.getValue(),n=jQuery(n),_.isUndefined(o[r.rowIndex][i])||(o[r.rowIndex][i]="checkbox"===a?n.is(":checked"):n.val(),this.setValue(o,!0)))},initColorPicker:function(){"use strict";var e=this,t=e.container.find(".color-picker-hex"),i={},n=t.data("field");_.isUndefined(n)||_.isUndefined(e.params.fields[n])||_.isUndefined(e.params.fields[n].palettes)||!_.isObject(e.params.fields[n].palettes)||(i.palettes=e.params.fields[n].palettes),i.change=function(t,i){var n=jQuery(t.target),a=n.closest(".repeater-row").data("row"),r=e.getValue();r[a][n.data("field")]=i.color.toString(),e.setValue(r,!0)},0!==t.length&&t.wpColorPicker(i)},initSelect:function(e,t){"use strict";var i,n,a=this,r=e.container.find(".repeater-field select"),o={};0!==r.length&&(i=r.data("field"),"undefed"!==(n=jQuery(r).data("multiple"))&&jQuery.isNumeric(n)&&1<(n=parseInt(n,10))&&(o.maximumSelectionLength=n),jQuery(r).selectWoo(o).val(t[i]),this.container.on("change",".repeater-field select",function(e){var t=jQuery(e.target),i=t.closest(".repeater-row").data("row"),n=a.getValue();n[i][t.data("field")]=jQuery(this).val(),a.setValue(n)}))}}),wp.customize.controlConstructor["kirki-slider"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t="postMessage"===e.setting.transport?"mousemove change":"change",i=e.container.find('input[type="range"]'),n=e.container.find('input[type="text"]'),a=e.setting._value;n.attr("value",a),i.on("mousemove change",function(){n.attr("value",i.val())}),i.on(t,function(){e.setting.set(i.val())}),n.on("input paste change",function(){i.attr("value",n.val()),e.setting.set(n.val())}),e.container.find(".slider-reset").on("click",function(){n.attr("value",e.params.default),i.attr("value",e.params.default),e.setting.set(n.val())})}}),wp.customize.controlConstructor["kirki-sortable"]=wp.customize.Control.extend({ready:function(){"use strict";var e=this;!_.isUndefined(window.kirkiControlLoader)&&_.isFunction(kirkiControlLoader)?kirkiControlLoader(e):e.initKirkiControl()},initKirkiControl:function(){"use strict";var e=this;e.container.find(".kirki-controls-loading-spinner").hide(),e.sortableContainer=e.container.find("ul.sortable").first(),e.sortableContainer.sortable({stop:function(){e.updateValue()}}).disableSelection().find("li").each(function(){jQuery(this).find("i.visibility").click(function(){jQuery(this).toggleClass("dashicons-visibility-faint").parents("li:eq(0)").toggleClass("invisible")})}).click(function(){e.updateValue()})},updateValue:function(){"use strict";var e=this,t=[];this.sortableContainer.find("li").each(function(){jQuery(this).is(".invisible")||t.push(jQuery(this).data("value"))}),e.setting.set(t)}}),wp.customize.controlConstructor["kirki-switch"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e=this,t=e.setting._value,i=jQuery(e.container.find(".switch-on")),n=jQuery(e.container.find(".switch-off"));jQuery(e.container.find(".switch label ")).css("width",i.width()+n.width()+40+"px"),jQuery("#customize-control-"+e.id.replace("[","-").replace("]","")).append(""),this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-toggle"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){var e=this,t=e.setting._value;this.container.on("change","input",function(){t=!!jQuery(this).is(":checked"),e.setting.set(t)})}}),wp.customize.controlConstructor["kirki-typography"]=wp.customize.kirkiDynamicControl.extend({initKirkiControl:function(){"use strict";var e,t=this,i=t.setting._value;t.renderFontSelector(),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector(),t.params.default["font-size"]&&this.container.on("change keyup paste",".font-size input",function(){t.saveValue("font-size",jQuery(this).val())}),t.params.default["line-height"]&&this.container.on("change keyup paste",".line-height input",function(){t.saveValue("line-height",jQuery(this).val())}),t.params.default["margin-top"]&&this.container.on("change keyup paste",".margin-top input",function(){t.saveValue("margin-top",jQuery(this).val())}),t.params.default["margin-bottom"]&&this.container.on("change keyup paste",".margin-bottom input",function(){t.saveValue("margin-bottom",jQuery(this).val())}),t.params.default["letter-spacing"]&&(i["letter-spacing"]=jQuery.isNumeric(i["letter-spacing"])?i["letter-spacing"]+"px":i["letter-spacing"],this.container.on("change keyup paste",".letter-spacing input",function(){i["letter-spacing"]=jQuery.isNumeric(jQuery(this).val())?jQuery(this).val()+"px":jQuery(this).val(),t.saveValue("letter-spacing",i["letter-spacing"])})),t.params.default["word-spacing"]&&this.container.on("change keyup paste",".word-spacing input",function(){t.saveValue("word-spacing",jQuery(this).val())}),t.params.default["text-align"]&&this.container.on("change",".text-align input",function(){t.saveValue("text-align",jQuery(this).val())}),t.params.default["text-transform"]&&jQuery(t.selector+" .text-transform select").selectWoo().on("change",function(){t.saveValue("text-transform",jQuery(this).val())}),t.params.default.color&&(e=this.container.find(".kirki-color-control")).wpColorPicker({change:function(){setTimeout(function(){t.saveValue("color",e.val())},100)}})},renderFontSelector:function(){var e,t=this,i=t.selector+" .font-family select",n=[],a=[],r=[],o=t.setting._value,s=t.getFonts();_.isUndefined(s.standard)||_.each(s.standard,function(e){a.push({id:e.family.replace(/"/g,"'"),text:e.label})}),_.isUndefined(s.google)||_.each(s.google,function(e){r.push({id:e.family,text:e.family})}),n=[{text:"Standard Fonts",children:a},{text:"Google Fonts",children:r}],e=jQuery(i).selectWoo({data:n}),o["font-family"]&&e.val(o["font-family"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-family",jQuery(this).val()),t.renderBackupFontSelector(),t.renderVariantSelector(),t.renderSubsetSelector()})},renderBackupFontSelector:function(){var e,t=this,i=t.selector+" .font-backup select",n=[],a=t.setting._value,r=a["font-family"],o=kirki.util.webfonts.google.getVariants(r),s=t.getFonts();(_.isUndefined(a["font-backup"])||null===a["font-backup"])&&(a["font-backup"]=""),!1!==o?jQuery(t.selector+" .font-backup").show():jQuery(t.selector+" .font-backup").hide(),_.isUndefined(s.standard)||_.each(s.standard,function(e){n.push({id:e.family.replace(/"/g,"'"),text:e.label})}),e=jQuery(i).selectWoo({data:n}),void 0!==a["font-backup"]&&e.val(a["font-backup"].replace(/'/g,'"')).trigger("change"),e.on("change",function(){t.saveValue("font-backup",jQuery(this).val())})},renderVariantSelector:function(){var e,t,i,n=this,a=n.setting._value,r=a["font-family"],o=kirki.util.webfonts.google.getVariants(r),s=n.selector+" .variant select",c=[],l=!1;o?(jQuery(n.selector+" .variant").show(),_.each(o,function(e){a.variant===e&&(l=!0),c.push({id:e,text:e})}),l||(a.variant="regular"),jQuery(s).hasClass("select2-hidden-accessible")&&(jQuery(s).selectWoo("destroy"),jQuery(s).empty()),(t=jQuery(s).selectWoo({data:c})).val(a.variant).trigger("change"),t.on("change",function(){n.saveValue("variant",jQuery(this).val()),e=_.isString(a.variant)?a.variant.match(/\d/g):"400",e=_.isObject(e)?e.join(""):"400",i=-1!==a.variant.indexOf("italic")?"italic":"normal",n.saveValue("font-weight",e),n.saveValue("font-style",i)})):jQuery(n.selector+" .variant").hide()},renderSubsetSelector:function(){var e,t=this,i=t.setting._value,n=i["font-family"],a=kirki.util.webfonts.google.getSubsets(n),r=t.selector+" .subsets select",o=[],s=i.subsets;!1!==a?(jQuery(t.selector+" .subsets").show(),_.each(a,function(e){_.isObject(s)&&-1===s.indexOf(e)&&(s=_.reject(s,function(t){return t===e})),o.push({id:e,text:e})})):jQuery(t.selector+" .subsets").hide(),jQuery(r).hasClass("select2-hidden-accessible")&&(jQuery(r).selectWoo("destroy"),jQuery(r).empty()),(e=jQuery(r).selectWoo({data:o})).val(s).trigger("change"),e.on("change",function(){t.saveValue("subsets",jQuery(this).val())})},getFonts:function(){var e=this;return void 0!==window["kirkiFonts"+e.id]?window["kirkiFonts"+e.id]:_.isEmpty(kirki.util.webfonts.google.fonts)?{google:[],standard:[]}:{google:kirki.util.webfonts.google.fonts,standard:kirkiAllFonts.standard}},saveValue:function(e,t){var i=this,n=i.container.find(".typography-hidden-value"),a=i.setting._value;a[e]=t,jQuery(n).attr("value",JSON.stringify(a)).trigger("change"),i.setting.set(a)}});
\ No newline at end of file
diff --git a/controls/js/src/kirki.js b/controls/js/src/kirki.js
index 9d083874c..3a2409387 100644
--- a/controls/js/src/kirki.js
+++ b/controls/js/src/kirki.js
@@ -813,6 +813,11 @@ var kirki = {
}
}
+ if ( 'undefined' !== typeof wp.customize.control( setting ) ) {
+ wp.customize.control( setting ).setting.set( value );
+ return;
+ }
+
parts = setting.split( '[' ),
// Find the setting we're using in the control using the customizer API.