https://ninjatransfers.com/cdn/shop/t/1064/assets/section-header.js?v=118609130990513295591780949024
1if(typeof MainHeader!="function"){class MainHeader2 extends HTMLElement{constructor(){super(),this.mount()}mount(){if(document.querySelectorAll("#main > div").forEach(elm=>{elm.classList.contains("no-inert")||elm.setAttribute("data-js-inert","")}),window.inertElems=document.querySelectorAll("[data-js-inert]"),this.hasAttribute("data-sticky-header")){const stickyHeader=document.createElement("div");stickyHeader.classList="sticky-header site-header",stickyHeader.innerHTML=`<div class="header__bottom header-container container--large portable-hide"> 2 ${this.querySelector(".header__bottom").innerHTML} 3 <div style="display:flex;gap:15px;"> 4 ${this.querySelector(".area--custom-icon")?this.querySelector(".area--custom-icon").outerHTML:""} 5 ${this.querySelector(".area--search").outerHTML} 6 ${this.querySelector(".area--cart").outerHTML} 7 </div> 8 </div> 9 <div class="site-header element--hide-on-portable-plus"> 10 ${this.querySelector(".header-container--top").innerHTML} 11 </div>`,document.body.append(stickyHeader),stickyHeader.querySelectorAll("[id]").forEach(elm=>{elm.id=`${elm.id}-sticky`}),stickyHeader.querySelectorAll(".site-nav [aria-controls]").forEach(elm=>{elm.setAttribute("aria-controls",`${elm.getAttribute("aria-controls")}-sticky`)}),window.lst=window.scrollY,window.lhp=0;const stickyHeaderDeskBound=this.querySelector(".header__bottom"),stickyHeaderMobileBound=this.querySelector(".header__top");this.SCROLL_StickyHelper=()=>{var st=window.scrollY;if((st<=0||(window.innerWidth>=1024?stickyHeaderDeskBound.getBoundingClientRect().top>=0:stickyHeaderMobileBound.getBoundingClientRect().top>=0))&&stickyHeader.classList.contains("show")){stickyHeader.classList.remove("show");return}st<0||Math.abs(lst-st)<=5||(st>window.lhp&&(st==0&&stickyHeader.classList.contains("show")?stickyHeader.classList.remove("show"):st<=lst&&!stickyHeader.classList.contains("show")?(window.lhp=stickyHeader.offsetTop,stickyHeader.classList.add("show")):st>lst&&stickyHeader.classList.contains("show")&&stickyHeader.classList.remove("show")),window.lst=st)},window.addEventListener("scroll",this.SCROLL_StickyHelper,{passive:!0})}document.querySelectorAll("[data-js-sidebar-handle]").forEach(elm=>{if(elm.hasAttribute("aria-controls")){const elmSidebar=document.getElementById(elm.getAttribute("aria-controls"));elm.addEventListener("click",e=>{if(window.matchMedia("(max-width: 749px)").matches&&elm.getAttribute("aria-controls")==="site-cart-sidebar"){e.preventDefault(),window.location.href="/cart";return}e.preventDefault(),elm.setAttribute("aria-expanded","true"),elmSidebar.show()}),elm.addEventListener("keyup",e=>{if(e.keyCode==window.KEYCODES.RETURN){if(window.matchMedia("(max-width: 749px)").matches&&elm.getAttribute("aria-controls")==="site-cart-sidebar"){window.location.href="/cart";return}elm.setAttribute("aria-expanded","true"),elmSidebar.show(),elmSidebar.querySelector("[data-js-close]").focus()}})}}),this.classList.contains("site-header--alignment-left")&&(document.getElementById("site-search-sidebar").classList.remove("sidebar--left"),document.getElementById("site-search-sidebar").classList.add("sidebar--right")),document.querySelectorAll("sidebar-drawer [data-js-close]").forEach(elm=>{elm.addEventListener("click",e=>{e.preventDefault(),e.target.closest(".sidebar").classList.contains("sidebar--opened")&&e.target.closest(".sidebar").hide()})}),document.querySelector(".site-overlay")?.addEventListener("click",()=>{document.querySelector(".sidebar--opened")&&document.querySelector(".sidebar--opened").hide()}),document.addEventListener("keydown",e=>{e.keyCode==window.KEYCODES.ESC&&document.querySelector(".sidebar--opened")&&document.querySelector(".sidebar--opened").hide()});const rootHeight=document.getElementById("root-height");this.RESIZE_SidebarHelper=debounce(()=>{rootHeight.innerHTML=`:root { 12 --window-height: ${window.innerHeight}px; 13 --window-width: ${document.body.clientWidth}px; 14 }`},200),window.addEventListener("resize",this.RESIZE_SidebarHelper),rootHeight.innerHTML=`:root { 15 --window-height: ${window.innerHeight}px; 16 --window-width: ${document.body.clientWidth}px; 17 }`,document.body.classList.add("header-loaded"),document.querySelectorAll(".site-nav.style--classic .submenu-masonry").forEach(elm=>{if(Macy){const submenuMacy=new Macy({container:elm,columns:parseInt(elm.getAttribute("data-columns")),margin:30});setTimeout(()=>{submenuMacy.reInit()},100)}}),JSON.parse(document.getElementById("shopify-features").text).predictiveSearch?document.querySelectorAll("[data-js-open-search-drawer").forEach(elm=>{elm.addEventListener("click",e=>{if(e.preventDefault(),!document.body.classList.contains("predictive-script-loaded")){document.body.classList.add("predictive-script-loaded");const predictiveSearchJS=document.createElement("script");predictiveSearchJS.src=KROWN.settings.predictive_search_script,document.head.appendChild(predictiveSearchJS)}setTimeout(()=>{document.querySelector("#search-form-sidebar").focus()},10)})}):this.querySelector("search-form").addEventListener("click",e=>{e.preventDefault(),window.location.href=KROWN.settings.routes.search_url});const closeTouchSubmenus=(focusedElm,focusedParent=null)=>{document.querySelectorAll(".style--classic li.focus").forEach(elm=>{elm===focusedElm||elm===focusedParent||elm.classList.remove("focus")})};let babyMenuTouch=!1;document.querySelectorAll(".style--classic .has-babymenu").forEach(elm=>{elm.addEventListener("touchstart",e=>{elm.firstElementChild.style.pointerEvents="none",elm.classList.toggle("focus"),babyMenuTouch=!0,closeTouchSubmenus(elm,elm.closest(".has-submenu"))})}),document.querySelectorAll(".style--classic .has-submenu").forEach(elm=>{elm.classList.contains("mega-link")||elm.addEventListener("touchstart",e=>{elm.firstElementChild.style.pointerEvents="none",babyMenuTouch||(elm.classList.toggle("focus"),closeTouchSubmenus(elm)),babyMenuTouch=!1})}),document.querySelectorAll(".site-nav.style--classic .has-submenu > a").forEach(childEl=>{const elm=childEl.parentNode;elm.addEventListener("keydown",e=>{e.keyCode==window.KEYCODES.RETURN&&(e.target.classList.contains("no-focus-link")||e.preventDefault(),elm.classList.contains("focus")?document.activeElement.parentNode.classList.contains("has-submenu")&&elm.classList.contains("focus")&&(elm.classList.remove("focus"),elm.setAttribute("aria-expanded","true")):(elm.classList.add("focus"),elm.setAttribute("aria-expanded","true")))}),elm.querySelector(".submenu-holder > li:last-child a")&&elm.querySelector(".submenu-holder > li:last-child a").addEventListener("focusout",e=>{elm.classList.contains("focus")&&(elm.classList.remove("focus"),elm.setAttribute("aria-expanded","fal
17se"))})}),document.querySelectorAll(".site-nav.style--classic .has-babymenu:not(.mega-link) > a").forEach(childEl=>{const elm=childEl.parentNode;elm.addEventListener("keydown",e=>{e.keyCode==window.KEYCODES.RETURN&&(e.target.classList.contains("no-focus-link")||e.preventDefault(),elm.classList.contains("focus")?(elm.classList.remove("focus"),elm.setAttribute("aria-expanded","false")):(elm.classList.add("focus"),elm.setAttribute("aria-expanded","true")))}),elm.querySelector(".babymenu li:last-child a")&&elm.querySelector(".babymenu li:last-child a").addEventListener("focusout",e=>{elm.parentNode.classList.contains("focus")&&(elm.parentNode.classList.remove("focus"),elm.parentNode.setAttribute("aria-expanded","false"))})})}unmount(){window.removeEventListener("resize",this.RESIZE_SidebarHelper)}}typeof customElements.get("main-header")>"u"&&customElements.define("main-header",MainHeader2)}if(typeof SidebarDrawer!="function"){class SidebarDrawer2 extends HTMLElement{constructor(){super(),this.querySelector("[data-js-close]").addEventListener("click",e=>{this.hide(e)}),document.addEventListener("keydown",e=>{if(e.keyCode==window.KEYCODES.ESC){const openedSidebar=document.querySelector("sidebar-drawer.sidebar--opened");openedSidebar&&openedSidebar.hide(e)}})}show(){this._opened=!0,document.body.classList.add("sidebar-opened"),this.classList.contains("sidebar--right")?document.body.classList.add("sidebar-opened--right"):this.classList.contains("sidebar--left")&&document.body.classList.add("sidebar-opened--left"),this.id=="site-cart-sidebar"&&document.getElementById("cart-recommendations-sidebar")&&setTimeout(()=>{document.querySelector("#cart-recommendations-sidebar css-slider")?.resetSlider()},10),this.style.display="grid",setTimeout(()=>
17{this.classList.add("sidebar--opened"),window.inertElems.forEach(elm=>{elm.setAttribute("inert","")})},15)}hide(e){if($(".cart-preview").is(":visible")){e.preventDefault();return}this._opened=!1,this.classList.remove("sidebar--opened"),document.body.classList.remove("sidebar-opened"),document.body.classList.remove("sidebar-opened--left"),document.body.classList.remove("sidebar-opened--right"),window.inertElems.forEach(elm=>{elm.removeAttribute("inert")}),document.querySelector(`[aria-controls="${this.id}"]`)?.setAttribute("aria-expanded","false"),setTimeout(()=>{this.style.display="none"},501)}}typeof customElements.get("sidebar-drawer")>"u"&&customElements.define("sidebar-drawer",SidebarDrawer2)}if(typeof MobileNavigation!="function"){class MobileNavigation2 extends HTMLElement{constructor(){super(),this._openedFirstSubmenu=!1,this._openedSecondSubmenu=!1,this.querySelectorAll(".has-submenu > a").forEach(elm=>{elm.addEventListener("click",e=>{e.preventDefault(),this._openedFirstSubmenu||(this._openedFirstSubmenu=!0,this.classList.add("opened-first-submenu"),this.closest("sidebar-drawer").scrollTo({top:0})),e.target.closest("li").classList.add("opened"),this._resizeContainer()})}),this.querySelectorAll(".has-babymenu > a").forEach(elm=>{elm.addEventListener("click",e=>{e.preventDefault(),this._openedSecondSubmenu||(this._openedSecondSubmenu=!0,this.classList.add("opened-second-submenu"),this.closest("sidebar-drawer").scrollTo({top:0})),e.target.closest("li").classList.add("opened"),this._resizeContainer()})}),this.querySelectorAll(".submenu-back a").forEach(elm=>{elm.addEventListener("click",e=>{this._openedSecondSubmenu?(this._openedSecondSubmenu=!1,this.classList.remove("opened-second-submenu"),this._resizeContainer()):this._openedFirstSubmenu&&(this._openedFirstSubmenu=!1,this.classList.remove("opened-first-submenu"),this._resizeContainer(!0)),this.closest("sidebar-drawer").scrollTo({top:0}),setTimeout(()=>{e.target.closest("li.opened").classList.remove("opened")},301),e.preventDefault()})})}_resizeContainer(main=!1){main?this.style.height="auto":this._openedSecondSubmenu?this.style.height=`${this.querySelector(".opened .babymenu").scrollHeight}px`:this._openedFirstSubmenu&&(this.style.height=`${this.querySelector(".opened .submenu").scrollHeight}px`)}}typeof customElements.get("mobile-navigation")>"u"&&customElements.define("mobile-navigation",MobileNavigation2)} 18//# sourceMappingURL=/cdn/shop/t/1064/assets/section-header.js.map?v=118609130990513295591780949024
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.