PageSourceSearch

https://ukmerch.bostonmanorband.com/cdn/shop/t/2/assets/header-drawer.js?v=160607022407653843031766499840

js bostonmanorband.com collected 2026-09-29 07:43:27 UTC 2,689 bytes, 2 lines download raw bytes

1import{Component}from"@theme/component";import{trapFocus,removeTrapFocus}from"@theme/focus";import{onAnimationEnd}from"@theme/utilities";class HeaderDrawer extends Component{requiredRefs=["details"];connectedCallback(){super.connectedCallback(),this.addEventListener("keyup",this.#onKeyUp),this.#setupAnimatedElementListeners()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keyup",this.#onKeyUp)}#onKeyUp=event=>{event.key==="Escape"&&this.#close(this.#getDetailsElement(event))};get isOpen(){return this.refs.details.hasAttribute("open")}#getDetailsElement(event){return event?.target instanceof Element?event.target.closest("details")??this.refs.details:this.refs.details}toggle(){return this.isOpen?this.close():this.open()}open(event){const details=this.#getDetailsElement(event),summary=details.querySelector("summary");summary&&(summary.setAttribute("aria-expanded","true"),this.preventInitialAccordionAnimations(details),requestAnimationFrame(()=>{details.classList.add("menu-open"),setTimeout(()=>
1{trapFocus(details)},0)}))}back(event){this.#close(this.#getDetailsElement(event))}close(){this.#close(this.refs.details)}#close(details){const summary=details.querySelector("summary");summary&&(summary.setAttribute("aria-expanded","false"),details.classList.remove("menu-open"),onAnimationEnd(details,()=>{reset(details),details===this.refs.details?(removeTrapFocus(),this.querySelectorAll("details[open]:not(accordion-custom > details)").forEach(reset)):setTimeout(()=>{trapFocus(this.refs.details)},0)}))}#setupAnimatedElementListeners(){function removeWillChangeOnAnimationEnd(event){const target=event.target;target&&target instanceof HTMLElement&&(target.style.setProperty("will-change","unset"),target.removeEventListener("animationend",removeWillChangeOnAnimationEnd))}this.querySelectorAll(".menu-drawer__animated-element").forEach(element=>{element.addEventListener("animationend",removeWillChangeOnAnimationEnd)})}preventInitialAccordionAnimations(details){const content=details.querySelectorAll("accordion-custom .details-content");content.forEach(element=>{element instanceof HTMLElement&&element.classList.add("details-content--no-animation")}),setTimeout(()=>{content.forEach(element=>{element instanceof HTMLElement&&element.classList.remove("details-content--no-animation")})},100)}}customElements.get("header-drawer")||customElements.define("header-drawer",HeaderDrawer);function reset(element){element.classList.remove("menu-open"),element.removeAttribute("open"),element.querySelector("summary")?.setAttribute("aria-expanded","false")}
2//# sourceMappingURL=/cdn/shop/t/2/assets/header-drawer.js.map?v=160607022407653843031766499840

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.