1customElements.get("page-header-image-banner")||customElements.define("page-header-image-banner",class extends HTMLElement{constructor(){super(),this.section=this.closest("section"),this.logoBanner=this,this.header=document.querySelector(".wt-header"),this.isMobile=window.matchMedia("(max-width: 899px)").matches,this.logoWrapper=this.header.querySelector(".wt-header__logo"),this.showLogoClass="wt-header__logo--show"}connectedCallback(){this.init(),document.addEventListener("shopify:section:load",this.handleAdminEditing.bind(this)),document.addEventListener("shopify:section:unload",this.handleAdminEditing.bind(this)),document.addEventListener("shopify:section:reorder",this.handleAdminEditing.bind(this))}handleAdminEditing(){this.init()}init(){const logoWrapper=document.querySelector(".wt-header__logo");this.isTransparentHeaderEnabled()?(this.setTopMargin(),logoWrapper?.classList.add(this.showLogoClass)):(this.resetTopMargin(),logoWrapper?.classList.remove(this.showLogoClass))}removeObserver(){this.observer&&(this.observer.disconnect(),this.observer=null)}resetTopMargin(){this.section.style.marginTop="0"}disconnectedCallback(){this.logoWrapper?.classList.remove(this.showLogoClass),this.removeObserver(),this.scrollListener&&(document.removeEventListener("scroll",this.scrollListener),this.scrollListener=null),document.removeEventListener("shopify:section:load",this.handleAdminEditing.bind(this)),document.removeEventListener("shopify:section:unload",this.handleAdminEditing.bind(this)),document.removeEventListener("shopify:section:reorder",this.handleAdminEditing.bind(this))}observeHeader(){const header=document.querySelector(".wt-header"),activeTransparentClass="wt-header--transparent";this.observer=new IntersectionObserver(entries=>{entries.forEach(entry=>
1{entry.isIntersecting?header.classList.add(activeTransparentClass):header.classList.remove(activeTransparentClass)})},{root:null,threshold:.05}),this.observer.observe(this.logoBanner)}isValidSectionsOrder(){const pageHeader=document.body.querySelector("header.page-header"),currentSection=this.section;if(pageHeader&¤tSection){let sibling=pageHeader.nextElementSibling;for(;sibling&&sibling.tagName.toLowerCase()!=="section";)sibling=sibling.nextElementSibling;return sibling===currentSection}return!1}isTransparentHeaderEnabled(){const header=document.querySelector(".wt-header");return this.isValidSectionsOrder()&&!!header?.dataset.transparent}calculateOffset(){const headerHeight=document.querySelector("header").offsetHeight,announcment=document.querySelector(".wt-announcement"),announcmentHeight=announcment?announcment.offsetHeight:0;return this.isTransparentHeaderEnabled()?headerHeight+announcmentHeight:0}setTopMargin(){const offset=this.calculateOffset();this.section.style.marginTop=`-${offset}px`}}); 2//# sourceMappingURL=/cdn/shop/t/9/assets/page-header-image-banner.js.map?v=1069799386192783741781628318
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.