PageSourceSearch

https://woolrich.us/cdn/shop/t/2/assets/details-disclosure.js?v=87242045748262445521781035131

js woolrich.us collected 2026-10-09 04:52:10 UTC 6,327 bytes, 2 lines download raw bytes

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(event){setTimeout(()=>{const activeElement=document.activeElement;!this.contains(activeElement)||activeElement.tagName==="A"&&this.content.contains(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")}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`))}}if(customElements.define("header-menu",HeaderMenu),!customElements.get("drawer-disclosure")){class DrawerDisclosure extends HTMLElement{constructor(){super(),this.mainDetailsToggle=this.querySelector("details"),this.summary=this.mainDetailsToggle.querySelector("summary"),this.summary.addEventListener("click",this.toggleDrawer.bind(this)),this.content=this.querySelector("[data-drawer-content]");const isOpen=this.mainDetailsToggle.hasAttribute("open");this.closest(".menu-drawer__navigation")||(this.content.style.height=isOpen?"auto":0);const closeOthersAttr=this.getAttribute("data-close-others");this.closeOtherDrawers=closeOthersAttr!=="false",this.isInteractingWithin=!1;const markInteracting=()=>this.isInteractingWithin=!0,clearInteracting=()=>setTimeout(()=>this.isInteractingWithin=!1);this.content.addEventListener("mousedown",markInteracting,!0),this.content.addEventListener("touchstart",markInteracting,{passive:!0,capture:!0}),this.content.addEventListener("click",clearInteracting,!0),this.content.addEventListener("click",event=>{event.stopPropagation()}),this.content.addEventListener("mouseup",clearInteracting,!0),this.content.addEventListener("touchend",clearInteracting,{passive:!0,capture:!0}),this.mainDetailsToggle.addEventListener("focusout",this.onFocusOut.bind(this)),this.mainDetailsToggle.addEventListener("keydown",this.onKeyDown.bind(this)),this.animationLength=450}connectedCallback(){Shopify.designMode&&document.addEventListener("shopify:block:select",this.oncontentBlockSelect.bind(this));const openFirstAttr=this.getAttribute("data-open-first-drawer-by-default");if(openFirstAttr!==null&&openFirstAttr!=="false"){const currentId=this.mainDetailsToggle&&this.mainDetailsToggle.dataset?this.mainDetailsToggle.dataset.id:null;if(currentId&&currentId.includes("-")){const groupKey=currentId.split("-")[0];window.__drawerFirstOpenedByGroup=window.__drawerFirstOpenedByGroup||{},window.__drawerFirstOpenedByGroup[groupKey]||setTimeout(()=>{const firstDetails=document.querySelector(`drawer-disclosure details[data-id^="${groupKey}-"]`);firstDetails&&(this.openDrawer(firstDetails),window.__drawerFirstOpenedByGroup[groupKey]=!0)})}}this.mainDetailsToggle&&this.mainDetailsToggle.hasAttribute("open")&&this.summary&&requestAnimationFrame(()=>this.openDrawer(this.summary))}onKeyDown(event){event.key==="Escape"&&this.closeDrawer(this)}onFocusOut(event){const nextFocused=event.relatedTarget;nextFocused&&this.contains(nextFocused)}toggleDrawer(event){event.preventDefault(),this.mainDetailsToggle.getAttribute("open")?this.closeDrawer(this):(this.openDrawer(event.currentTarget),this.closeOtherDrawers&&document.querySelectorAll("drawer-disclosure details[open]").forEach(openDetails=>{if(openDetails!==this.mainDetailsToggle){const host=openDetails.closest("drawer-disclosure");host&&host.closeDrawer(host)}}))}closeDrawer(pElem){if(!pElem)return;const detailsElement=pElem.querySelector("details");
1if(!detailsElement)return;const contentElement=pElem.querySelector("[data-drawer-content]"),isMenuDrawerNavigation=this.closest(".menu-drawer__navigation"),summary=pElem.querySelector("summary");if(summary&&summary.setAttribute("aria-expanded",!1),isMenuDrawerNavigation){this.classList.remove("drawer-active");const navigation=this.closest(".menu-drawer__navigation");navigation&&navigation.classList.remove("drawer-active"),setTimeout(()=>{detailsElement.removeAttribute("open")},300)}else contentElement&&(contentElement.style.height=0),setTimeout(()=>{detailsElement.removeAttribute("open")},this.animationLength)}openDrawer(pDrawer){const parentDetails=pDrawer.closest("details");if(parentDetails&&!parentDetails.getAttribute("open")){parentDetails.setAttribute("open",!0);const contentAnswer=parentDetails.querySelector("[data-drawer-content]");if(this.closest(".menu-drawer__navigation")){const navigation=this.closest(".menu-drawer__navigation");contentAnswer&&(contentAnswer.offsetWidth,requestAnimationFrame(()=>{this.classList.add("drawer-active"),navigation&&navigation.classList.add("drawer-active")}),contentAnswer.querySelectorAll("[data-back-button], [data-subpanel-dismiss]").forEach(trigger=>{const newTrigger=trigger.cloneNode(!0);trigger.parentNode.replaceChild(newTrigger,trigger),newTrigger.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.closeDrawer(this)})}))}else requestAnimationFrame(()=>{const innerContent=contentAnswer.querySelector("[data-drawer-content-inner]");if(innerContent){const height=innerContent.offsetHeight;contentAnswer.style.height=`${height}px`}});parentDetails.querySelector("summary").setAttribute("aria-expanded",!0),this.activeDrawer=parentDetails.dataset.id}}oncontentBlockSelect(event){event.preventDefault(),setTimeout(()=>this.openDrawer(event.target),200)}}customElements.define("drawer-disclosure",DrawerDisclosure)}
2//# sourceMappingURL=/cdn/shop/t/2/assets/details-disclosure.js.map?v=87242045748262445521781035131

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.