1window.Eurus.loadedScript.has("header.js")||(window.Eurus.loadedScript.add("header.js"),requestAnimationFrame(()=>{document.addEventListener("alpine:init",()=>{Alpine.store("xHeaderMenu",{isSticky:!1,stickyCalulating:!1,openHamburgerMenu:!1,isTouch:!!("ontouchstart"in window||window.DocumentTouch&&window.document instanceof DocumentTouch||window.navigator.maxTouchPoints||window.navigator.msMaxTouchPoints),sectionId:"",stickyType:"none",lastScrollTop:0,themeModeChanged:!1,scrollY:0,stickyOffsetHeight:0,announcementOffsetHeight:0,mobileHeaderLayout:"",show:null,subShow:new Map,overlay:!1,initIndex:new Set,scrollDir:"",isMenuOpen:!1,initialized:!1,passTop:!1,passBottom:!1,debounce(func,wait){let timeout;return function(...args){clearTimeout(timeout),timeout=setTimeout(()=>func.apply(this,args),wait)}},initSticky(headerContainer,stickyType,transparent){setTimeout(()=>{if(stickyType==="none")return;const header=document.getElementById(`shopify-section-${this.sectionId}`),sentinelTop=document.createElement("div");sentinelTop.id="x-header-sentinel-top";const sentinelBottom=document.createElement("div");sentinelBottom.id="x-header-sentinel-bottom",header.before(sentinelTop),header.after(sentinelBottom);const headerObserver=new IntersectionObserver(entries=>{entries.forEach(entry=>{if(entry.target===header){if(!this.initialized){const rect=entry.boundingClientRect;transparent?this.stickyOffsetHeight=document.getElementById("sticky-header-content").offsetHeight:this.stickyOffsetHeight=rect.height;const announcement=document.getElementById("x-announcement");announcement?.dataset.isSticky==="true"&&(this.announcementOffsetHeight=announcement?.offsetHeight),this.initVariable(header,headerContainer,stickyType),this.initScrollEvent(header,headerContainer,stickyType),this.initHeaderHeightEvent(),this.initialized=!0}}else entry.target===sentinelTop?this.passTop=!entry.isIntersecting:this.passBottom=!entry.isIntersecting})});headerObserver.observe(header),headerObserver.observe(sentinelTop),headerObserver.observe(sentinelBottom)},0)},initVariable(header,headerContainer,stickyType){requestAnimationFrame(()=>{header.style.setProperty("--announcement-height",this.announcementOffsetHeight+"px"),header.style.setProperty("--header-sticky-transform",0-this.announcementOffsetHeight-this.stickyOffsetHeight+"px")}),this.handleStickyScrolling(header,headerContainer,stickyType)},initScrollEvent(header,headerContainer,stickyType){let scrollDebounce=null;const onScroll=()=>{clearTimeout(scrollDebounce),scrollDebounce=setTimeout(()=>{let scrollPos=window.scrollY||document.documentElement.scrollTop;this.handleStickyScrolling(header,headerContainer,stickyType,scrollPos)},50)};window.addEventListener("scroll",onScroll,{passive:!0})},handleStickyScrolling(header,headerContainer,stickyType,scrollPos){const dir=this.scrollY<scrollPos;this.scrollY=scrollPos,requestAnimationFrame(()=>{if(stickyType==="always")this.setVariableHeightHeader(!0),this.passBottom?headerContainer.classList.add("is-scrolled"):headerContainer.classList.remove("is-scrolled");else if(stickyType==="reduce-logo-size")this.setVariableHeightHeader(!0),this.passBottom?headerContainer.classList.add("reduce-logo-size","is-scrolled"):headerContainer.classList.remove("reduce-logo-size","is-scrolled");else{let stickyTimeout=null;this.passTop||(header.classList.remove("is-sticky","is-scrolled"),this.isSticky=!1),this.passBottom&&dir?(stickyTimeout||(stickyTimeout=setTimeout(()=>{header.classList.add("is-sticky","is-scrolled"),this.isSticky=!0},550)),headerContainer.classList.add("on-scroll-up-animation"),this.setVariableHeightHeader(!1)):(headerContainer.classList.remove("on-scroll-up-animation"),this.setVariableHeightHeader(!0))}})},initHeaderHeightEvent(){const els=document.querySelectorAll('[class*="--height-header"]');document.addEventListener("eurus:sticky-header-moved",e=>{els.forEach(el=>{el.style.setProperty("--height-header",e.detail.heightHeader+"px")})})},setVariableHeightHeader(isSticky){const heightHeader=isSticky?this.announcementOffsetHeight+this.stickyOffsetHeight:this.announcementOffsetHeight;document.dispatchEvent(new CustomEvent("eurus:sticky-header-moved",{detail:{heightHeader}}))},renderAjax(el,id,element){fetch(`${window.location.pathname}?sections=${id}`).then(response=>response.json()).then(response=>{let html=getSectionInnerHTML(response[id],element);el?.closest('[data-breakpoint="tablet"]')&&(html=html?.replace('id="search-in-modal"','id="search-in-modal-mobile"')),el.innerHTML=html})},setPosition(el,level,hamburger=!1){hamburger?level=level-.5:level=level-1,requestAnimationFrame(()=>{const elm=el.closest(".tree-menu"),widthEl=elm.getElementsByClassName("toggle-menu")[0],widthElWitdth=widthEl.offsetWidth,viewWidth=window.xViewport.innerWidth||document.documentElement.clientWidth,elRect=elm.getBoundingClientRect(),left=elRect.left-widthElWitdth*level<100,right=elRect.right+widthElWitdth*level>viewWidth-100,isRtl=document.querySelector("body").classList.contains("rtl");requestAnimationFrame(()=>{isRtl?left?(el.classList.add("right-0"),widthEl.classList.add("left-0"),elm.classList.remove("position-left")):(el.classList.add("left-0"),widthEl.classList.add("right-0"),elm.classList.add("position-left")):right?(el.classList.add("left-0"),widthEl.classList.add("right-0"),elm.classList.add("position-left")):(el.classList.add("right-0"),widthEl.classList.add("left-0"),elm.classList.remove("position-left"))})})},resizeWindow(el,level,hamburger=!1){const onResize=this.debounce(()=>{this.setPosition(el,level,hamburger)},100);addEventListener("resize",onResize)},toggleMenu(index){this.initIndex.add(index),this.show=this.show===index?0:index,this.overlay=this.show!==0},openMenu(index){this.initIndex.add(index),this.show=index,this.overlay=!0},closeMenu(){this.show=0,this.overlay=!1},openSubMenu(key,index){this.subShow.set(key,index)},updateHeight(el,containerId){const container=document.getElementById(containerId);let currentAnimation=null,previousHeight=null;new ResizeObserver(entries=>
1{for(let entry of entries){const newHeight=entry.borderBoxSize?.[0]?.blockSize??entry.contentRect.height;previousHeight!==null&&Math.abs(previousHeight-newHeight)>=1&&(currentAnimation?.cancel(),currentAnimation=container.animate([{height:`${previousHeight}px`},{height:`${newHeight}px`}],{duration:300,easing:"ease-in-out"})),container.style.height=newHeight+"px",previousHeight=newHeight}}).observe(el)},touchItem(el,isSub=!1){const touchClass=isSub?"touched-sub":"touched";el.addEventListener("touchend",e=>{if(el.classList.contains(touchClass))window.location.replace(el.getAttribute("href"));else{e.preventDefault();for(var dropdown=document.querySelectorAll(`.${touchClass}`),i=0;i<dropdown.length;i++)dropdown[i].classList.remove(touchClass);el.classList.add(touchClass),this.selectItem(el.closest(".has-dropdown"),isSub)}})}})})})); 2//# sourceMappingURL=/cdn/shop/t/52/assets/header.js.map?v=169574642997192220551774087103
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.