1class AxReassurance extends HTMLElement{connectedCallback(){this.slides=Array.from(this.querySelectorAll("[data-ax-reassurance-slide]")),this.dots=Array.from(this.querySelectorAll("[data-ax-reassurance-dot]")),this.slides.length!==0&&(this.index=0,this.interval=parseInt(this.getAttribute("autoplay"),10)||0,this.hovered=!1,this.reducedMotion=window.matchMedia("(prefers-reduced-motion: reduce)").matches,this.timer=null,this.controller=new AbortController,this.dots.forEach((dot,i)=>{dot.addEventListener("click",()=>this.select(i,!0))}),this.addEventListener("pointerenter",()=>{this.hovered=!0,this.updatePlayback()}),this.addEventListener("pointerleave",()=>{this.hovered=!1,this.updatePlayback()}),this.setupTooltips(),this.select(0),this.updatePlayback())}disconnectedCallback(){this.stopTimer(),this.controller&&this.controller.abort()}select(i,manual){const count=this.slides.length;this.index=(i%count+count)%count,this.slides.forEach((slide,idx)=>{const active=idx===this.index;slide.classList.toggle("is-active",active),slide.setAttribute("aria-hidden",active?"false":"true")}),this.dots.forEach((dot,idx)=>{idx===this.index?dot.setAttribute("aria-current","true"):dot.removeAttribute("aria-current")}),this.closeTooltips(),manual&&(this.stopTimer(),this.updatePlayback())}next(){this.select(this.index+1)}updatePlayback(){this.interval>0&&this.slides.length>1&&!this.reducedMotion&&!this.hovered&&!this.isTooltipOpen()?this.startTimer():this.stopTimer()}startTimer(){this.timer||(this.timer=setInterval(()=>this.next(),this.interval))}stopTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)}isTooltipOpen(){return!!this.querySelector(".ax-reassurance__tooltip.is-open")}setupTooltips(){if(this.tooltips=Array.from(this.querySelectorAll("[data-ax-reassurance-info]")),this.tooltips.forEach(info=>{const trigger=info.querySelector(".ax-reassurance__info-trigger"),tip=info.querySelector(".ax-reassurance__tooltip");!trigger||!tip||trigger.addEventListener("click",event=>{event.preventDefault(),event.stopPropagation();const open=tip.classList.toggle("is-open");trigger.setAttribute("aria-expanded",open?"true":"false"),this.updatePlayback()})}),this.tooltips.length===0)return;const{signal}=this.controller;document.addEventListener("click",event=>{this.contains(event.target)||(this.closeTooltips(),this.updatePlayback())},{signal}),this.addEventListener("keydown",event=>{event.key==="Escape"&&(this.closeTooltips(),this.updatePlayback())},{signal})}closeTooltips(){(this.tooltips||[]).forEach(info=>{const trigger=info.querySelector(".ax-reassurance__info-trigger"),tip=info.querySelector(".ax-reassurance__tooltip");tip&&tip.classList.remove("is-open"),trigger&&trigger.setAttribute("aria-expanded","false")})}}customElements.get("ax-reassurance")||customElements.define("ax-reassurance",AxReassurance); 2//# sourceMappingURL=/cdn/shop/t/4/assets/ax-reassurance.js.map?v=52568533965251974761787330016
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.