if(!customElements.get("card-slider")){class CardSlider extends HTMLElement{constructor(){super();const swiperOptions=JSON.parse(this.getAttribute("data-swiper-options"))||{};this.initSlider(swiperOptions),this.classList.contains("js-testimonials")&&window.addEventListener("resize",()=>{const isMobile=window.innerWidth<mobileWidth,isSlideEffect=this.slider.params.effect==="slide";(isMobile&&!isSlideEffect||!isMobile&&isSlideEffect)&&this.reInitSlider(swiperOptions)})}reInitSlider(swiperOptions){this.slider.destroy(),this.initSlider(swiperOptions)}initSlider(swiperOptions){let sliderOptions={slidesPerView:"auto",spaceBetween:swiperOptions.spaceBetweenMobile||2,resistanceRatio:.72,navigation:{nextEl:".swiper-button--next",prevEl:".swiper-button--prev"},breakpoints:{750:{slidesPerView:3,spaceBetween:swiperOptions.spaceBetweenDesktop||2}}};this.classList.contains("js-articles")?sliderOptions.breakpoints[575]={slidesPerView:2}:this.classList.contains("js-testimonials")&&(window.innerWidth<mobileWidth?(sliderOptions.spaceBetween=4,sliderOptions.breakpoints[480]={slidesPerView:2},sliderOptions.breakpoints[750].slidesPerView=1):sliderOptions={effect:"fade",slidesPerView:1,rewind:!0,followFinger:!1,navigation:{nextEl:".swiper-button--next",prevEl:".swiper-button--prev"}}),this.slider=new Swiper(this,sliderOptions)}}customElements.define("card-slider",CardSlider)}
//# sourceMappingURL=/cdn/shop/t/12/assets/card-slider.js.map?v=52630843357852530021684249905
