1class DetailsDisclosure extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.content=this.mainDetailsToggle.querySelector("summary").nextElementSibling,this.mainDetailsToggle.addEventListener("focusout",this.onFocusOut.bind(this)),this.mainDetailsToggle.addEventListener("toggle",this.onToggle.bind(this))}onFocusOut(){setTimeout(()=>{this.contains(document.activeElement)||this.close()})}onToggle(){this.animations||(this.animations=this.content.getAnimations()),this.mainDetailsToggle.hasAttribute("open")?this.animations.forEach(animation=>animation.play()):this.animations.forEach(animation=>animation.cancel())}close(){this.mainDetailsToggle.removeAttribute("open"),this.mainDetailsToggle.querySelector("summary").setAttribute("aria-expanded",!1)}}customElements.define("details-disclosure",DetailsDisclosure);class HeaderMenu extends DetailsDisclosure{constructor(){super(),this.header=document.querySelector(".header-wrapper"),this.isMega=this.mainDetailsToggle.classList.contains("mega-menu"),this.isMega&&(this.summary=this.mainDetailsToggle.querySelector("summary"),this.summary.addEventListener("click",this.onMegaSummaryClick.bind(this)))}onMegaSummaryClick(event){event.preventDefault(),this.mainDetailsToggle.open&&!this.isClosing?this.close():this.open()}open(){this.cancelClose();const details=this.mainDetailsToggle;details.classList.add("mega-menu--opening"),details.setAttribute("open",""),this.summary.setAttribute("aria-expanded",!0),cancelAnimationFrame(this.openRaf),this.openRaf=requestAnimationFrame(()=>{this.openRaf=requestAnimationFrame(()=>{details.classList.remove("mega-menu--opening")})})}cancelClose(){this.isClosing&&(this.isClosing=!1,clearTimeout(this.fadeTimer),this.content.removeEventListener("transitionend",this.onFadeEnd),this.mainDetailsToggle.classList.remove("mega-menu--closing"))}close(){if(!this.isMega){super.close();return}!this.mainDetailsToggle.open||this.isClosing||(cancelAnimationFrame(this.openRaf),this.mainDetailsToggle.classList.remove("mega-menu--opening"),this.isClosing=!0,this.mainDetailsToggle.classList.add("mega-menu--closing"),this.summary.setAttribute("aria-expanded",!1),this.onFadeEnd=event=>{event.target!==this.content||event.propertyName!=="opacity"||this.finishClose()},this.content.addEventListener("transitionend",this.onFadeEnd),this.fadeTimer=setTimeout(()=>this.finishClose(),400))}finishClose(){this.isClosing&&(this.isClosing=!1,clearTimeout(this.fadeTimer),this.content.removeEventListener("transitionend",this.onFadeEnd),this.mainDetailsToggle.classList.remove("mega-menu--closing"),this.mainDetailsToggle.removeAttribute("open"))}onToggle(){this.header&&(this.header.preventHide=this.mainDetailsToggle.open,document.documentElement.style.getPropertyValue("--header-bottom-position-desktop")===""&&document.documentElement.style.setProperty("--header-bottom-position-desktop",`${Math.floor(this.header.getBoundingClientRect().bottom)}px`))}}customElements.define("header-menu",HeaderMenu); 2//# sourceMappingURL=/cdn/shop/t/148/assets/details-disclosure.js.map?v=36120097906472624191790781486
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.