1import{S as Splide}from"./splide.esm-Cg9MkWOe.js";class ProductMediaSlider extends HTMLElement{constructor(){super(),this.galleryConfig={},this.galleryCarousel,this.thumbnailConfig={},this.thumbnailCarousel}connectedCallback(){this.setCarouselElements(),this.initializeConfig(),this.createCarousels()}createCarousels(){!this.galleryElement||!this.thumbnailElement||(this.galleryCarousel=new Splide(this.galleryElement,this.galleryConfig),this.thumbnailCarousel=new Splide(this.thumbnailElement,this.thumbnailConfig),this.galleryCarousel.sync(this.thumbnailCarousel),this.galleryCarousel.mount(),this.thumbnailCarousel.mount())}setCarouselElements(){this.galleryElement=this.querySelector('[js-product-media-slider="gallery"]'),this.thumbnailElement=this.querySelector('[js-product-media-slider="thumbnails"]')}moveToSlide(index){this.galleryCarousel&&this.galleryCarousel.go(index)}initializeConfig(){var _a,_b,_c,_d,_e,_f,_g;this.galleryConfig={autoplay:!1,interval:parseInt(((_a=this.galleryElement)==null?void 0:_a.getAttribute("setting-autoplay-speed"))||"5")*1e3,pagination:((_b=this.galleryElement)==null?void 0:_b.getAttribute("setting-pagination"))==="true",arrows:((_c=this.galleryElement)==null?void 0:_c.getAttribute("setting-arrows"))==="true",perPage:1,type:"loop",classes:{arrows:((_d=this.galleryElement)==null?void 0:_d.getAttribute("setting-arrows"))==="true"?"uwp-carousel__arrows":"",arrow:((_e=this.galleryElement)==null?void 0:_e.getAttribute("setting-arrows"))==="true"?"uwp-carousel__arrow":"",prev:((_f=this.galleryElement)==null?void 0:_f.getAttribute("setting-arrows"))==="true"?"uwp-carousel__arrow--prev":"",next:((_g=this.galleryElement)==null?void 0:_g.getAttribute("setting-arrows"))==="true"?"uwp-carousel__arrow--next":""}},this.thumbnailConfig={fixedWidth:60,gap:10,rewind:!0,pagination:!1,isNavigation:!0,arrows:!1}}}function moveToSlide(slider,index){slider.moveToSlide(index)}customElements.define("uwp-product-media-slider",ProductMediaSlider);export{moveToSlide as m}; 2//# sourceMappingURL=/cdn/shop/t/271/assets/product-media-slider-DEHL8nRa.js.map
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.