1class BasicHeader extends HTMLElement{constructor(){super()}get headerSection(){return document.querySelector(".header-section")}get enableTransparent(){return this.dataset.enableTransparent==="true"}connectedCallback(){if(this.init(),window.ResizeObserver&&new ResizeObserver(this.setHeight.bind(this)).observe(this),Shopify.designMode){const section=this.closest(".shopify-section");section.addEventListener("shopify:section:load",this.init.bind(this)),section.addEventListener("shopify:section:unload",this.init.bind(this)),section.addEventListener("shopify:section:reorder",this.init.bind(this))}}init(){new FoxTheme.delayUntilInteraction(this.setHeight.bind(this)),this.enableTransparent&&this.headerSection.classList.add("header-transparent")}setHeight(){requestAnimationFrame(()=>{const offsetHeight=Math.round(this.offsetHeight),offsetTop=Math.round(this.parentElement.offsetTop);document.documentElement.style.setProperty("--header-height",`${offsetHeight}px`),document.documentElement.style.setProperty("--header-offset-top",`${offsetTop}px`)})}}customElements.define("basic-header",BasicHeader,{extends:"header"});class StickyHeader extends BasicHeader{constructor(){super(),this.classes={pinned:"header-pinned"}}get isAlwaysSticky(){return this.dataset.stickyType==="always"}connectedCallback(){super.connectedCallback(),this.currentScrollTop=0,this.firstScrollTop=window.scrollY,this.headerBounds=this.headerSection.getBoundingClientRect(),this.beforeInit()}beforeInit(){this.headerSection.classList.add("header-sticky"),this.headerSection.dataset.stickyType=this.dataset.stickyType,window.addEventListener("scroll",this.onScrollHandler.bind(this),!1)}onScrollHandler(){const scrollTop=window.scrollY,headerSection=this.headerSection,headerBoundsTop=this.headerBounds.top+this.firstScrollTop,headerBoundsBottom=this.headerBounds.bottom+this.firstScrollTop;requestAnimationFrame(()=>{scrollTop>headerBoundsTop?(headerSection.classList.add("header-scrolled"),this.isAlwaysSticky?document.body.classList.add(this.classes.pinned):scrollTop<this.currentScrollTop||scrollTop<headerBoundsBottom+100?document.body.classList.add(this.classes.pinned):document.body.classList.remove(this.classes.pinned)):(headerSection.classList.remove("header-scrolled"),document.body.classList.remove(this.classes.pinned)),this.currentScrollTop=scrollTop})}}customElements.define("sticky-header",StickyHeader,{extends:"header"});const clearDropdownCount=new WeakMap;class DetailsDropdown extends HTMLDetailsElement{constructor(){super(),this.classes={bodyClass:"has-dropdown-menu"},this.events={handleAfterHide:"menu:handleAfterHide",handleAfterShow:"menu:handleAfterShow"},this.summaryElement=this.firstElementChild,this.contentElement=this.lastElementChild,this._open=this.hasAttribute("open"),this.summaryElement.addEventListener("click",this.handleSummaryClick.bind(this)),this.trigger==="hover"&&(this.summaryElement.addEventListener("focusin",event=>{event.target===this.summaryElement&&(this.open=!0)}),this.summaryElement.addEventListener("focusout",event=>{this.contentElement.contains(event.relatedTarget)||(this.open=!1)})),this.handleOutsideClick=this.handleOutsideClick.bind(this),this.handleEscKeyPress=this.handleEscKeyPress.bind(this),this.handleFocusOut=this.handleFocusOut.bind(this),this.hoverTimer=null,this.detectHoverListener=this.detectHover.bind(this),this.addEventListener("mouseenter",this.detectHoverListener.bind(this)),this.addEventListener("mouseleave",this.detectHoverListener.bind(this))}set open(value){value!==this._open&&(this._open=value,this.isConnected?this.transition(value):value?this.setAttribute("open",""):this.removeAttribute("open"))}get open(){return this._open}get trigger(){return this.hasAttribute("trigger")?this.getAttribute("trigger"):"click"}get level(){return this.hasAttribute("level")?this.getAttribute("level"):"top"}handleSummaryClick(event){event.preventDefault(),!FoxTheme.config.isTouch&&this.trigger==="hover"&&this.summaryElement.hasAttribute("data-link")?window.location.href=this.summaryElement.getAttribute("data-link"):this.open=!this.open}async transition(value){return value?(clearDropdownCount.set(DetailsDropdown,clearDropdownCount.get(DetailsDropdown)+1),document.body.classList.add(this.classes.bodyClass),this.setAttribute("open",""),this.summaryElement.setAttribute("open",""),setTimeout(()=>this.contentElement.setAttribute("open",""),100),document.addEventListener("click",this.handleOutsideClick),document.addEventListener("keydown",this.handleEscKeyPress),document.addEventListener("focusout",this.handleFocusOut),await this.showWithTransition(),this.needsReverse(),FoxTheme.utils.waitForEvent(this,this.events.handleAfterShow)):(clearDropdownCount.set(DetailsDropdown,clearDropdownCount.get(DetailsDropdown)-1),document.body.classList.toggle(this.classes.bodyClass,clearDropdownCount.get(DetailsDropdown)>0),this.summaryElement.removeAttribute("open"),this.contentElement.removeAttribute("open"),document.removeEventListener("click",this.handleOutsideClick),document.removeEventListener("keydown",this.handleEscKeyPress),document.removeEventListener("focusout",this.handleFocusOut),await this.hideWithTransition(),this.open||this.removeAttribute("open"),FoxTheme.utils.waitForEvent(this,this.events.handleAfterHide))}async showWithTransition(){FoxTheme.Motion.animate(this.contentElement,{opacity:[0,1],visibility:"visible"},{duration:FoxTheme.config.motionReduced?0:.6,easing:[.7,0,.2,1],delay:FoxTheme.config.motionReduced?0:.1});const translateY=this.level==="top"?"-105%":"2rem";return FoxTheme.Motion.animate(this.contentElement.firstElementChild,{transform:[`translateY(${translateY})`,"translateY(0)"]},{duration:FoxTheme.config.motionReduced?0:.6,easing:[.7,0,.2,1]}).finished}async hideWithTransition(){FoxTheme.Motion.animate(this.contentElement,{opacity:0,visibility:"hidden"},{duration:FoxTheme.config.motionReduced?0:.3,easing:[.7,0,.2,1]});const translateY=this.level==="top"?"-105%":"2rem";return FoxTheme.Motion.animate(this.contentElement.firstElementChild,{transform:`translateY(${translateY})`},{duration:FoxTheme.config.motionReduced?0:.6,easing:[.7,0,.2,1]}).finished}handleOutsideClick(event){const isClickInside=this.contains(event.target),isClickOnDetailsDropdown=event.target.closest("details")instanceof DetailsDropdown;!isClickInside&&!isClickOnDetailsDropdown&&(this.open=!1)}handleEscKeyPress(event){if(event.code==="Escape"){const targetMenu=event.target.closest("details[open]");targetMenu&&(targetMenu.open=!1)}}handleFocusOut(event){event.relatedTarget&&!this.contains(event.relatedTarget)&&(this.open=!1)}detectHover(event){this.trigger==="hover"&&(this.open=event.type==="mouseenter")}needsReverse(){this.contentElement.offsetLeft+this.contentElement.clientWidth*2>window.innerWidth&&this.contentElement.classList.add("needs-reverse")}}customElements.define("details-dropdown",DetailsDropdown,{extends:"details"}),clearDropdownCount.set(DetailsDropdown,0);class DetailsMega extends DetailsDropdown{constructor(){super(),Shopify.designMode&&(this.addEventListener("shopify:block:select",()=>{this.open=!0}),this.addEventListener("shopify:block:deselect",()=>{this.open=!1}))}async showWithTransition(){return FoxTheme.Motion.animate(this.contentElement.firstElementChild,{visibility:"visible",transform:["translateY(-100%)","translateY(0)"]},{duration:FoxTheme.config.motionReduced?0:.4,easing:[.39,.575,.565,1]}).finished}async hideWithTransition(){return FoxTheme.Motion.animate(this.contentElement.firstElementChild,{visibility:"hidden",transform:"translateY(-100%)"},{duration:FoxTheme.config.motionReduced?0:.4,easing:[.39,.575,.565,1]}).finished}}customElements.define("details-mega",DetailsMega,{extends:"details"});class MenuDrawerDetails extends HTMLDetailsElement{constructor(){super(),this.summary.addEventListener("click",this.onSummaryClick.bind(this)),this.closeButton.addEventListener("click",this.onCloseButtonClick.bind(this))}get parent(){return this.closest("[data-parent]")}get summary(){return this.querySelector("summary")}
1get closeButton(){return this.querySelector("button")}onSummaryClick(){setTimeout(()=>{this.parent.classList.add("active"),this.classList.add("active"),this.summary.setAttribute("aria-expanded",!0)},100)}onCloseButtonClick(){this.parent.classList.remove("active"),this.classList.remove("active"),this.summary.setAttribute("aria-expanded",!1),this.closeAnimation()}closeAnimation(){let animationStart;const handleAnimation=time=>{animationStart===void 0&&(animationStart=time),time-animationStart<400?window.requestAnimationFrame(handleAnimation):this.removeAttribute("open")};window.requestAnimationFrame(handleAnimation)}}customElements.define("menu-drawer-details",MenuDrawerDetails,{extends:"details"});class MenuDrawer extends DrawerComponent{constructor(){super()}get menuItems(){return this._menuItems||(this._menuItems=this.querySelectorAll(".menu-drawer__menus:not(.active) > li")),this._menuItems}prepareToShow(){super.prepareToShow(),setTimeout(()=>{this.animateMenuItems()},300)}animateMenuItems(){FoxTheme.Motion.animate(this.menuItems,{transform:["translateX(-20px)","translateX(0)"],opacity:[0,1]},{duration:.6,easing:[.075,.82,.165,1],delay:FoxTheme.Motion.stagger(.1)}).finished.then(()=>{this.menuItems.forEach(item=>item.removeAttribute("style"))})}handleAfterHide(){super.handleAfterHide(),setTimeout(()=>{this.querySelectorAll("details[is=menu-drawer-details]").forEach(menu=>{menu.onCloseButtonClick()})})}}customElements.define("menu-drawer",MenuDrawer);class MenuProductList extends HTMLElement{constructor(){super(),this.initSlide(),this.elementToFocus=this.querySelector("button")}get container(){return this.querySelector(".swiper")}get sliderPagination(){return this.querySelector(".swiper-pagination")}get sliderNext(){return this.querySelector(".swiper-button-next")}get sliderPrev(){return this.querySelector(".swiper-button-prev")}get numberOfColumns(){return parseInt(this.dataset.columns)}initSlide(){const slider=new FoxTheme.Carousel(this.container,{spaceBetween:10,slidesPerView:this.numberOfColumns,loop:!1,pagination:{el:this.sliderPagination,type:"fraction"},navigation:{nextEl:this.sliderNext,prevEl:this.sliderPrev},focusableElements:"input, select, option, textarea, button, video, label, a"});slider.init(),FoxTheme.a11y.getFocusableElements(this).forEach(element=>{element.addEventListener("focusin",function(){const slide=element.closest(".swiper-slide");slide&&slider.slider.slideTo(slider.slider.slides.indexOf(slide))})})}}customElements.define("menu-product-list",MenuProductList); 2//# sourceMappingURL=/cdn/shop/t/145/assets/header.js.map?v=147311682800834343821789553523
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.