/
home
/
ifprccom
/
www
/
configCKO
/
Jump
/
0-ifprccom
/
wp-admin
/
js
/
Upload Filee
HOME
!function(D){var i,e,s,t,n,a,o,I=wp.customize;I.Setting=I.Value.extend({initialize:function(e,t,n){var i=this;I.Value.prototype.initialize.call(i,t,n),i.id=e,i.transport=i.transport||"refresh",i._dirty=n.dirty||!1,i.notifications=new I.Values({defaultConstructor:I.Notification}),i.bind(i.preview)},preview:function(){var e=this,t=e.transport;"postMessage"===(t="postMessage"===t&&!I.state("previewerAlive").get()?"refresh":t)?e.previewer.send("setting",[e.id,e()]):"refresh"===t&&e.previewer.refresh()},findControls:function(){var n=this,i=[];return I.control.each(function(t){_.each(t.settings,function(e){e.id===n.id&&i.push(t)})}),i}}),I._latestRevision=0,I._lastSavedRevision=0,I._latestSettingRevisions={},I.bind("change",function(e){I._latestRevision+=1,I._latestSettingRevisions[e.id]=I._latestRevision}),I.bind("ready",function(){I.bind("add",function(e){e._dirty&&(I._latestRevision+=1,I._latestSettingRevisions[e.id]=I._latestRevision)})}),I.dirtyValues=function(n){var i={};return I.each(function(e){var t;e._dirty&&(t=I._latestSettingRevisions[e.id],I.state("changesetStatus").get()&&n&&n.unsaved&&(_.isUndefined(t)||t<=I._lastSavedRevision)||(i[e.id]=e.get()))}),i},I.requestChangesetUpdate=function(n){var e,i={},t=new D.Deferred;return n&&_.extend(i,n),_.each(I.dirtyValues({unsaved:!0}),function(e,t){n&&null===n[t]||(i[t]=_.extend({},i[t]||{},{value:e}))}),_.isEmpty(i)?t.resolve({}):(I.state("processing").set(I.state("processing").get()+1),t.always(function(){I.state("processing").set(I.state("processing").get()-1)}),I.trigger("changeset-save",i),delete(e=I.previewer.query({excludeCustomizedSaved:!0})).customized,_.extend(e,{nonce:I.settings.nonce.save,customize_theme:I.settings.theme.stylesheet,customize_changeset_data:JSON.stringify(i)}),(e=wp.ajax.post("customize_save",e)).done(function(e){var n={};I._lastSavedRevision=Math.max(I._latestRevision,I._lastSavedRevision),I.state("changesetStatus").set(e.changeset_status),t.resolve(e),I.trigger("changeset-saved",e),e.setting_validities&&_.each(e.setting_validities,function(e,t){!0===e&&_.isObject(i[t])&&!_.isUndefined(i[t].value)&&(n[t]=i[t].value)}),I.previewer.send("changeset-saved",_.extend({},e,{saved_changeset_values:n}))}),e.fail(function(e){t.reject(e),I.trigger("changeset-error",e)}),e.always(function(e){e.setting_validities&&I._handleSettingValidities({settingValidities:e.setting_validities})})),t.promise()},I.utils.bubbleChildValueChanges=function(n,e){D.each(e,function(e,t){n[t].bind(function(e,t){n.parent&&e!==t&&n.parent.trigger("change",n)})})},e=function(e){var t,n,i=this,a=function(){var e=(i.extended(I.Panel)||i.extended(I.Section))&&i.expanded&&i.expanded()?i.contentContainer:i.container;(n=0===(n=e.find(".control-focus:first")).length?e.find("input, select, textarea, button, object, a[href], [tabindex]").filter(":visible").first():n).focus()};(e=e||{}).completeCallback?(t=e.completeCallback,e.completeCallback=function(){a(),t()}):e.completeCallback=a,I.state("paneVisible").set(!0),i.expand?i.expand(e):e.completeCallback()},I.utils.prioritySort=function(e,t){return e.priority()===t.priority()&&"number"==typeof e.params.instanceNumber&&"number"==typeof t.params.instanceNumber?e.params.instanceNumber-t.params.instanceNumber:e.priority()-t.priority()},I.utils.isKeydownButNotEnterEvent=function(e){return"keydown"===e.type&&13!==e.which},I.utils.areElementListsEqual=function(e,t){return e.length===t.length&&-1===_.indexOf(_.map(_.zip(e,t),function(e){return D(e[0]).is(e[1])}),!1)},t=document.createElement("div"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},a=_.find(_.keys(n),function(e){return!_.isUndefined(t.style[e])}),s=a?n[a]:null,i=I.Class.extend({defaultActiveArguments:{duration:"fast",completeCallback:D.noop},defaultExpandedArguments:{duration:"fast",completeCallback:D.noop},containerType:"container",defaults:{title:"",description:"",priority:100,type:"default",content:null,active:!0,instanceNumber:null},initialize:function(e,t){var n=this;n.id=e,(t=t||{}).params=_.defaults(t.params||{},n.defaults),D.extend(n,t),n.templateSelector="customize-"+n.containerType+"-"+n.params.type,n.container=D(n.params.content),0===n.container.length&&(n.container=D(n.getContainer())),n.headContainer=n.container,n.contentContainer=n.getContent(),n.container=n.container.add(n.contentContainer),n.deferred={embedded:new D.Deferred},n.priority=new I.Value,n.active=new I.Value,n.activeArgumentsQueue=[],n.expanded=new I.Value,n.expandedArgumentsQueue=[],n.active.bind(function(e){var t=n.activeArgumentsQueue.shift(),t=D.extend({},n.defaultActiveArguments,t);e=e&&n.isContextuallyActive(),n.onChangeActive(e,t)}),n.expanded.bind(function(e){var t=n.expandedArgumentsQueue.shift(),t=D.extend({},n.defaultExpandedArguments,t);n.onChangeExpanded(e,t)}),n.deferred.embedded.done(function(){n.attachEvents()}),I.utils.bubbleChildValueChanges(n,["priority","active"]),n.priority.set(n.params.priority),n.active.set(n.params.active),n.expanded.set(!1)},ready:function(){},_children:function(t,e){var n=this,i=[];return I[e].each(function(e){e[t].get()===n.id&&i.push(e)}),i.sort(I.utils.prioritySort),i},isContextuallyActive:function(){throw new Error("Container.isContextuallyActive() must be overridden in a subclass.")},onChangeActive:function(e,t){var n,i=this,a=i.headContainer;t.unchanged?t.completeCallback&&t.completeCallback():(n="resolved"===I.previewer.deferred.active.state()?t.duration:0,i.extended(I.Panel)&&(I.panel.each(function(e){e!==i&&e.expanded()&&(n=0)}),e||_.each(i.sections(),function(e){e.collapse({duration:0})})),D.contains(document,a.get(0))?e?a.slideDown(n,t.completeCallback):i.expanded()?i.collapse({duration:n,completeCallback:function(){a.slideUp(n,t.completeCallback)}}):a.slideUp(n,t.completeCallback):(a.toggle(e),t.completeCallback&&t.completeCallback()))},_toggleActive:function(e,t){return t=t||{},e&&this.active.get()||!e&&!this.active.get()?(t.unchanged=!0,this.onChangeActive(this.active.get(),t),!1):(t.unchanged=!1,this.activeArgumentsQueue.push(t),this.active.set(e),!0)},activate:function(e){return this._toggleActive(!0,e)},deactivate:function(e){return this._toggleActive(!1,e)},onChangeExpanded:function(){throw new Error("Must override with subclass.")},_toggleExpanded:function(e,t){var n,i=this;return n=(t=t||{}).completeCallback,!(e&&!i.active())&&(I.state("paneVisible").set(!0),t.completeCallback=function(){n&&n.apply(i,arguments),e?i.container.trigger("expanded"):i.container.trigger("collapsed")},e&&i.expanded.get()||!e&&!i.expanded.get()?(t.unchanged=!0,i.onChangeExpanded(i.expanded.get(),t),!1):(t.unchanged=!1,i.expandedArgumentsQueue.push(t),i.expanded.set(e),!0))},expand:function(e){return this._toggleExpanded(!0,e)},collapse:function(e){return this._toggleExpanded(!1,e)},_animateChangeExpanded:function(t){var a,o,n,i;s?(o=(a=this).contentContainer,i=o.closest(".wp-full-overlay").add(o),a.panel&&""!==a.panel()&&!I.panel(a.panel()).contentContainer.hasClass("skip-transition")||(i=i.add("#customize-info, .customize-pane-parent")),n=function(e){2===e.eventPhase&&D(e.target).is(o)&&(o.off(s,n),i.removeClass("busy"),t&&t())},o.on(s,n),i.addClass("busy"),_.defer(function(){var e=o.closest(".wp-full-overlay-sidebar-content"),t=e.scrollTop(),n=o.data("previous-scrollTop")||0,i=a.expanded();i&&0<t?(o.css("top",t+"px"),o.data("previous-scrollTop",t)):!i&&0<t+n&&(o.css("top",n-t+"px"),e.scrollTop(n))})):t&&t()},focus:e,getContainer:function(){var e=this,t=0!==D("#tmpl-"+e.templateSelector).length?wp.template(e.templateSelector):wp.template("customize-"+e.containerType+"-default");return t&&e.container?D.trim(t(e.params)):"<li></li>"},getContent:function(){var e=this.container,t=e.find(".accordion-section-content, .control-panel-content").first(),n="sub-"+e.attr("id"),i=n,a=e.attr("aria-owns");return a&&(i=i+" "+a),e.attr("aria-owns",i),t.detach().attr({id:n,"class":"customize-pane-child "+t.attr("class")+" "+e.attr("class")})}}),I.Section=i.extend({containerType:"section",defaults:{title:"",description:"",priority:100,type:"default",content:null,active:!0,instanceNumber:null,panel:null,customizeAction:""},initialize:function(e,t){var n=this;i.prototype.initialize.call(n,e,t),n.id=e,n.panel=new I.Value,n.panel.bind(function(e){D(n.headContainer).toggleClass("control-subsection",!!e)}),n.panel.set(n.params.panel||""),I.utils.bubbleChildValueChanges(n,["panel"]),n.embed(),n.deferred.embedded.done(function(){n.ready()})},embed:function(){var n=this,i=D("#customize-theme-controls"),e=function(e){var t;e?I.panel(e,function(e){e.deferred.embedded.done(function(){t=e.contentContainer,n.headContainer.parent().is(t)||t.append(n.headContainer),n.contentContainer.parent().is(n.headContainer)||i.append(n.contentContainer),n.deferred.embedded.resolve()})}):(t=D(".customize-pane-parent"),n.headContainer.parent().is(t)||t.append(n.headContainer),n.contentContainer.parent().is(n.headContainer)||i.append(n.contentContainer),n.deferred.embedded.resolve())};n.panel.bind(e),e(n.panel.get())},attachEvents:function(){var e,t=this;t.container.hasClass("cannot-expand")||(t.container.find(".accordion-section-title, .customize-section-back").on("click keydown",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),t.expanded()?t.collapse():t.expand())}),t.container.find(".customize-section-title .customize-help-toggle").on("click",function(){(e=t.container.find(".section-meta")).hasClass("cannot-expand")||((e=e.find(".customize-section-description:first")).toggleClass("open"),e.slideToggle(),e.attr("aria-expanded",function(e,t){return"true"===t?"false":"true"}))}))},isContextuallyActive:function(){var e=this.controls(),t=0;return _(e).each(function(e){e.active()&&(t+=1)}),0!==t},controls:function(){return this._children("section","control")},onChangeExpanded:function(e,t){var n,i,a=this,o=a.headContainer.closest(".wp-full-overlay-sidebar-content"),s=a.contentContainer,r=a.headContainer.closest(".wp-full-overlay"),c=s.find(".customize-section-back"),l=a.headContainer.find(".accordion-section-title").first();e&&!s.hasClass("open")?(n=t.unchanged?t.completeCallback:D.proxy(function(){a._animateChangeExpanded(function(){l.attr("tabindex","-1"),c.attr("tabindex","0"),c.focus(),s.css("top",""),o.scrollTop(0),t.completeCallback&&t.completeCallback()}),s.addClass("open"),r.addClass("section-open"),I.state("expandedSection").set(a)},this),t.allowMultiple||I.section.each(function(e){e!==a&&e.collapse({duration:t.duration})}),a.panel()?I.panel(a.panel()).expand({duration:t.duration,completeCallback:n}):(I.panel.each(function(e){e.collapse()}),n())):!e&&s.hasClass("open")?(a.panel()&&(i=I.panel(a.panel())).contentContainer.hasClass("skip-transition")&&i.collapse(),a._animateChangeExpanded(function(){c.attr("tabindex","-1"),l.attr("tabindex","0"),l.focus(),s.css("top",""),t.completeCallback&&t.completeCallback()}),s.removeClass("open"),r.removeClass("section-open"),a===I.state("expandedSection").get()&&I.state("expandedSection").set(!1)):t.completeCallback&&t.completeCallback()}}),I.ThemesSection=I.Section.extend({currentTheme:"",overlay:"",template:"",screenshotQueue:null,$window:D(window),initialize:function(){return this.$customizeSidebar=D(".wp-full-overlay-sidebar-content:first"),I.Section.prototype.initialize.apply(this,arguments)},ready:function(){var t=this;t.overlay=t.container.find(".theme-overlay"),t.template=wp.template("customize-themes-details-view"),t.container.on("keydown",function(e){t.overlay.find(".theme-wrap").is(":visible")&&(39===e.keyCode&&t.nextTheme(),37===e.keyCode&&t.previousTheme(),27===e.keyCode&&(t.closeDetails(),e.stopPropagation()))}),_.bindAll(this,"renderScreenshots")},isContextuallyActive:function(){return this.active()},attachEvents:function(){var n=this;n.container.find(".change-theme, .customize-theme").on("click keydown",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),n.expanded()?n.collapse():n.expand())}),n.container.on("click keydown",".left",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),n.previousTheme())}),n.container.on("click keydown",".right",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),n.nextTheme())}),n.container.on("click keydown",".theme-backdrop, .close",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),n.closeDetails())});var i=_.throttle(_.bind(n.renderScreenshots,this),100);n.container.on("input","#themes-filter",function(e){var t=e.currentTarget.value.toLowerCase().trim().replace("-"," "),e=n.controls();_.each(e,function(e){e.filter(t)}),i(),e=n.container.find("li.customize-control:visible").length,n.container.find(".theme-count").text(e)}),I.bind("ready",function(){_.each(n.controls().slice(0,3),function(e){e=e.params.theme.screenshot[0];e&&((new Image).src=e)})})},onChangeExpanded:function(e,t){var n,i,a,o,s,r;t.unchanged?t.completeCallback&&t.completeCallback():(a=(i=(n=this).contentContainer).closest(".wp-full-overlay"),o=i.closest(".wp-full-overlay-sidebar-content"),s=i.find(".customize-theme"),r=n.headContainer.find(".change-theme"),e&&!i.hasClass("current-panel")?(I.section.each(function(e){e!==n&&e.collapse({duration:t.duration})}),I.panel.each(function(e){e.collapse({duration:0})}),n._animateChangeExpanded(function(){r.attr("tabindex","-1"),s.attr("tabindex","0"),s.focus(),i.css("top",""),o.scrollTop(0),t.completeCallback&&t.completeCallback()}),a.addClass("in-themes-panel"),i.addClass("current-panel"),_.delay(n.renderScreenshots,10),n.$customizeSidebar.on("scroll.customize-themes-section",_.throttle(n.renderScreenshots,300))):!e&&i.hasClass("current-panel")&&(n._animateChangeExpanded(function(){r.attr("tabindex","0"),s.attr("tabindex","-1"),r.focus(),i.css("top",""),t.completeCallback&&t.completeCallback()}),a.removeClass("in-themes-panel"),i.removeClass("current-panel"),n.$customizeSidebar.off("scroll.customize-themes-section")))},renderScreenshots:function(){var s=this;null===s.screenshotQueue&&(s.screenshotQueue=s.controls()),s.screenshotQueue.length&&(s.screenshotQueue=_.filter(s.screenshotQueue,function(e){var t=e.container.find(".theme-screenshot"),n=t.find("img");if(!n.length)return!1;if(n.is(":hidden"))return!0;var i=s.$window.scrollTop(),a=i+s.$window.height(),o=n.offset().top,n=t.height(),t=3*n,t=i-t<=o+n&&o<=a+t;return t&&e.container.trigger("render-screenshot"),!t}))},nextTheme:function(){var e=this;e.getNextTheme()&&e.showDetails(e.getNextTheme(),function(){e.overlay.find(".right").focus()})},getNextTheme:function(){var e=I.control("theme_"+this.currentTheme),t=e.container.next("li.customize-control-theme");return!!t.length&&(t=t[0].id.replace("customize-control-",""),(e=I.control(t)).params.theme)},previousTheme:function(){var e=this;e.getPreviousTheme()&&e.showDetails(e.getPreviousTheme(),function(){e.overlay.find(".left").focus()})},getPreviousTheme:function(){var e=I.control("theme_"+this.currentTheme),t=e.container.prev("li.customize-control-theme");return!!t.length&&(t=t[0].id.replace("customize-control-",""),(e=I.control(t)).params.theme)},updateLimits:function(){this.getNextTheme()||this.overlay.find(".right").addClass("disabled"),this.getPreviousTheme()||this.overlay.find(".left").addClass("disabled")},loadThemePreview:function(e){var t,n,i=D.Deferred(),a=document.createElement("a");return a.href=location.href,a.search=D.param(_.extend(I.utils.parseQueryString(a.search.substr(1)),{theme:e,changeset_uuid:I.settings.changeset.uuid})),(n=D(".wp-full-overlay")).addClass("customize-loading"),t=function(){var e;0<I.state("processing").get()||(I.state("processing").unbind(t),(e=I.requestChangesetUpdate()).done(function(){D(window).off("beforeunload.customize-confirm"),top.location.href=a.href,i.resolve()}),e.fail(function(){n.removeClass("customize-loading"),i.reject()}))},0===I.state("processing").get()?t():I.state("processing").bind(t),i.promise()},showDetails:function(t,e){var n,i=this;e=e||function(){},i.currentTheme=t.id,i.overlay.html(i.template(t)).fadeIn("fast").focus(),D("body").addClass("modal-open"),i.containFocus(i.overlay),i.updateLimits(),(n=i.overlay.find(".inactive-theme > a")).on("click",function(e){e.preventDefault(),n.hasClass("disabled")||(n.addClass("disabled"),i.loadThemePreview(t.id).fail(function(){n.removeClass("disabled")}))}),e()},closeDetails:function(){D("body").removeClass("modal-open"),this.overlay.fadeOut("fast"),I.control("theme_"+this.currentTheme).focus()},containFocus:function(t){var n;t.on("keydown",function(e){if(9===e.keyCode)return(n=D(":tabbable",t)).last()[0]!==e.target||e.shiftKey?n.first()[0]===e.target&&e.shiftKey?(n.last().focus(),!1):void 0:(n.first().focus(),!1)})}}),I.Panel=i.extend({containerType:"panel",initialize:function(e,t){var n=this;i.prototype.initialize.call(n,e,t),n.embed(),n.deferred.embedded.done(function(){n.ready()})},embed:function(){var e=this,t=D("#customize-theme-controls"),n=D(".customize-pane-parent");e.headContainer.parent().is(n)||n.append(e.headContainer),e.contentContainer.parent().is(e.headContainer)||(t.append(e.contentContainer),e.renderContent()),e.deferred.embedded.resolve()},attachEvents:function(){var t,n=this;n.headContainer.find(".accordion-section-title").on("click keydown",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),n.expanded()||n.expand())}),n.container.find(".customize-panel-back").on("click keydown",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),n.expanded()&&n.collapse())}),(t=n.container.find(".panel-meta:first")).find("> .accordion-section-title .customize-help-toggle").on("click keydown",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),t.hasClass("cannot-expand")||(e=t.find(".customize-panel-description:first"),t.hasClass("open")?(t.toggleClass("open"),e.slideUp(n.defaultExpandedArguments.duration),D(this).attr("aria-expanded",!1)):(e.slideDown(n.defaultExpandedArguments.duration),t.toggleClass("open"),D(this).attr("aria-expanded",!0))))})},sections:function(){return this._children("panel","section")},isContextuallyActive:function(){var e=this.sections(),t=0;return _(e).each(function(e){e.active()&&e.isContextuallyActive()&&(t+=1)}),0!==t},onChangeExpanded:function(e,t){var n,i,a,o,s,r,c;t.unchanged?t.completeCallback&&t.completeCallback():(a=(i=(n=this).contentContainer).closest(".wp-full-overlay"),o=i.closest(".wp-full-overlay-sidebar-content"),s=n.headContainer.find(".accordion-section-title"),r=i.find(".customize-panel-back"),c=n.sections(),e&&!i.hasClass("current-panel")?(I.section.each(function(e){n.id!==e.panel()&&e.collapse({duration:0})}),I.panel.each(function(e){n!==e&&e.collapse({duration:0})}),n.params.autoExpandSoleSection&&1===c.length&&c[0].active.get()?(i.addClass("current-panel skip-transition"),a.addClass("in-sub-panel"),c[0].expand({completeCallback:t.completeCallback})):(n._animateChangeExpanded(function(){s.attr("tabindex","-1"),r.attr("tabindex","0"),r.focus(),i.css("top",""),o.scrollTop(0),t.completeCallback&&t.completeCallback()}),i.addClass("current-panel"),a.addClass("in-sub-panel")),I.state("expandedPanel").set(n)):!e&&i.hasClass("current-panel")&&(i.hasClass("skip-transition")?i.removeClass("skip-transition"):n._animateChangeExpanded(function(){s.attr("tabindex","0"),r.attr("tabindex","-1"),s.focus(),i.css("top",""),t.completeCallback&&t.completeCallback()}),a.removeClass("in-sub-panel"),i.removeClass("current-panel"),n===I.state("expandedPanel").get()&&I.state("expandedPanel").set(!1)))},renderContent:function(){var e=this,t=0!==D("#tmpl-"+e.templateSelector+"-content").length?wp.template(e.templateSelector+"-content"):wp.template("customize-panel-default-content");t&&e.headContainer&&e.contentContainer.html(t(e.params))}}),I.Control=I.Class.extend({defaultActiveArguments:{duration:"fast",completeCallback:D.noop},initialize:function(e,t){var i,a,o=this;o.params={},D.extend(o,t||{}),o.id=e,o.selector="#customize-control-"+e.replace(/\]/g,"").replace(/\[/g,"-"),o.templateSelector="customize-control-"+o.params.type+"-content",o.container=o.params.content?D(o.params.content):D(o.selector),o.deferred={embedded:new D.Deferred},o.section=new I.Value,o.priority=new I.Value,o.active=new I.Value,o.activeArgumentsQueue=[],o.notifications=new I.Values({defaultConstructor:I.Notification}),o.elements=[],i=o.container.find("[data-customize-setting-link]"),a={},i.each(function(){var e,n=D(this);if(n.is(":radio")){if(e=n.prop("name"),a[e])return;a[e]=!0,n=i.filter('[name="'+e+'"]')}I(n.data("customizeSettingLink"),function(e){var t=new I.Element(n);o.elements.push(t),t.sync(e),t.set(e())})}),o.active.bind(function(e){var t=o.activeArgumentsQueue.shift(),t=D.extend({},o.defaultActiveArguments,t);o.onChangeActive(e,t)}),o.section.set(o.params.section),o.priority.set(isNaN(o.params.priority)?10:o.params.priority),o.active.set(o.params.active),I.utils.bubbleChildValueChanges(o,["section","priority","active"]),0===(e=D.map(o.params.settings,function(e){return e})).length?(o.setting=null,o.settings={},o.embed()):I.apply(I,e.concat(function(){for(var e in o.settings={},o.params.settings)o.settings[e]=I(o.params.settings[e]);o.setting=o.settings["default"]||null,_.each(o.settings,function(n){n.notifications.bind("add",function(e){var t=n.id+":"+e.code,e=_.extend({},e,{setting:n.id}),e=new I.Notification(t,e);o.notifications.add(e.code,e)}),n.notifications.bind("remove",function(e){o.notifications.remove(n.id+":"+e.code)})}),o.embed()})),o.deferred.embedded.done(function(){var t=_.debounce(function(){o.renderNotifications()});o.notifications.bind("add",function(e){wp.a11y.speak(e.message,"assertive"),t()}),o.notifications.bind("remove",t),o.renderNotifications(),o.ready()})},embed:function(){var n=this,e=function(e){var t;e&&I.section(e,function(e){e.deferred.embedded.done(function(){t=e.contentContainer.is("ul")?e.contentContainer:e.contentContainer.find("ul:first"),n.container.parent().is(t)||(t.append(n.container),n.renderContent()),n.deferred.embedded.resolve()})})};n.section.bind(e),e(n.section.get())},ready:function(){var t,n=this;"dropdown-pages"===n.params.type&&n.params.allow_addition&&((t=n.container.find(".new-content-item")).hide(),n.container.on("click",".add-new-toggle",function(e){D(e.currentTarget).slideUp(180),t.slideDown(180),t.find(".create-item-input").focus()}),n.container.on("click",".add-content",function(){n.addNewPage()}),n.container.on("keyup",".create-item-input",function(e){13===e.which&&n.addNewPage()}))},getNotificationsContainerElement:function(){var e,t=this,n=t.container.find(".customize-control-notifications-container:first");return n.length||(n=D('<div class="customize-control-notifications-container"></div>'),t.container.hasClass("customize-control-nav_menu_item")?t.container.find(".menu-item-settings:first").prepend(n):t.container.hasClass("customize-control-widget_form")?t.container.find(".widget-inside:first").prepend(n):(e=t.container.find(".customize-control-title")).length?e.after(n):t.container.prepend(n)),n},renderNotifications:function(){var t,e=this,n=!1,i=e.getNotificationsContainerElement();i&&i.length&&(t=[],e.notifications.each(function(e){t.push(e),"error"===e.type&&(n=!0)}),0===t.length?i.stop().slideUp("fast"):i.stop().slideDown("fast",null,function(){D(this).css("height","auto")}),e.notificationsTemplate||(e.notificationsTemplate=wp.template("customize-control-notifications")),e.container.toggleClass("has-notifications",0!==t.length),e.container.toggleClass("has-error",n),i.empty().append(D.trim(e.notificationsTemplate({notifications:t,altNotice:Boolean(e.altNotice)}))))},expand:function(e){I.section(this.section()).expand(e)},focus:e,onChangeActive:function(e,t){t.unchanged?t.completeCallback&&t.completeCallback():D.contains(document,this.container[0])?e?this.container.slideDown(t.duration,t.completeCallback):this.container.slideUp(t.duration,t.completeCallback):(this.container.toggle(e),t.completeCallback&&t.completeCallback())},toggle:function(e){return this.onChangeActive(e,this.defaultActiveArguments)},activate:i.prototype.activate,deactivate:i.prototype.deactivate,_toggleActive:i.prototype._toggleActive,dropdownInit:function(){function e(e){"string"==typeof e&&i.statuses&&i.statuses[e]?n.html(i.statuses[e]).show():n.hide()}var t=this,n=this.container.find(".dropdown-status"),i=this.params,a=!1;this.container.on("click keydown",".dropdown",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),a||t.container.toggleClass("open"),t.container.hasClass("open")&&t.container.parent().parent().find("li.library-selected").focus(),a=!0,setTimeout(function(){a=!1},400))}),this.setting.bind(e),e(this.setting())},renderContent:function(){var e,t=this;0!==D("#tmpl-"+t.templateSelector).length&&(e=wp.template(t.templateSelector))&&t.container&&t.container.html(e(t.params))},addNewPage:function(){var e,a,o,t,s,r,c=this;"dropdown-pages"===c.params.type&&c.params.allow_addition&&I.Menus&&(a=c.container.find(".add-new-toggle"),o=c.container.find(".new-content-item"),t=c.container.find(".create-item-input"),s=t.val(),r=c.container.find("select"),s?(t.removeClass("invalid"),t.attr("disabled","disabled"),(e=I.Menus.insertAutoDraftPost({post_title:s,post_type:"page"})).done(function(e){var t,n,i=new I.Menus.AvailableItemModel({id:"post-"+e.post_id,title:s,type:"post_type",type_label:I.Menus.data.l10n.page_label,object:"page",object_id:e.post_id,url:e.url});I.Menus.availableMenuItemsPanel.collection.add(i),t=D("#available-menu-items-post_type-page").find(".available-menu-items-list"),n=wp.template("available-menu-item"),t.prepend(n(i.attributes)),r.focus(),c.setting.set(String(e.post_id)),o.slideUp(180),a.slideDown(180)}),e.always(function(){t.val("").removeAttr("disabled")})):t.addClass("invalid"))}}),I.ColorControl=I.Control.extend({ready:function(){var t,n=this,e="hue"===this.params.mode,i=!1;e?(t=this.container.find(".color-picker-hue")).val(n.setting()).wpColorPicker({change:function(e,t){i=!0,n.setting(t.color.h()),i=!1}}):(t=this.container.find(".color-picker-hex")).val(n.setting()).wpColorPicker({change:function(){i=!0,n.setting.set(t.wpColorPicker("color")),i=!1},clear:function(){i=!0,n.setting.set(""),i=!1}}),n.setting.bind(function(e){i||(t.val(e),t.wpColorPicker("color",e))}),n.container.on("keydown",function(e){27===e.which&&n.container.find(".wp-picker-container").hasClass("wp-picker-active")&&(t.wpColorPicker("close"),n.container.find(".wp-color-result").focus(),e.stopPropagation())})}}),I.MediaControl=I.Control.extend({ready:function(){var n=this;function e(e){var t=D.Deferred();n.extended(I.UploadControl)?t.resolve():(e=parseInt(e,10),_.isNaN(e)||e<=0?(delete n.params.attachment,t.resolve()):n.params.attachment&&n.params.attachment.id===e&&t.resolve()),"pending"===t.state()&&wp.media.attachment(e).fetch().done(function(){n.params.attachment=this.attributes,t.resolve(),wp.customize.previewer.send(n.setting.id+"-attachment-data",this.attributes)}),t.done(function(){n.renderContent()})}_.bindAll(n,"restoreDefault","removeFile","openFrame","select","pausePlayer"),n.container.on("click keydown",".upload-button",n.openFrame),n.container.on("click keydown",".upload-button",n.pausePlayer),n.container.on("click keydown",".thumbnail-image img",n.openFrame),n.container.on("click keydown",".default-button",n.restoreDefault),n.container.on("click keydown",".remove-button",n.pausePlayer),n.container.on("click keydown",".remove-button",n.removeFile),n.container.on("click keydown",".remove-button",n.cleanupPlayer),I.section(n.section()).container.on("expanded",function(){n.player&&n.player.setControlsSize()}).on("collapsed",function(){n.pausePlayer()}),e(n.setting()),n.setting.bind(e)},pausePlayer:function(){this.player&&this.player.pause()},cleanupPlayer:function(){this.player&&wp.media.mixin.removePlayer(this.player)},openFrame:function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.frame||this.initFrame(),this.frame.open())},initFrame:function(){this.frame=wp.media({button:{text:this.params.button_labels.frame_button},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:this.params.mime_type}),multiple:!1,date:!1})]}),this.frame.on("select",this.select)},select:function(){var e=this.frame.state().get("selection").first().toJSON(),t=window._wpmejsSettings||{};this.params.attachment=e,this.setting(e.id),(e=this.container.find("audio, video").get(0))?this.player=new MediaElementPlayer(e,t):this.cleanupPlayer()},restoreDefault:function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.params.attachment=this.params.defaultAttachment,this.setting(this.params.defaultAttachment.url))},removeFile:function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent())}}),I.UploadControl=I.MediaControl.extend({select:function(){var e=this.frame.state().get("selection").first().toJSON(),t=window._wpmejsSettings||{};this.params.attachment=e,this.setting(e.url),(e=this.container.find("audio, video").get(0))?this.player=new MediaElementPlayer(e,t):this.cleanupPlayer()},success:function(){},removerVisibility:function(){}}),I.ImageControl=I.UploadControl.extend({thumbnailSrc:function(){}}),I.BackgroundControl=I.UploadControl.extend({ready:function(){I.UploadControl.prototype.ready.apply(this,arguments)},select:function(){I.UploadControl.prototype.select.apply(this,arguments),wp.ajax.post("custom-background-add",{nonce:_wpCustomizeBackground.nonces.add,wp_customize:"on",customize_theme:I.settings.theme.stylesheet,attachment_id:this.params.attachment.id})}}),I.BackgroundPositionControl=I.Control.extend({ready:function(){var e,n=this;n.container.on("change",'input[name="background-position"]',function(){var e=D(this).val().split(" ");n.settings.x(e[0]),n.settings.y(e[1])}),e=_.debounce(function(){var e=n.settings.x.get(),t=n.settings.y.get(),t=String(e)+" "+String(t);n.container.find('input[name="background-position"][value="'+t+'"]').click()}),n.settings.x.bind(e),n.settings.y.bind(e),e()}}),I.CroppedImageControl=I.MediaControl.extend({openFrame:function(e){I.utils.isKeydownButNotEnterEvent(e)||(this.initFrame(),this.frame.setState("library").open())},initFrame:function(){var e=_wpMediaViewsL10n;this.frame=wp.media({button:{text:e.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.CustomizeImageCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){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.setImageFromAttachment(e),this.frame.close())},onCropped:function(e){this.setImageFromAttachment(e)},calculateImageSelectOptions:function(e,t){var n=t.get("control"),i=!!parseInt(n.params.flex_width,10),a=!!parseInt(n.params.flex_height,10),o=e.get("width"),s=e.get("height"),r=parseInt(n.params.width,10),c=parseInt(n.params.height,10),l=r/c,d=r,e=c;return t.set("canSkipCrop",!n.mustBeCropped(i,a,r,c,o,s)),l<o/s?r=(c=s)*l:c=(r=o)/l,!(e={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:o,imageHeight:s,minWidth:r<d?r:d,minHeight:c<e?c:e,x1:d=(o-r)/2,y1:e=(s-c)/2,x2:r+d,y2:c+e})==a&&!1==i&&(e.aspectRatio=r+":"+c),!0==a&&(delete e.minHeight,e.maxWidth=o),!0==i&&(delete e.minWidth,e.maxHeight=s),e},mustBeCropped:function(e,t,n,i,a,o){return(!0!==e||!0!==t)&&((!0!==e||i!==o)&&((!0!==t||n!==a)&&((n!==a||i!==o)&&!(a<=n))))},onSkippedCrop:function(){var e=this.frame.state().get("selection").first().toJSON();this.setImageFromAttachment(e)},setImageFromAttachment:function(e){this.params.attachment=e,this.setting(e.id)}}),I.SiteIconControl=I.CroppedImageControl.extend({initFrame:function(){var e=_wpMediaViewsL10n;this.frame=wp.media({button:{text:e.select,close:!1},states:[new wp.media.controller.Library({title:this.params.button_labels.frame_title,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:this.params.width,suggestedHeight:this.params.height}),new wp.media.controller.SiteIconCropper({imgSelectOptions:this.calculateImageSelectOptions,control:this})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this)},onSelect:function(){var e=this.frame.state().get("selection").first().toJSON(),t=this;this.params.width!==e.width||this.params.height!==e.height||this.params.flex_width||this.params.flex_height?this.frame.setState("cropper"):wp.ajax.post("crop-image",{nonce:e.nonces.edit,id:e.id,context:"site-icon",cropDetails:{x1:0,y1:0,width:this.params.width,height:this.params.height,dst_width:this.params.width,dst_height:this.params.height}}).done(function(e){t.setImageFromAttachment(e),t.frame.close()}).fail(function(){t.frame.trigger("content:error:crop")})},setImageFromAttachment:function(t){var n;_.each(["site_icon-32","thumbnail","full"],function(e){n||_.isUndefined(t.sizes[e])||(n=t.sizes[e])}),this.params.attachment=t,this.setting(t.id),n&&D('link[rel="icon"][sizes="32x32"]').attr("href",n.url)},removeFile:function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),this.params.attachment={},this.setting(""),this.renderContent(),D('link[rel="icon"][sizes="32x32"]').attr("href","/favicon.ico"))}}),I.HeaderControl=I.Control.extend({ready:function(){this.btnRemove=D("#customize-control-header_image .actions .remove"),this.btnNew=D("#customize-control-header_image .actions .new"),_.bindAll(this,"openMedia","removeImage"),this.btnNew.on("click",this.openMedia),this.btnRemove.on("click",this.removeImage),I.HeaderTool.currentHeader=this.getInitialHeaderImage(),new I.HeaderTool.CurrentView({model:I.HeaderTool.currentHeader,el:"#customize-control-header_image .current .container"}),new I.HeaderTool.ChoiceListView({collection:I.HeaderTool.UploadsList=new I.HeaderTool.ChoiceList,el:"#customize-control-header_image .choices .uploaded .list"}),new I.HeaderTool.ChoiceListView({collection:I.HeaderTool.DefaultsList=new I.HeaderTool.DefaultsList,el:"#customize-control-header_image .choices .default .list"}),I.HeaderTool.combinedList=I.HeaderTool.CombinedList=new I.HeaderTool.CombinedList([I.HeaderTool.UploadsList,I.HeaderTool.DefaultsList]),wp.media.controller.Cropper.prototype.defaults.doCropArgs.wp_customize="on",wp.media.controller.Cropper.prototype.defaults.doCropArgs.customize_theme=I.settings.theme.stylesheet},getInitialHeaderImage:function(){if(!I.get().header_image||!I.get().header_image_data||_.contains(["remove-header","random-default-image","random-uploaded-image"],I.get().header_image))return new I.HeaderTool.ImageModel;var e=(e=_.find(_wpCustomizeHeader.uploads,function(e){return e.attachment_id===I.get().header_image_data.attachment_id}))||{url:I.get().header_image,thumbnail_url:I.get().header_image,attachment_id:I.get().header_image_data.attachment_id};return new I.HeaderTool.ImageModel({header:e,choice:e.url.split("/").pop()})},calculateImageSelectOptions:function(e,t){var n=parseInt(_wpCustomizeHeader.data.width,10),i=parseInt(_wpCustomizeHeader.data.height,10),a=!!parseInt(_wpCustomizeHeader.data["flex-width"],10),o=!!parseInt(_wpCustomizeHeader.data["flex-height"],10),s=e.get("width"),e=e.get("height");return this.headerImage=new I.HeaderTool.ImageModel,this.headerImage.set({themeWidth:n,themeHeight:i,themeFlexWidth:a,themeFlexHeight:o,imageWidth:s,imageHeight:e}),t.set("canSkipCrop",!this.headerImage.shouldBeCropped()),(t=n/i)<s/e?n=(i=e)*t:i=(n=s)/t,!(e={handles:!0,keys:!0,instance:!0,persistent:!0,imageWidth:s,imageHeight:e,x1:0,y1:0,x2:n,y2:i})==o&&!1==a&&(e.aspectRatio=n+":"+i),!1==o&&(e.maxHeight=i),!1==a&&(e.maxWidth=n),e},openMedia:function(e){var t=_wpMediaViewsL10n;e.preventDefault(),this.frame=wp.media({button:{text:t.selectAndCrop,close:!1},states:[new wp.media.controller.Library({title:t.chooseImage,library:wp.media.query({type:"image"}),multiple:!1,date:!1,priority:20,suggestedWidth:_wpCustomizeHeader.data.width,suggestedHeight:_wpCustomizeHeader.data.height}),new wp.media.controller.Cropper({imgSelectOptions:this.calculateImageSelectOptions})]}),this.frame.on("select",this.onSelect,this),this.frame.on("cropped",this.onCropped,this),this.frame.on("skippedcrop",this.onSkippedCrop,this),this.frame.open()},onSelect:function(){this.frame.setState("cropper")},onCropped:function(e){var t=e.url,n=e.attachment_id,i=e.width,e=e.height;this.setImageFromURL(t,n,i,e)},onSkippedCrop:function(e){var t=e.get("url"),n=e.get("width"),i=e.get("height");this.setImageFromURL(t,e.id,n,i)},setImageFromURL:function(e,t,n,i){var a={};a.url=e,a.thumbnail_url=e,a.timestamp=_.now(),t&&(a.attachment_id=t),n&&(a.width=n),i&&(a.height=i),e=new I.HeaderTool.ImageModel({header:a,choice:e.split("/").pop()}),I.HeaderTool.UploadsList.add(e),I.HeaderTool.currentHeader.set(e.toJSON()),e.save(),e.importImage()},removeImage:function(){I.HeaderTool.currentHeader.trigger("hide"),I.HeaderTool.CombinedList.trigger("control:removeImage")}}),I.ThemeControl=I.Control.extend({touchDrag:!1,isRendered:!1,renderContent:function(){var t=this,n=arguments;I.section(t.section(),function(e){e.expanded()?(I.Control.prototype.renderContent.apply(t,n),t.isRendered=!0):e.expanded.bind(function(e){e&&!t.isRendered&&(I.Control.prototype.renderContent.apply(t,n),t.isRendered=!0)})})},ready:function(){var t=this;t.container.on("touchmove",".theme",function(){t.touchDrag=!0}),t.container.on("click keydown touchend",".theme",function(e){if(!I.utils.isKeydownButNotEnterEvent(e))return!0===t.touchDrag?t.touchDrag=!1:void(D(e.target).is(".theme-actions .button")||I.section(t.section()).loadThemePreview(t.params.theme.id))}),t.container.on("click keydown",".theme-actions .theme-details",function(e){I.utils.isKeydownButNotEnterEvent(e)||(e.preventDefault(),I.section(t.section()).showDetails(t.params.theme))}),t.container.on("render-screenshot",function(){var e=D(this).find("img"),t=e.data("src");t&&e.attr("src",t)})},filter:function(e){var t=this;-1!==(t.params.theme.name+" "+t.params.theme.description+" "+t.params.theme.tags+" "+t.params.theme.author).toLowerCase().replace("-"," ").search(e)?t.activate():t.deactivate()}}),I.defaultConstructor=I.Setting,I.control=new I.Values({defaultConstructor:I.Control}),I.section=new I.Values({defaultConstructor:I.Section}),I.panel=new I.Values({defaultConstructor:I.Panel}),I.PreviewFrame=I.Messenger.extend({sensitivity:null,initialize:function(e,t){var n=D.Deferred();n.promise(this),this.container=e.container,D.extend(e,{channel:I.PreviewFrame.uuid()}),I.Messenger.prototype.initialize.call(this,e,t),this.add("previewUrl",e.previewUrl),this.query=D.extend(e.query||{},{customize_messenger_channel:this.channel()}),this.run(n)},run:function(t){var e,n,i,a=this,o=!1,s=!1,r=null,c="{}"!==a.query.customized;a._ready&&a.unbind("ready",a._ready),a._ready=function(e){s=!0,r=e,a.container.addClass("iframe-ready"),e&&o&&t.resolveWith(a,[e])},a.bind("ready",a._ready),(e=document.createElement("a")).href=a.previewUrl(),n=_.extend(I.utils.parseQueryString(e.search.substr(1)),{customize_changeset_uuid:a.query.customize_changeset_uuid,customize_theme:a.query.customize_theme,customize_messenger_channel:a.query.customize_messenger_channel}),e.search=D.param(n),a.iframe=D("<iframe />",{title:I.l10n.previewIframeTitle,name:"customize-"+a.channel()}),a.iframe.attr("onmousewheel",""),c?a.iframe.attr("data-src",e.href):a.iframe.attr("src",e.href),a.iframe.appendTo(a.container),a.targetWindow(a.iframe[0].contentWindow),c&&((i=D("<form>",{action:e.href,target:a.iframe.attr("name"),method:"post",hidden:"hidden"})).append(D("<input>",{type:"hidden",name:"_method",value:"GET"})),_.each(a.query,function(e,t){i.append(D("<input>",{type:"hidden",name:t,value:e}))}),a.container.append(i),i.submit(),i.remove()),a.bind("iframe-loading-error",function(e){a.iframe.remove(),0!==e?-1!==e?t.rejectWith(a,["request failure"]):t.rejectWith(a,["cheatin"]):a.login(t)}),a.iframe.one("load",function(){o=!0,s?t.resolveWith(a,[r]):setTimeout(function(){t.rejectWith(a,["ready timeout"])},a.sensitivity)})},login:function(n){var i=this,a=function(){n.rejectWith(i,["logged out"])};if(this.triedLogin)return a();D.get(I.settings.url.ajax,{action:"logged-in"}).fail(a).done(function(e){var t;"1"!==e&&a(),(t=D("<iframe />",{src:i.previewUrl(),title:I.l10n.previewIframeTitle}).hide()).appendTo(i.container),t.on("load",function(){i.triedLogin=!0,t.remove(),i.run(n)})})},destroy:function(){I.Messenger.prototype.destroy.call(this),this.iframe&&this.iframe.remove(),delete this.iframe,delete this.targetWindow}}),o=0,I.PreviewFrame.uuid=function(){return"preview-"+String(o++)},I.setDocumentTitle=function(e){e=I.settings.documentTitleTmpl.replace("%s",e);document.title=e,I.trigger("title",e)},I.Previewer=I.Messenger.extend({refreshBuffer:null,initialize:function(e,t){var n,o=this,i=document.createElement("a");D.extend(o,t||{}),o.deferred={active:D.Deferred()},o.refresh=_.debounce((n=o.refresh,function(){var e,t=function(){return 0===I.state("processing").get()};t()?n.call(o):(e=function(){t()&&(n.call(o),I.state("processing").unbind(e))},I.state("processing").bind(e))}),o.refreshBuffer),o.container=I.ensure(e.container),o.allowedUrls=e.allowedUrls,e.url=window.location.href,I.Messenger.prototype.initialize.call(o,e),i.href=o.origin(),o.add("scheme",i.protocol.replace(/:$/,"")),o.add("previewUrl",e.previewUrl).setter(function(e){var n,i=null,t=[],a=document.createElement("a");return a.href=e,/\/wp-(admin|includes|content)(\/|$)/.test(a.pathname)?null:(1<a.search.length&&(delete(e=I.utils.parseQueryString(a.search.substr(1))).customize_changeset_uuid,delete e.customize_theme,delete e.customize_messenger_channel,_.isEmpty(e)?a.search="":a.search=D.param(e)),t.push(a),o.scheme.get()+":"!==a.protocol&&((a=document.createElement("a")).href=t[0].href,a.protocol=o.scheme.get()+":",t.unshift(a)),n=document.createElement("a"),_.find(t,function(t){return!_.isUndefined(_.find(o.allowedUrls,function(e){if(n.href=e,a.protocol===n.protocol&&a.host===n.host&&0===a.pathname.indexOf(n.pathname.replace(/\/$/,"")))return i=t.href,!0}))}),i)}),o.bind("ready",o.ready),o.deferred.active.done(_.bind(o.keepPreviewAlive,o)),o.bind("synced",function(){o.send("active")}),o.previewUrl.bind(o.refresh),o.scroll=0,o.bind("scroll",function(e){o.scroll=e}),o.bind("url",function(e){var t,n=!1;o.scroll=0,t=function(){n=!0},o.previewUrl.bind(t),o.previewUrl.set(e),o.previewUrl.unbind(t),n||o.refresh()}),o.bind("documentTitle",function(e){I.setDocumentTitle(e)})},ready:function(e){var t=this,n={};n.settings=I.get(),n["settings-modified-while-loading"]=t.settingsModifiedWhileLoading,"resolved"===t.deferred.active.state()&&!t.loading||(n.scroll=t.scroll),n["edit-shortcut-visibility"]=I.state("editShortcutVisibility").get(),t.send("sync",n),e.currentUrl&&(t.previewUrl.unbind(t.refresh),t.previewUrl.set(e.currentUrl),t.previewUrl.bind(t.refresh)),t={panel:e.activePanels,section:e.activeSections,control:e.activeControls},_(t).each(function(n,i){I[i].each(function(e,t){_.isUndefined(I.settings[i+"s"][t])&&_.isUndefined(n[t])||(n[t]?e.activate():e.deactivate())})}),e.settingValidities&&I._handleSettingValidities({settingValidities:e.settingValidities,focusInvalidControl:!1})},keepPreviewAlive:function(){var e,t=function(){e=setTimeout(i,I.settings.timeouts.keepAliveCheck)},n=function(){I.state("previewerAlive").set(!0),clearTimeout(e),t()},i=function(){I.state("previewerAlive").set(!1)};t(),this.bind("ready",n),this.bind("keep-alive",n)},query:function(){},abort:function(){this.loading&&(this.loading.destroy(),delete this.loading)},refresh:function(){var e,i=this;i.send("loading-initiated"),i.abort(),i.loading=new I.PreviewFrame({url:i.url(),previewUrl:i.previewUrl(),query:i.query({excludeCustomizedSaved:!0})||{},container:i.container}),i.settingsModifiedWhileLoading={},e=function(e){i.settingsModifiedWhileLoading[e.id]=!0},I.bind("change",e),i.loading.always(function(){I.unbind("change",e)}),i.loading.done(function(e){var t,n=this;i.preview=n,i.targetWindow(n.targetWindow()),i.channel(n.channel()),t=function(){n.unbind("synced",t),i._previousPreview&&i._previousPreview.destroy(),i._previousPreview=i.preview,i.deferred.active.resolve(),delete i.loading},n.bind("synced",t),i.trigger("ready",e)}),i.loading.fail(function(e){i.send("loading-failed"),"logged out"===e&&(i.preview&&(i.preview.destroy(),delete i.preview),i.login().done(i.refresh)),"cheatin"===e&&i.cheatin()})},login:function(){var t,n,i,a=this;return this._login||(t=D.Deferred(),this._login=t.promise(),n=new I.Messenger({channel:"login",url:I.settings.url.login}),i=D("<iframe />",{src:I.settings.url.login,title:I.l10n.loginIframeTitle}).appendTo(this.container),n.targetWindow(i[0].contentWindow),n.bind("login",function(){var e=a.refreshNonces();e.always(function(){i.remove(),n.destroy(),delete a._login}),e.done(function(){t.resolve()}),e.fail(function(){a.cheatin(),t.reject()})}),this._login)},cheatin:function(){D(document.body).empty().addClass("cheatin").append("<h1>"+I.l10n.cheatin+"</h1><p>"+I.l10n.notAllowed+"</p>")},refreshNonces:function(){var e,t=D.Deferred();return t.promise(),(e=wp.ajax.post("customize_refresh_nonces",{wp_customize:"on",customize_theme:I.settings.theme.stylesheet})).done(function(e){I.trigger("nonce-refresh",e),t.resolve()}),e.fail(function(){t.reject()}),t}}),I.settingConstructor={},I.controlConstructor={color:I.ColorControl,media:I.MediaControl,upload:I.UploadControl,image:I.ImageControl,cropped_image:I.CroppedImageControl,site_icon:I.SiteIconControl,header:I.HeaderControl,background:I.BackgroundControl,background_position:I.BackgroundPositionControl,theme:I.ThemeControl},I.panelConstructor={},I.sectionConstructor={themes:I.ThemesSection},I._handleSettingValidities=function(e){var o=[],n=!1;_.each(e.settingValidities,function(t,e){var a=I(e);a&&(_.isObject(t)&&_.each(t,function(e,t){var n=!1,i=new I.Notification(t,_.extend({fromServer:!0},e)),e=a.notifications(i.code);(n=e?i.type!==e.type||i.message!==e.message||!_.isEqual(i.data,e.data):n)&&a.notifications.remove(t),a.notifications.has(i.code)||a.notifications.add(t,i),o.push(a.id)}),a.notifications.each(function(e){!e.fromServer||"error"!==e.type||!0!==t&&t[e.code]||a.notifications.remove(e.code)}))}),e.focusInvalidControl&&(e=I.findControlsForSettings(o),_(_.values(e)).find(function(e){return _(e).find(function(e){var t=e.section()&&I.section.has(e.section())&&I.section(e.section()).expanded();return(t=t&&e.expanded?e.expanded():t)&&(e.focus(),n=!0),n})}),n||_.isEmpty(e)||_.values(e)[0][0].focus())},I.findControlsForSettings=function(e){var n,i={};return _.each(_.unique(e),function(e){var t=I(e);t&&(n=t.findControls())&&0<n.length&&(i[e]=n)}),i},I.reflowPaneContents=_.bind(function(){var i,e,t,a=[],o=!1;document.activeElement&&(e=D(document.activeElement)),I.panel.each(function(e){var t=e.sections(),n=_.pluck(t,"headContainer");a.push(e),i=e.contentContainer.is("ul")?e.contentContainer:e.contentContainer.find("ul:first"),I.utils.areElementListsEqual(n,i.children("[id]"))||(_(t).each(function(e){i.append(e.headContainer)}),o=!0)}),I.section.each(function(e){var t=e.controls(),n=_.pluck(t,"container");e.panel()||a.push(e),i=e.contentContainer.is("ul")?e.contentContainer:e.contentContainer.find("ul:first"),I.utils.areElementListsEqual(n,i.children("[id]"))||(_(t).each(function(e){i.append(e.container)}),o=!0)}),a.sort(I.utils.prioritySort),t=_.pluck(a,"headContainer"),i=D("#customize-theme-controls .customize-pane-parent"),I.utils.areElementListsEqual(t,i.children())||(_(a).each(function(e){i.append(e.headContainer)}),o=!0),I.panel.each(function(e){var t=e.active();e.active.callbacks.fireWith(e.active,[t,t])}),I.section.each(function(e){var t=e.active();e.active.callbacks.fireWith(e.active,[t,t])}),o&&e&&e.focus(),I.trigger("pane-contents-reflowed")},I),D(function(){var u,t,n,i,a,p,o,s,r,c,l,d,e,h,f,m,g,v,w,b,C,y,x,k,z,S,E,T,A,P;I.settings=window._wpCustomizeSettings,I.l10n=window._wpCustomizeControlsL10n,I.settings&&(!D.support.postMessage||!D.support.cors&&I.settings.isCrossDomain||(null===I.PreviewFrame.prototype.sensitivity&&(I.PreviewFrame.prototype.sensitivity=I.settings.timeouts.previewFrameSensitivity),null===I.Previewer.prototype.refreshBuffer&&(I.Previewer.prototype.refreshBuffer=I.settings.timeouts.windowRefresh),t=D(document.body),n=t.children(".wp-full-overlay"),i=D("#customize-info .panel-title.site-title"),a=D(".customize-controls-close"),p=D("#save"),o=D("#customize-footer-actions"),D("#customize-controls").on("keydown",function(e){var t=13===e.which,n=D(e.target);t&&(n.is("input:not([type=button])")||n.is("select"))&&e.preventDefault()}),D(".customize-info").find("> .accordion-section-title .customize-help-toggle").on("click",function(){var e=D(this).closest(".accordion-section"),t=e.find(".customize-panel-description:first");e.hasClass("cannot-expand")||(e.hasClass("open")?(e.toggleClass("open"),t.slideUp(I.Panel.prototype.defaultExpandedArguments.duration),D(this).attr("aria-expanded",!1)):(t.slideDown(I.Panel.prototype.defaultExpandedArguments.duration),e.toggleClass("open"),D(this).attr("aria-expanded",!0)))}),I.previewer=new I.Previewer({container:"#customize-preview",form:"#customize-controls",previewUrl:I.settings.url.preview,allowedUrls:I.settings.url.allowed},{nonce:I.settings.nonce,query:function(e){var t={wp_customize:"on",customize_theme:I.settings.theme.stylesheet,nonce:this.nonce.preview,customize_changeset_uuid:I.settings.changeset.uuid};return t.customized=JSON.stringify(I.dirtyValues({unsaved:e&&e.excludeCustomizedSaved})),t},save:function(i){var e,t,a,o=this,s=D.Deferred(),r="publish",n=I.state("processing"),c={},l=[];function d(e){c[e.id]=!0}return i&&i.status&&(r=i.status),I.state("saving").get()&&(s.reject("already_saving"),s.promise()),I.state("saving").set(!0),I.bind("change",d),t=function(){var e,n={},t=I._latestRevision;if(I.each(function(t){t.notifications.each(function(e){"error"!==e.type||e.fromServer||(l.push(t.id),n[t.id]||(n[t.id]={}),n[t.id][e.code]=e)})}),a=I.findControlsForSettings(l),!_.isEmpty(a))return _.values(a)[0][0].focus(),I.unbind("change",d),s.rejectWith(o,[{setting_invalidities:n}]),I.state("saving").set(!1),s.promise();e=D.extend(o.query({excludeCustomizedSaved:!1}),{nonce:o.nonce.save,customize_changeset_status:r}),i&&i.date&&(e.customize_changeset_date=i.date),i&&i.title&&(e.customize_changeset_title=i.title),e=wp.ajax.post("customize_save",e),p.prop("disabled",!0),I.trigger("save",e),e.always(function(){I.state("saving").set(!1),p.prop("disabled",!1),I.unbind("change",d)}),e.fail(function(e){"0"===e?e="not_logged_in":"-1"===e&&(e="invalid_nonce"),"invalid_nonce"===e?o.cheatin():"not_logged_in"===e&&(o.preview.iframe.hide(),o.login().done(function(){o.save(),o.preview.iframe.show()})),e.setting_validities&&I._handleSettingValidities({settingValidities:e.setting_validities,focusInvalidControl:!0}),s.rejectWith(o,[e]),I.trigger("error",e)}),e.done(function(e){o.send("saved",e),I.state("changesetStatus").set(e.changeset_status),"publish"===e.changeset_status&&(I.each(function(e){e._dirty&&(_.isUndefined(I._latestSettingRevisions[e.id])||I._latestSettingRevisions[e.id]<=t)&&(e._dirty=!1)}),I.state("changesetStatus").set(""),I.settings.changeset.uuid=e.next_changeset_uuid,u.send("changeset-uuid",I.settings.changeset.uuid)),e.setting_validities&&I._handleSettingValidities({settingValidities:e.setting_validities,focusInvalidControl:!0}),s.resolveWith(o,[e]),I.trigger("saved",e),_.isEmpty(c)||I.state("saved").set(!1)})},0===n()?t():(e=function(){0===n()&&(I.state.unbind("change",e),t())},I.state.bind("change",e)),s.promise()}}),D.ajaxPrefilter(function(e){/wp_customize=on/.test(e.data)&&(e.data+="&"+D.param({customize_preview_nonce:I.settings.nonce.preview}))}),I.previewer.bind("nonce",function(e){D.extend(this.nonce,e)}),I.bind("nonce-refresh",function(e){D.extend(I.settings.nonce,e),D.extend(I.previewer.nonce,e),I.previewer.send("nonce-refresh",e)}),D.each(I.settings.settings,function(e,t){t=new(I.settingConstructor[t.type]||I.Setting)(e,t.value,{transport:t.transport,previewer:I.previewer,dirty:!!t.dirty});I.add(e,t)}),D.each(I.settings.panels,function(e,t){t=new(I.panelConstructor[t.type]||I.Panel)(e,{params:t});I.panel.add(e,t)}),D.each(I.settings.sections,function(e,t){t=new(I.sectionConstructor[t.type]||I.Section)(e,{params:t});I.section.add(e,t)}),D.each(I.settings.controls,function(e,t){t=new(I.controlConstructor[t.type]||I.Control)(e,{params:t,previewer:I.previewer});I.control.add(e,t)}),_.each(["panel","section","control"],function(e){var t=I.settings.autofocus[e];t&&I[e](t,function(e){e.deferred.embedded.done(function(){I.previewer.deferred.active.done(function(){e.focus()})})})}),I.bind("ready",I.reflowPaneContents),D([I.panel,I.section,I.control]).each(function(e,t){var n=_.debounce(I.reflowPaneContents,I.settings.timeouts.reflowPaneContents);t.bind("add",n),t.bind("change",n),t.bind("remove",n)}),r=new I.Values,c=r.create("saved"),l=r.create("saving"),d=r.create("activated"),e=r.create("processing"),h=r.create("paneVisible"),f=r.create("expandedPanel"),m=r.create("expandedSection"),g=r.create("changesetStatus"),v=r.create("previewerAlive"),S=r.create("editShortcutVisibility"),r.bind("change",function(){var e;d()?""===g.get()&&c()?(p.val(I.l10n.saved),a.find(".screen-reader-text").text(I.l10n.close)):(p.val(I.l10n.save),a.find(".screen-reader-text").text(I.l10n.cancel)):(p.val(I.l10n.activate),a.find(".screen-reader-text").text(I.l10n.cancel)),e=!l()&&(!d()||!c()||""!==g()&&"publish"!==g()),p.prop("disabled",!e)}),g(I.settings.changeset.status),c(!0),""===g()&&I.each(function(e){e._dirty&&c(!1)}),l(!1),d(I.settings.theme.active),e(0),h(!0),f(!1),m(!1),v(!0),S("visible"),I.bind("change",function(){r("saved").get()&&(r("saved").set(!1),s(!0))}),l.bind(function(e){t.toggleClass("saving",e)}),I.bind("saved",function(e){r("saved").set(!0),"publish"===e.changeset_status&&r("activated").set(!0)}),d.bind(function(e){e&&I.trigger("activated")}),s=function(e){var t,n;if(history.replaceState){if((t=document.createElement("a")).href=location.href,n=I.utils.parseQueryString(t.search.substr(1)),e){if(n.changeset_uuid===I.settings.changeset.uuid)return;n.changeset_uuid=I.settings.changeset.uuid}else{if(!n.changeset_uuid)return;delete n.changeset_uuid}t.search=D.param(n),history.replaceState({},document.title,t.href)}},g.bind(function(e){s(""!==e&&"publish"!==e)}),I.state=r,I.previewer.previewUrl()?I.previewer.refresh():I.previewer.previewUrl(I.settings.url.home),p.click(function(e){I.previewer.save(),e.preventDefault()}).keydown(function(e){9!==e.which&&(13===e.which&&I.previewer.save(),e.preventDefault())}),a.keydown(function(e){9!==e.which&&(13===e.which&&this.click(),e.preventDefault())}),D(".collapse-sidebar").on("click",function(){I.state("paneVisible").set(!I.state("paneVisible").get())}),I.state("paneVisible").bind(function(e){n.toggleClass("preview-only",!e),n.toggleClass("expanded",e),n.toggleClass("collapsed",!e),e?D(".collapse-sidebar").attr({"aria-expanded":"true","aria-label":I.l10n.collapseSidebar}):D(".collapse-sidebar").attr({"aria-expanded":"false","aria-label":I.l10n.expandSidebar})}),D("body").on("keydown",function(e){var t,n=[],i=[],a=[];27===e.which&&(D(e.target).is("body")||D.contains(D("#customize-controls")[0],e.target))&&(I.control.each(function(e){e.expanded&&e.expanded()&&_.isFunction(e.collapse)&&n.push(e)}),I.section.each(function(e){e.expanded()&&i.push(e)}),I.panel.each(function(e){e.expanded()&&a.push(e)}),0<n.length&&0===i.length&&(n.length=0),(t=n[0]||i[0]||a[0])&&(t.collapse(),e.preventDefault()))}),D(".customize-controls-preview-toggle").on("click",function(){I.state("paneVisible").set(!I.state("paneVisible").get())}),z=D(".wp-full-overlay-sidebar-content"),S=function(e){var t=e,n=I.state("expandedSection").get(),e=I.state("expandedPanel").get();if(x&&x.element&&b(x.element),!t)if(!n&&e&&e.contentContainer)t=e;else{if(e||!n||!n.contentContainer)return void(x=!1);t=n}(e=t.contentContainer.find(".customize-section-title, .panel-meta").first()).length?(x={instance:t,element:e,parent:e.closest(".customize-pane-child"),height:w(e)},n&&C(x.element,x.parent)):x=!1},I.state("expandedSection").bind(S),I.state("expandedPanel").bind(S),z.on("scroll",_.throttle(function(){var e,t;x&&(e=z.scrollTop(),t=!k||e<=k,y(x,k=e,t))},8)),b=function(e){e.hasClass("is-sticky")&&e.removeClass("is-sticky").addClass("maybe-sticky is-in-view").css("top",z.scrollTop()+"px")},C=function(e,t){e.removeClass("maybe-sticky is-in-view").css({width:"",top:""}),t.css("padding-top","")},w=function(e){var t=e.data("height");return t||(t=e.outerHeight(),e.data("height",t)),t},y=function(e,t,n){var i=e.element,a=e.parent,o=e.height,s=parseInt(i.css("top"),10),r=i.hasClass("maybe-sticky"),c=i.hasClass("is-sticky"),e=i.hasClass("is-in-view");if(!n)return c&&(s=t,i.removeClass("is-sticky").css({top:s+"px",width:""})),void(e&&s+o<t&&(i.removeClass("is-in-view"),a.css("padding-top","")));if(!r&&o<=t)r=!0,i.addClass("maybe-sticky");else if(0===t)return i.removeClass("maybe-sticky is-in-view is-sticky").css({top:"",width:""}),void a.css("padding-top","");e&&!c?t<=s&&i.addClass("is-sticky").css({top:"",width:a.outerWidth()+"px"}):r&&!e&&(i.addClass("is-in-view").css("top",t-o+"px"),a.css("padding-top",o+"px"))},I.previewedDevice=new I.Value,I.bind("ready",function(){_.find(I.settings.previewableDevices,function(e,t){if(!0===e["default"])return I.previewedDevice.set(t),!0})}),o.find(".devices button").on("click",function(e){I.previewedDevice.set(D(e.currentTarget).data("device"))}),I.previewedDevice.bind(function(e){var t=D(".wp-full-overlay"),n="";o.find(".devices button").removeClass("active").attr("aria-pressed",!1),o.find(".devices .preview-"+e).addClass("active").attr("aria-pressed",!0),D.each(I.settings.previewableDevices,function(e){n+=" preview-"+e}),t.removeClass(n).addClass("preview-"+e)}),i.length&&I("blogname",function(e){function t(){i.text(D.trim(e())||I.l10n.untitledBlogName)}e.bind(t),t()}),(u=new I.Messenger({url:I.settings.url.parent,channel:"loader"})).bind("back",function(){a.on("click.customize-controls-close",function(e){e.preventDefault(),u.send("close")})}),D(window).on("beforeunload.customize-confirm",function(){if(!I.state("saved")())return setTimeout(function(){n.removeClass("customize-loading")},1),I.l10n.saveAlert}),D.each(["saved","change"],function(e,t){I.bind(t,function(){u.send(t)})}),I.bind("title",function(e){u.send("title",e)}),u.send("changeset-uuid",I.settings.changeset.uuid),u.send("ready"),D.each({background_image:{controls:["background_preset","background_position","background_size","background_repeat","background_attachment"],callback:function(e){return!!e}},show_on_front:{controls:["page_on_front","page_for_posts"],callback:function(e){return"page"===e}},header_textcolor:{controls:["header_textcolor"],callback:function(e){return"blank"!==e}}},function(e,i){I(e,function(n){D.each(i.controls,function(e,t){I.control(t,function(t){function e(e){t.container.toggle(i.callback(e))}e(n.get()),n.bind(e)})})})}),I.control("background_preset",function(e){var i={"default":[!1,!1,!1,!1],fill:[!0,!1,!1,!1],fit:[!0,!1,!0,!1],repeat:[!0,!1,!1,!0],custom:[!0,!0,!0,!0]},a={"default":[_wpCustomizeBackground.defaults["default-position-x"],_wpCustomizeBackground.defaults["default-position-y"],_wpCustomizeBackground.defaults["default-size"],_wpCustomizeBackground.defaults["default-repeat"],_wpCustomizeBackground.defaults["default-attachment"]],fill:["left","top","cover","no-repeat","fixed"],fit:["left","top","contain","no-repeat","fixed"],repeat:["left","top","auto","repeat","scroll"]},t=function(n){_.each(["background_position","background_size","background_repeat","background_attachment"],function(e,t){e=I.control(e);e&&e.container.toggle(i[n][t])})},n=function(n){_.each(["background_position_x","background_position_y","background_size","background_repeat","background_attachment"],function(e,t){e=I(e);e&&e.set(a[n][t])})},o=e.setting.get();t(o),e.setting.bind("change",function(e){t(e),"custom"!==e&&n(e)})}),I.control("background_repeat",function(t){t.elements[0].unsync(I("background_repeat")),t.element=new I.Element(t.container.find("input")),t.element.set("no-repeat"!==t.setting()),t.element.bind(function(e){t.setting.set(e?"repeat":"no-repeat")}),t.setting.bind(function(e){t.element.set("no-repeat"!==e)})}),I.control("background_attachment",function(t){t.elements[0].unsync(I("background_attachment")),t.element=new I.Element(t.container.find("input")),t.element.set("fixed"!==t.setting()),t.element.bind(function(e){t.setting.set(e?"scroll":"fixed")}),t.setting.bind(function(e){t.element.set("fixed"!==e)})}),I.control("display_header_text",function(t){var n="";t.elements[0].unsync(I("header_textcolor")),t.element=new I.Element(t.container.find("input")),t.element.set("blank"!==t.setting()),t.element.bind(function(e){e||(n=I("header_textcolor").get()),t.setting.set(e?n:"blank")}),t.setting.bind(function(e){t.element.set("blank"!==e)})}),I("show_on_front","page_on_front",function(e,t){function n(){"page"===e()&&0<parseInt(t(),10)&&I.previewer.previewUrl.set(I.settings.url.home)}e.bind(n),t.bind(n)}),I("page_for_posts",function(e){e.bind(function(e){0<(e=parseInt(e,10))&&I.previewer.previewUrl.set(I.settings.url.home+"?page_id="+e)})}),I.control("custom_css",function(e){e.deferred.embedded.done(function(){var a=e.container.find("textarea"),o=a[0];a.on("blur",function(){a.data("next-tab-blurs",!1)}),a.on("keydown",function(e){var t,n,i;27!==e.keyCode?9!==e.keyCode||e.ctrlKey||e.altKey||e.shiftKey||a.data("next-tab-blurs")||(t=o.selectionStart,n=o.selectionEnd,i=o.value,0<=t&&(o.value=i.substring(0,t).concat("\t",i.substring(n)),a.selectionStart=o.selectionEnd=t+1),e.stopPropagation(),e.preventDefault()):a.data("next-tab-blurs")||(a.data("next-tab-blurs",!0),e.stopPropagation())})})}),I.control("header_video",function(t){t.deferred.embedded.done(function(){function e(){var e=I.section(t.section());e&&(e=e.container.find(".header-video-not-currently-previewable:first"),t.active.get()?e.stop().slideUp("fast"):e.stop().slideDown("fast"))}e(),t.active.bind(e)})}),I.previewer.bind("selective-refresh-setting-validities",function(e){I._handleSettingValidities({settingValidities:e,focusInvalidControl:!1})}),I.previewer.bind("focus-control-for-setting",function(n){var i=[];I.control.each(function(e){var t=_.pluck(e.settings,"id");-1!==_.indexOf(t,n)&&i.push(e)}),i.length&&(i.sort(function(e,t){return e.priority()-t.priority()}),i[0].focus())}),I.previewer.bind("refresh",function(){I.previewer.refresh()}),I.state("paneVisible").bind(function(e){var t=window.matchMedia?window.matchMedia("screen and ( max-width: 640px )").matches:D(window).width()<=640;I.state("editShortcutVisibility").set(e||t?"visible":"hidden")}),window.matchMedia&&window.matchMedia("screen and ( max-width: 640px )").addListener(function(){var e=I.state("paneVisible");e.callbacks.fireWith(e,[e.get(),e.get()])}),I.previewer.bind("edit-shortcut-visibility",function(e){I.state("editShortcutVisibility").set(e)}),I.state("editShortcutVisibility").bind(function(e){I.previewer.send("edit-shortcut-visibility",e)}),T=!1,A=function(){T||(T=!0,I.requestChangesetUpdate().always(function(){T=!1})),P()},(P=function(){clearTimeout(E),E=setTimeout(function(){A()},I.settings.timeouts.changesetAutoSave)})(),D(window).on("blur.wp-customize-changeset-update",function(){A()}),D(window).on("beforeunload.wp-customize-changeset-update",function(){A()}),I.trigger("ready")))})}((wp,jQuery));