1customElements.get("slider-component-product")||customElements.define("slider-component-product",class extends SliderComponent{constructor(){super(),this.swiperEl=this.querySelector(".swiper"),this.swiperContainer=this.querySelector(".swiper-wrapper"),this.dotsContainer=this.querySelector(".slider-dots"),this.mobileBreakpoint=750,this.swiperEl&&(this.initSwiper(),this.handleResize=this.handleResize.bind(this),window.addEventListener("resize",this.handleResize),this._onModalClosed=()=>{requestAnimationFrame(()=>{if(!this.swiper||this.swiper.destroyed)return;const td=this.swiper.touchEventsData;td&&(td.isTouched=!1,td.isMoved=!1,td.startMoving=!1,td.pointerId=null,td.touchId=null,td.allowTouchCallbacks=!1,this.swiper.allowTouchMove=!0,this.swiper.params.allowTouchMove=!0)})},document.body.addEventListener("modalClosed",this._onModalClosed))}initSwiper(){window.innerWidth>=this.mobileBreakpoint||(this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null),this.swiper=new Swiper(this.swiperEl,{slidesPerView:1,spaceBetween:0,centeredSlides:!0,loop:!0,watchOverflow:!0,allowTouchMove:!0,pagination:{el:".swiper-pagination"},mousewheel:{invert:!1},on:{slideChange:swiper=>{this.updateActiveDot(swiper)}}}),this.initDots())}handleResize(){const isMobile=window.innerWidth<this.mobileBreakpoint;isMobile&&!this.swiper?this.initSwiper():!isMobile&&this.swiper&&(this.swiper.destroy(!0,!0),this.swiper=null)}initDots(){!this.dotsContainer||!this.swiper||this.dotsClickHandler||(this.dotsClickHandler=e=>{const dot=e.target.closest(".slider-dot");if(!dot||!this.swiper)return;const slideIndex=parseInt(dot.getAttribute("data-slide-index"),10);isNaN(slideIndex)||this.swiper.slideToLoop(slideIndex)},this.dotsContainer.addEventListener("click",this.dotsClickHandler))}updateActiveDot(swiper){if(!this.dotsContainer||!swiper)return;const dots=this.dotsContainer.querySelectorAll(".slider-dot"),activeIndex=swiper.realIndex;dots.forEach((dot,index)=>{index===activeIndex?(dot.classList.add("is-active"),dot.setAttribute("aria-selected","true")):(dot.classList.remove("is-active"),dot.setAttribute("aria-selected","false"))})}disconnectedCallback(){this.handleResize&&window.removeEventListener("resize",this.handleResize),this._onModalClosed&&document.body.removeEventListener("modalClosed",this._onModalClosed),this.dotsContainer&&this.dotsClickHandler&&(this.dotsContainer.removeEventListener("click",this.dotsClickHandler),this.dotsClickHandler=null),this.swiper&&this.swiper.destroy(!0,!0)}getSlidesPerView(){this.colorSwatches.length&&(this.productCardRect=this.getBoundingClientRect(),this.productCardWidth=this.productCardRect.width,this.colorSwatchWidth=this.colorSwatches[0].offsetWidth,!(!this.productCardWidth||!this.colorSwatchWidth)&&(this.swatchGap=10,this.slidesPerViewCount=Math.floor(this.productCardWidth/(this.colorSwatchWidth+this.swatchGap)),this.slidesPerView=this.slidesPerViewCount))}}); 2//# sourceMappingURL=/cdn/shop/t/12/assets/main-product.js.map?v=86290520366141708231781168559
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.