1(async()=>{const{Core}=await importModule("Core"),{Swiper}=await importModule("Swiper"),NAV_ARROWS="arrows",NAV_PAG="pagination",CN_AUTOPLAY="@autoplay",SP_AUTOPLAY="--autoplay",ATTR_AUTOPLAY="autoplay",CN_NAV_DISABLED="!disabled",SEL_BG_VIDEO="background-video",SEL_VIDEO_SLIDE="[data-video-slide]",ATTR_HAS_VIDEO="has-video",ATTR_NAVIGATION="navigation",ATTR_AUTO_HEIGHT="auto-height";customElements.define("slideshow-hero",class extends Core{elements={swiper:"[data-swiper]",next:"[data-next]",prev:"[data-prev]"};render(){this._setSwiperProps(),this._initSwiper(),this._initAutoplay()}_initSwiper(){this.swiper=new Swiper(this.$swiper,this.swiperProps),this.hasVideo&&this.swiper.on("slideChange",this._toggleVideo.bind(this))}_initAutoplay(){this.autoplay&&(this.classList.add(CN_AUTOPLAY),this.style.setProperty(SP_AUTOPLAY,`${this.autoplay}ms`),this.swiper.on("autoplayStop",()=>{this.classList.remove(CN_AUTOPLAY)}))}_setSwiperProps(){this.swiperProps={loop:!0},this.swiperProps.autoHeight=this.autoHeight,this.hasVideo&&(this.swiperProps.on={init:()=>{window.customElements.whenDefined(SEL_BG_VIDEO).then(()=>{this.videoSlides=Array.from(this.querySelectorAll(SEL_VIDEO_SLIDE)).map(video=>(video.querySelector(SEL_BG_VIDEO).initPlayer(),video))})}}),this.navigation==NAV_ARROWS&&(this.swiperProps.navigation={nextEl:this.$next,prevEl:this.$prev,disabledClass:CN_NAV_DISABLED}),this.navigation==NAV_PAG&&(this.swiperProps.pagination={el:".swiper-pagination",type:"bullets",clickable:!0}),this.autoplay&&(this.swiperProps.autoplay={delay:this.autoplay})}_toggleVideo({slides,activeIndex,previousIndex}){const current=this.videoSlides.find(item=>item===slides[activeIndex]),prev=this.videoSlides.find(item=>item===slides[previousIndex]);current?.querySelector(SEL_BG_VIDEO)?.play(),prev?.querySelector(SEL_BG_VIDEO)?.pause()}get navigation(){return this.getAttribute(ATTR_NAVIGATION)}get hasVideo(){return this.hasAttribute(ATTR_HAS_VIDEO)}get autoplay(){return this.getAttribute(ATTR_AUTOPLAY)&&+this.getAttribute(ATTR_AUTOPLAY)}get autoHeight(){return this.hasAttribute(ATTR_AUTO_HEIGHT)}})})(); 2//# sourceMappingURL=/cdn/shop/t/29/assets/slideshow-hero.js.map?v=149481378917333867741678313981
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.