1if(!customElements.get("wave-text")){class WaveText extends HTMLElement{constructor(){super(),this.scrollHandler=this.updateScroll.bind(this),this.resizeHandler=this.onResize.bind(this),this.observeHandler=this.onIntersect.bind(this),this.isMobile=window.innerWidth<=768,this.isVisible=!1,this.active=!1}connectedCallback(){if(this.textPath=this.querySelector("textPath"),!this.textPath)return;const href=this.textPath.getAttribute("href")||this.textPath.getAttribute("xlink:href");this.path=this.querySelector(href),this.path&&(this.speed=parseFloat(this.dataset.speed)||20,this.direction=this.dataset.direction==="reverse"?-1:1,this.trigger=this.dataset.trigger||"scroll",this.pathLength=this.path.getTotalLength(),this.observer=new IntersectionObserver(this.observeHandler,{threshold:.01}),this.observer.observe(this),window.addEventListener("resize",this.resizeHandler),this.isMobile||this.start())}disconnectedCallback(){this.stop(),this.observer.disconnect(),window.removeEventListener("resize",this.resizeHandler)}onResize(){const wasMobile=this.isMobile;this.isMobile=window.innerWidth<=768,wasMobile!==this.isMobile&&(this.isMobile?this.stop():this.isVisible&&this.start())}onIntersect(entries){this.isVisible=entries[0].isIntersecting,this.isVisible&&!this.isMobile?this.start():this.stop()}start(){this.active||this.trigger==="static"||(this.active=!0,this.trigger==="scroll"?(window.addEventListener("scroll",this.scrollHandler),this.updateScroll()):this.trigger==="marquee"&&(this.offset=0,this.loop=requestAnimationFrame(()=>this.updateMarquee())))}stop(){this.active&&(this.active=!1,window.removeEventListener("scroll",this.scrollHandler),cancelAnimationFrame(this.loop),this.loop=null)}updateScroll(){const st=window.scrollY,sh=document.documentElement.scrollHeight,ch=window.innerHeight,percent=st/(sh-ch),offset=.5*this.pathLength+percent*this.speed*this.pathLength*this.direction;offset!==this.lastOffset&&(this.textPath.setAttribute("startOffset",offset),this.lastOffset=offset)}updateMarquee(){this.offset=(this.offset||0)+this.direction*this.speed,this.offset>this.pathLength&&(this.offset=0),this.offset<0&&(this.offset=this.pathLength),this.offset!==this.lastOffset&&(this.textPath.setAttribute("startOffset",this.offset),this.lastOffset=this.offset),this.loop=requestAnimationFrame(()=>this.updateMarquee())}}customElements.define("wave-text",WaveText)} 2//# sourceMappingURL=/cdn/shop/t/3/assets/wave-text.js.map?v=98117667671664313461755819129
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.