1import{mediaQueryLarge,isMobileBreakpoint}from"@theme/utilities";class AccordionCustom extends HTMLElement{get details(){const details=this.querySelector("details");if(!(details instanceof HTMLDetailsElement))throw new Error("Details element not found");return details}get summary(){const summary=this.details.querySelector("summary");if(!(summary instanceof HTMLElement))throw new Error("Summary element not found");return summary}get#disableOnMobile(){return this.dataset.disableOnMobile==="true"}get#disableOnDesktop(){return this.dataset.disableOnDesktop==="true"}get#closeWithEscape(){return this.dataset.closeWithEscape==="true"}#controller=new AbortController;connectedCallback(){const{signal}=this.#controller;this.#setDefaultOpenState(),this.addEventListener("keydown",this.#handleKeyDown,{signal}),this.summary.addEventListener("click",this.handleClick,{signal}),mediaQueryLarge.addEventListener("change",this.#handleMediaQueryChange,{signal}),this.dataset.faqHandle&&(this.#openIfTargeted(!1),window.addEventListener("hashchange",this.#handleHashChange,{signal}))}disconnectedCallback(){this.#controller.abort()}handleClick=event=>{const isMobile=isMobileBreakpoint(),isDesktop=!isMobile;if(isMobile&&this.#disableOnMobile||isDesktop&&this.#disableOnDesktop){event.preventDefault();return}};#handleMediaQueryChange=()=>{this.#setDefaultOpenState()};#handleHashChange=()=>{this.#openIfTargeted(!0)};#openIfTargeted(smooth){const handle=this.dataset.faqHandle;if(!handle)return;let hash=window.location.hash.slice(1);try{hash=decodeURIComponent(hash)}catch{}!hash||hash!==handle||(this.details.open=!0,requestAnimationFrame(()=>{this.scrollIntoView({block:"start",behavior:smooth?"smooth":"auto"})}))}#setDefaultOpenState(){const isMobile=isMobileBreakpoint();this.details.open=isMobile&&this.hasAttribute("open-by-default-on-mobile")||!isMobile&&this.hasAttribute("open-by-default-on-desktop")}#handleKeyDown(event){event.key==="Escape"&&this.#closeWithEscape&&(event.preventDefault(),this.details.open=!1,this.summary.focus())}}customElements.get("accordion-custom")||customElements.define("accordion-custom",AccordionCustom); 2//# sourceMappingURL=/cdn/shop/t/9/assets/accordion-custom.js.map?v=91926287409501836041784124227
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.