(()=>{"use strict";var e={n:t=>{var s=t&&t.__esModule?()=>t.default:()=>t;return e.d(s,{a:s}),s},d:(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.domReady;e.n(t)()((()=>{document.querySelectorAll(".wp-block-gutenkit-offcanvas").forEach((e=>{const t=e.querySelectorAll(".gkit_offcanvas-sidebar"),s=e.querySelectorAll(".gkit_close-side-widget"),i=e.querySelector(".gkit-sidebar-group"),r=e.querySelectorAll(".gkit-overlay"),c=e.querySelector(".gkit-disabled"),a=e.querySelector(".gkit-sidebar-widget"),o=e.querySelector(".gkit-sidebar-group"),l=document.querySelector("body"),d=e.getAttribute("data-wrapper"),n=e.getAttribute("data-settings"),g=JSON.parse(n).size,k=a.classList[1],u=o.classList[2],v=e=>{"Escape"!==e.key&&"Esc"!==e.key||y()},y=()=>{i.classList.remove("gkit_isActive"),l.classList.remove("gkit-offcanvas-container",k,u),setTimeout((()=>{l.classList.remove(`gkit-container-${d}`)}),1e3*g),l.classList.remove("gkit-disable-scroll"),document.removeEventListener("keydown",v),t.forEach((e=>e.classList.remove("is-selected")))};t.forEach((e=>{e.addEventListener("click",(()=>{i.classList.contains("gkit_isActive")?y():(i.classList.add("gkit_isActive"),l.classList.add("gkit-offcanvas-container","gkit-container_isActive",k,u,`gkit-container-${d}`),c&&l.classList.add("gkit-disable-scroll"),document.addEventListener("keydown",v),e.classList.add("is-selected"))}))})),s.forEach((e=>{e.addEventListener("click",y)})),r.forEach((e=>{e.addEventListener("click",y)}))}))}))})();