1customElements.get("carousel-slider")||customElements.define("carousel-slider",class extends HTMLElement{constructor(){super()}connectedCallback(){this.carousel=this.querySelector('[class*="grid-carousel"]'),this.initialize()}initialize(){const autoplayEnabled=this.getAttribute("data-autoplay")==="true",autoPlaySpeed=parseInt(this.getAttribute("data-speed"),10)*1e3,groupCells=this.getAttribute("data-group-cells")!=="false",wrapAround=this.getAttribute("data-wrap-around")==="true";this.carousel.style.display="block",this.flickity=new Flickity(this.carousel,{autoPlay:autoplayEnabled?autoPlaySpeed:!1,cellAlign:"left",groupCells,contain:!0,resize:!0,draggable:!0,prevNextButtons:!1,fade:!1,cellSelector:".grid-item",initialIndex:0,pageDots:!1,wrapAround,accessibility:!1,watchCSS:!0}),this.flickity.on("change",index=>{const event=new CustomEvent("slider:slide-change",{detail:{id:this.getAttribute("id"),index}});document.dispatchEvent(event)})}}),customElements.get("carousel-navigation")||customElements.define("carousel-navigation",class extends HTMLElement{constructor(){super()}connectedCallback(){this.init()}init(retry=1,maxRetry=3){if(retry===maxRetry)return;const id=this.getAttribute("for");if(this.carouselComponent=document.querySelector(`#${id}`),this.wrap=this.dataset.wrap==="true",!this.carouselComponent||!this.carouselComponent.flickity){setTimeout(()=>{this.init(retry+1)},350);return}this.flickity=this.carouselComponent.flickity,this.buttonPrev=this.querySelector(".js-prev"),this.buttonNext=this.querySelector(".js-next"),this.buttonPrev&&this.buttonPrev.addEventListener("click",event=>{event.preventDefault(),this.flickity.previous()}),this.buttonNext&&this.buttonNext.addEventListener("click",event=>{event.preventDefault(),this.flickity.next()}),this.flickity.on("select",()=>{this.wrap||(this.enableButton(this.buttonPrev),this.enableButton(this.buttonNext),this.flickity.slides[this.flickity.selectedIndex-1]?this.flickity.slides[this.flickity.selectedIndex+1]||this.disableButton(this.buttonNext):this.disableButton(this.buttonPrev))})}enableButton(button){button&&(button.classList.remove("pill-nav-item-disabled"),button.classList.remove("focus-none"),button.setAttribute("aria-disabled","false"))}disableButton(button){button&&(button.classList.add("pill-nav-item-disabled"),button.classList.add("focus-none"),button.setAttribute("aria-disabled","true"))}}); 2//# sourceMappingURL=/cdn/shop/t/27/assets/carousel-slider.js.map?v=94398551930810927811774804555
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.