!function(){var e={};e=React;var t=t=>{let{control:n,customizerSetting:o,choices:a}=t,i="";n.updateComponentState=e=>{"slider"===i?s.current.textContent=e:"input"===i?l.current.value=e:"reset"===i&&(s.current.textContent=e,l.current.value=e)};let r=`kirki-control-input-${o.id}`,c=""!==t.value?t.value:0,l=(0,e.useRef)(null),s=(0,e.useRef)(null);return React.createElement("div",{className:"kirki-control-form",tabIndex:"1"},React.createElement("label",{className:"kirki-control-label",htmlFor:r},React.createElement("span",{className:"customize-control-title"},t.label),React.createElement("span",{className:"customize-control-description description",dangerouslySetInnerHTML:{__html:t.description}})),React.createElement("div",{className:"customize-control-notifications-container",ref:t.setNotificationContainer}),React.createElement("button",{type:"button",className:"kirki-control-reset",onClick:e=>{""!==t.default&&void 0!==t.default?(l.current.value=t.default,s.current.textContent=t.default):""!==t.value?(l.current.value=t.value,s.current.textContent=t.value):(l.current.value=a.min,s.current.textContent=""),i="reset",o.set(l.current.value)}},React.createElement("i",{className:"dashicons dashicons-image-rotate"})),React.createElement("div",{className:"kirki-control-cols"},React.createElement("div",{className:"kirki-control-left-col"},React.createElement("input",{ref:l,type:"range",id:r,defaultValue:c,min:a.min,max:a.max,step:a.step,className:"kirki-control-slider",onChange:e=>{i="range"===e.target.type?"slider":"input";let t=e.target.value;t<a.min&&(t=a.min),t>a.max&&(t=a.max),"input"===i&&(e.target.value=t),o.set(t)}})),React.createElement("div",{className:"kirki-control-right-col"},React.createElement("div",{className:"kirki-control-value",ref:s},c))))};function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(null,arguments)}let o=wp.customize.Control.extend({initialize:function(e,t){let n=this;n.setNotificationContainer=n.setNotificationContainer.bind(n),wp.customize.Control.prototype.initialize.call(n,e,t),wp.customize.control.bind("removed",function e(t){n===t&&(n.destroy(),n.container[0]&&n.container[0].remove?n.container[0].remove():n.container[0]&&n.container[0].parentNode&&n.container[0].parentNode.removeChild(n.container[0]),wp.customize.control.unbind("removed",e))})},setNotificationContainer:function(e){this.notifications.container=e,this.notifications.render()},renderContent:function(){var e;let o=React.createElement(t,n({},this.params,{control:this,customizerSetting:this.setting,setNotificationContainer:this.setNotificationContainer,value:this.params.value}));e=this.container[0],e&&(wp.element.createRoot?wp.element.createRoot(e).render(o):wp.element.render(o,e)),!1!==this.params.choices.allowCollapse&&this.container[0].classList.add("allowCollapse")},ready:function(){let e=this;e.setting.bind(t=>{e.updateComponentState(t)})},updateComponentState:e=>{},destroy:function(){ReactDOM.unmountComponentAtNode(this.container[0]),wp.customize.Control.prototype.destroy&&wp.customize.Control.prototype.destroy.call(this)}});wp.customize.controlConstructor["kirki-slider"]=o}();