!function(){let e=wp.customize;wp.customize.bind("ready",function(){setTimeout(function(){let t;function i(e){let t=document.querySelectorAll(".kirki-device-button");[].slice.call(t).forEach(function(e){e.classList.remove("is-active")});let i=document.querySelector(".kirki-device-button-"+e);i&&i.classList.add("is-active");let c=document.querySelectorAll("[data-kirki-device-preview]");[].slice.call(c).forEach(function(e){e.classList.add("kirki-responsive-item-hidden")});let r=document.querySelectorAll('[data-kirki-device-preview="'+e+'"]');[].slice.call(r).forEach(function(e){e.classList.remove("kirki-responsive-item-hidden")})}(()=>{let e=document.querySelectorAll("[data-kirki-parent-responsive-id]");if(!e.length)return;let t=[];[].slice.call(e).forEach(function(e){let i=e.dataset.kirkiParentResponsiveId,c=e.dataset.kirkiDevicePreview,r=e.dataset.kirkiSetting;t.includes(i)||t.push(i);let n=document.querySelectorAll('[data-kirki-parent-control-setting="'+r+'"]');n.length&&[].slice.call(n).forEach(function(e){e.dataset.kirkiParentResponsiveId=i,e.dataset.kirkiDevicePreview=c})}),t.forEach(function(e){let t=document.querySelector("#customize-control-"+e+" .kirki-device-buttons");if(!t)return;t.setAttribute("data-kirki-devices-for",e);let i=document.querySelector("#customize-control-"+e+" .customize-control-title");i&&i.appendChild(t)})})(),i("desktop"),(t=document.querySelectorAll(".kirki-device-button")).length&&[].slice.call(t).forEach(function(t){t.addEventListener("click",function(t){var i=this.getAttribute("data-kirki-device");e.previewedDevice.set(i)})}),e.previewedDevice.bind(function(e){i(e)})},250)})}();